I've factored the RSA keys of a Certificate Authority from the 90s
Posted by ahlCVA 12 hours ago
Comments
Comment by hnmullany 48 minutes ago
Just to reply to some people in the comments. Yes, we knew export grade encryption was weak - that was the point - that the NSA could decrypt it - and the govt. required us to do it anyway.
FWIW - we had the goal of expanding the list of root authorities in the 4.5x release - and this might have been the first release to monetize the root slots because Netscape was under severe pressure to generate revenue.
(Also - Verisign hated that we were expanding competition and tried to convince us to implement a program that would re-restrict the list to a set of "responsible" companies aka Verisign and one or two others. We declined.)
Comment by jetbalsa 29 minutes ago
Comment by 63 11 hours ago
Update: found this explanation in a comment at the top of the (surprisingly short) Go file in the linked repo:
The target client is Netscape Communicator 4.51 (both the 40-bit export build and the 128-bit US build) with its clock set to the year 2000.
Go's crypto/tls cannot help: it dropped SSLv3 in Go 1.14, never accepted the SSLv2-compatible ClientHello that Netscape 4 sends, and never had RC4-MD5 or the 40-bit export suites. So this file carries its own tiny SSLv3 server-side implementation on top of stdlib primitives (RSA PKCS#1 v1.5, RC4, DES, 3DES, MD5, SHA-1). The server key is 512-bit RSA so that export clients can encrypt the premaster secret to it directly, without a ServerKeyExchange.
Comment by mcpherrinm 11 hours ago
I've written and worked on a few TLS implementations, so it wasn't terribly interesting to me. And I have to go to work tomorrow and solve real, modern CA problems :)
But in short, I wanted to use Go, and it doesn't support SSLv3, the SSLv2 Client Hello, or the 40-bit RC4-MD5 export-grade cipher suites which I wanted to support too.
I was more shocked that I managed to get stock OpenSSL to issue a certificate that worked. There's a number of things that didn't work there, too. You can find my scars in mkcert.sh in the repo. Perhaps all of this is worthy of a follow-up post.
I could have tried to get some old server running instead, but I wouldn't have wanted to deploy that on the internet, even on an isolated Fly VM.
Comment by dividuum 8 hours ago
Comment by WatchDog 8 hours ago
Comment by Sophira 14 minutes ago
Comment by kyleomalley 1 hour ago
From my prospective, the outputs of a bot aren’t the interesting bits, it’s the input prompt that should warrant more attention.
Comment by jychang 11 hours ago
Comment by CursedSilicon 11 hours ago
They used a similar kind of custom (and flawed) TLS implementation in their game(s) which allowed signing new certificates after brute forcing.
The benefit to this is that users can now play these games without needing to burn a new CD with either the SSL certs swapped, or the code patched to dummy out the checks. A "retail CD" will simply work with private servers now.
I've also been on the other side of the fence, building a "retro internet" service [1] has meant trying to implement ancient SSL/TLS services for things and people that want to use them on the network.
Getting modern OpenSSL (aka what ships in Debian) to even accept these ciphers, let alone keys that short is an uphill battle. Understandably, they're disabled by default and (in Debian at least) the cipher support isn't even compiled into the binary! This requires building a custom OpenSSL to build Nginx against to serve ancient SSL.
Presumably for the OP this kind of work was either outside of their realm of knowledge, or simply "easier" to outsource to the slop machine. Though I hope the machine they're running their demo TLS implementation on is separated completely from their own network. Rolling your own crypto libraries is always a bad idea [2] and I doubt LLM's have "improved" that
[1] https://www.youtube.com/watch?v=cSJsGNIDjtc
[2] https://soatok.blog/2025/01/31/hell-is-overconfident-develop...
Comment by strenholme 24 minutes ago
Absolutes like this aren’t absolutely true.
It’s interesting because in a related comment, someone claimed that I was “rolling my own crypto” https://news.ycombinator.com/item?id=37368245
>>>a few odd coding decisions, such as rolling your own crypto (RNG)<<<
Let me give some context here. MaraDNS is a DNS server that’s been around for a very long time, since 2001. There has never been, in those 25 years, any security holes found having to do with the RNG code used by MaraDNS. MaraDNS originally used an AES variant for the RNG; when DJB found cache timing attacks a little over two decades ago, I revised the AES-based RNG code to minimize the impact of such impacts, making the code slower and more complicated. So, about two decades ago, I implemented a new RNG based on RadioGatún, an algorithm which isn’t vulnerable to cache timing attacks and, indeed, has no known attacks which break its cryptographic claims, even though those claims were made over two decades ago.
My code has been extensively audited by multiple AI-based security researchers, and while they found two minor issues with the DNS-over-TCP code in the recursive resolver, and a minor issue with the RFC8482 reply in the recursive resolver, no issues have ever been found with the RNG code in MaraDNS (except the issue with possible cache timing attacks I fixed myself after learning about them). [1]
In the same time period, OpenSSL has had a large number of security issues, security advisories, and so on. OpenSSL has had countless security holes and patches in the last two decades (Heartbleed, etc.); MaraDNS has had precisely 0 known issues with its RNG code in the same time period. If I had relied on OpenSSL to keep MaraDNS’s cryptography secure, it would had been exposed to many more attacks than it has, since the code I rolled myself ended up being far more secure than using the code in a third party library.
Point being, it is possible for someone to roll their own secure RNG. I wouldn’t do so in a corporate context, for the simple reason management often times puts unreasonable time constraints on developers, but for an open source project developed on my own timeline, it can be, in fact it has been very secure.
Comment by ricksunny 7 hours ago
“Presumably for the OP this kind of work was either outside of their realm of knowledge,”
Unnecessary? I don’t even follow the statement’s framing even if I validated the apparent nerdswipe tendency.
Comment by smaudet 10 hours ago
When you outsource to the slop machine, you don't have anything interesting to say (usually).
Comment by CursedSilicon 10 hours ago
I will say that my projects have a "leading the pack" anti-AI policy [1]
Comment by jimmaswell 9 hours ago
Comment by wartywhoa23 49 minutes ago
Comment by prmoustache 8 hours ago
Comment by CursedSilicon 9 hours ago
Comment by jimmaswell 9 hours ago
Comment by CursedSilicon 8 hours ago
Is the "anti AI mob" in the room with us right now? If not, why did you feel the need to lament it?
Comment by jimmaswell 8 hours ago
Comment by wartywhoa23 35 minutes ago
Comment by darkwater 6 hours ago
Comment by throw1234567891 5 hours ago
Comment by wartywhoa23 44 minutes ago
Comment by goalieca 11 hours ago
Comment by monster_truck 56 minutes ago
Comment by adzm 10 hours ago
Looks like 70% of cloudflare requests are using post-quantum TLS! https://radar.cloudflare.com/post-quantum
Comment by miki123211 57 seconds ago
The idea would be to use an existing connection (established via normal TLS) to agree upon and exchange a pre-shared key. For subsequent connections, that key would be incorporated as one extra input to the key derivation function, and a new key would be derived.
This would make TLS more secure against adversaries who can break asymmetric encryption (now or later) and monitor some of your communications, but who do not have access to all of your communications. If you managed to get on an unmonitored network even once (foreign hotel WiFi, coffee shop without a wiretap), and securely establish a PSK there, all future interactions would be inaccessible to an adversary who can't break symmetric crypto.
Comment by tgsovlerkhgsel 8 hours ago
Probably not too many, because anonymous political speech from 10+ years ago isn't that interesting. Punishing people a decade after the fact isn't very effective for anything.
Comment by icefo 8 hours ago
Comment by utopiah 5 hours ago
Comment by gosub100 38 minutes ago
Comment by oldgradstudent 5 hours ago
It sends a very clear message: even if it takes a decade, we will find you and punish you.
Comment by p-e-w 4 hours ago
Comment by suddenlybananas 1 hour ago
Comment by akoboldfrying 10 hours ago
The CADO-NFS page gives some benchmark results for 16 threads, suggesting the algorithm parallelises at least somewhat well.
Comment by mcpherrinm 10 hours ago
Comment by ThePowerOfFuet 6 hours ago
Comment by Neywiny 11 hours ago
Comment by teiferer 6 hours ago
What better reason is there to do something than it being fun?
Comment by GracefullyShot 3 hours ago
> The Web PKI deprecated 1024-bit RSA over a decade ago, and while I don’t know of anyone factoring a key of that size, it’s within the realm of possibility for a government or other organization with a large number of computers.
Is it? How do I verify such claim?
---
> Just a few days ago, someone factored the 862-bit RSA-260 key from the RSA factoring challenge.
Yeah, but how much time it required? and what about the resources? It is just a number, it is not all the 861 bits n numbers.
Comment by bityard 10 minutes ago
> How do I verify such claim?
Step 1: Become a cryptography expert. ;)
Comment by rbtms 1 hour ago
The security of RSA however depends on the factoring of very large numbers, and that means that for example, RSA-2048 doesn't translate into 2048 bits of security but 112 (roughly symmetric equivalent) bits based on the best factoring algorithms (for comparison, the RSA-512 the article mentions has an 56 bit equivalent and RSA-1024 has a 80 bit equivalent security, so RSA-1024 would take roughly 2^(80-56) ~= 17 million times to compute the worst-case scenario and RSA-2048 would take 2^(112-80) = 4.3 thousand million times more).
According to the Wikipedia article on RSA numbers, RSA-220 (66b) was factored in 2016, RSA-230 (69b) in 2018, RSA-240 (72b) in 2019 and RSA-260 (76b) this year, which is too close to RSA-1024 (80b) to be comfortable.
For RSA-250, the team reported it took "roughly 2,700 core-years, using Intel Xeon Gold 6130 CPUs at 2.1 GHz.". I am not going to (or feel qualified to) make estimates of how that would translate to RSA-1024, but it does sound plausible given enough resources.
Comment by upofadown 1 hour ago
A Cost-Based Security Analysis of Symmetric and Asymmetric Key Lengths https://cr.yp.to/bib/2000/silverman.pdf
It was a response to the idea that 1024 bit RSA was under threat at the time.
Comment by pvillano 11 hours ago
Comment by mitxela 11 hours ago
It's essential that you do, because generating pretty plausible outputs is an LLM's bread and butter. Otherwise, only the one that you actually tested should be expected to be correct.
Comment by mcpherrinm 11 hours ago
The biggest thing I'm afraid of is that the generated scripts missed some entries, or otherwise mis-classified them, in particular whether it got the trust bits right for each root. I would put the chances of that having some errors relatively high.
But there's too many roots across too many browser installers, so I'm not going to confirm the Netscape UI matches what the extracted data says.
Comment by Aurornis 10 hours ago
Comment by mitxela 1 hour ago
Comment by joshka 11 hours ago
Comment by forgotmypw17 9 hours ago
Comment by tunahanfaruksav 4 hours ago
Comment by rootsudo 10 hours ago
Comment by frays 3 hours ago
openssl rsa -in private.key -text -noout
prime1:
00:f7:5b:73:5c:13:9b:7b:70:58:36:22:d6:25:e6:
44:15:f3:f7:b3:18:c5:11:65:77:f2:85:af:cc:79:
fa:d2:bd
prime2:
00:d4:81:b4:f5:af:a8:56:0e:a3:34:c0:e3:e8:60:
fb:b2:96:83:e2:af:6d:d7:09:3f:37:2a:bf:31:32:
cf:92:63Comment by jrmg 8 hours ago
Comment by Maxious 56 minutes ago
When a research team actually factored RSA-155 in August 1999, it took 8,400 MIPS-years due to efficiencies discovered. It still took 35 CPU-years spread across a cluster of 300 fast SGI/SUN workstations and Pentium II PCs (400-500 MIPS each), crunching in parallel for seven months. https://cs.ccsu.edu/~pelletie/local/risks/cryptography/Facto...
Robert Silverman, a senior research scientist at RSA Laboratories, published an analysis projecting these new hardware requirements against Moore's Law. His expectation was that within 10 years (roughly 2009–2010), common desktop machines would possess the speed and memory necessary to handle a 512-bit factorization entirely on their own. https://cr.yp.to/bib/2000/silverman.pdf
Comment by sidewndr46 4 minutes ago
Comment by LastTrain 1 hour ago
Comment by hashar 8 hours ago
PGP (1991) was considered secure as it was considered not brute forceable. With 128 bits, it was considered military grade at the time and the US had an export restriction due to that. That might have been an incentive for GNU Privacy Guard. In France you had to give your private key to the government authority if an encryption system used anymore than 56 bits (as I recall, I don't remember the exact number).
Comment by axionbraid 8 hours ago
Consumer hardware doing it in a couple of days in 2025 is roughly in line with Moore's Law extrapolations people were drawing at the time. The surprise isn't really the timeline. It's that someone did it as a weekend project rather than a nation-state effort.
Comment by Retr0id 11 hours ago
Comment by bpbp-mango 5 hours ago
Comment by excalibur 11 hours ago
The planet has a lot of people.
Comment by MrDOS 39 minutes ago
Comment by ranger_danger 9 hours ago
Comment by zatkin 9 hours ago
Comment by andytratt 10 hours ago
Comment by rwissinger 56 minutes ago
Comment by ggm 11 hours ago
Remember, Shor is like a coded gate level algorithm expressed as sequences of interconnected stable QuBits. So, if you double the cost for each RSA bit you add, its not "nothing" in terms of how you wire the rig.
(not a cryptographer, or a QC person so I expect to be hit by a very cold but stable quantum clue-by-four shortly. Maybe they have to hit me 1 million times, to confirm I'm hit. Its statistics.)
Comment by mcpherrinm 11 hours ago
Steve Weis, who has been doing RSA factoring on some large GPU clusters, estimates factoring 1024-bit RSA would take about 2000 GPU-years, which is well within the range of anyone with a serious budget.
Comment by WhiteDawn 8 hours ago
Comment by throwawayk7h 11 hours ago
Comment by mcpherrinm 11 hours ago
Naively looking at scaling factors is going to be tricky, because computation of this scale is going to involve things like "how do I hijack every GPU on the planet", or worrying about when the sun will run out of hydrogen if you're using a single CPU.
Comment by upofadown 1 hour ago
2048 Bit RSA and the Year 2030 https://articles.59.ca/doku.php?id=em:20482030
We don't have any way to predict when and if 2048 bit RSA would be factorable at this time. We would need a breakthrough in hardware and/or algorithms. The common estimation that it is equivalent to the difficulty of brute forcing symmetrical 112 bit encryption seems to be based on some sort of straightforward extrapolation. It doesn't take into account the amount of memory required for the poorly reducible matrix reduction step in the currently known best algorithm. That's 10^18 bytes of memory, or a million terabytes, somehow coupled to enough processing power to actually make anything possible.
Even if you accept the 112 bit estimate, that works out to something like 400 thousand years using the Bitcoin network as a reference to what we could reasonably achieve.
Comment by mitxela 11 hours ago
says approximately the same as a 112-bit symmetric key, so 1/65536 as fast as however your target platform does at AES128, but probably 2000 times slower again because RSA is a really slow algorithm.
128-bit security is the de-facto minimum standard. Anything less than that is suspect. That's a 3072-bit RSA key. We only ever tolerated shorter keys because RSA is so slow. You should switch to ed25519 if you can.
Comment by entrope 11 hours ago
Comment by mitxela 11 hours ago
Comment by ColinWright 4 hours ago
I know that factoring (which attacks RSA) is sub-exponential, and I know that implementations of RSA (bad choices of primes, timing attacks, etc) can have weaknesses ... I'm just interested as to whether you have something else in mind.
Thx.
Comment by hannob 3 hours ago
Reference to a scientific paper is given: https://www.ams.org/notices/199612/pomerance.pdf
Comment by ColinWright 1 hour ago
I know there are other attacks on RSA, I was interested to know if the poster to whom I was replying knew of any others (other than factoring, which is kinda obvious). After all, I said:
> I know that factoring (which attacks RSA) is sub-exponential, ...
Comment by gosub100 18 minutes ago
www.techtarget.com/cybersecurity/tip/The-ROCA-vulnerability-How-it-works-and-what-to-do-about-it%3famp=1
In practice it was confined to specific TPM modules, but in principle it shows how one flaw in the RNG can jeopardize the whole system.
I also remember seeing a similar vuln in certificates where an attacker _generated_ millions of certs and was able to somehow get the private cert by trying every possible seed for the RNG. (Like seeding every second from 2003-2011 for example, then generating a cert with it). I know I'm getting major parts of this wrong but it conveys the general idea.
Comment by ColinWright 14 minutes ago
Comment by rcxdude 11 hours ago