What is the difference between chosen plaintext and chosen ciphertext attack? In both of these adversary has access to paintext-ciphertext pairs.Then where lies the difference?
The difference is how the plaintext-ciphertext pairs that the attacker has access to are generated.
- In a chosen plaintext attack, the attacker chooses some plaintext and is handed the corresponding ciphertext. In other words, the attacker may encrypt arbitrary messages.
- In a chosen ciphertext attack, the attacker can additionally (a chosen ciphertext attack is usually understood to subsume a chosen plaintext attack) choose some ciphertext and is handed the corresponding plaintext. In other words, the attacker may encrypt and decrypt arbitrary messages.
(Note: usually, additional restrictions on the permitted messages are posed in a particular security game to make it "fair", since some notions of security are vacuous if the attacker can query really arbitrary messages.)
In chosen plain-text attacks the adversary can obtain the encryption of plain-texts of its choice. In chosen cipher-text attacks can obtain the decryption of any cipher-text (Katz & Lindell, 2008). Technically a chosen-ciphertext should be called a chosen-cipher text and plain text attack (Ferguson, Schneier, & Kohno, 2010) however, that name would be too long. The difference is in chosen cipher text attacks you have access to both plain texts and cipher texts. The chosen cipher-text attacks is more powerful as a result of the manner in which it can find corresponding plain texts and cipher texts. There is a higher probability of finding the secret key with a chosen cipher text attack than a chosen plain-text attack.
in Chosen plaintext , plaintext message chosen by cryptanalyst with its corresponding ciphertext but in chosen ciphertext chosen by cryptanalyst with its corresponding plaintext.