Skip to main content

ProvenanceAttestation

Struct ProvenanceAttestation 

Source
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: String

The sha256:<hex> commitment this attestation signs — a frame_commitment for a single frame, or a merkle_root for a result set.

§key_id: String

The 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: String

The 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: String

The attesting authority — who is accountable for the claim, as distinct from which key mechanically produced it.

§signature: String

The 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: String

When the attestation was issued (a SPEC.md §F4 protocol timestamp).

Implementations§

Source§

impl ProvenanceAttestation

Source

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.

Source

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.”

Source

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

Source§

fn clone(&self) -> ProvenanceAttestation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProvenanceAttestation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProvenanceAttestation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ProvenanceAttestation

Source§

impl PartialEq for ProvenanceAttestation

Source§

fn eq(&self, other: &ProvenanceAttestation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ProvenanceAttestation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ProvenanceAttestation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.