krypteia-silentops 0.1.0

Side-channel countermeasure toolkit: constant-time primitives, dudect-style timing leakage verifier, and shared SCA helpers for the krypteia workspace.
Documentation
//! # silentops — side-channel countermeasure toolkit
//!
//! `silentops` gathers the side-channel building blocks shared by the
//! `krypteia` workspace (post-quantum crate `quantica` and classical
//! crate `arcana`).
//!
//! Three modules are exposed today:
//!
//! - [`ct`] — constant-time primitives with architecture-specific
//!   assembly backends (`no_std`). This is the former `ct_ops` crate.
//! - [`ct_grind`] — Valgrind memcheck client-request helpers
//!   (`poison` / `unpoison`) used to verify constant-time code under
//!   `valgrind --error-exitcode=1`. Emits real instrumentation on
//!   `x86_64-linux` / `aarch64-linux` when the `ct-grind` feature is
//!   enabled; elsewhere the calls are zero-cost no-ops (`no_std`).
//! - [`verify`] — dudect-style timing leakage detector based on
//!   Welch's t-test (`std` only). This is the former `ct_verify`
//!   crate, refactored as a reusable library.
//!
//! Future modules will host additional shared SCA helpers (masking,
//! shuffling, fault-injection countermeasures, …) so that both
//! classical and post-quantum sides reuse the same primitives.
//!
//! # `no_std`
//!
//! The crate is `no_std` by default. The [`verify`] module is only
//! compiled when the `std` feature is enabled.
//!
//! # Re-exports
//!
//! For convenience, all primitives from [`ct`] are re-exported at
//! the crate root, so call sites can write `silentops::ct_eq(...)`
//! instead of `silentops::ct::ct_eq(...)`.

#![no_std]

#[cfg(feature = "std")]
extern crate std;

pub mod ct;
pub use ct::*;

pub mod ct_grind;

#[cfg(feature = "std")]
pub mod verify;