I’m a complete noob, “Baby Step Giant Step algorithm” is the best algorithm the crack the public key starting by the easiest values first? Wikipedia is a bit unclear.
Would it be feasible to run a crawler that connects to all HTTPS ips on the internet and tries to bruteforce the key with a time budget of a couple of seconds?
Alternatively make browsers brute force keys when connecting via HTTPs, maybe distributing the work by checking a registry of keys that were already tried by some other user with the same browser?
Nah, that's not really the case and not what I wanted to imply.
Computationally, "bruteforce" always wins for a larger number of keys, as you just have to generate all keys once and do a binary lookup in a list. (You can, however, also precompute parts of BSGS.) It's more a tradeoff between how large your blocklist is versus how many keys you want to cover.
Right now, I'm doing keys with 8 bit values via "bruteforce" (aka blocklist). I may switch to BSGS and do 16 bit. Going to 32 bit would, as far as my initial tests go, be too slow. At least for badkeys, where I want to be able to scan a large number of keys fast.
"They are publicly available and signed by trusted root certificates (the certificates are logged in CT)"
This is exactly why google's paranoidcrypto tool can capture them via CCADB/CT. Because only private,untrusted certificate authorities remain outside of CT.
There's a chance some dev did this as a joke of sorts (referring to the comic) and somehow it landed in prod. So it might not even be a coincidence. But we might never find out.
Yeah, in this particular case I agree. Although "some dev did this as a joke of sorts and somehow it landed in prod" is still true, some years ago I added a get_pseudo_random_number function that returns 4 to at least one application currently running in production, I'm sure I'm not alone :)
I can't pretend to understand all of this, but can anyone enlighten me as to what the motivation would be to us such as low number as the ECDSA private key? Was it just a cock-up or is there some benefit in terms of speed etc?
Reminded me of a story I read long ago, where inventor of ping was "jealous" (jokingly) that he didn't think of traceroute.
I’m a complete noob, “Baby Step Giant Step algorithm” is the best algorithm the crack the public key starting by the easiest values first? Wikipedia is a bit unclear.
Would it be feasible to run a crawler that connects to all HTTPS ips on the internet and tries to bruteforce the key with a time budget of a couple of seconds?
Alternatively make browsers brute force keys when connecting via HTTPs, maybe distributing the work by checking a registry of keys that were already tried by some other user with the same browser?
Per the article, the Baby Step Giant Step algorithm is more efficient than bruteforce for small keys.
Nah, that's not really the case and not what I wanted to imply.
Computationally, "bruteforce" always wins for a larger number of keys, as you just have to generate all keys once and do a binary lookup in a list. (You can, however, also precompute parts of BSGS.) It's more a tradeoff between how large your blocklist is versus how many keys you want to cover.
Right now, I'm doing keys with 8 bit values via "bruteforce" (aka blocklist). I may switch to BSGS and do 16 bit. Going to 32 bit would, as far as my initial tests go, be too slow. At least for badkeys, where I want to be able to scan a large number of keys fast.
Ah, what I meant to say was comparing bruteforce-without-lookup to BSGS-with-precomputation - which I suppose was comparing apples to oranges
Certificate Transparency makes the crawling unnecessary unless you want to look for keys that are not issued by standard CAs that browsers trust.
Intermediate certificates are not in the browsers’ trust stores.
"They are publicly available and signed by trusted root certificates (the certificates are logged in CT)" This is exactly why google's paranoidcrypto tool can capture them via CCADB/CT. Because only private,untrusted certificate authorities remain outside of CT.
They're in CCADB, so that's an easy source.
Still blows my mind how close to the bone this xkcd got too: https://www.xkcd.com/221/
There's a chance some dev did this as a joke of sorts (referring to the comic) and somehow it landed in prod. So it might not even be a coincidence. But we might never find out.
There were 8 affected keys and only one was d=4, all were single-byte values. Very much looks like a byte-truncated value.
That’s also what the post mortem said, they crushed the high-order bytes of “quality” keys.
Yeah, in this particular case I agree. Although "some dev did this as a joke of sorts and somehow it landed in prod" is still true, some years ago I added a get_pseudo_random_number function that returns 4 to at least one application currently running in production, I'm sure I'm not alone :)
Also referenced by fail0verflow when the algebraically recovered the PS3 master private key.
As Sony used the same k for each signature.
https://youtu.be/LP1t_pzxKyE?t=236
I can't pretend to understand all of this, but can anyone enlighten me as to what the motivation would be to us such as low number as the ECDSA private key? Was it just a cock-up or is there some benefit in terms of speed etc?
You can read eMudhra's incident report here, where they cover how it happened: https://bugzilla.mozilla.org/show_bug.cgi?id=2083449#c82
But the tl;dr is, it was a cock-up due to bad processes, a bug in a script and ignoring some red flags later on.
Thanks!
Cock-up is the technical term
Gross incompetence.
It was just a cock-up!
Somebody trying to be funny https://xkcd.com/221/