Post-Quantum Cryptography

Post-what what?
Post-quantum cryptography.
(If you just want operational advice there’s a TL;DR down at the end of this post.)
A quantum computer is a a computer that rather than using binary ones and zeros computes using quantum states, using quantum phenomena such as superposition, interference and entanglement. Some algorithms designed to run on them can be spectacularly faster than conventional computers for some classes of problem.
Some - most - of the encryption and signing and key-exchange cryptographic algorithms we rely on could theoretically be broken easily enough by algorithms running on a quantum computer so as to make them insecure for some subset of uses.
Current advice from state-level cryptographers is to move to “quantum-resilient” algorithms by 2030. Part of the reason for that is the risk of sensitive encrypted communications being recorded now, and the key potentially being broken in 2040 or whenever. But part of it is apparently legitimate concern about the strength of the classical cryptographic algorithms, such as RSA or Ed25519.
But there’s been a significant step-up in PR about this over the past few weeks.
Some of that PR is released in obvious bad faith, perhaps to manipulate gullible legislators to rig laws in a company’ favour, or to manipulate their stock price for insider profit.
(One recent piece took an actually mildly interesting theoretical mathematics result and pitched it as quantum computing breaks cryptography - but it would require a processor that supports a lot of qubits - like, a 1 with 300 zeros after it. Real quantum computers … it’s hard to get a good estimate, as they’re measured in different ways … but maybe a few hundred. And the observable universe only has about 1 with 80 zeros after it atoms.)
Some of it, less so. There are mutterings about algorithms being compromised, and hints about embargoed findings.
Given where the announcements are coming from, and the published state of quantum computing research it seems that if there is something there then it’s a classical computing compromise or weakening of one or more widely used algorithms.
In other words, while we’re talking about post-quantum cryptography the current risk is likely not “quantum” so much as “AI” companies being able to throw obscene amounts of compute at brute-forcing things.
Filippo Valsorda has read the tea-leaves and posits that it’s potentially a weakness in some elliptic curves, meaning that Ed25519 and friends may be weakened. And he points out that there’s no mention from the NSA of RSA being compromised.
Other folks - who I wouldn’t go to as primary sources, but do have the right connections - say that both Ed25519 and RSA are exposed.
Overall it feels like there isn’t an immediate, widespread threat to classical cryptography. But the signs are there that working to move away from it is probably a good idea, and that Ed25519 and friends are potentially at more immediate risk than others.
So … email?
Where do we use cryptography in email? Two places, really TLS as used with STARTTLS to encrypt traffic in transit and DKIM style authentication.
We don’t have enough control over what is supported in TLS certificates for email to do anything urgently. Sure, supporting X25519MLKEM768 would be great, but I’ve no idea how ready the email ecosystem is to support that.
DKIM, though. DKIM is not a high value target. Folks breaking your DKIM key are not going to be more than quite annoying. Planes will not fall out of the sky, bank accounts are not going to be drained. It’s really not that important.
Your customers have questions, we have answers
But people are going to ask questions about DKIM. So we should have some answers.
They may not be good or accurate answers, and it may all change next week, but here we go.
DKIM - 2048 or 3072 bit RSA
DKIM1 supports RSA and, theoretically, Ed25519. And that’s it. If you’re already on RSA 2048, that’s probably enough that you’re not going to be low-hanging fruit.
2048 bit RSA is the biggest key that’s explicitly required to be supported in DKIM. But implementations are allowed to support longer keys, and given how that bit of a DKIM validator is likely to be implemented it’s very likely that most places will support longer keys (but you don’t want to get too big, both for CPU cost and the size of DNS responses that large keys imply.)
Working out whether migrating to 3072 bit RSA is viable, and how much work it would be to do across your customer base is probably worth thinking about. It’s also a nice concrete question that also answers “If we had to migrate to a different algorithm, or to non-DKIM1-compatible DKIM2 in a real hurry, what impact would that have on customers?”.
My belief is that support for 3072 bit RSA will be pretty widespread and that migrating to it as a sender would be a pretty safe change. I’ve not tested that beyond a few mailbox providers, though, so there may be some lack of support out in the long tail. If there are rare mailbox providers that don’t support it they should just treat it as a DKIM failure, and we’ll still have SPF.
DKIM - Ed25519
DKIM1 technically supports Ed25519, but how widely it’s supported isn’t clear. There are mailbox providers that don’t support it.
And the infosec tea leaf reading is looking hard at Ed25519, so you wouldn’t want to be migrating to it anyway.
DKIM2 - ML-DSA-44
DKIM2 supports RSA, Ed25519 and ML-DSA-44. Those first two are completely compatible with existing DKIM1 keys, so are intended for easy incremental upgrades. They’ll have identical weaknesses to their use with DKIM1.
That third one, ML-DSA-44, is a digital signing algorithm based on module lattices. It’s the first “quantum-resilient” algorithm I’ve mentioned and, for now, it’s the only one directly relevant to email.
ML-DSA-44 keys are annoyingly big but are otherwise easy enough to work with.
TL;DR Operational Summary
Don’t panic.
Most of the impact is going to be on your sysadmins fixing up ssh keys and internal PKI infrastructure and so on. It’s probably a bad time to ask them to pick up a new project.
DKIM1
DKIM is where “we” will see things most. The most important thing to think about - and this isn’t new, just in sharper focus - is key management for customers, and agility in changing keys.
If your customers announce their public DKIM keys by delegating a domain to their ESP, or with CNAMEs pointing at ESP-hosted public key records then switching all the ESP customers to new keys or new algorithms or rolling out DKIM2 doesn’t require any customer interaction. It’ll be easy. If you give TXT records to your customers to publish themselves then it’ll be near impossible to make changes in a hurry. Move to DNS delegation.
If you’re using 2048 bit RSA keys for DKIM you’re likely fine, for now. Look at what operational steps you’d need to do to move to, e.g., 3072 bit RSA keys if you were to need to.
You’re probably not using Ed25519 DKIM1 keys. If your customers ask about them (“because RSA has been broken!”) don’t give in, just reassure them that long RSA keys are OK.
DKIM2
DKIM2 will be available sooner rather than later. Put together plans on how to deploy it now, even before the RFC is finalized. Adding DKIM2 signing with RSA keys may be as simple as updating your mailserver and adding a line in a configuration file, but just doing that doesn’t get you any more cryptographic security.
Look at using ML-DSA-44 to sign DKIM2 with. Play with key generation and publication of those keys as soon as your vendor supports it.
There will be a migration phase where you will want to sign with both DKIM1 and DKIM2. And, ideally, you’ll want to use RSA with DKIM1 and ML-DSA-44 with DKIM2.
To do that you’ll need to at least two public keys published for a domain simultaneously. If you’re using CNAMEs for delegation you’ll need at least two CNAMES with different selectors, one for the DKIM1 signatures using RSA keys and one for the DKIM2 signatures using ML-DSA-44 keys. Ideally you’d have more than the minimum of two so as to be able to rotate keys.
Stay tuned!
The details of what - if any - weaknesses have been found and how severe they are may change next week. But the broader points of needing agile updates for keys without having to touch every customer, and plans for DKIM2 with ML-DSA-44 deployment will still be there.