Expand description
Signed storage attestations — the durability verdict in a form a client can keep (SSoT: Transfer — Durability: Signed Storage Attestation).
POST /v1/storage/verify answers whether the server holds what a client is about to stop
holding. Unsigned, that answer is a claim the server can later deny. Signed under the server
attestation key — the key that signs custody receipts — and bound to
a nonce the client chose, it is evidence: an honest server’s self-reported loss and a periodic
audit both become statements the server cannot take back.
§Why this lives in crypto
For the reason crate::crypto::receipts does: the server that signs an attestation links
capsule-core without native, and a signed structure defined at both ends stops verifying
the day either copy gains a field. One definition, ungated and shared. It must stay
std::fs-free; persisting an attestation is the client library’s business.
§What the nonce is for
A signed verdict with no client contribution can be replayed: a server that once held the
bytes could answer a later audit with the old signature. The nonce is 32 bytes the client
draws fresh per request and checks on the way back, so an attestation proves the server looked
after the client asked. checked_at is the server’s clock and evidentiary only; freshness
rides the nonce.
§What a client checks
verify_storage_attestation accepts an attestation only when the signature verifies under
a pinned attestation key, the version is this one, the nonce is the one the client sent, and
the verdicts answer exactly the question the client asked — the same assets in the same order,
each with the same declared hashes in the same order. An attestation that answers a different
question is not evidence about this one, however validly it is signed.
Structs§
- Attested
Asset - One asset’s verdict, as signed.
- Attested
Blob - One declared blob’s verdict, as signed.
- Declared
Asset - One asset the client asked about, with the hashes it declared — what an attestation must answer.
- Storage
Attestation - A signed storage attestation: a
StorageAttestationCoreplus its hybrid signature. - Storage
Attestation Core - The signed core of a
StorageAttestation— every field the attestation key covers.
Enums§
- Attestation
Rejection - Why an attestation was rejected. Every variant means it is not evidence for this request.
Constants§
- ATTESTATION_
NONCE_ LEN - The length of the client’s nonce, in bytes.
- STORAGE_
ATTESTATION_ VERSION - The schema version every storage attestation carries.
Functions§
- verify_
storage_ attestation - Verify a storage attestation for one request.
Type Aliases§
- Attestation
Nonce - The client’s per-request nonce.