Brain Dump

Cipher Block Chaining

Tags
cryptography

A mode of use for block-ciphers which masks occurrence of identical plain-text blocks in messages by using the encrypted output of the previous block to calculate the output of the current block.

Encryption and Decryption

[see page 16, Method]:

  1. Produce an initial block.
  2. XOR the first input-block with the initial-block then encrypt the output (for example using ECB) to produce the ciphertext \( C_1 \).
  3. Replace the initial-block with \( C_1 \) and go-to step 1 with subsequent plaintext blocks.

The [see page 25, decryption] algorithm works essentially the same using the same key and the current and previous cypher-text blocks:

  1. Pass the ciphertext through the ECB in reverse (find the key that maps to the ciphertext).
  2. XOR the key with the previous ciphertext block (or initial block if there isn't one).

Parallel Decryption

Because CBC relies only the current-and-previous cipher-text blocks (+ the key/codebook) we can perform the decryption process in [see page 26, parallel]. By simply collecting the ciphertext blocks into successive pairs and trigerring the decryption process concurrently.

Observe however that this doesn't work for encryption because we need the previous ciphertext to produce the subsequent ciphertext.

TODO: error propagation.