A Cube that decides on its own, with no network, must be able to account for itself afterwards. Yet its log only reaches the server in a contractor’s phone, that is, in someone’s pocket. How can we know, on arrival, that nobody removed or doctored a line along the way?
Update of 28 November 2026.
Since 20 November, the log no longer travels only in a contractor’s pocket. The connected Cube now sends it over 4G itself, encrypted for the server alone and signed by the Cube. The server verifies the chain as it does for the phone, then replies with a signed acknowledgement; the Cube keeps its entries until it has received it, to send them again when the network returns. Synchronisation through the phone remains the fallback path.
Since 28 November, the log can be read hour by hour in the “Activity” tab of our console. It is also what the Knowledge Factory relies on to explain an alert, and the proportion of logs successfully received is one of the metrics we propose in Making a connected device last.
A log that takes the bus
Since July, our Cube has worked without a permanent connection: it applies its rules on site. A phone brings it rule updates and takes its log away (we told that story in The Cube decides on its own). This choice has a direct consequence for the value of the log, since the log may be about the very bearer of the phone. So we could not take the bearer’s word for it, nor the phone’s.
In August we also had a much less subtle problem: the log lived in RAM. Restarting the Cube was enough to erase the entries that had not yet been collected, and the numbering started again from one. The note we wrote that day is five words long: “a reboot lost the proof”. For a log we dared to call a “proof” log, that was awkward.
What exists: logs that cannot be rewritten silently
The problem is old and well studied. In 1991, Stuart Haber and Scott Stornetta proposed, in How to time-stamp a digital document, linking each time-stamped document to the previous one by a hash, that is, a fixed-size digest that changes as soon as a single bit of the document changes. Bruce Schneier and John Kelsey then described, in Secure Audit Logs to Support Computer Forensics, the case that concerns us. A machine that is not safe from attack keeps a log, and the aim is that what has been written can no longer be modified or destroyed without it showing.
The most widely deployed version of this idea is Certificate Transparency, through which the Web’s certificate authorities record their certificates in public, append-only logs. These logs use a Merkle tree, a structure of nested hashes that makes it possible to prove that an entry is indeed in the log, or that today’s log extends yesterday’s, without rereading everything. In Efficient Data Structures for Tamper-Evident Logging, Scott Crosby and Dan Wallach showed the advantage of these trees over a simple chain once the log grows large and many people want to check it.
What we chose: a chain, quite simply
We picked the most modest form in the family. Each log entry carries a hash computed from the hash of the previous entry and from its own content. So each line holds the one before by the hand, and if one is removed or altered, every hash after it becomes wrong. The server, which remembers the last hash it verified, recomputes the sequence at each upload.
At the same time, the log moved out of RAM into the board’s non-volatile storage, with an entry number that only ever increases throughout the Cube’s life. We write one record per entry rather than one large block rewritten at each event, because flash memory wears with every write and a log, by its nature, writes often.
Why a chain and not a tree? Because our situation is far simpler than the Web’s. There is a single writer, the Cube, and a single verifier, the server, which rereads everything it receives. The compact inclusion proofs that make a Merkle tree worthwhile would be of no use to us today, yet they would cost code on a microcontroller.
What this proves, and what it does not
The server does not answer “good” or “bad”: on that day it returned one of four verdicts, and we insist on the distinction because “could not verify” is not “verified”.
| Verdict | What the server found |
|---|---|
| Verified | The chain recomputes with no mismatch from the last known entry. |
| Not chained | The Cube provides no hash (older firmware). |
| Gap | Entries are missing between what the server knows and what it receives: it draws no conclusion. |
| Broken | An entry has been modified, or the previous one has been removed. |
On the day it went in, seventeen automated tests checked that removing an entry, modifying its detail, lowering its severity level and moving its timestamp were all detected. The phone application, for its part, carries the hashes without ever producing any.
One limitation remained, which we wrote down the same day so as not to fool ourselves: a chain makes the log consistent, not authentic. The hashes contain no secret, so someone who made up an entire log could recompute all its hashes, and the result would be perfectly consistent. Indeed, one of the seventeen tests documented this limitation rather than hiding it.
Since then: the Cube signs the head of the chain
The answer came on 18 September, when each Cube received its own key pair (see Encrypting above Bluetooth). The Cube now signs the last hash of its chain. Since that hash depends on all the entries before it, a single short signature, detached from the log, covers the whole chain up to that point, and there is no need to sign each line. This is, in miniature, the “signed tree head” principle of Certificate Transparency, which its version 2 describes in detail.
The signature also let us deal honestly with gaps: a gap is never erased, it stays on record and raises an alert.
What it costs, and what is not covered
A chained and signed log proves that what arrived has not been altered since the Cube wrote it. It does not prove that the Cube saw everything, nor that it told the truth, nor that the log is complete. A small box has finite memory, and someone has to come and collect the log. Nor is the log addressed to the public. Certificate Transparency relies on independent observers who compare what the logs show to each party, whereas our log has only one reader, the server. It is a tamper-evident log between two parties, not a transparent log.
Where we stand.
This is a bench prototype. On 18 September, we verified on the hardware that a batch of entries was uploaded with a verified chain and a signed head. In October, we added two things: the Cube accepts the acknowledgement only if the server has signed it, and a loss of entries is counted and then recorded in the log itself. We still have to house the signing key in a protected hardware component and carry on hardening verification on the server side. So when our site speaks of a signed, append-only log, read it, for now, as “demonstrator”.
Sources
- S. Haber and W. S. Stornetta, How to time-stamp a digital document, Journal of Cryptology, 1991: the idea of linking records by their hashes.
- B. Schneier and J. Kelsey, Secure Audit Logs to Support Computer Forensics: keeping a log on a machine that is not trusted.
- S. Crosby and D. Wallach, Efficient Data Structures for Tamper-Evident Logging, USENIX Security 2009: chains and trees compared.
- RFC 6962 and RFC 9162, Certificate Transparency, versions 1 and 2: public append-only logs and signed tree heads.
- Espressif, Non-Volatile Storage Library: the non-volatile storage where the Cube writes the log.
A question, an objection? contact@ops-devices.eu, or on Bluesky.