Certopolis

Certified Information Systems Security Professional (CISSP)

Ciphertext-only vs known-plaintext vs chosen-plaintext attacks

RFC 4949 separates cryptanalytic attacks by what the analyst holds. Ciphertext-only uses intercepted cipher text alone. Known-plaintext uses some pairs of plain text and matching cipher text. Chosen-plaintext uses cipher text for plain text the analyst selected. Chosen-ciphertext uses plain text for cipher text the analyst selected.

What does the analyst hold in each attack?

In a ciphertext-only attack the analyst tries to determine the key solely from intercepted cipher text. RFC 4949 notes the analyst may still know other clues: the algorithm, the language of the plain text, its subject matter and some probable words. Knowing these does not change the attack type.

In a known-plaintext attack the analyst has some plaintext-ciphertext pairs but did not choose them. In a chosen-plaintext attack the analyst dictates the plain text and learns the matching cipher text. In a chosen-ciphertext attack the analyst dictates the cipher text and learns the matching plain text.

The test is who selected the input and which side of the pair it is. Access to an encryption function points to chosen-plaintext. Access to a decryption function points to chosen-ciphertext.

How do brute force and birthday attacks differ?

RFC 4949 defines brute force as an exhaustive procedure that tries a large number of possible solutions. Its example is decrypting a message with every possible key when the analyst already knows the decryption algorithm.

A birthday attack uses a statistical property. For a function with an N-bit output, 2^(N/2) randomly chosen inputs give a probability greater than one half that at least two outputs are identical. For a 64-bit output that is about 2^32 inputs.

A birthday attack finds two inputs with the same output much faster than brute force. RFC 4949 adds a limit: no birthday attack lets an adversary decrypt a given cipher text, or find an input for a given hash result, any faster than brute force.

What is work factor?

In cryptography, RFC 4949 defines work factor as the estimated amount of computing power and time needed to break a cryptographic system. In the wider computer security sense it is the estimated effort or time an intruder would need to penetrate a system or defeat a countermeasure, given specified expertise and resources.

Where the exam catches people

  • Believing knowledge of the algorithm or the message language makes an attack known-plaintext: RFC 4949 allows those clues inside a ciphertext-only attack.
  • Believing known-plaintext and chosen-plaintext are the same: in the first the analyst obtains pairs, and in the second the analyst selects the plain text.
  • Believing feeding constructed blocks into a decryption device is chosen-plaintext: the analyst is selecting cipher text, so it is chosen-ciphertext.
  • Believing a birthday attack breaks a specific hash value faster than brute force: it only finds some pair of colliding inputs faster.
  • Believing a birthday attack on an N-bit function needs about 2^N inputs: it needs about 2^(N/2).

Written from these sources

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. An eavesdropper records encrypted messages between two branch offices. She knows the cipher in use, that the messages are written in English, and that most open with the same greeting, but she holds no message in both its clear and encrypted forms and cannot submit messages of her own. Which basic cryptanalytic attack is she mounting?

    Right. In the game that’s Renown for your Domain 3: Security Architecture and Engineering building.

    Not that one: A is right. In the game your Domain 3: Security Architecture and Engineering building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Knowing the cipher, the language and a likely greeting are exactly those clues, so the attack stays ciphertext-only.

    Written from www.rfc-editor.org/rfc/rfc4949.html

  2. During an engagement, an analyst gains use of a hardware module's decryption function but cannot read the key stored inside it. She feeds the module encrypted blocks she constructed herself, records the plaintext each one yields, and works from those pairs to recover the key. Which attack is this?

    Right. In the game that’s Renown for your Domain 3: Security Architecture and Engineering building.

    Not that one: D is right. In the game your Domain 3: Security Architecture and Engineering building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    The analyst here dictates the encrypted blocks and reads back their plain text, so the attack is chosen-ciphertext, even though she ends up holding matching pairs.

    Written from www.rfc-editor.org/rfc/rfc4949.html

  3. An analyst obtains several weather bulletins an agency published, together with the encrypted versions the agency transmitted, and works to recover the key from these matching pairs. The analyst had no influence over what the bulletins said. Which cryptanalysis technique is the analyst using?

    Right. In the game that’s Renown for your Domain 3: Security Architecture and Engineering building.

    Not that one: C is right. In the game your Domain 3: Security Architecture and Engineering building would lose a little Renown, and this question would come back later.

Ask for something