A chosen ciphertext attack is an attack on a cryptosystem in which the cryptanalyst chooses ciphertext and causes it to be decrypted with an unknown key.
For a self-synchronizing stream cipher, a chosen ciphertext attack can be useful as the key used to encipher each byte depends on the previous ciphertext. It is possible to use a chosen ciphertext attack to get an arbitrary message signed with RSA, if messages are signed without hashing.
An adaptive chosen ciphertext attack sends a large number of ciphertexts to be decrypted, using the results of these decryptions to select subsequent ciphertexts, and gradually reveal information about an encrypted message, or about the encryption key itself. These attacks can be mounted against various public-key schemes, including RSA. They can be prevented through the correct use of hashing and redundancy checks.
A chosen-ciphertext attack (CCA) is an attack model for cryptanalysis in which the cryptanalyst chooses a ciphertext and causes it to be decrypted with an unknown key.
In a non-adaptive chosen-ciphertext attack, known as an indifferent chosen-ciphertext attack ("lunchtime" attack), the adversary has access to the decryption oracle only before she chooses a specific ciphertext to attack.
An adaptive chosen-ciphertext attack ("midnight" attack) extends the previous scenario, by allowing the adversary to use the decryption oracle even after she has selected a specific ciphertext to attack (to make the attack non-trivial, the adversary is prevented from simply decrypting the target ciphertext).
adaptive chosenciphertextattack A chosenciphertextattack where the adversary is allowed to send queries to a decryption oracle before as well as after she is given the challenge ciphertext (except that she is not allowed to ask for the decryption of the challenge ciphertext after she is given it).
decryption oracle An oracle decrypting ciphertexts for an adversary.
indifferent chosenciphertextattack A chosenciphertextattack where the adversary is not allowed to send queries to the decryption oracle after she has been given the challenge ciphertext.