mlkem-native v2.0.0
Release notes
mlkem-native v2.0.0 is the second major release of mlkem-native. It follows
mlkem-native v1.3 and makes minor API changes: It removes the SUPERCOP crypto_kem_*
aliases and the legacy MLK_CONFIG_API_* path, splits the ambiguous MLK_ERR_FAIL
return code into specific error codes, and renames the FIPS-202 backend and
system-capability macros.
See the full change log here:
v1.3.0...v2.0.0
Long-Term Support
release/v1.3 will
act as a support branch until February 2027 (inclusive). It will receive bugfixes, but no
new features. We do currently not plan to offer long-term support for mlkem-native v1.x beyond that timeframe.
If you are deploying mlkem-native v1.3 and expect to be unable to upgrade to
mlkem-native v2 by February 2027, please contact us to discuss a potential extension
of the support schedule.
Breaking changes since v1.3.0
- Split the ambiguous
MLK_ERR_FAILreturn code intoMLK_ERR_INVALID_PK
(-4),MLK_ERR_INVALID_SK(-5), andMLK_ERR_PCT_FAIL(-6), returned
respectively for a public key rejected by the FIPS 203 modulus check, a secret
key rejected by the hash check, and a failed keygen pairwise consistency test.
The codes-1..-3are unchanged;MLK_ERR_FAILremains defined but is no
longer returned by any function. Integrators mapping return codes into their
own error space must handle the new values.
(#1852) - Remove the SUPERCOP
crypto_kem_*API aliases, theMLK_CONFIG_NO_SUPERCOP
option, and theCRYPTO_{PUBLICKEY,SECRETKEY,CIPHERTEXT}BYTES,
CRYPTO_SYMBYTESandCRYPTO_BYTESsize constants. Consumers must use the
namespaced API (e.g.mlkem_keypair) and derive sizes from
MLK_CONFIG_PARAMETER_SET.
(#1857) - Remove the legacy
MLK_CONFIG_API_*configuration path. Configure builds
through the configuration file instead, renamingMLK_CONFIG_API_PARAMETER_SET
toMLK_CONFIG_PARAMETER_SET,MLK_CONFIG_API_NAMESPACE_PREFIXto
MLK_CONFIG_NAMESPACE_PREFIX,MLK_CONFIG_API_CONSTANTS_ONLYto
MLK_CONFIG_CONSTANTS_ONLY, andMLK_CONFIG_API_QUALIFIERto
MLK_CONFIG_EXTERNAL_API_QUALIFIER. For a multi-level build, set
MLK_CONFIG_MULTILEVEL_BUILD; the parameter set is now appended to the
namespace prefix automatically.
(#1853) - Prefix the
mlk_sys_capenum values with their architecture:
MLK_SYS_CAP_{AVX2,NEON,SHA3,MVE}become
MLK_SYS_CAP_{X86_64_AVX2,AARCH64_NEON,AARCH64_SHA3,ARMV81M_MVE}. Custom
capability functions must use the new names.
(#1770) - Rename the FIPS-202 backend function-support flags to the
MLK_USE_NATIVE_<function>convention used by the arithmetic backend:
MLK_USE_FIPS202_X1_NATIVEtoMLK_USE_NATIVE_FIPS202_X1,
MLK_USE_FIPS202_X4_NATIVEtoMLK_USE_NATIVE_FIPS202_X4,
MLK_USE_FIPS202_X4_XOR_BYTES_NATIVEtoMLK_USE_NATIVE_FIPS202_X4_XOR_BYTES,
andMLK_USE_FIPS202_X4_EXTRACT_BYTES_NATIVEto
MLK_USE_NATIVE_FIPS202_X4_EXTRACT_BYTES. Custom FIPS-202 backends must rename
these flags accordingly.
(#1775)
What's New
Assurance
- Axiomatize the default
mlk_zeroizein CBMC via a contract for its
zeroed-output postcondition, and configure the proofs with a failing custom
mlk_zeroizeso they must rely on the contract rather than the concrete
implementation.
(#1850) - Strengthen the top-level API contracts to check that output buffers are
zeroized or left unmodified on error.
(#1850)
Configuration / API
- Add the error codes
MLK_ERR_INVALID_PK,MLK_ERR_INVALID_SK, and
MLK_ERR_PCT_FAIL, distinguishing a rejected public key, a rejected secret
key, and a failed keygen self-test.mlk_check_pctmaps a key-check rejection
of the freshly generated key toMLK_ERR_PCT_FAILand passes platform
failures through unmodified.
(#1852)
Testing
- Support the FIPS 203-tr1 encapDecap revision in the ACVP client, accepting a
decapsulation key supplied either as an expandeddkor as aseed(d||z)
to expand, withkeyFormatinspected per group. mlkem-native now supports and
is tested against ACVP v1.1.0.43 in addition to the preceding two versions.
(#1811) - Use runtime checks in the Wycheproof client instead of
assert, which is
stripped underpython -Oand could report a mismatching vector as passing.
(#1840)
Documentation
- Add
API-CONVENTIONS.mddescribing the conventions shared by all public
functions: return values and the meaning of theMLK_ERR_XXXcodes, pointer
validity, and the state of output buffers on error. Link it fromREADME.md
and themlkem_native.hpreamble.
(#1843) - Document the
MLK_ERR_RNG_FAILerror returned by keygen.
(#1851) - Clarify the scope and customization of
mlk_zeroize.
(#1855)
What's Changed
- CI: Add merge queue support by @mkannwischer in #1845
- Use runtime checks in Wycheproof client by @mkannwischer in #1840
- refactor: Add MLK_CONTEXT_UNUSED helper for unused context parameters by @mkannwischer in #1839
- CI: Trim unnecessary fetch-depth from checkout steps by @mkannwischer in #1838
- FIPS202: Consolidate backend MLK_USE_NATIVE_* flags by @mkannwischer in #1775
- Document public API conventions by @mkannwischer in #1843
- HOL-Light: Fail tests on unsupported architecture by @mkannwischer in #1836
- CI: Update GitHub action dependencies by @mkannwischer in #1844
- Add missing documentation of MLK_ERR_RNG_FAIL error for keygen by @hanno-becker in #1851
- sys: Prefix capability enum values with architecture by @mkannwischer in #1770
- Config: Remove legacy configuration by @mkannwischer in #1853
- Zephyr: apply -O3 across test firmware by @mkannwischer in #1847
- CBMC: Check that outputs are zeroized or unmodified on error by @hanno-becker in #1850
- Doc: Clarify scope and customization of mlk_zeroize by @hanno-becker in #1855
- Remove crypto_kem_* API aliases and MLK_CONFIG_NO_SUPERCOP by @hanno-becker in #1857
- Doc: Port documentation fixes from mldsa-native by @hanno-becker in #1858
- Split ambiguous MLK_ERR_FAIL into specific error codes by @hanno-becker in #1852
- ACVP: Support FIPS203-tr1 encapDecap (v1.1.0.43) by @mkannwischer in #1811
- liboqs: Normalize return codes to OQS_STATUS by @mkannwischer in #1860
- Fix double level-suffixing of default namespace in multi-level builds by @hanno-becker in #1862
- Update documentation of alloc/free customization for v2 by @hanno-becker in #1864
- Add mlkem-native v2.0.0 release notes by @hanno-becker in #1863
- Doc: Fix a few minor mistakes by @mkannwischer in #1865
Full Changelog: v1.3.0...v2.0.0