Skip to main content

BindingProof

Struct BindingProof 

Source
pub struct BindingProof {
    pub member_roots: Vec<(u64, Vec<u8>)>,
    pub alg_epochs: Vec<(u64, Vec<(u64, u64)>)>,
}
Expand description

A cross-algorithm binding proof.

Carries the shared structure every algorithm commits to: the member roots MR₀, MR₁, … (the active per-algorithm roots, opaque digests) and the committed epoch timeline they were bound under. The trusted binding roots BR_i are not stored here — they are supplied to Self::verify as trusted inputs, because their origin is established out of band.

Fields§

§member_roots: Vec<(u64, Vec<u8>)>

The shared member roots: (alg_id, MR) for each algorithm active at the committed tree size, sorted by algorithm ID. Opaque digests.

§alg_epochs: Vec<(u64, Vec<(u64, u64)>)>

The committed epoch timeline these roots were bound under: (alg_id, epochs) for every registered algorithm, sorted by algorithm ID. Part of the canonical binding-root preimage.

Implementations§

Source§

impl BindingProof

Source

pub fn produce( member_roots: Vec<(u64, Vec<u8>)>, alg_epochs: Vec<(u64, Vec<(u64, u64)>)>, ) -> BindingProof

Assemble a binding proof from the shared structure committed by every algorithm: the member roots and the committed epoch timeline.

This is the produce half: a holder of the shared structure packages it for a verifier. Producing the proof does not require any binding root — the binding roots are the verifier’s trusted inputs, recomputed from this shared material at verification time.

Source

pub fn verify( &self, trusted: &[TrustedBindingRoot<'_>], tree_size: u64, arity: u64, ) -> bool

Verify cross-algorithm binding-root consistency against trusted binding roots, reading digests only.

For each trusted binding root (alg_id, H_i, BR_i), recomputes H_i(preimage) == BR_i over the shared member-root/timeline preimage. The proof succeeds iff every algorithm’s recomputation matches its trusted BR_i. Success proves the algorithms are mutually bound (BR_i ≘ BR_j): each independently commits, under its own hash, to the identical shared structure.

§No security mixing (D9)

Each algorithm’s H_i is applied only to the shared opaque preimage; the binding roots BR_i of other algorithms are never fed into H_i. A break of H_j cannot forge agreement under H_i.

§Trust contract

trusted carries trusted binding roots: the verifier proves consistency given them, never their origin. Supplying an unauthenticated BR_i makes the guarantee vacuous, exactly as for a forged root in spine::verify_inclusion.

§Well-formedness

Returns false for an empty trusted set (nothing to bind), for a structurally malformed committed timeline at tree_size, for member roots not strictly sorted by algorithm ID, or for any trusted binding root whose algorithm has no member root in the proof. These reject ill-formed inputs before any hashing.

Trait Implementations§

Source§

impl Clone for BindingProof

Source§

fn clone(&self) -> BindingProof

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 BindingProof

Source§

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

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

impl Eq for BindingProof

Source§

impl PartialEq for BindingProof

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for BindingProof

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> 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.