Skip to main content

Module crypto

Module crypto 

Source
Expand description

Cryptographic policy lives here. Networking crates MUST go through CryptoProvider.

Constructions: Ed25519, X25519, HKDF-SHA256, ChaCha20-Poly1305, BLAKE3, HMAC-SHA256. No custom primitives.

Structs§

DefaultProvider
PrivateIdentity
SessionKeys
Session keys from ephemeral X25519 (forward secrecy). Replay: transcript hash bound into HKDF.
X25519Public
A Diffie-Hellman public key
X25519Secret
A Diffie-Hellman secret key that can be used to compute multiple SharedSecrets.

Constants§

ENC_SCHEME
SESSION_SCHEME

Traits§

CryptoProvider

Functions§

decrypt_payload
encrypt_payload
generate_cek
hmac_tag
push_lp_str
random_bytes
session_keys
u64_be
unwrap_cek
verify_identity
wrap_cek
x25519_ephemeral