Update mlkem-native to v1.1.0#2376
Conversation
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
…tests] This commit removes the constant time passes which for ML-KEM that is used to suppress the false positives of the constant-time tests. This is no longer needed with mlkem-native as mlkem-native does explicit declassifications for public data that is being branched on. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
34a0251 to
8fae006
Compare
|
@bhess Should this have any changes to the CBOM since there's an update in the upstream implementation? |
bhess
left a comment
There was a problem hiding this comment.
LGTM, thanks for the update @mkannwischer.
@bhess Should this require any CBOM changes due to the upstream update?
The current CBOM does not track the upstream dependency (to be handled in #2048), so since there are no new optimizations or algorithm changes, no CBOM update is needed.
|
Hello, I wanted to ask if there is a specific reason why
As these are marked with lowercase I also noticed that MLD_CONFIG_EXTERNAL_API_QUALIFIER seems to be defined, which made me wonder if a similar qualifier was intentionally omitted for ML-KEM ? |
…onfigs The liboqs integration configs were missing MLK_CONFIG_EXTERNAL_API_QUALIFIER which should be set to OQS_API. This is causing some issues as reported in open-quantum-safe/liboqs#2376. This commit adds them to align with mldsa-native. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
…onfigs The liboqs integration configs were missing MLK_CONFIG_EXTERNAL_API_QUALIFIER which should be set to OQS_API. This is causing some issues as reported in open-quantum-safe/liboqs#2376. This commit adds them to align with mldsa-native. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
This is more of an oversight - it seems it wasn't strictly needed before. Can you add a patch to the config in your ACVP PR, so we can get this merged first? |
…onfigs The liboqs integration configs were missing MLK_CONFIG_EXTERNAL_API_QUALIFIER which should be set to OQS_API. This is causing some issues as reported in open-quantum-safe/liboqs#2376. This commit adds them to align with mldsa-native. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Sure, I can add the changes as patch in my PR, post this PR merge. |
* Update mlkem-native to v1.1.0 [full tests] [extended tests] Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> * ML-KEM: Remove constant-time passes whitelist [full tests] [extended tests] This commit removes the constant time passes which for ML-KEM that is used to suppress the false positives of the constant-time tests. This is no longer needed with mlkem-native as mlkem-native does explicit declassifications for public data that is being branched on. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> --------- Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com>
* fix: build on windows clang Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Update CMakeLists.txt Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Update CMakeLists.txt Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Pin Wycheproof test vectors to last good commit (#2393) This is a temporary solution for unblocking CI pipeline; a more permanent fix is needed to incorporate new test cases Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * sntrup761: replace PQClean code with public domain OpenSSH code (#2356) * sntrup761: replace PQClean code with public domain OpenSSH code Signed-off-by: Billy Brumley <bbb@iki.fi> * Update top-level LICENSE file Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca> * [src/kem/ntruprime/sntrup761_openssh] use macro for explicit_bzero Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime/sntrup761_openssh] assign values to volatiles to make stricter android ld.lld happy Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime/sntrup761_openssh] drop attributes for MSVC Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime/sntrup761_openssh] alloca for stack allocated variable length arrays Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime/sntrup761_openssh] MSVC doesn't like variable length arrays on the stack; script to modify upstream source Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime/sntrup761_openssh] sntrup761.sh: resulting changes Signed-off-by: Billy Brumley <bbb@iki.fi> * [docs/algorithms/kem] YAML doc update for sntrup761 Signed-off-by: Billy Brumley <bbb@iki.fi> * doc: copy_from_upstream.py changes for sntrup761 from OpenSSH Signed-off-by: Billy Brumley <bbb@iki.fi> * [.github] CODEOWNERS: sntrup761, sign up for /src/kem/ntruprime Signed-off-by: Billy Brumley <bbb@iki.fi> * [docs/algorithms/kem] sntrup761 from upstream OpenSSH has no runtime featurization Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime] add OPENSSH prefix and use it Signed-off-by: Billy Brumley <bbb@iki.fi> * [docs/algorithms/kem] sntrup761: markdown fix, are implementations chosen based on runtime CPU feature detection Signed-off-by: Billy Brumley <bbb@iki.fi> * [src/kem/ntruprime/sntrup761_openssh] sntrup761: use __builtin_alloca intrinsic as a fallback for alloca in non-MSVC cases Signed-off-by: Billy Brumley <bbb@iki.fi> * [extended tests] sntrup761: add CT exception for rejection sampling Signed-off-by: Billy Brumley <bbb@iki.fi> --------- Signed-off-by: Billy Brumley <bbb@iki.fi> Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca> Signed-off-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Add MQOM to liboqs (#2385) * Add common dependencies with include_only Signed-off-by: Basil Hess <bhe@zurich.ibm.com> * Remove incorrect debug print in copy_from_upstream Signed-off-by: Basil Hess <bhe@zurich.ibm.com> * Add readme for copy_from_upstream Signed-off-by: Basil Hess <bhe@zurich.ibm.com> * Import MQOM: - memopt variant of the algorithm allowed using PR #2367 - common files for all variants are factorized using PR #2382 [extended tests] Signed-off-by: Ryad Benadjila <ryadbenadjila@gmail.com> --------- Signed-off-by: Basil Hess <bhe@zurich.ibm.com> Signed-off-by: Ryad Benadjila <ryadbenadjila@gmail.com> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Update mlkem-native to v1.1.0 (#2376) * Update mlkem-native to v1.1.0 [full tests] [extended tests] Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> * ML-KEM: Remove constant-time passes whitelist [full tests] [extended tests] This commit removes the constant time passes which for ML-KEM that is used to suppress the false positives of the constant-time tests. This is no longer needed with mlkem-native as mlkem-native does explicit declassifications for public data that is being branched on. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> --------- Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Fix mismatched macros in LMS variants (#2379) Signed-off-by: Abhi S <saxena_abhinav@icloud.com> Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> * Bump the pip group across 2 directories with 1 update (#2389) Bumps the pip group with 1 update in the /.github/workflows directory: [requests](https://github.com/psf/requests). Bumps the pip group with 1 update in the /scripts/copy_from_upstream directory: [requests](https://github.com/psf/requests). Updates `requests` from 2.32.4 to 2.33.0 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.32.4...v2.33.0) Updates `requests` from 2.32.4 to 2.33.0 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.32.4...v2.33.0) --- updated-dependencies: - dependency-name: requests dependency-version: 2.33.0 dependency-type: direct:production dependency-group: pip - dependency-name: requests dependency-version: 2.33.0 dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> --------- Signed-off-by: Nelonn <42481486+Nelonn@users.noreply.github.com> Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> Signed-off-by: Billy Brumley <bbb@iki.fi> Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca> Signed-off-by: Basil Hess <bhe@zurich.ibm.com> Signed-off-by: Ryad Benadjila <ryadbenadjila@gmail.com> Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> Signed-off-by: Abhi S <saxena_abhinav@icloud.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Bruce <g66xu@uwaterloo.ca> Co-authored-by: Billy Brumley <bbb@iki.fi> Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com> Co-authored-by: Ryad Benadjila <ryadbenadjila@gmail.com> Co-authored-by: Matthias J. Kannwischer <matthias@kannwischer.eu> Co-authored-by: Abhi S <150999537+abhi-dev-engg@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update mlkem-native to v1.1.0 [full tests] [extended tests] Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> * ML-KEM: Remove constant-time passes whitelist [full tests] [extended tests] This commit removes the constant time passes which for ML-KEM that is used to suppress the false positives of the constant-time tests. This is no longer needed with mlkem-native as mlkem-native does explicit declassifications for public data that is being branched on. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> --------- Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com> Signed-off-by: Will Bates <william.bates11@outlook.com>
mlkem-native v1.1.0 just landed: https://github.com/pq-code-package/mlkem-native/releases/tag/v1.1.0.
This PR updates to the tagged upstream version. In addition, I also removed the constant-time passes: mlkem-native is using explicit declassifications using
VALGRIND_MAKE_MEM_DEFINEDinstead.Below are some highlights of this release (not all of which are relevant to the liboqs integration):
mlkem-native v1.1.0 marks the completion of the verification of all x86_64 and AArch64 assembly and the introduction of
SOUNDNESS.md documenting the scope, assumptions and risks of the verification work. It also introduces
various configuration options enabling the customization of mlkem-native for different application contexts. Finally,
new backends for RISC-V RVV and Armv8.1-M MVE have been added.
See the full change log here: pq-code-package/mlkem-native@v1.0.0...v1.1.0
What's New
Security
pkpvinmlk_indcpa_keypair_derand()andmlk_indcpa_enc(). (#1328)pkandskbuffers on keypair generation failure (e.g. OOM during the pairwise consistency test). (#1559)volatileto prevent compilers from optimizing it away, strengthening the constant-time countermeasure. This is a purely preventative measure; no insecure compilations of the previous value barrier have been noted. (#1342).note.GNU-stacksection markers. (#1340)Assurance
free of secret-dependent timing, in HOL Light.
lie. (#1582)
Performance
polyvec_basemul(#1097), SSE4.1 rejection sampling (#1136), conversion of compression/decompression from intrinsics to assembly (#1543, #1545), and replacement of the Keccak-f1600 x4 C intrinsics with formally verified AVX2 assembly from s2n-bignum (#1576).inverse NTT, polynomial arithmetic, and rejection sampling. NTT and invNTT are for VLEN >= 256, with automatic
fallback to C for VLEN=128. Other functions are VLEN agnostic. (#1037)
Configuration / API
MLK_CONFIG_CUSTOM_ALLOC_FREE: Custom allocation/deallocation for large internal structures, for systems with limited stack space. (#1389)MLK_CONFIG_CONTEXT_PARAMETER: Add opaque context parameter to top-level API, passed through to custom alloc/freeroutines enabled via
MLK_CONFIG_CUSTOM_ALLOC_FREE. Useful for applications without global allocator context. (#1467)MLK_CONFIG_NO_RANDOMIZED_API: Build only the deterministic (_derand) API. (#1185)MLK_CONFIG_SERIAL_FIPS202_ONLY: Disable 4x-batched FIPS-202, allowing use of a simpler serial-only FIPS-202 backend. (#1231)randombytes()may now return an error code, which is propagated through the KEM API. (#1331)mlk_kem_check_pk()/mlk_kem_check_sk()added to the public API for FIPS 203 modulus and hash checks. (#1216)mlkem_native.h. (#1465)MLK_CONFIG_CUSTOM_MEMCPY/MLK_CONFIG_CUSTOM_MEMSET: Custom replacements formemcpyandmemset. (#1105)Testing