Module ct

Source
Expand description

Constant-time utilities.

Functions§

bool_to_choice 🔒
Convert a boolean into a Choice.
bytes_eq 🔒
Return true if two slices are equal. Performs its operation in constant time, but returns a bool instead of a subtle::Choice.
is_zero 🔒
Returns true if all bytes of the input are zero (including if the slice is empty). Executes in constant time for a given length of input.