Side-channel attacks on RSA

Note: These lecture notes were slightly modified from the ones posted on the 6.858 course website from 2014.

Side channel attacks

Example setting: a server (e.g., Apache) has an RSA private key.

Many information leaks have been looked at:

Side-channel attacks don't have to be crypto-related.

Adversary can analyze information leaks, use it to reconstruct private key.

What's the "Remote timing attacks are practical" paper's contribution? Ref

RSA: high level plan

RSA is tricky to use "securely" -- be careful if using RSA directly!

How to implement RSA?

Optimization 1: Chinese Remainder Theorem (CRT).

Optimization 2: Repeated squaring and Sliding windows.

Optimization 3: Montgomery representation.

Optimization 4: Efficient multiplication.

How does SSL use RSA?

Figure of decryption pipeline on the server:

                  * CRT             * To Montgomery             * Modular exp
        --> * c_0 = c mod q  --> * c'_0 = c_0*R mod q  --> * m'_0 = (c'_0)^d mod q
       /
      /                                            * Use sliding window for bits
     /                                               * of the exponent d

    c                                              * Karatsuba if c'_0 and q have
                                                     * same number of 32-bit parts
     \
      \                                            * Extra reductions proportional
       \                                             * to ((c'_0)^z mod q) / 2R;
        -->  ...                                     * z comes from sliding window

Setup for the attack described in Brumley's paper

Attack from Brumley's paper

How to avoid these attacks?

How worried should we be about these attacks?

Other types of timing attacks

References