pub struct VerificationConfig {
pub sample_count: usize,
pub max_variation_ratio: f64,
pub confidence_threshold: f64,
}Expand description
Configuration for constant-time verification testing.
This struct controls the parameters used for statistical analysis of timing behavior. The configuration balances thoroughness with performance and helps tune the verification process for different use cases.
§Performance vs Accuracy Trade-offs
- Higher sample_count: More accurate results but slower testing
- Lower max_variation_ratio: Stricter timing requirements but more false positives
- Higher confidence_threshold: More conservative assessment but fewer false negatives
§Recommended Settings
- Development: sample_count=1000, max_variation_ratio=0.1, confidence_threshold=0.9
- CI/CD: sample_count=100, max_variation_ratio=0.15, confidence_threshold=0.8
- Quick checks: sample_count=10, max_variation_ratio=0.2, confidence_threshold=0.7
Fields§
§sample_count: usizeNumber of timing samples to collect for statistical analysis More samples provide better statistical confidence but take longer Typical values: 100-1000 for meaningful results
max_variation_ratio: f64Maximum allowed timing variation as a fraction of mean execution time Values like 0.1 (10%) are typical for cryptographic applications Lower values are stricter but may flag benign system noise
confidence_threshold: f64Minimum confidence threshold for accepting constant-time results Higher values require stronger statistical evidence Typical values: 0.8-0.95 depending on security requirements
Trait Implementations§
Source§impl Clone for VerificationConfig
impl Clone for VerificationConfig
Source§fn clone(&self) -> VerificationConfig
fn clone(&self) -> VerificationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more