Contents

Close

ESEN

Writing6 min read

The scale nobody steps on

A formal proof can come out green without measuring anything. In a recent review I showed it by putting the forbidden thing into the model, and it still said verified.

Not long ago I was asked to carry out the independent technical review of a secure communication system that came with a large set of formal proofs, which are statements written in a language so precise that a program can check them unaided, and every one of them came out green, the colour that program uses for whatever it accepts. Their author was not a specialist in the field and had produced them largely with the help of artificial intelligence tools, something increasingly common, and the documentation summed up all that effort with the most reassuring word in this line of work, verified.

That word puts me to work. A “verified” is an invitation to look at what was verified, and few people take a proper look, because green is very convincing and costs little effort.

A formal proof is made in 2 stages. First someone describes the system in that precise language, with its participants, the messages they exchange and what each of them knows at each moment, and that description is called the model. Then you write down the property you want to guarantee, for instance that no outsider can read a conversation, and the program works through the model and checks, tirelessly and without being talked round, that the property holds in every case. When the program says yes, the yes can be trusted, although what it cannot say is whether the model resembles the system it claims to describe.

That is why a proof can be flawless and still measure nothing, when the property it was meant to prove was already taken for granted inside the model. It is the scale nobody steps on, which always shows the correct weight, 0 kilos, without a gram of deviation year after year, so no inspector could fault it even though it has never weighed a single person.

This happens more and more, because today anyone can produce mountains of formal proofs that the program accepts in green without fully understanding what they model. The tools write quickly and the checking program never tires, and the only link that has not sped up is someone reading the model and asking what is inside it. I am happy for a tool to write the proofs, provided a person decides what gets modelled, because in a formal proof that decision is most of the work.

The path that did not exist

The first thing I decided was not to accept the declared results, so I ran the proofs again myself, they came out green as promised, and I began the part that takes time, which is working out what each one really establishes.

The system has a central figure who administers it, someone who signs up everyone else and through whom most things pass, and the underlying question was whether that figure could ever learn the secret that protects communication between the others. In a system like this it is the question that matters, because the promise is that other people’s conversations stay closed to whoever administers it, even with access to everything else, and the documentation said it had been proved that the administrator could not learn it. If that secret leaked, everything the system promises to protect would be in the hands of a single account, however well encrypted the rest might be.

The proofs were valid, and the program was right about everything it claimed, because what was missing lay in the model, which did not contain the mechanism meant to guarantee that property. The keys, which are the secrets each conversation is encrypted with, appeared ready-made, handed over by the model itself without any participant ever negotiating them, so the proof held because the secret never passed anywhere that figure could pick it up, and it never passed anywhere because in the model the path did not exist.

The experiment I used to confirm it comes with its full share of numbers, and anyone content with the conclusion can leave it for another day.

Put like that, the finding is an opinion, however well argued, and I wanted a fact nobody had to take on trust, so I added about 20 lines to the author’s own model, 3 of which were a rule doing exactly what was forbidden, because with it the central figure supplied the secret and therefore knew it. If the check was any use, it had to go off.

The check that existed to detect that still came out verified, and the new rule even took part in 6 cases of the proof itself, so the program was using it to conclude that everything was in order. In the same model, a statement written the way the documentation promised fell over in 3 steps, because the model had never been built to put up any resistance to that question.

With the additions removed, the file went back to being the original byte for byte, meaning identical down to the last character, so the result depended on no other change. I handed over the experiment with the small program that generates it, so that anyone can repeat it in a few minutes and see the same thing with their own eyes, without having to trust my reading of the model or my experience, because a finding that can be repeated leaves no room for matters of taste.

A match underneath

To my mind, the only serious way to validate a check is to try to break it on purpose, because if you plant the fault it is supposed to detect and it still says everything is fine, the check was no use. A smoke alarm that certified itself would be in the same position, since it would pass every test if the test consisted of asking it whether it works, and to find out whether it works you have to light a match underneath and wait. Those 20 lines were that match, lit inside the author’s own model so that the smoke would rise where anyone could see it.

Counters mislead in the same way, without anyone having to lie. In the material I reviewed, a single property name covered more than 30 different statements, and more than 100 names were attached to several formulas, so a tally along the lines of “36 out of 36 properties verified” stops meaning what it appears to. It is like recording 36 different ailments under the word fever and then announcing that 36 out of 36 have been cured, where each cure may be real and the total still does not say what has been cured.

None of this takes anything away from what did work, and in the review I wrote it down in the same detail. There was real formal evidence in several parts of the system, with checks that genuinely discriminated, the kind that go off when they should, and at one point the author had written that an attempt of his had not reached a result and that he was not claiming it, which is what should be done and what fewer people do than ought to. A line like that says where knowledge ends, which is the first thing anyone who has to trust a system looks for, and so I noted it with the same care as the main finding.

It ties in with something I discuss in A model without brakes goes no faster, because very powerful tools, in the hands of people without specific training, produce in good faith artefacts that look very good on the outside and are empty inside. What separates one artefact from the other is a person with judgement who compares the output with the source, who reads the model and asks whether it resembles what it claims to describe, and that person is still needed even as the tools write faster and faster.

Before you believe a scale, you have to step on it.