How a receipt works

Locker keeps every automation run in a signed chain and hands back a receipt for each one. This page is the receipt explained once, and a real one you can try to break.

Three questions a receipt answers

Is this the run data that was recorded?

The receipt carries a SHA-256 fingerprint of the run data, byte for byte. Hand anyone the run data and the receipt and they can recompute the fingerprint themselves. A changed byte is a different fingerprint.

Was it recorded at this position, by this install?

Every receipt names the one before it by fingerprint. The install signs each receipt with a P-256 key whose public half is in the receipt, so a signature that verifies ties the receipt to that install and to nothing else. Change a receipt and its own fingerprint changes; change an old one and every receipt after it stops linking.

Can I check it without FlurryPORT?

Yes. The receipt page recomputes everything in your browser; the export bundle carries a verifier that runs under Node with no packages and no network; and the daily root of every chain is shown on the anchors page, so anyone who keeps a copy can show what the chains looked like that day.

The chain, drawn

A Locker archive is a tamper-evident log: a hash chain in which every entry is signed. Nothing in it is new. Each part is a standard building block, and each is there for a reason.

1The run datainputs, outputs, status, in JSON2The fingerprintSHA-256, and a fields roothashedInstall keysigns it4The chaineach receipt links to the one before itThe receipt beforeback to the first3The receiptfingerprinted and signedThe next receiptlinks back to this one5The daily rootone hash for the dayEvery other chainits head, the same dayThe root of the day beforefolded inthe head of the chain, once a day
1

The run data

What the workflow posted: inputs, outputs, status, in JSON, up to 1 MB.

The message

It is the thing being proved. Every other part is there to show it was recorded and has not changed since.

2

The fingerprint

SHA-256 of the run data, and a fields root built from salted hashes of every field, so one field can be removed later and the rest still prove out.

A cryptographic hash, and salted hash commitments

Change one byte and the hash is different, so anyone holding the run data can check it against the receipt. A hash for each field, each with its own salt, lets one field be removed without leaving it open to guessing.

3

The receipt

Receipt id, install id, chain position, the previous receipt’s fingerprint, both document fingerprints, the time, the key id; fingerprinted and signed.

A digital signature, with the public key on the receipt

A hash alone proves little, because anyone can compute one for a changed document. Only the holder of the install’s private key can sign (ECDSA on the P-256 curve). The public key travels on the receipt, so it checks in a browser with no account and no call to us.

4

The chain

Each receipt links to the one before it back to the first. The install’s head moves one position per run; two writers racing for the same position lose, never both win.

A hash chain

Each receipt holds the hash of the one before it, which fixes the order. Change or remove an old receipt and every receipt after it stops linking.

5

The daily root

Once a day the head of every chain is folded into one hash with the day before. It is shown on the anchors page and in the feed that page reads.

Anchoring

A chain proves its own order, not that it is the only version of itself. A root that anyone may copy pins what every chain looked like that day.

What keeps a record honest

Every run hands a receipt back to your workflow, and an export holds every receipt. Those copies are yours. If a chain were ever changed on our side it would no longer match them, and anyone holding one could show it.

That is what tamper-evident means. A change cannot be hidden from someone who kept a copy.

Try to break one

This is a real receipt from Locker’s published test vectors, with the run data it fingerprints, checked in your browser right now. Open Check it, change anything, and watch the checks turn. The private key is not here, so nothing you change can be signed again: that is what tamper-evident means.

What a receipt does not prove

Check our work, or start using it

This is what one looks like on its own page: a sample receipt. It was made with invented data, and its Check it tab already holds the run it covers.

The format is written down in full, with the hash, the signature and the key, at Locker receipt format. It comes with a file of test vectors that our own writer and verifiers are tested against.

Receipts come from Locker, a signed archive for automation runs. An agent’s action through a pipe gets a different kind of receipt: see Agent action receipt.