Chosen plaintext vs Chosen ciphertext 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.)