SlideShare a Scribd company logo
Practical DFA on AES
Marc Witteman – CTO
June 13, 2013
DFA on AES, how hard is that?
• 2003 Gilles Piret and Jean-Jacques Quisquater 2 faults
• 2013 Christophe Giraud and Adrian Thillard 1 fault
• 2013 Riscure up to 50 faults
Is Riscure stupid?
2
Outline
• How does single fault DFA on AES work?
• What’s wrong with single fault DFA?
• So, how does Riscure do DFA?
• Demo
3
Fault impact on AES
• Inject fault before ultimate MixColumn
Fault randomly changes chosen byte
• MixColumn propagates fault in column
• ShiftRow propagates fault to 4 cells
• One fault affects 4 output bytes
4
AddKey
Substitute
ShiftRow
AddKey
Output
Substitute
ShiftRow
MixColumn
Fault
9th round
10th round
MixColumn
ShiftRow
Finding the fault value
• Fault in specific byte propagates to 4 output bytes
• Each fault pair of correct and faulty output bytes halves the
number of values for the random fault
Out0 on fault Out7 on fault Out10 on fault Out13 on fault Outall on fault
Group of 4 affected output bytes reduces
possible fault values in known byte to about 15
Finding the key value
• A specific fault value matches with
two key values
• Group key space
reduced from
32 bits to ~8 bits
Mapping
Fault
value
Key
value
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 +
2 * 2 * 2 * 2 = 240
4 faults can break the key
• 4 x 32 reduced to 4 x 8 bits
• Remaining entropy is 32 bits
• Can be brute forced
K0 K10 K13K7
One fault catches all
• Inject fault before in round 8
Fault randomly changes chosen byte
• MixColumn propagates fault in
column
• ShiftRow propagates fault to 4 cells
• MixColumn propagates 4 faults in
4 columns
• ShiftRow propagates 4 faults to
16 cells, exposing 16 key bytes
• So, one correct + fault pair
+ 32 bit brute force reveals 128 bit key! 7
AddKey
Substitute
ShiftRow
AddKey
Output
Substitute
ShiftRow
MixColumn
Fault
9th round
10th round
MixColumn
ShiftRow
AddKey
MixColumn
8th round
9th round
MixColumn
ShiftRow
What’s wrong with single-fault DFA?
Fault model must be known
• Unknown byte hit?
8
Faults in same column are non-distinguishable
What’s wrong with single-fault DFA?
Fault model must be known
• Unknown byte hit?
blind byte hit multiplies search space by 4
• Unknown round hit?
blind round hit multiplies search space by 10
• Unknown operation hit?
9
void mix_column( unsigned char* column ) {
unsigned char a = column[0];
unsigned char b = column[1];
unsigned char c = column[2];
unsigned char d = column[3];
column[0] = mul2[ a ] ^ mul3[ b ] ^ c ^ d;
column[1] = mul2[ b ] ^ mul3[ c ] ^ d ^ a;
column[2] = mul2[ c ] ^ mul3[ d ] ^ a ^ b;
column[3] = mul2[ d ] ^ mul3[ a ] ^ b ^ c;
}
Alternative faults change effect
What’s wrong with single-fault DFA?
Fault model must be known
• Unknown byte hit?
blind byte hit multiplies search space by 4
• Unknown round hit?
blind round hit multiplies search space by 10
• Unknown operation hit?
out-of-model faults mess up the key search
Practice
• 32 bit AES brute force takes 20 minutes
• With unknowns this can grow to days 
• Brute force key search impossible when input missing
• We hate waiting  10
Our approach
Experience
If a target is vulnerable to fault injection,
it’s relatively easy to collect multiple faults
Procedure
1. acquire outputs while injecting faults (almost a minute)
2. select faults that match the fault model (few ms)
3. use voting and exclusion to reduce key space
to 0..24 bits using 24..50 faults (few ms)
4. brute force to match input or fault model (few sec)
11
We replace single-fault DFA by single-minute DFA
1. Acquisition
Glitch parameters
response
trigger glitch
command
2. Fault selection
• Hit ‘Key addition’, ‘Substitute’, Shift row’, or ‘Mix column’
• Check that only 4 output bytes change
• Accept that some faults have alternative fault model
Usable
Too little
Too much
13
void mix_column( unsigned char* column ) {
unsigned char a = column[0];
unsigned char b = column[1];
unsigned char c = column[2];
unsigned char d = column[3];
column[0] = mul2[ a ] ^ mul3[ b ] ^ c ^ d;
column[1] = mul2[ b ] ^ mul3[ c ] ^ d ^ a;
column[2] = mul2[ c ] ^ mul3[ d ] ^ a ^ b;
column[3] = mul2[ d ] ^ mul3[ a ] ^ b ^ c;
}
3. Key space reduction (one fault)
• 4 potential fault bytes per group
→ join possible key values
• Almost half of all key bytes match 
• Frequency = probability 
14
Fault in A Fault in B Fault in C Fault in D Fault in ANY
A E I M
B F J N
C G K O
D H L P
3. Key space reduction (multi fault)
15
1 2 1+2 sum(8) sum(12)
1 2 1*2*(1+2) prodsum(4) prodsum(8)
Voting
Voting and Exclusion
Full key extraction takes 32 up to 50 unique faults
4. Brute force
When to brute force?
• Verify correctness of candidates
• Only few faults available
• Can be efficient when 24 bits (or less) missing
• Too little variation in faults
How to brute force?
• Match keys with input/output
• Reverse last round and detect earlier faults
16
Conclusion
• Prior AES DFA work not practical due to
• Unknowns
• Out-of-model faults
• DFA practical when
• Fault selection on format
• Candidates selected by voting
• Practical DFA on AES can be fast
replace ‘single-fault’ by ‘single-minute’
• Remaining research questions
• Attack skipped rounds?
• Attack without duplicate plaintext?
17
Riscure North America
71 Stevenson Street, Suite 400
San Francisco, CA 94105
USA
Phone: +1 650 646 99 79
inforequest@riscure.com
Riscure B.V.
Frontier Building, Delftechpark 49
2628 XJ Delft
The Netherlands
Phone: +31 15 251 40 90
www.riscure.com
Contact: Marc Witteman
CTO

More Related Content

PDF
Assembly language 8086 intermediate
PDF
Flip flop
PDF
Introduction to ibm pc assembly language
PPTX
Flipflop
PPTX
Microprocessor 8086 instruction description
PPTX
Algoritmo Cesar.pptx
PPTX
Race around and master slave flip flop
PPTX
Clock divider by 3
Assembly language 8086 intermediate
Flip flop
Introduction to ibm pc assembly language
Flipflop
Microprocessor 8086 instruction description
Algoritmo Cesar.pptx
Race around and master slave flip flop
Clock divider by 3

What's hot (20)

PDF
Assembly language (coal)
PPTX
Divide by N clock
PPTX
Flip flop
PPTX
D and T Flip Flop
PPT
Verilog Tasks and functions
PPTX
Powerplanning
PPTX
Registers
PDF
Signed Binary Numbers
PPTX
PPTX
Setup and hold time violation in flip-flops
PPTX
DMA and DMA controller
PPTX
8251 USART
PPTX
AXI Protocol amba axi architecture protocol
PDF
chapter 7 Logic, shift and rotate instructions
PDF
UVM Methodology Tutorial
PDF
Session 9 advance_verification_features
PPTX
Minimization of DFA.pptx
PDF
2. Stream Ciphers
PDF
assembly language programming and organization of IBM PC" by YTHA YU
PPTX
Latches and flip flops
Assembly language (coal)
Divide by N clock
Flip flop
D and T Flip Flop
Verilog Tasks and functions
Powerplanning
Registers
Signed Binary Numbers
Setup and hold time violation in flip-flops
DMA and DMA controller
8251 USART
AXI Protocol amba axi architecture protocol
chapter 7 Logic, shift and rotate instructions
UVM Methodology Tutorial
Session 9 advance_verification_features
Minimization of DFA.pptx
2. Stream Ciphers
assembly language programming and organization of IBM PC" by YTHA YU
Latches and flip flops
Ad

Similar to Practical Differential Fault Attack on AES (20)

PPT
Chiffremtn asymetriqye AES Introduction.ppt
PDF
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PDF
A High Throughput CFA AES S-Box with Error Correction Capability
PDF
Adequacy of checksum algorithms for computer virus detection
PDF
icwet1097
PDF
Aes128 bit project_report
PDF
Algebraic Fault Attack on the SHA-256 Compression Function
PPTX
Advance Encryption Standard-AES Cryptosystem
PPTX
A HIGH THROUGHPUT AES DESIGN
PDF
PDF
F044062933
PPTX
Two fish & Rijndael (AES) Encryption Algorithm
PDF
E04612529
PDF
Aes encryption engine for many core processor arrays for enhanced security
PPT
AES Cryptosystem
PDF
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
PPT
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
PDF
Ci25500508
PPTX
Fault Detection AES
Chiffremtn asymetriqye AES Introduction.ppt
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
A High Throughput CFA AES S-Box with Error Correction Capability
Adequacy of checksum algorithms for computer virus detection
icwet1097
Aes128 bit project_report
Algebraic Fault Attack on the SHA-256 Compression Function
Advance Encryption Standard-AES Cryptosystem
A HIGH THROUGHPUT AES DESIGN
F044062933
Two fish & Rijndael (AES) Encryption Algorithm
E04612529
Aes encryption engine for many core processor arrays for enhanced security
AES Cryptosystem
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
Ci25500508
Fault Detection AES
Ad

More from Riscure (19)

PDF
Secure Boot Under Attack: Simulation to Enhance Fault Attacks & Defenses
PDF
PEW PEW PEW: Designing Secure Boot Securely
PDF
Riscure Assurance for Premium Content at a glance
PDF
Lowering the bar: deep learning for side-channel analysis
PDF
Software Attacks on Hardware Wallets
PDF
Efficient Reverse Engineering of Automotive Firmware
PDF
Fault Injection on Automotive Diagnosis Protocols
PDF
CheapSCAte: Attacking IoT with less than $60
PDF
Riscure Introduction
PDF
Bypassing Secure Boot using Fault Injection
PDF
Java Card Security
PDF
How to secure electronic passports
PDF
How multi-fault injection breaks the security of smart cards
PDF
Why is it so hard to make secure chips?
PDF
How to secure HCE
PDF
Why are we still vulnerable to Side Channel Attacks?
PDF
Controlling PC on ARM using Fault Injection
PDF
Defeating RSA Multiply-Always and Message Blinding Countermeasures
PDF
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure Boot Under Attack: Simulation to Enhance Fault Attacks & Defenses
PEW PEW PEW: Designing Secure Boot Securely
Riscure Assurance for Premium Content at a glance
Lowering the bar: deep learning for side-channel analysis
Software Attacks on Hardware Wallets
Efficient Reverse Engineering of Automotive Firmware
Fault Injection on Automotive Diagnosis Protocols
CheapSCAte: Attacking IoT with less than $60
Riscure Introduction
Bypassing Secure Boot using Fault Injection
Java Card Security
How to secure electronic passports
How multi-fault injection breaks the security of smart cards
Why is it so hard to make secure chips?
How to secure HCE
Why are we still vulnerable to Side Channel Attacks?
Controlling PC on ARM using Fault Injection
Defeating RSA Multiply-Always and Message Blinding Countermeasures
Secure initialization of Trusted Execution Environments: When Secure Boot fal...

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
KodekX | Application Modernization Development
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Teaching material agriculture food technology
Cloud computing and distributed systems.
Big Data Technologies - Introduction.pptx
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Practical Differential Fault Attack on AES

  • 1. Practical DFA on AES Marc Witteman – CTO June 13, 2013
  • 2. DFA on AES, how hard is that? • 2003 Gilles Piret and Jean-Jacques Quisquater 2 faults • 2013 Christophe Giraud and Adrian Thillard 1 fault • 2013 Riscure up to 50 faults Is Riscure stupid? 2
  • 3. Outline • How does single fault DFA on AES work? • What’s wrong with single fault DFA? • So, how does Riscure do DFA? • Demo 3
  • 4. Fault impact on AES • Inject fault before ultimate MixColumn Fault randomly changes chosen byte • MixColumn propagates fault in column • ShiftRow propagates fault to 4 cells • One fault affects 4 output bytes 4 AddKey Substitute ShiftRow AddKey Output Substitute ShiftRow MixColumn Fault 9th round 10th round MixColumn ShiftRow
  • 5. Finding the fault value • Fault in specific byte propagates to 4 output bytes • Each fault pair of correct and faulty output bytes halves the number of values for the random fault Out0 on fault Out7 on fault Out10 on fault Out13 on fault Outall on fault Group of 4 affected output bytes reduces possible fault values in known byte to about 15
  • 6. Finding the key value • A specific fault value matches with two key values • Group key space reduced from 32 bits to ~8 bits Mapping Fault value Key value 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 + 2 * 2 * 2 * 2 = 240 4 faults can break the key • 4 x 32 reduced to 4 x 8 bits • Remaining entropy is 32 bits • Can be brute forced K0 K10 K13K7
  • 7. One fault catches all • Inject fault before in round 8 Fault randomly changes chosen byte • MixColumn propagates fault in column • ShiftRow propagates fault to 4 cells • MixColumn propagates 4 faults in 4 columns • ShiftRow propagates 4 faults to 16 cells, exposing 16 key bytes • So, one correct + fault pair + 32 bit brute force reveals 128 bit key! 7 AddKey Substitute ShiftRow AddKey Output Substitute ShiftRow MixColumn Fault 9th round 10th round MixColumn ShiftRow AddKey MixColumn 8th round 9th round MixColumn ShiftRow
  • 8. What’s wrong with single-fault DFA? Fault model must be known • Unknown byte hit? 8 Faults in same column are non-distinguishable
  • 9. What’s wrong with single-fault DFA? Fault model must be known • Unknown byte hit? blind byte hit multiplies search space by 4 • Unknown round hit? blind round hit multiplies search space by 10 • Unknown operation hit? 9 void mix_column( unsigned char* column ) { unsigned char a = column[0]; unsigned char b = column[1]; unsigned char c = column[2]; unsigned char d = column[3]; column[0] = mul2[ a ] ^ mul3[ b ] ^ c ^ d; column[1] = mul2[ b ] ^ mul3[ c ] ^ d ^ a; column[2] = mul2[ c ] ^ mul3[ d ] ^ a ^ b; column[3] = mul2[ d ] ^ mul3[ a ] ^ b ^ c; } Alternative faults change effect
  • 10. What’s wrong with single-fault DFA? Fault model must be known • Unknown byte hit? blind byte hit multiplies search space by 4 • Unknown round hit? blind round hit multiplies search space by 10 • Unknown operation hit? out-of-model faults mess up the key search Practice • 32 bit AES brute force takes 20 minutes • With unknowns this can grow to days  • Brute force key search impossible when input missing • We hate waiting  10
  • 11. Our approach Experience If a target is vulnerable to fault injection, it’s relatively easy to collect multiple faults Procedure 1. acquire outputs while injecting faults (almost a minute) 2. select faults that match the fault model (few ms) 3. use voting and exclusion to reduce key space to 0..24 bits using 24..50 faults (few ms) 4. brute force to match input or fault model (few sec) 11 We replace single-fault DFA by single-minute DFA
  • 13. 2. Fault selection • Hit ‘Key addition’, ‘Substitute’, Shift row’, or ‘Mix column’ • Check that only 4 output bytes change • Accept that some faults have alternative fault model Usable Too little Too much 13 void mix_column( unsigned char* column ) { unsigned char a = column[0]; unsigned char b = column[1]; unsigned char c = column[2]; unsigned char d = column[3]; column[0] = mul2[ a ] ^ mul3[ b ] ^ c ^ d; column[1] = mul2[ b ] ^ mul3[ c ] ^ d ^ a; column[2] = mul2[ c ] ^ mul3[ d ] ^ a ^ b; column[3] = mul2[ d ] ^ mul3[ a ] ^ b ^ c; }
  • 14. 3. Key space reduction (one fault) • 4 potential fault bytes per group → join possible key values • Almost half of all key bytes match  • Frequency = probability  14 Fault in A Fault in B Fault in C Fault in D Fault in ANY A E I M B F J N C G K O D H L P
  • 15. 3. Key space reduction (multi fault) 15 1 2 1+2 sum(8) sum(12) 1 2 1*2*(1+2) prodsum(4) prodsum(8) Voting Voting and Exclusion Full key extraction takes 32 up to 50 unique faults
  • 16. 4. Brute force When to brute force? • Verify correctness of candidates • Only few faults available • Can be efficient when 24 bits (or less) missing • Too little variation in faults How to brute force? • Match keys with input/output • Reverse last round and detect earlier faults 16
  • 17. Conclusion • Prior AES DFA work not practical due to • Unknowns • Out-of-model faults • DFA practical when • Fault selection on format • Candidates selected by voting • Practical DFA on AES can be fast replace ‘single-fault’ by ‘single-minute’ • Remaining research questions • Attack skipped rounds? • Attack without duplicate plaintext? 17
  • 18. Riscure North America 71 Stevenson Street, Suite 400 San Francisco, CA 94105 USA Phone: +1 650 646 99 79 inforequest@riscure.com Riscure B.V. Frontier Building, Delftechpark 49 2628 XJ Delft The Netherlands Phone: +31 15 251 40 90 www.riscure.com Contact: Marc Witteman CTO