ct_op

Function ct_op 

Source
pub fn ct_op<const N: usize, F>(
    a: &[u8; N],
    b: &[u8; N],
    condition: bool,
    op: F,
) -> [u8; N]
where F: Fn(u8, u8) -> u8,
Expand description

Generic constant-time conditional operation on byte arrays

Applies the function op to elements of a and b based on the condition. This is useful for implementing constant-time bit operations.