Google is using clever math to quantum-proof HTTPS certificates

sergioaffs

Seniorius Lurkius
21
Subscriptor
Not clear to me - if this is such a massive step up shouldn't this be open source so other browsers can make use of it?
It seems you haven't got an answer to this—or maybe I missed it.

This is an important concern and you're right to point it out. Most of the development in PQC is done in the open and is flowing towards open standards from organisations like NIST or IETF. The Merkle tree certificates in question were recently published as a draft IETF RFC.

However, there is a lot of experimentation going on. If you look at Cloudflare's support for post-quantum TLS, you'll see their first experiments (around 2021, IIRC) use algorithms that are no longer in consideration. A lot of cooperation between a lot of entities has to happen, resulting in a lot of iterations and dead ends.

Even if some implementations are closed source, this transition would fail without open standards and open source implementations.
 
Upvote
8 (8 / 0)

Chuckstar

Ars Legatus Legionis
38,034
Subscriptor
The article seems to have left out one aspect of how this system reduces handshake overhead: The verification data for the Merkle Tree inclusion proof can be periodically updated and verified by the browser out-of-band or re-used from previous handshakes. That verification data will tend to have an expiration date of a week or so. A big aspect of the testing will be to try get enough usage info to try to optimize the trade-off between how often clients query the central databases for the updated Merkle Tree verification data vs the percentage of times a client finds it does not already have the updated verification info when trying to complete a handshake.

(I’m not sure how bad the handshake becomes for situations where the verified Merkle Tree info is not already present. The only thing clear to me is that the handshake would not be as efficient as when that verified info is already present. Clearly, the expectation is that overall this will be a better trade-off than simply substituting post-quantum algorithms in and otherwise doing handshakes the same old way.)

Another point that I have not seen anywhere else is how simple a Merkle Tree proof is. Each node in the tree is the hash of the two leaves/nodes below it. If any changes to a leaf or node occur, the hash at the head changes. So to check that a certificate is included you need all the sibling hashes all the way up the tree to be provided. You hash the certificate, hash that result with the sibling node hash provided for that level, hash that result with the sibling node hash provided for that level, all the way up. Then you check that against the head hash that was provided and verified out-of-band.

You might think “can’t someone just change the certificate and change the interim hashes to still get the same hash at the head”? And the answer is that the point of these kinds of hashes is precisely that that is essentially impossible to do — would take a length of time longer than the heat-death-of-the-universe to accomplish.
 
Last edited:
Upvote
5 (5 / 0)

blookoolaid

Ars Scholae Palatinae
1,050
If I understand this correctly, it seems that they're trying to find a middle ground between clients trusting a few root CAs that rarely change (current practice) and tracking all possible certificates a client might encounter (simple but impractical). These new certs are issued in batches where it's quick to check if the cert you're seeing is part of a trusted batch. The client will need to know about a lot more certs, but a lot fewer than knowing about all certs. And there will be cache misses where the fallback will basically be the current system with much larger keys but hopefully that won't happen too often and can be tuned by trading off frequency of cache updates and size of the cert cache.

So in the end I think it's a cleaner overall model than current PKI which started simple but as the Cloudflare article explained has had to add several additional handshakes to prevent fraud and allow upgrading root certs seamlessly. I don't love that at this time Cloudflare is minimizing the fact that a cache miss means a slow handshake; there's enough non-determinism in troubleshooting web app performance problems without adding low-level TLS handshakes into the mix. But given the async nature of the cache updates, hopefully it'll get tuned to the point where it's a non-issue in practice.
 
Upvote
0 (0 / 0)

gosand

Ars Tribunus Militum
1,924
As the guy at the NSA said, "we don't know when--or even if--such a machine will be built".

This is an all too rare case of the government and corresponding standards bodies doing something right, and it's entirely possible we'll never need it--but if we do build that machine, we're going to be pretty fucking thankful that these people put in the work.
I think of it like this: Unfathomable problems require unfathomable solutions.

That means that the problems AND their solution are maybe out of our grasp at the moment. But think of our past, and how fast things are accelerating. I am typing this on an unthinkably fast computer, with an unthinkable amount of storage, over an unthinkable gigabit fiber connection to the internet, using a free OS (Linux), with a smartphone sitting next to me with similarly incredible capabilites - as compared to 36 years ago when I purchased my first computer. (386DX-33)

None of these things existed in any recognizable way compared to today. Only 36 years. It goes by very quickly, and technology's acceleration continues. If we aren't out ahead of these problems, then we are behind them.
 
Upvote
3 (3 / 0)

Chuckstar

Ars Legatus Legionis
38,034
Subscriptor
If I understand this correctly, it seems that they're trying to find a middle ground between clients trusting a few root CAs that rarely change (current practice) and tracking all possible certificates a client might encounter (simple but impractical). These new certs are issued in batches where it's quick to check if the cert you're seeing is part of a trusted batch. The client will need to know about a lot more certs, but a lot fewer than knowing about all certs. And there will be cache misses where the fallback will basically be the current system with much larger keys but hopefully that won't happen too often and can be tuned by trading off frequency of cache updates and size of the cert cache.

So in the end I think it's a cleaner overall model than current PKI which started simple but as the Cloudflare article explained has had to add several additional handshakes to prevent fraud and allow upgrading root certs seamlessly. I don't love that at this time Cloudflare is minimizing the fact that a cache miss means a slow handshake; there's enough non-determinism in troubleshooting web app performance problems without adding low-level TLS handshakes into the mix. But given the async nature of the cache updates, hopefully it'll get tuned to the point where it's a non-issue in practice.
1) I’m still not clear how costly the cache miss will be, although I would tend to imagine the difference to be noticeable if thinking about how server logs would look for clients that did/didn’t need to go get the new MerkleTree verification data.

2) What needs to get downloaded to update the cache is small, so even if it’s relatively expensive from the perspective of completing any one handshake quickly, one imagines there could be a protocol where updating related data could be scheduled immediately afterward. Basically, logic such as “your MerkleTree data from such-and-such CA was out-of-date this time, so we’ll schedule an update for all their data in the next 5 minutes.” That is, these updates are likely only expensive if the user is waiting for a site to load. My understanding is that they would be unnoticeable in bandwidth use, CPU use, etc. if happening out-of-band in the background. The result would be that it should be possible to make misses be relatively rate, by scheduling out-of-band updates intelligently. But similarly to #1, probably not rare enough that someone examining server logs could simply ignore the existence of such cache misses.
 
Upvote
0 (0 / 0)

wxfisch

Ars Scholae Palatinae
1,173
Subscriptor++
Commenter complaints aside, I thought the article was pretty decent, but then I did jump over to the Cloudflare blog post for the "more in depth" explanation of Merkel Trees in the middle or reading it which it turns out also laid out most of what this article was talking about, only from Cloudflare's side of things and not Googles. When I came back here to finish the Ars article it made a good bit of sense because it was essentially my second read through of the material.

For Dan's part, explaining cryptography on an tech blog like this is a lose-lose proposition. In order to really explain it so that the average reader can grasp everything that is going on is impossible, there are entire college courses that go into explaining cryptography concepts, let alone the specific implementations of it. But then if you make it too high level you lose the "so-what" and also get a lot of "well akshually" people in the comments correct you or pointing out where you glossed over something that while technically important doesn't really impact the point being made (in this case that Cloudflare and Google are proposing a novel approach to verifying certificate chains that reduces the overhead required by the client, which happens to matter because PQ-safe algorithms are much larger than traditional ones). I think going into how they are proposing to do this is interesting, and the details of some Chrome users accessing some sites will get a different kind of certificate as part of the TLS handshake so that Cloudflare, Google, and IETF can learn from this proposal is both interesting and important. But Dan was always going to catch crap in the comments no matter how the article was written.
 
Upvote
3 (4 / -1)

StikyPad

Ars Scholae Palatinae
753
The problem is many hacker-in-middles are recording top-sensitivity HTTPS data today, for future cracking later.

Some of them even transmit bitcoins, banking data, private medical stuff, or other critically valuable information.

If HTTPS is broken in 10 years from now, your pre-recorded 2025 communications to your online bank/trading/insurance/health/etc today could be cracked in 2035.

By deploying quantum-resistant HTTPS today, the odds of "retroactive hacks" is greatly reduced.

It's not quite that simple. Ordinary users (non-state actors) are unlikely to have access to sufficiently quantum computers for the foreseeable future (20-30 years, say). Even state actors will likely need to use discretion, since each key extraction will likely take hours-to-days, and each key exchange needs to be cracked individually. You wouldn't use this to see what pr0n Alex was watching in 2024; you'd focus very narrowly on specific communications of specific adversaries initially (though even that will be of limited value since it's historic, by definition), and perhaps criminal suspects. It will likely be at least 20-30 years before it's trivial to extract and analyze ordinary historic traffic, at which point, how valuable is it, really? Even attributing most traffic won't be straightforward.

I'm sure there will be unexpected discoveries, but it won't be like all pre-2025 saved TLS traffic will suddenly be dumped in plaintext the day (or year, or probably decades) after quantum attacks become practical.
 
Upvote
1 (1 / 0)

tmt

Ars Scholae Palatinae
901
What does this even mean?

Mozilla regularly waits on new features because they have far more limited dev resources so this isn't surprising for a draft spec. OpenSSL has similar restrictions.

So... what is the problem here? Google is developing something that will ultimately be positive for the speed of connections. And this isn't just a Google thing, the massive size of the signatures in PQ crypto is a huge issue. Cloudflare has published blogs on this as well.

I think Google is very far from a great company, but they're sinking development time into a standard that will benefit everyone. They're a member of the working group and contributing this code to their open source project. So I'm not sure I see why Google should be catching flak over this.

the big issue is that while they sink huge amount of resources into MTC, they are also undermining all the efforts to deploy X.509 with ML-DSA

Chrome doesn't support ML-DSA in X.509, Go doesn't support it, BoringSSL doesn't support it. They have explicitly blocked requests in CA/Browser forum to allow public ML-DSA CA certificates, despite them already being allowed for S/MIME.

Meanwhile ML-DSA in X.509 is already here and working in OpenSSL, GnuTLS, NSS...
 
Upvote
2 (2 / 0)

okojo

Seniorius Lurkius
17
This doesn't so much squeeze a lot of information into less space, as it just cuts out the key from the certificate and sends it separately. Instead of sending a certificate (with key included), a certificate, merkle proof and key are sent separately. For a single key, this actually sends MORE data because the merkle proof has to be added. For sending multiple different keys this saves a very small amount of space (just the certificate portion, and maybe some of the merkle proof portion if you're lucky/smart) and that's only if you're sending multiple keys to the same recipient.

However, that's not to say that this doesn't have advantages. Firstly, this lets you rotate keys without changing the certificate. This saves the server time communicating to the CA whilst encouraging short lived keys which makes each individual key less likely to be broken. Secondly, this can allow 1 certificate to be used to send both a post-quantum public key and a classical public key by using 2 merkle proofs (one for each) to the same client for a hybrid handshake. Granted this saves very little space, but it does abstract away a lot of the information from the CA.
 
Upvote
0 (0 / 0)