Skip to main content
228 votes

Why is writing your own encryption discouraged?

Your question, MikeAzo's comment, and your reply practically could not be a better example of Schneier's Law in practice. Schneier stated: Anyone, from the most clueless amateur to the best ...
Stephen Touset's user avatar
140 votes
Accepted

In end-to-end encryption, doesn't the server need to be trusted?

End-to-end encryption over a channel with an eavesdropper, like the WhatsApp server, works by using a mathemagical spell called Diffie–Hellman key agreement. What follows is not actually how WhatsApp ...
Squeamish Ossifrage's user avatar
129 votes
Accepted

If WhatsApp cannot read our message, how can the media forwarding happen in an instant?

Leaving aside the WhatsApp aspect fo the question: the effect described can be achieved with hybrid encryption, where the bulk of the data is encrypted under a random secret symmetric key, and the ...
fgrieu's user avatar
  • 142k
115 votes

Why is writing your own encryption discouraged?

I actually think this is a really good question. The answer is because cryptography is a skill, and like any skill, it takes time to develop. Additionally, you will be pitting your (in)experience in ...
Ella Rose's user avatar
  • 19.7k
107 votes
Accepted

How come Public key cryptography wasn't discovered earlier?

If you read about Merkle's experience with bringing the subject to the mainstream, you might be surprised. His professor rejected his initial proposal and show little interest in any further ...
Ella Rose's user avatar
  • 19.7k
91 votes
Accepted

What are the chances that AES-256 encryption is cracked?

He told me there are only two encryptions that he knows of that cannot be broken, and AES is not one of them This tells me you asked your professor the wrong question. You asked a cyber security ...
Cort Ammon's user avatar
  • 3,261
67 votes

How can I make sure non-open source programs are really using end-to-end encryption?

Is there's a way to make sure that non-open source programs are really using end-to-end encryption? Only by deep reverse-engineering. Which is hard, and might be illegal. Plus the apps are a moving ...
fgrieu's user avatar
  • 142k
66 votes

Cryptography algorithms that take longer to solve on a GPU than a CPU

This specific situation is a central part of the analysis of password hashing functions. Indeed, for hashing a password, we want a function which is: slow in a tunable way; such that the most cost-...
Thomas Pornin's user avatar
66 votes

Differences between industrial and military cryptography

There’s no difference except for marketing. Neither of the terms has a meaningful technical definition on which a substantial share of experts in the field can agree. Historically there was a ...
David Foerster's user avatar
61 votes
Accepted

Is the software that uses PGP broken, or is it PGP itself?

Usenix Paper, replacing earlier draft at efail.de. TL;DR: the vulnerability is in some popular email client software, often combined with an extension simplifying the use of an OpenPGP (e.g. GnuPG) or ...
fgrieu's user avatar
  • 142k
59 votes

What are the chances that AES-256 encryption is cracked?

AES-256 - the block cipher - as far as we know hasn't been broken. It has not even been close to broken. On the other hand, we cannot prove that it is secure. That means that an algorithm that is able ...
Maarten Bodewes's user avatar
  • 93.2k
59 votes

Is it possible to create a "digital seal" to tell if a document has been opened?

Encrypt your document, and embed a web address (and login details) in the packaging from which a reader can get the decryption key. The website must be trusted. The website logs will tell you when ...
Nullius in Verba's user avatar
55 votes
Accepted

One Encryption, Many Decryption Keys

This is known in the cryptographic literature as "traitor tracing". See, e.g., the following seminal paper: An efficient public key traitor tracing scheme. Dan Boneh and Matt Franklin. CRYPTO 1999....
D.W.'s user avatar
  • 36.5k
53 votes

If WhatsApp cannot read our message, how can the media forwarding happen in an instant?

That's also a problem with encrypted emails. If you have an email with a 5MB attachment, and the public keys of 1,000 recipients, how do you send it to all of them? You create a key pair for ...
gnasher729's user avatar
  • 1,272
53 votes

Is the software that uses PGP broken, or is it PGP itself?

There are a few parts to the EFAIL attacks. Some parts are the fault of the mailer authors for exposing unnecessary attack surface via arbitrary incoming email. Some parts are the fault of the ...
Squeamish Ossifrage's user avatar
53 votes
Accepted

Can I say "I have encrypted something" if I hash something?

Encryption algorithms and hash algorithms both belong to the realm of cryptography but are two different things: Encryption doesn't contain hash functions. As stated on Wikipedia: In cryptography, ...
AleksanderCH's user avatar
  • 6,462
53 votes
Accepted

How are side-channel attacks executed? What does an attacker need to execute a side channel attack?

Here's a very simple timing side channel attack that you might even see in movies. Suppose you're trying to log in to a computer with a password, and the victim compares your password byte by byte ...
Squeamish Ossifrage's user avatar
51 votes

How to find modulus from a RSA public key?

I wanted to help break down exactly what you're seeing. If you take your base64 string: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/...
Ian Boyd's user avatar
  • 1,001
50 votes
Accepted

What's the truth about this "absolutely unbreakable" cipher?

I will go out on a limb here and say that it reeks of snake oil. I have seen the answer by @dirdi, but I am very skeptical. It is clear from the paper that the authors have almost no understanding of ...
Yehuda Lindell's user avatar
49 votes
Accepted

7zip : Why does encrypting the same file with AES-256 not give the same output?

This is expected behavior since 7zip uses Cipher Block Chaining (CBC) mode for encryption. For which you need the Initialization Vector (IV) to be unique and unpredictable. It was using 64-bit IV but ...
kelalaka's user avatar
  • 48.9k
48 votes
Accepted

Is using the same IV in AES similar to not using an IV in the first place?

Lets see if I can clarify things for you. For one, the IV is not specifically related to AES at all. AES is a keyed invertible transform from a 128 bit value to a 128 bit value; that's all it can do....
poncho's user avatar
  • 148k
42 votes
Accepted

Encryption that purposefully take hours to decrypt

Time-lock puzzles appear to be what you want (see for example this). A basic construction is via "Repeated Squaring in the RSA group". Let $p,q$ be large primes, and let $N = pq$. The goal is, for ...
Mark Schultz-Wu's user avatar
  • 13.5k
40 votes
Accepted

Calculate all possible keys for AES 128 encryption to exploit hardware encryption

Is this attack plausible using a modern PC? No. For AES-128 (or any secure 128-bit symmetric cipher for that matter), there are $2^{128}$ possible keys. You would have to try on average half of those ...
mikeazo's user avatar
  • 38.7k
39 votes
Accepted

What is universal composability guaranteeing, specifically? Where does it apply, and where does it not?

The different guarantees of security In security proofs, you have several guarantees that you can obtain on the security of a protocol. The most famous are maybe the following: game-based security ...
Léo Colisson's user avatar
36 votes

2way cryptography

But i wrote and tested a script in python that does exactly the story above. Yes, obviously it can happen; however you have to be a bit careful about how you do it to actually be secure. Here's is ...
poncho's user avatar
  • 148k
36 votes

Can I encrypt a message by swapping bits in the text?

First problem is you're not specifying at all how many swaps you need to do for a given message length, other than saying it's "several." For an $n$-bit messsage there are $n!$ ways of rearranging its ...
Luis Casillas's user avatar
35 votes

Is it easy to crack a hashed phone number?

No, it is not a good idea to hash phone numbers. There are only a limited number of phone numbers, so it is pretty easy for an adversary to try and hash all of them. Then you can simply compare the ...
Maarten Bodewes's user avatar
  • 93.2k
34 votes
Accepted

Can Shannon's entropy be used to determine if a file is encrypted?

You are likely going to have both false positives and false negatives if you try to use Shannon entropy for this. Many compressed files would have close to 8 bits of entropy per byte, resulting in ...
otus's user avatar
  • 32.2k
34 votes

How come Public key cryptography wasn't discovered earlier?

I guess the discovery of public key crypto was not earlier due to three combined factors: before (digital) computers, public key cryptography was impossible difficult to implement, and things that ...
fgrieu's user avatar
  • 142k

Only top scored, non community-wiki answers of a minimum length are eligible