Skip to main content

Crate proof_crypto

Crate proof_crypto 

Source
Expand description

proof-crypto: hashes, ids, COSE_Sign1 (-19 required, -9 optional). Rejects deprecated polymorphic algs (-8/-7/-35/-36). No network, no policy.

Re-exports§

pub use alg::AllowedAlgs;
pub use alg::COSE_ED25519;
pub use alg::COSE_ESP256;
pub use build::revoke_attestation;
pub use build::supersede_attestation;
pub use build::to_signed_status;
pub use build::verify_status_object;
pub use build::CreatedAttestation;
pub use build::SignedStatus;
pub use claim::claim_kind;
pub use claim::revocation_target;
pub use claim::supersession_pair;
pub use claim::ClaimKind;
pub use hash::compute_digest;
pub use hash::verify_content_digest;
pub use keys::Ed25519Key;
pub use keys::P256Key;

Modules§

alg
COSE algorithm numbers (verified 2026-09-06 vs IANA + RFC 9864). Fully-specified only. Deprecated polymorphic ids are rejected, never negotiated.
build
Phase 2 builders: create and verify signed artifacts. Every builder round-trips through canonical CBOR + schema so malformed domain objects can never reach signing or id assignment.
claim
Status claims (FORMAT §4.7): revoke and supersede are attestation sub-shapes distinguished by claim.type. Everything else is a plain statement claim and untouched by lifecycle machinery.
cose
COSE_Sign1 (RFC 9052 §4.2) with fully-specified algs only. Protected header: {1: alg, 4: kid} — nothing else. Unprotected MUST be empty. external_aad defaults to h’504531’ (“PE1”) but is configurable per-verifier for cross-domain isolation (V1.1).
hash
SHA-256 / SHA-384 helpers (FIPS 180-4).
id
Deterministic object ids: <prefix>:v1:<b64uNoPad(sha256(canonical))>. Uses SHA-256 for ids in V0.1 (hash agility via v for future algs).
keys
Key types + KeyRef strings. Ed25519: key:ed25519:<b64u(32B pubkey)>. P-256: key:p256:<b64u(64B X||Y)>.