SLIDE 1 SIFA: Exploiting Ineffective Fault Inductions on Symmetric Cryptography
Christoph Dobraunig1, Maria Eichlseder1, Thomas Korak2, Stefan Mangard1, Florian Mendel2, Robert Primas1
1Graz University of Technology, Austria
first.last@iaik.tugraz.at
2Infineon Technologies AG, Germany
first.last@infineon.com
SLIDE 2 Outlook
We present fault attacks that are ...
- Hard to prevent
- Defy detection, any degree of redundancy
- Defy infection
- (Defy masking)
- Versatile
- Many possible fault locations/effects
- Applicable to many symmetric schemes
- Evaluated on various platforms
1
SLIDE 3 Outlook
We present fault attacks that are ...
- Hard to prevent
- Defy detection, any degree of redundancy
- Defy infection
- (Defy masking)
- Versatile
- Many possible fault locations/effects
- Applicable to many symmetric schemes
- Evaluated on various platforms
1
SLIDE 4 Outlook
We present fault attacks that are ...
- Hard to prevent
- Defy detection, any degree of redundancy
- Defy infection
- (Defy masking)
- Versatile
- Many possible fault locations/effects
- Applicable to many symmetric schemes
- Evaluated on various platforms
1
SLIDE 5 Fault Attacks
- Get device access:
- Set plaintexts
- Observe ciphertexts
- Cause (partially) erroneous computation
- Observe faulty and correct ciphertext
- Determine correct sub key guesses by
verifying output pairs ⇒ Differential Fault Attack (DFA)
ENC PT CT
2
SLIDE 6 Fault Attacks
- Get device access:
- Set plaintexts
- Observe ciphertexts
- Cause (partially) erroneous computation
- Observe faulty and correct ciphertext
- Determine correct sub key guesses by
verifying output pairs ⇒ Differential Fault Attack (DFA)
ENC PT CT*
2
SLIDE 7 Fault Attacks
- Get device access:
- Set plaintexts
- Observe ciphertexts
- Cause (partially) erroneous computation
- Observe faulty and correct ciphertext
- Determine correct sub key guesses by
verifying output pairs ⇒ Differential Fault Attack (DFA)
CT ENC ENC PT CT*
2
SLIDE 8 Fault Attacks
- Get device access:
- Set plaintexts
- Observe ciphertexts
- Cause (partially) erroneous computation
- Observe faulty and correct ciphertext
- Determine correct sub key guesses by
verifying output pairs ⇒ Differential Fault Attack (DFA)
CT CT* SUB KEY VERIFY
2
SLIDE 9 Fault Attacks
- Get device access:
- Set plaintexts
- Observe ciphertexts
- Cause (partially) erroneous computation
- Observe faulty and correct ciphertext
- Determine correct sub key guesses by
verifying output pairs ⇒ Differential Fault Attack (DFA)
CT CT* SUB KEY VERIFY
2
SLIDE 10 Fault Countermeasures - Detection
- Use redundancy to detect faults
- Fault detected → No ciphertext
- 2 identical faults necessary for attack
→ More redundancy, Enc-Dec, masking, etc...
ENC CT ENC PT CT CT
ENC-DETECT
3
SLIDE 11 Fault Countermeasures - Detection
- Use redundancy to detect faults
- Fault detected → No ciphertext
- 2 identical faults necessary for attack
→ More redundancy, Enc-Dec, masking, etc...
CT* ENC CT ENC PT ...
ENC-DETECT
3
SLIDE 12 Fault Countermeasures - Detection
- Use redundancy to detect faults
- Fault detected → No ciphertext
- 2 identical faults necessary for attack
→ More redundancy, Enc-Dec, masking, etc...
CT* ENC ENC PT CT* CT*
ENC-DETECT
3
SLIDE 13 Fault Countermeasures - Detection
- Use redundancy to detect faults
- Fault detected → No ciphertext
- 2 identical faults necessary for attack
→ More redundancy, Enc-Dec, masking, etc...
CT* ENC ENC PT CT* CT*
ENC-DETECT
3
SLIDE 14 Fault Countermeasures - Infection
- Use redundancy, interleaved computation and
dummy rounds
- Faults are amplified s.t. ciphertext is not
related to the key anymore
- Key recovery not possible
- Attacks still possible but hard...
ENC ENC ENC PT CT
ENC-INFECT
4
SLIDE 15 Fault Countermeasures - Infection
- Use redundancy, interleaved computation and
dummy rounds
- Faults are amplified s.t. ciphertext is not
related to the key anymore
- Key recovery not possible
- Attacks still possible but hard...
ENC ENC ENC PT %&$
ENC-INFECT
4
SLIDE 16 Fault Countermeasures - Infection
- Use redundancy, interleaved computation and
dummy rounds
- Faults are amplified s.t. ciphertext is not
related to the key anymore
- Key recovery not possible
- Attacks still possible but hard...
CT SUB KEY VERIFY %&$
4
SLIDE 17 Fault Countermeasures - Infection
- Use redundancy, interleaved computation and
dummy rounds
- Faults are amplified s.t. ciphertext is not
related to the key anymore
- Key recovery not possible
- Attacks still possible but hard...
CT SUB KEY VERIFY %&$
4
SLIDE 18 Statistical Ineffective Fault Attacks (SIFA)
Combines ...
- Ineffective Fault Attacks (IFA) by Clavier et al. [Cla07]
+ Exploits only correct ciphertexts (similar to safe error attacks) − Requires precise faults with known effect
- Statistical Fault Analysis (SFA) by Fuhr et al. [FJLT13]
+ Any fault, even if effect is unknown − Mitigated by detection/infection
⇒ Statistical Ineffective Fault Attacks (SIFA)
+ Exploits only correct ciphertexts + Any fault, even if effect is unknown
5
SLIDE 19 Statistical Ineffective Fault Attacks (SIFA)
Combines ...
- Ineffective Fault Attacks (IFA) by Clavier et al. [Cla07]
+ Exploits only correct ciphertexts (similar to safe error attacks) − Requires precise faults with known effect
- Statistical Fault Analysis (SFA) by Fuhr et al. [FJLT13]
+ Any fault, even if effect is unknown − Mitigated by detection/infection
⇒ Statistical Ineffective Fault Attacks (SIFA)
+ Exploits only correct ciphertexts + Any fault, even if effect is unknown
5
SLIDE 20 Statistical Ineffective Fault Attacks (SIFA)
Combines ...
- Ineffective Fault Attacks (IFA) by Clavier et al. [Cla07]
+ Exploits only correct ciphertexts (similar to safe error attacks) − Requires precise faults with known effect
- Statistical Fault Analysis (SFA) by Fuhr et al. [FJLT13]
+ Any fault, even if effect is unknown − Mitigated by detection/infection
⇒ Statistical Ineffective Fault Attacks (SIFA)
+ Exploits only correct ciphertexts + Any fault, even if effect is unknown
5
SLIDE 21 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext
6
SLIDE 22 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
Ciphertext
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext Ciphertext Ciphertext Ciphertext
6
SLIDE 23 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext Ciphertext Ciphertext Ciphertext Ciphertext
6
SLIDE 24 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext Ciphertext Ciphertext Ciphertext Ciphertext
6
SLIDE 25 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext Ciphertext Ciphertext Ciphertext Ciphertext
6
SLIDE 26 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext Ciphertext Ciphertext Ciphertext Ciphertext
6
SLIDE 27 SIFA on AES - Fault Injection Phase
Example for AES...
- Over multiple encryptions, state bytes are
uniformly distributed
- Fault somewhere between MC in round 8-9
- Goal is some non-uniform distribution
- Stuck-at fault, random fault, skips, flips...
- Fault Granularity: 1 bit → a few bytes
- Works even for ineffective faults
- i.e. a fault was injected but the computation
is still correct
- Attacker gets “access to subset of ciphertexts”
Ciphertext Ciphertext
ROUND 10 ROUND 9 ROUND 8
KEY ADD 10 SHIFT ROWS SUB BYTES KEY ADD 9 SHIFT ROWS SUB BYTES MIX COLUMNS KEY ADD 8 MIX COLUMNS SHIFT ROWS
:
Ciphertext Ciphertext Ciphertext
6
SLIDE 28
SIFA Intuition
0 1 0 1 0 1 7
SLIDE 29
SIFA Intuition
0 1 0 1 0 1 7
SLIDE 30
SIFA Intuition
Bitflip 0 1 0 1 0 1 7
SLIDE 31
SIFA Intuition
Bitflip 0 1 0 1 0 1 7
SLIDE 32
SIFA Intuition
Rand 0 1 0 1 0 1 7
SLIDE 33
SIFA Intuition
Rand 0 1 0 1 0 1 7
SLIDE 34 SIFA on AES - Key Recovery Phase
- Collect set of correct ciphertexts C1 . . . Cn from faulted encryptions
- Guess 32-bit sub key K10 and calculate state Si in round 9 (K9 is not needed):
Si = MC−1 ◦ SB−1 ◦ SR−1(Ci ⊕ K10)
- Measure uniformity of S1 . . . Sn using e.g. the Squared Euclidean Imbalance (SEI)
- Uniform distribuiton expected for wrong key candidate
- Non-uniform distribuiton expected for correct key candidate
- Key candidate corresponding to highest SEI is likely correct
8
SLIDE 35 SIFA on AES - Key Recovery Phase
- Collect set of correct ciphertexts C1 . . . Cn from faulted encryptions
- Guess 32-bit sub key K10 and calculate state Si in round 9 (K9 is not needed):
Si = MC−1 ◦ SB−1 ◦ SR−1(Ci ⊕ K10)
- Measure uniformity of S1 . . . Sn using e.g. the Squared Euclidean Imbalance (SEI)
- Uniform distribuiton expected for wrong key candidate
- Non-uniform distribuiton expected for correct key candidate
- Key candidate corresponding to highest SEI is likely correct
8
SLIDE 36 SIFA on AES - Key Recovery Phase
- Collect set of correct ciphertexts C1 . . . Cn from faulted encryptions
- Guess 32-bit sub key K10 and calculate state Si in round 9 (K9 is not needed):
Si = MC−1 ◦ SB−1 ◦ SR−1(Ci ⊕ K10)
- Measure uniformity of S1 . . . Sn using e.g. the Squared Euclidean Imbalance (SEI)
- Uniform distribuiton expected for wrong key candidate
- Non-uniform distribuiton expected for correct key candidate
- Key candidate corresponding to highest SEI is likely correct
8
SLIDE 37 SIFA on AES - Key Recovery Phase
- Collect set of correct ciphertexts C1 . . . Cn from faulted encryptions
- Guess 32-bit sub key K10 and calculate state Si in round 9 (K9 is not needed):
Si = MC−1 ◦ SB−1 ◦ SR−1(Ci ⊕ K10)
- Measure uniformity of S1 . . . Sn using e.g. the Squared Euclidean Imbalance (SEI)
- Uniform distribuiton expected for wrong key candidate
- Non-uniform distribuiton expected for correct key candidate
- Key candidate corresponding to highest SEI is likely correct
8
SLIDE 38 SIFA on AES - Key Recovery Phase
- Collect set of correct ciphertexts C1 . . . Cn from faulted encryptions
- Guess 32-bit sub key K10 and calculate state Si in round 9 (K9 is not needed):
Si = MC−1 ◦ SB−1 ◦ SR−1(Ci ⊕ K10)
- Measure uniformity of S1 . . . Sn using e.g. the Squared Euclidean Imbalance (SEI)
- Uniform distribuiton expected for wrong key candidate
- Non-uniform distribuiton expected for correct key candidate
- Key candidate corresponding to highest SEI is likely correct
8
SLIDE 39 SIFA on AES - Key Recovery Phase
- Collect set of correct ciphertexts C1 . . . Cn from faulted encryptions
- Guess 32-bit sub key K10 and calculate state Si in round 9 (K9 is not needed):
Si = MC−1 ◦ SB−1 ◦ SR−1(Ci ⊕ K10)
- Measure uniformity of S1 . . . Sn using e.g. the Squared Euclidean Imbalance (SEI)
- Uniform distribuiton expected for wrong key candidate
- Non-uniform distribuiton expected for correct key candidate
- Key candidate corresponding to highest SEI is likely correct
8
SLIDE 40 Practical Results - Detection
2 4 6 8 10 2−1 20 # Correct ciphertexts SEI Correct key Wrong keys
- Clock glitch on ATXmega 128D4
- SW-AES from AVR-crypto-lib
- ≈ 5 correct ciphertexts
- ≈ 1 300 faulted encryptions
50 100 150 200 250 2−7 2−6 2−5 2−4 # Correct ciphertexts SEI Correct key Wrong keys
- Clock glitch on ATXmega 256A3
- HW-AES co-processor
- ≈ 220 correct ciphertexts
- ≈ 1 000 faulted encryptions
9
SLIDE 41 Practical Results - Detection
2 4 6 8 10 2−1 20 # Correct ciphertexts SEI Correct key Wrong keys
- Clock glitch on ATXmega 128D4
- SW-AES from AVR-crypto-lib
- ≈ 5 correct ciphertexts
- ≈ 1 300 faulted encryptions
50 100 150 200 250 2−7 2−6 2−5 2−4 # Correct ciphertexts SEI Correct key Wrong keys
- Clock glitch on ATXmega 256A3
- HW-AES co-processor
- ≈ 220 correct ciphertexts
- ≈ 1 000 faulted encryptions
9
SLIDE 42 Results - Infection by Tupsamudre et al. [TBM14]
- Clock glitch: ATXmega128D4
- SW-AES with infection
- 22 real + 11 dummy rounds
- ≈ 25 correct ciphertexts
- ≈ 6 500 faulted encryptions
5 10 15 20 25 30 2−3 2−2 2−1 # Correct ciphertexts SEI Correct key Wrong keys
10
SLIDE 43 Results - Infection by Tupsamudre et al. [TBM14]
- Clock glitch: ATXmega128D4
- SW-AES with infection
- 22 real + 22 dummy rounds
- ≈ 34 correct ciphertexts
- ≈ 9 000 faulted encryptions
5 10 15 20 25 30 35 2−4 2−2 # Correct ciphertexts SEI Correct key Wrong keys
11
SLIDE 44 Results - Infection by Tupsamudre et al. [TBM14]
- Clock glitch: ATXmega128D4
- SW-AES with infection
- 22 real + 66 dummy rounds
- ≈ 180 ciphertexts needed
- ≈ 46 000 faulted encryptions
30 60 90 120 150 180 210 2−7 2−6 2−5 2−4 # Correct ciphertexts SEI Correct key Wrong keys
12
SLIDE 45 Summary
SIFA ...
- defies popular fault countermeasures: detection/infection
- requires hundreds/thousands faulted computations
- requires only one fault per computation
- does not require precise fault locations
- works with any type of fault, even if effect is unknown (→ blackbox attacks)
⇒ works for AE schemes (SAC 2018) [DMMP18]
→ including stream-cipher, sponge-based schemes → e.g. all CAESAR finalists
⇒ works for masked implementations (ASIACRYPT 2018) [DEG+18]
→ just faulting one share is sufficient → same performance, no real overhead → essentially independent of degree of masking and redundancy
13
SLIDE 46 Summary
SIFA ...
- defies popular fault countermeasures: detection/infection
- requires hundreds/thousands faulted computations
- requires only one fault per computation
- does not require precise fault locations
- works with any type of fault, even if effect is unknown (→ blackbox attacks)
⇒ works for AE schemes (SAC 2018) [DMMP18]
→ including stream-cipher, sponge-based schemes → e.g. all CAESAR finalists
⇒ works for masked implementations (ASIACRYPT 2018) [DEG+18]
→ just faulting one share is sufficient → same performance, no real overhead → essentially independent of degree of masking and redundancy
13
SLIDE 47 Summary
SIFA ...
- defies popular fault countermeasures: detection/infection
- requires hundreds/thousands faulted computations
- requires only one fault per computation
- does not require precise fault locations
- works with any type of fault, even if effect is unknown (→ blackbox attacks)
⇒ works for AE schemes (SAC 2018) [DMMP18]
→ including stream-cipher, sponge-based schemes → e.g. all CAESAR finalists
⇒ works for masked implementations (ASIACRYPT 2018) [DEG+18]
→ just faulting one share is sufficient → same performance, no real overhead → essentially independent of degree of masking and redundancy
13
SLIDE 48
Thank you for your attention!
14
SLIDE 49
References i
Christophe Clavier. Secret external encodings do not prevent transient fault analysis. In Pascal Paillier and Ingrid Verbauwhede, editors, Cryptographic Hardware and Embedded Systems – CHES 2007, volume 4727 of LNCS, pages 181–194. Springer, 2007. Christoph Dobraunig, Maria Eichlseder, Hannes Gross, Stefan Mangard, Florian Mendel, and Robert Primas. Statistical ineffective fault attacks on masked AES with fault countermeasures. Cryptology ePrint Archive, 2018.
https://eprint.iacr.org/2018/357.
15
SLIDE 50 References ii
Christoph Dobraunig, Stefan Mangard, Florian Mendel, and Robert Primas. Fault attacks on nonce-based authenticated encryption: Application to keyak and ketje. To appear at: Selected Areas of Cryptography, 2018. Thomas Fuhr, ´ Eliane Jaulmes, Victor Lomn´ e, and Adrian Thillard. Fault attacks on AES with faulty ciphertexts only. In Wieland Fischer and J¨
- rn-Marc Schmidt, editors, Fault Diagnosis and Tolerance
in Cryptography – FDTC 2013, pages 108–118. IEEE Computer Society, 2013.
16
SLIDE 51
References iii
Harshal Tupsamudre, Shikha Bisht, and Debdeep Mukhopadhyay. Destroying fault invariant with randomization – A countermeasure for AES against differential fault attacks. In Lejla Batina and Matthew Robshaw, editors, Cryptographic Hardware and Embedded Systems – CHES 2014, volume 8731 of LNCS, pages 93–111. Springer, 2014.
17
SLIDE 52
SIFA Intuition (cont.)
Stuck 0 1 0 1 0 1 18
SLIDE 53
SIFA Intuition (cont.)
0 1 0 1 Stuck 0 1 18
SLIDE 54
SIFA Intuition (cont.)
0 1 Stuck 0 1 0 1 18