Cryptographic Timing Attacks

Slides:



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

Cryptography and Network Security
Abdullah Sheneamer CS591-F2010 Project of semester Presentation University of Colorado, Colorado Springs Dr. Edward RSA Problem and Inside PK Cryptography.
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.
Remote Timing Attacks -Rashmi Kukanur. Agenda  Timing Attacks  Case Study : –David Brumley –Dan Boneh  Defenses.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Cryptography and Network Security Chapter 9. Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively.
Public Key Cryptography and the RSA Algorithm
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Side-Channel Attack: timing attack Hiroki Morimoto.
Cryptography and Network Security Chapter 9 5th Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 9 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Dan Boneh Public Key Encryption from trapdoor permutations RSA in practice Online Cryptography Course Dan Boneh.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
RSA Ramki Thurimella.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
9th IMA Conference on Cryptography & Coding Dec 2003 More Detail for a Combined Timing and Power Attack against Implementations of RSA Werner Schindler.
CRYPTOGRAPHY How does it impact cyber security and why you need to know more?
Chapter 21 Public-Key Cryptography and Message Authentication.
Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both sender and receiver  if this key is disclosed.
Public Key Cryptography and RSA” Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 11/9/2009 INCS 741: Cryptography 11/9/20091Dr. Monther.
Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both sender and receiver  if this key is disclosed.
Public-Key Encryption
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Number Theory and Advanced Cryptography 5. Cryptanalysis of RSA Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
Presented by Katherine Heller COSC 4765 University of Wyoming April 26, 2011 Image source: PC Dynamics, Inc.
Some Number Theory Modulo Operation: Question: What is 12 mod 9?
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Slide 1 Vitaly Shmatikov CS 380S Timing Attacks. slide 2 Reading uKocher. “Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems”
Cryptography and Network Security Public Key Cryptography and RSA.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Fall 2002CS 395: Computer Security1 Chapter 9: Public Key Cryptography.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Faster Implementation of Modular Exponentiation in JavaScript
Remote Timing Attacks are Practical David Brumley Dan Boneh [Modified by Somesh.
Cryptography and Network Security Chapter 9 Fourth Edition by William Stallings.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
0x1A Great Papers in Computer Security Vitaly Shmatikov CS 380S
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Cryptography and Network Security Chapter 9 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
@Yuan Xue CS 285 Network Security Public-Key Cryptography Yuan Xue Fall 2012.
Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption.
Public-Key Cryptography ElGamal Public-Key Crypto-System
Public Key Cryptography
Attacks on Public Key Encryption Algorithms
Visit for more Learning Resources
Network Security Design Fundamentals Lecture-13
RSA Slides by Kent Seamons and Tim van der Horst
Public Key Encryption and Digital Signatures
Public Key Cryptosystems - RSA
The RSA Algorithm JooSeok Song Tue.
Private-Key Cryptography
Efficient CRT-Based RSA Cryptosystems
ICS 353: Design and Analysis of Algorithms
The RSA Algorithm JooSeok Song Tue.
Homework #4 Solutions Brian A. LaMacchia
NET 311 Information Security
Cryptology Design Fundamentals
Cryptology Design Fundamentals
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9
Introduction to Cryptography
Network Security Design Fundamentals Lecture-13
Presentation transcript:

Cryptographic Timing Attacks Brian Honan CS498 Senior Seminar Dr. Yeh April 12, 2007

What is a timing attack? Timing attacks enable an attacker to extract secrets maintained in a security system by observing the time it takes the system to respond to various queries. -David Brumley (Stanford University) Timing attacks can be classified as both a covert channel and side channel attack scheme. Covert channel: parasitic leaking (or signaling) of information to another process. Side channel: exploiting physical attribs, power consumption, timing, electromagnetic pulses.

Key people in timing attack theory Paul Kocher – designed timing attacks for RSA, DSA and Diffie-Hellman. One of the original architects of SSL. Currently, he is the founder and chief scientist of Cryptography Research Inc. David Brumley – Doctoral student at Carnegie Mellon. Published numerous papers with Dan Boneh while studying for a MSCS from Stanford. Dan Boneh – professor at Stanford, developed a timing attack for SSL. Werner Schindler – developed timing attack for RSA with CRT. Alejandro Hevia – discovered vulnerability in DES crypto system using timing attacks. Jean-Pierre Seifert – demonstrated timing attack on RSA signatures.

Other Attacks on RSA As studied in Crypto I and II… Fermat’s Attack (primes are close together) Pollard’s Attack (one prime is small) Initial Segment Attack (one prime has many 0’s) Directory Attack (requires many public keys) Exhaustive search (direct modulus factoring)

Timing attacks and RSA wait a sec, first some math… Before we get into timing attacks against RSA we need to take a look at the mathematical algorithms used by RSA cryptosystems. This will give us a good understanding of where to exploit the RSA schema.

Square and Multiply Algorithm This algorithm dates back to 200BC! RSA decryption: ciphertextprivate key mod modulus Compute: 420 mod 35 Private key = 2010 = 101002 41 = (40)2 * 41 = 1 * 4 = 4 mod 35 42 = (41)2 * 40 = 42 * 1 = 16 mod 35 45 = (42)2 * 41 = 162 * 4 = 1024 = 9 mod 35 410 = (45)2 * 40 = 92 * 1 = 81 = 11 mod 35 420 = (410)2 * 40 = 112 * 1 = 121 = 16 mod 35

Montgomery’s Algorithm Extensively used by RSA modular exponentiation. This algorithm is beyond the scope of this presentation! - I would have to provide tylenol But I wanted to mention it since there are timing attacks against this algorithm as well. The basic idea is that the algorithm selects a larger modulus (based on HW limitations) for square and multiply algorithms to reduce the number of steps. The attack exploits the fact that the algorithm also have an conditional IF statement to compute an ‘extra reduction’. This step requires additional time and is based on the binary representation of the modulus (similar to square and multiply).

Timing Attack requirements… A timing attack is a ‘chosen input’ attack. So there are a few requirements: Access to the hardware device. Ability to measure calculation time – precisely. Attacker knows the security system (RSA, etc…) Attacker knows the modulus. Running times are reproducible.

Now the main idea… I wrote this and had to re-read it 3 times to understand it. If the computation takes a predictable interval to compute based on a set of inputs, and we know the steps of the algorithm, we can conversely use this information to discover other inputs by observing the time interval in a given computation.

Timing attack prevention (1/2) We have seen attacks against poorly selected criteria. - this is the user’s responsibility… A timing attack can determine the two co-prime factors of a 1024-bit RSA modulus in 300-570 time measurements. All attacks were successful. – Werner Schlinder So how can we stop a timing attack? - the technique is called ‘blinding’

Timing attack prevention (2/2) Blinding: provide a service for a client without knowing the ‘real’ input or output. Blinding techniques: 1. instead of doing nothing when not computing the extra reduction, perform a dummy computation. 2. Pad the cipher with random data, then remove the data after the computation. E(x) = xre mod n  f(x) = E(x)d mod n  D(x) = f(x)e/r mod n r = random number

Any Questions? Thank you Presentation References: Fast Exponentiation in Practice. M.B. Tandrup, M.H. Jensen, R.N. Andersen, T.F. Hansen. Dec. 6, 2004 D. Brumley, D. Boneh: Remote Timing Attacks are Practical. In: Proceedings of the 12th Usenix Security P.C. Kocher. Timing Attacks on Implementations of DH, RSA, DSS and other systems. Proceedings of Cryptography 1996. Springer, 1996. JP. Seifert. On Authenticated Computing and RSA-Based Authentication. ACM Press, 2005. Wikipedia – “Blinding Technique” More available in Report… Thank you