Known-plaintext attack

From Wikipedia, the free encyclopedia

The known-plaintext attack (KPA) is an attack model for cryptanalysis where the attacker has samples of both the plaintext and its encrypted version (ciphertext) and is at liberty to make use of them to reveal further secret information; typically this is the secret key.

At Bletchley Park in World War II, strenuous efforts were made to use and even force the Germans to produce messages with known plaintext. The known plaintexts were called "cribs", and schemes to force the Germans to produce them were called "gardening". In other cases, the Bletchley Park team would guess some of the plaintext based upon when the message was sent. For instance, a daily weather report was transmitted by the Germans, at the same time every day. Due to the regimented style of military reports, it would contain the word "Wetter" (German for "weather") at the same location in every message, and knowing the local weather conditions helped Bletchley Park guess other parts of the plaintext as well. The Polish Cipher Bureau had likewise exploited "cribs" in the "ANX method" before World War II. (The Germans' use of "ANX" — German for "To," followed by "X" as a spacer.)

Encrypted file archives such as ZIP are also very prone to this attack. For example, an attacker with an encrypted ZIP file needs only one unencrypted file from the archive which forms the "known-plaintext". Then using some publicly available software they can instantly calculate the key required to decrypt the entire archive.

To obtain this unencrypted file the attacker could search the website for a suitable file, find it from another archive they can open, or manually try to reconstruct a plaintext file armed with the knowledge of the filename from the encrypted archive.

Classical ciphers are typically vulnerable to known-plaintext attack. For example, a Caesar cipher can be solved using a single letter of corresponding plaintext and ciphertext to decrypt entirely. A general monoalphabetic substitution cipher needs several character pairs and some guessing if there are fewer than 26 distinct pairs.

[edit] See also

Languages