pub struct TemporalProof {
pub mac: [u8; 32],
pub nonce: [u8; 32],
pub prev_mac: [u8; 32],
}Expand description
A temporal proof with verifiable freshness, recency, and ordering.
§What this proves
- Integrity, the ciphertext and entropy snapshot have not been modified since the proof was created.
- Freshness, the proof was created after the verifier issued its challenge nonce (prevents replay).
- Recency, the claimed
ε.timestampis withinmax_driftof the verifier’s clock at verification time. - Ordering, if
prev_macis non-genesis, this proof was created after the proof whose MAC it references.
§How it works
commit_key = KK-KDF(shared_secret, ε.bytes, "KK-commit-v1")
message = nonce || prev_mac || ε.bytes || ε.timestamp || ciphertext
mac = KK-MAC-with-entropy(commit_key, message, ε.bytes)The MAC runs on a sponge whose rotation schedule is derived from
ε.bytes, the permutation structure itself is temporal, not just
the data flowing through it.
§Protocol
Verifier ──── challenge nonce ──→ Prover
Prover ──── KkBoundPacket ──→ Verifier
Verifier checks: MAC ✓ epoch ✓ nonce ✓ chain ✓Fields§
§mac: [u8; 32]MAC binding nonce + chain + entropy + ciphertext.
nonce: [u8; 32]Verifier-supplied freshness nonce (prevents replay).
prev_mac: [u8; 32]MAC of the previous proof in the chain (GENESIS_MAC for the first).
Implementations§
Trait Implementations§
Source§impl Clone for TemporalProof
impl Clone for TemporalProof
Source§fn clone(&self) -> TemporalProof
fn clone(&self) -> TemporalProof
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TemporalProof
impl RefUnwindSafe for TemporalProof
impl Send for TemporalProof
impl Sync for TemporalProof
impl Unpin for TemporalProof
impl UnsafeUnpin for TemporalProof
impl UnwindSafe for TemporalProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more