Claude Uncovers Origins of ECDSA Curve Seeds

·

Researchers at Anthropic have finally solved the decades-old mystery surrounding the origins of one of the most widely used cryptographic standards, Elliptic Curve Digital Signature Algorithm (ECDSA). Claude, an internal research model, discovered that the seeds for five NIST curves and four ANSI X9.62 standard curves were generated using a simple pseudorandom number generator initialized by Unix timestamps.

The ECDSA curve is one of the most widely used cryptographic standards in the world, adopted by NIST in 2000 as part of the FIPS 186-2 Digital Signature Standard. However, for years, researchers have been suspicious about the origins of the seeds provided by the National Security Agency (NSA) without any explanation or justification.

Neal Koblitz and Alfred Menezes wrote an excellent summary on this controversy in their paper ‘A Riddle Wrapped in an Enigma’, which discusses the history and concerns around the seed values. The mystery led to an amateur investigation into the origin of the seeds, with a bounty offered for anyone who could find them.

Jerry Solinas, a longtime NSA employee, revealed that he generated the seeds using a hash of a humorous passphrase: ‘Give Bob and Jerry a raise’ or something similar. However, unfortunately, Jerry died in 2023, leaving open the question of how these seeds were originally derived.

A curious Anthropic employee asked Claude to figure out how those seeds were generated without pointing at any clues. In under half an hour, Claude discovered that none of the seeds were the result of a hash algorithm but rather the output of the C library’s lrand48 random-number generator seeded with a Unix timestamp!

The algorithm used would sample bytes from the random number generator initialized by a Unix timestamp (t) for some number of iterations (n). Each iteration would draw 20 bytes as a candidate seed. For example, P-256 required 1842 iterations to output the standardized seed.

This is not a cryptographic break or new attack on ECDSA curves but rather makes us more confident that the curves were chosen without any backdoors or intentional weaknesses. The seeds were generated in a very simple way: a common pseudorandom number generator initialized from the clock, which anyone can now reproduce.

Claude’s internal thinking at the time was to verify if it was indeed real-world and not some simulated/test environment. He checked that the top bits clear for all 20 words of four seeds, with probability 1/5810 by chance. This confirmed that it was a real discovery.

However, another question arises: how were these base points generated? While checking the seeds, Claude also found where some of the base points came from. The base points of six curves generated in May 1997 come from the random number generator in FreeLIP, Arjen Lenstra’s long-integer arithmetic package.

The recipe for generating the base points is simple: using a Unix timestamp as an initialization seed and then running it through the lrand48() function with some specific parameters. Claude found that this method generated the correct base points for six curves but not for others.

Not every 20-byte candidate seed could generate a viable curve, and we observed that some potentially viable curves were skipped. For P-256, the published seed is candidate 1842, but candidate 876 of the same run also gives a prime-order curve with parameters chosen in the same way as on the published curve.

The number of skipped candidates is small, so it’s not plausible to assume weakened curves were selected. However, it remains possible that these curves were selected to have specific properties by searching over timestamps to the random number generator. Nothing shows how many runs there were.

There is also one seed we were unable to recover: B-163 fits nothing Claude has tried and remains unexplained. Finally, we don’t know how the base points for P-224, P-256, P-384, and P-521 were generated or those of the NIST binary curves.

The $36,864 bounty will be donated to the Internet Security Research Group in recognition of this achievement. This work was conducted at Anthropic by a team led by John Wood, Henry de Valence, Ava Howell, Zack Voase, Lucy Sweet, Amir Omidi, Paul Crowley, Iain McGinniss, Nicholas Carlini, and Steve Weis.

We would like to posthumously recognize Jerry Solinas for his good humor in being labeled an ‘evil Internet meme’ and the ‘Yo La Tengo of NSA bogeymen’. Thanks also go out to Filippo Valsorda for organizing the NIST Elliptic Curves Seeds Bounty.

Claude’s discovery is a significant milestone in cryptography, providing more confidence that ECDSA curves were chosen without any backdoors or intentional weaknesses. The seeds and base points generated using Unix timestamps are now reproducible by anyone.

The research team at Anthropic has also been working on improving quantum circuits for practical applications. Claude was given plain-language specifications for eight quantum circuits along with an automated evaluator to check and score its designs, leading to improved circuits in some cases by an order of magnitude or more.

This achievement brings us closer than previously anticipated to the development of practical quantum computers. The team’s work on improving quantum circuits is a significant contribution to this field.

Discussion

No messages yet. Be the first to write.