This crate provides the fundamental statistical algorithms used by tacet, designed to work in no_std environments (embedded, WASM, SGX enclaves) with only an allocator.
When to Use This Crate
Most users should use the main tacet crate, which provides:
- Measurement collection and timing infrastructure
- Adaptive sampling orchestration
- Pretty terminal output and JSON formatting
- The
timing_test!macro
Use tacet-core directly only if you need:
no_stdcompatibility (embedded, WASM, SGX)- Custom measurement collection
- Direct access to statistical primitives
Features
std(default): Standard library supportparallel: Parallel bootstrap using rayon (requiresstd, 4-8x speedup)
For no_std, disable default features:
[]
= { = "0.1", = false }
What's Included
Statistical Analysis
- Quantile-based test statistics (9 deciles)
- Block bootstrap for covariance estimation
- Bayesian posterior probability computation
Result Types
Outcome- Pass/Fail/Inconclusive/UnmeasurableEffectEstimate- Decomposed timing effect (shift + tail)Exploitability- Negligible/PossibleLAN/LikelyLAN/PossibleRemoteMeasurementQuality- Excellent/Good/Poor/TooNoisy
Primitives
Vector9/Matrix9- Fixed-size linear algebra typesTimingSample- Tagged timing measurementAttackerModel- Threat model presets
Example
use ;
// Compute deciles from timing samples
let baseline_deciles: Vector9 = compute_deciles;
let sample_deciles: Vector9 = compute_deciles;
let delta = sample_deciles - baseline_deciles;
// Bootstrap covariance matrix
let cov = bootstrap_covariance_matrix;
// Compute posterior probability of timing leak
let threshold = AdjacentNetwork.threshold_ns;
let p_leak = compute_posterior_probability;
Documentation
License
MPL-2.0