Meet Ledger Nano™ Gen5, the most playful signer yet

Discover now

The most playful signer yet

Meet Ledger Nano™ Gen5

Shop now Learn more

Known Plaintext Attack

Feb 18, 2025 | Updated Feb 18, 2025
A known plaintext attack is a type of cyber attack where the bad actor has access to encrypted data and its corresponding plaintext. 

A known plaintext attack is a type of cyber attack where the bad actor has access to encrypted data and its corresponding plaintext. 

What Is a Known Plaintext Attack?

A known-plaintext attack or attempt (KPA) is a type of cryptographic attack where an attacker has access to both the ciphertext and the plaintext (called crib) of data. This plaintext-ciphertext pair allows the attacker to compare and analyze the pair in an attempt to retrieve the secret key or encryption method. 

What’s more, retrieving the secret keys allows the attackers to decode other messages encrypted using the same keys or encryption technique. In other words, the attackers try to reverse engineer the encryption algorithm by analyzing the relationship between the known pair and trying to match the plaintexts with their ciphertext counterparts.

How Does KPA Work?

In KPA, the attacker collects pairs of the crib and the matching ciphertext from data leaks or intercepted communications. Technically speaking, having access to even a single plaintext-ciphertext pair is enough for a bad actor to exploit the weaknesses of an encryption algorithm. Of course, the more pairs the actor acquires, the higher their chances of discovering the secret key and encryption method.

The bad actor then compares the plaintext characters or letters with corresponding ciphertext letters to understand how each plaintext character is transformed into a different character in the ciphertext. 

After this analysis, the actor guesses the cipher or determines the encryption method based on the changes between the plaintext characters and their corresponding ciphers or positioning. The attacker then uses the pattern they’ve figured out to decode other parts of the message or other messages encrypted using the same keys or encryption technique.

For example, consider a simple Caesar cipher, which shifts each letter by a fixed number of positions. If the bad actor knows the crib “HELLO”  as well as the corresponding cipher “KHOOR,” the attacker can deduce the key by shifting each letter by three positions.

Techniques Used to Exploit KPA

Attackers can exploit KPA in three ways – frequency analysis, pattern matching, and statistical analysis:

  • Frequency analysis – In frequency analysis, the attacker compares the frequency of characters in the plaintext-ciphertext pair, allowing the attacker to replace each character with a specific one. For example, “e” is the most frequent letter in English text. An attacker can suspect a recurring character in the ciphertext to correspond to “e” in plaintext. The attacker can use this little information to recover the key or crack the rest of the data.
  • Pattern matching – This involves the attacker identifying recurring patterns in the pair. If there’s consistency in a specific sequence of characters in the plaintext-ciphertext pair,  they can identify the trend and use the pattern to figure out the encryption technique. 
  • Statistical analysis – This involves analyzing the distribution of characters and other statistical properties. The bad actor applies statistical methods to establish a likely pattern within the ciphertext based on the known crib.

Liquidation

Liquidation in crypto refers to the process of converting assets, typically leveraged positions or collateral, into cash to cover losses or repay borrowed funds when the market moves unfavorably.

Full definition

ERC-1155

The ERC-1155 is a multi-token standard that allows for the creation of both fungible and non-fungible tokens within a single smart contract.

Full definition

Impersonation Fraud

Impersonation fraud is a form of deception involving a malicious actor pretending to be someone else to exploit unsuspecting victims.

Full definition

Own your crypto future

Stay informed with security tips, updates, and exclusive offers from Ledger

Your email address will only be used to send you our newsletter, as well as updates and offers. You can unsubscribe at any time. Learn more

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.