pq_crypto 0.6.7 → 0.6.9

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.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -3
  4. data/ext/pqcrypto/pqcrypto_ruby_secure.c +41 -11
  5. data/ext/pqcrypto/pqcrypto_secure.c +501 -296
  6. data/ext/pqcrypto/pqcrypto_version.h +1 -1
  7. data/ext/pqcrypto/vendor/.vendored +7 -7
  8. data/ext/pqcrypto/vendor/mldsa-native/BUILDING.md +71 -0
  9. data/ext/pqcrypto/vendor/mldsa-native/README.md +26 -11
  10. data/ext/pqcrypto/vendor/mldsa-native/RELEASE.md +77 -150
  11. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.c +93 -40
  12. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.h +74 -59
  13. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_asm.S +106 -40
  14. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_config.h +94 -92
  15. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/capability.h +31 -0
  16. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/cbmc.h +55 -4
  17. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/common.h +30 -0
  18. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/context.h +1 -0
  19. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.c +1 -0
  20. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.h +1 -0
  21. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +5 -2
  22. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +4 -4
  23. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +4 -4
  24. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +8 -3
  25. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +8 -4
  26. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +12 -0
  27. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +4 -2
  28. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_extract_bytes_mve.S +37 -19
  29. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_xor_bytes_mve.S +37 -19
  30. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +3 -8
  31. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/auto.h +53 -0
  32. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/keccak_f1600_x1_avx512.h +38 -0
  33. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/keccak_f1600_x4_avx512.h +38 -0
  34. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +24 -0
  35. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x1_avx512_asm.S +574 -0
  36. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +46 -18
  37. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx512_asm.S +679 -0
  38. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccakf1600_constants.c +13 -4
  39. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +6 -4
  40. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +5 -6
  41. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_intt_aarch64_asm.S +4 -2
  42. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_ntt_aarch64_asm.S +4 -2
  43. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_pointwise_montgomery_aarch64_asm.S +6 -4
  44. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_caddq_aarch64_asm.S +4 -2
  45. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_chknorm_aarch64_asm.S +6 -4
  46. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_32_aarch64_asm.S +4 -3
  47. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_88_aarch64_asm.S +4 -3
  48. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_32_aarch64_asm.S +4 -3
  49. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_88_aarch64_asm.S +4 -3
  50. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S +4 -2
  51. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S +4 -2
  52. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S +4 -2
  53. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_17_aarch64_asm.S +5 -3
  54. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_19_aarch64_asm.S +5 -3
  55. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_aarch64_asm.S +110 -120
  56. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta2_aarch64_asm.S +109 -101
  57. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta4_aarch64_asm.S +97 -93
  58. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/api.h +1 -9
  59. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/meta.h +4 -0
  60. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/fastmul.h +74 -0
  61. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/slowmul.h +77 -0
  62. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/arith_native_rv32im.h +124 -0
  63. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/mldsa_intt_rv32im_asm.S +331 -0
  64. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/mldsa_intt_rv32im_slowmul_asm.S +381 -0
  65. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/mldsa_ntt_rv32im_asm.S +304 -0
  66. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/mldsa_ntt_rv32im_slowmul_asm.S +351 -0
  67. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/mldsa_poly_pointwise_montgomery_rv32im_asm.S +139 -0
  68. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/rv32im/src/rv32im_zetas.c +118 -0
  69. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +6 -5
  70. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +2 -3
  71. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_intt_avx2_asm.S +5 -3
  72. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_ntt_avx2_asm.S +5 -3
  73. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_nttunpack_avx2_asm.S +5 -3
  74. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l4_avx2_asm.S +6 -3
  75. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l5_avx2_asm.S +6 -3
  76. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l7_avx2_asm.S +6 -3
  77. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_avx2_asm.S +5 -3
  78. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_caddq_avx2_asm.S +5 -3
  79. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_chknorm_avx2_asm.S +7 -5
  80. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_32_avx2_asm.S +69 -67
  81. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_88_avx2_asm.S +69 -67
  82. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_32_avx2_asm.S +12 -16
  83. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_88_avx2_asm.S +14 -18
  84. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_17_avx2_asm.S +6 -3
  85. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_19_avx2_asm.S +6 -3
  86. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_avx2_asm.S +5 -3
  87. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta2_avx2_asm.S +5 -3
  88. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta4_avx2_asm.S +5 -3
  89. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.c +23 -27
  90. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.h +21 -42
  91. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/params.h +28 -1
  92. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.c +87 -28
  93. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.h +61 -3
  94. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.c +23 -19
  95. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.h +30 -0
  96. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.c +55 -107
  97. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.h +67 -107
  98. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +16 -24
  99. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +27 -21
  100. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/reduce.h +8 -8
  101. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.c +191 -119
  102. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.h +6 -3
  103. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sys.h +16 -42
  104. data/ext/pqcrypto/vendor/mlkem-native/BUILDING.md +72 -0
  105. data/ext/pqcrypto/vendor/mlkem-native/README.md +9 -5
  106. data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +64 -312
  107. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +77 -34
  108. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +41 -13
  109. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +89 -33
  110. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +50 -46
  111. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/capability.h +30 -0
  112. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +30 -0
  113. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +1 -0
  114. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +4 -5
  115. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.c +1 -0
  116. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.c +15 -0
  117. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +23 -8
  118. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.c +11 -3
  119. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.h +7 -1
  120. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +8 -0
  121. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.h +8 -0
  122. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +5 -2
  123. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +4 -4
  124. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +4 -4
  125. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +8 -3
  126. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +8 -4
  127. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +4 -2
  128. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_state_extract_bytes_mve.S +37 -19
  129. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_state_xor_bytes_mve.S +37 -19
  130. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/auto.h +2 -2
  131. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/auto.h +47 -0
  132. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x1_avx512.h +37 -0
  133. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx512.h +37 -0
  134. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h +24 -0
  135. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccak_f1600_x1_avx512_asm.S +573 -0
  136. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +46 -18
  137. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccak_f1600_x4_avx512_asm.S +678 -0
  138. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccakf1600_constants.c +13 -4
  139. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +1 -2
  140. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.c +7 -5
  141. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +29 -5
  142. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +156 -0
  143. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +137 -3
  144. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/compress_d5_table.c +43 -0
  145. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/decompress_d10_table.c +50 -0
  146. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/decompress_d11_table.c +53 -0
  147. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/decompress_d4_table.c +44 -0
  148. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/decompress_d5_table.c +53 -0
  149. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_intt_aarch64_asm.S +5 -3
  150. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_ntt_aarch64_asm.S +4 -2
  151. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_compress_d10_aarch64_asm.S +439 -0
  152. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_compress_d11_aarch64_asm.S +452 -0
  153. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_compress_d4_aarch64_asm.S +106 -0
  154. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_compress_d5_aarch64_asm.S +124 -0
  155. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_decompress_d10_aarch64_asm.S +108 -0
  156. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_decompress_d11_aarch64_asm.S +116 -0
  157. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_decompress_d4_aarch64_asm.S +93 -0
  158. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_decompress_d5_aarch64_asm.S +104 -0
  159. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_frombytes_aarch64_asm.S +84 -0
  160. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_mulcache_compute_aarch64_asm.S +4 -2
  161. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_reduce_aarch64_asm.S +4 -2
  162. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_tobytes_aarch64_asm.S +5 -3
  163. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_poly_tomont_aarch64_asm.S +4 -3
  164. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S +4 -2
  165. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S +4 -2
  166. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S +4 -2
  167. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/mlkem_rej_uniform_aarch64_asm.S +112 -104
  168. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +0 -1
  169. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +2 -2
  170. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/README.md +2 -2
  171. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/meta.h +16 -21
  172. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/arith_native_ppc64le.h +1 -0
  173. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.c +2 -2
  174. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/mlkem_intt_ppc_asm.S +6 -5
  175. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/mlkem_ntt_ppc_asm.S +6 -5
  176. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/mlkem_poly_tomont_ppc_asm.S +6 -5
  177. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/mlkem_reduce_ppc_asm.S +6 -5
  178. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.c +5 -4
  179. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.h +2 -2
  180. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +1 -1
  181. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +5 -5
  182. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_intt_avx2_asm.S +36 -33
  183. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_ntt_avx2_asm.S +67 -65
  184. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_nttfrombytes_avx2_asm.S +8 -5
  185. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_ntttobytes_avx2_asm.S +6 -3
  186. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_nttunpack_avx2_asm.S +5 -3
  187. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_compress_d10_avx2_asm.S +7 -5
  188. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_compress_d11_avx2_asm.S +7 -4
  189. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_compress_d4_avx2_asm.S +7 -5
  190. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_compress_d5_avx2_asm.S +7 -4
  191. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_decompress_d10_avx2_asm.S +7 -4
  192. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_decompress_d11_avx2_asm.S +6 -4
  193. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_decompress_d4_avx2_asm.S +7 -4
  194. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_decompress_d5_avx2_asm.S +6 -4
  195. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_poly_mulcache_compute_avx2_asm.S +5 -3
  196. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_polyvec_basemul_acc_montgomery_cached_k2_avx2_asm.S +118 -115
  197. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_polyvec_basemul_acc_montgomery_cached_k3_avx2_asm.S +174 -171
  198. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_polyvec_basemul_acc_montgomery_cached_k4_avx2_asm.S +230 -227
  199. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_reduce_avx2_asm.S +17 -15
  200. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_rej_uniform_avx2_asm.S +7 -6
  201. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mlkem_tomont_avx2_asm.S +5 -3
  202. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +4 -9
  203. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +1 -1
  204. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +31 -44
  205. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +1 -1
  206. data/lib/pq_crypto/internal.rb +10 -0
  207. data/lib/pq_crypto/kem.rb +5 -10
  208. data/lib/pq_crypto/pkcs8/der.rb +26 -11
  209. data/lib/pq_crypto/pkcs8/private_key_choice.rb +21 -25
  210. data/lib/pq_crypto/signature.rb +28 -40
  211. data/lib/pq_crypto/spki.rb +36 -23
  212. data/lib/pq_crypto/version.rb +1 -1
  213. data/script/vendor_libs.rb +6 -6
  214. metadata +36 -1
@@ -7,9 +7,9 @@
7
7
  #ifndef MLD_SYS_H
8
8
  #define MLD_SYS_H
9
9
 
10
- #if !defined(MLD_CONFIG_NO_ASM) && (defined(__GNUC__) || defined(__clang__))
11
- #define MLD_HAVE_INLINE_ASM
12
- #endif
10
+ /* This header must not depend on configuration options: configuration
11
+ * hooks may include it before all options are defined, and its include
12
+ * guard prevents re-evaluation. Evaluate options in common.h instead. */
13
13
 
14
14
  /* Try to find endianness, if not forced through CFLAGS already */
15
15
  #if !defined(MLD_SYS_LITTLE_ENDIAN) && !defined(MLD_SYS_BIG_ENDIAN)
@@ -59,8 +59,9 @@
59
59
  #define MLD_SYS_AARCH64_EB
60
60
  #endif
61
61
 
62
- /* Check if we're running on an Armv8.1-M system with MVE */
63
- #if defined(__ARM_ARCH_8_1M_MAIN__) || defined(__ARM_FEATURE_MVE)
62
+ /* Check if the Armv8.1-M compilation target supports MVE. Armv8.1-M
63
+ * architecture support alone does not imply that MVE is enabled. */
64
+ #if defined(__ARM_FEATURE_MVE)
64
65
  #define MLD_SYS_ARMV81M_MVE
65
66
  #endif
66
67
 
@@ -70,6 +71,11 @@
70
71
  #if defined(__AVX2__)
71
72
  #define MLD_SYS_X86_64_AVX2
72
73
  #endif
74
+ /* Check if the compilation target supports the AVX-512 extensions used by
75
+ * the AVX-512 backend: AVX-512F, AVX-512VL and AVX-512DQ. */
76
+ #if defined(__AVX512F__) && defined(__AVX512VL__) && defined(__AVX512DQ__)
77
+ #define MLD_SYS_X86_64_AVX512
78
+ #endif
73
79
  #endif /* __x86_64__ || _M_X64 || _M_AMD64 */
74
80
 
75
81
  #if defined(MLD_SYS_LITTLE_ENDIAN) && defined(__powerpc64__)
@@ -87,7 +93,10 @@
87
93
 
88
94
  #if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32
89
95
  #define MLD_SYS_RISCV32
96
+ #if defined(__riscv_mul) && !defined(__riscv_32e)
97
+ #define MLD_SYS_RISCV32_M
90
98
  #endif
99
+ #endif /* __riscv && __riscv_xlen && __riscv_xlen == 32 */
91
100
 
92
101
  #if defined(_WIN64) || defined(_WIN32)
93
102
  #define MLD_SYS_WINDOWS
@@ -242,23 +251,6 @@
242
251
  #endif
243
252
  #endif /* MLD_SYS_X86_64 */
244
253
 
245
- #if defined(MLD_CONFIG_CT_TESTING_ENABLED) && !defined(__ASSEMBLER__)
246
- #include <valgrind/memcheck.h>
247
- #define MLD_CT_TESTING_SECRET(ptr, len) \
248
- VALGRIND_MAKE_MEM_UNDEFINED((ptr), (len))
249
- #define MLD_CT_TESTING_DECLASSIFY(ptr, len) \
250
- VALGRIND_MAKE_MEM_DEFINED((ptr), (len))
251
- #else /* MLD_CONFIG_CT_TESTING_ENABLED && !__ASSEMBLER__ */
252
- #define MLD_CT_TESTING_SECRET(ptr, len) \
253
- do \
254
- { \
255
- } while (0)
256
- #define MLD_CT_TESTING_DECLASSIFY(ptr, len) \
257
- do \
258
- { \
259
- } while (0)
260
- #endif /* !(MLD_CONFIG_CT_TESTING_ENABLED && !__ASSEMBLER__) */
261
-
262
254
  #if defined(__GNUC__) || defined(__clang__)
263
255
  #define MLD_MUST_CHECK_RETURN_VALUE __attribute__((warn_unused_result))
264
256
  #else
@@ -296,32 +288,14 @@ typedef enum
296
288
  {
297
289
  /* x86_64 */
298
290
  MLD_SYS_CAP_X86_64_AVX2,
291
+ /* AVX-512F, AVX-512VL and AVX-512DQ */
292
+ MLD_SYS_CAP_X86_64_AVX512,
299
293
  /* AArch64 */
300
294
  MLD_SYS_CAP_AARCH64_NEON,
301
295
  MLD_SYS_CAP_AARCH64_SHA3,
302
296
  /* Armv8.1-M */
303
297
  MLD_SYS_CAP_ARMV81M_MVE
304
298
  } mld_sys_cap;
305
-
306
- #if !defined(MLD_CONFIG_CUSTOM_CAPABILITY_FUNC)
307
- #include "cbmc.h"
308
-
309
- MLD_MUST_CHECK_RETURN_VALUE
310
- static MLD_INLINE int mld_sys_check_capability(mld_sys_cap cap)
311
- __contract__(
312
- ensures(return_value == 0 || return_value == 1)
313
- )
314
- {
315
- /* By default, we rely on compile-time feature detection/specification:
316
- * If a feature is enabled at compile-time, we assume it is supported by
317
- * the host that the resulting library/binary will be built on.
318
- * If this assumption is not true, you MUST overwrite this function.
319
- * See the documentation of MLD_CONFIG_CUSTOM_CAPABILITY_FUNC in
320
- * mldsa_native_config.h for more information. */
321
- (void)cap;
322
- return 1;
323
- }
324
- #endif /* !MLD_CONFIG_CUSTOM_CAPABILITY_FUNC */
325
299
  #endif /* !__ASSEMBLER__ */
326
300
 
327
301
  #endif /* !MLD_SYS_H */
@@ -37,6 +37,16 @@ make run_acvp
37
37
 
38
38
  The resulting binaries can be found in `test/build` (their full path is printed by `make`).
39
39
 
40
+ To check that the assembled byte code in the final libraries match the machine code that the
41
+ [HOL Light Proofs](proofs/hol_light) reason about, use
42
+
43
+ ```bash
44
+ make CHECK_BINARY=1 # with any target, e.g. `make test CHECK_BINARY=1`
45
+ ```
46
+
47
+ This checks each library and binary as `make` builds it, and fails on a mismatch. Files that
48
+ are already built are not checked again; use `scripts/check-binary FILE ...` for those.
49
+
40
50
  For benchmarking, specify the cycle counting method. Currently, **mlkem-native** is supporting NO, PERF, PMU, and MAC:
41
51
  * `NO` means that no cycle counting will be used; this can be used to confirm that benchmarks compile fine.
42
52
  * `PERF` uses the `perf` kernel module for cycle counting. Does not work on Apple platforms.
@@ -66,6 +76,68 @@ will compile and run functionality tests. Similarly,
66
76
 
67
77
  will compile and run benchmarks, using PERF for cycle counting (`-c PERF`) and running as root (`-r`).
68
78
 
79
+ On Linux, `./scripts/tests` builds with `CHECK_BINARY=1`, described above, if readelf and
80
+ `python3` with PyYAML are available; `--no-check-binary` turns this off.
81
+
82
+ #### Test platforms
83
+
84
+ The `--platform` option supplies non-empty cross-compilation and execution
85
+ settings, or selects the platform Makefile. It does not change which tests run.
86
+ Empty low-level options and profile values that are not specified preserve the
87
+ existing environment. The `native` profile adds no compile or run overrides.
88
+
89
+ ```bash
90
+ # Native host
91
+ ./scripts/tests func
92
+
93
+ # GNU/Linux AArch64 under QEMU user mode
94
+ nix develop .#cross-aarch64 --command \
95
+ ./scripts/tests func --platform linux/aarch64
96
+
97
+ # No-MMU AArch64 QEMU virt machine
98
+ nix develop .#cross-aarch64-embedded --command \
99
+ ./scripts/tests func --platform baremetal/aarch64-virt
100
+
101
+ # AVR under simavr
102
+ nix develop .#cross-avr --command \
103
+ ./scripts/tests func --platform baremetal/avr --opt=no_opt
104
+
105
+ # Zephyr on the default QEMU board
106
+ nix develop .#zephyr --command \
107
+ ./scripts/tests func --platform zephyr
108
+ ```
109
+
110
+ Available profiles:
111
+
112
+ | Platform | Nix shell | Execution environment |
113
+ | -------- | --------- | --------------------- |
114
+ | `native` | `default` | Inherited environment (normally the current host) |
115
+ | `linux/x86_64` | `cross-x86_64` or `cross` | QEMU user mode |
116
+ | `linux/x86_64-no-avx2` | `cross-x86_64` or `cross` | QEMU Snowridge, no AVX2 |
117
+ | `linux/aarch64` | `cross-aarch64` or `cross` | QEMU user mode |
118
+ | `linux/aarch64_be` | `cross-aarch64_be` or `cross` | QEMU user mode |
119
+ | `linux/ppc64le-power8` | `cross-ppc64le` or `cross` | QEMU POWER8 |
120
+ | `linux/ppc64le-power7` | `cross-ppc64le` or `cross` | POWER7 code on QEMU POWER8 |
121
+ | `linux/riscv64-rvv128` | `cross-riscv64` or `cross` | QEMU RVV, VLEN=128 |
122
+ | `linux/riscv64-rvv256` | `cross-riscv64` or `cross` | QEMU RVV, VLEN=256 |
123
+ | `linux/riscv64-rvv512` | `cross-riscv64` or `cross` | QEMU RVV, VLEN=512 |
124
+ | `linux/riscv64-rvv1024` | `cross-riscv64` or `cross` | QEMU RVV, VLEN=1024 |
125
+ | `linux/riscv32` | `cross-riscv32` or `cross` | QEMU user mode |
126
+ | `baremetal/aarch64-virt` | `cross-aarch64-embedded` | QEMU system emulation |
127
+ | `baremetal/avr` | `cross-avr` | simavr |
128
+ | `zephyr` | `zephyr` | Zephyr under QEMU or on supported hardware |
129
+
130
+ Explicit non-empty `--cross-prefix` and `--exec-wrapper` values override
131
+ profile values; empty values are treated like omitted options. `--cflags` and
132
+ `--ldflags` extend profile values. Bare-metal and Zephyr profiles select
133
+ their existing platform Makefile, which supplies toolchain, linker, and runtime
134
+ defaults.
135
+
136
+ The standalone example Makefiles do not consume platform Makefiles. The
137
+ `examples` command, and `all` unless passed `--no-examples`, therefore reject
138
+ bare-metal, Zephyr, and explicit `--extra-makefile` configurations. Prefix-based
139
+ Linux profiles remain supported.
140
+
69
141
  For detailed information on how to use the script, please refer to
70
142
  `./scripts/tests --help`.
71
143
 
@@ -13,11 +13,11 @@
13
13
  mlkem-native is a secure, fast, and portable C90[^C90] implementation of ML-KEM[^FIPS203].
14
14
  It is a fork of the ML-KEM reference implementation[^REF].
15
15
 
16
- All C code in [mlkem/src/*](mlkem) and [mlkem/src/fips202/*](mlkem/src/fips202) is proved memory-safe (no memory overflow) and type-safe (no integer overflow)
16
+ All C code in [mlkem/src/*](mlkem) and [mlkem/src/fips202/*](mlkem/src/fips202), except for the backends for platforms other than AArch64 and x86_64 and the debug code, is proved memory-safe (no memory overflow) and type-safe (no integer overflow)
17
17
  using CBMC[^CBMC]. All AArch64 and x86_64 assembly is proved to be functionally correct,
18
18
  memory-safe, and of secret-independent timing (constant-time), using HOL-Light[^HOL-Light].
19
19
 
20
- 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.
20
+ mlkem-native includes native backends for Arm (64-bit, Neon), Intel/AMD (64-bit, AVX2; AVX-512 for FIPS-202), RISC-V (64-bit, RVV), and POWER (ppc64le, VSX). See [benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/) for performance data.
21
21
 
22
22
  mlkem-native is supported by the [Post-Quantum Cryptography Alliance](https://pqca.org/) as part of the [Linux Foundation](https://linuxfoundation.org/).
23
23
 
@@ -50,11 +50,12 @@ mlkem-native is used in
50
50
  - [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)
51
51
  - 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)
52
52
  - 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)
53
+ - [PyCryptodome](https://github.com/Legrandin/pycryptodome) - a self-contained Python package of low-level cryptographic primitives, since [v4.2.0](https://github.com/Legrandin/pycryptodome/releases/tag/v4.2.0)
53
54
  - [Pavona](https://github.com/pavona/pavona) - a library of modular, tapeout-proven, and secure-by-default open silicon blocks
54
55
 
55
56
  ## Formal Verification
56
57
 
57
- All C code in [mlkem/src/*](mlkem) and [mlkem/src/fips202/*](mlkem/src/fips202) is proved memory-safe (no memory overflow) and type-safe (no integer overflow).
58
+ All C code in [mlkem/src/*](mlkem) and [mlkem/src/fips202/*](mlkem/src/fips202), except for the backends for platforms other than AArch64 and x86_64 and the debug code, is proved memory-safe (no memory overflow) and type-safe (no integer overflow).
58
59
  This uses the [C Bounded Model Checker (CBMC)](https://github.com/diffblue/cbmc) and builds on function contracts and loop invariant annotations
59
60
  in the source code. See [proofs/cbmc](proofs/cbmc) for details.
60
61
 
@@ -72,11 +73,14 @@ All AArch64 and x86_64 assembly in mlkem-native is formally proved in [HOL Light
72
73
  memory access patterns, and variable-latency instructions, thwarting most timing side channels
73
74
  (see [proofs/hol_light](proofs/hol_light) for details). C code is hardened against
74
75
  compiler-introduced timing side channels (such as KyberSlash[^KyberSlash] or clangover[^clangover])
75
- through suitable barriers and constant-time patterns.
76
+ through suitable barriers and constant-time patterns. The C code assumes constant-time 32x32->32 and 32x32->64 multiplication,
77
+ which some targets do not provide, e.g., cores without a hardware multiplier or with early-terminating multiply instructions.
76
78
 
77
79
  Absence of secret-dependent branches, memory-access patterns and variable-latency instructions is also tested using `valgrind`
78
80
  with various combinations of compilers and compilation options.
79
81
 
82
+ **Stack zeroization.** mlkem-native zeroizes intermediate buffers before returning, but this does not eliminate leakage of secret data on the stack. If you need bullet-proof zeroization of the stack, you need to consider additional measures; see [API conventions](API-CONVENTIONS.md#secret-data-left-on-the-stack).
83
+
80
84
  **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.
81
85
 
82
86
  ## Design
@@ -91,7 +95,7 @@ mlkem-native currently offers the following backends:
91
95
 
92
96
  * Default portable C backend
93
97
  * 64-bit Arm backend (using Neon)
94
- * 64-bit Intel/AMD backend (using AVX2)
98
+ * 64-bit Intel/AMD backend (using AVX2; AVX-512 for FIPS-202)
95
99
  * 64-bit RISC-V backend (using RVV)
96
100
  * 64-bit POWER backend (ppc64le, using VSX; supports POWER8 and above)
97
101
  * 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.
@@ -1,319 +1,71 @@
1
1
  [//]: # (SPDX-License-Identifier: CC-BY-4.0)
2
2
 
3
- mlkem-native v2.0.0
3
+ mlkem-native v2.1.0
4
4
  ===================
5
5
 
6
6
  Release notes
7
7
  -------------
8
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
-
214
- mlkem-native v1.2.0
215
- ===================
216
-
217
- Release notes
218
- -------------
219
-
220
- mlkem-native v1.2.0 adds a new **PowerPC (ppc64le)** assembly backend and broadens portability of the existing
221
- backends: the x86_64 backend can now be used on Windows, the RISC-V backend compiles under C90, and a new
222
- Cortex-M33 baremetal target is tested. It also fixes a signed-shift undefined behavior on 16-bit-`int` targets
223
- and hardens the RISC-V backend against secret-dependent timing. Finally, the CBMC proofs are extended to
224
- establish loop termination for all functions except rejection sampling.
225
-
226
- What's New
227
- ----------
228
-
229
- - **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))
230
- - **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))
231
- - **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))
232
- - **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)).
233
- - **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)).
234
-
235
- mlkem-native v1.1.0
236
- ====================
237
-
238
- Release notes
239
- -------------
240
-
241
- mlkem-native v1.1.0 marks the completion of the verification of all x86_64 and AArch64 assembly and the introduction of
242
- [SOUNDNESS.md](SOUNDNESS.md) documenting the scope, assumptions and risks of the verification work. It also introduces
243
- various configuration options enabling the customization of mlkem-native for different application contexts. Finally,
244
- new backends for RISC-V RVV and Armv8.1-M MVE have been added.
245
-
246
- See the full change log here: https://github.com/pq-code-package/mlkem-native/compare/v1.0.0...v1.1.0
247
-
248
- What's New
249
- ----------
250
-
251
- ### Security
252
-
253
- - Fix missing zeroization of intermediate polynomial vector `pkpv` in `mlk_indcpa_keypair_derand()` and `mlk_indcpa_enc()`. ([#1328](https://github.com/pq-code-package/mlkem-native/pull/1328))
254
- - Fix missing zeroization of `pk` and `sk` buffers on keypair generation failure (e.g. OOM during the pairwise consistency test). ([#1559](https://github.com/pq-code-package/mlkem-native/pull/1559))
255
- - Fix a 4-byte buffer overread in x86_64 rejection sampling assembly. The overread was within the stack frame and the excess bytes were not acted on, but the read itself exceeded the nominal buffer bounds. Found while working on the corresponding memory-safety proof. ([#1615](https://github.com/pq-code-package/mlkem-native/pull/1615))
256
- - Make the value barrier `volatile` to 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](https://github.com/pq-code-package/mlkem-native/pull/1342))
257
- - Mark the stack as non-executable in all assembly files via `.note.GNU-stack` section markers. ([#1340](https://github.com/pq-code-package/mlkem-native/pull/1340))
258
-
259
- ### Assurance
260
-
261
- - **Assembly verification:** All x86_64 and AArch64 assembly is verified to be functionally correct, memory-safe and
262
- free of secret-dependent timing, in HOL Light.
263
- - **SOUNDNESS.md**: New document mapping out what is proved, what is assumed, and where the gaps and risks
264
- lie. ([#1582](https://github.com/pq-code-package/mlkem-native/pull/1582))
265
-
266
- ### Performance
267
-
268
- - **AArch64**: Re-optimized arithmetic backend for Neoverse-N1 using SLOTHY. ([#1088](https://github.com/pq-code-package/mlkem-native/pull/1088))
269
- - **x86_64**: AVX2 assembly for `polyvec_basemul` ([#1097](https://github.com/pq-code-package/mlkem-native/pull/1097)), SSE4.1 rejection sampling ([#1136](https://github.com/pq-code-package/mlkem-native/pull/1136)), conversion of compression/decompression from intrinsics to assembly ([#1543](https://github.com/pq-code-package/mlkem-native/pull/1543), [#1545](https://github.com/pq-code-package/mlkem-native/pull/1545)), and replacement of the Keccak-f1600 x4 C intrinsics with formally verified AVX2 assembly from s2n-bignum ([#1576](https://github.com/pq-code-package/mlkem-native/pull/1576)).
270
- - **RISC-V RVV**: Native backend for rv64gcv targets using the RISC-V Vector Extension 1.0, providing vectorized NTT,
271
- inverse NTT, polynomial arithmetic, and rejection sampling. NTT and invNTT are for VLEN >= 256, with automatic
272
- fallback to C for VLEN=128. Other functions are VLEN agnostic. ([#1037](https://github.com/pq-code-package/mlkem-native/pull/1037))
273
- - **Armv8.1-M MVE**: Experimental native backend for Cortex-M55 and similar targets, including MVE Keccak-f1600 x4 and baremetal build support for the MPS3 AN547 platform. ([#1220](https://github.com/pq-code-package/mlkem-native/pull/1220), [#1518](https://github.com/pq-code-package/mlkem-native/pull/1518), [#1524](https://github.com/pq-code-package/mlkem-native/pull/1524))
274
-
275
- ### Configuration / API
276
-
277
- - `MLK_CONFIG_CUSTOM_ALLOC_FREE`: Custom allocation/deallocation for large internal structures, for systems with limited stack space. ([#1389](https://github.com/pq-code-package/mlkem-native/pull/1389))
278
- - `MLK_CONFIG_CONTEXT_PARAMETER`: Add opaque context parameter to top-level API, passed through to custom alloc/free
279
- routines enabled via `MLK_CONFIG_CUSTOM_ALLOC_FREE`. Useful for applications without global allocator context. ([#1467](https://github.com/pq-code-package/mlkem-native/pull/1467))
280
- - `MLK_CONFIG_NO_RANDOMIZED_API`: Build only the deterministic (`_derand`) API. ([#1185](https://github.com/pq-code-package/mlkem-native/pull/1185))
281
- - `MLK_CONFIG_SERIAL_FIPS202_ONLY`: Disable 4x-batched FIPS-202, allowing use of a simpler serial-only FIPS-202 backend. ([#1231](https://github.com/pq-code-package/mlkem-native/pull/1231))
282
- - Runtime backend dispatch based on a custom CPU capabilities function. ([#1152](https://github.com/pq-code-package/mlkem-native/pull/1152))
283
- - `randombytes()` may now return an error code, which is propagated through the KEM API. ([#1331](https://github.com/pq-code-package/mlkem-native/pull/1331))
284
- - `mlk_kem_check_pk()` / `mlk_kem_check_sk()` added to the public API for FIPS 203 modulus and hash checks. ([#1216](https://github.com/pq-code-package/mlkem-native/pull/1216))
285
- - C++ compatibility for `mlkem_native.h`. ([#1465](https://github.com/pq-code-package/mlkem-native/pull/1465))
286
- - `MLK_CONFIG_CUSTOM_MEMCPY` / `MLK_CONFIG_CUSTOM_MEMSET`: Custom replacements for `memcpy` and `memset`. ([#1105](https://github.com/pq-code-package/mlkem-native/pull/1105))
287
-
288
- ### Testing
289
-
290
- - Wycheproof test suite for ML-KEM test vector validation. ([#1588](https://github.com/pq-code-package/mlkem-native/pull/1588))
291
- - Unit test framework for internal functions with native backend consistency checks. ([#1188](https://github.com/pq-code-package/mlkem-native/pull/1188))
292
- - Allocation failure testing, RNG failure testing, stack usage measurement, and unaligned buffer testing.
293
- - Baremetal testing on AVR (16-bit) and AArch64-virt (no MMU).
294
-
295
- mlkem-native v1.0.0
296
- ==================
297
-
298
- Release notes
299
- -------------
300
-
301
- v1.0.0 is the first stable release of mlkem-native, a secure, fast and portable C90 implementation of [ML-KEM](https://csrc.nist.gov/pubs/fips/203/final) derived from the ML-KEM reference implementation. mlkem-native v1.0.0 offers:
302
- * High maintainability and extensibility through modular frontend/backend design.
303
- * High performance through Arch64 and AVX2 assembly backends and the use of the [SLOTHY super-optimizer](https://github.com/slothy-optimizer/slothy).
304
- * High assurance through memory- and type-safety proofs for the C frontend + backend, functional correctness proofs for all AArch64 assembly, and extensive constant-time testing.
305
-
306
- mlkem-native-v1.0.0 is uniformly licensed Apache-2.0 OR MIT OR ISC, giving consumers the choice to use any of these licenses.
307
-
308
- What's New
309
- ----------
310
-
311
- Compared to [v1.0.0-beta](https://github.com/pq-code-package/mlkem-native/releases/tag/v1.0.0-beta) the following
312
- major improvements have been integrated into mlkem-native:
313
-
314
- - Completion of functional correctness proofs of the AArch64 backend
315
- - Uniform licensing of all code in mlkem/* under Apache-2.0 OR ISC OR MIT
316
- - Numerous configuration option improvements
317
- - Numerous documentation improvements
318
-
319
- See the full change log here: https://github.com/pq-code-package/mlkem-native/compare/v1.0.0-beta...v1.0.0
9
+ mlkem-native v2.1.0 adds further backends, reduces RAM usage, and
10
+ strengthens the trust anchor for its verification artifacts.
11
+
12
+ See the [full change log](https://github.com/pq-code-package/mlkem-native/compare/v2.0.0...58721ebde4b682bb3384ef7d11333e4f0ddb0164)
13
+ and the [v2.0.0 release notes](https://github.com/pq-code-package/mlkem-native/blob/v2.0.0/RELEASE.md).
14
+
15
+ Backends
16
+ --------
17
+
18
+ - **x86_64.** A new FIPS 202 backend accelerates Keccak on AVX-512 targets.
19
+ If a custom runtime check rejects AVX-512, the AVX-512 routines fall back
20
+ to C. If you require a portable build applying AVX-512, AVX2 or C backend
21
+ as applicable to the host, you currently need to write custom dispatch logic.
22
+ ([#2018](https://github.com/pq-code-package/mlkem-native/pull/2018))
23
+
24
+ The speedup varies by CPU. Across ML-KEM-1024 key generation, encapsulation,
25
+ and decapsulation, EC2 benchmarks show about 11–16% fewer cycles on AMD c7a
26
+ and 16–23% fewer on Intel c7i and c8i.
27
+ ([Benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/))
28
+
29
+ - **AArch64.** Neon implementations of polynomial compression,
30
+ decompression, and decoding complete the arithmetic backend.
31
+ ([#2000](https://github.com/pq-code-package/mlkem-native/pull/2000))
32
+
33
+ For ML-KEM-1024 on Graviton3 and Graviton4 (EC2 c7g and c8g),
34
+ encapsulation uses about 4% fewer cycles and decapsulation uses about 6% fewer.
35
+ On a Cortex-A76 (Raspberry Pi 5), the reductions are about 3% and 6%.
36
+ ([Benchmarks](https://pq-code-package.github.io/mlkem-native/dev/bench/))
37
+
38
+ RAM usage
39
+ ---------
40
+
41
+ The AArch64 rejection sampler now writes coefficients directly to its
42
+ output buffer, removing its 576-byte stack allocation.
43
+ ([#2025](https://github.com/pq-code-package/mlkem-native/pull/2025))
44
+
45
+ Trust
46
+ -----
47
+
48
+ With new proofs being primarily written by AI, the soundness of verification
49
+ is of increasing importance.
50
+
51
+ v2.1 introduces proof capture and replay using [HOLTrace](https://holtrace.cr.yp.to/)
52
+ to remove the need to review and trust HOL Light proof scripts. In particular, this
53
+ detects proof scripts that cheat by adding new axioms, bypassing the kernel, or using
54
+ non-standard definitions. See [hol_trace/README.md](proofs/hol_light/hol_trace/README.md)
55
+ and [SOUNDNESS.md](SOUNDNESS.md) for details.
56
+ ([#1972](https://github.com/pq-code-package/mlkem-native/pull/1972))
57
+
58
+ Further, all 64-bit CBMC proof harnesses are now checked against at least two solvers.
59
+ This reduces reliance on any single solver and thereby reduces the likelihood of
60
+ soundness issues. ([#1959](https://github.com/pq-code-package/mlkem-native/pull/1959))
61
+
62
+ Bug fixes
63
+ ---------
64
+
65
+ - **AArch64 alignment.** Fixed alignment faults in the rejection sampler on
66
+ targets that require aligned accesses.
67
+ ([#2025](https://github.com/pq-code-package/mlkem-native/pull/2025))
68
+ - **Decapsulation.** Keep intermediate secret values out of the caller's
69
+ output buffer.
70
+ ([issue #1909](https://github.com/pq-code-package/mlkem-native/issues/1909),
71
+ [#1995](https://github.com/pq-code-package/mlkem-native/pull/1995))