<p>This is called the <a href="http://en.wikipedia.org/wiki/Known-plaintext_attack">known-plaintext attack</a>. 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 2<sup>43</sup> known plaintexts to be broken under linear cryptanalysis. (see <a href="http://en.wikipedia.org/wiki/Data_Encryption_Standard#Attacks_faster_than_brute-force">this topic</a>  on Wikipedia).</p>

<p>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:</p>

<p><a href="http://www.elcomsoft.com/help/archpr/index.html?known_plaintext_attack_(zip).html">http://www.elcomsoft.com/help/archpr/index.html?known_plaintext_attack_(zip).html</a></p>

CC BY-SA 3.0
2011-08-01T21:16:12.623Z
“On the other hand, all hope is not lost.”  :)
Tsuyoshi Ito
CC BY-SA 3.0
2011-08-01T22:29:11.357Z
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?
MrEricSir
CC BY-SA 3.0
2011-08-02T04:59:31.923Z
@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.
Sadeq Dousti
CC BY-SA 3.0
2011-08-02T20:27:43.297Z
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).
Yuval Filmus
CC BY-SA 3.0
2011-08-01T20:57:46.863Z
2011-08-02T15:32:33.023Z
2011-08-02T15:32:33.023Z
Sadeq Dousti
<p>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.</p>

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

<p>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?</p>

<p>(Forgive me if this is obvious, encryption is not my specialty.)</p>

CC BY-SA 3.0
2011-08-01T20:47:16.190Z
do you alternatively mean it as known cipher-text attack? In certain cases these do help if in sufficient amount.
singhsumit
CC BY-SA 3.0
2011-08-01T22:32:57.690Z
singhsumit, not exactly what I was thinking. But that's another interesting Wikipedia article for me to read!
MrEricSir
CC BY-SA 3.0
2011-08-02T17:38:28.807Z
sry it was known plain-text only.. (ciphertext are always known.)
singhsumit
<cr.crypto-security><cryptographic-attack>
Breaking encrypted file store with a file?
MrEricSir
# Breaking encrypted file store with a file?

(Asked by: username_0 on 2011-08-01)

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.)

**Tags:** cr.crypto-security, cryptographic-attack
> **Comments:**
> **username_1**: do you alternatively mean it as known cipher-text attack? In certain cases these do help if in sufficient amount.  
> **username_0**: singhsumit, not exactly what I was thinking. But that's another interesting Wikipedia article for me to read!  
> **username_1**: sry it was known plain-text only.. (ciphertext are always known.)  

---

## 1 answers

### Answer by username_2 on 2011-08-01. Score: 13 | Accepted answer

This is called the [known-plaintext attack](http://en.wikipedia.org/wiki/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](http://en.wikipedia.org/wiki/Data_Encryption_Standard#Attacks_faster_than_brute-force) 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>

> **Comments:**
> **username_3**: “On the other hand, all hope is not lost.”  :)  
> **username_0**: 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?  
> **username_2**: @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.  
> **username_4**: 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).  

---

