ArticleslgStudy

computer science

Chosen-ciphertext attack

Chosen-ciphertext attack is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Chosen-ciphertext attack rather than just read about it. In short: A chosen-ciphertext attack (CCA) is an attack model for cryptanalysis in which the cryptanalyst can gather information by obtaining the decryptions of chosen ciphertexts. From those pieces of information, the adversary can attempt to recover the secret key used for decryption.

Key takeaways

  • Chosen-ciphertext attack belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Chosen-ciphertext attack to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Chosen-ciphertext attack from memory before moving on to harder problems.

Reference excerpt

A chosen-ciphertext attack (CCA) is an attack model for cryptanalysis in which the cryptanalyst can gather information by obtaining the decryptions of chosen ciphertexts. From those pieces of information, the adversary can attempt to recover the secret key used for decryption. For formal definitions of security against chosen-ciphertext attacks, see, for example, Michael Luby and Mihir Bellare et al.

Introduction A number of otherwise-secure schemes can be defeated under chosen-ciphertext attack For example, the El Gamal cryptosystem is semantically secure under chosen-plaintext attack, but the semantic security can be trivially defeated under a chosen-ciphertext attack. Early versions of RSA padding that were used in the SSL protocol were vulnerable to a sophisticated adaptive chosen-ciphertext attack, which revealed SSL session keys. Chosen-ciphertext attacks have implications for some self-synchronizing stream ciphers as well. Designers of tamper-resistant cryptographic smart cards must be particularly cognizant of such attacks, as those devices may be completely under the control of an adversary, which can issue a large number of chosen-ciphertexts in an attempt to recover the hidden secret key. It was not clear at all whether public key cryptosystems could withstand the chosen ciphertext attack until the initial breakthrough work of Moni Naor and Moti Yung in 1990, which suggested a mode of dual encryption with integrity proof (now known as the "Naor-Yung" encryption paradigm). The work allowed understanding the notion of security against chosen ciphertext attack to become clearer and facilitated research in the direction of constructing systems with various protections against variants of the attack. When a cryptosystem is vulnerable to chosen-ciphertext attack, implementers must be careful to avoid situations in which an adversary might be able to decrypt chosen-ciphertexts (i.e., avoid providing a decryption oracle). That can be more difficult than it appears, as even partially-chosen ciphertexts can permit subtle attacks. Additionally, other issues exist, and some cryptosystems (such as RSA) use the same mechanism to sign messages and to decrypt them. That permits attacks when hashing is not used on the message to be signed. A better approach is to use a cryptosystem that is provably secure under chosen-ciphertext attack, including (among others) RSA-OAEP secure under the random oracle heuristics, Cramer-Shoup which was the first public key practical system to be secure. For symmetric encryption schemes, it is known that authenticated encryption, which is a primitive based on symmetric encryption, gives security against chosen ciphertext attacks, as was first shown by Jonathan Katz and Moti Yung.

Varieties Chosen-ciphertext attacks, like other attacks, may be adaptive or non-adaptive. In an adaptive chosen-ciphertext attack, the attacker can use the results from prior decryptions to inform their choices of which ciphertexts to have decrypted. In a non-adaptive attack, the attacker chooses the ciphertexts to have decrypted without seeing any of the resulting plaintexts. After seeing the plaintexts, the attacker can no longer obtain the decryption of additional ciphertexts.

Lunchtime attacks A specially-noted variant of the chosen-ciphertext attack is the "lunchtime," "midnight," or "indifferent" attack in which an attacker may make adaptive chosen-ciphertext queries but only up until a certain point after which the attacker must demonstrate some improved ability to attack the system. The term "lunchtime attack" refers to the idea that a user's computer, with the ability to decrypt, is available to an attacker while the user is out to lunch. That form of the attack was the first one commonly discussed: obviously, if the attacker has the ability to make adaptive chosen ciphertext queries, no encrypted message would be safe, at least until that ability is taken away. The attack is sometimes called the "non-adaptive chosen ciphertext attack"; Here, "non-adaptive" refers to the fact that the attacker cannot adapt the queries in response to the challenge, which is given after the ability to make chosen ciphertext queries has expired.

Adaptive chosen-ciphertext attack

A (full) adaptive chosen-ciphertext attack is an attack in which ciphertexts may be chosen adaptively before and after a challenge ciphertext is given to the attacker, with only the stipulation that the challenge ciphertext may not itself be queried. That is a stronger attack notion than the lunchtime attack and is commonly referred to as a CCA2 attack, as compared to a CCA1 (lunchtime) attack. Few practical attacks are of this form. Rather, this model is important for its use in proofs of security against chosen-ciphertext attacks. A proof that attacks in this model are impossible implies that any realistic chosen-ciphertext attack cannot be performed. A practical adaptive chosen-ciphertext attack is the Bleichenbacher attack against PKCS#1. Numerous cryptosystems are proven secure against adaptive chosen-ciphertext attacks. Some prove that the security property is based only on algebraic assumptions. Others additionally require an idealized random oracle assumption. For example, the Cramer-Shoup system is secure based on number theoretic assumptions and no idealization, and after a number of subtle investigations, it was also established that the practical scheme RSA-OAEP is secure under the RSA assumption in the idealized random oracle model.

See also RCCA security

References

Further reading Dancing on the Lip of the Volcano: Chosen Ciphertext Attacks on Apple iMessage (Usenix 2016)

Worked examples

Example 1 — a first encounter with Chosen-ciphertext attack

Start with the simplest possible case. Write down what Chosen-ciphertext attack claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Chosen-ciphertext attack before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Chosen-ciphertext attack ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Chosen-ciphertext attack

In research
Chosen-ciphertext attack appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Chosen-ciphertext attack in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Chosen-ciphertext attack is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic attacks, so understanding it makes those chapters shorter.
In everyday life
Look for Chosen-ciphertext attack outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Chosen-ciphertext attack” →

How to study Chosen-ciphertext attack in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Chosen-ciphertext attack means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Chosen-ciphertext attack out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Chosen-ciphertext attack in simple terms?

A chosen-ciphertext attack (CCA) is an attack model for cryptanalysis in which the cryptanalyst can gather information by obtaining the decryptions of chosen ciphertexts. From those pieces of information, the adversary can attempt to recover the secret key used for decryption.

Why does Chosen-ciphertext attack matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Chosen-ciphertext attack?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Chosen-ciphertext attack.

Tags

  • Cryptographic attacks

Keep exploring