Skip to content

gate ML‑KEM/ML‑DSA specific SHA3 APIs behind optional features (#1532)#1542

Open
Arul-Sujith wants to merge 3 commits into
celabshq:mainfrom
Arul-Sujith:fix-sha3-mlkem-api
Open

gate ML‑KEM/ML‑DSA specific SHA3 APIs behind optional features (#1532)#1542
Arul-Sujith wants to merge 3 commits into
celabshq:mainfrom
Arul-Sujith:fix-sha3-mlkem-api

Conversation

@Arul-Sujith

Copy link
Copy Markdown
Contributor

This PR gates the ML‑KEM and ML‑DSA specific SHA3 APIs behind optional Cargo features (mlkem and mldsa). The change cleans up the public API surface of libcrux-sha3 by hiding specialized incremental functions (e.g., x4::incremental, x2::incremental, and portable::incremental) unless one of the new features is enabled.

Changes

  • Added mlkem and mldsa optional features to crates/algorithms/sha3/Cargo.toml.
  • Guarded ML‑KEM/ML‑DSA specific modules (avx2::x4, neon::x2, portable::incremental) with #[cfg(any(feature = "mlkem", feature = "mldsa"))].
  • Updated dependent crates (libcrux-ml-kem, libcrux-ml-dsa, ctgrind-test) to enable these features where needed.
  • Modified unit tests and benchmarks to be conditionally compiled under the same feature gate.

Fixes #1532

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.

[sha3] Feature-gate specialized APIs

1 participant