Closed Bug 1281548 Opened 8 years ago Closed 4 years ago

[Meta] ECC side-channels in P384 and P521

Categories

(NSS :: Libraries, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wladd, Unassigned)

References

Details

(Keywords: meta, sec-moderate)

We have many places where the ECC code leaks side channel information. This starts with none of the field arithmetic implementations being constant time. Furthermore, our multiplication algorithm doesn't have a regular pattern of operations or memory accesses, due to the use of wNAF. All of these are potentially exploitable, particularly in virtualized environments.

There are several approaches to fixing this:
-Introduce blinding and take the opportunity to fix some of the performance problems to avoid performance regressions: Modified Jacobian coordinates are not faster then Jacobian coordinates (13M vs 11M addition, both 8M doubling), and we can remove excessive inversions.
-Use specialized per-curve routines: for the very popular P256 curve such routines exist in C for 64 bit machines and assembler for recent Intel chips (see Bug 1073990, or the code in Go's cryptographic library), and for Curve25519 a plethora of possible implementations exist. Other curves will have to rely on blinding.
Further investigation shows that we are using ecp_256_32's constant time routines on all platforms, as changed in Bug 831006 for NIST P256 curve. The other 24 curves we enable are still vulnerable. Luckily P256 is almost ubiquitous in TLS connections, and Firefox only offers P384 and P521 in addition to P256.
We're investigating possible changes to implementations for P384 and P521. Keeping this as meta bug for changes to those two curves.
Priority: -- → P2
Summary: ECC side-channel leaks → [Meta] ECC side-channels in P384 and P521
Depends on: 1284941
Depends on: 1287216
QA Contact: jjones

NSS 3.55 replaced both P384 and P521 with verifiable implementations from Fiat-Crypto and ECCKiila. I'm closing this bug as code in question is no longer used in NSS, and to the best of our knowledge no such issues are present in the new code.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Group: crypto-core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.