Skip to main content

Module ct

Module ct 

Source
Expand description

Define helpers for working with types in constant time.

Re-exportsยง

use derive_deftly::Deftly; ๐Ÿ”’
use derive_deftly::define_derive_deftly; ๐Ÿ”’
use subtle::Choice; ๐Ÿ”’
use subtle::ConditionallySelectable; ๐Ÿ”’
use subtle::ConstantTimeEq; ๐Ÿ”’
use zeroize::Zeroize; ๐Ÿ”’
use zeroize::Zeroize; ๐Ÿ”’
use tor_memquota_cost::derive_deftly_template_HasMemoryCost; ๐Ÿ”’
pub(crate) use derive_deftly_template_ConstantTimeEq; ๐Ÿ”’
pub(crate) use derive_deftly_template_PartialEqFromCtEq; ๐Ÿ”’

Structsยง

CtByteArray
A byte array of length N for which comparisons are performed in constant time.

Functionsยง

ct_lookup
Try to find an item in a slice without leaking where and whether the item was found.