Verdicts and threat model
Every checked unit, an event or a snapshot, gets exactly one verdict, written to Kafka beside what it judges. A verdict names the device, the counter, the build digest and the twin digest, so each one is evidence about a specific signed build.
How a verdict is reached
Section titled “How a verdict is reached”- Authenticate. Decrypt if encrypted. Verify the COSE_Sign1 signature with the device key, whose certificate chains to the secure element’s manufacturer. Check that the build digest is a subject of a verified provenance attestation, and that the twin digest is the one attested for that build.
- Order. The counter must be the last one plus one, and the previous-event hash must match. A lower counter with the same hash is a duplicate; a jump is a gap; a hash mismatch is a broken chain.
- Step the twin. In same-machine mode, feed the device’s input to the twin and compare state and emits. In model mode, check that the observed event is a transition the twin allows from its current state, then take it.
- Record. Write the verdict, and advance the twin only on a conforming event.
The seven verdicts
Section titled “The seven verdicts”| Verdict | Meaning | Typical response |
|---|---|---|
| Conforms | Authentic, in order, and what the twin predicts or allows | None |
| Duplicate | The same signed event again, from at-least-once delivery | Drop silently |
| Gap | The counter jumped: events were lost or withheld | Alert; the twin waits or resynchronizes |
| Unauthenticated | Signature, certificate or hash chain fails | Quarantine the device |
| Unattested build | The build or twin digest has no valid attestation | Quarantine; the device runs unknown software |
| Divergent | Same-machine mode: the twin computed a different state or emit | Incident: tampering or a runtime defect |
| Illegal transition | Model mode: the event is not allowed from the current state | Incident or a model gap, triaged by a person |
A verdict is evidence about behaviour. It is not a legal finding, a certification or a safety function.
Threat model
Section titled “Threat model”The design detects most tampering after the build and much misbehaviour at run time. It cannot prove that software is benign, and it sees only what the events show.
| Threat | What detects it | What remains |
|---|---|---|
| A malicious dependency enters the build | The SBOM names it; provenance names the build that took it in | A signature does not make code benign; the twin catches it only if behaviour changes |
| The CI identity is abused to sign a bad build | Every signing is in the transparency log; monitor it for your own identities | Detection, not prevention: revoke and rebuild |
| A device runs other software | The attestation token’s measured digest has no attestation: Unattested build | Depends on measured boot being sound |
| Events are forged or replayed | The secure-element key, the counter and the hash chain | None, while the key stays in the chip |
| The broker or Kafka drops or reorders events | Counter and hash chain: Gap | An attacker can still delay or withhold |
| A device goes silent | The twin expects a heartbeat event within a deadline | The deadline sets how late it is noticed |
| Software emits correct events but does the wrong thing | Only as far as events reflect real effects | Sign inputs and outputs close to the hardware |
| The secure element is physically attacked | Out of scope | Revoke the device certificate |
| The twin itself is wrong | Replay over history before release; triage of illegal transitions | False alarms and blind spots until the model is fixed |
| The twin service is compromised | Out of scope today | Open question: sign verdict batches with the service’s own Sigstore identity |