Add blinding to an ECDSA signature
authorMatt Caswell <matt@openssl.org>
Fri, 25 May 2018 11:10:13 +0000 (12:10 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 13 Jun 2018 15:23:54 +0000 (16:23 +0100)
commit0c27d793745c7837b13646302b6890a556b7017a
treecc9f9f28a265835256893ac3c0ba92ea4bfc4432
parentcd396d2a4767f186cc12e8c111599caeb35893bc
Add blinding to an ECDSA signature

Keegan Ryan (NCC Group) has demonstrated a side channel attack on an
ECDSA signature operation. During signing the signer calculates:

s:= k^-1 * (m + r * priv_key) mod order

The addition operation above provides a sufficient signal for a
flush+reload attack to derive the private key given sufficient signature
operations.

As a mitigation (based on a suggestion from Keegan) we add blinding to
the operation so that:

s := k^-1 * blind^-1 (blind * m + blind * r * priv_key) mod order

Since this attack is a localhost side channel only no CVE is assigned.

Reviewed-by: Rich Salz <rsalz@openssl.org>
CHANGES
crypto/ec/ecdsa_ossl.c