Optimal Asymmetric Encryption Padding - Diagram of OAEP

Diagram of OAEP

In the diagram,

  • n is the number of bits in the RSA modulus.
  • k0 and k1 are integers fixed by the protocol.
  • m is the plaintext message, an (nk0k1 )-bit string
  • G and H are typically some cryptographic hash functions fixed by the protocol.

To encode,

  1. messages are padded with k1 zeros to be nk0 bits in length.
  2. r is a random k0-bit string
  3. G expands the k0 bits of r to nk0 bits.
  4. X = m00..0 ⊕ G(r)
  5. H reduces the nk0 bits of X to k0 bits.
  6. Y = rH(X)
  7. The output is X || Y where X is shown in the diagram as the leftmost block and Y as the rightmost block.

To decode,

  1. recover the random string as r = YH(X)
  2. recover the message as m00..0 = XG(r)

The "all-or-nothing" security is from the fact that to recover m, you must recover the entire X and the entire Y; X is required to recover r from Y, and r is required to recover m from X. Since any changed bit of a cryptographic hash completely changes the result, the entire X, and the entire Y must both be completely recovered.

Read more about this topic:  Optimal Asymmetric Encryption Padding

Famous quotes containing the word diagram:

    If a fish is the movement of water embodied, given shape, then cat is a diagram and pattern of subtle air.
    Doris Lessing (b. 1919)