Craton Shield
Changelog
All notable changes to vs-crypto are documented in this file.
[0.7.0]
Breaking
RustCryptoPqProvider::default()now produces an unprovisioned provider withrng_installed = false. Any call toset_mlkem_key(_, None)/set_mldsa_key(_, None)ormlkem_encapsulatereturnsVsError::NotInitializeduntil an entropy source is installed viaRustCryptoPqProvider::install_rng(or until the provider was constructed via::new(rng)). This closes a zero-seed vulnerability where the previous no-op default RNG silently filled key seeds with zeros. Explicit-seedprovision_mlkem_key/provision_mldsa_keypaths are unchanged.- Removed the
NonceCounter::last_counter_valueaccessor. Usecounter_for_persistence()instead — identical functionality with a clearer name.
Changed
SeedRng::fill_bytesno longer panics on seed exhaustion in release builds. It now sets an internalis_exhaustedflag, zero-fills the destination, and lets callers query the state viaSeedRng::is_exhausted(). Debug builds still panic so test runs surface caller bugs loudly.try_fill_bytescontinues to returnErron exhaustion without flipping the flag.
Added
RustCryptoPqProvider::install_rngfor late RNG installation on a defaulted provider.NonceTracker::check_onlyfor non-destructive nonce-reuse checks; used to avoid permanently consuming nonces when AEAD encrypt fails.