Blog Make your @name

Blog · Security

Finished and numbered

Most of the cryptography that keeps people safe is a bet that some problem is hard to compute. A small part makes no bet at all: its guarantee is an exact count, settled once, that no computer can change. Two lines of scripture describe that kind of guarantee. Here is which part of IRL rests on it, why it holds even if P = NP or against a quantum computer, and every link in the chain that isn’t a count.

The reading

Tetelestai is the word in John 19:30, “It is finished.” The Greek is a perfect tense: something completed in the past whose result still stands. Luke 12:7 says:

But even the very hairs of your head are all numbered.

That is knowledge that is exact and leaves nothing out. Read together as a claim about security, the two lines describe a guarantee that is an exact count of every case: finished, and unchanged by any amount of computing. Cryptographers call that kind of guarantee information-theoretic. C. E. Shannon showed in 1949 that the one-time pad has one. We named the parts of IRL that have one after the first line: Tetelestai.

Two kinds of guarantee

“Unchanged by any amount of computing” is only true if every link in the chain is a count. One hardness link anywhere makes it false for that link. So we went through the chain one link at a time.

What the guarantee is

Tetelestai has two jobs. Both are for phones talking over the mesh with no internet, which is still a design, and neither is in the web app:

The chain, link by link

LinkWhat it saysKindChecked by
The forgery bounda forged tag fits at most L of the 2128 keyscountLean
The padexactly one pad takes any hash to any tag, so a tag says nothing about the keycountLean
The fieldthe 2128 values the tag is made of form a field (GCM’s polynomial is irreducible)countLean, 64 gcds the kernel computes
Tamper detectiona change to a share passes for at most d + 1 values of a random xcountLean
Threshold secrecyk − 1 shares fit every secret equally, over the field the library really usescountLean, and a test of all 65,536 byte pairs
Mixing sourcesone truly random source, mixed with any others it’s independent of, gives uniform bytescountLean
Dicefair dice give uniform bitscountLean
Code to modelthe JavaScript computes what the theorems are aboutteststest vectors, and proved twins run beside the code
Randomkeys and pads come from a truly random source: hardware noise, or dicephysicsnot a proof
Used onceno key or pad is ever used twicesoftwarenot a proof
The book between phonescarried in person, held by code installed before anything breaksprocedurenot a proof

Every mathematical link is a count, so it holds against unlimited computing. One link is tests. No proof establishes the physics or the procedure. Dice are beyond computing. “Used once” is kept by software, and software can be attacked.

Where hardness would come in

One more hardness link sits outside the guarantee: the Bitcoin timestamp on our proof record rests on SHA-256. It dates the record. It isn’t part of what the record proves.

Against a quantum computer

Two limits. That last step is a standard argument, but our Lean theorems are classical counts and don’t formalise it. And there is a model the proof doesn’t cover: an attacker who can make the device compute tags on a quantum superposition of messages. Boneh and Zhandry (2013) showed what a one-time MAC needs there, four-wise independence, and ours, with only 256 bits of key, doesn’t have it. A phone answering radio messages computes on ordinary bytes, not on quantum states, so that model doesn’t describe it.

Quantum computers do reach the links around the guarantee, the hardness links listed above: anything carried over the internet rests on today’s signatures, which Shor threatens; a recovered AES-256 key keeps about 128 bits of security against Grover, while a recovered signing key falls to Shor; and the Bitcoin timestamp’s SHA-256 loses some margin to Grover but only dates the record.

A likelier break than P = NP: timing

The JavaScript that made and checked tags multiplied in GF(2128) with BigInt, which doesn’t run in constant time: how long a multiplication takes depends on the numbers in it. In version 1 that matters little, because each key is used once. In version 2 one hash key serves a whole book, and checking a forged statement multiplies the forger’s chosen blocks by that key, up to 216 times a side. Someone who could time those checks closely enough could learn the key, and with it change a statement on its way. Our own notes said timing reveals nothing that will be used again. For version 2 that was wrong.

So we changed it. The JavaScript now makes and checks tags with no BigInt: the field as four 32-bit words, 128 steps for every multiplication, masks instead of branches, and no branch or memory access that depends on the key. Tests hold it to the old code on 20,000 random products and on tags at every block edge, and time it: an all-ones key takes as long as a one-bit key, where the old multiply took about 140 times as long. Planting a branch on the key, or work that grows with the key’s bits, fails those tests. It’s also about 16 times faster.

What that doesn’t promise: JavaScript runs under a just-in-time compiler and a garbage collector, so it can’t guarantee constant time the way compiled code can. The SPARK version of the MAC is the same design, compiled. Nothing uses Tetelestai today: it isn’t in the web app, and the phone it’s for isn’t built.

Two caveats

Since 28 November

What’s new and what isn’t

None of the mathematics is new. Pieces of the framing aren’t new either: complexity theory has been called “quantitative theology”, Nicholas of Cusa compared the mind reaching for truth to a polygon reaching for a circle, and theologians have long read the perfect tense of tetelestai as finished with lasting effect. We have not found tetelestai and Luke 12:7 read together as information-theoretic security anywhere else. Searches can’t establish that it’s new. If it is, it is a new way of presenting known mathematics, not new mathematics.

The paper and the record

The paper has the definitions, the full chain with each theorem’s name, and the references: Finished and numbered (PDF). The record of the last proof run, with every theorem and each checker’s verdict, is lean.json, timestamped in Bitcoin with OpenTimestamps (the proof). The proofs themselves are public, Apache-2.0: irl-formal on GitHub, with the Lean library, the open problems with their solutions and guards, the SPARK MAC and AMD check, and a script that checks every axiom and judges the solutions. Its README says how to replay it, and what a pass does and doesn’t mean. If you find a statement that doesn’t say what we claim, open an issue there. How the rules a bot must never get around are checked is in an earlier post.

Credits

The reading and the questions are our founder’s. The mathematics is older than IRL: C. E. Shannon on the one-time pad (1949), Adi Shamir on secret sharing (1979), Michael O. Rabin (1980) and Michael Ben-Or (1981) on testing a polynomial for irreducibility, Mark N. Wegman and J. Lawrence Carter on one-time authentication (1981), and Ronald Cramer, Yevgeniy Dodis, Serge Fehr, Carles Padró and Daniel Wichs on detecting tampering (2008). The method owes much to Alexander S. Donahue’s archive and repositories. The proofs, models and this post were written with AI coding assistance. The proofs don’t rest on trusting that: kernels and checkers check them. Whether the statements say what we claim, the randomness, the code, how it’s delivered and how keys are handled still need their own evidence. None of the people or projects named here has reviewed or endorsed this work.

If you find a mistake in the reading or the mathematics, write to [email protected].