10 years of Rijndael
Vincent Rijmen
10 years of Rijndael Vincent Rijmen Overview The AES process - - PowerPoint PPT Presentation
10 years of Rijndael Vincent Rijmen Overview The AES process (participants perspective) Rijndael Security of Rijndael/AES Spreading of AES Stream ciphers: competitors? Conclusions The early years (1997)
Vincent Rijmen
Overview
The early years (1997)
AES process
Some opinions
128-bit block ciphers? Probably not. Bruce Schneier, April 15, 1997
candidates will be 2100 or less if about 5 to 10 man-years are spent in serious cryptanalytic effort Lars R. Knudsen, April 5, 1999
Public evaluation
Evaluation criteria
…
AES decision process
Two rounds of one year each:
– Security – Software performance – 7-8 candidates performing well
– Hardware performance – “Other criteria”
September 2000: announcement of winner Rijndael November 2001: AES FIPS becomes active
Rijndael design history
1990- 1995-
Rijndael evolution
– Definition of optimal diffusion
– MDS diffusion, S-box x → x-1
– Matrix state – Square attack – Related key concerns
Iterative block cipher
p: plaintext
round round round round
. . . . .
Key Schedule
key
c: ciphertext
Design trade-off
“Most ciphers are secure after sufficiently many rounds”
“Most ciphers are too slow after sufficiently many rounds”
– security AND performance – provability
General design philosophy
1. Keep it simple
– Maximize symmetry
– All operations in 1 algebra
– Small number of building blocks
General design philosophy
2. Performance is important
– On variety of platforms – One security margin is enough
3. Don’t reinvent the wheel
– Coding theory – Existing S-boxes
Key-alternating cipher
dependency is through XOR
security against differential, linear attacks more easy
round
. . . . .
round round round
key
Key Schedule
p: plaintext c: ciphertext
Iterative block cipher
Key Schedule round
. . . . .
round round round
Mixing transformation S S S S S S S S S
Differential Cryptanalysis
change a difference (a + k) – (b + k) = a – b
Wide trail design strategy
Make bound on Pr(Q) easy to compute 1.Compute bound for Pr(Q) over 1 active S-box: d = maxQ ≠ (0,0) Pr(Q) 2.Compute bound on number of active S-boxes z = minimum number of active S-boxes Together: Pr(Q) ≤ dz
Bounding z: 1 round
Mixing transformation S S S S S S S S S
Two rounds
Mixing transformation S S S S S S S S S
a0 a1
Mixing transformation S S S S S S S S S
a2
– minimum number of active S-boxes in a0 + a1 – Branch number B
– B ≤ number of inputs plus 1
Optimal Mixing Transformation
Mixing transformation x y x y
correcting code
(MDS) code
Design the Mixing Transformation
G = [I A]
Shark, Khazad
Code concatenation
Forney 1966
Concatenated code
Mixing 1 S S S S S S
Mixing 2
Mixing 1 S S S S S S Mixing 1 S S S S S S Mixing 1 S S S S S S Mixing 1 S S S S S S Mixing 1 S S S S S S
Cin Cout Cin
Four-round view
Mixing transformation S S S S S S S S S
a0 a1
Mixing transformation S S S S S S S S S
a2
Mixing transformation S S S S S S S S S Mixing transformation S S S S S S S S S
a3 a4
Square, AES, Anubis, ...
between Mixing 1 and Mixing 2
Avalanche of bit flips
key
round
. . . . .
Key Schedule
p: plaintext
round round round
c: ciphertext
Rijndael
10/12/14 rounds
– SubBytes: non-linearity – ShiftRows: inter-column diffusion – MixColumns: inter-byte diffusion within columns – AddRoundKey
Message input representation
a0,0 a1,0 a2,0 a3,0 a0,1 a1,1 a2,1 a3,1 a0,2 a1,2 a2,2 a3,2 a0,3 a1,3 a2,3 a3,3 a0,4 a1,4 a2,4 a3,4 a0,5 a1,5 a2,5 a3,5 a0,6 a1,6 a2,6 a3,6 a0,7 a1,7 a2,7 a3,7
– 4 rows – 4, 6, or 8 columns (128-, 192-, 256-bit input) – AES: 4 columns only
Rijndael field
– (sometimes: over GF(2))
– Polynomials of degree < 8, with binary coefficients – Modulo x8 + x4 + x3 + x + 1 – Shortened to two hex numbers
Step 1: Substitute Bytes
a0,0 a0,1 a0,2 a0,3 a1,0 a1,1
a1,2 a1,3
a2,0 a2,1 a2,2 a2,3 a3,0 a3,1 a3,2 a3,3 b0,0 b0,1
b0,2 b0,3
b1,0 b1,1
b1,2 b1,3
b2,0 b2,1 b2,2 b2,3 b3,0 b3,1 b3,2 b3,3
ai,j bi,j
Substitution Substitution
– High non-linearity – Complex algebraic expression
Rijndael S-box
– Maximal nonlinearity for invertible 8-bit map, i.e. 7 – Good (maybe optimal) resistance against differential cryptanalysis
– Destroying regularity – Complicating algebraic attacks (somewhat)
Round step 2: Shift Rows
m n
g h i j w x y z b c d e m n
h i j g
y z
w x e b c d
– (Offsets depend on number of columns)
– Interaction with MixColumns – Bits flip in minimum 25 S-boxes per 4 rounds
Step 3: Mix Columns
b0,0 b0,1
b0,2 b0,3
b1,0 b1,1
b1,2 b1,3
b2,0 b2,1
b2,2 b2,3
b3,0 b3,1
b3,2 b3,3
a0,0 a0,1
a0,2 a0,3
a1,0 a1,1
a1,2 a1,3
a2,0 a2,1
a2,2 a2,3
a3,0 a3,1
a3,2 a3,3
a1,j a0,j a2,j a3,j b1,j b0,j b2,j b3,j
⊗
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 2 1 1 3 3 2 1 1 1 3 2 1 1 1 3 2
– based on theory of error-correcting (MDS) codes
Key addition
a0,0 a0,1 a0,2 a0,3 a1,0 a1,1 a1,2 a1,3 a2,0 a2,1 a2,2 a2,3 a3,0 a3,1 a3,2 a3,3 k0,0 k0,1 k0,2 k0,3 k1,0 k1,1 k1,2 k1,3 k2,0 k2,1 k2,2 k2,3 k3,0 k3,1 k3,2 k3,3 b0,0 b0,1 b0,2 b0,3 b1,0 b1,1 b1,2 b1,3 b2,0 b2,1 b2,2 b2,3 b3,0 b3,1 b3,2 b3,3
+ =
master key
Key input representation
k0,0 k1,0 k2,0 k3,0 k0,1 k1,1 k2,1 k3,1 k0,2 k1,2 k2,2 k3,2 k0,3 k1,3 k2,3 k3,3 k0,4 k1,4 k2,4 k3,4 k0,5 k1,5 k2,5 k3,5 k0,6 k1,6 k2,6 k3,6 k0,7 k1,7 k2,7 k3,7
– 4 rows – 4, 6, or 8 columns (128-, 192-, 256-bit key)
Key schedule
k0,0 k1,0 k2,0 k3,0 k0,1 k1,1 k2,1 k3,1 k0,2 k1,2 k2,2 k3,2 k0,3 k1,3 k2,3 k3,3 k0,4 k1,4 k2,4 k3,4 k0,5 k1,5 k2,5 k3,5 k0,6 k1,6 k2,6 k3,6 k0,7 k1,7 k2,7 k3,7
round key table (virtual) 1+ 10/12/14 round keys
Key schedule for 128-bit keys
k0,0 k1,0 k2,0 k3,0 k0,1 k1,1 k2,1 k3,1 k0,2 k1,2 k2,2 k3,2 k0,3 k1,3 k2,3 k3,3 k0,4 k1,4 k2,4 k3,4 k0,5 k1,5 k2,5 k3,5 k0,6 k1,6 k2,6 k3,6 k0,7 k1,7 k2,7 k3,7
+ + + +
k1,3 k2,3 k3,3 k0,3
Substitution Substitution
RC
+
Key schedule for 192-bit keys
k0,0 k1,0 k2,0 k3,0 k0,3 k1,3 k2,3 k3,3 k0,4 k1,4 k2,4 k3,4 k0,5 k1,5 k2,5 k3,5 k0,6 k1,6 k2,6 k3,6 k0,9 k1,9 k2,9 k3,9 k0,10 k1,10 k2,10 k3,10 k0,11 k1,11 k2,11 k3,11
+ + + +
k1,5 k2,5 k3,5 k0,5
Substitution Substitution
RC
+
k0,1 k1,1 k2,1 k3,1 k0,7 k1,7 k2,7 k3,7
+
k0,2 k1,2 k2,2 k3,2 k0,8 k1,8 k2,8 k3,8
+
Key schedule for 256-bit keys
k0,0 k1,0 k2,0 k3,0 k0,3 k1,3 k2,3 k3,3 k0,5 k1,5 k2,5 k3,5 k0,7 k1,7 k2,7 k3,7 k0,8 k1,8 k2,8 k3,8 k0,11 k1,11 k2,11 k3,11 k0,13 k1,13 k2,13 k3,13 k0,15 k1,15 k2,15 k3,15
+ + + +
k1,7 k2,7 k3,7 k0,7
Substitution Substitution
RC
+
k0,1 k1,1 k2,1 k3,1 k0,9 k1,9 k2,9 k3,9
+
k0,2 k1,2 k2,2 k3,2 k0,10 k1,10 k2,10 k3,10
+ Substitution Substitution
k0,6 k1,6 k2,6 k3,6 k0,14 k1,14 k2,14 k3,14
+
k0,4 k1,4 k2,4 k3,4 k0,12 k1,12 k2,12 k3,12
+
Benefits
– Proofs are elegant and easy
Disadvantages
– Resistance against unknown attacks – Risk for catastrophic failure – `Surprising’ properties – Confusion between ease of analysis and ease of cryptanalysis
Disadvantages
– Finite fields not supported (yet) by popular scripting languages – S-box is bottleneck in hardware – Encryption different from decryption (?)
Security of AES
– Differential cryptanalysis – Linear cryptanalysis – Saturation attack – Implementation attacks – Algebraic attacks
Differential & linear cryptanalysis
2-150 , 2-75
et al., Keliher-Sui]: 2-113 , 2-55
Impossible differentials
Saturation attack
possibilities
[DR’97,W+’00]
– More rounds if longer key
Algebraic attacks
S[x] = x-1 → S[x]x = 1, S[x]x2 = x, ...
[Courtois 2007]
Algebraic observations
& Robshaw, ’00]
Robshaw, ’02]
– Rewriting of equations – No impact on security demonstrated
– No impact on security
Opinions
concerns that the simple algebraic structure of the AES […] may lead to future breakthroughs in the analysis NESSIE Project, final decision February 27, 2003
Local collision attack [2009]
(Biryukov, Khovratovich, Nikolić)
P C ∆K P + ∆P C + ∆C K
Reduced avalanche effect
key
round
. . . . .
p: plaintext
round round round
c: ciphertext
Related-key scenario
Extended related-key scenario
round
. . . . .
key p: plaintext c: ciphertext
round round round
K and K + ∆K → K and f(K)
“Practical attacks”
Impact
Permutation (SPRP)
Cache-timing attack
realism in the assumptions
implementations on machines that attackers have access to
USA
AES-192/256 for secret and top secret
– 2-key triple DES: until 2009 – 3-key triple DES: until 2030
International
– Legacy issues, e.g. EMV v4.2 (2008) still uses DES – Minimal size issues (due to block length, key length) – Intel processors: AES instruction
AES for quality protection
AES influence on designs
– Camellia (e-Govt. Japan) – SNOW 3G (3GPP) – CLEFIA (Sony DRM solution)
– CLEFIA
AES-based hash functions
– Arirang, ECHO, Lane, Lesamnta, Shamata, Shavite-3, Twister, Vortex
– Aurora, Cheetah, Fugue, Grøstl, Sgail, Spectral hash
– Aurora, Cheetah, Grøstl, Luffa, Sarmal, (Whirlpool)
– Fugue, JH, Sgail
Competitors: stream ciphers
Goal:
– Software: faster – Hardware: using less resources
– Equal to AES – Just enough (80 bit)
Performance of Focus Phase II software ciphers (128-bit key)
5 10 15 20 25 30 35 40 45 50 stream 1500 576 40 AES Dragon HC-256 LEX Phelix Py Salsa20 Sosemanuk
50 100 150 200 250 stream 1500 576 40
Cycles/ byte
Tiny AES (Tina)
– Encryption and decryption, 128-bit key – Microcontroller interface
– 0.27 mm2 in 0.35 µm (4800 gate eq.) – 3 µA @ 100kHz, 1.5V – 100 encr./s (12.8 kbit/s)
Chip area in low-energy environment
SHA-256 SHA-1 AES Trivium Grain 2000 4000 6000 8000 10000 12000 Gate equivalents [GEs]
Conclusions