Crate subtle [] [src]

Pure-Rust traits and utilities for constant-time cryptographic implementations.

Traits

CTAssignable

Trait for items which can be conditionally assigned in constant time.

CTEq

Trait for items whose equality to another item may be tested in constant time.

CTNegatable

Trait for items which can be conditionally negated in constant time.

Functions

arrays_equal

Check equality of two arrays, a and b, in constant time.

byte_is_nonzero

Test if a byte is non-zero in constant time.

bytes_equal

Check equality of two bytes in constant time.

conditional_select

Select a if choice == 1 or select b if choice == 0, in constant time.

Type Definitions

Mask

A Mask represents a choice which is not a boolean.