Skip to content

v0.5.0

Latest

Choose a tag to compare

@integritychain integritychain released this 23 Oct 17:41
· 8 commits to main since this release

Migration from 0.4.x

  • MSRV is 1.85 (was 1.70). The public API is unchanged.

Changed

  • DecapsKey::try_from_bytes rejects a key with a secret coefficient of q or more. For such a key, ml_kem_*_decaps in the C library returns ML_KEM_DESERIALIZATION_ERROR (was ML_KEM_DECAPSULATION_ERROR).
  • KeyGen::validate_keypair_with_rng_vartime and Encaps::encaps_from_seed are #[must_use].
  • Secret intermediate values are zeroized, best effort: copies of keys that are moved or passed by value can remain on the stack.
  • Python: libfips203 is loaded from FIPS203_PYTHON_TESTING_LIBRARY if set, else from the system library path (no longer from ../../target/debug).
  • Building the crate itself, as distributions do, no longer fails on new compiler warnings or with no parameter-set feature.

Fixed

  • Decapsulation rounds Decompress to the nearest integer, as FIPS 203 eq. 4.8 requires. 0.4.x rounded up, so with a crafted key pair a correctly encapsulated ciphertext could decapsulate to the implicit-rejection key.
  • FFI: ml_kem_populate_seed returns ML_KEM_KEYGEN_ERROR when the OS RNG fails, instead of aborting.
  • FFI: fips203.h can be included in more than one C file.
  • FFI: linker flags follow the target, not the build machine, so cross builds work and Android gets an unversioned SONAME.

On crates.io: fips203 0.5.0 and fips203-ffi 0.5.0 · API docs