SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

S-boxes

An S-box, or substitution box, is a small nonlinear lookup table that maps a few input bits to a few output bits inside a block cipher. Biham and Shamir described S-boxes as usually the only part of a cipher that is not linear, so its security depends crucially on their choice. 6 A 4-bit S-box, for example, is a table of sixteen 4-bit values indexed by the input. 1

Two tables describe how an S-box behaves against statistical attacks. The difference distribution table counts, for each input difference, how many inputs produce each output difference. The linear approximation table counts how often each XOR of input bits matches each XOR of output bits. Heys builds both for a 4-bit S-box taken from the first row of the first DES S-box. 1 Kaisa Nyberg called a mapping differentially uniform when, for every nonzero input difference, the number of inputs giving any output difference has a uniform upper bound. She showed that inversion in GF(2^n) is differentially 4-uniform when n is even and 2-uniform when n is odd. 2

AES uses that construction. The Rijndael proposal lists five S-box criteria: invertibility, a minimal largest correlation between input and output bit combinations, a minimal largest entry in the difference (EXOR) table, a complex algebraic expression in GF(2^8), and a simple description. The designers took the map x to x^-1 in GF(2^8), which gives maximum correlation 2^-3 and maximum difference propagation probability 2^-6. They composed it with an affine map because the inverse alone has a simple algebraic expression that interpolation attacks could exploit. 3 Lightweight ciphers favour 4-bit S-boxes for hardware compactness. PRESENT uses one 4-bit S-box sixteen times per round and requires every entry of its difference table for nonzero differences to be at most 4. 4

The DES S-box design criteria were not published when DES was adopted. Don Coppersmith of the IBM design team listed them in 1994. One says that for any nonzero 6-bit input difference, no more than eight of the 32 input pairs with that difference may give the same output difference. He wrote that the team knew differential cryptanalysis in 1974 and designed the S-boxes to resist it. 5

Source · Differentially uniform mappings for cryptography (Kaisa Nyberg) (opens in a new tab) · Springer

References

  1. A Tutorial on Linear and Differential Cryptanalysis (Howard M. Heys) (opens in a new tab) · Memorial University of Newfoundland ↩ ↩
  2. Differentially uniform mappings for cryptography (Kaisa Nyberg) (opens in a new tab) · Springer · EUROCRYPT 1993, LNCS 765. ↩
  3. AES Proposal: Rijndael (Joan Daemen and Vincent Rijmen, document version 2) (opens in a new tab) · NIST · Sections 4.2, 7.2, 7.3.1, 7.6 and 8.2. ↩
  4. PRESENT: An Ultra-Lightweight Block Cipher (Bogdanov, Knudsen, Leander, Paar, Poschmann, Robshaw, Seurin and Vikkelsoe) (opens in a new tab) · Springer · CHES 2007, LNCS 4727, pp. 450-466. ↩
  5. The Data Encryption Standard (DES) and its strength against attacks (Don Coppersmith) (opens in a new tab) · IBM Journal of Research and Development · Vol. 38 no. 3, May 1994. ↩
  6. Differential Cryptanalysis of DES-like Cryptosystems, extended abstract (Eli Biham and Adi Shamir) (opens in a new tab) · Springer · CRYPTO 1990, LNCS 537. ↩

Research articles

In the news

See what connects to it on the map of ideas →

See also