tacet_core/lib.rs
1//! Core statistical analysis for timing side-channel detection.
2//!
3//! This crate provides the fundamental statistical algorithms for timing oracle,
4//! designed to work in `no_std` environments (embedded, WASM, SGX) with only
5//! an allocator.
6//!
7//! # Features
8//!
9//! - `std` (default): Enable standard library support for convenience
10//! - `parallel`: Enable parallel bootstrap using rayon (requires `std`)
11//! - `ansi`: Enable ANSI colors in Display/Debug output (no_std compatible)
12//!
13//! # Usage
14//!
15//! This crate is typically used through the main `tacet` crate, which
16//! provides measurement collection, orchestration, and output formatting.
17//! However, it can be used directly for embedded or no_std scenarios.
18//!
19//! ```ignore
20//! use tacet_core::{
21//! analysis::{compute_bayes_gibbs, estimate_mde},
22//! statistics::{bootstrap_covariance_matrix, compute_deciles},
23//! types::{Matrix9, Vector9, Class, TimingSample},
24//! };
25//! ```
26
27#![cfg_attr(not(feature = "std"), no_std)]
28
29extern crate alloc;
30
31pub mod adaptive;
32pub mod analysis;
33pub mod colors;
34pub mod constants;
35pub mod ffi_summary;
36pub mod formatting;
37pub mod math;
38pub mod orchestration;
39pub mod preflight;
40pub mod result;
41pub mod statistics;
42pub mod timer;
43pub mod types;
44
45// Re-export commonly used items at crate root
46pub use ffi_summary::{
47 CalibrationSummary, DiagnosticsSummary, EffectSummary, InconclusiveReasonKind, OutcomeSummary,
48 OutcomeType, PosteriorSummary,
49};
50pub use result::{
51 EffectEstimate, EffectPattern, Exploitability, MeasurementQuality, MinDetectableEffect,
52 Outcome, ResearchOutcome, ResearchStatus, UnreliablePolicy,
53};
54pub use types::{AttackerModel, Class, Matrix9, TimingSample, Vector9};