Cryptanalysis
What is Cryptanalysis?
Cryptanalysis is the science and art of breaking
those codes.
• In addition to studying cryptography techniques,
we also need to study cryptanalysis techniques.
• This is needed not to break other people's codes,
but to learn how vulnerable our cryptosystem is.
• The study of cryptanalysis helps us create better
secret codes.
Types of Cryptanalysis
Attacks
1. Ciphertext-Only Attack
Ina ciphertext-only attack, Eve has
access to only some ciphertext.
She tries to find the corresponding
key and the plaintext.
Eve knows the algorithm and can
intercept the ciphertext.
This is the most probable attack
because Eve needs only the
ciphertext.
Ciphertext-only attack
A cipher must be resistant to
this type of attack.
Methods Used:
Brute-Force Attack
Statistical Attack
Pattern Attack
Brute-Force Attack
•Also called the exhaustive-key-search method.
•Eve tries to use all possible keys.
•Eve knows the algorithm and the key domain.
•The ciphertext is decrypted with every possible
key until the plaintext makes sense.
•This attack was difficult in the past but is easier
today using computers.
•To prevent this attack, the number of possible
keys must be very large.
Statistical Attack
•Uses characteristics of the plaintext language.
•Example: The letter E is the most frequently
used letter in English text.
•The cryptanalyst finds the most-used character
in the ciphertext and assumes it corresponds to
E.
•After finding a few pairs, the key can be
determined and the message decrypted.
•To prevent this attack, the cipher should hide the
characteristics of the language.
Pattern Attack
•Some ciphers may hide language
characteristics but create patterns in
the ciphertext.
•A cryptanalyst may use these patterns
to break the cipher.
•Therefore, ciphertext should look as
random as possible.
2. Known-Plaintext Attack
•Eve has access to some plaintext/ciphertext
pairs in addition to the intercepted ciphertext.
•These pairs have been collected earlier.
•Example:
•Alice sends a secret message to Bob.
•Later, Alice makes the contents public.
•Eve keeps both the plaintext and ciphertext.
•Eve uses the relationship between previous
pairs to analyze the current ciphertext.
•This attack is easier because Eve has more
information.
•However, it is less likely because Alice may
have changed her key.
Known-Plaintext Attack
3. Chosen-Plaintext Attack
•Similar to the known-plaintext attack.
•The plaintext/ciphertext pairs are chosen
by the attacker herself.
•Example:
•Eve has access to Alice's computer.
•She chooses some plaintext and
intercepts the created ciphertext.
•Eve does not know the key.
•This attack is easier to implement but
4. Chosen-Ciphertext
Attack
•Similar to the chosen-plaintext attack.
•Eve chooses some ciphertext and decrypts
it to form a ciphertext/plaintext pair.
•Example:
•Eve has access to Bob's computer.
•Eve uses the resulting pair for
cryptanalysis.