pub struct ParsedProof {
pub kind: ProofKind,
pub claims: ProofClaims,
pub plan: SignaturePlan,
pub disposition: ProofDisposition,
pub protected_bytes: Vec<u8>,
pub payload_bytes: Vec<u8>,
pub structure: CoseStructure,
pub signatures: Vec<ParsedSignature>,
}Expand description
A parsed and profile-validated proof-CWT, ready for signature verification.
Fields§
§kind: ProofKindWhether this is a request or response proof.
claims: ProofClaimsThe decoded claims payload.
plan: SignaturePlanThe signature plan extracted from the body protected headers.
disposition: ProofDispositionThe disposition: Unattributed if the proof carries
hs_unattributed_key_set, Authenticated otherwise.
protected_bytes: Vec<u8>The protected header bytes (the protected bstr from the COSE object).
Needed to reconstruct Sig_structure for verification.
payload_bytes: Vec<u8>The payload bytes (claims-set CBOR).
structure: CoseStructureCOSE structure variant.
signatures: Vec<ParsedSignature>Per-signature metadata extracted from the COSE object.
Implementations§
Source§impl ParsedProof
impl ParsedProof
Sourcepub fn parse(cbor_bytes: &[u8]) -> Result<Self>
pub fn parse(cbor_bytes: &[u8]) -> Result<Self>
Parse and profile-validate a proof-CWT byte blob.
Enforces all profile rules that can be checked before signature verification:
- COSE object size cap (2 MiB).
typheader (RFC 9596 label 16) must match exactly.hs_domainmust matchtyp.- Exact
critsets per structure and disposition. signature_planpresent and valid.hs_unattributed_key_setpresent iff unattributed.- Unprotected headers carry nothing.
- Per-signature:
algfully specified,kidpresent, group in plan. - Claims payload: closed claim set, deterministic encoding.
Sourcepub fn parse_deferred_federate_request(cbor_bytes: &[u8]) -> Result<Self>
pub fn parse_deferred_federate_request(cbor_bytes: &[u8]) -> Result<Self>
Parse a request proof under the deferred Federate source extension. This is intentionally not the generic v16 parser: callers may use it only after establishing the deferred Federate envelope profile.
Sourcepub fn unattributed_replay_thumbprint(&self) -> Option<[u8; 32]>
pub fn unattributed_replay_thumbprint(&self) -> Option<[u8; 32]>
Frozen CDDL §7.1 content-bound replay namespace. Labels and plan order do not create fresh namespaces. Authenticated proofs instead use their credential-resolved primary enrollment record.
Trait Implementations§
Source§impl Clone for ParsedProof
impl Clone for ParsedProof
Source§fn clone(&self) -> ParsedProof
fn clone(&self) -> ParsedProof
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ParsedProof
impl RefUnwindSafe for ParsedProof
impl Send for ParsedProof
impl Sync for ParsedProof
impl Unpin for ParsedProof
impl UnsafeUnpin for ParsedProof
impl UnwindSafe for ParsedProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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