We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Substitution Box

Substitution boxes, also known as s-boxes are a key component of many symmetric key algorithms, particularly block ciphers. The primary goal of an s-box, at least in this context, is to obscure the relationship between the key and the ciphertext. An attacker should not be able to derive information about the key from the ciphertext. For this lesson, the s-box examples are completely arbitrary.

Example

Here's a realistic S-box that maps a 6-bit input into a 4-bit output:

  • 011011 -> 1001
  • 011111 -> 0110

At the end of the day, an s-box is just a lookup table.