SlideShare a Scribd company logo
Marc Witteman
Riscure
Defeating RSA
Multiply-Always and Message Blinding
Countermeasures
Session ID: CRYP-201
Session Classification: Advanced
Agenda
2
Introduction
Preprocessing modular operations
Cross correlation
Conclusion
3
Introduction
• About the authors
• Side Channel Analysis
• RSA background
• Countermeasures
• Attack concepts
About The Authors
 Marc F. Witteman
 CTO, Riscure
 Jasper G. J. van Woudenberg
 Senior Security Analyst, Riscure
 Federico Menarini
 Security Analyst, Riscure
4
Side Channel Analysis
 Analyze secret leakage from crypto implementations
 Example power trace of DES on smart card
 Leaks hamming weight of processed data
5
RSA background
 Exponentiation is sequence of square and multiply operations
 Naïve implementations do for each key bit
 Always square
 Conditional multiplication (if key bit equals ‘1’)
 Distinction of square and multiply operations may reveal key (SPA)
1 000 11 0 0
8
Countermeasures
 noise
 multiply-always
discard multiplication results after processing a zero bit
 message blinding
multiply message with random number, and multiply signature with
a matching inverse that removes the mask
 exponent blinding
add random multiples of φ to the exponent
9
Some common countermeasures
against side channel analysis of RSA
Attack concepts
 Cross correlation is an attack class
 Comparable to high-order DPA
 No clear text/cipher text needed
 Attack demonstrated on RSA smart card
implementation with several countermeasures
 Procedure with two innovative steps
 Preprocess modular operations
 Cross correlation analysis
10
11
Preprocessing modular operations
• Compression
• Revealing
• Position finding
Compressing modular operations
 Modular operation execution typically increases power
consumption due to switching of many bits in parallel
 Old smart cards have easily recognizable modular operations
 Compression involves selection of threshold, and averaging all
sequential samples above a threshold
 Low pass filtering may be needed if signals are noisy
12
Revealing hidden modular operations
 New smart cards hide or scramble power signal (may need EMA)
 Modular operations may be recognized by alignment and averaging
 Pattern recognition works only for first operations (clock jitter)
13
• One averaged pattern is used to identify and locate modular
operations in the noisy traces
• Correlate the pattern with the trace, and the peaks indicate
the starting points of the modular operations
Position finding of shifted modular operations
14
15
Cross Correlation
• Operand sharing
• Principle
• Matrix
• Effect of multiply-always
• Neighboring samples
Operand sharing
 RSA uses two similar operations
(intermediate signature S, message M, modulus N)
 Square: S’ := S * S mod N
 Multiply: S’ := S * M mod N
 Subsequent square operations usually do not share
operands
 Multiply operations do share an operand (M)
 Operand sharing may be observed if order of square
and multiply operations identical for repetitive
encryptions
16
Cross correlation principle
 Consider a set of k traces with n samples as a matrix
 Compute correlation between each pair of sample vectors
17
Cross correlation matrix
 Correlation matrix
represented in colored
dots, where a lighter
color corresponds to a
higher correlation
 Multiply operations light
up like a Christmas tree
 Can recognize naïve
binary exponentiation
key: 111101011000101
18
Cross correlation with multiply always
 High frequency of
correlating pairs reveals
multiply always variant
 Incidental correlation of
square operation with
predecessor reveals
discarded multiply:
S’ = S * M
S’’ = S * S
 Can recognize key:
11110101100
19
Cross correlating neighboring samples
 Compute and display correlation only between adjacent vectors
1 1 11
0 0 0
0
High and low correlation values correspond to key bits set to zero and one
Complete key can be retrieved in short time
20
21
Conclusion
• Apply
• Countermeasures
• Future research
• Summary
• Q&A
Apply
 This attack can be applied to any RSA implementation
under the following conditions
 Power consumption or EM radiation can be measured
(with minimal S/N)
 Several thousand crypto operations (signatures) can be executed
 Implementation uses a fixed sequence of modular operations
 No data requirements
 No chosen messages needed
 No known messages or signatures needed
 Attack applies to
 RSA-Straight and RSA-CRT
 Naïve and Montgomery multiplication
 Any hashing or padding scheme
 Attack yields private exponent
22
Countermeasures
 Countermeasures that do NOT work
 Message blinding
 Multiply always, Montgomery ladder, or BRIP
 Countermeasures that are NOT enough
 Noise
 Signal reduction
 Random delays / variable clocks
 Countermeasures that work
 Exponent blinding
 Random bit group size
 Any randomization method that makes the order of square and
multiply operations unpredictable
23
Future research
Cross correlation attack applies well to RSA,
but the method is not restricted to RSA
We study application of the concepts to
 ECC
 Symmetric algorithms
24
Attack summary
 New side channel attack class developed and
demonstrated
 Applies to many different RSA implementations
 Defeats several countermeasures
 Effective countermeasures are possible
25
Q&A
Need help?
contact
Marc Witteman
CTO
witteman@riscure.com
Riscure Inc.
901 Mariners Island Blvd
Suite 595
San Mateo, CA 94404
USA
Phone: +1 650 425 7327
www.riscure.com
26
Complete article can be downloaded from:
http://www.riscure.com/tech-corner/publications.html

More Related Content

DOC
sifat batuan
PDF
Unicaseeds Demo Days - Cryptolab
DOCX
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
PPT
CPA_FinalProject_2015
PPTX
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
PDF
Hardware Attacks and Security
PPTX
CRYPTOGRAPHY & NETWORK SECURITY [Autosaved].pptx
PDF
Presentation about RSA
sifat batuan
Unicaseeds Demo Days - Cryptolab
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
CPA_FinalProject_2015
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
Hardware Attacks and Security
CRYPTOGRAPHY & NETWORK SECURITY [Autosaved].pptx
Presentation about RSA

Similar to Defeating RSA Multiply-Always and Message Blinding Countermeasures (20)

PDF
Why are we still vulnerable to Side Channel Attacks?
PPTX
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
PDF
ANALYSIS OF SIDE CHANNEL ATTACKS ON VARIOUS CRYPTOGRAPHIC ALGORITHMS
PDF
HARDWARE SECURITY IN CASE OF SCAN-BASED ATTACK ON CRYPTO-HARDWARE
PDF
HARDWARE SECURITY IN CASE OF SCAN-BASED ATTACK ON CRYPTO-HARDWARE
PDF
HARDWARE SECURITY IN CASE OF SCAN-BASED ATTACK ON CRYPTO-HARDWARE
PDF
RSA Algorithm as a Data Security Control Mechanism in RFID
PDF
K010117074
PDF
Computer security module 1
PPTX
Ch9_Cryptokkkllllllllllllllllllllk6e.pptx
PDF
RSA Two Person Game
PPTX
Information and data security cryptanalysis method
PDF
Timing attacks - Rambus
PPTX
Data security using rsa
PDF
paper2.pdf
PDF
lecture1.pdf
PDF
sheet2.pdf
PDF
paper9.pdf
Why are we still vulnerable to Side Channel Attacks?
Eloi Sanfelix - Hardware security: Side Channel Attacks [RootedCON 2011]
ANALYSIS OF SIDE CHANNEL ATTACKS ON VARIOUS CRYPTOGRAPHIC ALGORITHMS
HARDWARE SECURITY IN CASE OF SCAN-BASED ATTACK ON CRYPTO-HARDWARE
HARDWARE SECURITY IN CASE OF SCAN-BASED ATTACK ON CRYPTO-HARDWARE
HARDWARE SECURITY IN CASE OF SCAN-BASED ATTACK ON CRYPTO-HARDWARE
RSA Algorithm as a Data Security Control Mechanism in RFID
K010117074
Computer security module 1
Ch9_Cryptokkkllllllllllllllllllllk6e.pptx
RSA Two Person Game
Information and data security cryptanalysis method
Timing attacks - Rambus
Data security using rsa
paper2.pdf
lecture1.pdf
sheet2.pdf
paper9.pdf
Ad

More from Riscure (18)

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
Practical Differential Fault Attack on AES
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
Controlling PC on ARM using Fault Injection
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
Practical Differential Fault Attack on AES
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
Controlling PC on ARM using Fault Injection
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Big Data Technologies - Introduction.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
sap open course for s4hana steps from ECC to s4
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Spectral efficient network and resource selection model in 5G networks
Big Data Technologies - Introduction.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
MIND Revenue Release Quarter 2 2025 Press Release

Defeating RSA Multiply-Always and Message Blinding Countermeasures

  • 1. Marc Witteman Riscure Defeating RSA Multiply-Always and Message Blinding Countermeasures Session ID: CRYP-201 Session Classification: Advanced
  • 3. 3 Introduction • About the authors • Side Channel Analysis • RSA background • Countermeasures • Attack concepts
  • 4. About The Authors  Marc F. Witteman  CTO, Riscure  Jasper G. J. van Woudenberg  Senior Security Analyst, Riscure  Federico Menarini  Security Analyst, Riscure 4
  • 5. Side Channel Analysis  Analyze secret leakage from crypto implementations  Example power trace of DES on smart card  Leaks hamming weight of processed data 5
  • 6. RSA background  Exponentiation is sequence of square and multiply operations  Naïve implementations do for each key bit  Always square  Conditional multiplication (if key bit equals ‘1’)  Distinction of square and multiply operations may reveal key (SPA) 1 000 11 0 0 8
  • 7. Countermeasures  noise  multiply-always discard multiplication results after processing a zero bit  message blinding multiply message with random number, and multiply signature with a matching inverse that removes the mask  exponent blinding add random multiples of φ to the exponent 9 Some common countermeasures against side channel analysis of RSA
  • 8. Attack concepts  Cross correlation is an attack class  Comparable to high-order DPA  No clear text/cipher text needed  Attack demonstrated on RSA smart card implementation with several countermeasures  Procedure with two innovative steps  Preprocess modular operations  Cross correlation analysis 10
  • 9. 11 Preprocessing modular operations • Compression • Revealing • Position finding
  • 10. Compressing modular operations  Modular operation execution typically increases power consumption due to switching of many bits in parallel  Old smart cards have easily recognizable modular operations  Compression involves selection of threshold, and averaging all sequential samples above a threshold  Low pass filtering may be needed if signals are noisy 12
  • 11. Revealing hidden modular operations  New smart cards hide or scramble power signal (may need EMA)  Modular operations may be recognized by alignment and averaging  Pattern recognition works only for first operations (clock jitter) 13
  • 12. • One averaged pattern is used to identify and locate modular operations in the noisy traces • Correlate the pattern with the trace, and the peaks indicate the starting points of the modular operations Position finding of shifted modular operations 14
  • 13. 15 Cross Correlation • Operand sharing • Principle • Matrix • Effect of multiply-always • Neighboring samples
  • 14. Operand sharing  RSA uses two similar operations (intermediate signature S, message M, modulus N)  Square: S’ := S * S mod N  Multiply: S’ := S * M mod N  Subsequent square operations usually do not share operands  Multiply operations do share an operand (M)  Operand sharing may be observed if order of square and multiply operations identical for repetitive encryptions 16
  • 15. Cross correlation principle  Consider a set of k traces with n samples as a matrix  Compute correlation between each pair of sample vectors 17
  • 16. Cross correlation matrix  Correlation matrix represented in colored dots, where a lighter color corresponds to a higher correlation  Multiply operations light up like a Christmas tree  Can recognize naïve binary exponentiation key: 111101011000101 18
  • 17. Cross correlation with multiply always  High frequency of correlating pairs reveals multiply always variant  Incidental correlation of square operation with predecessor reveals discarded multiply: S’ = S * M S’’ = S * S  Can recognize key: 11110101100 19
  • 18. Cross correlating neighboring samples  Compute and display correlation only between adjacent vectors 1 1 11 0 0 0 0 High and low correlation values correspond to key bits set to zero and one Complete key can be retrieved in short time 20
  • 19. 21 Conclusion • Apply • Countermeasures • Future research • Summary • Q&A
  • 20. Apply  This attack can be applied to any RSA implementation under the following conditions  Power consumption or EM radiation can be measured (with minimal S/N)  Several thousand crypto operations (signatures) can be executed  Implementation uses a fixed sequence of modular operations  No data requirements  No chosen messages needed  No known messages or signatures needed  Attack applies to  RSA-Straight and RSA-CRT  Naïve and Montgomery multiplication  Any hashing or padding scheme  Attack yields private exponent 22
  • 21. Countermeasures  Countermeasures that do NOT work  Message blinding  Multiply always, Montgomery ladder, or BRIP  Countermeasures that are NOT enough  Noise  Signal reduction  Random delays / variable clocks  Countermeasures that work  Exponent blinding  Random bit group size  Any randomization method that makes the order of square and multiply operations unpredictable 23
  • 22. Future research Cross correlation attack applies well to RSA, but the method is not restricted to RSA We study application of the concepts to  ECC  Symmetric algorithms 24
  • 23. Attack summary  New side channel attack class developed and demonstrated  Applies to many different RSA implementations  Defeats several countermeasures  Effective countermeasures are possible 25
  • 24. Q&A Need help? contact Marc Witteman CTO witteman@riscure.com Riscure Inc. 901 Mariners Island Blvd Suite 595 San Mateo, CA 94404 USA Phone: +1 650 425 7327 www.riscure.com 26 Complete article can be downloaded from: http://www.riscure.com/tech-corner/publications.html