Skip to content

module-lattice: harden reduction; ml-kem: expand cargo checkct - #409

Merged
tarcieri merged 1 commit into
masterfrom
module-lattice/harden-reduction-expand-checkct
Oct 29, 2026
Merged

tarcieri merged 1 commit into
masterfrom
module-lattice/harden-reduction-expand-checkct

Conversation

@tarcieri

@tarcieri tarcieri commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Uses newly hardened ctutils::{CtLt, CtSelect} (RustCrypto/utils#1580) for conditional subtraction in small_reduce, preventing secret-dependent branches on Thumb-1 as well as avoiding the psubusw instruction on x86_64 which was blocking BINSEC analysis.

Making this fix pass checkct requires a bump to ctutils v0.4.7. It also makes ctutils a hard dependency of module-lattice, though it's currently a conditional feature and needs to remain so for backwards compatibility. A TODO notes the next breaking release should remove the legacy feature.

The issue as well as the fix were confirmed using cargo checkct analysis of the ml-kem crate, including some newly expanded coverage included in this PR.

@tarcieri
tarcieri force-pushed the module-lattice/harden-reduction-expand-checkct branch from e202799 to af4b2b4 Compare October 29, 2026 00:15
Uses newly hardened `ctutils::{CtLt, CtSelect}` (RustCrypto/utils#1580)
for conditional subtraction in `small_reduce`, preventing
secret-dependent branches on Thumb-1 as well as avoiding the `psubusw`
instruction on `x86_64` which was blocking BINSEC analysis.

Making this fix pass `checkct` requires a bump to `ctutils` v0.4.7. It
also makes `ctutils` a hard dependency of `module-lattice`, though it's
currently a conditional feature and needs to remain so for backwards
compatibility. A TODO notes the next breaking release should remove the
legacy feature.

The issue as well as the fix were confirmed using `cargo checkct`
analysis of the `ml-kem` crate, including some newly expanded coverage
included in this PR.
@tarcieri
tarcieri force-pushed the module-lattice/harden-reduction-expand-checkct branch from af4b2b4 to dcaf64f Compare October 29, 2026 00:19
@tarcieri
tarcieri merged commit 593d288 into master Oct 29, 2026
57 checks passed
@tarcieri
tarcieri deleted the module-lattice/harden-reduction-expand-checkct branch October 29, 2026 00:38
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.

1 participant