pq_crypto 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/SECURITY.md +7 -0
  4. data/ext/pqcrypto/pqcrypto_version.h +1 -1
  5. data/ext/pqcrypto/vendor/.vendored +7 -7
  6. data/ext/pqcrypto/vendor/mldsa-native/README.md +23 -10
  7. data/ext/pqcrypto/vendor/mldsa-native/mldsa/README.md +23 -0
  8. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.c +114 -58
  9. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.h +498 -461
  10. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_asm.S +145 -85
  11. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_config.h +456 -422
  12. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/cbmc.h +47 -25
  13. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/common.h +26 -14
  14. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.h +56 -81
  15. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.h +17 -24
  16. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.c +33 -40
  17. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.h +67 -87
  18. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +19 -14
  19. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +13 -5
  20. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +84 -10
  21. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +10 -5
  22. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +6 -0
  23. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +22 -15
  24. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +376 -0
  25. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +204 -0
  26. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +259 -0
  27. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +1077 -0
  28. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +987 -0
  29. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +16 -10
  30. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +2 -1
  31. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +1 -1
  32. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +4 -2
  33. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +2 -2
  34. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +1 -1
  35. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/api.h +60 -0
  36. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +48 -0
  37. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +18 -1
  38. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +658 -582
  39. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +5 -100
  40. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +26 -25
  41. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +334 -0
  42. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +355 -0
  43. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +8 -3
  44. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/{xkcp.h → keccak_f1600_x4_avx2.h} +11 -8
  45. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +44 -0
  46. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +454 -0
  47. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccakf1600_constants.c +52 -0
  48. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +37 -28
  49. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +213 -196
  50. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +248 -64
  51. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/intt_aarch64_asm.S +753 -0
  52. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S +129 -0
  53. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S +145 -0
  54. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S +177 -0
  55. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/ntt_aarch64_asm.S +653 -0
  56. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/pointwise_montgomery_aarch64_asm.S +84 -0
  57. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_caddq_aarch64_asm.S +53 -0
  58. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_chknorm_aarch64_asm.S +55 -0
  59. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_32_aarch64_asm.S +86 -0
  60. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_88_aarch64_asm.S +86 -0
  61. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_32_aarch64_asm.S +103 -0
  62. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_88_aarch64_asm.S +111 -0
  63. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_17_aarch64_asm.S +75 -0
  64. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_19_aarch64_asm.S +72 -0
  65. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +23 -11
  66. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_aarch64_asm.S +189 -0
  67. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta2_aarch64_asm.S +137 -0
  68. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta4_aarch64_asm.S +130 -0
  69. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +520 -516
  70. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +34 -33
  71. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/api.h +202 -242
  72. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +25 -17
  73. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +112 -28
  74. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +1 -1
  75. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +1 -1
  76. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/intt_avx2_asm.S +2311 -0
  77. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/ntt_avx2_asm.S +2383 -0
  78. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/nttunpack_avx2_asm.S +238 -0
  79. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l4_avx2_asm.S +139 -0
  80. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l5_avx2_asm.S +155 -0
  81. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l7_avx2_asm.S +187 -0
  82. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_avx2_asm.S +130 -0
  83. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_caddq_avx2_asm.S +190 -0
  84. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_32_avx2.c +6 -4
  85. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_88_avx2.c +6 -4
  86. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_32_avx2.c +9 -8
  87. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_88_avx2.c +10 -9
  88. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_17_avx2.c +8 -5
  89. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_19_avx2.c +8 -5
  90. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta2_avx2.c +6 -4
  91. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta4_avx2.c +6 -4
  92. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +130 -129
  93. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.c +109 -180
  94. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.h +169 -150
  95. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.c +56 -40
  96. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.h +149 -164
  97. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.c +52 -57
  98. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.h +132 -167
  99. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.c +57 -424
  100. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.h +167 -474
  101. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +308 -0
  102. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +653 -0
  103. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/reduce.h +22 -29
  104. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/rounding.h +37 -43
  105. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.c +511 -367
  106. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.h +456 -417
  107. data/ext/pqcrypto/vendor/mlkem-native/README.md +6 -3
  108. data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +22 -0
  109. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +77 -36
  110. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +135 -146
  111. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +116 -72
  112. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +351 -415
  113. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/cbmc.h +43 -20
  114. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +16 -8
  115. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +57 -31
  116. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +260 -349
  117. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.h +17 -24
  118. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.c +35 -37
  119. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +43 -57
  120. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.c +14 -15
  121. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.h +5 -4
  122. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +42 -6
  123. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h +31 -20
  124. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x1_scalar_asm.S → keccak_f1600_x1_scalar_aarch64_asm.S} +10 -10
  125. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x1_v84a_asm.S → keccak_f1600_x1_v84a_aarch64_asm.S} +10 -10
  126. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x2_v84a_asm.S → keccak_f1600_x2_v84a_aarch64_asm.S} +10 -10
  127. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x4_v8a_scalar_hybrid_asm.S → keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S} +10 -10
  128. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S → keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S} +10 -10
  129. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +10 -9
  130. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_scalar.h +2 -1
  131. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_v84a.h +1 -1
  132. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x2_v84a.h +4 -2
  133. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h +2 -2
  134. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +1 -1
  135. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h +2 -1
  136. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +55 -9
  137. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +26 -25
  138. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +58 -14
  139. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +57 -16
  140. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/auto.h +2 -1
  141. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +2 -2
  142. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h +10 -7
  143. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/{keccak_f1600_x4_avx2.S → keccak_f1600_x4_avx2_asm.S} +13 -11
  144. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccakf1600_constants.c +12 -11
  145. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +167 -136
  146. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.h +75 -68
  147. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +135 -157
  148. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +15 -13
  149. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/aarch64_zetas.c +143 -135
  150. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +52 -46
  151. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{intt.S → intt_aarch64_asm.S} +10 -10
  152. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{ntt.S → ntt_aarch64_asm.S} +10 -10
  153. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_mulcache_compute_asm.S → poly_mulcache_compute_aarch64_asm.S} +10 -10
  154. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_reduce_asm.S → poly_reduce_aarch64_asm.S} +10 -10
  155. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tobytes_asm.S → poly_tobytes_aarch64_asm.S} +10 -10
  156. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tomont_asm.S → poly_tomont_aarch64_asm.S} +10 -12
  157. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k2.S → polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S} +10 -10
  158. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k3.S → polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S} +10 -10
  159. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k4.S → polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S} +10 -10
  160. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{rej_uniform_asm.S → rej_uniform_aarch64_asm.S} +12 -12
  161. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_table.c +514 -513
  162. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +254 -253
  163. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +6 -1
  164. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/README.md +6 -0
  165. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/meta.h +77 -0
  166. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/arith_native_ppc64le.h +24 -0
  167. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.c +299 -0
  168. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.h +34 -0
  169. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/intt_ppc_asm.S +3222 -0
  170. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/ntt_ppc_asm.S +1651 -0
  171. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/poly_tomont_ppc_asm.S +294 -0
  172. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/reduce_ppc_asm.S +710 -0
  173. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/meta.h +5 -0
  174. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.c +18 -16
  175. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.h +19 -24
  176. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +53 -65
  177. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/meta.h +20 -20
  178. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +106 -88
  179. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.c +45 -35
  180. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.h +8 -8
  181. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.c +1 -1
  182. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.h +1 -1
  183. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{intt.S → intt_avx2_asm.S} +8 -8
  184. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntt.S → ntt_avx2_asm.S} +8 -8
  185. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttfrombytes.S → nttfrombytes_avx2_asm.S} +8 -8
  186. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntttobytes.S → ntttobytes_avx2_asm.S} +8 -8
  187. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttunpack.S → nttunpack_avx2_asm.S} +8 -8
  188. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d10.S → poly_compress_d10_avx2_asm.S} +9 -9
  189. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d11.S → poly_compress_d11_avx2_asm.S} +9 -9
  190. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d4.S → poly_compress_d4_avx2_asm.S} +9 -9
  191. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d5.S → poly_compress_d5_avx2_asm.S} +9 -9
  192. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d10.S → poly_decompress_d10_avx2_asm.S} +9 -9
  193. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d11.S → poly_decompress_d11_avx2_asm.S} +9 -9
  194. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d4.S → poly_decompress_d4_avx2_asm.S} +9 -9
  195. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d5.S → poly_decompress_d5_avx2_asm.S} +9 -9
  196. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{mulcache_compute.S → poly_mulcache_compute_avx2_asm.S} +8 -8
  197. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k2.S → polyvec_basemul_acc_montgomery_cached_k2_avx2_asm.S} +8 -8
  198. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k3.S → polyvec_basemul_acc_montgomery_cached_k3_avx2_asm.S} +8 -8
  199. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k4.S → polyvec_basemul_acc_montgomery_cached_k4_avx2_asm.S} +8 -8
  200. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{reduce.S → reduce_avx2_asm.S} +8 -8
  201. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{rej_uniform_asm.S → rej_uniform_avx2_asm.S} +9 -9
  202. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_table.c +514 -513
  203. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{tomont.S → tomont_avx2_asm.S} +8 -8
  204. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.c +61 -57
  205. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.h +89 -116
  206. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +31 -32
  207. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +226 -301
  208. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/randombytes.h +21 -29
  209. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.c +68 -63
  210. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.h +37 -48
  211. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +44 -2
  212. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +141 -159
  213. data/lib/pq_crypto/version.rb +1 -1
  214. data/script/vendor_libs.rb +6 -6
  215. metadata +86 -71
  216. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S +0 -376
  217. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S +0 -204
  218. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S +0 -259
  219. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S +0 -1077
  220. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S +0 -987
  221. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.c +0 -488
  222. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.h +0 -16
  223. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/intt.S +0 -753
  224. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4.S +0 -129
  225. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5.S +0 -145
  226. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7.S +0 -177
  227. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/ntt.S +0 -653
  228. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/pointwise_montgomery.S +0 -79
  229. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_caddq_asm.S +0 -53
  230. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_chknorm_asm.S +0 -55
  231. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_32_asm.S +0 -85
  232. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_88_asm.S +0 -85
  233. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_32_asm.S +0 -102
  234. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_88_asm.S +0 -110
  235. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_17_asm.S +0 -72
  236. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_19_asm.S +0 -69
  237. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_asm.S +0 -189
  238. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta2_asm.S +0 -135
  239. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta4_asm.S +0 -128
  240. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/intt.S +0 -2311
  241. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/ntt.S +0 -2383
  242. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/nttunpack.S +0 -239
  243. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise.S +0 -131
  244. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l4.S +0 -139
  245. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l5.S +0 -155
  246. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l7.S +0 -187
  247. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_caddq_avx2.c +0 -61
@@ -20,151 +20,159 @@
20
20
  * Table of zeta values used in the AArch64 forward NTT
21
21
  * See autogen for details.
22
22
  */
23
- MLK_ALIGN const int16_t mlk_aarch64_ntt_zetas_layer12345[] = {
24
- -1600, -15749, -749, -7373, -40, -394, -687, -6762, 630, 6201,
25
- -1432, -14095, 848, 8347, 0, 0, 1062, 10453, 296, 2914,
26
- -882, -8682, 0, 0, -1410, -13879, 1339, 13180, 1476, 14529,
27
- 0, 0, 193, 1900, -283, -2786, 56, 551, 0, 0,
28
- 797, 7845, -1089, -10719, 1333, 13121, 0, 0, -543, -5345,
29
- 1426, 14036, -1235, -12156, 0, 0, -69, -679, 535, 5266,
30
- -447, -4400, 0, 0, 569, 5601, -936, -9213, -450, -4429,
31
- 0, 0, -1583, -15582, -1355, -13338, 821, 8081, 0, 0,
23
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const int16_t
24
+ mlk_aarch64_ntt_zetas_layer12345[80] = {
25
+ -1600, -15749, -749, -7373, -40, -394, -687, -6762, 630, 6201,
26
+ -1432, -14095, 848, 8347, 0, 0, 1062, 10453, 296, 2914,
27
+ -882, -8682, 0, 0, -1410, -13879, 1339, 13180, 1476, 14529,
28
+ 0, 0, 193, 1900, -283, -2786, 56, 551, 0, 0,
29
+ 797, 7845, -1089, -10719, 1333, 13121, 0, 0, -543, -5345,
30
+ 1426, 14036, -1235, -12156, 0, 0, -69, -679, 535, 5266,
31
+ -447, -4400, 0, 0, 569, 5601, -936, -9213, -450, -4429,
32
+ 0, 0, -1583, -15582, -1355, -13338, 821, 8081, 0, 0,
32
33
  };
33
34
 
34
- MLK_ALIGN const int16_t mlk_aarch64_ntt_zetas_layer67[] = {
35
- 289, 289, 331, 331, -76, -76, -1573, -1573, 2845,
36
- 2845, 3258, 3258, -748, -748, -15483, -15483, 17, 17,
37
- 583, 583, 1637, 1637, -1041, -1041, 167, 167, 5739,
38
- 5739, 16113, 16113, -10247, -10247, -568, -568, -680, -680,
39
- 723, 723, 1100, 1100, -5591, -5591, -6693, -6693, 7117,
40
- 7117, 10828, 10828, 1197, 1197, -1025, -1025, -1052, -1052,
41
- -1274, -1274, 11782, 11782, -10089, -10089, -10355, -10355, -12540,
42
- -12540, 1409, 1409, -48, -48, 756, 756, -314, -314,
43
- 13869, 13869, -472, -472, 7441, 7441, -3091, -3091, -667,
44
- -667, 233, 233, -1173, -1173, -279, -279, -6565, -6565,
45
- 2293, 2293, -11546, -11546, -2746, -2746, 650, 650, -1352,
46
- -1352, -816, -816, 632, 632, 6398, 6398, -13308, -13308,
47
- -8032, -8032, 6221, 6221, -1626, -1626, -540, -540, -1482,
48
- -1482, 1461, 1461, -16005, -16005, -5315, -5315, -14588, -14588,
49
- 14381, 14381, 1651, 1651, -1540, -1540, 952, 952, -642,
50
- -642, 16251, 16251, -15159, -15159, 9371, 9371, -6319, -6319,
51
- -464, -464, 33, 33, 1320, 1320, -1414, -1414, -4567,
52
- -4567, 325, 325, 12993, 12993, -13918, -13918, 939, 939,
53
- -892, -892, 733, 733, 268, 268, 9243, 9243, -8780,
54
- -8780, 7215, 7215, 2638, 2638, -1021, -1021, -941, -941,
55
- -992, -992, 641, 641, -10050, -10050, -9262, -9262, -9764,
56
- -9764, 6309, 6309, -1010, -1010, 1435, 1435, 807, 807,
57
- 452, 452, -9942, -9942, 14125, 14125, 7943, 7943, 4449,
58
- 4449, 1584, 1584, -1292, -1292, 375, 375, -1239, -1239,
59
- 15592, 15592, -12717, -12717, 3691, 3691, -12196, -12196, -1031,
60
- -1031, -109, -109, -780, -780, 1645, 1645, -10148, -10148,
61
- -1073, -1073, -7678, -7678, 16192, 16192, 1438, 1438, -461,
62
- -461, 1534, 1534, -927, -927, 14155, 14155, -4538, -4538,
63
- 15099, 15099, -9125, -9125, 1063, 1063, -556, -556, -1230,
64
- -1230, -863, -863, 10463, 10463, -5473, -5473, -12107, -12107,
65
- -8495, -8495, 319, 319, 757, 757, 561, 561, -735,
66
- -735, 3140, 3140, 7451, 7451, 5522, 5522, -7235, -7235,
67
- -682, -682, -712, -712, 1481, 1481, 648, 648, -6713,
68
- -6713, -7008, -7008, 14578, 14578, 6378, 6378, -525, -525,
69
- 403, 403, 1143, 1143, -554, -554, -5168, -5168, 3967,
70
- 3967, 11251, 11251, -5453, -5453, 1092, 1092, 1026, 1026,
71
- -1179, -1179, 886, 886, 10749, 10749, 10099, 10099, -11605,
72
- -11605, 8721, 8721, -855, -855, -219, -219, 1227, 1227,
73
- 910, 910, -8416, -8416, -2156, -2156, 12078, 12078, 8957,
74
- 8957, -1607, -1607, -1455, -1455, -1219, -1219, 885, 885,
75
- -15818, -15818, -14322, -14322, -11999, -11999, 8711, 8711, 1212,
76
- 1212, 1029, 1029, -394, -394, -1175, -1175, 11930, 11930,
77
- 10129, 10129, -3878, -3878, -11566, -11566,
35
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const int16_t
36
+ mlk_aarch64_ntt_zetas_layer67[384] = {
37
+ 289, 289, 331, 331, -76, -76, -1573, -1573, 2845,
38
+ 2845, 3258, 3258, -748, -748, -15483, -15483, 17, 17,
39
+ 583, 583, 1637, 1637, -1041, -1041, 167, 167, 5739,
40
+ 5739, 16113, 16113, -10247, -10247, -568, -568, -680, -680,
41
+ 723, 723, 1100, 1100, -5591, -5591, -6693, -6693, 7117,
42
+ 7117, 10828, 10828, 1197, 1197, -1025, -1025, -1052, -1052,
43
+ -1274, -1274, 11782, 11782, -10089, -10089, -10355, -10355, -12540,
44
+ -12540, 1409, 1409, -48, -48, 756, 756, -314, -314,
45
+ 13869, 13869, -472, -472, 7441, 7441, -3091, -3091, -667,
46
+ -667, 233, 233, -1173, -1173, -279, -279, -6565, -6565,
47
+ 2293, 2293, -11546, -11546, -2746, -2746, 650, 650, -1352,
48
+ -1352, -816, -816, 632, 632, 6398, 6398, -13308, -13308,
49
+ -8032, -8032, 6221, 6221, -1626, -1626, -540, -540, -1482,
50
+ -1482, 1461, 1461, -16005, -16005, -5315, -5315, -14588, -14588,
51
+ 14381, 14381, 1651, 1651, -1540, -1540, 952, 952, -642,
52
+ -642, 16251, 16251, -15159, -15159, 9371, 9371, -6319, -6319,
53
+ -464, -464, 33, 33, 1320, 1320, -1414, -1414, -4567,
54
+ -4567, 325, 325, 12993, 12993, -13918, -13918, 939, 939,
55
+ -892, -892, 733, 733, 268, 268, 9243, 9243, -8780,
56
+ -8780, 7215, 7215, 2638, 2638, -1021, -1021, -941, -941,
57
+ -992, -992, 641, 641, -10050, -10050, -9262, -9262, -9764,
58
+ -9764, 6309, 6309, -1010, -1010, 1435, 1435, 807, 807,
59
+ 452, 452, -9942, -9942, 14125, 14125, 7943, 7943, 4449,
60
+ 4449, 1584, 1584, -1292, -1292, 375, 375, -1239, -1239,
61
+ 15592, 15592, -12717, -12717, 3691, 3691, -12196, -12196, -1031,
62
+ -1031, -109, -109, -780, -780, 1645, 1645, -10148, -10148,
63
+ -1073, -1073, -7678, -7678, 16192, 16192, 1438, 1438, -461,
64
+ -461, 1534, 1534, -927, -927, 14155, 14155, -4538, -4538,
65
+ 15099, 15099, -9125, -9125, 1063, 1063, -556, -556, -1230,
66
+ -1230, -863, -863, 10463, 10463, -5473, -5473, -12107, -12107,
67
+ -8495, -8495, 319, 319, 757, 757, 561, 561, -735,
68
+ -735, 3140, 3140, 7451, 7451, 5522, 5522, -7235, -7235,
69
+ -682, -682, -712, -712, 1481, 1481, 648, 648, -6713,
70
+ -6713, -7008, -7008, 14578, 14578, 6378, 6378, -525, -525,
71
+ 403, 403, 1143, 1143, -554, -554, -5168, -5168, 3967,
72
+ 3967, 11251, 11251, -5453, -5453, 1092, 1092, 1026, 1026,
73
+ -1179, -1179, 886, 886, 10749, 10749, 10099, 10099, -11605,
74
+ -11605, 8721, 8721, -855, -855, -219, -219, 1227, 1227,
75
+ 910, 910, -8416, -8416, -2156, -2156, 12078, 12078, 8957,
76
+ 8957, -1607, -1607, -1455, -1455, -1219, -1219, 885, 885,
77
+ -15818, -15818, -14322, -14322, -11999, -11999, 8711, 8711, 1212,
78
+ 1212, 1029, 1029, -394, -394, -1175, -1175, 11930, 11930,
79
+ 10129, 10129, -3878, -3878, -11566, -11566,
78
80
  };
79
81
 
80
- MLK_ALIGN const int16_t mlk_aarch64_invntt_zetas_layer12345[] = {
81
- 1583, 15582, -821, -8081, 1355, 13338, 0, 0, -569, -5601,
82
- 450, 4429, 936, 9213, 0, 0, 69, 679, 447, 4400,
83
- -535, -5266, 0, 0, 543, 5345, 1235, 12156, -1426, -14036,
84
- 0, 0, -797, -7845, -1333, -13121, 1089, 10719, 0, 0,
85
- -193, -1900, -56, -551, 283, 2786, 0, 0, 1410, 13879,
86
- -1476, -14529, -1339, -13180, 0, 0, -1062, -10453, 882, 8682,
87
- -296, -2914, 0, 0, 1600, 15749, 40, 394, 749, 7373,
88
- -848, -8347, 1432, 14095, -630, -6201, 687, 6762, 0, 0,
82
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const int16_t
83
+ mlk_aarch64_invntt_zetas_layer12345[80] = {
84
+ 1583, 15582, -821, -8081, 1355, 13338, 0, 0, -569,
85
+ -5601, 450, 4429, 936, 9213, 0, 0, 69, 679,
86
+ 447, 4400, -535, -5266, 0, 0, 543, 5345, 1235,
87
+ 12156, -1426, -14036, 0, 0, -797, -7845, -1333, -13121,
88
+ 1089, 10719, 0, 0, -193, -1900, -56, -551, 283,
89
+ 2786, 0, 0, 1410, 13879, -1476, -14529, -1339, -13180,
90
+ 0, 0, -1062, -10453, 882, 8682, -296, -2914, 0,
91
+ 0, 1600, 15749, 40, 394, 749, 7373, -848, -8347,
92
+ 1432, 14095, -630, -6201, 687, 6762, 0, 0,
89
93
  };
90
94
 
91
- MLK_ALIGN const int16_t mlk_aarch64_invntt_zetas_layer67[] = {
92
- -910, -910, -1227, -1227, 219, 219, 855, 855, -8957,
93
- -8957, -12078, -12078, 2156, 2156, 8416, 8416, 1175, 1175,
94
- 394, 394, -1029, -1029, -1212, -1212, 11566, 11566, 3878,
95
- 3878, -10129, -10129, -11930, -11930, -885, -885, 1219, 1219,
96
- 1455, 1455, 1607, 1607, -8711, -8711, 11999, 11999, 14322,
97
- 14322, 15818, 15818, -648, -648, -1481, -1481, 712, 712,
98
- 682, 682, -6378, -6378, -14578, -14578, 7008, 7008, 6713,
99
- 6713, -886, -886, 1179, 1179, -1026, -1026, -1092, -1092,
100
- -8721, -8721, 11605, 11605, -10099, -10099, -10749, -10749, 554,
101
- 554, -1143, -1143, -403, -403, 525, 525, 5453, 5453,
102
- -11251, -11251, -3967, -3967, 5168, 5168, 927, 927, -1534,
103
- -1534, 461, 461, -1438, -1438, 9125, 9125, -15099, -15099,
104
- 4538, 4538, -14155, -14155, 735, 735, -561, -561, -757,
105
- -757, -319, -319, 7235, 7235, -5522, -5522, -7451, -7451,
106
- -3140, -3140, 863, 863, 1230, 1230, 556, 556, -1063,
107
- -1063, 8495, 8495, 12107, 12107, 5473, 5473, -10463, -10463,
108
- -452, -452, -807, -807, -1435, -1435, 1010, 1010, -4449,
109
- -4449, -7943, -7943, -14125, -14125, 9942, 9942, -1645, -1645,
110
- 780, 780, 109, 109, 1031, 1031, -16192, -16192, 7678,
111
- 7678, 1073, 1073, 10148, 10148, 1239, 1239, -375, -375,
112
- 1292, 1292, -1584, -1584, 12196, 12196, -3691, -3691, 12717,
113
- 12717, -15592, -15592, 1414, 1414, -1320, -1320, -33, -33,
114
- 464, 464, 13918, 13918, -12993, -12993, -325, -325, 4567,
115
- 4567, -641, -641, 992, 992, 941, 941, 1021, 1021,
116
- -6309, -6309, 9764, 9764, 9262, 9262, 10050, 10050, -268,
117
- -268, -733, -733, 892, 892, -939, -939, -2638, -2638,
118
- -7215, -7215, 8780, 8780, -9243, -9243, -632, -632, 816,
119
- 816, 1352, 1352, -650, -650, -6221, -6221, 8032, 8032,
120
- 13308, 13308, -6398, -6398, 642, 642, -952, -952, 1540,
121
- 1540, -1651, -1651, 6319, 6319, -9371, -9371, 15159, 15159,
122
- -16251, -16251, -1461, -1461, 1482, 1482, 540, 540, 1626,
123
- 1626, -14381, -14381, 14588, 14588, 5315, 5315, 16005, 16005,
124
- 1274, 1274, 1052, 1052, 1025, 1025, -1197, -1197, 12540,
125
- 12540, 10355, 10355, 10089, 10089, -11782, -11782, 279, 279,
126
- 1173, 1173, -233, -233, 667, 667, 2746, 2746, 11546,
127
- 11546, -2293, -2293, 6565, 6565, 314, 314, -756, -756,
128
- 48, 48, -1409, -1409, 3091, 3091, -7441, -7441, 472,
129
- 472, -13869, -13869, 1573, 1573, 76, 76, -331, -331,
130
- -289, -289, 15483, 15483, 748, 748, -3258, -3258, -2845,
131
- -2845, -1100, -1100, -723, -723, 680, 680, 568, 568,
132
- -10828, -10828, -7117, -7117, 6693, 6693, 5591, 5591, 1041,
133
- 1041, -1637, -1637, -583, -583, -17, -17, 10247, 10247,
134
- -16113, -16113, -5739, -5739, -167, -167,
95
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const int16_t
96
+ mlk_aarch64_invntt_zetas_layer67[384] = {
97
+ -910, -910, -1227, -1227, 219, 219, 855, 855, -8957,
98
+ -8957, -12078, -12078, 2156, 2156, 8416, 8416, 1175, 1175,
99
+ 394, 394, -1029, -1029, -1212, -1212, 11566, 11566, 3878,
100
+ 3878, -10129, -10129, -11930, -11930, -885, -885, 1219, 1219,
101
+ 1455, 1455, 1607, 1607, -8711, -8711, 11999, 11999, 14322,
102
+ 14322, 15818, 15818, -648, -648, -1481, -1481, 712, 712,
103
+ 682, 682, -6378, -6378, -14578, -14578, 7008, 7008, 6713,
104
+ 6713, -886, -886, 1179, 1179, -1026, -1026, -1092, -1092,
105
+ -8721, -8721, 11605, 11605, -10099, -10099, -10749, -10749, 554,
106
+ 554, -1143, -1143, -403, -403, 525, 525, 5453, 5453,
107
+ -11251, -11251, -3967, -3967, 5168, 5168, 927, 927, -1534,
108
+ -1534, 461, 461, -1438, -1438, 9125, 9125, -15099, -15099,
109
+ 4538, 4538, -14155, -14155, 735, 735, -561, -561, -757,
110
+ -757, -319, -319, 7235, 7235, -5522, -5522, -7451, -7451,
111
+ -3140, -3140, 863, 863, 1230, 1230, 556, 556, -1063,
112
+ -1063, 8495, 8495, 12107, 12107, 5473, 5473, -10463, -10463,
113
+ -452, -452, -807, -807, -1435, -1435, 1010, 1010, -4449,
114
+ -4449, -7943, -7943, -14125, -14125, 9942, 9942, -1645, -1645,
115
+ 780, 780, 109, 109, 1031, 1031, -16192, -16192, 7678,
116
+ 7678, 1073, 1073, 10148, 10148, 1239, 1239, -375, -375,
117
+ 1292, 1292, -1584, -1584, 12196, 12196, -3691, -3691, 12717,
118
+ 12717, -15592, -15592, 1414, 1414, -1320, -1320, -33, -33,
119
+ 464, 464, 13918, 13918, -12993, -12993, -325, -325, 4567,
120
+ 4567, -641, -641, 992, 992, 941, 941, 1021, 1021,
121
+ -6309, -6309, 9764, 9764, 9262, 9262, 10050, 10050, -268,
122
+ -268, -733, -733, 892, 892, -939, -939, -2638, -2638,
123
+ -7215, -7215, 8780, 8780, -9243, -9243, -632, -632, 816,
124
+ 816, 1352, 1352, -650, -650, -6221, -6221, 8032, 8032,
125
+ 13308, 13308, -6398, -6398, 642, 642, -952, -952, 1540,
126
+ 1540, -1651, -1651, 6319, 6319, -9371, -9371, 15159, 15159,
127
+ -16251, -16251, -1461, -1461, 1482, 1482, 540, 540, 1626,
128
+ 1626, -14381, -14381, 14588, 14588, 5315, 5315, 16005, 16005,
129
+ 1274, 1274, 1052, 1052, 1025, 1025, -1197, -1197, 12540,
130
+ 12540, 10355, 10355, 10089, 10089, -11782, -11782, 279, 279,
131
+ 1173, 1173, -233, -233, 667, 667, 2746, 2746, 11546,
132
+ 11546, -2293, -2293, 6565, 6565, 314, 314, -756, -756,
133
+ 48, 48, -1409, -1409, 3091, 3091, -7441, -7441, 472,
134
+ 472, -13869, -13869, 1573, 1573, 76, 76, -331, -331,
135
+ -289, -289, 15483, 15483, 748, 748, -3258, -3258, -2845,
136
+ -2845, -1100, -1100, -723, -723, 680, 680, 568, 568,
137
+ -10828, -10828, -7117, -7117, 6693, 6693, 5591, 5591, 1041,
138
+ 1041, -1637, -1637, -583, -583, -17, -17, 10247, 10247,
139
+ -16113, -16113, -5739, -5739, -167, -167,
135
140
  };
136
141
 
137
- MLK_ALIGN const int16_t mlk_aarch64_zetas_mulcache_native[] = {
138
- 17, -17, -568, 568, 583, -583, -680, 680, 1637, -1637, 723,
139
- -723, -1041, 1041, 1100, -1100, 1409, -1409, -667, 667, -48, 48,
140
- 233, -233, 756, -756, -1173, 1173, -314, 314, -279, 279, -1626,
141
- 1626, 1651, -1651, -540, 540, -1540, 1540, -1482, 1482, 952, -952,
142
- 1461, -1461, -642, 642, 939, -939, -1021, 1021, -892, 892, -941,
143
- 941, 733, -733, -992, 992, 268, -268, 641, -641, 1584, -1584,
144
- -1031, 1031, -1292, 1292, -109, 109, 375, -375, -780, 780, -1239,
145
- 1239, 1645, -1645, 1063, -1063, 319, -319, -556, 556, 757, -757,
146
- -1230, 1230, 561, -561, -863, 863, -735, 735, -525, 525, 1092,
147
- -1092, 403, -403, 1026, -1026, 1143, -1143, -1179, 1179, -554, 554,
148
- 886, -886, -1607, 1607, 1212, -1212, -1455, 1455, 1029, -1029, -1219,
149
- 1219, -394, 394, 885, -885, -1175, 1175,
142
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const int16_t
143
+ mlk_aarch64_zetas_mulcache_native[128] = {
144
+ 17, -17, -568, 568, 583, -583, -680, 680, 1637, -1637,
145
+ 723, -723, -1041, 1041, 1100, -1100, 1409, -1409, -667, 667,
146
+ -48, 48, 233, -233, 756, -756, -1173, 1173, -314, 314,
147
+ -279, 279, -1626, 1626, 1651, -1651, -540, 540, -1540, 1540,
148
+ -1482, 1482, 952, -952, 1461, -1461, -642, 642, 939, -939,
149
+ -1021, 1021, -892, 892, -941, 941, 733, -733, -992, 992,
150
+ 268, -268, 641, -641, 1584, -1584, -1031, 1031, -1292, 1292,
151
+ -109, 109, 375, -375, -780, 780, -1239, 1239, 1645, -1645,
152
+ 1063, -1063, 319, -319, -556, 556, 757, -757, -1230, 1230,
153
+ 561, -561, -863, 863, -735, 735, -525, 525, 1092, -1092,
154
+ 403, -403, 1026, -1026, 1143, -1143, -1179, 1179, -554, 554,
155
+ 886, -886, -1607, 1607, 1212, -1212, -1455, 1455, 1029, -1029,
156
+ -1219, 1219, -394, 394, 885, -885, -1175, 1175,
150
157
  };
151
158
 
152
- MLK_ALIGN const int16_t mlk_aarch64_zetas_mulcache_twisted_native[] = {
153
- 167, -167, -5591, 5591, 5739, -5739, -6693, 6693, 16113,
154
- -16113, 7117, -7117, -10247, 10247, 10828, -10828, 13869, -13869,
155
- -6565, 6565, -472, 472, 2293, -2293, 7441, -7441, -11546,
156
- 11546, -3091, 3091, -2746, 2746, -16005, 16005, 16251, -16251,
157
- -5315, 5315, -15159, 15159, -14588, 14588, 9371, -9371, 14381,
158
- -14381, -6319, 6319, 9243, -9243, -10050, 10050, -8780, 8780,
159
- -9262, 9262, 7215, -7215, -9764, 9764, 2638, -2638, 6309,
160
- -6309, 15592, -15592, -10148, 10148, -12717, 12717, -1073, 1073,
161
- 3691, -3691, -7678, 7678, -12196, 12196, 16192, -16192, 10463,
162
- -10463, 3140, -3140, -5473, 5473, 7451, -7451, -12107, 12107,
163
- 5522, -5522, -8495, 8495, -7235, 7235, -5168, 5168, 10749,
164
- -10749, 3967, -3967, 10099, -10099, 11251, -11251, -11605, 11605,
165
- -5453, 5453, 8721, -8721, -15818, 15818, 11930, -11930, -14322,
166
- 14322, 10129, -10129, -11999, 11999, -3878, 3878, 8711, -8711,
167
- -11566, 11566,
159
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const int16_t
160
+ mlk_aarch64_zetas_mulcache_twisted_native[128] = {
161
+ 167, -167, -5591, 5591, 5739, -5739, -6693, 6693, 16113,
162
+ -16113, 7117, -7117, -10247, 10247, 10828, -10828, 13869, -13869,
163
+ -6565, 6565, -472, 472, 2293, -2293, 7441, -7441, -11546,
164
+ 11546, -3091, 3091, -2746, 2746, -16005, 16005, 16251, -16251,
165
+ -5315, 5315, -15159, 15159, -14588, 14588, 9371, -9371, 14381,
166
+ -14381, -6319, 6319, 9243, -9243, -10050, 10050, -8780, 8780,
167
+ -9262, 9262, 7215, -7215, -9764, 9764, 2638, -2638, 6309,
168
+ -6309, 15592, -15592, -10148, 10148, -12717, 12717, -1073, 1073,
169
+ 3691, -3691, -7678, 7678, -12196, 12196, 16192, -16192, 10463,
170
+ -10463, 3140, -3140, -5473, 5473, 7451, -7451, -12107, 12107,
171
+ 5522, -5522, -8495, 8495, -7235, 7235, -5168, 5168, 10749,
172
+ -10749, 3967, -3967, 10099, -10099, 11251, -11251, -11605, 11605,
173
+ -5453, 5453, 8721, -8721, -15818, 15818, 11930, -11930, -14322,
174
+ 14322, 10129, -10129, -11999, 11999, -3878, 3878, 8711, -8711,
175
+ -11566, 11566,
168
176
  };
169
177
 
170
178
  #else /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
@@ -21,19 +21,24 @@
21
21
  MLK_NAMESPACE(aarch64_zetas_mulcache_twisted_native)
22
22
  #define mlk_rej_uniform_table MLK_NAMESPACE(rej_uniform_table)
23
23
 
24
- extern const int16_t mlk_aarch64_ntt_zetas_layer12345[];
25
- extern const int16_t mlk_aarch64_ntt_zetas_layer67[];
26
- extern const int16_t mlk_aarch64_invntt_zetas_layer12345[];
27
- extern const int16_t mlk_aarch64_invntt_zetas_layer67[];
28
- extern const int16_t mlk_aarch64_zetas_mulcache_native[];
29
- extern const int16_t mlk_aarch64_zetas_mulcache_twisted_native[];
30
- extern const uint8_t mlk_rej_uniform_table[];
24
+ MLK_INTERNAL_DATA_DECLARATION const int16_t
25
+ mlk_aarch64_ntt_zetas_layer12345[80];
26
+ MLK_INTERNAL_DATA_DECLARATION const int16_t mlk_aarch64_ntt_zetas_layer67[384];
27
+ MLK_INTERNAL_DATA_DECLARATION const int16_t
28
+ mlk_aarch64_invntt_zetas_layer12345[80];
29
+ MLK_INTERNAL_DATA_DECLARATION const int16_t
30
+ mlk_aarch64_invntt_zetas_layer67[384];
31
+ MLK_INTERNAL_DATA_DECLARATION const int16_t
32
+ mlk_aarch64_zetas_mulcache_native[128];
33
+ MLK_INTERNAL_DATA_DECLARATION const int16_t
34
+ mlk_aarch64_zetas_mulcache_twisted_native[128];
35
+ MLK_INTERNAL_DATA_DECLARATION const uint8_t mlk_rej_uniform_table[4096];
31
36
 
32
- #define mlk_ntt_asm MLK_NAMESPACE(ntt_asm)
33
- void mlk_ntt_asm(int16_t p[256], const int16_t twiddles12345[80],
34
- const int16_t twiddles56[384])
37
+ #define mlk_ntt_aarch64_asm MLK_NAMESPACE(ntt_aarch64_asm)
38
+ void mlk_ntt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80],
39
+ const int16_t twiddles56[384])
35
40
  /* This must be kept in sync with the HOL-Light specification
36
- * in proofs/hol_light/aarch64/proofs/mlkem_ntt.ml */
41
+ * in proofs/hol_light/aarch64/proofs/ntt_aarch64_asm.ml */
37
42
  __contract__(
38
43
  requires(memory_no_alias(p, sizeof(int16_t) * MLKEM_N))
39
44
  requires(array_abs_bound(p, 0, MLKEM_N, 8192))
@@ -45,11 +50,11 @@ __contract__(
45
50
  /* check-magic: on */
46
51
  );
47
52
 
48
- #define mlk_intt_asm MLK_NAMESPACE(intt_asm)
49
- void mlk_intt_asm(int16_t p[256], const int16_t twiddles12345[80],
50
- const int16_t twiddles56[384])
53
+ #define mlk_intt_aarch64_asm MLK_NAMESPACE(intt_aarch64_asm)
54
+ void mlk_intt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80],
55
+ const int16_t twiddles56[384])
51
56
  /* This must be kept in sync with the HOL-Light specification
52
- * in proofs/hol_light/aarch64/proofs/mlkem_intt.ml */
57
+ * in proofs/hol_light/aarch64/proofs/intt_aarch64_asm.ml */
53
58
  __contract__(
54
59
  requires(memory_no_alias(p, sizeof(int16_t) * MLKEM_N))
55
60
  requires(twiddles12345 == mlk_aarch64_invntt_zetas_layer12345)
@@ -60,33 +65,34 @@ __contract__(
60
65
  /* check-magic: on */
61
66
  );
62
67
 
63
- #define mlk_poly_reduce_asm MLK_NAMESPACE(poly_reduce_asm)
64
- void mlk_poly_reduce_asm(int16_t p[256])
68
+ #define mlk_poly_reduce_aarch64_asm MLK_NAMESPACE(poly_reduce_aarch64_asm)
69
+ void mlk_poly_reduce_aarch64_asm(int16_t p[256])
65
70
  /* This must be kept in sync with the HOL-Light specification
66
- * in proofs/hol_light/aarch64/proofs/mlkem_poly_reduce.ml */
71
+ * in proofs/hol_light/aarch64/proofs/poly_reduce_aarch64_asm.ml */
67
72
  __contract__(
68
73
  requires(memory_no_alias(p, sizeof(int16_t) * MLKEM_N))
69
74
  assigns(memory_slice(p, sizeof(int16_t) * MLKEM_N))
70
75
  ensures(array_bound(p, 0, MLKEM_N, 0, MLKEM_Q))
71
76
  );
72
77
 
73
- #define mlk_poly_tomont_asm MLK_NAMESPACE(poly_tomont_asm)
74
- void mlk_poly_tomont_asm(int16_t p[256])
78
+ #define mlk_poly_tomont_aarch64_asm MLK_NAMESPACE(poly_tomont_aarch64_asm)
79
+ void mlk_poly_tomont_aarch64_asm(int16_t p[256])
75
80
  /* This must be kept in sync with the HOL-Light specification
76
- * in proofs/hol_light/aarch64/proofs/mlkem_poly_tomont.ml */
81
+ * in proofs/hol_light/aarch64/proofs/poly_tomont_aarch64_asm.ml */
77
82
  __contract__(
78
83
  requires(memory_no_alias(p, sizeof(int16_t) * MLKEM_N))
79
84
  assigns(memory_slice(p, sizeof(int16_t) * MLKEM_N))
80
85
  ensures(array_abs_bound(p, 0, MLKEM_N, MLKEM_Q))
81
86
  );
82
87
 
83
- #define mlk_poly_mulcache_compute_asm MLK_NAMESPACE(poly_mulcache_compute_asm)
84
- void mlk_poly_mulcache_compute_asm(int16_t cache[128],
85
- const int16_t mlk_poly[256],
86
- const int16_t zetas[128],
87
- const int16_t zetas_twisted[128])
88
+ #define mlk_poly_mulcache_compute_aarch64_asm \
89
+ MLK_NAMESPACE(poly_mulcache_compute_aarch64_asm)
90
+ void mlk_poly_mulcache_compute_aarch64_asm(int16_t cache[128],
91
+ const int16_t mlk_poly[256],
92
+ const int16_t zetas[128],
93
+ const int16_t zetas_twisted[128])
88
94
  /* This must be kept in sync with the HOL-Light specification
89
- * in proofs/hol_light/aarch64/proofs/mlkem_poly_mulcache_compute.ml */
95
+ * in proofs/hol_light/aarch64/proofs/poly_mulcache_compute_aarch64_asm.ml */
90
96
  __contract__(
91
97
  requires(memory_no_alias(cache, sizeof(int16_t) * (MLKEM_N / 2)))
92
98
  requires(memory_no_alias(mlk_poly, sizeof(int16_t) * MLKEM_N))
@@ -96,10 +102,10 @@ __contract__(
96
102
  ensures(array_abs_bound(cache, 0, MLKEM_N/2, MLKEM_Q))
97
103
  );
98
104
 
99
- #define mlk_poly_tobytes_asm MLK_NAMESPACE(poly_tobytes_asm)
100
- void mlk_poly_tobytes_asm(uint8_t r[384], const int16_t a[256])
105
+ #define mlk_poly_tobytes_aarch64_asm MLK_NAMESPACE(poly_tobytes_aarch64_asm)
106
+ void mlk_poly_tobytes_aarch64_asm(uint8_t r[384], const int16_t a[256])
101
107
  /* This must be kept in sync with the HOL-Light specification
102
- * in proofs/hol_light/aarch64/proofs/mlkem_poly_tobytes.ml */
108
+ * in proofs/hol_light/aarch64/proofs/poly_tobytes_aarch64_asm.ml */
103
109
  __contract__(
104
110
  requires(memory_no_alias(r, MLKEM_POLYBYTES))
105
111
  requires(memory_no_alias(a, sizeof(int16_t) * MLKEM_N))
@@ -107,13 +113,13 @@ __contract__(
107
113
  assigns(memory_slice(r, MLKEM_POLYBYTES))
108
114
  );
109
115
 
110
- #define mlk_polyvec_basemul_acc_montgomery_cached_asm_k2 \
111
- MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k2)
112
- void mlk_polyvec_basemul_acc_montgomery_cached_asm_k2(
116
+ #define mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm \
117
+ MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm)
118
+ void mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm(
113
119
  int16_t r[256], const int16_t a[512], const int16_t b[512],
114
120
  const int16_t b_cache[256])
115
121
  /* This must be kept in sync with the HOL-Light specification in
116
- * proofs/hol_light/aarch64/proofs/mlkem_poly_basemul_acc_montgomery_cached_k2.ml.
122
+ * proofs/hol_light/aarch64/proofs/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.ml.
117
123
  */
118
124
  __contract__(
119
125
  requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
@@ -124,13 +130,13 @@ __contract__(
124
130
  assigns(memory_slice(r, sizeof(int16_t) * MLKEM_N))
125
131
  );
126
132
 
127
- #define mlk_polyvec_basemul_acc_montgomery_cached_asm_k3 \
128
- MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k3)
129
- void mlk_polyvec_basemul_acc_montgomery_cached_asm_k3(
133
+ #define mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm \
134
+ MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm)
135
+ void mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm(
130
136
  int16_t r[256], const int16_t a[768], const int16_t b[768],
131
137
  const int16_t b_cache[384])
132
138
  /* This must be kept in sync with the HOL-Light specification in
133
- * proofs/hol_light/aarch64/proofs/mlkem_poly_basemul_acc_montgomery_cached_k3.ml.
139
+ * proofs/hol_light/aarch64/proofs/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.ml.
134
140
  */
135
141
  __contract__(
136
142
  requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
@@ -141,13 +147,13 @@ __contract__(
141
147
  assigns(memory_slice(r, sizeof(int16_t) * MLKEM_N))
142
148
  );
143
149
 
144
- #define mlk_polyvec_basemul_acc_montgomery_cached_asm_k4 \
145
- MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k4)
146
- void mlk_polyvec_basemul_acc_montgomery_cached_asm_k4(
150
+ #define mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm \
151
+ MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm)
152
+ void mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm(
147
153
  int16_t r[256], const int16_t a[1024], const int16_t b[1024],
148
154
  const int16_t b_cache[512])
149
155
  /* This must be kept in sync with the HOL-Light specification in
150
- * proofs/hol_light/aarch64/proofs/mlkem_poly_basemul_acc_montgomery_cached_k4.ml.
156
+ * proofs/hol_light/aarch64/proofs/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.ml.
151
157
  */
152
158
  __contract__(
153
159
  requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
@@ -158,12 +164,12 @@ __contract__(
158
164
  assigns(memory_slice(r, sizeof(int16_t) * MLKEM_N))
159
165
  );
160
166
 
161
- #define mlk_rej_uniform_asm MLK_NAMESPACE(rej_uniform_asm)
167
+ #define mlk_rej_uniform_aarch64_asm MLK_NAMESPACE(rej_uniform_aarch64_asm)
162
168
  MLK_MUST_CHECK_RETURN_VALUE
163
- uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf,
164
- unsigned buflen, const uint8_t table[2048])
169
+ uint64_t mlk_rej_uniform_aarch64_asm(int16_t r[256], const uint8_t *buf,
170
+ unsigned buflen, const uint8_t table[4096])
165
171
  /* This must be kept in sync with the HOL-Light specification
166
- * in proofs/hol_light/aarch64/proofs/mlkem_rej_uniform.ml. */
172
+ * in proofs/hol_light/aarch64/proofs/rej_uniform_aarch64_asm.ml. */
167
173
  __contract__(
168
174
  requires(buflen % 24 == 0)
169
175
  requires(memory_no_alias(buf, buflen))
@@ -20,9 +20,9 @@
20
20
  */
21
21
 
22
22
  /*yaml
23
- Name: intt_asm
23
+ Name: intt_aarch64_asm
24
24
  Description: AArch64 ML-KEM inverse NTT following @[NeonNTT] and @[SLOTHY_Paper]
25
- Signature: void mlk_intt_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
25
+ Signature: void mlk_intt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
26
26
  ABI:
27
27
  x0:
28
28
  type: buffer
@@ -52,17 +52,13 @@
52
52
 
53
53
  /*
54
54
  * WARNING: This file is auto-derived from the mlkem-native source file
55
- * dev/aarch64_opt/src/intt.S using scripts/simpasm. Do not modify it directly.
55
+ * dev/aarch64_opt/src/intt_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
56
56
  */
57
57
 
58
- #if defined(__ELF__)
59
- .section .note.GNU-stack,"",@progbits
60
- #endif
61
-
62
58
  .text
63
59
  .balign 4
64
- .global MLK_ASM_NAMESPACE(intt_asm)
65
- MLK_ASM_FN_SYMBOL(intt_asm)
60
+ .global MLK_ASM_NAMESPACE(intt_aarch64_asm)
61
+ MLK_ASM_FN_SYMBOL(intt_aarch64_asm)
66
62
 
67
63
  .cfi_startproc
68
64
  sub sp, sp, #0x40
@@ -623,6 +619,10 @@ Lintt_layer123_start:
623
619
  ret
624
620
  .cfi_endproc
625
621
 
626
- MLK_ASM_FN_SIZE(intt_asm)
622
+ MLK_ASM_FN_SIZE(intt_aarch64_asm)
627
623
 
628
624
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
625
+
626
+ #if defined(__ELF__)
627
+ .section .note.GNU-stack,"",%progbits
628
+ #endif
@@ -20,9 +20,9 @@
20
20
  */
21
21
 
22
22
  /*yaml
23
- Name: ntt_asm
23
+ Name: ntt_aarch64_asm
24
24
  Description: AArch64 ML-KEM forward NTT following @[NeonNTT] and @[SLOTHY_Paper]
25
- Signature: void mlk_ntt_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
25
+ Signature: void mlk_ntt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
26
26
  ABI:
27
27
  x0:
28
28
  type: buffer
@@ -52,17 +52,13 @@
52
52
 
53
53
  /*
54
54
  * WARNING: This file is auto-derived from the mlkem-native source file
55
- * dev/aarch64_opt/src/ntt.S using scripts/simpasm. Do not modify it directly.
55
+ * dev/aarch64_opt/src/ntt_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
56
56
  */
57
57
 
58
- #if defined(__ELF__)
59
- .section .note.GNU-stack,"",@progbits
60
- #endif
61
-
62
58
  .text
63
59
  .balign 4
64
- .global MLK_ASM_NAMESPACE(ntt_asm)
65
- MLK_ASM_FN_SYMBOL(ntt_asm)
60
+ .global MLK_ASM_NAMESPACE(ntt_aarch64_asm)
61
+ MLK_ASM_FN_SYMBOL(ntt_aarch64_asm)
66
62
 
67
63
  .cfi_startproc
68
64
  sub sp, sp, #0x40
@@ -557,6 +553,10 @@ Lntt_layer4567_start:
557
553
  ret
558
554
  .cfi_endproc
559
555
 
560
- MLK_ASM_FN_SIZE(ntt_asm)
556
+ MLK_ASM_FN_SIZE(ntt_aarch64_asm)
561
557
 
562
558
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
559
+
560
+ #if defined(__ELF__)
561
+ .section .note.GNU-stack,"",%progbits
562
+ #endif