Torturing OpenSSL Todd Austin University of Michigan with Andrea Pellegrini, William Arthur and Valeria Bertacco (Based on Valeria’s BlackHat 2012 Presentation)

Slides:



Advertisements
Similar presentations
Side-Channel Attacks on RSA with CRT Weakness of RSA Alexander Kozak Jared Vanderbeck.
Advertisements

DIGITAL SIGNATURES and AUTHENTICATION PROTOCOLS - Chapter 13
CRT RSA Algorithm Protected Against Fault Attacks WISTP - 5/10/07 Arnaud BOSCHER Spansion EMEA Robert NACIRI Oberthur Card Systems Emmanuel PROUFF Oberthur.
RRSIG:“I certify that this DNS record set is correct” Problem: how to certify a negative response, i.e. that a record doesn’t exist? NSEC:“I certify that.
Thank you for your introduction.
Dr. Lo’ai Tawalbeh Summer 2007 Chapter 9 – Public Key Cryptography and RSA Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
RSA Attacks 1 RSA Implementation Attacks RSA Attacks 2 RSA  RSA o Public key: (e,N) o Private key: d  Encrypt M C = M e (mod N)  Decrypt C M = C d.
Side-Channel Attacks on Smart Cards. Timing Analysis Cryptosystems take different amount of time to process different inputs. Performance optimisations.
1 Error Correction Coding for Flash Memories Eitan Yaakobi, Jing Ma, Adrian Caulfield, Laura Grupp Steven Swanson, Paul H. Siegel, Jack K. Wolf Flash Memory.
Security Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to: –Describe the reasons for having system.
1 An ID-based multisignature scheme without reblocking and predetermined signing order Chin-Chen Chang, Iuon-Chang Lin, and Kwok-Yan Lam Computer Standards.
An Expandable Montgomery Modular Multiplication Processor Adnan Abdul-Aziz GutubAlaaeldin A. M. Amin Computer Engineering Department King Fahd University.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
Barcelona, Spain November 13, 2005 WAR-1: Assessing SEU Vulnerability Via Circuit-Level Timing Analysis 1 Assessing SEU Vulnerability via Circuit-Level.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
Side-Channel Attack: timing attack Hiroki Morimoto.
SIDE CHANNEL ATTACKS Presented by: Vishwanath Patil Abhay Jalisatgi.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Lecture 11: Storage Systems Disk, RAID, Dependability Kai Bu
By Mohammad Alsawwaf Supervised By Dr. Lee NETWORK LOAD BALANCING NLB.
Lecture 11: Storage Systems Disk, RAID, Dependability Kai Bu
Experimenting with Shared Generation of RSA Keys Michael Malkin Thomas Wu Dan Boneh Stanford University *Supported by DARPA.
TOPIC : Types of fault simulation
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
CS 627 Elliptic Curves and Cryptography Paper by: Aleksandar Jurisic, Alfred J. Menezes Published: January 1998 Presented by: Sagar Chivate.
9th IMA Conference on Cryptography & Coding Dec 2003 More Detail for a Combined Timing and Power Attack against Implementations of RSA Werner Schindler.
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
Strength of Cryptographic Systems Dr. C F Chong, Dr. K P Chow Department of Computer Science and Information Systems The University of Hong Kong.
1 Public-Key Cryptography and Message Authentication.
Utilizing Performance Monitors for Compromising keys of RSA on Intel Platforms Sarani Bhattacharya and Debdeep Mukhopadhyay Dept. of Computer Science and.
Practical Byzantine Fault Tolerance
Sandrine AGAGLIATE, FTFC Power Consumption Analysis and Cryptography S. Agagliate Canal+Technologies P. Guillot Canal+Technologies O. Orcières Thalès.
Encryption Questions answered in this lecture: How does encryption provide privacy? How does encryption provide authentication? What is public key encryption?
Attacks on PRNGs - By Nupura Neurgaonkar CS-265 (Prof. Mark Stamp)
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
Lecture 8 Overview. Analysis of Algorithms Algorithms – Time Complexity – Space Complexity An algorithm whose time complexity is bounded by a polynomial.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Exploiting Cache-Timing in AES: Attacks and Countermeasures Ivo Pooters March 17, 2008 Seminar Information Security Technology.
A paper by: Paul Kocher, Joshua Jaffe, and Benjamin Jun Presentation by: Michelle Dickson.
Securing Passwords Against Dictionary Attacks Presented By Chad Frommeyer.
Identification Authentication. 2 Authentication Allows an entity (a user or a system) to prove its identity to another entity Typically, the entity whose.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
COMP 424 Lecture 04 Advanced Encryption Techniques (DES, AES, RSA)
New Client Puzzle Outsourcing Techniques for DoS Resistance Brent Waters, Stanford University Ari Juels, RSA Laboratories Alex Halderman, Princeton University.
PROACTIVE SECRET SHARING Or: How to Cope With Perpetual Leakage Herzberg et al. Presented by: Avinash Ravi Kevin Skapinetz.
Various Attacks on Cryptosystems slides (c) 2012 by Richard Newman.
Remote Timing Attacks are Practical David Brumley Dan Boneh [Modified by Somesh.
Private key
Methodology to Compute Architectural Vulnerability Factors Chris Weaver 1, 2 Shubhendu S. Mukherjee 1 Joel Emer 1 Steven K. Reinhardt 1, 2 Todd Austin.
A Cross-Protocol Attack on the TLSProtocol Nikos Mavrogiannopoulos, Frederik Vercauteren, VesselinVelichkov, Bart Preneel. Presented by: Nitin Subramanian.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
WISA 2007 Jeju Island, Korea, 27th – 29th Aug 2007 Longer Randomly Blinded RSA Keys may be Weaker than Shorter Ones Colin D. Walter
Lecture7 –More on Attacks Rice ELEC 528/ COMP 538 Farinaz Koushanfar Spring 2009.
Lattice-based Fault Attacks on DSA – Another Possible Strategy Tomáš Rosa,
TOPIC : Introduction to Faults UNIT 2: Modeling and Simulation Module 1 : Logical faults due to physical faults.
In The Name of Allah Fault attacks on ECC
TOPIC : Introduction to Faults UNIT 2: Modeling and Simulation Module 1 : Logical faults due to physical faults.
Database Laboratory Regular Seminar TaeHoon Kim Article.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Fail-Stop Processors UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau One paper: Byzantine.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Lecture 11: Storage Systems Disk, RAID, Dependability Kai Bu
Security Handshake Pitfalls. Client Server Hello (K)
Overview on Hardware Security
New Cache Designs for Thwarting Cache-based Side Channel Attacks
Kiran Subramanyam Password Cracking 1.
ACE – Auditing Control Environment
Presentation transcript:

Torturing OpenSSL Todd Austin University of Michigan with Andrea Pellegrini, William Arthur and Valeria Bertacco (Based on Valeria’s BlackHat 2012 Presentation)

2 Understanding Side Channel Attacks  Systems leak info about internal computation E.g., safes can be cracked by carefully listening to the tumblers  Clever attackers can utilize leaked info to grain secrets Generally not directly Use statistical methods over time  Attacks implementation, rather than algorithm

3 Fault-Based Attack of RSA Correct behavior: Server challenge: s = m d mod n Client verifies: m = s e mod n Faulty Server: ŝ != m d mod n Public Key (e,n) Private Key (d,n) m s Public Key (e,n) Private Key (d,n) m ŝ m Tactical advantage: We have years to implement this attack!

4 Injecting Faults in RSA Authentication Making hardware fail: Lower voltage causes signals to slow down, thus missing the deadline imposed by the system clock High temperatures increase signal propagation delays  Over-clocking shortens the allowed time for traversing the logic cloud  Charged particles cause internal signals to change value, causing errors

5 Wanted: Single-Bit Errors in Multiplication A corrupted signature leaks data if only one multiplication is corrupted by a single bit flip Voltage [V] Single bit faults (%) Faulty products (%) Single bit faults Faulty multiplications

6 Implementing the Fault-Based Attack Fault-Based Attack of RSA Attackers 1. Subject server to potential single-bit faults in multiplications 2. Repeatedly authenticate to collect faulty RSA signatures 3. Offline, analyze RSA signatures to extract private key bits 4. Repeat steps 2 & 3 until entire RSA private key identified

7 Extracting the Key with Offline Analysis  The attacker collects the faulty signatures  The private key is recovered one window at the time  The attacker checks its guess against the collected faulty signatures Public Key ŝŝŝŝ Private Key m ŝŝŝŝ d=XXXXd3d3 d2d2 d1d1 d0d0

8 Computing (s=m d mod n) in OpenSSL 1101 s=1 for each window: for each bit in window: //4times s = (s * s) mod n s = (s * mˆd[window]) mod n return s d=214= 0110 s=1 s= m 1101 s= (∙∙∙(m 1101 ) 2 ) 2 ) 2 ) 2 s= (∙∙∙(m 1101 ) 2 ) 2 ) 2 ) 2 )m 0110 window 1window 2

9 Faulty Signature: ŝ!=m d mod n s=1 for each window: for each bit in window: //4times s = (s * s) mod n s = (s * mˆd[window]) mod n return s s=1 s= m 1101 ŝ = (∙∙∙(m 1101 ) 2 ) 2 ) ± 2 f ) 2 ) 2 ŝ = (∙∙∙(m 1101 ) 2 ) 2 ) ± 2 f ) 2 ) 2 )m d=214= 0110 window 1window 2

10 Reconstructing the Signature The private key is recovered one window at the time, guessing where and when the fault hits ŝ = (∙∙∙(m d k ) 64 )m d k-1 ) 2 ) 2 ) 2 ±2 f ) 2 ) 2 ) 2 ) m d k-2 ) 64 …m d 0 Already known Value? Which multiplication? Which bit? d=XXXdkdk d k-1 … For each window value to be guessed and signature we test: 16 possible key values 2 possible error values (0→1 or 1→0) 4 squaring iterations

11 Implementing Offline Analysis  In practice 40 bit positions typically affected by faults → the computation time is reduced to 2.5 seconds  Analyzing 8,800 corrupted signatures requires 1 CPU- year – only ~1,000 are useful  Signatures can be checked in parallel  Performed the analysis with 81 workstations ŝŝŝŝŝŝ

12 Fault-Based Attack of Leon3 SPARC RSA 1024-bit private key 8,800 corrupted signatures collected in 10 hours Distributed application with 81 machines for offline analysis Private key recovered in 100 hours

13 Exploring Temperature-Induced Faults

14 Number of Key Bits Revealed (128-bit RSA) Surprising insight: Attack is easier to implement with more sophisticated cooling systems

15 Conclusions  Transient faults can leak vital private key data  Fault-based attack devised for OpenSSL 0.9.8i ’s Fixed Window Exponentiation algorithm  Attack demonstrated on a complete physical Leon3 SPARC system  Software fix using “blind”ing available in OpenSSL to protect against timing attacks  Published: “Fault-based Attack of RSA Authentication” - DATE 2010  Presented: BlackHat 2012