Skip to content
uencoder

Key Whitening

Key whitening is the technique of XORing extra key material before and after the round function, strengthening a cipher against brute force without complicating the round function.

Purpose

It extends the effective key length at minimal overhead, making ciphers more robust against known-plaintext attacks, and is adopted by Twofish, AES-256, and others.

Mechanism

An input-whitening key is XORed before the first round and an output-whitening key after the last, both independent of the round keys. Decryption applies the XORs in reverse.

Use cases

  • Twofish input/output whitening
  • AES-256 key utilization
  • Block-cipher hardening

Related tools

References