Files
Johnathan Corgan 72b548be1b Move the Noise handshake and sessions into fips-core
Move the root's noise module into fips-core's noise module. handshake.rs,
replay.rs and session.rs move unchanged, and the tests move unchanged to
core/src/noise/tests/mod.rs. The root's noise/mod.rs moves to
core/src/noise/cipher.rs, keeping its module documentation, the protocol
names, the error and role types and CipherState; in it the mod lines and
the mod tests line go, the re-export block becomes one use of the parent
module's sizes, the aead import names super::aead, open, take_cleared
and clear_slot become pub, and the test-only key_bytes becomes
pub(super), for the tests now beside it. fips-core's noise/mod.rs
declares the submodules and re-exports their items, with open behind
the test-hooks feature and take_cleared and clear_slot hidden from the
docs.

The root keeps every path through src/noise.rs, which re-exports the
moved items and defines fips::noise::HandshakeState as
HandshakeState<OsEntropy>. It also holds a compile-time check that
AeadKey is ring's LessSafeKey, so a hosted build cannot silently fall
back to the slower RustCrypto backend if the root's fips-core line loses
its ring feature; on Windows, where the workers' paths are not built,
that line is the only such check. The root re-exports that the files
used while they were in the root (identity::secp, testutil::TestEntropy
and entropy) go.

fips-core gains hkdf and hmac, sha2's zeroize feature and zeroize's
derive, which the handshake needs; the root drops hkdf and hmac, which
no root code uses now. Cargo.lock gains no package.
2026-10-15 05:56:55 +00:00
..