Expand description
Constant-time operations to prevent timing attacks.
These small primitives are owned by dcrypt so the published implementation does not need an unsafe-containing dependency for masks and comparisons.
Structs§
- Choice
- A one-bit value used by constant-time operations.
- CtOption
- An option whose validity is represented by a
Choice.
Traits§
- Conditionally
Selectable - Select between two values without branching on
choice. - Constant
Time Eq - Compare two values without data-dependent early exit.
Functions§
- ct_eq
- Constant-time comparison of two byte slices