SIFA: Exploiting Ineffective Fault Inductions on Symmetric - - PowerPoint PPT Presentation

sifa exploiting ineffective fault inductions on symmetric
SMART_READER_LITE
LIVE PREVIEW

SIFA: Exploiting Ineffective Fault Inductions on Symmetric - - PowerPoint PPT Presentation

SIFA: Exploiting Ineffective Fault Inductions on Symmetric Cryptography Christoph Dobraunig 1 , Maria Eichlseder 1 , Thomas Korak 2 , Stefan Mangard 1 , Florian Mendel 2 , Robert Primas 1 1 Graz University of Technology, Austria


slide-1
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
SLIDE 28

SIFA Intuition

0 1 0 1 0 1 7

slide-29
SLIDE 29

SIFA Intuition

0 1 0 1 0 1 7

slide-30
SLIDE 30

SIFA Intuition

Bitflip 0 1 0 1 0 1 7

slide-31
SLIDE 31

SIFA Intuition

Bitflip 0 1 0 1 0 1 7

slide-32
SLIDE 32

SIFA Intuition

Rand 0 1 0 1 0 1 7

slide-33
SLIDE 33

SIFA Intuition

Rand 0 1 0 1 0 1 7

slide-34
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
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
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
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
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
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
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
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
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
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
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
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
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
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
SLIDE 48

Thank you for your attention!

14

slide-49
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
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
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
SLIDE 52

SIFA Intuition (cont.)

Stuck 0 1 0 1 0 1 18

slide-53
SLIDE 53

SIFA Intuition (cont.)

0 1 0 1 Stuck 0 1 18

slide-54
SLIDE 54

SIFA Intuition (cont.)

0 1 Stuck 0 1 0 1 18