Live data from Hacker News

I've factored the RSA keys of a Certificate Authority from the 90s

mcpherrin.ca

81–90 of 132 posts

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#81
post #11

A bit unfortunate that so many of the interesting bits were left to ai. I would've enjoyed some commentary on why the custom TLS implementation was necessary. Oh well. 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.…

A while back I helped a friend (read: dumped a bunch of compute power into it) brute force the SSL keys for Sega's "Phantasy Star Online" Dreamcast game. 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 swap…

“Rolling your own crypto libraries is always a bad idea”

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.

Also: I was never exposed to the Lastpass breach because, instead of using Lastpass, I rolled my own secure website password generator. [2]

[1] https://samboy.github.io/MaraDNS/webpage/security.html

[2] https://github.com/samboy/PassGen

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#82
post #7

Earlier quoted context omitted.

Doubling per bit is for symmetric encryption, where no attack better than brute force is known. RSA can be attacked using much faster techniques than brute force.

Can you point at some papers or articles that talk about attacks specifically on RSA? I've done a search and have a few references, but I'd be interested to know if you have any particular examples in mind. 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…

Check out the ROCA attack:

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.

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#83

Earlier quoted context omitted.

I bet all the certificate metadata shown in the „View a certificate“ popup window is vulnerable to cross-site scripting. Back then you probably wouldn’t get a tag through a CA's review process and I found such a problem in Netscape's image „About page“ popup.

If it were vulnerable to XSS, why would you even want it properly signed by a CA? People almost never inspect the certificates of working websites, the only time they might look at it is when it fails validation.

I actually do like to view certificates of working sites, because it can be interesting to see what's listed in the Subject Alternative Names field. It can lead to some interesting observations about what sites are linked.

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#84

Earlier quoted context omitted.

Can you point at some papers or articles that talk about attacks specifically on RSA? I've done a search and have a few references, but I'd be interested to know if you have any particular examples in mind. 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…

Check out the ROCA attack: 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 tr…

Super ... thank you.

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#85

I am not a cryptography expert but I am interested in the field. Having said that: I am lately having an hard time understanding the actual strength of a crypto suite based on the underlying problem, the sized of the material and the computation strength needed to break it either via optimization and parallelism capabilities. > The Web PKI deprecated 1024-bit RSA over a decade ago, and while I don’t know of anyone fa…

> I am not a cryptography expert

> How do I verify such claim?

Step 1: Become a cryptography expert. ;)

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#86
post #38

In the 90s, how long did people expect it would be until consumer computer hardware would be able to do this so quickly?

At least in the US in the 90s, crypto was effectively required to be breakable. There expectation was this was possible at that time.

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#87
post #28
post #4

Basically 2 days on a consumer GPU to crack a 512 bit cert. The thing is much of the traffic back then did not use ephemeral keys. Most of it wasn't even encrypted at all! But about a decade later, it became normal to encrypt everything. I do wonder which governments around the world are just waiting to crack anonymous political speech by recording and saving for later when decryption can happen.

It's possible symmetric encryption may never really be defeated by anything other than brute force. The exchange of the ephemeral key really is the important part, as you mention. Thankfully looks like we are getting closer to full adoption of post quantum TLS... but that doesn't help recorded communications before very recently. Scary thought. Looks like 70% of cloudflare requests are using post-quantum TLS! https:/…

This makes me wonder why we aren't using pre-shared keys as one extra layer of defense.

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.

Re: I've factored the RSA keys of a Certificate Authority from the 90s

#90

I was the product manager with responsibility for root certificates in the Netscape 4.51 browser. It's crazy to see someone factor it 25 years later. 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 rel…

Did you have any personal interaction with NSA or their proxies?
Post reply on HN