V2 redesign - #14
Merged
Merged
Conversation
Pure restructure, no crypto behavior change. Relocates the entire pqcrypto-* KEM/signature/hub path into src/legacy/ behind a new legacy-pqclean feature, sets up the full Cargo feature-flag skeleton (optional deps for pqcrypto/zip/archive/aes-ctr/aes-xts/legacy-aes; zeroize unconditional), adds src/markers.rs as the shared ZST-marker shim, and deletes the confirmed dead orphan core/kyber/kyber_crypto.rs. default = [legacy-pqclean] temporarily so the build/test baseline is preserved exactly until the ML-KEM path lands (Phase 2/4). rand_core finding: ml-kem 0.3.x requires rand_core ^0.10; project is on 0.6.4 -> Phase 2 must bump rand to 0.9 and audit RNG call sites. Verified: cargo build, cargo build --no-default-features --features legacy-pqclean, and cargo test (90 passing) all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ed error/log Adds the Rust-native FIPS primitive layer as standalone, doc-tested modules (hub rewiring is Phase 3): - src/kem/: KemBackend trait + MlKem512/768/1024 via ml-kem 0.3 (FIPS 203); typed ZeroizeOnDrop newtypes (public/secret/ciphertext/shared-secret). - src/sign/: SignAlgorithm trait + blanket Signature<A,S>; MlDsa44/65/87 via ml-dsa (FIPS 204); SlhDsa Shake variants via slh-dsa behind sign-slhdsa (FIPS 205). Replaces the legacy 10-impl pattern with one blanket impl. - src/kdf/: real HKDF-SHA256/512 key schedule with domain-separated labels; ZeroizeOnDrop HkdfSalt/HmacKey/SessionKey. - error.rs: finished CryptError - real source(), full Clone (no todo!()), SigningErr preserved via Signing(Arc<SigningErr>), new envelope/KEM variants; legacy variants retained so legacy-pqclean still builds. - key_control/: removed unwrap/expect/unimplemented from lib paths; ZeroizeOnDrop on key-holding structs. - log.rs + crypt_guard_proc: log_activity!/write_log! now expand to pure tracing (no Lazy<Mutex<Log>>, no String buffer, no panic); new #[derive(ErrorObservable)] constructor-as-observable proc-macro. rand: ml-kem/ml-dsa use rand_core 0.10; coexists with rand 0.8 (legacy) and slh-dsa's rand_core 0.9 with no conflict. default = [legacy-pqclean, ml-kem-backend, ml-dsa-backend] (both paths coexist this phase). Verified: build (default / legacy-only / all-features), 85 unit + 27 doc tests, clippy all green. NOTE: new primitives currently have doctest coverage only; proper #[cfg(test)] mod tests deferred to Phase 5. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.