1
$\begingroup$

I have a question about decryption.

Let's say I have a bunch of files that are encrypted. Someone gains access to those files, and finds out that he already has one of them, unencrypted.

My question is, can he use that file to make a comparison with the encrypted version of the file to find the key, therefor be able to decrypt all the files?

$\endgroup$
  • $\begingroup$ Beware that the size of a file may be a good indication of which file is encrypted. This doesn't help anybody with decryption though, which is what you asked. $\endgroup$ – Maarten Bodewes Apr 27 '15 at 19:08
0
$\begingroup$

No an attacker can't (if the encryption is any good).

If an attacker would be able to do this he'd be able to mount a known-plaintext attack against the cipher/mode combination, which is infeasible for most ciphers (AES,...) and modes (GCM,CTR,...).

| improve this answer | |
$\endgroup$
4
$\begingroup$

One would certainly hope not; if he can, then we would consider the encryption method "broken".

One of the things we expect from any encryption method is the resistance to a "known plaintext attack" (of which your question is an example); that is, even if he is given a number of plaintext/ciphertext pairs, he still is unable to decrypt another ciphertext that is encrypted with the same key.

Actually, we go father than that; we also ask encryption methods to be resistant to "chosen plaintext attacks"; that is, even if the attacker can ask that messages of his choosing be encrypted (and he then gets the resulting ciphertext), he still is unable to decrypt a target ciphertext.

| improve this answer | |
$\endgroup$
0
$\begingroup$

Find a key and decrypt all the files? Definitely not, if it's proper encryption.

Still, if the encryption does not properly seed itself, or take at least some sort of steps to make it non-deterministic, then the attacker may be able to glean some information from the other files.

For example the encryption might do things in block sizes of 1024-bits. If there is a 1024-bit block in his known file and he knows what that blocks like as ciphertext, then recognizing that block in other files would allow him to infer the plaintext. It wouldn't give them the whole file, but it's still more information than you would ever want them knowing.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.