Single-Trace Attacks on Keccak
Matthias J. Kannwischer1, Peter Pessl2, Robert Primas3
1Radboud University, Nijmegen 2Graz University of Technology (now with Infineon Technologies) 3Graz University of Technology
Single-Trace Attacks on Keccak Matthias J. Kannwischer 1 , Peter - - PowerPoint PPT Presentation
Single-Trace Attacks on Keccak Matthias J. Kannwischer 1 , Peter Pessl 2 , Robert Primas 3 1 Radboud University, Nijmegen 2 Graz University of Technology (now with Infineon Technologies) 3 Graz University of Technology Side-Channel Attacks on Hash
Matthias J. Kannwischer1, Peter Pessl2, Robert Primas3
1Radboud University, Nijmegen 2Graz University of Technology (now with Infineon Technologies) 3Graz University of Technology
❼ HMAC? Classic DPA setting, threat is obvious. . .
❼ . . . especially in post-quantum cryptography
1 Single-Trace Attacks on Keccak — CHES 2020
❼ derivation of a shared secret in a KEM ❼ expansion of a secret seed in KEMs and signatures ❼ hash-based signatures
❼ at most averaging, but still no DPA
2 Single-Trace Attacks on Keccak — CHES 2020
❼ thus far: mainly applied to AES, but Keccak structurally very different
❼ key-recovery in a large array of settings, countermeasures cannot be omitted ❼ factors influencing the success rate: key size, bit width of device, structure of input
3 Single-Trace Attacks on Keccak — CHES 2020
❼ ❼ ❼ ❼ ❼ 0r 0c f f f f
m0
m1 H0 H1 ... Absorb Squeeze
4 Single-Trace Attacks on Keccak — CHES 2020
❼ ❼ ❼ ❼ ❼
4 Single-Trace Attacks on Keccak — CHES 2020
❼ θ - add column parities ❼ ❼ ❼ ❼
Single-Trace Attacks on Keccak — CHES 2020
❼ θ - add column parities ❼ ρ - rotate lanes ❼ ❼ ❼
4 Single-Trace Attacks on Keccak — CHES 2020
❼ θ - add column parities ❼ ρ - rotate lanes ❼ π - reorder lanes ❼ ❼
4 Single-Trace Attacks on Keccak — CHES 2020
❼ θ - add column parities ❼ ρ - rotate lanes ❼ π - reorder lanes ❼ χ - SBox ❼
4 Single-Trace Attacks on Keccak — CHES 2020
❼ θ - add column parities ❼ ρ - rotate lanes ❼ π - reorder lanes ❼ χ - SBox ❼ ι - add round constant
4 Single-Trace Attacks on Keccak — CHES 2020
❼ and used only once
❼ no differential SCA ❼ have to use (some sort of) templates 0r 0c f f f
m0
m1 H0 ...
5 Single-Trace Attacks on Keccak — CHES 2020
❼ need templating device with known key ❼ poor portability of templates between devices
❼ often multiple calls inside a PK scheme, some with fully known data ❼ message hash during signing, re-encryption in decapsulation, . . .
6 Single-Trace Attacks on Keccak — CHES 2020
❼ HW leakage along lanes ❼ assign probability vector to each part
64
❼ efficient method: Soft Analytical Side-Channel Attacks (SASCA) [Veyrat-Charvillon et al., ASIACRYPT 2014]
7 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z ❼ ❼ ❼ ❼ X Y Z
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ ❼ ❼ ❼ X Y Z
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ goal: find marginals of variables ❼ message passing principle ❼ simplest version: enumerate inputs ❼ important: avoid circular reasoning X Y Z
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ goal: find marginals of variables ❼ message passing principle ❼ simplest version: enumerate inputs ❼ important: avoid circular reasoning Z Y X
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ goal: find marginals of variables ❼ message passing principle ❼ simplest version: enumerate inputs ❼ important: avoid circular reasoning X Z Y
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ goal: find marginals of variables ❼ message passing principle ❼ simplest version: enumerate inputs ❼ important: avoid circular reasoning Y Z X
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ goal: find marginals of variables ❼ message passing principle ❼ simplest version: enumerate inputs ❼ important: avoid circular reasoning Y Z X
8 Single-Trace Attacks on Keccak — CHES 2020
❼ variable nodes ❼ factor nodes ❼ example: X ⊕ Y = Z
❼ goal: find marginals of variables ❼ message passing principle ❼ simplest version: enumerate inputs ❼ important: avoid circular reasoning Z Y X
8 Single-Trace Attacks on Keccak — CHES 2020
❼ each bit after each step is a variable
❼ leakage on bytes/words, not bits ❼ lots of information lost during propagation
9 Single-Trace Attacks on Keccak — CHES 2020
❼ bits along a lane ❼ ideally: no spreading of side-channel info
❼ runtime and memory: exp. in cluster size ❼ we support 8-bit and 16-bit clusters
64
10 Single-Trace Attacks on Keccak — CHES 2020
❼ previous SASCA on AES: operations on bytes ❼ Keccak operations not aligned
❼ requires extraction of marginals
ROT(B, 4) A
11 Single-Trace Attacks on Keccak — CHES 2020
❼ 5-input ⊕ node (efficient propagation) ❼ enumeration of all possible values: 240 (8-bit cluster) ❼ solution: fast convolution of distributions using Walsh-Hadamard transform
12 Single-Trace Attacks on Keccak — CHES 2020
❼ break up clusters to deal with invertability
❼ ❼
13 Single-Trace Attacks on Keccak — CHES 2020
❼ break up clusters to deal with invertability
❼ found efficient method to combine leakage ❼ convolution instead of enumeration
13 Single-Trace Attacks on Keccak — CHES 2020
❼ 8-bit clusters: ∼ seconds on single core ❼ 16-bit clusters: ∼ 1 minute using 44 cores ❼ 8-bit clusters sufficient in most cases
❼ typically < 10 iterations
14 Single-Trace Attacks on Keccak — CHES 2020
❼ noisy HW-leakage of loads/stores (at typical locations) ❼ for 8, 16, and 32-bit implementations ❼ vary noise σ, retrieve success rate
❼ evaluate 128 and 256-bit keys
15 Single-Trace Attacks on Keccak — CHES 2020
❼ state = secret || 0000... ❼ example: SHAKE(128-bit seed)
❼ state = secret || rand ❼ example: H(msg || key)
0r 0c f f f
m0
m1 H0 ...
16 Single-Trace Attacks on Keccak — CHES 2020
❼ ❼
❼ ❼ I I I I I O O O O O secret
known known known known
θ - effect
17 Single-Trace Attacks on Keccak — CHES 2020
❼ T added 4 times to 0 ❼ same operation 4 times, averaging
❼ ❼ I I I I I O O O O O secret T θ - effect
17 Single-Trace Attacks on Keccak — CHES 2020
❼ T added 4 times to 0 ❼ same operation 4 times, averaging
❼ T added to 4 different values ❼ similar to a DPA using 4 traces I I I I I O O O O O secret
0xAB 0x81 0x09 0x29
θ - effect
17 Single-Trace Attacks on Keccak — CHES 2020
1 2 3 0.5 1
Success Rate
128bit 256bit
1 2 3 0.5 1
Success Rate
128bit 256bit
18 Single-Trace Attacks on Keccak — CHES 2020
1 2 3 0.5 1
Success Rate
128bit 256bit
1 2 3 0.5 1
Success Rate
128bit
19 Single-Trace Attacks on Keccak — CHES 2020
1 2 3 0.5 1
Success Rate
128bit
20 Single-Trace Attacks on Keccak — CHES 2020
21 Single-Trace Attacks on Keccak — CHES 2020