Introduction Addition and XOR Multiplication, Counting ARX Conclusion
ARX-based Cryptography
Nicky Mouha
ESAT/COSIC, K.U.Leuven, Belgium IBBT, Belgium
ECRYPT II Summer School, Albena Friday, June 3, 2011
1 / 75
ARX-based Cryptography Nicky Mouha ESAT/COSIC, K.U.Leuven, Belgium - - PowerPoint PPT Presentation
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX-based Cryptography Nicky Mouha ESAT/COSIC, K.U.Leuven, Belgium IBBT, Belgium ECRYPT II Summer School, Albena Friday, June 3, 2011 1 / 75 Introduction Addition and
Introduction Addition and XOR Multiplication, Counting ARX Conclusion
ESAT/COSIC, K.U.Leuven, Belgium IBBT, Belgium
1 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion
1
2
3
4
5
2 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
Later: renamed to ARX
E.g. FEAL (Eurocrypt 1987)
3 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
4 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
5 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
FEAL, Threefish
Salsa20, ChaCha, HC-128
SHA-3 Finalists: BLAKE, Skein SHA-3 Second Round: Blue Midnight Wish, Cubehash SHA-3 First Round: EDON-R
6 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
Block ciphers: TEA, XTEA, XXTEA SHA-3 candidate: EnRUPT
Hash functions: MD4, MD5, SHA-1 SHA-3 candidates: SIMD, Shabal
7 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
Can handle left/right shifts, bitwise Boolean functions, multiplication by constants
8 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
9 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
Typical size up to 8 × 8 bit Difference distribution table: up to 216 = 65536 elements Easy to calculate: differential probability, number of output differences, output difference with highest probability,...
Typically, n = 32 or n = 64 Difference distribution table: 264 or 2128 elements, too large! Fast algorithms (O(n)) required to calculate properties
10 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
11 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion ARX Differential Cryptanalysis xdp+: Definition xdp+: Motivating Example
12 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
f . . . a1[0] a2[0] ak[0] b[0] S[0] f . . . a1[1] a2[1] ak[1] b[1] S[1] f . . . a1[n − 1] a2[n − 1] ak[n − 1] b[n − 1] S[n − 1] S[2] S[n] . . .
13 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
14 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
15 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
(∆x[i], ∆y[i], ∆z[i]) = (1,0,1) 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 (x1[i], y1[i]) (0, 0) (1, 0) (0, 1) (1, 1) ( , ) ( 1 , ) (0, 1) (1, 1)
16 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
(0,0,0) 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 (0,0,1)=(0,1,0)=(1,0,0) 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 (0,1,1)=(1,0,1)=(1,1,0) 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 (1,1,1) 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1
17 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 0, 0 0, 1 1, 0 1, 1 0, 0 0, 1 1, 0 1, 1 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1
18 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
(∆x[i], ∆y[i], ∆z[i]) = (1,0,1) 0, 0 0, 0 0, 1 0, 1 1, 0 1, 0 1, 1 1, 1 (x1[i], y1[i]) (0, 0) (1, 0) (0, 1) (1, 1) ( , ) (1, 0) (0, 1) (1, 1) (0, 0) (0, 1) S[i + 1] (1, 0) (1, 1) S[i] (0, 0), (0, 1), (1, 0), (1, 1) 1 4 2 6 6 4 2 1 1 1 1 2 3 7 7 5 = A101
19 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
20 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
21 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
000 =
001 = 1
011 = 1
111 =
22 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
23 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
T0 ← (0x55555555 + Y0 + Y1 + Y2 + Y5 + Y7 ) ≫ T1 ← ( Y0 + Y1 + Y3 + Y4 + Y6 ) ≫ 5 T2 ← ( Y0 + Y1 + Y2 + Y3 + Y5 ) ≫ 9 T3 ← ( Y2 + Y3 + Y4 + Y6 + Y7 ) ≫ 11 T4 ← ( Y0 + Y1 + Y3 + Y4 + Y5 ) ≫ 15 T5 ← ( Y2 + Y4 + Y5 + Y6 + Y7 ) ≫ 20 T6 ← ( Y1 + Y2 + Y5 + Y6 + Y7 ) ≫ 25 T7 ← ( Y0 + Y3 + Y4 + Y6 + Y7 ) ≫ 27
24 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
T0 ← (0x55555555 + Y0 + Y1 + Y2 + Y5 + Y7 ) ≫ T1 ← ( Y0 + Y1 + Y3 + Y4 + Y6 ) ≫ 5 T2 ← ( Y0 + Y1 + Y2 + Y3 + Y5 ) ≫ 9 T3 ← ( Y2 + Y3 + Y4 + Y6 + Y7 ) ≫ 11 T4 ← ( Y0 + Y1 + Y3 + Y4 + Y5 ) ≫ 15 T5 ← ( Y2 + Y4 + Y5 + Y6 + Y7 ) ≫ 20 T6 ← ( Y1 + Y2 + Y5 + Y6 + Y7 ) ≫ 25 T7 ← ( Y0 + Y3 + Y4 + Y6 + Y7 ) ≫ 27
25 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
26 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
27 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
28 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
29 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
64-step characteristic for SHA-1, no solution
30 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
31 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion S-functions xdp+ Linearization adp⊕
32 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion xdp×3 xdc+ Example: Skein
Hash functions Shabal (×3, ×5), EnRUPT (×9)
33 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion xdp×3 xdc+ Example: Skein
34 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion xdp×3 xdc+ Example: Skein
35 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion xdp×3 xdc+ Example: Skein
∅ ∅ {0} {0} {1} {1} {0, 1} {0, 1} 1 1 1 1
000
001
36 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion xdp×3 xdc+ Example: Skein
∅ ∅ {0} {0} {1} {1} {0, 1} {0, 1} 1 1 1 1
∅ ∅ {0} {0} {1} {1} {0, 1} {0, 1} 1 1 1 1
∅ ∅ {0} {0} {1} {1} {0, 1} {0, 1} 1 1 1 1
37 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion xdp×3 xdc+ Example: Skein
O(2n) time algorithm for xdc+
O(n) time algorithm for xdc+
00 · B10 · B19 00 · B10 · B5 00 · B10 · B8 00 · B10 · B25 00 · C
38 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion Introduction ARX S-functions adpARX
39 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion Introduction ARX S-functions adpARX
40 / 75
Introduction Addition and XOR Multiplication, Counting ARX Conclusion Introduction ARX S-functions adpARX
More analysis Toolkits: avoid reinventing the wheel Stategy for secure design
41 / 75