rsa key extraction via low-bandwidth acoustic cryptanalysis

24
RSA Key Extraction via Low- Bandwidth Acoustic Cryptanalysis Daniel Genkin , Adi Shamir, Eran Tromer

Upload: phyre

Post on 16-Feb-2016

65 views

Category:

Documents


0 download

DESCRIPTION

RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis. Daniel Genkin , Adi Shamir, Eran Tromer. Mathematical Attacks. Crypto Algorithm. Input. Output. Key. Goal: recover the key given access to the inputs and outputs . Side Channel Attacks. Radiation. Heat. EM. Sound. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Daniel Genkin, Adi Shamir, Eran Tromer

Page 2: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Mathematical Attacks

Input OutputCrypto Algorithm

Key

Goal: recover the key given access to the inputs and outputs

Page 3: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Side Channel Attacks

PowerVibrati

onTiming

SoundHeatEM

Input Output

Radiation

Crypto Algorithm

KeyBad Inputs Errors

Goal: recover the key given access to the inputs, outputs and measurementsGoal: recover the key given access to the inputs and outputs

Crypto Device

Key

Page 4: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

ENGULF [Peter Wright, pycatcher, p. 84]

In 1956, a couple of Post Office engineers fixed a phone at the Egyptian embassy in London.

Page 5: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

ENGULF (cont.)

“The combined MI5/GCHQ operation enabled us to read the Egyptian ciphers in the London Embassy throughout the Suez Crisis.”

Page 6: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Acoustic cryptanalysis on modern CPUs

Page 7: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Distinguishing various CPU operations

Page 8: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Distinguishing various code lengths

loops in different lengths of ADD instructions

Page 9: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

RSA decryption

long operations that depend on the leakage of either will break security.

Page 10: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

RSA key distinguishability

and here is the sound of the keys (after signal processing)

Page 11: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Modular exponentiation

m=𝑐𝑑𝑛⋯𝑑𝑖𝑚𝑜𝑑𝑞m=𝑐𝑑𝑛⋯𝑑𝑖0𝑚𝑜𝑑𝑞

𝑡=𝑐𝑑𝑛⋯𝑑𝑖1𝑚𝑜𝑑𝑞m=𝑐𝑑𝑛⋯𝑑𝑖− 1𝑚𝑜𝑑𝑞

This is a side channel countermeasure meant to protect

Page 12: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Extracting (simplified)

𝑐 𝑖=  𝑞2048⋯𝑞𝑖+101⋯ 1

If then , thus . That is, has special structure.

If then , thus .That is, is random looking.

and we now multiply by causing the bit-dependent leakage.

Assume we know and decrypt

Page 13: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Extracting

𝑐 𝑖=  𝑞2048⋯𝑞𝑖+101⋯ 1+𝑛

If then , thus . That is, has special structure.

If then, thus .That is, is random looking.

and we now multiply by causing the bit-dependent leakage.

Assume we know and decrypt

Page 14: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Extracting (problem)

Single multiplication is way to fast for us to measure

Assume we know and decrypt

Multiplication is repeated 2048 times (0.5 sec of data)

Page 15: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Acoustic leakage of key bits

Page 16: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

ResultsKey extraction is possible up to 4 meters away using

a parabolic microphone

Page 17: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

ResultsKey extraction is possible up to 1 meter away without

a parabolic microphone

Page 18: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

ResultsKey extraction is possible up to 30cm away using a

smartphone

Page 19: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Karatsuba multiplicationBased on the following identity for multiplication and runs in time

If then has many 1-valued or 0-valued bits causing the result to have many 0-valued bits.

If then is random-looking and so is the result.

Page 20: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

The recursion tree

Number of 0-valued bits in the second operand is depends on the value of

Page 21: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Basic multiplication

If the algorithm does nothing!

Repeated for a total of 8 times in this call and for a total of up to ~172,000 times!, allowing for the leakage to be detectable using low bandwidth means (such as sound).

Page 22: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

1. Play loud music while decrypting (or other kind of noise)

2. Parallel software load

Countermeasures --- bad ideas!

Page 23: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Given a ciphertext :1. Generate a random number and compute 2. Decrypt and obtain 3. Output

Works since thus:

Countermeasures (ciphertext randomization)

Page 24: RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis

Thank you!(questions?)

:// . . . . /~http www cs tau ac il/tromer acoustic