Commit Graph

64 Commits

Author SHA1 Message Date
JohnE 59ae2bfa04 awslc: add capability probes and the AEAD benchmark
An algorithm is available only when its live probe works and its KAT
passed, so the engine's gate never admits an unverified algorithm.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE feaecad922 awslc: report FIPS mode only for a FIPS build
fips_mode() is true only with the fips feature (AWS-LC-FIPS) and when
aws_lc_rs::try_fips_mode() succeeds; an open-source build never asks.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE aba0763b3f awslc: add X25519 and ML-KEM known-answer tests
aws-lc-rs has no deterministic ML-KEM encapsulation, so the KAT decapsulates
an OpenSSL-made seed-00 vector pinned to the RustCrypto provider's values.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE 3099de4097 awslc: add symmetric known-answer self-tests
Every AEAD, hash, HMAC and HKDF the provider offers gets a published
vector, so the engine's KAT gate can admit it.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE 732eb8dd29 awslc: add X25519 and ML-KEM-768/1024
Public keys and ciphertexts use the standard encodings; ML-KEM private
keys are the expanded FIPS 203 dk since aws-lc-rs has no seed keygen API.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE 92e3eaf22f awslc: add HKDF-SHA-256/384/512
An empty salt is passed as the explicit zero salt of hash length: same
bytes as RFC 5869 and the other providers, and the form AWS-LC-FIPS approves.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE 72c24def82 awslc: add SHA-2, SHA-3 and HMAC-SHA-2
HMAC verification uses aws-lc-rs's constant-time hmac::verify; BLAKE2b
and Poly1305 are not in aws-lc-rs and report FeatureNotCompiled.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE 0631c1c637 awslc: add the aws-lc-rs provider crate with AEADs
aws-lc-rs (Apache-2.0/ISC) replaces wolfSSL as the vetted provider and
FIPS anchor; start with AES-256-GCM, AES-256-GCM-SIV and ChaCha20-Poly1305.

Refs: R3
2026-11-16 20:33:07 -05:00
JohnE 19ac46f165 boring: add BoringProvider with cached KATs and fips mode
Capabilities are computed once; fips_mode needs both the fips feature and
FIPS_mode() at run time.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE 5702935fc7 boring: add capability probes and AEAD benchmark
An algorithm is available only when its live probe and its KAT pass, so
the engine gate never sees an untested BoringSSL algorithm.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE 789b77fd7a boring: add known-answer self-test for every algorithm
The engine gate offers only algorithms with a passing KAT; the vectors are
the ones the RustCrypto and wolfSSL providers already pin.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE 4051bd6ccd boring: add X25519 and ML-KEM-768/1024 KEMs
Same key, ciphertext and secret formats as the other providers, so keys
and ciphertexts interoperate across libraries.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE 944b335454 boring: add AES-GCM and ChaCha20-Poly1305 AEADs
AES-256-GCM, ChaCha20-Poly1305 and XChaCha20-Poly1305 via EVP_AEAD, in the
ciphertext||tag format the other providers use.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE da2ed16c8d boring: add HKDF-SHA-2 key derivation
Uses BoringSSL's native HKDF; empty salt and length cap match the other
providers so the CCC key schedule derives the same keys.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE 01fb73fb4c boring: add HMAC-SHA-2 with constant-time verify
HMAC-SHA-256/384/512 from BoringSSL; tags are compared with CRYPTO_memcmp.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE 0ed4d9bb19 boring: add BoringSSL provider crate with SHA-2
Second native provider after the move off wolfSSL, backed by boring 5.5.0.
Starts with the crate skeleton and SHA-256/384/512.

Refs: R3
2026-11-16 20:26:52 -05:00
JohnE f8bca636b5 cascade: bind the vetted layer through a provider slot
Built-in suites name a 'vetted' slot that AWS-LC, BoringSSL or wolfSSL can
fill; the ciphertext does not depend on which one.

Refs: R3
2026-11-16 20:20:13 -05:00
JohnE 44a10149ce cascade: add HPKE PSK mode
LGP's Ultra U2 layer passes the McEliece secret as the HPKE PSK (spec
§8.5); interop with the hpke crate is tested both ways.
Refs: R4-10
2026-11-16 19:56:43 -05:00
JohnE 2fad139f73 cascade: pin CCC v2 and STREAM vectors across providers
Cascade output is pinned per built-in suite, and moving a layer to the
other provider must give identical bytes (R3 exit).
Refs: R3-6
2026-11-16 19:56:43 -05:00
JohnE 61e135f48d cascade: anchor the key schedule in the FIPS AES-GCM layer
Release suites need AES-256-GCM from a FIPS provider, whose HKDF keys
every layer; untested algorithms are refused; suite and rounds join the
HKDF info; STREAM gets a consuming finish().
Refs: R3-3, R3-6, R3-7
2026-11-16 19:56:43 -05:00
JohnE 3aec1a8460 wolfssl: add XChaCha, HKDF and HMAC self-test vectors
The cascade and HPKE key schedules use HKDF and HMAC, which had no
known-answer test, so a broken KDF passed the self-test gate.
Refs: R3-6
2026-11-16 19:56:43 -05:00
JohnE 9b11fb0c43 wolfssl: document the FIPS 140-3 build
Explains the bundle variables, configure options and the in-core
hash workflow for release builds.

Refs: R3-7
2026-11-16 19:56:43 -05:00
JohnE d92de9e60b wolfssl: report fips_mode from the FIPS self-test status
fips_mode must mean a validated module whose POST passed, not just a
build flag, so the policy can trust it.

Refs: R3-7
2026-11-16 19:56:43 -05:00
JohnE e68c3f5d46 wolfssl: build against the wolfCrypt FIPS bundle with fips
Release builds need the validated module (D-26); the build fails
when WOLFSSL_FIPS_SOURCE_DIR is missing instead of falling back.

Refs: R3-7
2026-11-16 19:56:43 -05:00
JohnE 64082b98a8 oqs: cross-check McEliece against the rustcrypto provider
Keys and ciphertexts from either implementation must work in the
other, including implicit rejection.

Refs: R3-9
2026-11-16 19:56:43 -05:00
JohnE 99c0324195 oqs: add seeded self-test that gates capabilities
liboqs reproduces the RustCrypto McEliece KAT bit for bit; HQC and
Frodo values pin the liboqs 0.13 build.

Refs: R3-5
2026-11-16 19:56:43 -05:00
JohnE b39272228f oqs: add McEliece 460896f, HQC-192 and FrodoKEM-976 KEMs
Code-based and LWE KEMs that wolfCrypt and RustCrypto lack; every
randomised call holds one lock so the self-test can seed liboqs.

Refs: R3-5
2026-11-16 19:56:43 -05:00
JohnE 355bfe3c2e oqs: add experimental liboqs provider crate as a stub
Without the liboqs feature it offers nothing, so default builds need
no cmake. The feature builds once the KEM and self-test land.

Refs: R3-5
2026-11-16 19:56:43 -05:00
JohnE 6e8f51d23f core: add HQC-192 and FrodoKEM-976 IDs and KEM tiers
The oqs provider needs IDs for them, and the policy checks need a
tier per KEM like the AEADs have.

Refs: R3-5
2026-11-16 19:56:43 -05:00
JohnE ec3db2efac rustcrypto: add McEliece 460896f self-test, mark it available
A seeded KAT pins keygen, encapsulation and decapsulation, so a
broken build fails closed instead of offering the KEM.

Refs: R3-9
2026-11-16 19:56:43 -05:00
JohnE 7ba9f6c996 rustcrypto: add Classic McEliece 460896f behind a feature
Ultra U2 needs a conservative KEM; work runs on an 8 MiB worker stack
so small caller threads cannot overflow. Not yet marked available.

Refs: R3-9
2026-11-16 19:56:43 -05:00
JohnE 3e0481901c core: add Classic McEliece 460896f KEM ID
Ultra U2 uses the f variant for steady keygen; ID 54 stays as is.
Providers report it as not compiled until they implement it.

Refs: R3-9
2026-11-16 19:56:43 -05:00
JohnE 92c75616ef cascade: add Argon2id with explicit parameters
Keyslots record their own Argon2id costs per profile; the providers'
Argon2id has one fixed set. Cross-checked against both providers.
Refs: R5-3
2026-11-16 19:56:43 -05:00
JohnE 66438b7049 cascade: add the 3-, 9- and 48-layer benchmark
The R3 exit asks for recorded seal and open costs of long suites.
Refs: R3-2
2026-11-16 19:56:43 -05:00
JohnE 71d07bd495 cascade: add RFC 9180 HPKE base mode over the providers
Inbox seals and LGP hand-outs use X-Wing HPKE with the vetted AEAD and
KDF; interop is checked against the independent hpke crate.
Refs: R3-9
2026-11-16 19:56:43 -05:00
JohnE 9ee740497b cascade: test built-in suites with both real providers
Each suite resolves and round-trips at 1, 3 and 16 rounds, and release
policy refuses this non-FIPS build (fail closed, D-26).
Refs: R3-3, R3-7
2026-11-16 19:56:43 -05:00
JohnE 5184dbd6ef rustcrypto: add provider, capabilities and benchmark
Registers as "rustcrypto" (fips_mode false); an algorithm is available
only if its live probe and its self-test both pass (fail closed, D-28).
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE af11468d97 rustcrypto: add HKDF-SHA-384 self-test vector
Every offered algorithm needs a KAT before it is marked available;
the value is the RFC 5869 TC1 inputs checked against OpenSSL.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE 66ec0f0685 rustcrypto: add KDF and KEM self-test vectors
HKDF, Argon2id (RFC 9106), X25519 and X-Wing use published vectors;
ML-KEM seed keys are pinned against OpenSSL 3.6 deterministic encaps.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE 6a321e3efc rustcrypto: add AEAD, hash and MAC self-test vectors
Startup self-tests must fail closed (D-28); each symmetric algorithm
gets an RFC or NIST known-answer vector, including tag rejection.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE 2f1248e447 rustcrypto: add X25519, ML-KEM and X-Wing KEMs
Pure-Rust KEMs for the hybrid key agreement; ML-KEM keys are 64-byte
FIPS 203 seeds and X25519 keeps the wolfSSL ephemeral-DH convention.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE 2a8dbdcd6b rustcrypto: add HKDF, BLAKE2b KDF and Argon2id
Same semantics as the wolfSSL provider (zero salt, 255*HashLen cap,
64 MiB/3/4 Argon2id) so either provider derives identical keys.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE bb5473eeca rustcrypto: add hash and MAC primitives
SHA-2, SHA-3 and BLAKE2b digests plus HMAC, keyed BLAKE2b and Poly1305,
matching the wolfSSL provider's key and tag conventions.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE bc589960c8 rustcrypto: add pure-Rust provider crate with AEADs
Second, independent AEAD implementation for cascade layers (provider
diversity): AES-256-GCM, AES-256-GCM-SIV, (X)ChaCha20-Poly1305, Ascon-AEAD128.
Refs: R3-4
2026-11-16 19:56:43 -05:00
JohnE 743e9ee00e cascade: add STREAM mode for blobs
64 KiB segments with counter and last-flag nonces, so blobs cannot be
reordered or truncated, with memory bounded by one segment.
Refs: R3-2
2026-11-16 19:56:43 -05:00
JohnE 7058c5ffa4 cascade: add CCC v2 seal and open with suite policy
Independent HKDF-SHA-512 key and nonce per layer per round, AAD bound to
suite and layout, at most 16 rounds, fail closed on policy or self-test.
Refs: R3-2, R3-3, R3-6
2026-11-16 19:56:43 -05:00
JohnE 7776380a93 cascade: add secret types and bucket padding
Secrets never print and are wiped on drop (S8); padding hides sizes
behind buckets and unpads strictly.
Refs: R3-2, R3-8
2026-11-16 19:56:43 -05:00
JohnE f8c64390e3 wolfssl: fix HKDF-SHA-512 extract
wc_Tls13_HKDF_Extract rejects SHA-512 here, so every HKDF-SHA-512 call
failed; extract is now HMAC(salt, ikm), pinned by reference vectors.
Refs: R3-2
2026-11-16 19:56:43 -05:00
JohnE 7a10b28f2d core: add GCM-SIV, Ascon-AEAD128, X-Wing and tiers
The Rust registry becomes the single source of algorithm IDs and tiers
for CCC v2 (G-8); existing IDs keep their Dart values until R10.
Refs: R3-1
2026-11-16 19:56:43 -05:00
JohnE 80e0e65462 FIX: android ndk path set for cross compile build chain 2026-04-30 20:26:37 -07:00