Goldilocks and Elliptic Curve Cryptography

Until very recently, it was widely believed that elliptic curve cryptography (ECC) over a field with about 2n elements provided n/2 bits of security, i.e. would be as hard to break as AES with an n/2 bit key. Now there are rumors that the security level is actually n/3 bits.

Most elliptic curves currently used in cryptography work over fields with very nearly 2256 elements, so they have 256-bit keys, and provide 128 bits of security, or maybe only 85 bits of security. It is far beyond any foreseeable resources to break 128-bit security, but 85-bit security could be broken at great expense. See the cost calculations here.

The NSA is recommending everyone move from 256-bit curves such as Curve25519 and secp256k1 to the 384-bit curve P-384 that they designed. If the rumors of a breakthrough are true, a 384-bit curve would provide as much security as a 256-bit curve used to provide.

Not everyone is happy with the thought of moving to P-384. One reason is that the NSA designed the curve, and could have put in a backdoor. These concerns were reduced when Anthropic researchers were able to reverse engineer how some of the curve’s parameters were chosen. More on that here. But there are still lingering concerns that the curve has a weakness that only the NSA knows about.

Another concern is that P-384 is not a safe curve. That is, there are some aspects of the curve that make it delicate to implement securely [1].

So if not P-384, then what? Many are suggesting a curve called Ed448.

Ed448

If bigger elliptic curves are better, why not move to an even bigger curve than P-384? The curve Ed448 has 448-bit keys and provides even more security than P-384.

In general, larger keys lead to slower implementations. However, because ECC can be implemented more efficiently over Edwards curves than over other curves, encryption using the Edwards curve Ed448 is faster than encryption using P-384. And unlike P-384, Ed448 is a Safe Curve.

The curve Ed448 is approved by NIST in SP 800-186 and FIPS 186-5.

Goldilocks

So where does “Goldilocks” in the title of this post come from? Ed448 is an elliptic curve over the integers modulo the prime

p = 2448 − 2224 − 1.

The designer of the curve, Mike Hamburg, said he calls this the Goldilocks prime “because its form defines the golden ratio φ = 2224.” That is, the prime has the form of the polynomial whose root defines the golden ratio

φ² − φ − 1.

Instead of setting this quadratic polynomial to zero and solving for φ, insert φ = 2224.

Hamburg also argues that Ed448 is just the right size, alluding to the story of Goldilocks and the Three Bears.

More details

If you’d like to learn a little more about Ed448, you could read my post on the curve. If you’d like to learn a lot more about Ed448, you could read Hamburg’s paper.

 

[1] Implementation flaws are a far greater security risk than mathematical weaknesses. For example, RSA with recommended key sizes has remained unbreakable over the years, as far as we know, and yet it has been broken many times due to weak implementations.

Leave a Reply

Your email address will not be published. Required fields are marked *