Change the locks. Now!

On 2 December the NSA asked for an "immediate" move to post-quantum cryptography, after AI companies privately told the US government about discoveries touching the cryptography in use today. Before the news, a story: how the locks of the internet work, from Caesar to the lattices, and why every one of them is a bet.

In August 1977, anyone who opened Scientific American at Martin Gardner's mathematical games column found a number 129 digits long and a challenge. The number was the product of two prime numbers, kept secret. Whoever managed to find them could read an encrypted message printed a little further down, and collect a hundred dollars.

The three who had launched the challenge were called Rivest, Shamir and Adleman, worked at MIT and had just invented a new way of keeping secrets. One of them, Ron Rivest, had done the maths: with the best known methods and the fastest computers of the time, factoring a number like that would take forty million billion years. About three million times the age of the universe.

The message was read in the spring of 1994. No supercomputer was needed: it took more than six hundred volunteers scattered around the world, about sixteen hundred machines connected over the internet (two of them were fax machines) and a few months of patience. Above all it took a method of calculation that did not yet exist in 1977. The text said:

The Magic Words are Squeamish Ossifrage

The hundred dollars went to the Free Software Foundation.

Nobody had cheated and nobody had got the sums wrong, or at least not by much. Something had simply happened that always happens in cryptography: "impossible" just meant "nobody has found the way yet".


TL;DR for those who want to skip this first part: here is how the locks of the internet work. From Caesar onwards, cryptography is a race between those who lock and those who find a shortcut to open. Today almost everything rests on two locks, RSA and elliptic curves, which nobody has ever proven secure: they hold because so far nobody has found the way. A quantum computer would open both, and that is why new ones, built on lattices, are being fitted. The news starts at "A dinner in Austin".

The history

Cryptography is the art of writing a message so that only the person meant to understand it does. It has two basic ingredients: the first is the method, the recipe by which the text is transformed; the second is the key, the parameter that changes every time and that only the two correspondents know.

Julius Caesar, Suetonius tells us, wrote to his people by shifting each letter three places along the alphabet. "Hello", for example, becomes "KHOOR". The method is "shift the letters". The key is "three". "Attack the indomitable Gauls at the sixth hour" becomes "DWWDFN WKH LQGRPLWDEOH JDXOV DW WKH VLAWK KRXU".

In 1883 a Dutch linguist transplanted to Paris, Auguste Kerckhoffs, wrote down the rule that still holds today: a good cipher must remain secure even if the enemy knows its method in every detail. The secret must lie entirely in the key. It sounds like a paradox and is instead common sense: a method sooner or later leaks, and a method nobody has been able to examine is a method in which nobody has found the flaws. It's the reason ciphers today are published, put up for competition and left open to attack by anyone for years before they are trusted.

Caesar's cipher, with the English alphabet, has only twenty-five possible keys: you can try them all in ten minutes. The next step was to replace each letter with another chosen at will, with no rule. The combinations become a number with more than twenty digits, and for centuries that seemed enough.

Then, in Baghdad, around 850, a philosopher and scientist named al-Kindi wrote a treatise on how to decipher secret messages. The observation was simple: in every language some letters appear much more often than others. In English, e, t and a. If in an encrypted text the most frequent symbol is X, in all likelihood X stands for one of those. You count the symbols, compare them with the habits of the language, and the message unravels by itself. No need to try the keys: counting is enough.

This is called frequency analysis and it is the first attack in history that does not go through brute force. It is also the first time we see the script that will repeat itself until today: a lock that looks invincible, and someone who, instead of trying all the keys, finds a shortcut.

The answer came from Italy. In 1553 Giovan Battista Bellaso described a system in which the substitution alphabet changes with every letter, following a keyword. The same e is encrypted differently each time, and counting frequencies no longer helps. The system went down in history under the name of a Frenchman, Vigenère, and with a nickname: the indecipherable cipher.

It held for three centuries. In 1863 a retired Prussian officer, Friedrich Kasiski, published the method to break it (the Englishman Charles Babbage had got there a few years earlier, and kept it to himself). The shortcut, this time too, was not trying the keys: it was noticing that the keyword repeats, and that repetition leaves footprints.

In the twentieth century encryption stopped being a pen-and-paper job. The Enigma machine, issued to the German army, changed alphabet at every key press thanks to a series of rotors, and the number of configurations was beyond the reach of any team of clerks.

It was read all the same. First by a twenty-seven-year-old Polish mathematician, Marian Rejewski, who in the winter of 1932 reconstructed its wiring with mathematics alone, starting from the first rotor. Then, from 1939, by the Bletchley Park group, where Alan Turing and Gordon Welchman built other machines to take that one apart. Since then the game is no longer played between minds: it is played between machines, and mathematics decides who wins.

Is there a cipher that cannot be broken? Yes, and we know it for certain. In 1917 Gilbert Vernam, an engineer at the American telephone company, built a teleprinter that encrypted by itself. From there, with Major Joseph Mauborgne, came the idea of the one-time key. In 1949 Claude Shannon proved, with a theorem, that a cipher is unbreakable under three conditions: the key must be random, as long as the message, and used only once.

That's where the trouble lies. To encrypt a film I need a key as big as the film, to be handed to you beforehand and in person. And woe betide anyone who reuses it: the Soviets did, because of a printing error in their pads, and the Americans took advantage of it to unmask the atomic spy Klaus Fuchs.

It's worth pausing on this point. Perfect security exists but is impractical. All the cryptography we actually use offers something else: "computational" security. It is not impossible to break. It is too much work, with the methods we know.


One key, two keys

Caesar, Bellaso, Enigma, Vernam: in all these systems the writer and the reader use the same key. It is called symmetric cryptography, and it is still the one that does the heavy lifting today.

The first public standard for computers dates from November 1977 and is called DES. It was born at IBM and was retouched with the advice of the NSA, which not everyone liked. The key was 56 bits: seventy-two million billion combinations. Diffie and Hellman (two names we'll meet again shortly) said straight away that it was too few. They were right, twenty-one years early: in July 1998 the Electronic Frontier Foundation built, for less than 250 thousand dollars, a machine that tried 88 billion keys a second and found the right one in 56 hours.

Its successor was chosen the opposite way, with a worldwide competition opened in 1997. Fifteen candidates, three years of public attacks, and in October 2000 victory for two Belgians, Joan Daemen and Vincent Rijmen. Their cipher became the AES standard the following year and today it is everywhere. With the shortest key, 128 bits, the combinations are 340 followed by 36 zeros. With the 256-bit one it isn't even worth writing the number down.

AES is fast, and it has been under public attack for a quarter of a century. The best result, in 2011, shaved a couple of bits off the margin: a scratch. Its problem is the same as Caesar's: the key. How do I get it to you? Between two embassies you send a courier. Between you and your bank's website, which you have never met, no courier will do. On the internet, where every day billions of strangers need to talk in private, symmetric cryptography alone is not enough.

In November 1976 Whitfield Diffie and Martin Hellman published a paper with a particularly sober title, "New Directions in Cryptography". Inside is an idea that looks like a conjuring trick: two people who have never met can agree on a secret by talking out loud in a square full of people, and the square understands nothing.

The simplest way to tell it is this. I don't give you a key: I give you an open padlock. I hand out as many as I like, to anyone, thieves included. You put the message in a box, snap the padlock shut and send it to me. Anyone can lock. Only I can open, because the key has never left my house.

So there are two keys, and they are different. The public one (the padlock) is for locking and the whole world can have it. The private one is for opening and nobody sees it. That's why it is called asymmetric cryptography, or public-key cryptography. The following year, at MIT, Rivest, Shamir and Adleman found the first practical way to build such a padlock: it is the RSA of Gardner's challenge.

(A digression. In 1997 the British services revealed that one of their mathematicians, Clifford Cocks, had invented the same thing in November 1973. It had stayed in a drawer for twenty-four years, and the Americans at the NSA had a copy too. It would not be the last time in this field that someone knew something long before saying it.)

Asymmetric padlocks have a flaw: they are slow, about a thousand times slower than AES. So in practice the two systems work as a pair. When you open your bank's website, for a fraction of a second your computer and theirs use asymmetric cryptography to agree on a throwaway symmetric key. From then on AES does the work.

That is the first job. The second is the signature, and here the game is reversed. With my private key I put a seal on a document that anyone can check with the public key and that nobody else can imitate. It is the signature that guarantees the website really is your bank's, and that your phone's update comes from whoever built the phone.


Two bets

A lock made of numbers needs an operation that is easy one way and nearly impossible the other.

RSA uses the simplest. Take two prime numbers, 61 and 53, and multiply them: 3233, a child can do it with pen and paper. Now the reverse: I give you 3233 and ask you which two primes produced it. You have to go by trial and error. With four digits it's a matter of minutes. With more than six hundred digits, which is the size in use today, the attempts would not end before the Sun burns out. The product is the padlock, and I publish it. The two primes are the key, and I keep them.

Only, trial and error is the amateur's method, and by now we know how that ends. Mathematicians have found shortcuts, the so-called sieves, which discard whole families of candidates in one go. It was thanks to a sieve that Gardner's number fell in 1994. Since then the record has crept up: 829 bits in 2020, at the cost of about 2,700 years of work for a single processor, and 862 bits in September this year. Normal RSA keys have 2048 bits, prudent ones 3072. The gap is still enormous. But it is because of the sieves that RSA keys have become so long.

The other family dates from 1985, when two American mathematicians, Neal Koblitz and Victor Miller, had the same idea independently. You start from a curve drawn by an equation and from a geometric rule that, given two points on the curve, points to a third. You choose a starting point and apply the rule an enormous number of times, always starting again from the last point found: like a billiard ball bouncing around a strangely shaped table. Start and finish are public. The number of bounces is the secret.

Whoever knows that number gets to the destination in a flash, because there is a way of making the jumps by doubling. Whoever sees only start and finish, as far as we know, has nothing better than a generic method.

And this is the point. For elliptic curves nobody has ever found a shortcut like the sieves. That is why their keys are very short: 256 bits are enough to give the strength of 3072-bit RSA. Short keys mean faster connections and less battery, and so from the early 2000s curves ended up everywhere: in browsers, in phones, in chats, in Bitcoin wallets. They have names like number plates: P-256, X25519, Ed25519.

The brevity, though, is a debt. Those keys are short because nobody has found the shortcut. If someone found it, there would be no thousands of spare bits to burn through.

The strength of a lock is measured in "bits of security", that is, in the number of operations the best known attack needs. A hundred and twenty-eight bits of security means two to the power of 128, a 39-digit number, the same order of magnitude as AES-128 keys. No buildable computer gets there.

The table people in the trade keep in mind is short. RSA at 2048 bits: 112 bits of security. RSA at 3072: 128. The P-256 curve: 128. The P-384 curve: 192.

Note: that figure does not measure the lock. It measures what we know how to do today to open it. If tomorrow someone finds a better attack, the figure drops: a 128 lock might find itself, say, at 100. It isn't broken, but it has less margin than was believed, and whoever can moves to the bigger size.

Then there is a deeper problem. Nobody has ever proven that these operations really are hard to invert: we only know that so far nobody has managed it. That's why the whole system remains a bet. Well placed, won so far, but a bet all the same. Al-Kindi, Kasiski and Rejewski are there to remind us how they usually end.


The machine that doesn't exist

In November 1994 (the year of the ossifrage) the mathematician Peter Shor presented an algorithm with which a large enough quantum computer would undo both bets at once, prime numbers and curves. It would not make them weaker: it would open them outright. Symmetric cryptography would get off much more lightly: against AES a quantum computer gains little, and using the 256-bit key is enough to rest easy.

That computer does not exist. There are lab prototypes, far from the size needed, but there is a reason not to wait for it with your hands in your lap, and it has a formula: harvest now, decrypt later. Whoever records the encrypted traffic of a ministry or a hospital today cannot read it. They can put it in storage and wait. A secret that has to last twenty years is in danger now.

Here the difference comes back. Key exchange is the most urgent job, because today's traffic can be recorded. A signature, on the other hand, cannot be forged backwards: it has to be broken while it is in use. Except that some signatures are welded inside devices that stay in service for twenty years, and there they can't be changed with an update.

That's why for years asymmetric padlocks have been built on different problems, which not even Shor's machine could solve. Post-quantum cryptography, they call it. In December 2016 the American standards body, NIST, opened a competition on the model of the one held for AES. Sixty-nine candidates admitted, years of public attacks, and on 13 August 2024 the first three standards. The two main ones, ML-KEM for key exchange and ML-DSA for signatures, rest on a kind of mathematics called lattices. The third, SLH-DSA, is a backup signature built on entirely different mathematics, in case lattices disappoint.

A lattice is a regular grid of points: the crossings on a sheet of graph paper, but in hundreds of dimensions instead of two. The hard problem is this: given any point in space, find the nearest crossing. On a sheet of paper you can do it by eye. In hundreds of dimensions no efficient way is known, not even with a quantum computer. The padlock is built on top of that. Whoever has the private key knows a detail of the grid that makes it easy to find the right crossing. Everyone else has to search for it, and as far as we know they can't. (Yes, this is another bet too.)

And since it is a bet, the prudent fit the new padlocks in series with the old ones: two on the same door, and to get in you have to open both.

Up to here the plan was clear. There was a threat, the quantum computer, and there was a timetable: ten years or so to change everything calmly. Nobody had considered that someone else might find the shortcut. Not a machine that computes differently, but one that does mathematics.


TL;DR: on Wednesday 2 December the NSA asked for an "immediate" move to the new padlocks, because some artificial intelligence companies told the government about discoveries touching the cryptography in use. Which discoveries and which algorithms, no document says. According to the Financial Times they come from OpenAI and Anthropic and do not concern 2048-bit RSA. Some suspect elliptic curves, but the advisory can also be read as a repeat of rules ten years old. What follows is the chronicle, with sources.

A dinner in Austin

On the evening of Tuesday 24 November Scott Aaronson has guests for dinner. He teaches theoretical computer science at the University of Texas and has kept one of the most read blogs in his field for twenty years. That evening, he says, nobody can tear themselves away from their phones. OpenAI and Anthropic are uploading, one after the other, proofs of mathematical problems that had stayed open for decades. They don't even put out press releases any more, he writes: they just upload the files.

The next day he publishes a post with a title of eight words in capitals, which boils down to "holy shit" four times over. It is almost entirely about mathematics. Then, towards the end, two paragraphs on cryptography. He says that among the results on the way there will also be algorithms capable of breaking systems in use. And he adds, because people keep asking, that he is practically certain that

the AI labs are now sitting on one or more bombshells

Straight after, he sets three boundaries. He hasn't seen the details. He doesn't want to be the one spreading unverified rumours. And he fears that what he was told has been distorted passing from mouth to mouth, like in the game of telephone.

Spoiler: that's exactly what happened. Online the sentence travelled without the boundaries, and merged with another: an answer given the evening before to a reader, in which Aaronson relayed rumours of a fast method for factoring numbers into their primes. He later struck that answer through himself, noting that a rumour is still a rumour. Too late: for half the internet it had become "AI has broken RSA".

On the same 25 November Google really does publish a factoring algorithm. Aaronson looks at it and dismisses it in a comment: a theoretical result, no practical consequence. On Sunday 29 November the rumour reaches Elon Musk, who according to Fortune magazine replies to a user that he too has heard it from several people.

On 30 November two Democratic congressmen, James Walkinshaw and Bennie Thompson, write to the chair of the House Homeland Security Committee. They ask for a closed-door hearing with the federal agencies and with representatives of Anthropic and OpenAI, on the possibility that advanced models can break encryption.

On the evening of that Monday Anthropic publishes four scientific papers. The main one is 283 pages long and has an unusual word in its title: "galactic".

A working title had in fact already been circulating for about ten hours, and in the most ironic way possible. The night before a cryptocurrency entrepreneur, Charles Hoskinson, had written that he had received a briefing on what was scaring everyone. So as not to reveal the paper's title he had published only its fingerprint: a 64-character string that is computed from the text in an instant and from which, in theory, you can't get back to the text. In theory. After a few hours a researcher published a title that produced exactly that string. He hadn't broken anything: he had tried to guess, with the help of two artificial intelligence models that know what the title of a cryptography paper sounds like.

It doesn't concern RSA. It concerns lattices, that is, the new padlocks. It describes an algorithm for quantum computers that, on paper, solves certain problems underlying ML-KEM and ML-DSA faster than was thought possible. On paper, precisely. "Galactic", the authors explain, means

asymptotically fast but too slow for inputs of realistic size

One number gives the idea. For a case of a size still smaller than those in use, a single run requires preparing about 2 to the power of 840 copies of a certain quantum state. That's a 253-digit number. The abstract says it plainly: the algorithm is not practical against the standards. In fact, at the sizes in use it is slower than the attacks already known. The advantage only appears for problems much bigger than real ones.

A group of cryptographers formed in those days, the Cryptography Incident Review Group, had received the results on 16 November. It judges them very far from endangering the standards, but warns:

It is reasonable to expect that the attack will be improved

Anthropic itself, according to the press, speaks of no practical consequence but of lower long-term confidence in "structured" lattices. The next day, Tuesday 1 December, the reassurances arrive. Cloudflare's cryptographers write that the research is purely theoretical. The British National Cyber Security Centre lets it be known that its advice is unchanged.

It looks like the end of it. A rumour about RSA disproved by the facts, a real but harmless result on lattices.


Wednesday 2 December

The next day, from Fort Meade, the NSA publishes a press release. It asks those who run national security systems to accelerate "immediately" the move to post-quantum cryptography. The reason is in black and white: frontier companies have told the government about recent discoveries that touch the security of some cryptographic systems in use. Together with the already known concerns about quantum computing, says the NSA, this constitutes

a significant threat to cryptographic systems protecting sensitive information

The same day a joint statement comes out. It is signed by three offices: the NSA itself, the civilian cybersecurity agency (CISA) and the White House Office of the National Cyber Director. It confirms the discoveries. Then it says that, having heard from the companies, the recent advances

do not present an immediate and widespread threat to that cryptography

Significant on one sheet, not immediate on the other. The two sentences don't contradict each other to the letter (a threat can be serious without being due tomorrow morning), but the tone is opposite, and the NSA signed both.

Then there is a detail of vocabulary. Neither text contains "AI" or "artificial intelligence". It contains "SI", which the joint statement spells out as "Super Intelligence". The statement doesn't name RSA, doesn't name elliptic curves, doesn't name NIST. It only says that the most recent models have solved mathematical problems unsolved until now, and that this has consequences for cryptography.

Attached to the press release is a seven-page technical advisory. It is the most surprising part of the affair, because there is almost nothing surprising in it.

It doesn't talk about discoveries. It doesn't talk about companies. It lists six things to do: inventory where cryptography is used, update servers, prepare the new certificate infrastructure, replace the old certificates, update software, isolate what can't be updated. It contains no deadlines.

Two passages, though, have been read and reread by half the world.

The first is the list of algorithms to look for in your own systems. Among the examples are

elliptic curves other than P-384 or P-521

That is, in practice, all the 256-bit curves: the ones with number-plate names.

The second concerns certificate roots, the signatures all the others descend from. The advisory asks for 3072-bit RSA or the P-384 curve as the base. A footnote tolerates 2048-bit RSA for old systems.

A note on elliptic curves

Elliptic curves, the ones with number-plate names, don't become post-quantum by lengthening the key. A large enough quantum computer opens them all, from P-256 to P-521, from X25519 to Ed25519, with the same Shor algorithm that also undoes prime numbers. It is not a question of size: it is the mathematics itself that gives way. That's why, when people talk about post-quantum padlocks, they don't mean a sturdier curve. They mean a different mathematics, the lattices of ML-KEM and ML-DSA. There is a middle way that still uses curves, but differently: isogenies, maps between supersingular curves. It is the family SIKE belonged to, the candidate that in 2022 was opened in an hour by an ordinary computer. Research continues on different schemes, but it is not the road the standards and agencies are taking.

What is really being fitted, in these months, is a transitional solution. It's called hybrid, and it's the idea of two padlocks on the same door. The old padlock, an elliptic curve, has been tested for years, but a quantum computer would open it. The new one, based on lattices, resists the quantum computer, but it is young and could hide a flaw nobody has seen yet. Fitted together they cover each other: to get in you have to open both, so it's enough for one to hold. The most used is called X25519MLKEM768, and both are in the name: the X25519 curve, fast and already everywhere, and ML-KEM-768. It is already active in most browsers and large websites, and protects today's traffic against those who record it while waiting for the quantum computer. It doesn't solve the problem of long-term signatures, and if the elliptic part really weakened only the lattice would remain. But it is the concrete way in which, in practice, the locks are already being changed without switching off the internet.

During the night a third statement arrives. Two sentences, eight signatures: Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI, Oracle. They back the government's line and ask everyone to

accelerate the migration as soon as possible

Competitors who agree on nothing, agreed on two lines.

Only one says a little more: Matthew Prince, who runs Cloudflare. According to Euronews and a timeline published online, he writes that his company has received a briefing, that it is serious, that he can't give details. To those asking what is involved he replies to assume that everything using RSA or elliptic curves is involved. To those asking whether 2048-bit RSA has been broken he replies:

There are things worse than that.

Later he clarifies that the briefing received that day was kept separate from what had been announced previously. The reply about "things worse", according to two outlets, was later deleted. According to another it simply stopped loading.

On Thursday 3 December, in the early afternoon, Bitcoin is worth about 51,600 dollars: 12 per cent less than the day before, writes Euronews. Bitcoin wallets are locked with a 256-bit elliptic curve. But the advisory wasn't the only reason to sell: US Treasury bonds were yielding more than 5 per cent and in November 6.2 billion dollars had flowed out of Bitcoin funds. The market was already falling.

In Europe the reactions arrive on Thursday. The German Federal Office for Information Security recommends a rapid move to quantum-resistant cryptography. It sees no immediate, large-scale danger, but its president, Claudia Plattner, says a threat to current methods cannot be reliably ruled out.


What can be deduced

Here four levels need to be separated.

What the documents say. Some companies have told the US government about discoveries concerning cryptography in use. The government judges them serious but not imminent. It asks for a rush towards lattice padlocks. No document says which companies, which discoveries, which algorithms.

What the press writes. On Thursday 3 December two articles came out. The first is from the New York Times: according to people familiar with the matter, in recent weeks the NSA asked OpenAI and Anthropic to suspend their cryptography research and leave it to a small group working with the agency. Dustin Volz, one of the three authors, commented on X:

The ask reflected growing concerns about where this is going

A few hours later came the Financial Times, with the bylines of Cristina Criddle, Stephen Morris and Tom Wilson. What set off the alarm, they write, were discoveries by OpenAI and Anthropic, communicated privately to the government. Two people familiar with the matter told the paper that 2048-bit RSA has not been compromised. One source added that Anthropic's "galactic" paper has nothing to do with it: it is being confused with the more serious revelations.

These are anonymous sources, and should be taken as such. But in the same article there is a voice with a name and surname. Ollie Whitehouse, chief technology officer of the British National Cyber Security Centre, confirmed that the discoveries concern

other algorithms currently in use

and that there is no immediate threat. Which algorithms, nobody has said. And the NSA, OpenAI and Anthropic have not commented.

What can be ruled out. It's unlikely that the alarm concerns lattices. If the problem were there, it would make no sense to push everyone in exactly that direction, and Anthropic's paper declares its own harmlessness. It's also unlikely that it concerns RSA in a serious way: the technical advisory names it as an acceptable fallback, and the Financial Times sources point the same way.

What some hypothesise. Filippo Valsorda is an Italian cryptographer who led cryptographic security for the Go language at Google. That same evening he published a reading of the advisory: according to him the message between the lines is that 256-bit elliptic curves are probably broken, or much weaker than expected, and by an attack on ordinary computers. The clues are the ones seen above. The 256-bit curves are on the list, RSA isn't, and the bigger curve is named as the fallback. The hypothesis is serious and comes from a competent person. But it has two limits.

The first he declares himself: the post, he warns, is

hastily drafted, sorry

The second lies in the advisory's appendix. The list is not presented as "affected algorithms". It is presented as "algorithms not approved by NSA rules". And those rules, reported in a table dated October 2016, already allowed back then only one curve, P-384, and RSA keys of 3072 bits and up. 256-bit curves have been out of American classified systems for ten years. So there is an entirely mundane reading: the NSA repeated its usual rules.

Which of the two readings is right, I don't know. In Valsorda's favour there remains a question: why repeat rules ten years old with the word "immediately", on the very day discoveries are announced? In favour of the mundane reading there remains a fact: the document says nothing else.


References and further reading

The documents

The news

The history