Files
zooqueen afe5434dc4 give the crate a workspace root, and the pqc callers the api that exists
cargo could not read the manifest at all:

  error inheriting `aes-gcm` from workspace root manifest's
  workspace.dependencies.aes-gcm: failed to find a workspace root

All 25 dependencies are declared `workspace = true`, which resolves only
against a [workspace.dependencies] table, and the crate was extracted from a
monorepo without one. The versions here are the ones Cargo.lock had already
resolved, so this records what the crate was building against and chooses
nothing new — `cargo build --locked` leaves Cargo.lock untouched.

That got the manifest parsed and the library building, which exposed three
callers written against an ml-kem/ml-dsa that predates the pinned versions:

  Encapsulate and Decapsulate are private at ml_kem's root and public at
    ml_kem::kem, and MlKem768::generate needs KemCore in scope.

  ml-dsa has no Ml_Dsa65, no VerificationKey and no SigningKey::generate.
    Key generation is the KeyGen trait (MlDsa65::key_gen), the pair hands out
    signing_key()/verifying_key(), and signing goes through signature::Signer
    and Verifier.

  ml-dsa is on rand_core 0.9 while ml-kem is on 0.6, so one thread_rng cannot
    serve both. The ml-dsa side takes OsRng from ml-dsa's own re-export, via
    unwrap_err, because OsRng is fallible in 0.9 and key_gen wants an
    infallible CryptoRng. No new dependency.

  integration_test's message list mixed [u8; 9], [u8; 27], [u8; 0] and
    [u8; 1000] in one untyped array, which has no single element type. Typed
    as [&[u8]; 4].

Both examples RUN, not merely compile: ML-KEM encapsulation round-trips,
ML-DSA signatures verify, HQC round-trips. 12 tests pass.

Worth knowing separately: src/ml_kem.rs, src/ml_dsa.rs, src/hqc.rs, src/pqc/
and src/hybrid/ are in no build target — lib.rs declares only symmetric, hash,
error and prelude. Those wrappers are dead files and would not compile as they
stand (src/ml_dsa.rs imports the same Ml_Dsa65 and VerificationKey that do not
exist). Post-quantum is reachable today only as the re-exported upstream
crates, without this crate's SecurityLevel/zeroizing layer over it.
2026-08-10 21:15:45 -07:00

102 lines
3.0 KiB
TOML

[package]
name = "hanzo-crypto"
version = "0.1.0"
edition = "2021"
authors = ["Hanzo Team"]
description = "Modern post-quantum cryptography library with NIST-standardized algorithms"
license = "MIT OR Apache-2.0"
repository = "https://github.com/hanzo/crypto"
keywords = ["crypto", "post-quantum", "ml-kem", "ml-dsa", "pqc"]
categories = ["cryptography", "no-std"]
[dependencies]
# NIST-standardized post-quantum algorithms (Pure Rust - ARM compatible!)
ml-kem = { workspace = true } # ML-KEM (FIPS 203) - formerly Kyber
ml-dsa = { workspace = true } # ML-DSA (FIPS 204) - formerly Dilithium
pqcrypto-hqc = { workspace = true } # HQC code-based cryptography
pqcrypto-traits = { workspace = true } # Common traits for PQC
# Symmetric cryptography
blake3 = { workspace = true } # BLAKE3 hashing
chacha20poly1305 = { workspace = true } # ChaCha20-Poly1305 AEAD
aes-gcm = { workspace = true } # AES-256-GCM
# Additional cryptographic primitives
sha3 = { workspace = true } # SHA-3 family
x25519-dalek = { workspace = true } # X25519 key exchange (transitional)
ed25519-dalek = { workspace = true } # Ed25519 signatures (transitional)
argon2 = { workspace = true } # Password hashing
# Utilities
rand = { workspace = true }
rand_core = { workspace = true }
zeroize = { workspace = true }
subtle = { workspace = true }
hex = { workspace = true }
base64 = { workspace = true }
# Serialization
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
bincode = { workspace = true, optional = true }
# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }
[dev-dependencies]
criterion = { workspace = true }
proptest = { workspace = true }
quickcheck = { workspace = true }
rand_chacha = "0.3"
[features]
default = ["std", "serialization"]
std = []
serialization = ["serde", "serde_json", "bincode"]
no-std = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
# This crate is its own workspace root. Every dependency below is declared
# `workspace = true`, which only resolves against a [workspace.dependencies]
# table — and there was none, so cargo could not read the manifest at all:
#
# error inheriting `aes-gcm` from workspace root manifest's
# workspace.dependencies.aes-gcm: failed to find a workspace root
#
# The versions are the ones Cargo.lock already resolved, so this records what
# the crate was building against rather than choosing anything new.
[workspace]
[workspace.dependencies]
ml-kem = "0.3.0-pre"
ml-dsa = "0.1.0-rc.0"
pqcrypto-hqc = "0.2.2"
pqcrypto-traits = "0.3.5"
blake3 = "1.8.2"
chacha20poly1305 = "0.10.1"
aes-gcm = "0.10.3"
sha3 = "0.10.8"
x25519-dalek = "2.0.1"
ed25519-dalek = "2.2.0"
argon2 = "0.5.3"
rand = "0.8.5"
rand_core = "0.6.4"
zeroize = "1.8.1"
subtle = "2.6.1"
hex = "0.4.3"
base64 = "0.22.1"
serde = "1.0.226"
serde_json = "1.0.145"
bincode = "1.3.3"
thiserror = "1.0.69"
anyhow = "1.0.100"
criterion = "0.5.1"
proptest = "1.8.0"
quickcheck = "1.0.3"