cmov

Conditional move CPU intrinsics which are guaranteed on major platforms (ARM32/ARM64, x86/x86_64, RISC-V) to execute in constant-time and not be rewritten as branches by the compiler. Provides wrappers for the CMOV family of instructions on x86/x86_64 and CSEL on AArch64, along with a portable "best-effort" pure Rust fallback implementation.

0.5.4Latest, 28 May 2026
12MDownloads, last 90 days
0Advisories on the latest
3Advisories, all versions
Apache-2.0 OR MITLicence
693Stars
4.6/10OpenSSF Scorecard

Known advisories

Severity Advisory Fix Published
Moderate Cmov/CmovEq on aarch64 can produce wrong results if high-bits of registers are set CVE-2026-50185 Fixed in 0.5.4 2 Jul 2026
High RustCrypto Utilities cmov: `thumbv6m-none-eabi` compiler emits non-constant time assembly when using `cmovnz` CVE-2026-23519 Fixed in 0.4.4 15 Jan 2026
Non-constant-time code generation on ARM32 targets CVE-2026-23519 Fixed in 0.4.4 14 Jan 2026

On Hacker News

Sources: crates.io, deps.dev (CC BY 4.0), OSV. Last checked 4 Dec 2026.