Skip to content

algorithms/mul_redc: MSRV-1.88): Use core::hint::select_unpredictable. #519

@github-actions

Description

@github-actions

On 2025-08-25 @prestwich wrote in f297716 “Merge pull request #503 from DaniPopes/msrv-1.85”:

MSRV-1.88): Use core::hint::select_unpredictable.

#[allow(clippy::needless_bitwise_bool)]
fn reduce1_carry<const N: usize>(value: [u64; N], modulus: [u64; N], carry: bool) -> [u64; N] {
    let (reduced, borrow) = sub(value, modulus);
    // TODO: Ideally this turns into a cmov, which makes the whole mul_redc constant
    // time.
    // TODO(MSRV-1.88): Use `core::hint::select_unpredictable`.
    if carry | !borrow {
        reduced
    } else {
        value
    }

From src/algorithms/mul_redc.rs:132

Metadata

Metadata

Assignees

Labels

to doTo be donetrackerIssue tracked by bot

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions