Skip to main content

pask_wire/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 Wilder Management Inc. (d/b/a Wilder Robotics) <rob@wilder-robotics.com>
3// pask-wire is licensed Apache-2.0. No commercial agreement is required to use,
4// modify or redistribute it; see LICENSING.md in the workspace root.
5
6//! Specified producer and verifier processing for Physical-Site Engagement Receipts
7//! under `wilder.pser/0.5`, `wilder.pser/0.6`, and `wilder.pser/0.7`.
8//!
9//! Package names (`pask-*`), profile versions (`wilder.pser/<version>`) and
10//! Internet-Draft revision numbers identify different things and are versioned
11//! independently of one another.
12//!
13//! Passing the implemented checks does not establish complete profile conformance,
14//! authenticated ownership of a supplied key, or that a physical event occurred.
15//! The crate README describes the supported processing and remaining limits.
16
17#![no_std]
18#![forbid(unsafe_code)]
19
20#[cfg(feature = "alloc")]
21extern crate alloc;
22#[cfg(feature = "alloc")]
23pub mod proposed_constraints;
24#[cfg(feature = "alloc")]
25pub mod proposed_content;
26#[cfg(feature = "alloc")]
27pub mod proposed_evidence;
28#[cfg(feature = "alloc")]
29pub mod proposed_recipient;
30#[cfg(feature = "std")]
31extern crate std;
32
33#[cfg(feature = "alloc")]
34mod canonical_example;
35#[cfg(feature = "alloc")]
36mod chain;
37#[cfg(feature = "alloc")]
38mod cwt;
39#[cfg(feature = "alloc")]
40mod digest;
41#[cfg(feature = "alloc")]
42mod entry;
43#[cfg(feature = "alloc")]
44mod envelope;
45#[cfg(feature = "alloc")]
46mod error;
47#[cfg(feature = "alloc")]
48mod payload;
49#[cfg(feature = "alloc")]
50mod receipt;
51#[cfg(feature = "alloc")]
52pub mod testvectors;
53
54#[cfg(feature = "alloc")]
55pub use canonical_example::{canonical_example, canonical_example_06, canonical_example_07};
56#[cfg(feature = "alloc")]
57pub use chain::{AffiliationChange, ChainReport, verify_chain};
58#[cfg(feature = "alloc")]
59pub use digest::{sha256_prefixed, validate_sha256};
60#[cfg(feature = "alloc")]
61pub use entry::{candidate_leaf_hash, derive_candidate_entry};
62#[cfg(feature = "alloc")]
63pub use envelope::{
64    CONTENT_TYPE, CONTENT_TYPE_06, CONTENT_TYPE_07, produce_ed25519, verify_ed25519,
65};
66#[cfg(feature = "es256")]
67pub use envelope::{produce_es256, verify_es256};
68#[cfg(feature = "alloc")]
69pub use error::{Error, Result};
70#[cfg(feature = "alloc")]
71pub use payload::{
72    AckProvenance, BindingMode, IssuerAffiliation, Payload, SPEC_VERSION, SPEC_VERSION_06,
73    SPEC_VERSION_07, canonicalize_json, is_supported_spec,
74};
75#[cfg(feature = "alloc")]
76pub use receipt::{
77    AttachedReceipts, INCLUSION_PROOF_LABEL, InclusionProof, RECEIPTS_LABEL, RFC9162_SHA256,
78    Receipt, VDP_LABEL, VDS_LABEL, VerifiedInclusion, attached_receipts, leaf_hash,
79    verify_inclusion,
80};
81
82#[cfg(feature = "alloc")]
83mod receipt_cbor;
84#[cfg(feature = "alloc")]
85mod receipt_inspection;
86#[cfg(feature = "alloc")]
87pub use receipt_inspection::{
88    EnvelopeReport, InspectionFinding, InspectionLimits, InspectionPolicy, InspectionStatus,
89    UnauthenticatedReceiptClaims, inspect_scitt_receipt,
90};
91
92#[cfg(feature = "alloc")]
93mod receipt_verification;
94#[cfg(feature = "alloc")]
95pub use receipt_verification::{
96    BindingProvenance, ProofVerification, ReceiptVerificationPolicy, ReceiptVerificationReport,
97    RotationPolicy, TrustInputOrigin, TsKeyAssociation, TsPublicKey, TsTrustContext,
98    VerificationLimits, VerifyingKeyEvidence, verify_scitt_receipt,
99};
100
101#[cfg(feature = "alloc")]
102mod transparent_statement;
103#[cfg(feature = "alloc")]
104pub use transparent_statement::{
105    DigestTarget, ExpectedDigest, IssuerKeyInput, OuterStatementReport, ReceiptContainerState,
106    SOFTWARE_SITE_CONTENT_TYPE, StatementApplicationPolicy, StatementReceiptOutcome,
107    StatementVerificationInputs, SubjectMapping, SubjectPolicy, TransparentStatementPolicy,
108    TransparentStatementReport, inspect_transparent_statement, verify_transparent_statement,
109};
110
111#[cfg(feature = "alloc")]
112pub mod proposed_replay;