pq_crypto 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/ext/pqcrypto/pqcrypto_version.h +1 -1
- data/ext/pqcrypto/vendor/.vendored +4 -4
- data/ext/pqcrypto/vendor/mlkem-native/README.md +6 -3
- data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +22 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +77 -36
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +135 -146
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +116 -72
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +351 -415
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/cbmc.h +43 -20
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +16 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +57 -31
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +260 -349
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.h +17 -24
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.c +35 -37
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +43 -57
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.c +14 -15
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.h +5 -4
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +42 -6
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h +31 -20
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x1_scalar_asm.S → keccak_f1600_x1_scalar_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x1_v84a_asm.S → keccak_f1600_x1_v84a_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x2_v84a_asm.S → keccak_f1600_x2_v84a_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x4_v8a_scalar_hybrid_asm.S → keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S → keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +10 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_scalar.h +2 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_v84a.h +1 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x2_v84a.h +4 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h +2 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +1 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h +2 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +55 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +26 -25
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +58 -14
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +57 -16
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/auto.h +2 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +2 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h +10 -7
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/{keccak_f1600_x4_avx2.S → keccak_f1600_x4_avx2_asm.S} +13 -11
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccakf1600_constants.c +12 -11
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +167 -136
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.h +75 -68
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +135 -157
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +15 -13
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/aarch64_zetas.c +143 -135
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +52 -46
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{intt.S → intt_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{ntt.S → ntt_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_mulcache_compute_asm.S → poly_mulcache_compute_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_reduce_asm.S → poly_reduce_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tobytes_asm.S → poly_tobytes_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tomont_asm.S → poly_tomont_aarch64_asm.S} +10 -12
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k2.S → polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k3.S → polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k4.S → polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S} +10 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{rej_uniform_asm.S → rej_uniform_aarch64_asm.S} +12 -12
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_table.c +514 -513
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +254 -253
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +6 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/README.md +6 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/meta.h +77 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/arith_native_ppc64le.h +24 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.c +299 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.h +34 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/intt_ppc_asm.S +3222 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/ntt_ppc_asm.S +1651 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/poly_tomont_ppc_asm.S +294 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/reduce_ppc_asm.S +710 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/meta.h +5 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.c +18 -16
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.h +19 -24
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +53 -65
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/meta.h +20 -20
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +106 -88
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.c +45 -35
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.h +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.c +1 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.h +1 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{intt.S → intt_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntt.S → ntt_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttfrombytes.S → nttfrombytes_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntttobytes.S → ntttobytes_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttunpack.S → nttunpack_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d10.S → poly_compress_d10_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d11.S → poly_compress_d11_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d4.S → poly_compress_d4_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d5.S → poly_compress_d5_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d10.S → poly_decompress_d10_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d11.S → poly_decompress_d11_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d4.S → poly_decompress_d4_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d5.S → poly_decompress_d5_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{mulcache_compute.S → poly_mulcache_compute_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k2.S → polyvec_basemul_acc_montgomery_cached_k2_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k3.S → polyvec_basemul_acc_montgomery_cached_k3_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k4.S → polyvec_basemul_acc_montgomery_cached_k4_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{reduce.S → reduce_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{rej_uniform_asm.S → rej_uniform_avx2_asm.S} +9 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_table.c +514 -513
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{tomont.S → tomont_avx2_asm.S} +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.c +61 -57
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.h +89 -116
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +31 -32
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +226 -301
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/randombytes.h +21 -29
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.c +68 -63
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.h +37 -48
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +44 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +141 -159
- data/lib/pq_crypto/version.rb +1 -1
- data/script/vendor_libs.rb +3 -3
- metadata +47 -38
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aee26c8aa17143d9a17bd24b9435f073cc5d40beff39cbc90d0685d2221ff8d9
|
|
4
|
+
data.tar.gz: b0d51294d4639587c619fd5854d2c33d01b5aaa82929aae759dcb8f5776fefbe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a293e6386c7a350be36b271f9e26fef69f1f3e6050fd3eca5e5f69a7f039c39ad08d152cecf46918b1fa8d60908746c2784de27cae3e0351082cb1c63470fe49
|
|
7
|
+
data.tar.gz: e12be8a7ad95c42cb27659215c4bfe9201d5b18d531c344279707c2ce74d5fb981328c28beb79e72815e182acc0790b9a5682af8adf17c8b737a12e691d830ec
|
data/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
backend=PQ Code Package native only
|
|
3
3
|
pqclean=removed
|
|
4
4
|
mlkem_native_repo=https://github.com/pq-code-package/mlkem-native.git
|
|
5
|
-
mlkem_native_ref=v1.
|
|
6
|
-
mlkem_native_commit=
|
|
7
|
-
mlkem_native_tree_sha256=
|
|
5
|
+
mlkem_native_ref=v1.2.0
|
|
6
|
+
mlkem_native_commit=0ba906cb14b1c241476134d7403a811b382ca498
|
|
7
|
+
mlkem_native_tree_sha256=cc78ed199b8c65abe68635b23a13b294d5a8deb20c8bc7b4d76590c00976bb2d
|
|
8
8
|
mldsa_native_repo=https://github.com/pq-code-package/mldsa-native.git
|
|
9
9
|
mldsa_native_ref=v1.0.0-beta2
|
|
10
10
|
mldsa_native_commit=9b0ee84f4cf399043eca59eca4e5f8531ca1d61b
|
|
11
11
|
mldsa_native_tree_sha256=2887f59926c18a877e8c5a5e30727e84497c357032093d00d7135aedf53f011e
|
|
12
|
-
manifest_sha256=
|
|
12
|
+
manifest_sha256=011e9d7d1160c7d612869695d950e17f9e330dac6bf782883639593f96fee951
|
|
@@ -20,7 +20,7 @@ All C code in [mlkem/src/*](mlkem) and [mlkem/src/fips202/*](mlkem/src/fips202)
|
|
|
20
20
|
using CBMC[^CBMC]. All AArch64 and x86_64 assembly is proved to be functionally correct,
|
|
21
21
|
memory-safe, and of secret-independent timing (constant-time), using HOL-Light[^HOL-Light].
|
|
22
22
|
|
|
23
|
-
mlkem-native includes native backends for Arm (64-bit, Neon), Intel/AMD (64-bit, AVX2),
|
|
23
|
+
mlkem-native includes native backends for Arm (64-bit, Neon), Intel/AMD (64-bit, AVX2), RISC-V (64-bit, RVV), and POWER (ppc64le, VSX). See [benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/) for performance data.
|
|
24
24
|
|
|
25
25
|
mlkem-native is supported by the [Post-Quantum Cryptography Alliance](https://pqca.org/) as part of the [Linux Foundation](https://linuxfoundation.org/).
|
|
26
26
|
|
|
@@ -53,7 +53,7 @@ mlkem-native is used in
|
|
|
53
53
|
- [libOQS](https://github.com/open-quantum-safe/liboqs/) of the Open Quantum Safe project since [0.13.0](https://github.com/open-quantum-safe/liboqs/releases/tag/0.13.0) (as the default ML-KEM implementation)
|
|
54
54
|
- AWS' Cryptography library [AWS-LC](https://github.com/aws/aws-lc/) since [v1.50.0](https://github.com/aws/aws-lc/releases/tag/v1.50.0)
|
|
55
55
|
- The [rustls](https://github.com/rustls/rustls) TLS library written in Rust since [0.23.28](https://github.com/rustls/rustls/releases/tag/v%2F0.23.28) (through AWS-LC as the default cryptography provider)
|
|
56
|
-
-
|
|
56
|
+
- [Pavona](https://github.com/pavona/pavona) - a library of modular, tapeout-proven, and secure-by-default open silicon blocks
|
|
57
57
|
|
|
58
58
|
## Formal Verification
|
|
59
59
|
|
|
@@ -80,6 +80,8 @@ through suitable barriers and constant-time patterns.
|
|
|
80
80
|
Absence of secret-dependent branches, memory-access patterns and variable-latency instructions is also tested using `valgrind`
|
|
81
81
|
with various combinations of compilers and compilation options.
|
|
82
82
|
|
|
83
|
+
**Other attacks.** mlkem-native targets resistance against timing side-channels only. Other attack classes, such as power and electromagnetic side-channels, microarchitectural side-channels (e.g. speculative execution), or fault-injection attacks, are currently out of scope.
|
|
84
|
+
|
|
83
85
|
## Design
|
|
84
86
|
|
|
85
87
|
mlkem-native is split into a _frontend_ and two _backends_ for arithmetic and FIPS202 / SHA3. The frontend is
|
|
@@ -94,12 +96,13 @@ mlkem-native currently offers the following backends:
|
|
|
94
96
|
* 64-bit Arm backend (using Neon)
|
|
95
97
|
* 64-bit Intel/AMD backend (using AVX2)
|
|
96
98
|
* 64-bit RISC-V backend (using RVV)
|
|
99
|
+
* 64-bit POWER backend (ppc64le, using VSX; supports POWER8 and above)
|
|
97
100
|
* 32-bit Armv8.1-M backend (using Helium/MVE) -- see [#1501](https://github.com/pq-code-package/mlkem-native/issues/1501). This is still experimental and disabled by default.
|
|
98
101
|
|
|
99
102
|
If you'd like contribute new backends, please reach out or just open a PR.
|
|
100
103
|
|
|
101
104
|
Our AArch64 assembly is developed using the [SLOTHY](https://github.com/slothy-optimizer/slothy) superoptimizer, following the approach described in the SLOTHY paper[^SLOTHY_Paper]:
|
|
102
|
-
We write 'clean' assembly by hand and automate micro-optimizations (e.g. see the [clean](dev/aarch64_clean/src/
|
|
105
|
+
We write 'clean' assembly by hand and automate micro-optimizations (e.g. see the [clean](dev/aarch64_clean/src/ntt_aarch64_asm.S) vs [optimized](dev/aarch64_opt/src/ntt_aarch64_asm.S) AArch64 NTT).
|
|
103
106
|
See [dev/README.md](dev/README.md) for more details.
|
|
104
107
|
|
|
105
108
|
## Test Vectors
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
[//]: # (SPDX-License-Identifier: CC-BY-4.0)
|
|
2
|
+
|
|
3
|
+
mlkem-native v1.2.0
|
|
4
|
+
===================
|
|
5
|
+
|
|
6
|
+
Release notes
|
|
7
|
+
-------------
|
|
8
|
+
|
|
9
|
+
mlkem-native v1.2.0 adds a new **PowerPC (ppc64le)** assembly backend and broadens portability of the existing
|
|
10
|
+
backends: the x86_64 backend can now be used on Windows, the RISC-V backend compiles under C90, and a new
|
|
11
|
+
Cortex-M33 baremetal target is tested. It also fixes a signed-shift undefined behavior on 16-bit-`int` targets
|
|
12
|
+
and hardens the RISC-V backend against secret-dependent timing. Finally, the CBMC proofs are extended to
|
|
13
|
+
establish loop termination for all functions except rejection sampling.
|
|
14
|
+
|
|
15
|
+
What's New
|
|
16
|
+
----------
|
|
17
|
+
|
|
18
|
+
- **PowerPC (ppc64le) backend**: New VSX arithmetic backend (NTT, inverse NTT, `poly_reduce`, `poly_tomont`) for POWER8 and above, with automatic fallback to C on older targets. Thanks to IBM, and in particular Danny Tsen (@dannytsen) and Basil Hess (@bhess), for this contribution! ([#1677](https://github.com/pq-code-package/mlkem-native/pull/1677))
|
|
19
|
+
- **Assurance**: CBMC now proves loop termination for all functions except rejection sampling. Thanks to Nicky Mouha (@nmouha) for making us aware of the absence of termination proofs. ([#1625](https://github.com/pq-code-package/mlkem-native/pull/1625))
|
|
20
|
+
- **Verification tooling**: Bump CBMC to a development build that works around a Z3 soundness issue ([Z3#9550](https://github.com/Z3Prover/z3/issues/9550)) affecting the SMT solver used by the CBMC proofs. ([#1745](https://github.com/pq-code-package/mlkem-native/pull/1745))
|
|
21
|
+
- **Portability**: the x86_64 assembly backend can now be used on Windows with compilers that support the SysV calling convention per function (GCC and Clang, via `__attribute__((sysv_abi))`) ([#1730](https://github.com/pq-code-package/mlkem-native/pull/1730)), the RISC-V backend compiles under C90 ([#1732](https://github.com/pq-code-package/mlkem-native/pull/1732)), and a new Cortex-M33 baremetal target is tested ([#1579](https://github.com/pq-code-package/mlkem-native/pull/1579)).
|
|
22
|
+
- **Correctness / CT**: Fix signed-shift undefined behavior on 16-bit-`int` targets ([#1727](https://github.com/pq-code-package/mlkem-native/pull/1727)) and harden the RISC-V backend against secret-dependent timing ([#1732](https://github.com/pq-code-package/mlkem-native/pull/1732)).
|
|
23
|
+
|
|
2
24
|
mlkem-native v1.1.0
|
|
3
25
|
====================
|
|
4
26
|
|
|
@@ -88,6 +88,9 @@
|
|
|
88
88
|
#include "src/native/riscv64/src/rv64v_debug.c"
|
|
89
89
|
#include "src/native/riscv64/src/rv64v_poly.c"
|
|
90
90
|
#endif
|
|
91
|
+
#if defined(MLK_SYS_PPC64LE)
|
|
92
|
+
#include "src/native/ppc64le/src/consts.c"
|
|
93
|
+
#endif
|
|
91
94
|
#endif /* MLK_CONFIG_USE_NATIVE_BACKEND_ARITH */
|
|
92
95
|
|
|
93
96
|
#if defined(MLK_CONFIG_USE_NATIVE_BACKEND_FIPS202)
|
|
@@ -213,6 +216,8 @@
|
|
|
213
216
|
#undef MLK_FIPS202_HEADER_FILE
|
|
214
217
|
#undef MLK_FREE
|
|
215
218
|
#undef MLK_INTERNAL_API
|
|
219
|
+
#undef MLK_INTERNAL_DATA_DECLARATION
|
|
220
|
+
#undef MLK_INTERNAL_DATA_DEFINITION
|
|
216
221
|
#undef MLK_NAMESPACE
|
|
217
222
|
#undef MLK_NAMESPACE_K
|
|
218
223
|
#undef MLK_NAMESPACE_PREFIX
|
|
@@ -365,8 +370,11 @@
|
|
|
365
370
|
#undef MLK_HAVE_INLINE_ASM
|
|
366
371
|
#undef MLK_INLINE
|
|
367
372
|
#undef MLK_MUST_CHECK_RETURN_VALUE
|
|
373
|
+
#undef MLK_NOINLINE
|
|
368
374
|
#undef MLK_RESTRICT
|
|
369
375
|
#undef MLK_STATIC_TESTABLE
|
|
376
|
+
#undef MLK_SYSV_ABI
|
|
377
|
+
#undef MLK_SYSV_ABI_SUPPORTED
|
|
370
378
|
#undef MLK_SYS_AARCH64
|
|
371
379
|
#undef MLK_SYS_AARCH64_EB
|
|
372
380
|
#undef MLK_SYS_APPLE
|
|
@@ -446,11 +454,11 @@
|
|
|
446
454
|
#undef MLK_FIPS202_NATIVE_AARCH64_AUTO_H
|
|
447
455
|
/* mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h */
|
|
448
456
|
#undef MLK_FIPS202_NATIVE_AARCH64_SRC_FIPS202_NATIVE_AARCH64_H
|
|
449
|
-
#undef
|
|
450
|
-
#undef
|
|
451
|
-
#undef
|
|
452
|
-
#undef
|
|
453
|
-
#undef
|
|
457
|
+
#undef mlk_keccak_f1600_x1_scalar_aarch64_asm
|
|
458
|
+
#undef mlk_keccak_f1600_x1_v84a_aarch64_asm
|
|
459
|
+
#undef mlk_keccak_f1600_x2_v84a_aarch64_asm
|
|
460
|
+
#undef mlk_keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm
|
|
461
|
+
#undef mlk_keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm
|
|
454
462
|
#undef mlk_keccakf1600_round_constants
|
|
455
463
|
/* mlkem/src/fips202/native/aarch64/x1_scalar.h */
|
|
456
464
|
#undef MLK_FIPS202_AARCH64_NEED_X1_SCALAR
|
|
@@ -483,7 +491,7 @@
|
|
|
483
491
|
#undef MLK_USE_FIPS202_X4_NATIVE
|
|
484
492
|
/* mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h */
|
|
485
493
|
#undef MLK_FIPS202_NATIVE_X86_64_SRC_FIPS202_NATIVE_X86_64_H
|
|
486
|
-
#undef
|
|
494
|
+
#undef mlk_keccak_f1600_x4_avx2_asm
|
|
487
495
|
#undef mlk_keccak_rho56
|
|
488
496
|
#undef mlk_keccak_rho8
|
|
489
497
|
#undef mlk_keccakf1600_round_constants
|
|
@@ -542,16 +550,16 @@
|
|
|
542
550
|
#undef mlk_aarch64_ntt_zetas_layer67
|
|
543
551
|
#undef mlk_aarch64_zetas_mulcache_native
|
|
544
552
|
#undef mlk_aarch64_zetas_mulcache_twisted_native
|
|
545
|
-
#undef
|
|
546
|
-
#undef
|
|
547
|
-
#undef
|
|
548
|
-
#undef
|
|
549
|
-
#undef
|
|
550
|
-
#undef
|
|
551
|
-
#undef
|
|
552
|
-
#undef
|
|
553
|
-
#undef
|
|
554
|
-
#undef
|
|
553
|
+
#undef mlk_intt_aarch64_asm
|
|
554
|
+
#undef mlk_ntt_aarch64_asm
|
|
555
|
+
#undef mlk_poly_mulcache_compute_aarch64_asm
|
|
556
|
+
#undef mlk_poly_reduce_aarch64_asm
|
|
557
|
+
#undef mlk_poly_tobytes_aarch64_asm
|
|
558
|
+
#undef mlk_poly_tomont_aarch64_asm
|
|
559
|
+
#undef mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm
|
|
560
|
+
#undef mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm
|
|
561
|
+
#undef mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm
|
|
562
|
+
#undef mlk_rej_uniform_aarch64_asm
|
|
555
563
|
#undef mlk_rej_uniform_table
|
|
556
564
|
#endif /* MLK_SYS_AARCH64 */
|
|
557
565
|
#if defined(MLK_SYS_X86_64)
|
|
@@ -582,27 +590,27 @@
|
|
|
582
590
|
/* mlkem/src/native/x86_64/src/arith_native_x86_64.h */
|
|
583
591
|
#undef MLK_AVX2_REJ_UNIFORM_BUFLEN
|
|
584
592
|
#undef MLK_NATIVE_X86_64_SRC_ARITH_NATIVE_X86_64_H
|
|
585
|
-
#undef
|
|
586
|
-
#undef
|
|
587
|
-
#undef
|
|
588
|
-
#undef
|
|
589
|
-
#undef
|
|
590
|
-
#undef
|
|
591
|
-
#undef
|
|
592
|
-
#undef
|
|
593
|
-
#undef
|
|
594
|
-
#undef
|
|
595
|
-
#undef
|
|
596
|
-
#undef
|
|
597
|
-
#undef
|
|
598
|
-
#undef
|
|
599
|
-
#undef
|
|
600
|
-
#undef
|
|
601
|
-
#undef
|
|
602
|
-
#undef
|
|
603
|
-
#undef
|
|
593
|
+
#undef mlk_invntt_avx2_asm
|
|
594
|
+
#undef mlk_ntt_avx2_asm
|
|
595
|
+
#undef mlk_nttfrombytes_avx2_asm
|
|
596
|
+
#undef mlk_ntttobytes_avx2_asm
|
|
597
|
+
#undef mlk_nttunpack_avx2_asm
|
|
598
|
+
#undef mlk_poly_compress_d10_avx2_asm
|
|
599
|
+
#undef mlk_poly_compress_d11_avx2_asm
|
|
600
|
+
#undef mlk_poly_compress_d4_avx2_asm
|
|
601
|
+
#undef mlk_poly_compress_d5_avx2_asm
|
|
602
|
+
#undef mlk_poly_decompress_d10_avx2_asm
|
|
603
|
+
#undef mlk_poly_decompress_d11_avx2_asm
|
|
604
|
+
#undef mlk_poly_decompress_d4_avx2_asm
|
|
605
|
+
#undef mlk_poly_decompress_d5_avx2_asm
|
|
606
|
+
#undef mlk_poly_mulcache_compute_avx2_asm
|
|
607
|
+
#undef mlk_polyvec_basemul_acc_montgomery_cached_k2_avx2_asm
|
|
608
|
+
#undef mlk_polyvec_basemul_acc_montgomery_cached_k3_avx2_asm
|
|
609
|
+
#undef mlk_polyvec_basemul_acc_montgomery_cached_k4_avx2_asm
|
|
610
|
+
#undef mlk_reduce_avx2_asm
|
|
611
|
+
#undef mlk_rej_uniform_avx2_asm
|
|
604
612
|
#undef mlk_rej_uniform_table
|
|
605
|
-
#undef
|
|
613
|
+
#undef mlk_tomont_avx2_asm
|
|
606
614
|
/* mlkem/src/native/x86_64/src/compress_consts.h */
|
|
607
615
|
#undef MLK_NATIVE_X86_64_SRC_COMPRESS_CONSTS_H
|
|
608
616
|
#undef mlk_compress_d10_data
|
|
@@ -656,5 +664,38 @@
|
|
|
656
664
|
#undef mlk_debug_check_bounds_int16m1
|
|
657
665
|
#undef mlk_debug_check_bounds_int16m2
|
|
658
666
|
#endif /* MLK_SYS_RISCV64 */
|
|
667
|
+
#if defined(MLK_SYS_PPC64LE)
|
|
668
|
+
/*
|
|
669
|
+
* Undefine macros from native code (Arith, PPC64LE)
|
|
670
|
+
*/
|
|
671
|
+
/* mlkem/src/native/ppc64le/meta.h */
|
|
672
|
+
#undef MLK_ARITH_BACKEND_NAME
|
|
673
|
+
#undef MLK_ARITH_BACKEND_PPC64LE_DEFAULT
|
|
674
|
+
#undef MLK_NATIVE_PPC64LE_META_H
|
|
675
|
+
#undef MLK_USE_NATIVE_INTT
|
|
676
|
+
#undef MLK_USE_NATIVE_NTT
|
|
677
|
+
#undef MLK_USE_NATIVE_POLY_REDUCE
|
|
678
|
+
#undef MLK_USE_NATIVE_POLY_TOMONT
|
|
679
|
+
/* mlkem/src/native/ppc64le/src/arith_native_ppc64le.h */
|
|
680
|
+
#undef MLK_NATIVE_PPC64LE_SRC_ARITH_NATIVE_PPC64LE_H
|
|
681
|
+
#undef mlk_intt_ppc_asm
|
|
682
|
+
#undef mlk_ntt_ppc_asm
|
|
683
|
+
#undef mlk_poly_tomont_ppc_asm
|
|
684
|
+
#undef mlk_reduce_ppc_asm
|
|
685
|
+
/* mlkem/src/native/ppc64le/src/consts.h */
|
|
686
|
+
#undef MLK_NATIVE_PPC64LE_SRC_CONSTS_H
|
|
687
|
+
#undef MLK_PPC_C20159_OFFSET
|
|
688
|
+
#undef MLK_PPC_NQ_OFFSET
|
|
689
|
+
#undef MLK_PPC_N_INV_OFFSET
|
|
690
|
+
#undef MLK_PPC_N_INV_TW_OFFSET
|
|
691
|
+
#undef MLK_PPC_Q_OFFSET
|
|
692
|
+
#undef MLK_PPC_TOMONT_OFFSET
|
|
693
|
+
#undef MLK_PPC_TOMONT_TW_OFFSET
|
|
694
|
+
#undef MLK_PPC_ZETA_INTT_OFFSET
|
|
695
|
+
#undef MLK_PPC_ZETA_INTT_TW_OFFSET
|
|
696
|
+
#undef MLK_PPC_ZETA_NTT_OFFSET
|
|
697
|
+
#undef MLK_PPC_ZETA_NTT_TW_OFFSET
|
|
698
|
+
#undef mlk_ppc_qdata
|
|
699
|
+
#endif /* MLK_SYS_PPC64LE */
|
|
659
700
|
#endif /* MLK_CONFIG_USE_NATIVE_BACKEND_ARITH */
|
|
660
701
|
#endif /* !MLK_CONFIG_MONOBUILD_KEEP_SHARED_HEADERS */
|