Module ct

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.