You can edit almost every page by Creating an account and confirming your email.

Residual block termination

From EverybodyWiki Bios & Wiki


In cryptography, residual block termination is a variation of cipher block chaining mode (CBC) that does not require any padding. It does this by effectively changing to cipher feedback mode for one block. The cost is the increased complexity.

Encryption procedure

If the plaintext length N is not a multiple of the block size L:

  • Encrypt the ⌊N/L⌋ full blocks of plaintext using the cipher block chaining mode;
  • Encrypt the last full encrypted block again;
  • XOR the remaining bits of the plaintext with leftmost bits of the re-encrypted block.

Decryption procedure

  • Decrypt the ⌊N/L⌋ full encrypted blocks using the Cipher Block Chaining mode;
  • Encrypt the last full encrypted block;
  • XOR the remaining bits of the ciphertext with leftmost bits of the re-encrypted block.

Short message

For messages shorter than one block, residual block termination can use an encrypted initialization vector instead of the previously encrypted block.

References


This article "Residual block termination" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Residual block termination. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.