r/cryptography • • Oct 16 '26

ECDSA RNG decoding news

https://www.anthropic.com/research/ecdsa-curve-origins

To try to explain this: basically, there are P256-style encryption curves, and they’re generated by giving them a seed. The government published the seed that it used to generate the P256 encryption curve that’s used for web traffic. Here’s the problem: some P256-style curves are flawed and can be hacked, and people were worried that the seed the government used to generate the P256 curve that everyone uses on the Internet produced one of those hackable curves. They thought that the government had custom designed a seed to generate a weak curve so that it could backdoor into it. What Claude did was show that all the government did was run a common random number generator (lrand48) and try 1,842 seeds from it until it got one that gave a non-flawed curve. So that puts to bed any idea that the government did some evil scientist stuff. There is one weird thing, though, which is that they got their first non-flawed curve on try 876, and we don’t know why they did another 966, but anyways, this is evidence on the side that the government didn’t do something weird.

How it did this is honestly mind boggling. The public P256 seed is twenty successive numbers from that random number generator, each of them divided by about 8.4 million, converted into hexadecimal, and then placed in sequential order, so the seed was 20 randomly generated numbers in sequential order. How Claude figured out that this was the random number generator used, that they generated 20 numbers, divided them by 8.4 million and placed them in sequential order to create the seed, and that the random number generator, which had to get its own seed to start generating random numbers, was given the date and time when it was run as its seed, is honestly really impressive. Basically, we think that it tried a bunch of smart possibilities until one of them indisputably worked, but it’s kind of, I don’t know, it’s impressive and a little scary.

Meme of this: https://www.reddit.com/r/ArtificialInteligence/comments/1x7v0r8/ai_vs_humans_ecdsa_rng_decoding_news/#lightbox

42 Upvotes

13 comments sorted by

14

u/bascule Oct 17 '26

The title of the article is a bit confusing as it’s talking about the NIST P-curves which while commonly used for ECDSA exist independent of it and ECDSA can be used with non-NIST curves, i.e. the discovery has nothing to do with ECDSA.

That said, this does seem to at least help resolve speculations about what the seeds actually are. It’s not exactly NUMS to use a Unix timestamp as a “BADA55” attack is still likely possible if you examine a large enough window of timestamps, but it is at least more innocuous than what some people might have suspected.

I was really hoping it was a hash of an English phrase because that’d be fun.

5

u/DavidovicZuki Oct 17 '26 • Mindblown

you're the perfect amount of paranoid for computer security lol

5

u/bascule Oct 17 '26

To be clear I do not think there are any issues with the NIST P-curves and this looks innocuous enough.

If one of the curve parameters were actually poisoned, it seems like we should’ve found it by now. I think it’s unlikely the NSA knew something about elliptic curves in 1997 that the 21st century academic cryptography community still does not

4

u/zozoped Oct 17 '26

Im not sure this is really a proof but it is plausible deniability

3

u/CryptoArb444 Oct 17 '26

As a layman who is trying to pay more attention to cryptography and cybersecurity in the age of AI:

Does this have implications for the security of ECDSA or elliptic curve cryptography in general?

2

u/JivanP Oct 17 '26

No. What's being shown here is that the widespread suspicion of one of the parameters used in a NIST-standardised version of ECDSA, where that parameter was approved by the NSA, is likely unwarranted, i.e. that it has nothing up its sleeves.

It's not a complete proof that there's no reason to suspect any foul play by NIST or the NSA, as they could have just randomly generated numbers until they got ones with some property that's desirable to them from an adversarial perspective, but this discovery certainly gives the community a much better assurance that there's likely nothing wrong.

The global cryptography community has already been using other elliptic curves (not the NIST-standardised curves) for ECC/ECDSA in cases where the lack of concrete proof that there's no foul play by NIST and the NSA is not acceptable. For example, Bitcoin uses the secp256k1 curve.

4

u/[deleted] Oct 17 '26

[removed] — view removed comment

6

u/DavidovicZuki Oct 17 '26 edited Oct 17 '26

From what I understand, lrand48 always makes its first number the same way: the seed times 65,536 plus 13,070. And lrand48 is simple enough that you can run it backwards. So Claude ran it backwards until it hit a number that, if you subtract 13,070 and divide by 65,536, you get a timestamp for August 16, 1997. That made sense and was consistent with everything else. Still crazy it put all that together in like 30 minutes LOL

2

u/Natanael_L Oct 17 '26

Similar methods have been done before to recover similar values, what allowed Claude to succeed was the ability to automate a much wider search of many more permutations than humans would bother with. When there's so many different ways the numbers could be processed, you get a ton of branches of possibilities to exhaust and it's complex to automate by writing out scripts covering it all by hand, but Claude doesn't get tired.

So not entirely novel, but the ability to automate complex work is useful

In particular being able to describe what kind of permutations you want tested and have it be able to search for edge cases and test things outside what you asked for, if it seems relevant, can be useful

2

u/Natanael_L Oct 17 '26

They must have been looking for one more property that hasn't been disclosed and which Claude didn't find

2

u/Honest-Finish3596 Oct 18 '26

^This comment is generated by an LLM bot, you can tell by the lowercase and useage of the stock phrase "is wild though" in all of their previous comments, you see this all over this website when they're instructed to "make a casual low-key comment."

Probably it just scans for posts mentioning AI companies as part of it's "creating accounts to resell" routine. Everybody was not "so sure there's a spooky backdoor"!