2
$\begingroup$

Let's say you have an encrypted file store of some kind such as an encrypted hard drive, ZIP file, etc. You don't have the private key or password to this file store, so a brute-force attack is not a good option.

But what you DO have is a copy of a file -- a file that you know for certain is on that file store.

Does this help reduce the complexity of an attack? In other words, would I be able to crack the encryption in less time by knowing part of the contents of the encrypted file store?

(Forgive me if this is obvious, encryption is not my specialty.)

$\endgroup$
  • $\begingroup$ do you alternatively mean it as known cipher-text attack? In certain cases these do help if in sufficient amount. $\endgroup$ – singhsumit Aug 1 '11 at 20:47
  • $\begingroup$ singhsumit, not exactly what I was thinking. But that's another interesting Wikipedia article for me to read! $\endgroup$ – MrEricSir Aug 1 '11 at 22:32
  • $\begingroup$ sry it was known plain-text only.. (ciphertext are always known.) $\endgroup$ – singhsumit Aug 2 '11 at 17:38
13
$\begingroup$

This is called the known-plaintext attack. Any cipher algorithm which is prone to this type of attack is considered very weak. Therefore, AFAIK, no present-day cipher (e.g. AES) has this weakness. Even DES needs 243 known plaintexts to be broken under linear cryptanalysis. (see this topic on Wikipedia).

On the other hand, all hope is not lost. Weak ciphers or bad implementation of strong ciphers are still commonplace. One noticeable case is with the (old) implementations of ZIP. More info is available here:

http://www.elcomsoft.com/help/archpr/index.html?known_plaintext_attack_(zip).html

$\endgroup$
  • 7
    $\begingroup$ “On the other hand, all hope is not lost.” :) $\endgroup$ – Tsuyoshi Ito Aug 1 '11 at 21:16
  • $\begingroup$ This partially answers the question, and provides a new lead on what to look for. But I guess my curiosity still isn't quite satisfied, since I did ask if the known text would make it easier to break than brute force. Another issue would be the size of the file I had. For example, if it was the entire file store unencrypted, it seems like it would be quite simple to determine if what I had matched the encrypted store; but what if I only had, say, 95% of it? $\endgroup$ – MrEricSir Aug 1 '11 at 22:29
  • 1
    $\begingroup$ @eric-yorba: With most modern ciphers, a known-plaintext attack does not help much beyond brute-force. Regarding the second issue, I remember that long ago, I recovered the contents of an encrypted ZIP file having just one small TXT file in the store. So, it seems that the percentage of plaintext available isn't that crucial. Please read the linked page on ElcomSoft website for more info. $\endgroup$ – M.S. Dousti Aug 2 '11 at 4:59
  • 1
    $\begingroup$ Every attack must assume something on the plaintext. Barring signatures, checksums and the like, if the plaintext is random then you can't expect to break the encryption. On the other hand, even if you do know a part of the plaintext, it need not be a known-plaintext attack from the point of view of the "inner" cipher (think of a block cipher used with some non-ECB mode of operation). $\endgroup$ – Yuval Filmus Aug 2 '11 at 20:27

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.