Ciphertext indistinguishability is a property of many encryption schemes. Intuitively, if a cryptosystem possesses the property of indistinguishability, then an adversary will be unable to distinguish pairs of ciphertexts based on the message they encrypt. The property of indistinguishability under chosen plaintext attack is considered a basic requirement for most provably secure public key cryptosystems, though some schemes also provide indistinguishability under chosen ciphertext attack and adaptive chosen ciphertext attack. Indistinguishability under chosen plaintext attack is equivalent to the property of semantic security, and many cryptographic proofs use these definitions interchangeably.

A cryptosystem is considered secure in terms of indistinguishability if no adversary, given an encryption of a message randomly chosen from a two-element message space determined by the adversary, can identify the message choice with probability significantly better than that of random guessing (). If any adversary can succeed in distinguishing the chosen ciphertext with a probability significantly greater than , then this adversary is considered to have an "advantage" in distinguishing the ciphertext, and the scheme is not considered secure in terms of indistinguishability. This definition encompasses the notion that in a secure scheme, the adversary should learn no information from seeing a ciphertext. Therefore, the adversary should be able to do no better than if it guessed randomly.

Formal definitions

Security in terms of indistinguishability has many definitions, depending on assumptions made about the capabilities of the attacker. It is normally presented as a game, where the cryptosystem is considered secure if no adversary can win the game with significantly greater probability than an adversary who must guess randomly. The most common definitions used in cryptography are indistinguishability under chosen-plaintext attack (abbreviated IND-CPA), indistinguishability under (non-adaptive) chosen-ciphertext attack (IND-CCA1), and indistinguishability under adaptive chosen-ciphertext attack (IND-CCA2). Security under either of the latter definition implies security under the previous ones: a scheme which is IND-CCA1–secure is also IND-CPA–secure, and a scheme which is IND-CCA2–secure is both IND-CCA1– and IND-CPA–secure. Thus, IND-CCA2 is the strongest of the three definitions of security.

Indistinguishability under chosen-plaintext attack (IND-CPA)

For a probabilistic asymmetric-key encryption algorithm, indistinguishability under chosen-plaintext attack (IND-CPA) is defined by the following game between an adversary and a challenger. For schemes based on computational security, the adversary is modeled by a probabilistic polynomial time Turing machine, meaning that it must complete the game and output a guess within a polynomial number of time steps. In this definition represents the encryption of a message under the key :

  1. The challenger generates a key pair , based on some security parameter (e.g., a key size in bits), and publishes to the adversary. The challenger retains .
  2. The adversary may perform a polynomially bounded number of encryptions or other operations.
  3. Eventually, the adversary submits two distinct chosen plaintexts to the challenger.
  4. The challenger selects a bit uniformly at random, and sends the challenge ciphertext ) back to the adversary.
  5. The adversary is free to perform any number of additional computations or encryptions.
  6. Finally, the adversary outputs a guess for the value of .

A cryptosystem is indistinguishable under chosen-plaintext attack if every probabilistic polynomial time adversary has only a negligible "advantage" over random guessing. An adversary is said to have a negligible "advantage" if it wins the above game with probability <math>\left(\tfrac{1}{2}\right) \,+\, \epsilon(k)</math>, where <math>\epsilon(k)</math> is a negligible function in the security parameter <math>k</math>, i.e., for every (nonzero) polynomial function there exists <math>k_0</math> such that <math>|\epsilon(k)| \;<\; \left|\tfrac{1}{\mathrm{poly(k)\right|</math> for all <math>k \;>\; k_0</math>.

Although the adversary knows , and , the probabilistic nature of means that the encryption of will be only one of many valid ciphertexts, and therefore encrypting , and comparing the resulting ciphertexts with the challenge ciphertext does not afford any non-negligible advantage to the adversary.

While the above definition is specific to an asymmetric-key cryptosystem, it can be adapted to the symmetric case by replacing the public-key encryption function with an encryption oracle, which retains the secret encryption key and encrypts arbitrary plaintexts at the adversary's request.

Symmetric IND-CPA game, formalized

The adversarial process of performing a chosen-plaintext attack is usually outlined in the form of a cryptographic game. To test for symmetric IND-CPA, the game described above is defined. Let <math>

\mathcal{K}

</math> be a key generation function, <math>

\mathcal{E}

</math> be an encryption function, and <math>

\mathcal{D}

</math> be a decryption function. Let <math>

\mathcal{S}\mathcal{E} = (\mathcal{K}, \mathcal{E}, \mathcal{D})

</math> be a symmetric encryption scheme. The game "Guess" is defined as:

{| class="wikitable"

|+ <big>Game Guess<math>_{\mathcal{S}\mathcal{E} }</math></big>

|-

|-

| <br>

<math>K\overset{\$}{\leftarrow}\mathcal{K}; b\overset{\$}{\leftarrow} \left\{ 0,1\right\}</math><br><br>

<br>

return <math>C\overset{\$}{\leftarrow}\mathcal{E}_{K}\left (M_{b} \right )</math><br><br>

<br>

return <math>\left (b==b' \right )</math>

|}

As many times as it would like, an adversary selects two plaintext messages of its own choosing and provides them to the oracle which returns a ciphertext encrypting one of the messages. An adversary's advantage is determined by its probability of guessing the value of a value chosen at random at the beginning of the game which determines the message that is encrypted in the oracle. Therefore, its advantage is defined as:

If an adversary is unable to tell if a message even exists, it gives the person who wrote the message plausible deniability.

Some people building encrypted communication links prefer to make the contents of each encrypted datagram indistinguishable from random data, in order to make traffic analysis more difficult.

Some people building systems to store encrypted data prefer to make the data indistinguishable from random data in order to make data hiding easier.

For example, some kinds of disk encryption such as TrueCrypt attempt to hide data in the innocent random data left over from some kinds of data erasure.

As another example, some kinds of steganography attempt to hide data by making it match the statistical characteristics of the innocent "random" image noise in digital photos.

To support such deniable encryption systems, a few cryptographic algorithms are specifically designed to make ciphertext messages indistinguishable from random bit strings.

Most applications don't require an encryption algorithm to produce encrypted messages that are indistinguishable from random bits.

However, some authors consider such encryption algorithms to be conceptually simpler and easier to work with, and more versatile in practice—and most IND-CPA encryption algorithms apparently do, in fact, produce encrypted messages that are indistinguishable from random bits.

Equivalences and implications

Indistinguishability is an important property for maintaining the confidentiality of encrypted communications. However, the property of indistinguishability has in some cases been found to imply other, apparently unrelated security properties. Sometimes these implications go in both directions, making two definitions equivalent; for example, it is known that the property of indistinguishability under adaptive chosen-ciphertext attack (IND-CCA2) is equivalent to the property of non-malleability under adaptive chosen-ciphertext attack (NM-CCA2). This equivalence is not immediately obvious, as non-malleability is a property dealing with message integrity, rather than confidentiality. In other cases, it has been demonstrated that indistinguishability can be combined with certain other definitions, in order to imply still other useful definitions, and vice versa. The following list summarizes a few known implications, though it is by no means complete.

The notation <math>A \Rightarrow B</math> means that property A implies property B. <math>A \Leftrightarrow B</math> means that properties A and B are equivalent. <math>A \not \Rightarrow B</math> means that property A does not necessarily imply property B.

  • IND-CPA <math>\Leftrightarrow</math> semantic security under chosen-plaintext attack.
  • NM-CPA (non-malleability under chosen-plaintext attack) <math>\Rightarrow</math> IND-CPA.
  • NM-CPA (non-malleability under chosen-plaintext attack) <math>\not \Rightarrow</math> IND-CCA2.