pub struct ProvenanceAttestation {
pub signed_commitment: String,
pub key_id: String,
pub algorithm: String,
pub attester_id: String,
pub signature: String,
pub issued_at: String,
}Expand description
A detached attestation binding one frame’s provenance to a signing identity
(SPEC.md §6.5).
Detached, always. Like the lifecycle profile’s
RecordAttestation, this never travels inside
the preimage it signs. Re-signing after a key rotation, or a second attester
countersigning the same frame, must not perturb the frame’s content-addressed
identity — and it cannot, because the attestation is metadata beside the
frame rather than a field within it.
It is a distinct type from RecordAttestation even though five of six
fields match. The two sign different preimages under different domain tags,
and a shared type would invite the one mistake the domain separation exists
to prevent: presenting a record attestation as a frame attestation. The
cryptography already refuses that; the type system should make it unsayable.
Fields§
§signed_commitment: StringThe sha256:<hex> commitment this attestation signs — a
frame_commitment for a single frame, or a merkle_root for a
result set.
key_id: StringThe signing key’s id. Rotation is expressed by a new key_id, never by
reusing one, so an archived attestation always names the exact key that
produced it.
algorithm: StringThe signature scheme, e.g. ALGORITHM_ED25519.
A string rather than an enum: a verifier that does not recognize the
value returns AttestationVerdict::UnknownAlgorithm and declines,
which is a safe failure. Freezing the set into an enum would make
adopting a post-quantum scheme a breaking wire change, and this protocol
promises no flag day inside a major family.
attester_id: StringThe attesting authority — who is accountable for the claim, as distinct from which key mechanically produced it.
signature: StringThe detached signature, lowercase hex.
Hex rather than base64 to match the sha256:<hex> convention every other
digest in this protocol already uses; one encoding across the wire
surface is worth more than the 40 bytes base64 would save.
issued_at: StringWhen the attestation was issued (a SPEC.md §F4 protocol timestamp).
Implementations§
Source§impl ProvenanceAttestation
impl ProvenanceAttestation
Sourcepub fn new(
signed_commitment: impl Into<String>,
key_id: impl Into<String>,
algorithm: impl Into<String>,
attester_id: impl Into<String>,
signature: impl Into<String>,
issued_at: impl Into<String>,
) -> Self
pub fn new( signed_commitment: impl Into<String>, key_id: impl Into<String>, algorithm: impl Into<String>, attester_id: impl Into<String>, signature: impl Into<String>, issued_at: impl Into<String>, ) -> Self
Build an attestation from its parts.
Sourcepub fn uses_known_algorithm(&self) -> bool
pub fn uses_known_algorithm(&self) -> bool
Whether this attestation names a scheme this revision defines.
Advisory: a verifier reports AttestationVerdict::UnknownAlgorithm
rather than treating an unrecognized scheme as a failure to validate.
The distinction matters to an auditor — “I cannot check this” is a
different finding from “this is forged.”
Sourcepub fn has_well_formed_issued_at(&self) -> bool
pub fn has_well_formed_issued_at(&self) -> bool
Whether issued_at is a well-formed protocol timestamp (SPEC.md §F4).
Trait Implementations§
Source§impl Clone for ProvenanceAttestation
impl Clone for ProvenanceAttestation
Source§fn clone(&self) -> ProvenanceAttestation
fn clone(&self) -> ProvenanceAttestation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more