Skip to content

V2 redesign - #14

Merged
mm9942 merged 3 commits into
mainfrom
v2-redesign
Jul 1, 2026
Merged

V2 redesign#14
mm9942 merged 3 commits into
mainfrom
v2-redesign

Conversation

@mm9942

@mm9942 mm9942 commented Jul 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

devmruAI and others added 3 commits June 12, 2026 12:45
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>
@mm9942
mm9942 merged commit e1c2617 into main Jul 1, 2026
0 of 3 checks passed
@mm9942
mm9942 deleted the v2-redesign branch July 1, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants