hanzo-pqc 1.1.22

Hanzo — post-quantum cryptography (ML-KEM, ML-DSA, SLH-DSA, hybrid, privacy tiers, attestation, AI mining rewards)
Documentation

hanzo-pqc

crates.io

Post-quantum cryptography for the Hanzo ecosystem. ML-KEM, ML-DSA, SLH-DSA, hybrid modes, privacy tiers, attestation, AI mining rewards.

The single canonical implementation. Used by the SDK and by every chain crate (hanzo-vm, hanzo-consensus, hanzo-l2).

Install

[dependencies]
hanzo-pqc = "1.1.22"

Algorithms

Algorithm NIST FIPS Module Feature flag (default)
ML-KEM 203 hanzo_pqc::kem ml-kem
ML-DSA 204 hanzo_pqc::signature ml-dsa
SLH-DSA 205 hanzo_pqc::signature slh-dsa
Hybrid hanzo_pqc::hybrid hybrid ✓ (pulls x25519-dalek)

Extra modules (always compiled):

  • attestation — TEE attestation + key release
  • privacy_tiers — per-tier privacy enforcement (Open / Enhanced / Confidential / TEE-I/O)
  • cc_tier — confidential-compute tier integration
  • ai_rewards — PQ-signed AI mining rewards
  • wire_protocol — wire-format encoding for over-the-network PQ messages
  • kdf — HKDF helpers

Optional features

  • fips-mode — strict NIST FIPS compliance gating
  • gpu-cc — GPU confidential-compute integrations
  • tee-io — TEE-I/O (Blackwell-class) integrations
  • cpu-tee — CPU TEE integrations

Example

use hanzo_pqc::kem::{generate_keypair, encapsulate, decapsulate, MlKemVariant};

let (pk, sk) = generate_keypair(MlKemVariant::MlKem768)?;
let (ciphertext, shared_a) = encapsulate(&pk)?;
let shared_b = decapsulate(&ciphertext, &sk)?;
assert_eq!(shared_a, shared_b);

License

MIT