hide-crypto
Hybrid post-quantum primitives for the HIDE protocol: X25519 + ML-KEM-768 via X-Wing (HPKE), HKDF-SHA-256, HMAC and ChaCha20-Poly1305. No primitive is implemented here; the crate composes reviewed implementations and owns only the combination and key derivation.
Secret types never derive Debug, Clone or Serialize and zeroize on drop.
use ;
let secret = generate?;
let public = secret.public_key?;
let cek = generate?;
// Wrap the content key to a recipient, bound to a 32-byte object id.
let object_id = ?;
let wrapped = wrap_cek?;
let unwrapped =
unwrap_cek?;
let key = derive_key?;
let nonce = ;
let ciphertext = seal?;
let plaintext = open?;
assert_eq!;
# Ok::
Most users want hide-object, which turns these
primitives into a sealed, streamed container.
Experimental and unaudited. Do not protect data you cannot afford to lose or expose. Licensed Apache-2.0.