Skip to main content

weftos_rvf_crypto/
lib.rs

1//! Cryptographic primitives for the RuVector Format (RVF).
2//!
3//! Provides SHAKE-256 hashing, Ed25519 segment signing/verification,
4//! signature footer codec, and WITNESS_SEG audit-trail support.
5
6#![cfg_attr(not(feature = "std"), no_std)]
7
8extern crate alloc;
9
10pub mod attestation;
11pub mod footer;
12pub mod hash;
13pub mod lineage;
14#[cfg(feature = "ed25519")]
15pub mod sign;
16#[cfg(feature = "ed25519")]
17pub mod dual_sign;
18pub mod witness;
19
20pub use attestation::{
21    attestation_witness_entry, build_attestation_witness_payload, decode_attestation_header,
22    decode_attestation_record, decode_tee_bound_key, encode_attestation_header,
23    encode_attestation_record, encode_tee_bound_key, verify_attestation_witness_payload,
24    verify_key_binding, QuoteVerifier, TeeBoundKeyRecord, VerifiedAttestationEntry,
25};
26pub use footer::{decode_signature_footer, encode_signature_footer};
27pub use hash::{shake256_128, shake256_256, shake256_hash};
28pub use lineage::{
29    compute_manifest_hash, lineage_record_from_bytes, lineage_record_to_bytes,
30    lineage_witness_entry, verify_lineage_chain,
31};
32#[cfg(feature = "ed25519")]
33pub use sign::{sign_segment, verify_segment};
34#[cfg(feature = "ed25519")]
35pub use dual_sign::{
36    DualKey, DualVerifyKey, MlDsa65Key, MlDsa65VerifyKey,
37    dual_sign_segment, verify_dual_segment,
38    sign_segment_ml_dsa, verify_segment_ml_dsa,
39};
40pub use witness::{create_witness_chain, verify_witness_chain, WitnessEntry};