Module constant_time

Module constant_time 

Source
Expand description

Constant-time operations to prevent timing attacks

Traits§

ConstantTimeEquals
Trait for types that can be compared in constant time

Functions§

ct_and
Apply a constant-time bitwise AND operation between two arrays
ct_assign
Constant-time conditional assignment
ct_eq
Constant-time comparison of two byte slices
ct_eq_choice
Constant-time equality check that returns a Choice (0 or 1)
ct_mask
Constant-time mask generation for a boolean condition
ct_op
Generic constant-time conditional operation on byte arrays
ct_or
Apply a constant-time bitwise OR operation between two arrays
ct_select
Constant-time selection of a byte
ct_xor
Apply a constant-time bitwise XOR operation between two arrays