\[\begin{aligned} \textrm{Secret info} & : \textrm{private key } \textcolor{red}{d}; \textrm{nonce } \textcolor{red}{k}~(0 < d, k < n) \\ \textrm{Public info} & : \textrm{curve } E(\mathbb{F}_q); \textrm{base point } G \in E(\mathbb{F}_q), |G|=n; \\ & ~ \textrm{public key } [d]G; \textrm{hash function } h(\cdot) \\ \textrm{Message } & : m \\ \textrm{Signature } & : (r, s) \end{aligned} \]
\[\begin{aligned} r & = (\colorbox{blue}{[k] G})_x \mod n \\ s & = (h(m) + d r) k^{-1} \mod n \end{aligned} \]
\[\begin{aligned} r & = ([\textcolor{red}{k}] G)_x \mod n \\ s & = (h(m) + \textcolor{red}{d} r) \textcolor{red}{k}^{-1} \mod n \end{aligned} \] \[ \textrm{Knowledge of nonce } k \implies \textrm{Knowledge of private key } d \\ \]
\[ d = (s k - h(m)) r^{-1} \mod n \]
|
\[ \textrm{Example: } k = 25 = (11001)_2, G = 3 \] \[ \textrm{Start with } res = 0 \\ ~\\ \begin{matrix} (i) & & 4 & 3 & 2 & 1 & 0 \\ (k_i) & & 1 & 1 & 0 & 0 & 1 \\ (res) & 0 & 3 & 9 & 18 & 36 & \color{red}{75} \end{matrix}\] |
Point addition and doubling take different CPU cycles
In affine coordinates (one representation of points) \[\begin{aligned} P + Q & : I + 2M + S \\ [2] P = P + P & : I + 2M + 2S \end{aligned}\]
|
Speeding the Pollard and elliptic curve methods of factorization by Peter L. Montgomery, 1987. (Full paper)
|
\[ \textrm{Example: } k = 25 = (11001)_2, G = 3 \] \[ \textrm{Start with } R0 = 0, R1 = 3 \\ ~\\ \begin{matrix} (i) & & 4 & 3 & 2 & 1 & 0 \\ (k_i) & & 1 & 1 & 0 & 0 & 1 \\ (R0) & 0 & 3 & 9 & 18 & 36 & \color{red}{75} \\ (R1) & 3 & 6 & 12 & 21 & 39 & 78 \end{matrix}\] |
References:
Remote Timing
Attacks Are Still Practical by Billy B. Brumley and Nicola
Tuveri, 2011
Lattice
Attacks on Digital Signature Schemes by Nick A.
Howgrave-Graham and Nigel P. Smart, 2001
References:
Recovering OpenSSL
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack
by Yuval Yarom and Naomi Benger, 2014
Cache
Missing For Fun and Profit by Colin Percival, 2005