Expand description
ML-KEM-1024, ML-DSA-87, Argon2id, AES-256-GCM, and secure zeroing.
All functions are pure — no I/O, no file system, no network. Each function that needs randomness accepts a CSPRNG as a parameter so it can be exercised with a seeded RNG in tests.
Functions§
- decapsulate_
kem - Decapsulate a shared secret using
secret_key(the 64-byte seed) andciphertext. - decrypt_
aes_ gcm - Decrypt and authenticate
ciphertextwith AES-256-GCM usingkeyandnonce. - decrypt_
payload - Decrypt a payload using the full hybrid cryptosystem pipeline.
- derive_
key - Derive a key from
passwordandsaltusing Argon2id. - encapsulate_
kem - Encapsulate a shared secret for the holder of
public_key. - encrypt_
aes_ gcm - Encrypt
plaintextwith AES-256-GCM usingkeyandnonce. - encrypt_
payload - Encrypt a payload using the full hybrid cryptosystem pipeline.
- generate_
dsa_ keypair - Generate an ML-DSA-87 key pair using the provided CSPRNG.
- generate_
kem_ keypair - Generate an ML-KEM-1024 key pair using the provided CSPRNG.
- sign_
dsa - Sign
messagewith the ML-DSA-87 secret key (32-byte seed). - verify_
dsa - Verify that
sigis a valid ML-DSA-87 signature overmessagebypublic_key.