pub struct RadioCustodyReceipt { /* private fields */ }Expand description
A source/capture-bound signed checkpoint. Fields are private so callers cannot mutate signed custody data after construction.
Implementations§
Source§impl RadioCustodyReceipt
impl RadioCustodyReceipt
Sourcepub fn sign(
record: RadioEvidenceRecord,
record_scratch: &mut [u8],
sequence: u64,
previous_checkpoint: Option<[u8; 32]>,
timestamp: ReceiptTimestamp,
policy: Option<PolicyDecisionReference>,
signer: &SigningKey,
) -> Result<Self, RadioReceiptError>
pub fn sign( record: RadioEvidenceRecord, record_scratch: &mut [u8], sequence: u64, previous_checkpoint: Option<[u8; 32]>, timestamp: ReceiptTimestamp, policy: Option<PolicyDecisionReference>, signer: &SigningKey, ) -> Result<Self, RadioReceiptError>
Encode the canonical single-record bytes into caller scratch, hash those exact bytes, then sign all receipt context. Scratch is caller-owned and no allocation or file/network operation occurs.
pub const fn version(self) -> u16
pub const fn record_id(self) -> u64
pub const fn source_id(self) -> u64
pub const fn capture_id(self) -> u64
pub const fn record_digest(self) -> [u8; 32]
pub const fn sequence(self) -> u64
pub const fn previous_checkpoint(self) -> Option<[u8; 32]>
pub const fn timestamp(self) -> ReceiptTimestamp
pub const fn policy(self) -> Option<PolicyDecisionReference>
pub const fn signer_public_key(self) -> [u8; 32]
pub const fn signature(self) -> [u8; 64]
Sourcepub fn verify_signature(
&self,
record: RadioEvidenceRecord,
record_scratch: &mut [u8],
) -> Result<ReceiptVerificationStatus, RadioReceiptError>
pub fn verify_signature( &self, record: RadioEvidenceRecord, record_scratch: &mut [u8], ) -> Result<ReceiptVerificationStatus, RadioReceiptError>
Cryptographic signature and exact-record check only. The returned
SignatureValidUntrusted status deliberately does not imply signer
authorization, permission validity, chain completeness, or truth.
Recheck signer authorization, optional policy decision, and chain position through host authorities after verifying signature and exact record bytes. Authority implementations must use current trust, revocation, and checkpoint-completeness state; no default is trusted.
Sourcepub fn signing_digest(&self) -> [u8; 32]
pub fn signing_digest(&self) -> [u8; 32]
Canonical digest that the Ed25519 key signs.
Sourcepub fn checkpoint_digest(&self) -> [u8; 32]
pub fn checkpoint_digest(&self) -> [u8; 32]
Chain link digest includes both canonical signed content and signature.
Sourcepub fn encode_into(&self, out: &mut [u8]) -> Result<usize, RadioReceiptError>
pub fn encode_into(&self, out: &mut [u8]) -> Result<usize, RadioReceiptError>
Encode the signed fixed-size transport value into caller-owned output. Parsing or storage does not establish trust.
Sourcepub fn decode_from(bytes: &[u8]) -> Result<Self, RadioReceiptError>
pub fn decode_from(bytes: &[u8]) -> Result<Self, RadioReceiptError>
Parse the fixed v1 transport bytes. Parsing is structural only; call
verify_with_authority before trusting the signer, policy, timestamp,
or checkpoint.
Trait Implementations§
Source§impl Clone for RadioCustodyReceipt
impl Clone for RadioCustodyReceipt
impl Copy for RadioCustodyReceipt
Source§impl Debug for RadioCustodyReceipt
impl Debug for RadioCustodyReceipt
impl Eq for RadioCustodyReceipt
Source§impl PartialEq for RadioCustodyReceipt
impl PartialEq for RadioCustodyReceipt
impl StructuralPartialEq for RadioCustodyReceipt
Auto Trait Implementations§
impl Freeze for RadioCustodyReceipt
impl RefUnwindSafe for RadioCustodyReceipt
impl Send for RadioCustodyReceipt
impl Sync for RadioCustodyReceipt
impl Unpin for RadioCustodyReceipt
impl UnsafeUnpin for RadioCustodyReceipt
impl UnwindSafe for RadioCustodyReceipt
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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