| Crates.io | timing-oracle-core |
| lib.rs | timing-oracle-core |
| version | 0.1.5 |
| created_at | 2026-01-16 19:54:34.71457+00 |
| updated_at | 2026-01-16 20:22:39.59009+00 |
| description | Core statistical analysis for timing side-channel detection (no_std) |
| homepage | |
| repository | https://github.com/agucova/timing-oracle |
| max_upload_size | |
| id | 2049163 |
| size | 207,794 |
Core statistical analysis for timing side-channel detection.
This crate provides the fundamental statistical algorithms used by timing-oracle, designed to work in no_std environments (embedded, WASM, SGX enclaves) with only an allocator.
Most users should use the main timing-oracle crate, which provides:
timing_test! macroUse timing-oracle-core directly only if you need:
no_std compatibility (embedded, WASM, SGX)std (default): Standard library supportparallel: Parallel bootstrap using rayon (requires std, 4-8x speedup)For no_std, disable default features:
[dependencies]
timing-oracle-core = { version = "0.1", default-features = false }
Outcome - Pass/Fail/Inconclusive/UnmeasurableEffectEstimate - Decomposed timing effect (shift + tail)Exploitability - Negligible/PossibleLAN/LikelyLAN/PossibleRemoteMeasurementQuality - Excellent/Good/Poor/TooNoisyVector9 / Matrix9 - Fixed-size linear algebra typesTimingSample - Tagged timing measurementAttackerModel - Threat model presetsuse timing_oracle_core::{
statistics::{bootstrap_covariance_matrix, compute_deciles},
analysis::bayes::compute_posterior_probability,
types::{Vector9, AttackerModel},
};
// Compute deciles from timing samples
let baseline_deciles: Vector9 = compute_deciles(&baseline_times);
let sample_deciles: Vector9 = compute_deciles(&sample_times);
let delta = sample_deciles - baseline_deciles;
// Bootstrap covariance matrix
let cov = bootstrap_covariance_matrix(&baseline_times, &sample_times, 2000);
// Compute posterior probability of timing leak
let threshold = AttackerModel::AdjacentNetwork.threshold_ns();
let p_leak = compute_posterior_probability(&delta, &cov, threshold);
MPL-2.0