Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions cmov/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.4.5 (2026-01-15)
### Changed
- Introduce small ARM32 `asm!` optimization which also guarantees constant-time operation ([#1336], [#1346])

[#1336]: https://github.com/RustCrypto/utils/pull/1336
[#1346]: https://github.com/RustCrypto/utils/pull/1346

## 0.4.4 (2026-01-14)
### Security
- Fix non-constant-time assembly being emitted from portable backend on `thumbv6m-none-eabi` ([#1332])
Expand Down
8 changes: 4 additions & 4 deletions cmov/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cmov"
version = "0.4.4"
version = "0.4.5"
authors = ["RustCrypto Developers"]
edition = "2024"
rust-version = "1.85"
Expand All @@ -11,9 +11,9 @@ license = "Apache-2.0 OR MIT"
keywords = ["constant-time", "crypto", "intrinsics"]
categories = ["cryptography", "hardware-support", "no-std"]
description = """
Conditional move CPU intrinsics which are guaranteed on major platforms 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" fallback.
Conditional move CPU intrinsics which are guaranteed on major platforms (ARM32/ARM64, x86/x86_64) 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.
"""

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion cmov/src/portable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fn masknz32(condition: u32) -> u32 {
fn masknz64(condition: u64) -> u64 {
let lo = masknz32((condition & 0xFFFF_FFFF) as u32);
let hi = masknz32((condition >> 32) as u32);
let mask = (lo | hi) as u64;
let mask = u64::from(lo | hi);
mask | mask << 32
}

Expand Down