Minimal no_std constant-time primitives for EriX security-critical code paths.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen 538bcaeb04
All checks were successful
CI / markdown (push) Successful in 19s
CI / test (push) Successful in 2m2s
docs: Clarify component dependency source selection
Integrate the human-reviewed change from lib-constant-time#5.
2026-11-12 18:55:20 +02:00
.github ci: Declare policy helper and output boundaries 2026-11-07 18:20:19 +02:00
src feat: Erase explicitly owned integer storage 2026-10-30 13:49:56 +02:00
.editorconfig Initial commit 2026-02-26 15:15:34 +01:00
.gitignore Ignore local .ci workspace 2026-04-15 21:52:47 +03:00
.markdownlint-cli2.yaml Tighten CI markdown policy 2026-05-22 15:10:14 +03:00
ARCHITECTURE.md docs: Align component dependency rules with canonical source selection 2026-10-31 00:53:05 +02:00
Cargo.toml Add initial implementation of constant-time primitives and Cargo configuration 2026-02-26 16:21:03 +02:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:14 +03:00
CONTRIBUTING.md ci: Align CI source acquisition and repository policy 2026-10-30 10:42:59 +02:00
LICENSE Initial commit 2026-02-26 15:15:34 +01:00
README.md feat: Erase explicitly owned integer storage 2026-10-30 13:49:56 +02:00
ROADMAP.md feat: Erase explicitly owned integer storage 2026-10-30 13:49:56 +02:00
rustfmt.toml lib-constant-time: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:53 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:14 +03:00

lib-constant-time

Small no_std byte-comparison, selection and erasure helpers for EriX. Callers supply all input and storage; the crate has no dependencies, allocator, I/O or retained global state.

Purpose of This Repository

The constant_time library provides ct_eq, ct_eq_32, ct_is_zero and ct_select_u8. Equal-length comparisons visit every byte; unequal lengths return immediately. Selection accepts every mask and operates per bit. This source structure does not guarantee compiler output or hardware timing.

erase overwrites the supplied unsigned-integer slice with volatile zeros. SecretBytes exclusively borrows a fixed byte array and erases it on normal drop or unwinding. Construct the guard before filling the array. Copies, register spills, dumps, physical remnants, process termination and forgotten guards remain outside its protection.

See ARCHITECTURE.md for the contracts and ROADMAP.md for remaining work. Source rustdoc describes each operation and its caller responsibilities.

Clean-Room Policy

EriX code must be original. Do not copy external implementation code, add external Rust crates or use generators that embed third-party code.

License

ISC.

Development Model

Use Rust formatting, strict Clippy, unit tests and warning-denied builds and rustdoc. Preserve documented behavior across host, bare-metal and UEFI targets. See CONTRIBUTING.md for the shared development rules.

Governance Principles

Keep this crate small and independently auditable. Coordinate behavior or API changes with callers through exact signed Git revisions.

Library Boundaries

Input borrows and exclusive storage are the only runtime authority. Callers own secret lifetimes and must assess the selected compiler and target for timing-sensitive use. Erasure does not synchronize concurrent users.

Contact

Development is tracked in the EriX organization. Contact the maintainer at admin@erikinkinen.fi.