ArticleslgStudy

science

Chosen-plaintext attack

Chosen-plaintext attack is a 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-plaintext attack rather than just read about it. In short: A chosen-plaintext attack (CPA) is an attack model for cryptanalysis which presumes that the attacker can obtain the ciphertexts for arbitrary plaintexts. The goal of the attack is to gain information that reduces the security of the encryption scheme.

Key takeaways

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

Reference excerpt

A chosen-plaintext attack (CPA) is an attack model for cryptanalysis which presumes that the attacker can obtain the ciphertexts for arbitrary plaintexts. The goal of the attack is to gain information that reduces the security of the encryption scheme. Immunity to a chosen-plaintext attack is called ciphertext indistinguishability under chosen-plaintext attack (IND-CPA). With an IND-CPA property, the cryptographic scheme is resistant to an attacker that has access to the encryption oracle (e.g., the encryption device) itself. This property is equivalent to the semantic security under CPA (inability of the adversary to gain even partial information about the plaintext from observing the ciphertext). A similar (but stronger) property of indistinguishability under a chosen-ciphertext attack (IND-CCA) reflects the resistance to adversary having access to a decryptor.' A deterministic block cipher scheme (like electronic codebook) does not possess the IND-CPA, as it will encrypt the plaintext with repeating blocks into ciphertext that will be easily recognizable because its blocks are repeated as well.

Introduction In a chosen-plaintext attack the adversary can (possibly adaptively) ask for the ciphertexts of arbitrary plaintext messages. That is formalized by allowing the adversary to interact with an encryption oracle, viewed as a black box. The attacker’s goal is to reveal all or a part of the secret encryption key. It may seem infeasible in practice for an attacker to obtain ciphertexts for given plaintexts. However, modern cryptography is implemented in software or hardware and is used for a diverse range of applications; for many cases, a chosen-plaintext attack is often very feasible (see also In practice). Chosen-plaintext attacks become extremely important in the context of public key cryptography in which the encryption key is public and so attackers can encrypt any plaintext that they choose.

Different forms There are two forms of chosen-plaintext attacks:

Batch chosen-plaintext attack, where the adversary chooses all of the plaintexts before seeing any of the corresponding ciphertexts. That is often the meaning intended by "chosen-plaintext attack" when it is not qualified. Adaptive chosen-plaintext attack (CPA2), where the adversary can request the ciphertexts of additional plaintexts after seeing the ciphertexts for some plaintexts.

General method of an attack A general batch chosen-plaintext attack is carried out as follows :

The attacker may choose n plaintexts. (This parameter n is specified as part of the attack model, it may or may not be bounded.) The attacker then sends these n plaintexts to the encryption oracle. The encryption oracle will then encrypt the attacker's plaintexts and send them back to the attacker. The attacker receives n ciphertexts back from the oracle, in such a way that the attacker knows which ciphertext corresponds to each plaintext. Based on the plaintext–ciphertext pairs, the attacker can attempt to extract the key used by the oracle to encode the plaintexts. Since the attacker in this type of attack is free to craft the plaintext to match his needs, the attack complexity may be reduced. Consider the following extension of the above situation. After the last step,

The adversary outputs two plaintexts m0 and m1. A bit b is chosen uniformly at random b←{0,1}. The adversary receives the encryption of mb, and attempts to "guess" which plaintext it received, and outputs a bit b'. A cipher has indistinguishable encryptions under a chosen-plaintext attack if after running the above experiment, the adversary cannot guess correctly (b=b') with probability non-negligibly better than 1/2.

Examples The following examples demonstrate how some ciphers that meet other security definitions may be broken with a chosen-plaintext attack:

Caesar cipher The following attack on the Caesar cipher allows full recovery of the secret key:

The adversary sends the message: Attack at dawn, The oracle returns Nggnpx ng qnja. The adversary can then work through to recover the key in the same way as a Caesar cipher. The adversary could deduce the substitutions A → N, T → G, and so on. That would lead the adversary to determine that 13 was the key used in the Caesar cipher. With more intricate or complex encryption methodologies, the decryption method becomes more resource-intensive, but the core concept is still relatively the same.

One-time pads The following attack on a one-time pad allows full recovery of the secret key. Suppose the message length and key length are equal to n.

The adversary sends a string consisting of n zeroes to the oracle. The oracle returns the bitwise exclusive-or of the key with the string of zeroes. The string returned by the oracle is the secret key. While the one-time pad is used as an example of an information-theoretically secure cryptosystem, this security only holds under security definitions weaker than CPA security. This is because under the formal definition of CPA security the encryption oracle has no state. This vulnerability may not be applicable to all practical implementations – the one-time pad can still be made secure if key reuse is avoided (hence the name "one-time" pad).

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Chosen-plaintext attack

Start with the simplest possible case. Write down what Chosen-plaintext attack claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In 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-plaintext 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-plaintext 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-plaintext attack

In research
Chosen-plaintext attack appears in 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-plaintext 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-plaintext attack is common in secondary-school and first-year university syllabi. It links to neighbouring topics Chosen-plaintext attacks, so understanding it makes those chapters shorter.
In everyday life
Look for Chosen-plaintext 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-plaintext attack” →

How to study Chosen-plaintext attack in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Chosen-plaintext 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-plaintext attack out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Chosen-plaintext attack in simple terms?

A chosen-plaintext attack (CPA) is an attack model for cryptanalysis which presumes that the attacker can obtain the ciphertexts for arbitrary plaintexts. The goal of the attack is to gain information that reduces the security of the encryption scheme.

Why does Chosen-plaintext attack matter?

Because it connects several 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-plaintext 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-plaintext attack.

Tags

  • Chosen-plaintext attacks

Keep exploring