It is of two types:
- ciphertext only attack: In this type of attack, the attacker has access to the ciphertext but not the plaintext. The attacker tries to find the plaintext or the key.
- known plaintext attack: In this type of attack, the attacker has access to the ciphertext and some of the plaintext. The attacker tries to find the key.
Cryptanalysis is of two forms:
Linear Cryptanalysis: Linear cryptanalysis is a statistical attack technique used to analyze the linear relationship between the plaintext, ciphertext, and the key of a symmetric encryption algorithm. It exploits the linearity of the algorithm's components, such as substitution boxes (S-boxes) and linear transformations, to recover the key. This includes
- contructing linear approximations
- collecting ciphertext-plaintext pairs
- finding key bits that can be exploited
- expanding the key(deduce more bits of key)
Differential Cryptanalysis: Differential cryptanalysis is statistical attack technique that aims to exploit the behavior of the differences between pairs of plaintexts, ciphertexts, and the corresponding subkeys in a symmetric encryption algorithm. It focuses on analyzing the differences rather than the linear relationships in the algorithm.This includes
- creating differential characterstics
- collect ciphertext plaintext pairs
- find subkeys bits
- recover complete key using knowledge of subkeys