pq_crypto 0.6.4 → 0.6.6
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 +180 -0
- data/README.md +7 -0
- data/ext/pqcrypto/extconf.rb +4 -1
- data/ext/pqcrypto/pq_externalmu.c +35 -0
- data/ext/pqcrypto/pqcrypto_native_api.h +85 -75
- data/ext/pqcrypto/pqcrypto_ruby_secure.c +16 -9
- data/ext/pqcrypto/pqcrypto_secure.c +43 -33
- data/ext/pqcrypto/pqcrypto_secure.h +52 -47
- data/ext/pqcrypto/pqcrypto_version.h +1 -1
- data/ext/pqcrypto/vendor/.vendored +7 -7
- data/ext/pqcrypto/vendor/mldsa-native/BUILDING.md +5 -2
- data/ext/pqcrypto/vendor/mldsa-native/LICENSE +21 -2
- data/ext/pqcrypto/vendor/mldsa-native/README.md +20 -7
- data/ext/pqcrypto/vendor/mldsa-native/RELEASE.md +160 -0
- data/ext/pqcrypto/vendor/mldsa-native/SECURITY.md +1 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/README.md +2 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.c +85 -59
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.h +292 -348
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_asm.S +122 -76
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_config.h +184 -86
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/cbmc.h +49 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/common.h +49 -81
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/context.h +152 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.h +25 -12
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.c +2 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.h +2 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +2 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +9 -11
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +19 -11
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +6 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +7 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +7 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +12 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +12 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +1 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +3 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +3 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +6 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +3 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/api.h +11 -11
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +9 -22
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +8 -5
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +1 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/{state_extract_bytes_x4_mve.S → keccak_f1600_x4_state_extract_bytes_mve.S} +14 -14
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/{state_xor_bytes_x4_mve.S → keccak_f1600_x4_state_xor_bytes_mve.S} +12 -12
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +5 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +2 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +1 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +36 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +62 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +87 -54
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{intt_aarch64_asm.S → mldsa_intt_aarch64_asm.S} +39 -6
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{ntt_aarch64_asm.S → mldsa_ntt_aarch64_asm.S} +39 -6
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{pointwise_montgomery_aarch64_asm.S → mldsa_pointwise_montgomery_aarch64_asm.S} +25 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{poly_caddq_aarch64_asm.S → mldsa_poly_caddq_aarch64_asm.S} +19 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{poly_chknorm_aarch64_asm.S → mldsa_poly_chknorm_aarch64_asm.S} +24 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{poly_decompose_32_aarch64_asm.S → mldsa_poly_decompose_32_aarch64_asm.S} +25 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{poly_decompose_88_aarch64_asm.S → mldsa_poly_decompose_88_aarch64_asm.S} +25 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{poly_use_hint_32_aarch64_asm.S → mldsa_poly_use_hint_32_aarch64_asm.S} +25 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{poly_use_hint_88_aarch64_asm.S → mldsa_poly_use_hint_88_aarch64_asm.S} +25 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{mld_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S → mldsa_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S} +31 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{mld_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S → mldsa_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S} +31 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{mld_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S → mldsa_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S} +31 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{polyz_unpack_17_aarch64_asm.S → mldsa_polyz_unpack_17_aarch64_asm.S} +31 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{polyz_unpack_19_aarch64_asm.S → mldsa_polyz_unpack_19_aarch64_asm.S} +31 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{rej_uniform_aarch64_asm.S → mldsa_rej_uniform_aarch64_asm.S} +48 -15
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{rej_uniform_eta2_aarch64_asm.S → mldsa_rej_uniform_eta2_aarch64_asm.S} +42 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/{rej_uniform_eta4_aarch64_asm.S → mldsa_rej_uniform_eta4_aarch64_asm.S} +42 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/api.h +11 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/meta.h +3 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +28 -28
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +171 -49
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{intt_avx2_asm.S → mldsa_intt_avx2_asm.S} +23 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{ntt_avx2_asm.S → mldsa_ntt_avx2_asm.S} +23 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{nttunpack_avx2_asm.S → mldsa_nttunpack_avx2_asm.S} +17 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{pointwise_acc_l4_avx2_asm.S → mldsa_pointwise_acc_l4_avx2_asm.S} +37 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{pointwise_acc_l5_avx2_asm.S → mldsa_pointwise_acc_l5_avx2_asm.S} +37 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{pointwise_acc_l7_avx2_asm.S → mldsa_pointwise_acc_l7_avx2_asm.S} +37 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{pointwise_avx2_asm.S → mldsa_pointwise_avx2_asm.S} +31 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/{poly_caddq_avx2_asm.S → mldsa_poly_caddq_avx2_asm.S} +18 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_chknorm_avx2_asm.S +176 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_32_avx2_asm.S +490 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_88_avx2_asm.S +489 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_32_avx2_asm.S +123 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_88_avx2_asm.S +125 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_17_avx2_asm.S +355 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_19_avx2_asm.S +355 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_avx2_asm.S +132 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta2_avx2_asm.S +205 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta4_avx2_asm.S +176 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.c +27 -36
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.h +42 -8
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/params.h +93 -17
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.c +74 -15
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.h +97 -11
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.c +7 -38
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.h +49 -7
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.c +16 -17
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.h +26 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +3 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +18 -19
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/reduce.h +15 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/rounding.h +28 -6
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.c +311 -246
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.h +245 -240
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sys.h +64 -5
- data/ext/pqcrypto/vendor/mlkem-native/BUILDING.md +5 -2
- data/ext/pqcrypto/vendor/mlkem-native/LICENSE +21 -3
- data/ext/pqcrypto/vendor/mlkem-native/README.md +4 -6
- data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +211 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/README.md +2 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +25 -34
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +79 -142
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +62 -71
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +77 -39
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/cbmc.h +25 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +48 -34
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +25 -5
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +14 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/context.h +51 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +2 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +8 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/auto.h +20 -12
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +5 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +5 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +5 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +10 -7
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +10 -7
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_scalar.h +1 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_v84a.h +3 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x2_v84a.h +3 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h +6 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +3 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/api.h +11 -11
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/mve.h +8 -22
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +8 -5
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/{state_extract_bytes_x4_mve.S → keccak_f1600_x4_state_extract_bytes_mve.S} +14 -14
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/{state_xor_bytes_x4_mve.S → keccak_f1600_x4_state_xor_bytes_mve.S} +12 -12
- 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/keccak_f1600_x4_avx2_asm.S +36 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +22 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.h +20 -11
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.c +39 -11
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +64 -15
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +44 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/aarch64_zetas.c +2 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +11 -10
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{intt_aarch64_asm.S → mlkem_intt_aarch64_asm.S} +16 -9
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{ntt_aarch64_asm.S → mlkem_ntt_aarch64_asm.S} +10 -7
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_mulcache_compute_aarch64_asm.S → mlkem_poly_mulcache_compute_aarch64_asm.S} +6 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_reduce_aarch64_asm.S → mlkem_poly_reduce_aarch64_asm.S} +6 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tobytes_aarch64_asm.S → mlkem_poly_tobytes_aarch64_asm.S} +12 -5
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tomont_aarch64_asm.S → mlkem_poly_tomont_aarch64_asm.S} +11 -5
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S → mlkem_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S} +6 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S → mlkem_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S} +6 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S → mlkem_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S} +6 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{rej_uniform_aarch64_asm.S → mlkem_rej_uniform_aarch64_asm.S} +17 -17
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +21 -8
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +1 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/meta.h +4 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/{intt_ppc_asm.S → mlkem_intt_ppc_asm.S} +29 -5
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/{ntt_ppc_asm.S → mlkem_ntt_ppc_asm.S} +22 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/{poly_tomont_ppc_asm.S → mlkem_poly_tomont_ppc_asm.S} +25 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/{reduce_ppc_asm.S → mlkem_reduce_ppc_asm.S} +22 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/meta.h +4 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/arith_native_riscv64.h +4 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +6 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/meta.h +45 -25
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +20 -20
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.c +14 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.h +8 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{intt_avx2_asm.S → mlkem_intt_avx2_asm.S} +27 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntt_avx2_asm.S → mlkem_ntt_avx2_asm.S} +23 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttfrombytes_avx2_asm.S → mlkem_nttfrombytes_avx2_asm.S} +27 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntttobytes_avx2_asm.S → mlkem_ntttobytes_avx2_asm.S} +27 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttunpack_avx2_asm.S → mlkem_nttunpack_avx2_asm.S} +17 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d10_avx2_asm.S → mlkem_poly_compress_d10_avx2_asm.S} +34 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d11_avx2_asm.S → mlkem_poly_compress_d11_avx2_asm.S} +33 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d4_avx2_asm.S → mlkem_poly_compress_d4_avx2_asm.S} +34 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d5_avx2_asm.S → mlkem_poly_compress_d5_avx2_asm.S} +33 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d10_avx2_asm.S → mlkem_poly_decompress_d10_avx2_asm.S} +32 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d11_avx2_asm.S → mlkem_poly_decompress_d11_avx2_asm.S} +32 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d4_avx2_asm.S → mlkem_poly_decompress_d4_avx2_asm.S} +32 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d5_avx2_asm.S → mlkem_poly_decompress_d5_avx2_asm.S} +32 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_mulcache_compute_avx2_asm.S → mlkem_poly_mulcache_compute_avx2_asm.S} +29 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_k2_avx2_asm.S → mlkem_polyvec_basemul_acc_montgomery_cached_k2_avx2_asm.S} +35 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_k3_avx2_asm.S → mlkem_polyvec_basemul_acc_montgomery_cached_k3_avx2_asm.S} +35 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_k4_avx2_asm.S → mlkem_polyvec_basemul_acc_montgomery_cached_k4_avx2_asm.S} +35 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{reduce_avx2_asm.S → mlkem_reduce_avx2_asm.S} +17 -1
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{rej_uniform_avx2_asm.S → mlkem_rej_uniform_avx2_asm.S} +40 -7
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{tomont_avx2_asm.S → mlkem_tomont_avx2_asm.S} +20 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.c +7 -2
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.h +6 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +25 -4
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +33 -4
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.c +4 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.h +4 -0
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +21 -3
- data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +11 -10
- data/lib/pq_crypto/version.rb +1 -1
- data/script/vendor_libs.rb +6 -6
- metadata +79 -79
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_chknorm_avx2.c +0 -52
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_32_avx2.c +0 -157
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_88_avx2.c +0 -157
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_32_avx2.c +0 -103
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_88_avx2.c +0 -105
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_17_avx2.c +0 -94
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_19_avx2.c +0 -96
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_avx2.c +0 -126
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta2_avx2.c +0 -157
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta4_avx2.c +0 -141
|
@@ -39,6 +39,21 @@
|
|
|
39
39
|
#define MLD_SYS_AARCH64
|
|
40
40
|
#endif
|
|
41
41
|
|
|
42
|
+
/* Check if the AArch64 compilation target supports NEON (Advanced SIMD).
|
|
43
|
+
*
|
|
44
|
+
* Some compilers also define __ARM_NEON__, but __ARM_NEON is the most reliable
|
|
45
|
+
* signal. Specifically, clang on Apple appears to keep __ARM_NEON__ set even if
|
|
46
|
+
* -march=armv8-a+nosimd is set.
|
|
47
|
+
*
|
|
48
|
+
* gcc 4.8 -- the first gcc version introducing Neon support -- sets neither
|
|
49
|
+
* __ARM_NEON nor __ARM_NEON__; in fact, there is no preprocessor signal that
|
|
50
|
+
* Neon is enabled. If you use gcc 4.8 and need Neon, you should set
|
|
51
|
+
* MLD_SYS_AARCH64_NEON manually. gcc 4.9 onwards do set __ARM_NEON.
|
|
52
|
+
*/
|
|
53
|
+
#if defined(MLD_SYS_AARCH64) && defined(__ARM_NEON)
|
|
54
|
+
#define MLD_SYS_AARCH64_NEON
|
|
55
|
+
#endif
|
|
56
|
+
|
|
42
57
|
/* Check if we're running on an AArch64 big endian system. */
|
|
43
58
|
#if defined(__AARCH64EB__)
|
|
44
59
|
#define MLD_SYS_AARCH64_EB
|
|
@@ -49,12 +64,13 @@
|
|
|
49
64
|
#define MLD_SYS_ARMV81M_MVE
|
|
50
65
|
#endif
|
|
51
66
|
|
|
52
|
-
|
|
67
|
+
/* Check if we're running on an x86_64 system. */
|
|
68
|
+
#if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64)
|
|
53
69
|
#define MLD_SYS_X86_64
|
|
54
70
|
#if defined(__AVX2__)
|
|
55
71
|
#define MLD_SYS_X86_64_AVX2
|
|
56
72
|
#endif
|
|
57
|
-
#endif /* __x86_64__ */
|
|
73
|
+
#endif /* __x86_64__ || _M_X64 || _M_AMD64 */
|
|
58
74
|
|
|
59
75
|
#if defined(MLD_SYS_LITTLE_ENDIAN) && defined(__powerpc64__)
|
|
60
76
|
#define MLD_SYS_PPC64LE
|
|
@@ -153,6 +169,22 @@
|
|
|
153
169
|
#endif
|
|
154
170
|
#endif /* !MLD_ALWAYS_INLINE */
|
|
155
171
|
|
|
172
|
+
/*
|
|
173
|
+
* MLD_NOINLINE: Prevent inlining.
|
|
174
|
+
* - MSVC: __declspec(noinline)
|
|
175
|
+
* - GCC/Clang: __attribute__((noinline))
|
|
176
|
+
* - Other: empty
|
|
177
|
+
*/
|
|
178
|
+
#if !defined(MLD_NOINLINE)
|
|
179
|
+
#if defined(_MSC_VER)
|
|
180
|
+
#define MLD_NOINLINE __declspec(noinline)
|
|
181
|
+
#elif defined(__GNUC__) || defined(__clang__)
|
|
182
|
+
#define MLD_NOINLINE __attribute__((noinline))
|
|
183
|
+
#else
|
|
184
|
+
#define MLD_NOINLINE
|
|
185
|
+
#endif
|
|
186
|
+
#endif /* !MLD_NOINLINE */
|
|
187
|
+
|
|
156
188
|
#ifndef MLD_STATIC_TESTABLE
|
|
157
189
|
#define MLD_STATIC_TESTABLE static
|
|
158
190
|
#endif
|
|
@@ -185,7 +217,7 @@
|
|
|
185
217
|
#endif
|
|
186
218
|
|
|
187
219
|
|
|
188
|
-
/* New X86_64 CPUs support
|
|
220
|
+
/* New X86_64 CPUs support control-flow protection using the CET instructions.
|
|
189
221
|
* When enabled (through -fcf-protection=), all compilation units (including
|
|
190
222
|
* empty ones) need to support CET for this to work.
|
|
191
223
|
* For assembly, this means that source files need to signal support for
|
|
@@ -233,15 +265,42 @@
|
|
|
233
265
|
#define MLD_MUST_CHECK_RETURN_VALUE
|
|
234
266
|
#endif
|
|
235
267
|
|
|
268
|
+
/* The x86_64 assembly backend uses the SysV calling convention. On Windows,
|
|
269
|
+
* where the Microsoft x64 calling convention is the default, it can still be
|
|
270
|
+
* used with compilers that allow choosing the calling convention per
|
|
271
|
+
* function: GCC and Clang support __attribute__((sysv_abi)), which makes
|
|
272
|
+
* calls to the annotated function follow the SysV calling convention.
|
|
273
|
+
*
|
|
274
|
+
* MLD_SYSV_ABI_SUPPORTED signals that the toolchain can call SysV assembly
|
|
275
|
+
* routines; the x86_64 assembly backend is only enabled if it is defined.
|
|
276
|
+
* MLD_SYSV_ABI is the attribute carried by declarations of x86_64 assembly
|
|
277
|
+
* routines. Both macros can be set externally for toolchains offering an
|
|
278
|
+
* equivalent mechanism that is not recognized here. */
|
|
279
|
+
#if defined(MLD_SYS_X86_64) && !defined(MLD_SYSV_ABI_SUPPORTED)
|
|
280
|
+
#if !defined(MLD_SYS_WINDOWS) || defined(__GNUC__) || defined(__clang__)
|
|
281
|
+
#define MLD_SYSV_ABI_SUPPORTED
|
|
282
|
+
#endif
|
|
283
|
+
#endif
|
|
284
|
+
|
|
285
|
+
#if !defined(MLD_SYSV_ABI)
|
|
286
|
+
#if defined(MLD_SYS_WINDOWS) && defined(MLD_SYSV_ABI_SUPPORTED)
|
|
287
|
+
#define MLD_SYSV_ABI __attribute__((sysv_abi))
|
|
288
|
+
#else
|
|
289
|
+
#define MLD_SYSV_ABI
|
|
290
|
+
#endif
|
|
291
|
+
#endif /* !MLD_SYSV_ABI */
|
|
236
292
|
|
|
237
293
|
#if !defined(__ASSEMBLER__)
|
|
238
294
|
/* System capability enumeration */
|
|
239
295
|
typedef enum
|
|
240
296
|
{
|
|
241
297
|
/* x86_64 */
|
|
242
|
-
|
|
298
|
+
MLD_SYS_CAP_X86_64_AVX2,
|
|
243
299
|
/* AArch64 */
|
|
244
|
-
|
|
300
|
+
MLD_SYS_CAP_AARCH64_NEON,
|
|
301
|
+
MLD_SYS_CAP_AARCH64_SHA3,
|
|
302
|
+
/* Armv8.1-M */
|
|
303
|
+
MLD_SYS_CAP_ARMV81M_MVE
|
|
245
304
|
} mld_sys_cap;
|
|
246
305
|
|
|
247
306
|
#if !defined(MLD_CONFIG_CUSTOM_CAPABILITY_FUNC)
|
|
@@ -73,11 +73,14 @@ For detailed information on how to use the script, please refer to
|
|
|
73
73
|
|
|
74
74
|
You can also build **mlkem-native** on Windows using `nmake` and an MSVC compiler.
|
|
75
75
|
|
|
76
|
-
To build and run the tests
|
|
76
|
+
To build and run the tests, use the following `nmake` target:
|
|
77
77
|
```powershell
|
|
78
|
-
|
|
78
|
+
nmake /f .\Makefile.Microsoft_nmake quickcheck
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
This runs the functional, RNG-failure, allocation, ACVP, KAT and Wycheproof tests. The assembly backends are not yet
|
|
82
|
+
supported on Windows, so the tests are built for the C backend only.
|
|
83
|
+
|
|
81
84
|
# Checking the proofs
|
|
82
85
|
|
|
83
86
|
## CBMC
|
|
@@ -6,14 +6,32 @@ of the Apache-2.0 license OR the ISC license OR the MIT license.
|
|
|
6
6
|
These licenses are reproduced at the bottom of this file.
|
|
7
7
|
The copyright holders are indicated at the top of each file.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Files outside the library itself may carry different terms. Every file
|
|
10
|
+
states its own SPDX-License-Identifier, which determines the terms that
|
|
11
|
+
apply to it. In particular:
|
|
12
|
+
|
|
13
|
+
The code in test/notrandombytes/*, and its copies in
|
|
14
|
+
examples/*/test_only_rng/* and scripts/notrandombytes, is derived from
|
|
10
15
|
https://cr.yp.to/papers.html#surf and licensed under
|
|
11
16
|
LicenseRef-PD-hp OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT.
|
|
12
17
|
It is only used for testing purposes.
|
|
13
18
|
|
|
14
|
-
The benchmarking code in test/hal
|
|
19
|
+
The benchmarking code in test/hal/* carries the
|
|
15
20
|
MIT license. It is only used for testing purposes.
|
|
16
21
|
|
|
22
|
+
The tiny_sha3 code in
|
|
23
|
+
examples/bring_your_own_fips202/custom_fips202/tiny_sha3/* and
|
|
24
|
+
examples/custom_backend/mlkem_native/src/fips202/native/custom/src/*
|
|
25
|
+
carries the MIT license. It is only used to demonstrate custom
|
|
26
|
+
FIPS-202 implementations.
|
|
27
|
+
|
|
28
|
+
The proofs in proofs/* are in part derived from Amazon Web Services
|
|
29
|
+
verification infrastructure. Individual files carry, among others,
|
|
30
|
+
Apache-2.0 OR ISC OR MIT-0, MIT-0, and MIT-0 AND Apache-2.0. None of the
|
|
31
|
+
proofs are part of the library.
|
|
32
|
+
|
|
33
|
+
Documentation is licensed under CC-BY-4.0.
|
|
34
|
+
|
|
17
35
|
```
|
|
18
36
|
Copyright (c) The mlkem-native project authors
|
|
19
37
|
Copyright (c) 2020 Dougall Johnson
|
|
@@ -39,7 +57,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
39
57
|
SOFTWARE.
|
|
40
58
|
```
|
|
41
59
|
|
|
42
|
-
The tiny_sha3 implementation in examples/custom_backend/mlkem_native/
|
|
60
|
+
The tiny_sha3 implementation in examples/custom_backend/mlkem_native/src/fips202/native/custom/src/
|
|
43
61
|
carries the MIT license. It is only used for testing purposes.
|
|
44
62
|
|
|
45
63
|
```
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# mlkem-native
|
|
4
4
|
|
|
5
|
-

|
|
7
|
-

|
|
8
|
-

|
|
5
|
+

|
|
9
6
|

|
|
10
7
|

|
|
11
8
|
|
|
@@ -102,7 +99,7 @@ mlkem-native currently offers the following backends:
|
|
|
102
99
|
If you'd like contribute new backends, please reach out or just open a PR.
|
|
103
100
|
|
|
104
101
|
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]:
|
|
105
|
-
We write 'clean' assembly by hand and automate micro-optimizations (e.g. see the [clean](dev/aarch64_clean/src/
|
|
102
|
+
We write 'clean' assembly by hand and automate micro-optimizations (e.g. see the [clean](dev/aarch64_clean/src/mlkem_ntt_aarch64_asm.S) vs [optimized](dev/aarch64_opt/src/mlkem_ntt_aarch64_asm.S) AArch64 NTT).
|
|
106
103
|
See [dev/README.md](dev/README.md) for more details.
|
|
107
104
|
|
|
108
105
|
## Test Vectors
|
|
@@ -168,6 +165,8 @@ For CI benchmark results and historical performance data, see the [benchmarking
|
|
|
168
165
|
If you want to use mlkem-native, import [mlkem](mlkem) into your project's source tree and build using your favourite build system. See [mlkem](mlkem) for more information, and
|
|
169
166
|
[examples/basic](examples/basic) for a simple example. The build system provided in this repository is for development purposes only.
|
|
170
167
|
|
|
168
|
+
See [API-CONVENTIONS.md](API-CONVENTIONS.md) for conventions that apply to all public functions, such as return values, pointer validity, and the state of output buffers on error.
|
|
169
|
+
|
|
171
170
|
### Can I bring my own FIPS-202?
|
|
172
171
|
|
|
173
172
|
mlkem-native relies on and comes with an implementation of FIPS-202[^FIPS202]. If your library has its own FIPS-202 implementation, you
|
|
@@ -217,7 +216,6 @@ through the [PQCA Discord](https://discord.com/invite/xyVnwzfg5R). See also [CON
|
|
|
217
216
|
[^FIPS202]: National Institute of Standards and Technology: FIPS202 SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions, [https://csrc.nist.gov/pubs/fips/202/final](https://csrc.nist.gov/pubs/fips/202/final)
|
|
218
217
|
[^FIPS203]: National Institute of Standards and Technology: FIPS 203 Module-Lattice-Based Key-Encapsulation Mechanism Standard, [https://csrc.nist.gov/pubs/fips/203/final](https://csrc.nist.gov/pubs/fips/203/final)
|
|
219
218
|
[^HOL-Light]: John Harrison: HOL-Light Theorem Prover, [https://hol-light.github.io/](https://hol-light.github.io/)
|
|
220
|
-
[^HYBRID]: Becker, Kannwischer: Hybrid scalar/vector implementations of Keccak and SPHINCS+ on AArch64, [https://eprint.iacr.org/2022/1243](https://eprint.iacr.org/2022/1243)
|
|
221
219
|
[^KyberSlash]: Bernstein, Bhargavan, Bhasin, Chattopadhyay, Chia, Kannwischer, Kiefer, Paiva, Ravi, Tamvada: KyberSlash: Exploiting secret-dependent division timings in Kyber implementations, [https://kyberslash.cr.yp.to/papers.html](https://kyberslash.cr.yp.to/papers.html)
|
|
222
220
|
[^REF]: Bos, Ducas, Kiltz, Lepoint, Lyubashevsky, Schanck, Schwabe, Seiler, Stehlé: CRYSTALS-Kyber C reference implementation, [https://github.com/pq-crystals/kyber/tree/main/ref](https://github.com/pq-crystals/kyber/tree/main/ref)
|
|
223
221
|
[^SLOTHY_Paper]: Abdulrahman, Becker, Kannwischer, Klein: Fast and Clean: Auditable high-performance assembly via constraint solving, [https://eprint.iacr.org/2022/1303](https://eprint.iacr.org/2022/1303)
|
|
@@ -1,5 +1,216 @@
|
|
|
1
1
|
[//]: # (SPDX-License-Identifier: CC-BY-4.0)
|
|
2
2
|
|
|
3
|
+
mlkem-native v2.0.0
|
|
4
|
+
===================
|
|
5
|
+
|
|
6
|
+
Release notes
|
|
7
|
+
-------------
|
|
8
|
+
|
|
9
|
+
mlkem-native v2.0.0 is the second major release of mlkem-native. It follows
|
|
10
|
+
mlkem-native v1.3 and makes minor API changes: It removes the SUPERCOP `crypto_kem_*`
|
|
11
|
+
aliases and the legacy `MLK_CONFIG_API_*` path, splits the ambiguous `MLK_ERR_FAIL`
|
|
12
|
+
return code into specific error codes, and renames the FIPS-202 backend and
|
|
13
|
+
system-capability macros.
|
|
14
|
+
|
|
15
|
+
See the full change log here:
|
|
16
|
+
https://github.com/pq-code-package/mlkem-native/compare/v1.3.0...v2.0.0
|
|
17
|
+
|
|
18
|
+
Long-Term Support
|
|
19
|
+
-----------------
|
|
20
|
+
|
|
21
|
+
[`release/v1.3`](https://github.com/pq-code-package/mlkem-native/tree/release/v1.3) will
|
|
22
|
+
act as a support branch until February 2027 (inclusive). It will receive bugfixes, but no
|
|
23
|
+
new features. We do currently not plan to offer long-term support for mlkem-native v1.x beyond that timeframe.
|
|
24
|
+
|
|
25
|
+
If you are deploying mlkem-native v1.3 and expect to be unable to upgrade to
|
|
26
|
+
mlkem-native v2 by February 2027, please contact us to discuss a potential extension
|
|
27
|
+
of the support schedule.
|
|
28
|
+
|
|
29
|
+
Breaking changes since v1.3.0
|
|
30
|
+
-----------------------------
|
|
31
|
+
|
|
32
|
+
- Split the ambiguous `MLK_ERR_FAIL` return code into `MLK_ERR_INVALID_PK`
|
|
33
|
+
(`-4`), `MLK_ERR_INVALID_SK` (`-5`), and `MLK_ERR_PCT_FAIL` (`-6`), returned
|
|
34
|
+
respectively for a public key rejected by the FIPS 203 modulus check, a secret
|
|
35
|
+
key rejected by the hash check, and a failed keygen pairwise consistency test.
|
|
36
|
+
The codes `-1`..`-3` are unchanged; `MLK_ERR_FAIL` remains defined but is no
|
|
37
|
+
longer returned by any function. Integrators mapping return codes into their
|
|
38
|
+
own error space must handle the new values.
|
|
39
|
+
([#1852](https://github.com/pq-code-package/mlkem-native/pull/1852))
|
|
40
|
+
- Remove the SUPERCOP `crypto_kem_*` API aliases, the `MLK_CONFIG_NO_SUPERCOP`
|
|
41
|
+
option, and the `CRYPTO_{PUBLICKEY,SECRETKEY,CIPHERTEXT}BYTES`,
|
|
42
|
+
`CRYPTO_SYMBYTES` and `CRYPTO_BYTES` size constants. Consumers must use the
|
|
43
|
+
namespaced API (e.g. `mlkem_keypair`) and derive sizes from
|
|
44
|
+
`MLK_CONFIG_PARAMETER_SET`.
|
|
45
|
+
([#1857](https://github.com/pq-code-package/mlkem-native/pull/1857))
|
|
46
|
+
- Remove the legacy `MLK_CONFIG_API_*` configuration path. Configure builds
|
|
47
|
+
through the configuration file instead, renaming `MLK_CONFIG_API_PARAMETER_SET`
|
|
48
|
+
to `MLK_CONFIG_PARAMETER_SET`, `MLK_CONFIG_API_NAMESPACE_PREFIX` to
|
|
49
|
+
`MLK_CONFIG_NAMESPACE_PREFIX`, `MLK_CONFIG_API_CONSTANTS_ONLY` to
|
|
50
|
+
`MLK_CONFIG_CONSTANTS_ONLY`, and `MLK_CONFIG_API_QUALIFIER` to
|
|
51
|
+
`MLK_CONFIG_EXTERNAL_API_QUALIFIER`. For a multi-level build, set
|
|
52
|
+
`MLK_CONFIG_MULTILEVEL_BUILD`; the parameter set is now appended to the
|
|
53
|
+
namespace prefix automatically.
|
|
54
|
+
([#1853](https://github.com/pq-code-package/mlkem-native/pull/1853))
|
|
55
|
+
- Prefix the `mlk_sys_cap` enum values with their architecture:
|
|
56
|
+
`MLK_SYS_CAP_{AVX2,NEON,SHA3,MVE}` become
|
|
57
|
+
`MLK_SYS_CAP_{X86_64_AVX2,AARCH64_NEON,AARCH64_SHA3,ARMV81M_MVE}`. Custom
|
|
58
|
+
capability functions must use the new names.
|
|
59
|
+
([#1770](https://github.com/pq-code-package/mlkem-native/pull/1770))
|
|
60
|
+
- Rename the FIPS-202 backend function-support flags to the
|
|
61
|
+
`MLK_USE_NATIVE_<function>` convention used by the arithmetic backend:
|
|
62
|
+
`MLK_USE_FIPS202_X1_NATIVE` to `MLK_USE_NATIVE_FIPS202_X1`,
|
|
63
|
+
`MLK_USE_FIPS202_X4_NATIVE` to `MLK_USE_NATIVE_FIPS202_X4`,
|
|
64
|
+
`MLK_USE_FIPS202_X4_XOR_BYTES_NATIVE` to `MLK_USE_NATIVE_FIPS202_X4_XOR_BYTES`,
|
|
65
|
+
and `MLK_USE_FIPS202_X4_EXTRACT_BYTES_NATIVE` to
|
|
66
|
+
`MLK_USE_NATIVE_FIPS202_X4_EXTRACT_BYTES`. Custom FIPS-202 backends must rename
|
|
67
|
+
these flags accordingly.
|
|
68
|
+
([#1775](https://github.com/pq-code-package/mlkem-native/pull/1775))
|
|
69
|
+
|
|
70
|
+
What's New
|
|
71
|
+
----------
|
|
72
|
+
|
|
73
|
+
### Assurance
|
|
74
|
+
|
|
75
|
+
- Axiomatize the default `mlk_zeroize` in CBMC via a contract for its
|
|
76
|
+
zeroed-output postcondition, and configure the proofs with a failing custom
|
|
77
|
+
`mlk_zeroize` so they must rely on the contract rather than the concrete
|
|
78
|
+
implementation.
|
|
79
|
+
([#1850](https://github.com/pq-code-package/mlkem-native/pull/1850))
|
|
80
|
+
- Strengthen the top-level API contracts to check that output buffers are
|
|
81
|
+
zeroized or left unmodified on error.
|
|
82
|
+
([#1850](https://github.com/pq-code-package/mlkem-native/pull/1850))
|
|
83
|
+
|
|
84
|
+
### Configuration / API
|
|
85
|
+
|
|
86
|
+
- Add the error codes `MLK_ERR_INVALID_PK`, `MLK_ERR_INVALID_SK`, and
|
|
87
|
+
`MLK_ERR_PCT_FAIL`, distinguishing a rejected public key, a rejected secret
|
|
88
|
+
key, and a failed keygen self-test. `mlk_check_pct` maps a key-check rejection
|
|
89
|
+
of the freshly generated key to `MLK_ERR_PCT_FAIL` and passes platform
|
|
90
|
+
failures through unmodified.
|
|
91
|
+
([#1852](https://github.com/pq-code-package/mlkem-native/pull/1852))
|
|
92
|
+
|
|
93
|
+
### Testing
|
|
94
|
+
|
|
95
|
+
- Support the FIPS 203-tr1 encapDecap revision in the ACVP client, accepting a
|
|
96
|
+
decapsulation key supplied either as an expanded `dk` or as a `seed` (`d||z`)
|
|
97
|
+
to expand, with `keyFormat` inspected per group. mlkem-native now supports and
|
|
98
|
+
is tested against ACVP v1.1.0.43 in addition to the preceding two versions.
|
|
99
|
+
([#1811](https://github.com/pq-code-package/mlkem-native/pull/1811))
|
|
100
|
+
- Use runtime checks in the Wycheproof client instead of `assert`, which is
|
|
101
|
+
stripped under `python -O` and could report a mismatching vector as passing.
|
|
102
|
+
([#1840](https://github.com/pq-code-package/mlkem-native/pull/1840))
|
|
103
|
+
|
|
104
|
+
### Documentation
|
|
105
|
+
|
|
106
|
+
- Add `API-CONVENTIONS.md` describing the conventions shared by all public
|
|
107
|
+
functions: return values and the meaning of the `MLK_ERR_XXX` codes, pointer
|
|
108
|
+
validity, and the state of output buffers on error. Link it from `README.md`
|
|
109
|
+
and the `mlkem_native.h` preamble.
|
|
110
|
+
([#1843](https://github.com/pq-code-package/mlkem-native/pull/1843))
|
|
111
|
+
- Document the `MLK_ERR_RNG_FAIL` error returned by keygen.
|
|
112
|
+
([#1851](https://github.com/pq-code-package/mlkem-native/pull/1851))
|
|
113
|
+
- Clarify the scope and customization of `mlk_zeroize`.
|
|
114
|
+
([#1855](https://github.com/pq-code-package/mlkem-native/pull/1855))
|
|
115
|
+
|
|
116
|
+
mlkem-native v1.3.0
|
|
117
|
+
===================
|
|
118
|
+
|
|
119
|
+
Release notes
|
|
120
|
+
-------------
|
|
121
|
+
|
|
122
|
+
mlkem-native v1.3.0 adds configuration options to control which KEM operations
|
|
123
|
+
are included in a build. It also improves AArch64 feature detection and runtime
|
|
124
|
+
dispatch, and introduces ABI compliance checks for assembly backends. Embedded
|
|
125
|
+
testing now uses Zephyr across a broader range of Arm targets, while assembly
|
|
126
|
+
namespacing and source naming improve integration with projects such as AWS-LC.
|
|
127
|
+
|
|
128
|
+
See the full change log here:
|
|
129
|
+
https://github.com/pq-code-package/mlkem-native/compare/v1.2.0...v1.3.0
|
|
130
|
+
|
|
131
|
+
What's next? mlkem-native v2
|
|
132
|
+
----------------------------
|
|
133
|
+
|
|
134
|
+
This is expected to be the last release prior to mlkem-native v2. Between
|
|
135
|
+
v1.3.0 and v2, breaking changes to the `main` branch will be made.
|
|
136
|
+
|
|
137
|
+
Long-Term Support
|
|
138
|
+
-----------------
|
|
139
|
+
|
|
140
|
+
`release/v1.3` will act as a support branch until 6 months after
|
|
141
|
+
mlkem-native v2 is established. It will receive bugfixes, but no new features.
|
|
142
|
+
We do currently not plan to offer long-term support for mlkem-native v1.x
|
|
143
|
+
beyond that timeframe.
|
|
144
|
+
|
|
145
|
+
If you are deploying mlkem-native v1.3 and expect to be unable to upgrade to
|
|
146
|
+
mlkem-native v2 within 6 months of its release, please contact us to discuss
|
|
147
|
+
a potential extension of the support schedule.
|
|
148
|
+
|
|
149
|
+
What's New
|
|
150
|
+
----------
|
|
151
|
+
|
|
152
|
+
### Configuration / API
|
|
153
|
+
|
|
154
|
+
- Add `MLK_CONFIG_NO_KEYPAIR_API`, `MLK_CONFIG_NO_ENCAPS_API`, and
|
|
155
|
+
`MLK_CONFIG_NO_DECAPS_API`, allowing unused KEM operations and their internal
|
|
156
|
+
dependencies to be excluded. All non-empty API combinations are covered in
|
|
157
|
+
CI. ([#1787](https://github.com/pq-code-package/mlkem-native/pull/1787))
|
|
158
|
+
- Gate the AArch64 arithmetic and FIPS-202 backends on compile-time NEON
|
|
159
|
+
availability and the new `MLK_SYS_CAP_NEON` runtime capability. Integrators
|
|
160
|
+
can now fall back to portable C on AArch64 systems without usable NEON.
|
|
161
|
+
([#1805](https://github.com/pq-code-package/mlkem-native/pull/1805),
|
|
162
|
+
[#1809](https://github.com/pq-code-package/mlkem-native/pull/1809))
|
|
163
|
+
- Add `MLK_SYS_AARCH64_FAST_SHA3` to select the pure-Neon Armv8.4-A SHA3
|
|
164
|
+
implementation on CPUs with sufficient SHA3 execution capacity, including
|
|
165
|
+
Graviton5. ([#1784](https://github.com/pq-code-package/mlkem-native/pull/1784))
|
|
166
|
+
|
|
167
|
+
### Assurance / Testing
|
|
168
|
+
|
|
169
|
+
- Fix deterministic-only builds using `MLK_CONFIG_NO_RANDOMIZED_API`, including
|
|
170
|
+
test, example, and stack-measurement coverage.
|
|
171
|
+
([#1816](https://github.com/pq-code-package/mlkem-native/pull/1816))
|
|
172
|
+
- Upgrade CBMC to v6.10.0, the newest release of CBMC including the fix
|
|
173
|
+
[cbmc/#9011](https://github.com/diffblue/cbmc/pull/9011) to the Z3 soundness
|
|
174
|
+
issue [z3/#9550](https://github.com/Z3Prover/z3/issues/9550). mlkem-native v1.2
|
|
175
|
+
had pinned CBMC to an unstable version between v6.9 and v6.10 which already
|
|
176
|
+
included that fix.
|
|
177
|
+
([#1762](https://github.com/pq-code-package/mlkem-native/pull/1762))
|
|
178
|
+
- Add assembly ABI checkers for AArch64, x86_64 SysV, ppc64le ELFv2, and
|
|
179
|
+
Armv8.1-M MVE. The checkers verify preservation of callee-saved registers and
|
|
180
|
+
run as part of the standard test suite.
|
|
181
|
+
([#1135](https://github.com/pq-code-package/mlkem-native/pull/1135))
|
|
182
|
+
- Add Zephyr-based testing for QEMU Cortex-M3, M4, M7, M33, and M55 targets,
|
|
183
|
+
replacing the previous custom MPS baremetal platforms. Add test and benchmark
|
|
184
|
+
support for the NUCLEO-N657X0-Q board.
|
|
185
|
+
([#1750](https://github.com/pq-code-package/mlkem-native/pull/1750),
|
|
186
|
+
[#1547](https://github.com/pq-code-package/mlkem-native/pull/1547))
|
|
187
|
+
- Strengthen HOL Light tooling with cross-architecture proof execution and
|
|
188
|
+
checks that every expected theorem is present
|
|
189
|
+
([#1634](https://github.com/pq-code-package/mlkem-native/pull/1634))
|
|
190
|
+
- Strengthen Wycheproof validation by checking newly specified fields, rejecting
|
|
191
|
+
unknown schema fields, and tracking upstream vector changes.
|
|
192
|
+
([#1801](https://github.com/pq-code-package/mlkem-native/pull/1801))
|
|
193
|
+
- Extend Windows MSVC coverage to allocation-failure, RNG-failure, and
|
|
194
|
+
Wycheproof tests ([#1738](https://github.com/pq-code-package/mlkem-native/pull/1738))
|
|
195
|
+
- Add emulated testing on x86_64 without AVX2.
|
|
196
|
+
([#1753](https://github.com/pq-code-package/mlkem-native/pull/1753))
|
|
197
|
+
- Correct decapsulation stack measurements, which previously returned before
|
|
198
|
+
the full operation and understated peak stack use by around 10%.
|
|
199
|
+
([#1823](https://github.com/pq-code-package/mlkem-native/pull/1823))
|
|
200
|
+
|
|
201
|
+
### Integration / Upgrade Notes
|
|
202
|
+
|
|
203
|
+
- Namespace assembly-local labels with an `mlk_` prefix, preventing collisions
|
|
204
|
+
when mlkem-native and other projects are combined into one assembly unit.
|
|
205
|
+
([#1813](https://github.com/pq-code-package/mlkem-native/pull/1813))
|
|
206
|
+
- Rename backend assembly files to be self-identifying. Arithmetic assembly
|
|
207
|
+
filenames now use an `mlkem_` prefix. Downstream build systems with explicit
|
|
208
|
+
source lists must update those paths.
|
|
209
|
+
([#1821](https://github.com/pq-code-package/mlkem-native/pull/1821))
|
|
210
|
+
- Move context-parameter support into the new `mlkem/src/context.h`; downstream
|
|
211
|
+
source manifests must include this file.
|
|
212
|
+
([#1768](https://github.com/pq-code-package/mlkem-native/pull/1768))
|
|
213
|
+
|
|
3
214
|
mlkem-native v1.2.0
|
|
4
215
|
===================
|
|
5
216
|
|
|
@@ -8,7 +8,7 @@ This is the main source tree of mlkem-native.
|
|
|
8
8
|
|
|
9
9
|
To build a mlkem-native for a fixed parameter set (ML-KEM-512/768/1024), build the compilation in units in `src/*` separately, and link to an RNG and your application. See [examples/basic](../examples/basic) for a simple example.
|
|
10
10
|
|
|
11
|
-
Alternatively, you can use the auto-
|
|
11
|
+
Alternatively, you can use the auto-generated helper files [mlkem_native.c](mlkem_native.c) and [mlkem_native_asm.S](mlkem_native_asm.S), which bundle all *.c and *.S files together. See [examples/monolithic_build](../examples/monolithic_build) and [examples/monolithic_build_native](../examples/monolithic_build_native) for examples without and with native code.
|
|
12
12
|
|
|
13
13
|
## Configuration
|
|
14
14
|
|
|
@@ -20,4 +20,4 @@ The public API is defined in [mlkem_native.h](mlkem_native.h).
|
|
|
20
20
|
|
|
21
21
|
## Supporting multiple parameter sets
|
|
22
22
|
|
|
23
|
-
If you want to support multiple parameter sets, build the library once per parameter set you want to support. Set `MLK_CONFIG_MULTILEVEL_WITH_SHARED` for one of the builds, and `MLK_CONFIG_MULTILEVEL_NO_SHARED` for the others
|
|
23
|
+
If you want to support multiple parameter sets, build the library once per parameter set you want to support. Set `MLK_CONFIG_MULTILEVEL_BUILD` for all of these builds; this is what appends the parameter set to the namespace prefix, keeping the level-specific symbols apart. To avoid duplicating shared functionality, additionally set `MLK_CONFIG_MULTILEVEL_WITH_SHARED` for exactly one of the builds, and `MLK_CONFIG_MULTILEVEL_NO_SHARED` for the others. Finally, link with RNG and your application as before. This is demonstrated in the examples [examples/multilevel_build](../examples/multilevel_build), [examples/multilevel_build_native](../examples/multilevel_build_native), [examples/monolithic_build_multilevel](../examples/monolithic_build_multilevel) and [examples/monolithic_build_multilevel_native](../examples/monolithic_build_multilevel_native).
|
|
@@ -121,11 +121,6 @@
|
|
|
121
121
|
* Undefine macros from MLK_CONFIG_PARAMETER_SET-specific files
|
|
122
122
|
*/
|
|
123
123
|
/* mlkem/mlkem_native.h */
|
|
124
|
-
#undef CRYPTO_BYTES
|
|
125
|
-
#undef CRYPTO_CIPHERTEXTBYTES
|
|
126
|
-
#undef CRYPTO_PUBLICKEYBYTES
|
|
127
|
-
#undef CRYPTO_SECRETKEYBYTES
|
|
128
|
-
#undef CRYPTO_SYMBYTES
|
|
129
124
|
#undef MLKEM1024_BYTES
|
|
130
125
|
#undef MLKEM1024_CIPHERTEXTBYTES
|
|
131
126
|
#undef MLKEM1024_PUBLICKEYBYTES
|
|
@@ -152,17 +147,15 @@
|
|
|
152
147
|
#undef MLK_API_CONCAT
|
|
153
148
|
#undef MLK_API_CONCAT_
|
|
154
149
|
#undef MLK_API_CONCAT_UNDERSCORE
|
|
155
|
-
#undef MLK_API_LEGACY_CONFIG
|
|
156
150
|
#undef MLK_API_MUST_CHECK_RETURN_VALUE
|
|
157
151
|
#undef MLK_API_NAMESPACE
|
|
152
|
+
#undef MLK_API_NAMESPACE_PREFIX
|
|
158
153
|
#undef MLK_API_QUALIFIER
|
|
159
|
-
#undef MLK_CONFIG_API_CONSTANTS_ONLY
|
|
160
|
-
#undef MLK_CONFIG_API_NAMESPACE_PREFIX
|
|
161
|
-
#undef MLK_CONFIG_API_NO_SUPERCOP
|
|
162
|
-
#undef MLK_CONFIG_API_PARAMETER_SET
|
|
163
|
-
#undef MLK_CONFIG_API_QUALIFIER
|
|
164
154
|
#undef MLK_ERR_FAIL
|
|
155
|
+
#undef MLK_ERR_INVALID_PK
|
|
156
|
+
#undef MLK_ERR_INVALID_SK
|
|
165
157
|
#undef MLK_ERR_OUT_OF_MEMORY
|
|
158
|
+
#undef MLK_ERR_PCT_FAIL
|
|
166
159
|
#undef MLK_ERR_RNG_FAIL
|
|
167
160
|
#undef MLK_H
|
|
168
161
|
#undef MLK_MAX3_
|
|
@@ -184,13 +177,6 @@
|
|
|
184
177
|
#undef MLK_TOTAL_ALLOC_768_KEYPAIR
|
|
185
178
|
#undef MLK_TOTAL_ALLOC_768_KEYPAIR_NO_PCT
|
|
186
179
|
#undef MLK_TOTAL_ALLOC_768_KEYPAIR_PCT
|
|
187
|
-
#undef crypto_kem_check_pk
|
|
188
|
-
#undef crypto_kem_check_sk
|
|
189
|
-
#undef crypto_kem_dec
|
|
190
|
-
#undef crypto_kem_enc
|
|
191
|
-
#undef crypto_kem_enc_derand
|
|
192
|
-
#undef crypto_kem_keypair
|
|
193
|
-
#undef crypto_kem_keypair_derand
|
|
194
180
|
/* mlkem/src/common.h */
|
|
195
181
|
#undef MLK_ADD_PARAM_SET
|
|
196
182
|
#undef MLK_ALLOC
|
|
@@ -202,14 +188,12 @@
|
|
|
202
188
|
#undef MLK_COMMON_H
|
|
203
189
|
#undef MLK_CONCAT
|
|
204
190
|
#undef MLK_CONCAT_
|
|
205
|
-
#undef MLK_CONTEXT_PARAMETERS_0
|
|
206
|
-
#undef MLK_CONTEXT_PARAMETERS_1
|
|
207
|
-
#undef MLK_CONTEXT_PARAMETERS_2
|
|
208
|
-
#undef MLK_CONTEXT_PARAMETERS_3
|
|
209
|
-
#undef MLK_CONTEXT_PARAMETERS_4
|
|
210
191
|
#undef MLK_EMPTY_CU
|
|
211
192
|
#undef MLK_ERR_FAIL
|
|
193
|
+
#undef MLK_ERR_INVALID_PK
|
|
194
|
+
#undef MLK_ERR_INVALID_SK
|
|
212
195
|
#undef MLK_ERR_OUT_OF_MEMORY
|
|
196
|
+
#undef MLK_ERR_PCT_FAIL
|
|
213
197
|
#undef MLK_ERR_RNG_FAIL
|
|
214
198
|
#undef MLK_EXTERNAL_API
|
|
215
199
|
#undef MLK_FIPS202X4_HEADER_FILE
|
|
@@ -311,6 +295,14 @@
|
|
|
311
295
|
#undef mlk_poly_frommsg
|
|
312
296
|
#undef mlk_poly_tobytes
|
|
313
297
|
#undef mlk_poly_tomsg
|
|
298
|
+
/* mlkem/src/context.h */
|
|
299
|
+
#undef MLK_CONTEXT_H
|
|
300
|
+
#undef MLK_CONTEXT_PARAMETERS_0
|
|
301
|
+
#undef MLK_CONTEXT_PARAMETERS_1
|
|
302
|
+
#undef MLK_CONTEXT_PARAMETERS_2
|
|
303
|
+
#undef MLK_CONTEXT_PARAMETERS_3
|
|
304
|
+
#undef MLK_CONTEXT_PARAMETERS_4
|
|
305
|
+
#undef MLK_CONTEXT_UNUSED
|
|
314
306
|
/* mlkem/src/debug.h */
|
|
315
307
|
#undef MLK_DEBUG_H
|
|
316
308
|
#undef mlk_assert
|
|
@@ -377,6 +369,7 @@
|
|
|
377
369
|
#undef MLK_SYSV_ABI_SUPPORTED
|
|
378
370
|
#undef MLK_SYS_AARCH64
|
|
379
371
|
#undef MLK_SYS_AARCH64_EB
|
|
372
|
+
#undef MLK_SYS_AARCH64_NEON
|
|
380
373
|
#undef MLK_SYS_APPLE
|
|
381
374
|
#undef MLK_SYS_ARMV81M_MVE
|
|
382
375
|
#undef MLK_SYS_BIG_ENDIAN
|
|
@@ -463,23 +456,23 @@
|
|
|
463
456
|
/* mlkem/src/fips202/native/aarch64/x1_scalar.h */
|
|
464
457
|
#undef MLK_FIPS202_AARCH64_NEED_X1_SCALAR
|
|
465
458
|
#undef MLK_FIPS202_NATIVE_AARCH64_X1_SCALAR_H
|
|
466
|
-
#undef
|
|
459
|
+
#undef MLK_USE_NATIVE_FIPS202_X1
|
|
467
460
|
/* mlkem/src/fips202/native/aarch64/x1_v84a.h */
|
|
468
461
|
#undef MLK_FIPS202_AARCH64_NEED_X1_V84A
|
|
469
462
|
#undef MLK_FIPS202_NATIVE_AARCH64_X1_V84A_H
|
|
470
|
-
#undef
|
|
463
|
+
#undef MLK_USE_NATIVE_FIPS202_X1
|
|
471
464
|
/* mlkem/src/fips202/native/aarch64/x2_v84a.h */
|
|
472
465
|
#undef MLK_FIPS202_AARCH64_NEED_X2_V84A
|
|
473
466
|
#undef MLK_FIPS202_NATIVE_AARCH64_X2_V84A_H
|
|
474
|
-
#undef
|
|
467
|
+
#undef MLK_USE_NATIVE_FIPS202_X4
|
|
475
468
|
/* mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h */
|
|
476
469
|
#undef MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID
|
|
477
470
|
#undef MLK_FIPS202_NATIVE_AARCH64_X4_V8A_SCALAR_H
|
|
478
|
-
#undef
|
|
471
|
+
#undef MLK_USE_NATIVE_FIPS202_X4
|
|
479
472
|
/* mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h */
|
|
480
473
|
#undef MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID
|
|
481
474
|
#undef MLK_FIPS202_NATIVE_AARCH64_X4_V8A_V84A_SCALAR_H
|
|
482
|
-
#undef
|
|
475
|
+
#undef MLK_USE_NATIVE_FIPS202_X4
|
|
483
476
|
#endif /* MLK_SYS_AARCH64 */
|
|
484
477
|
#if defined(MLK_SYS_X86_64)
|
|
485
478
|
/*
|
|
@@ -488,7 +481,7 @@
|
|
|
488
481
|
/* mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h */
|
|
489
482
|
#undef MLK_FIPS202_NATIVE_X86_64_KECCAK_F1600_X4_AVX2_H
|
|
490
483
|
#undef MLK_FIPS202_X86_64_NEED_X4_AVX2
|
|
491
|
-
#undef
|
|
484
|
+
#undef MLK_USE_NATIVE_FIPS202_X4
|
|
492
485
|
/* mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h */
|
|
493
486
|
#undef MLK_FIPS202_NATIVE_X86_64_SRC_FIPS202_NATIVE_X86_64_H
|
|
494
487
|
#undef mlk_keccak_f1600_x4_avx2_asm
|
|
@@ -504,12 +497,10 @@
|
|
|
504
497
|
#undef MLK_FIPS202_ARMV81M_NEED_X4
|
|
505
498
|
#undef MLK_FIPS202_NATIVE_ARMV81M
|
|
506
499
|
#undef MLK_FIPS202_NATIVE_ARMV81M_MVE_H
|
|
507
|
-
#undef
|
|
508
|
-
#undef
|
|
509
|
-
#undef
|
|
500
|
+
#undef MLK_USE_NATIVE_FIPS202_X4
|
|
501
|
+
#undef MLK_USE_NATIVE_FIPS202_X4_EXTRACT_BYTES
|
|
502
|
+
#undef MLK_USE_NATIVE_FIPS202_X4_XOR_BYTES
|
|
510
503
|
#undef mlk_keccak_f1600_x4_native_impl
|
|
511
|
-
#undef mlk_keccak_f1600_x4_state_extract_bytes
|
|
512
|
-
#undef mlk_keccak_f1600_x4_state_xor_bytes
|
|
513
504
|
/* mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h */
|
|
514
505
|
#undef MLK_FIPS202_NATIVE_ARMV81M_SRC_FIPS202_NATIVE_ARMV81M_H
|
|
515
506
|
#undef mlk_keccak_f1600_x4_mve_asm
|