Skip to main content

ct_select_array

Function ct_select_array 

Source
pub fn ct_select_array<const N: usize>(
    if_false: &[u8; N],
    if_true: &[u8; N],
    choice: Choice,
) -> [u8; N]
Expand description

Constant-time selection of fixed-size byte arrays, returning the selected array.

Used directly in ML-KEM implicit rejection (FIPS 203, Algorithm 18) to choose between the real shared secret K' and the rejection key K_bar without branching.