Skip to main content

Module side_channel

Module side_channel 

Source
Expand description

Side-channel timing test framework.

Provides utilities for measuring operation durations and detecting timing-based information leakage. Used to verify constant-time guarantees of cryptographic operations.

Structs§

TimingSample
A single timing measurement.
TimingStats
Statistics over a set of timing samples.

Functions§

is_constant_time
Check if two groups have consistent timing (ratio < threshold).
measure
Collect timing samples for an operation.
measure_n
Collect N timing samples for an operation.
stats
Compute statistics over timing samples.
timing_ratio
Compare timing distributions between two groups. Returns the ratio of max/min mean. A ratio near 1.0 suggests constant-time; a large ratio suggests timing leakage.