lib-aes provides internal no_std AES-256 primitives for filesystem crypto work
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen 134db24c54
All checks were successful
CI / markdown (push) Successful in 2s
CI / test (push) Successful in 35s
feat: Merge bounded AES schedule ownership
Retain the exact incoming schedule, fixed-arithmetic and CBC-CS3 feature boundaries. Bind the target workflow to actual main providers for main-graph qualification.
2026-11-14 20:53:51 +02:00
.github feat: Merge bounded AES schedule ownership 2026-11-14 20:53:51 +02:00
docs fix: Implement the complete CBC-CS3 ciphertext format 2026-11-14 20:53:29 +02:00
examples perf: Use fixed AES field transformations 2026-11-14 20:53:29 +02:00
src fix: Implement the complete CBC-CS3 ciphertext format 2026-11-14 20:53:29 +02:00
.editorconfig Initial commit 2026-04-30 11:54:06 +02:00
.gitignore Initial commit 2026-04-30 11:54:06 +02:00
.markdownlint-cli2.yaml Tighten CI markdown policy 2026-05-22 15:10:08 +03:00
ARCHITECTURE.md fix: Implement the complete CBC-CS3 ciphertext format 2026-11-14 20:53:29 +02:00
Cargo.toml feat: Erase original AES key schedules at retirement 2026-11-14 20:53:29 +02:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:13 +03:00
CONTRIBUTING.md ci: Align CI source acquisition and repository policy 2026-10-30 10:42:55 +02:00
LICENSE Initial commit 2026-04-30 11:54:06 +02:00
README.md fix: Implement the complete CBC-CS3 ciphertext format 2026-11-14 20:53:29 +02:00
ROADMAP.md fix: Implement the complete CBC-CS3 ciphertext format 2026-11-14 20:53:29 +02:00
rustfmt.toml Initial commit 2026-04-30 11:54:06 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:13 +03:00

lib-aes

lib-aes provides internal no_std AES-256 primitives for filesystem crypto work. It currently includes AES-256 block encryption/decryption, full-block AES-XTS sectors, full-block AES-CBC helpers, and CBC ciphertext stealing for fscrypt filenames. The CTS helpers use CBC-CS3, including the final-block exchange on aligned inputs; the separate CBC helpers retain ordinary CBC ordering.

EriX is a clean-room, capability-based microkernel operating system written entirely in Rust.

Technical requirements are tracked in the EriX requirements, conventions, and project documentation.

See:

  • docs for design documents, specifications, and development plans.
  • Related architecture repositories for kernel, services, libraries, drivers, and integration tooling.

Expanded AES schedules are private single owners erased on drop. Callers retain ownership of input keys, output bytes and the surrounding authority policy.

Purpose of This Repository

This repository implements the EriX AES library. Its purpose in EriX is to provide reusable AES primitives and contracts to EriX components.

Functionally, it exposes the AES APIs, validation tests, and documentation used by dependent repositories. The repository keeps the implementation, interface contracts, tests, and documentation for that behavior in one reviewable ownership boundary.

The maintained responsibilities are:

  • expose the lib-aes crate API for AES behavior used by dependent components
  • keep data formats, constants, and validation helpers documented and tested
  • preserve clean-room, no-external-crate implementation boundaries
  • coordinate intentional pre-1.0 API changes with lib-fs-crypto

Clean-Room Policy

EriX follows a strict clean-room philosophy:

  • No external source code may be copied.
  • No external Rust crates are allowed.
  • No code generation tools that embed third-party code.
  • All code must be authored within the project.

Violations will result in rejection of the contribution.

License

All EriX repositories are licensed under the ISC License.

Development Model

EriX development is modular, deterministic, reproducible, authority-explicit, security-first, and self-hosting oriented.

This repository follows the project roadmap and the validation rules documented in its own roadmap.

Validation

cargo fmt --all -- --check
RUSTFLAGS="-D warnings" cargo clippy --all-targets --all-features -- -D warnings
RUSTFLAGS="-D warnings" cargo test --all-targets --all-features

The xts-profile example measures an explicit workload with public fixture keys. It checks the complete plaintext and full-width logical IV, then emits phase times and the complete ciphertext for comparisons:

cargo run --example xts-profile -- --bytes 4096 --logical 4294967303

These are host wall times. Fixed arithmetic in the source does not establish timing independence across all compilers and processors.

Governance Principles

lib-aes governance is scoped to reusable AES contracts shared by dependent repositories.

The scoped governance rules are:

  • It must expose narrow, documented APIs rather than component-specific policy.
  • It keeps wire formats, constants, parsers, and validation helpers deterministic and testable.
  • It preserves clean-room implementation boundaries and does not introduce external crate dependencies.
  • Breaking API or format changes require coordinated updates in every dependent repository.

Library Boundaries

  • lib-aes carries no runtime authority by itself; authority is held by callers that use the library.
  • The crate must not hide ambient I/O, allocation policy, or service discovery behind helper APIs.

Contact

Development occurs in EriX organization and discussions happen in issues and design documents.

No decisions are considered valid without documented rationale.

Maintainers can be reached via email: admin@erikinkinen.fi.