notes

Credentials: what is proven, and where

Name: provisional, after the parent's own heading.

An appendix to notes/credentials.md. It lists every host test, proof and guest test behind the credential service, and what each pins.

Host tests (cargo test -p credentialer -p credential_contract, milliseconds, no emulator):

Proofs (script/verify, three Kani harnesses over credential_contract, 30 checks, 0.2 s). Both properties are about what an adversary can send or receive, and an adversary is not limited to the values a test author thought of:

Guest tests (system_tests/src/user/credential_tests.rs, on aarch64 and riscv64, same assertions):

The guest fixture

credential_tests::provisioned wires the entropy service, the credential service and the provisioner once per boot, and every guest test that needs the sealed store calls it. The seal is irreversible, so there is no way to ask for a second wiring. The service sends its readiness word between the seal and its serve loop, and a SEND on this kernel blocks until somebody receives. So the fixture drains that word before it returns. A test that let a client CALL first would find a service that had not reached its serve loop, and the boot would deadlock with a sender and a caller both waiting on nobody. The entropy service does not show this, because its wiring receives at once.

Two opcode spaces

The provision endpoint and the verify endpoint number their opcodes independently, because the endpoint gives a number its meaning. provision::PUT and verify::VERIFY are both opcode 1. So an attacker's PUT on the verify endpoint is a verify of an identity nobody provisioned, and the honest answer is MISMATCH. There is no privileged request to refuse. provision::SEAL is opcode 2, which the verify endpoint does not serve, so it answers MALFORMED. If the verify space grew an opcode 2, the same word would become that request instead. Nothing would break, because a word arriving at a serve loop never carries authority.