pq_crypto 0.4.2 → 0.5.0

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 (408) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/GET_STARTED.md +21 -16
  4. data/README.md +26 -0
  5. data/SECURITY.md +22 -16
  6. data/ext/pqcrypto/extconf.rb +148 -99
  7. data/ext/pqcrypto/mldsa_api.h +1 -118
  8. data/ext/pqcrypto/mlkem_api.h +1 -42
  9. data/ext/pqcrypto/pq_externalmu.c +88 -216
  10. data/ext/pqcrypto/pqcrypto_native_api.h +129 -0
  11. data/ext/pqcrypto/pqcrypto_ruby_secure.c +0 -3
  12. data/ext/pqcrypto/pqcrypto_secure.c +135 -117
  13. data/ext/pqcrypto/pqcrypto_secure.h +1 -42
  14. data/ext/pqcrypto/pqcrypto_version.h +1 -1
  15. data/ext/pqcrypto/randombytes.h +9 -0
  16. data/ext/pqcrypto/vendor/.vendored +10 -5
  17. data/ext/pqcrypto/vendor/mldsa-native/BUILDING.md +105 -0
  18. data/ext/pqcrypto/vendor/mldsa-native/LICENSE +286 -0
  19. data/ext/pqcrypto/vendor/mldsa-native/META.yml +24 -0
  20. data/ext/pqcrypto/vendor/mldsa-native/README.md +221 -0
  21. data/ext/pqcrypto/vendor/mldsa-native/SECURITY.md +8 -0
  22. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.c +721 -0
  23. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.h +975 -0
  24. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_asm.S +724 -0
  25. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_config.h +723 -0
  26. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/cbmc.h +166 -0
  27. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/common.h +321 -0
  28. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.c +21 -0
  29. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.h +385 -0
  30. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.c +73 -0
  31. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.h +130 -0
  32. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.c +277 -0
  33. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.h +244 -0
  34. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +182 -0
  35. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +117 -0
  36. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +438 -0
  37. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +105 -0
  38. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +71 -0
  39. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +62 -0
  40. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S +376 -0
  41. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S +204 -0
  42. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S +259 -0
  43. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S +1077 -0
  44. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S +987 -0
  45. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +41 -0
  46. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +26 -0
  47. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +35 -0
  48. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +37 -0
  49. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +27 -0
  50. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +36 -0
  51. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/api.h +69 -0
  52. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/README.md +10 -0
  53. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +32 -0
  54. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +20 -0
  55. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +638 -0
  56. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +136 -0
  57. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +52 -0
  58. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +29 -0
  59. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.c +488 -0
  60. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.h +16 -0
  61. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/xkcp.h +31 -0
  62. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +247 -0
  63. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +231 -0
  64. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +150 -0
  65. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/intt.S +753 -0
  66. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4.S +129 -0
  67. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5.S +145 -0
  68. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7.S +177 -0
  69. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/ntt.S +653 -0
  70. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/pointwise_montgomery.S +79 -0
  71. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_caddq_asm.S +53 -0
  72. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_chknorm_asm.S +55 -0
  73. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_32_asm.S +85 -0
  74. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_88_asm.S +85 -0
  75. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_32_asm.S +102 -0
  76. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_88_asm.S +110 -0
  77. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_17_asm.S +72 -0
  78. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_19_asm.S +69 -0
  79. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +40 -0
  80. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_asm.S +189 -0
  81. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta2_asm.S +135 -0
  82. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta4_asm.S +128 -0
  83. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +543 -0
  84. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +62 -0
  85. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/api.h +649 -0
  86. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/meta.h +23 -0
  87. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +315 -0
  88. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +124 -0
  89. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +157 -0
  90. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +27 -0
  91. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/intt.S +2311 -0
  92. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/ntt.S +2383 -0
  93. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/nttunpack.S +239 -0
  94. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise.S +131 -0
  95. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l4.S +139 -0
  96. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l5.S +155 -0
  97. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l7.S +187 -0
  98. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_caddq_avx2.c +61 -0
  99. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_chknorm_avx2.c +52 -0
  100. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_32_avx2.c +155 -0
  101. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_88_avx2.c +155 -0
  102. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_32_avx2.c +102 -0
  103. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_88_avx2.c +104 -0
  104. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_17_avx2.c +91 -0
  105. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_19_avx2.c +93 -0
  106. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_avx2.c +126 -0
  107. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta2_avx2.c +155 -0
  108. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta4_avx2.c +139 -0
  109. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +160 -0
  110. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.c +293 -0
  111. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.h +224 -0
  112. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/params.h +77 -0
  113. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.c +991 -0
  114. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.h +393 -0
  115. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.c +946 -0
  116. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.h +360 -0
  117. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.c +877 -0
  118. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.h +725 -0
  119. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/randombytes.h +26 -0
  120. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/reduce.h +139 -0
  121. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/rounding.h +249 -0
  122. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.c +1511 -0
  123. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.h +806 -0
  124. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/symmetric.h +68 -0
  125. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sys.h +268 -0
  126. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/zetas.inc +55 -0
  127. data/ext/pqcrypto/vendor/mlkem-native/BUILDING.md +104 -0
  128. data/ext/pqcrypto/vendor/mlkem-native/LICENSE +294 -0
  129. data/ext/pqcrypto/vendor/mlkem-native/META.yml +30 -0
  130. data/ext/pqcrypto/vendor/mlkem-native/README.md +223 -0
  131. data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +86 -0
  132. data/ext/pqcrypto/vendor/mlkem-native/SECURITY.md +8 -0
  133. data/ext/pqcrypto/vendor/mlkem-native/mlkem/README.md +23 -0
  134. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +660 -0
  135. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +538 -0
  136. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +681 -0
  137. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +709 -0
  138. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/cbmc.h +174 -0
  139. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +274 -0
  140. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +717 -0
  141. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +688 -0
  142. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.c +64 -0
  143. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.h +128 -0
  144. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.c +251 -0
  145. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +158 -0
  146. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.c +208 -0
  147. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.h +80 -0
  148. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +463 -0
  149. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.h +98 -0
  150. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/auto.h +70 -0
  151. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h +69 -0
  152. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S +375 -0
  153. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S +203 -0
  154. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S +258 -0
  155. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S +1076 -0
  156. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S +986 -0
  157. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +46 -0
  158. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_scalar.h +25 -0
  159. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_v84a.h +34 -0
  160. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x2_v84a.h +35 -0
  161. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h +26 -0
  162. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +35 -0
  163. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/api.h +117 -0
  164. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/README.md +10 -0
  165. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/mve.h +79 -0
  166. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h +35 -0
  167. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +667 -0
  168. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +40 -0
  169. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +51 -0
  170. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +290 -0
  171. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +314 -0
  172. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/auto.h +28 -0
  173. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +33 -0
  174. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h +41 -0
  175. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2.S +451 -0
  176. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccakf1600_constants.c +51 -0
  177. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +622 -0
  178. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.h +156 -0
  179. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.c +446 -0
  180. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +326 -0
  181. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/README.md +16 -0
  182. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +122 -0
  183. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/aarch64_zetas.c +174 -0
  184. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +177 -0
  185. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/intt.S +628 -0
  186. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/ntt.S +562 -0
  187. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_mulcache_compute_asm.S +127 -0
  188. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_reduce_asm.S +150 -0
  189. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_tobytes_asm.S +117 -0
  190. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_tomont_asm.S +98 -0
  191. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S +261 -0
  192. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S +314 -0
  193. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S +368 -0
  194. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_asm.S +226 -0
  195. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_table.c +542 -0
  196. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +637 -0
  197. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +25 -0
  198. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/README.md +11 -0
  199. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/meta.h +128 -0
  200. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/arith_native_riscv64.h +45 -0
  201. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.c +81 -0
  202. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.h +145 -0
  203. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_izetas.inc +27 -0
  204. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +805 -0
  205. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_zetas.inc +27 -0
  206. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_zetas_basemul.inc +39 -0
  207. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/README.md +4 -0
  208. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/meta.h +304 -0
  209. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +309 -0
  210. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.c +94 -0
  211. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.h +45 -0
  212. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.c +102 -0
  213. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.h +25 -0
  214. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/intt.S +719 -0
  215. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mulcache_compute.S +90 -0
  216. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/ntt.S +639 -0
  217. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/nttfrombytes.S +193 -0
  218. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/ntttobytes.S +181 -0
  219. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/nttunpack.S +174 -0
  220. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d10.S +382 -0
  221. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d11.S +448 -0
  222. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d4.S +163 -0
  223. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d5.S +220 -0
  224. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d10.S +228 -0
  225. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d11.S +277 -0
  226. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d4.S +180 -0
  227. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d5.S +192 -0
  228. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S +502 -0
  229. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S +750 -0
  230. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S +998 -0
  231. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/reduce.S +218 -0
  232. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_asm.S +103 -0
  233. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_table.c +544 -0
  234. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/tomont.S +155 -0
  235. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/params.h +76 -0
  236. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.c +572 -0
  237. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.h +317 -0
  238. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +502 -0
  239. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +668 -0
  240. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/randombytes.h +60 -0
  241. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.c +362 -0
  242. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.h +118 -0
  243. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/symmetric.h +70 -0
  244. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +260 -0
  245. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.c +20 -0
  246. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +464 -0
  247. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/zetas.inc +30 -0
  248. data/lib/pq_crypto/version.rb +1 -1
  249. data/lib/pq_crypto.rb +1 -1
  250. data/script/vendor_libs.rb +88 -159
  251. metadata +236 -160
  252. data/ext/pqcrypto/vendor/pqclean/common/aes.c +0 -639
  253. data/ext/pqcrypto/vendor/pqclean/common/aes.h +0 -64
  254. data/ext/pqcrypto/vendor/pqclean/common/compat.h +0 -73
  255. data/ext/pqcrypto/vendor/pqclean/common/crypto_declassify.h +0 -7
  256. data/ext/pqcrypto/vendor/pqclean/common/fips202.c +0 -928
  257. data/ext/pqcrypto/vendor/pqclean/common/fips202.h +0 -166
  258. data/ext/pqcrypto/vendor/pqclean/common/keccak2x/feat.S +0 -168
  259. data/ext/pqcrypto/vendor/pqclean/common/keccak2x/fips202x2.c +0 -684
  260. data/ext/pqcrypto/vendor/pqclean/common/keccak2x/fips202x2.h +0 -60
  261. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/KeccakP-1600-times4-SIMD256.c +0 -1028
  262. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/KeccakP-1600-times4-SnP.h +0 -50
  263. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/KeccakP-1600-unrolling.macros +0 -198
  264. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/Makefile +0 -8
  265. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/Makefile.Microsoft_nmake +0 -8
  266. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/SIMD256-config.h +0 -3
  267. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/align.h +0 -34
  268. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/brg_endian.h +0 -142
  269. data/ext/pqcrypto/vendor/pqclean/common/nistseedexpander.c +0 -101
  270. data/ext/pqcrypto/vendor/pqclean/common/nistseedexpander.h +0 -39
  271. data/ext/pqcrypto/vendor/pqclean/common/randombytes.c +0 -355
  272. data/ext/pqcrypto/vendor/pqclean/common/randombytes.h +0 -27
  273. data/ext/pqcrypto/vendor/pqclean/common/sha2.c +0 -769
  274. data/ext/pqcrypto/vendor/pqclean/common/sha2.h +0 -173
  275. data/ext/pqcrypto/vendor/pqclean/common/sp800-185.c +0 -156
  276. data/ext/pqcrypto/vendor/pqclean/common/sp800-185.h +0 -27
  277. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/LICENSE +0 -5
  278. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/Makefile +0 -19
  279. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/Makefile.Microsoft_nmake +0 -23
  280. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/api.h +0 -18
  281. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/cbd.c +0 -83
  282. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/cbd.h +0 -11
  283. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/indcpa.c +0 -327
  284. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/indcpa.h +0 -22
  285. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/kem.c +0 -164
  286. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/kem.h +0 -23
  287. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/ntt.c +0 -146
  288. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/ntt.h +0 -14
  289. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/params.h +0 -36
  290. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/poly.c +0 -311
  291. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/poly.h +0 -37
  292. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/polyvec.c +0 -198
  293. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/polyvec.h +0 -26
  294. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/reduce.c +0 -41
  295. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/reduce.h +0 -13
  296. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/symmetric-shake.c +0 -71
  297. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/symmetric.h +0 -30
  298. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/verify.c +0 -67
  299. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/verify.h +0 -13
  300. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/LICENSE +0 -5
  301. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/Makefile +0 -19
  302. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/Makefile.Microsoft_nmake +0 -23
  303. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/api.h +0 -18
  304. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/cbd.c +0 -108
  305. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/cbd.h +0 -11
  306. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/indcpa.c +0 -327
  307. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/indcpa.h +0 -22
  308. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/kem.c +0 -164
  309. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/kem.h +0 -23
  310. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/ntt.c +0 -146
  311. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/ntt.h +0 -14
  312. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/params.h +0 -36
  313. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/poly.c +0 -299
  314. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/poly.h +0 -37
  315. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/polyvec.c +0 -188
  316. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/polyvec.h +0 -26
  317. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/reduce.c +0 -41
  318. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/reduce.h +0 -13
  319. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/symmetric-shake.c +0 -71
  320. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/symmetric.h +0 -30
  321. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/verify.c +0 -67
  322. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/verify.h +0 -13
  323. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/LICENSE +0 -5
  324. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/Makefile +0 -19
  325. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/Makefile.Microsoft_nmake +0 -23
  326. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/api.h +0 -18
  327. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/cbd.c +0 -83
  328. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/cbd.h +0 -11
  329. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/indcpa.c +0 -327
  330. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/indcpa.h +0 -22
  331. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/kem.c +0 -164
  332. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/kem.h +0 -23
  333. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/ntt.c +0 -146
  334. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/ntt.h +0 -14
  335. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/params.h +0 -36
  336. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/poly.c +0 -299
  337. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/poly.h +0 -37
  338. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/polyvec.c +0 -188
  339. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/polyvec.h +0 -26
  340. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/reduce.c +0 -41
  341. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/reduce.h +0 -13
  342. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/symmetric-shake.c +0 -71
  343. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/symmetric.h +0 -30
  344. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/verify.c +0 -67
  345. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/verify.h +0 -13
  346. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/LICENSE +0 -5
  347. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/Makefile +0 -19
  348. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/Makefile.Microsoft_nmake +0 -23
  349. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/api.h +0 -50
  350. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/ntt.c +0 -98
  351. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/ntt.h +0 -10
  352. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/packing.c +0 -261
  353. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/packing.h +0 -31
  354. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/params.h +0 -44
  355. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/poly.c +0 -848
  356. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/poly.h +0 -52
  357. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/polyvec.c +0 -415
  358. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/polyvec.h +0 -65
  359. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/reduce.c +0 -69
  360. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/reduce.h +0 -17
  361. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/rounding.c +0 -98
  362. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/rounding.h +0 -14
  363. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/sign.c +0 -407
  364. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/sign.h +0 -47
  365. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/symmetric-shake.c +0 -26
  366. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/symmetric.h +0 -34
  367. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/LICENSE +0 -5
  368. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/Makefile +0 -19
  369. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/Makefile.Microsoft_nmake +0 -23
  370. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/api.h +0 -50
  371. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/ntt.c +0 -98
  372. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/ntt.h +0 -10
  373. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/packing.c +0 -261
  374. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/packing.h +0 -31
  375. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/params.h +0 -44
  376. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/poly.c +0 -799
  377. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/poly.h +0 -52
  378. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/polyvec.c +0 -415
  379. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/polyvec.h +0 -65
  380. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/reduce.c +0 -69
  381. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/reduce.h +0 -17
  382. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/rounding.c +0 -92
  383. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/rounding.h +0 -14
  384. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/sign.c +0 -407
  385. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/sign.h +0 -47
  386. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/symmetric-shake.c +0 -26
  387. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/symmetric.h +0 -34
  388. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/LICENSE +0 -5
  389. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/Makefile +0 -19
  390. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/Makefile.Microsoft_nmake +0 -23
  391. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/api.h +0 -50
  392. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/ntt.c +0 -98
  393. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/ntt.h +0 -10
  394. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/packing.c +0 -261
  395. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/packing.h +0 -31
  396. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/params.h +0 -44
  397. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/poly.c +0 -823
  398. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/poly.h +0 -52
  399. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/polyvec.c +0 -415
  400. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/polyvec.h +0 -65
  401. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/reduce.c +0 -69
  402. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/reduce.h +0 -17
  403. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/rounding.c +0 -92
  404. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/rounding.h +0 -14
  405. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/sign.c +0 -407
  406. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/sign.h +0 -47
  407. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/symmetric-shake.c +0 -26
  408. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/symmetric.h +0 -34
@@ -0,0 +1,753 @@
1
+ /* Copyright (c) 2022 Arm Limited
2
+ * Copyright (c) 2022 Hanno Becker
3
+ * Copyright (c) 2023 Amin Abdulrahman, Matthias Kannwischer
4
+ * Copyright (c) The mlkem-native project authors
5
+ * Copyright (c) The mldsa-native project authors
6
+ * SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
7
+ */
8
+
9
+ /* References
10
+ * ==========
11
+ *
12
+ * - [NeonNTT]
13
+ * Neon NTT: Faster Dilithium, Kyber, and Saber on Cortex-A72 and Apple M1
14
+ * Becker, Hwang, Kannwischer, Yang, Yang
15
+ * https://eprint.iacr.org/2021/986
16
+ *
17
+ * - [SLOTHY_Paper]
18
+ * Fast and Clean: Auditable high-performance assembly via constraint solving
19
+ * Abdulrahman, Becker, Kannwischer, Klein
20
+ * https://eprint.iacr.org/2022/1303
21
+ */
22
+
23
+ /* AArch64 ML-DSA inverse NTT following @[NeonNTT] and @[SLOTHY_Paper] */
24
+
25
+ #include "../../../common.h"
26
+ #if defined(MLD_ARITH_BACKEND_AARCH64) && !defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
27
+
28
+ /*
29
+ * WARNING: This file is auto-derived from the mldsa-native source file
30
+ * dev/aarch64_opt/src/intt.S using scripts/simpasm. Do not modify it directly.
31
+ */
32
+
33
+ #if defined(__ELF__)
34
+ .section .note.GNU-stack,"",@progbits
35
+ #endif
36
+
37
+ .text
38
+ .balign 4
39
+ .global MLD_ASM_NAMESPACE(intt_asm)
40
+ MLD_ASM_FN_SYMBOL(intt_asm)
41
+
42
+ .cfi_startproc
43
+ sub sp, sp, #0x40
44
+ .cfi_adjust_cfa_offset 0x40
45
+ stp d8, d9, [sp]
46
+ .cfi_rel_offset d8, 0x0
47
+ .cfi_rel_offset d9, 0x8
48
+ stp d10, d11, [sp, #0x10]
49
+ .cfi_rel_offset d10, 0x10
50
+ .cfi_rel_offset d11, 0x18
51
+ stp d12, d13, [sp, #0x20]
52
+ .cfi_rel_offset d12, 0x20
53
+ .cfi_rel_offset d13, 0x28
54
+ stp d14, d15, [sp, #0x30]
55
+ .cfi_rel_offset d14, 0x30
56
+ .cfi_rel_offset d15, 0x38
57
+ mov w5, #0xe001 // =57345
58
+ movk w5, #0x7f, lsl #16
59
+ dup v31.4s, w5
60
+ mov x3, x0
61
+ mov x4, #0x10 // =16
62
+ ldr q27, [x3, #0x10]
63
+ ldr q18, [x3]
64
+ ldr q3, [x3, #0x20]
65
+ ldr q13, [x3, #0x30]
66
+ ldr q2, [x1, #0x30]
67
+ ldr q8, [x3, #0x70]
68
+ ldr q21, [x3, #0x60]
69
+ trn1 v10.4s, v18.4s, v27.4s
70
+ trn2 v23.4s, v18.4s, v27.4s
71
+ trn1 v6.4s, v3.4s, v13.4s
72
+ trn2 v18.4s, v3.4s, v13.4s
73
+ ldr q12, [x1, #0x50]
74
+ ldr q17, [x1, #0x40]
75
+ trn2 v29.2d, v10.2d, v6.2d
76
+ trn2 v14.2d, v23.2d, v18.2d
77
+ trn1 v10.2d, v10.2d, v6.2d
78
+ trn1 v26.2d, v23.2d, v18.2d
79
+ sub v3.4s, v29.4s, v14.4s
80
+ trn1 v13.4s, v21.4s, v8.4s
81
+ ldr q6, [x1, #0x10]
82
+ add v24.4s, v10.4s, v26.4s
83
+ sub v30.4s, v10.4s, v26.4s
84
+ sqrdmulh v12.4s, v3.4s, v12.4s
85
+ ldr q9, [x1, #0x20]
86
+ sqrdmulh v5.4s, v30.4s, v2.4s
87
+ mul v4.4s, v3.4s, v17.4s
88
+ ldr q3, [x3, #0x50]
89
+ add v10.4s, v29.4s, v14.4s
90
+ ldr q26, [x3, #0x40]
91
+ mul v15.4s, v30.4s, v9.4s
92
+ trn2 v30.4s, v21.4s, v8.4s
93
+ sub v21.4s, v24.4s, v10.4s
94
+ add v29.4s, v24.4s, v10.4s
95
+ mls v15.4s, v5.4s, v31.s[0]
96
+ ldr q16, [x1], #0x60
97
+ trn2 v10.4s, v26.4s, v3.4s
98
+ mls v4.4s, v12.4s, v31.s[0]
99
+ trn1 v3.4s, v26.4s, v3.4s
100
+ ldr q0, [x1, #0x50]
101
+ trn2 v25.2d, v10.2d, v30.2d
102
+ sqrdmulh v12.4s, v21.4s, v6.4s
103
+ trn2 v1.2d, v3.2d, v13.2d
104
+ mul v21.4s, v21.4s, v16.4s
105
+ sub v23.4s, v1.4s, v25.4s
106
+ sub v2.4s, v15.4s, v4.4s
107
+ add v20.4s, v15.4s, v4.4s
108
+ sqrdmulh v4.4s, v23.4s, v0.4s
109
+ trn1 v7.2d, v3.2d, v13.2d
110
+ sqrdmulh v3.4s, v2.4s, v6.4s
111
+ trn1 v15.2d, v10.2d, v30.2d
112
+ mls v21.4s, v12.4s, v31.s[0]
113
+ ldr q12, [x1, #0x30]
114
+ sub v13.4s, v7.4s, v15.4s
115
+ mul v10.4s, v2.4s, v16.4s
116
+ ldr q16, [x1, #0x40]
117
+ ldr q5, [x1, #0x20]
118
+ mls v10.4s, v3.4s, v31.s[0]
119
+ trn2 v11.4s, v29.4s, v20.4s
120
+ sqrdmulh v2.4s, v13.4s, v12.4s
121
+ ldr d9, [x2], #0x20
122
+ mul v17.4s, v13.4s, v5.4s
123
+ trn1 v24.4s, v29.4s, v20.4s
124
+ trn1 v12.4s, v21.4s, v10.4s
125
+ trn2 v10.4s, v21.4s, v10.4s
126
+ mul v22.4s, v23.4s, v16.4s
127
+ ldur q26, [x2, #-0x10]
128
+ trn1 v13.2d, v24.2d, v12.2d
129
+ trn1 v3.2d, v11.2d, v10.2d
130
+ mls v17.4s, v2.4s, v31.s[0]
131
+ mls v22.4s, v4.4s, v31.s[0]
132
+ sub v23.4s, v13.4s, v3.4s
133
+ trn2 v10.2d, v11.2d, v10.2d
134
+ sqrdmulh v0.4s, v23.4s, v26.s[1]
135
+ trn2 v21.2d, v24.2d, v12.2d
136
+ mul v29.4s, v23.4s, v26.s[0]
137
+ sub v23.4s, v21.4s, v10.4s
138
+ sqrdmulh v8.4s, v23.4s, v26.s[3]
139
+ add v6.4s, v1.4s, v25.4s
140
+ add v11.4s, v21.4s, v10.4s
141
+ mls v29.4s, v0.4s, v31.s[0]
142
+ add v30.4s, v13.4s, v3.4s
143
+ ldr q2, [x1, #0x10]
144
+ mul v3.4s, v23.4s, v26.s[2]
145
+ add v12.4s, v7.4s, v15.4s
146
+ mls v3.4s, v8.4s, v31.s[0]
147
+ sub v13.4s, v30.4s, v11.4s
148
+ sub v21.4s, v12.4s, v6.4s
149
+ add v26.4s, v17.4s, v22.4s
150
+ sqrdmulh v28.4s, v13.4s, v9.s[1]
151
+ mul v18.4s, v13.4s, v9.s[0]
152
+ sub v8.4s, v29.4s, v3.4s
153
+ sqrdmulh v24.4s, v21.4s, v2.4s
154
+ add v15.4s, v30.4s, v11.4s
155
+ add v10.4s, v29.4s, v3.4s
156
+ add v14.4s, v12.4s, v6.4s
157
+ sqrdmulh v16.4s, v8.4s, v9.s[1]
158
+ sub v3.4s, v17.4s, v22.4s
159
+ mul v8.4s, v8.4s, v9.s[0]
160
+ ldr q17, [x1], #0x60
161
+ sub x4, x4, #0x2
162
+
163
+ Lintt_layer5678_start:
164
+ ldr d4, [x2], #0x20
165
+ mul v0.4s, v21.4s, v17.4s
166
+ ldr q7, [x3, #0xa0]
167
+ ldr q27, [x3, #0xb0]
168
+ mls v8.4s, v16.4s, v31.s[0]
169
+ ldr q29, [x3, #0x80]
170
+ trn1 v9.4s, v14.4s, v26.4s
171
+ ldr q25, [x3, #0x90]
172
+ mls v0.4s, v24.4s, v31.s[0]
173
+ str q15, [x3], #0x40
174
+ trn1 v1.4s, v7.4s, v27.4s
175
+ ldr q15, [x1, #0x50]
176
+ trn2 v12.4s, v7.4s, v27.4s
177
+ sqrdmulh v16.4s, v3.4s, v2.4s
178
+ trn1 v21.4s, v29.4s, v25.4s
179
+ stur q8, [x3, #-0x10]
180
+ trn2 v19.4s, v29.4s, v25.4s
181
+ mls v18.4s, v28.4s, v31.s[0]
182
+ ldr q22, [x1, #0x30]
183
+ trn2 v13.2d, v21.2d, v1.2d
184
+ trn2 v5.2d, v19.2d, v12.2d
185
+ mul v23.4s, v3.4s, v17.4s
186
+ trn1 v17.2d, v21.2d, v1.2d
187
+ ldr q29, [x1, #0x40]
188
+ mls v23.4s, v16.4s, v31.s[0]
189
+ sub v30.4s, v13.4s, v5.4s
190
+ trn1 v24.2d, v19.2d, v12.2d
191
+ stur q10, [x3, #-0x30]
192
+ sqrdmulh v16.4s, v30.4s, v15.4s
193
+ ldr q10, [x1, #0x20]
194
+ trn2 v12.4s, v14.4s, v26.4s
195
+ stur q18, [x3, #-0x20]
196
+ mul v11.4s, v30.4s, v29.4s
197
+ sub v8.4s, v17.4s, v24.4s
198
+ trn1 v20.4s, v0.4s, v23.4s
199
+ ldr q2, [x1, #0x10]
200
+ trn2 v26.4s, v0.4s, v23.4s
201
+ sqrdmulh v19.4s, v8.4s, v22.4s
202
+ ldur q14, [x2, #-0x10]
203
+ trn1 v21.2d, v9.2d, v20.2d
204
+ mul v8.4s, v8.4s, v10.4s
205
+ trn1 v6.2d, v12.2d, v26.2d
206
+ trn2 v0.2d, v9.2d, v20.2d
207
+ mls v11.4s, v16.4s, v31.s[0]
208
+ sub v7.4s, v21.4s, v6.4s
209
+ trn2 v28.2d, v12.2d, v26.2d
210
+ add v10.4s, v21.4s, v6.4s
211
+ mul v18.4s, v7.4s, v14.s[0]
212
+ add v20.4s, v13.4s, v5.4s
213
+ sqrdmulh v30.4s, v7.4s, v14.s[1]
214
+ sub v21.4s, v0.4s, v28.4s
215
+ add v13.4s, v0.4s, v28.4s
216
+ add v9.4s, v17.4s, v24.4s
217
+ sqrdmulh v1.4s, v21.4s, v14.s[3]
218
+ ldr q17, [x1], #0x60
219
+ mul v14.4s, v21.4s, v14.s[2]
220
+ sub v21.4s, v9.4s, v20.4s
221
+ mls v18.4s, v30.4s, v31.s[0]
222
+ mls v14.4s, v1.4s, v31.s[0]
223
+ mls v8.4s, v19.4s, v31.s[0]
224
+ sub v3.4s, v10.4s, v13.4s
225
+ add v15.4s, v10.4s, v13.4s
226
+ sqrdmulh v28.4s, v3.4s, v4.s[1]
227
+ add v10.4s, v18.4s, v14.4s
228
+ sub v19.4s, v18.4s, v14.4s
229
+ mul v18.4s, v3.4s, v4.s[0]
230
+ sub v3.4s, v8.4s, v11.4s
231
+ add v26.4s, v8.4s, v11.4s
232
+ sqrdmulh v16.4s, v19.4s, v4.s[1]
233
+ add v14.4s, v9.4s, v20.4s
234
+ mul v8.4s, v19.4s, v4.s[0]
235
+ sqrdmulh v24.4s, v21.4s, v2.4s
236
+ subs x4, x4, #0x1
237
+ cbnz x4, Lintt_layer5678_start
238
+ sqrdmulh v19.4s, v3.4s, v2.4s
239
+ trn2 v0.4s, v14.4s, v26.4s
240
+ str q15, [x3], #0x40
241
+ trn1 v30.4s, v14.4s, v26.4s
242
+ mul v26.4s, v21.4s, v17.4s
243
+ stur q10, [x3, #-0x30]
244
+ ldr d29, [x2], #0x20
245
+ mls v26.4s, v24.4s, v31.s[0]
246
+ mul v10.4s, v3.4s, v17.4s
247
+ ldur q14, [x2, #-0x10]
248
+ mls v10.4s, v19.4s, v31.s[0]
249
+ mls v8.4s, v16.4s, v31.s[0]
250
+ trn2 v22.4s, v26.4s, v10.4s
251
+ trn1 v25.4s, v26.4s, v10.4s
252
+ trn1 v1.2d, v30.2d, v25.2d
253
+ trn1 v2.2d, v0.2d, v22.2d
254
+ trn2 v13.2d, v30.2d, v25.2d
255
+ trn2 v7.2d, v0.2d, v22.2d
256
+ mls v18.4s, v28.4s, v31.s[0]
257
+ sub v22.4s, v1.4s, v2.4s
258
+ add v3.4s, v13.4s, v7.4s
259
+ sqrdmulh v27.4s, v22.4s, v14.s[1]
260
+ sub v4.4s, v13.4s, v7.4s
261
+ stur q8, [x3, #-0x10]
262
+ sqrdmulh v0.4s, v4.4s, v14.s[3]
263
+ add v16.4s, v1.4s, v2.4s
264
+ stur q18, [x3, #-0x20]
265
+ mul v23.4s, v4.4s, v14.s[2]
266
+ add v4.4s, v16.4s, v3.4s
267
+ sub v17.4s, v16.4s, v3.4s
268
+ mul v14.4s, v22.4s, v14.s[0]
269
+ str q4, [x3], #0x40
270
+ mls v23.4s, v0.4s, v31.s[0]
271
+ mls v14.4s, v27.4s, v31.s[0]
272
+ mul v11.4s, v17.4s, v29.s[0]
273
+ sqrdmulh v10.4s, v17.4s, v29.s[1]
274
+ sub v0.4s, v14.4s, v23.4s
275
+ add v6.4s, v14.4s, v23.4s
276
+ sqrdmulh v12.4s, v0.4s, v29.s[1]
277
+ mul v0.4s, v0.4s, v29.s[0]
278
+ stur q6, [x3, #-0x30]
279
+ mls v11.4s, v10.4s, v31.s[0]
280
+ mls v0.4s, v12.4s, v31.s[0]
281
+ stur q11, [x3, #-0x20]
282
+ stur q0, [x3, #-0x10]
283
+ mov w5, #0x3ffe // =16382
284
+ dup v29.4s, w5
285
+ mov w5, #0xe03 // =3587
286
+ movk w5, #0x40, lsl #16
287
+ dup v30.4s, w5
288
+ mov x4, #0x4 // =4
289
+ ldr q0, [x2], #0x80
290
+ ldur q1, [x2, #-0x70]
291
+ ldur q2, [x2, #-0x60]
292
+ ldur q3, [x2, #-0x50]
293
+ ldur q4, [x2, #-0x40]
294
+ ldur q5, [x2, #-0x30]
295
+ ldur q6, [x2, #-0x20]
296
+ ldur q7, [x2, #-0x10]
297
+ ldr q8, [x0, #0xc0]
298
+ ldr q27, [x0, #0x80]
299
+ ldr q20, [x0, #0x1c0]
300
+ ldr q23, [x0, #0x180]
301
+ ldr q24, [x0, #0x3c0]
302
+ ldr q28, [x0, #0x40]
303
+ ldr q25, [x0, #0x340]
304
+ ldr q10, [x0, #0x380]
305
+ sub v15.4s, v27.4s, v8.4s
306
+ ldr q26, [x0]
307
+ ldr q18, [x0, #0x300]
308
+ add v9.4s, v23.4s, v20.4s
309
+ mul v11.4s, v15.4s, v4.s[0]
310
+ sub v19.4s, v23.4s, v20.4s
311
+ sub v22.4s, v10.4s, v24.4s
312
+ ldr q13, [x0, #0x240]
313
+ sqrdmulh v12.4s, v15.4s, v4.s[1]
314
+ sub v14.4s, v26.4s, v28.4s
315
+ ldr q17, [x0, #0x200]
316
+ add v23.4s, v18.4s, v25.4s
317
+ sqrdmulh v15.4s, v14.4s, v3.s[3]
318
+ sub v18.4s, v18.4s, v25.4s
319
+ mul v25.4s, v14.4s, v3.s[2]
320
+ sub v16.4s, v17.4s, v13.4s
321
+ mls v11.4s, v12.4s, v31.s[0]
322
+ add v21.4s, v10.4s, v24.4s
323
+ mls v25.4s, v15.4s, v31.s[0]
324
+ mul v12.4s, v16.4s, v5.s[2]
325
+ sub v10.4s, v23.4s, v21.4s
326
+ sqrdmulh v14.4s, v10.4s, v3.s[1]
327
+ add v23.4s, v23.4s, v21.4s
328
+ add v27.4s, v27.4s, v8.4s
329
+ mul v15.4s, v10.4s, v3.s[0]
330
+ add v24.4s, v25.4s, v11.4s
331
+ sub v10.4s, v25.4s, v11.4s
332
+ ldr q25, [x0, #0x100]
333
+ sqrdmulh v8.4s, v18.4s, v6.s[3]
334
+ add v21.4s, v26.4s, v28.4s
335
+ ldr q26, [x0, #0x140]
336
+ sqrdmulh v20.4s, v16.4s, v5.s[3]
337
+ sqrdmulh v28.4s, v22.4s, v7.s[1]
338
+ add v11.4s, v25.4s, v26.4s
339
+ mls v15.4s, v14.4s, v31.s[0]
340
+ add v17.4s, v17.4s, v13.4s
341
+ mul v13.4s, v22.4s, v7.s[0]
342
+ ldr q14, [x0, #0x280]
343
+ ldr q22, [x0, #0x2c0]
344
+ mls v13.4s, v28.4s, v31.s[0]
345
+ sub v16.4s, v25.4s, v26.4s
346
+ sub v28.4s, v21.4s, v27.4s
347
+ mls v12.4s, v20.4s, v31.s[0]
348
+ add v20.4s, v11.4s, v9.4s
349
+ add v26.4s, v14.4s, v22.4s
350
+ sub v14.4s, v14.4s, v22.4s
351
+ sqrdmulh v22.4s, v28.4s, v1.s[3]
352
+ sub v9.4s, v11.4s, v9.4s
353
+ mul v25.4s, v14.4s, v6.s[0]
354
+ sub v11.4s, v17.4s, v26.4s
355
+ add v17.4s, v17.4s, v26.4s
356
+ add v26.4s, v21.4s, v27.4s
357
+ sqrdmulh v27.4s, v11.4s, v2.s[3]
358
+ mul v21.4s, v11.4s, v2.s[2]
359
+ mul v11.4s, v18.4s, v6.s[2]
360
+ mls v11.4s, v8.4s, v31.s[0]
361
+ sqrdmulh v8.4s, v14.4s, v6.s[1]
362
+ add v18.4s, v26.4s, v20.4s
363
+ mls v21.4s, v27.4s, v31.s[0]
364
+ sub v27.4s, v17.4s, v23.4s
365
+ mul v14.4s, v28.4s, v1.s[2]
366
+ sub v28.4s, v26.4s, v20.4s
367
+ add v23.4s, v17.4s, v23.4s
368
+ mls v25.4s, v8.4s, v31.s[0]
369
+ add v26.4s, v21.4s, v15.4s
370
+ sub v15.4s, v21.4s, v15.4s
371
+ mul v8.4s, v19.4s, v5.s[0]
372
+ mls v14.4s, v22.4s, v31.s[0]
373
+ sub v22.4s, v11.4s, v13.4s
374
+ sub v20.4s, v12.4s, v25.4s
375
+ add v21.4s, v12.4s, v25.4s
376
+ sqrdmulh v12.4s, v22.4s, v3.s[1]
377
+ mul v17.4s, v16.4s, v4.s[2]
378
+ sqrdmulh v25.4s, v16.4s, v4.s[3]
379
+ add v16.4s, v11.4s, v13.4s
380
+ mul v11.4s, v22.4s, v3.s[0]
381
+ sqrdmulh v19.4s, v19.4s, v5.s[1]
382
+ sqrdmulh v22.4s, v15.4s, v1.s[1]
383
+ sqrdmulh v13.4s, v20.4s, v2.s[3]
384
+ mul v20.4s, v20.4s, v2.s[2]
385
+ mls v11.4s, v12.4s, v31.s[0]
386
+ mls v20.4s, v13.4s, v31.s[0]
387
+ sub v13.4s, v18.4s, v23.4s
388
+ add v23.4s, v18.4s, v23.4s
389
+ mls v17.4s, v25.4s, v31.s[0]
390
+ mls v8.4s, v19.4s, v31.s[0]
391
+ sub v18.4s, v20.4s, v11.4s
392
+ add v20.4s, v20.4s, v11.4s
393
+ sqrdmulh v12.4s, v9.4s, v2.s[1]
394
+ mul v15.4s, v15.4s, v1.s[0]
395
+ sub v11.4s, v17.4s, v8.4s
396
+ mls v15.4s, v22.4s, v31.s[0]
397
+ add v19.4s, v17.4s, v8.4s
398
+ sqrdmulh v25.4s, v11.4s, v2.s[1]
399
+ add v17.4s, v24.4s, v19.4s
400
+ sub v24.4s, v24.4s, v19.4s
401
+ mul v19.4s, v11.4s, v2.s[0]
402
+ sqrdmulh v8.4s, v24.4s, v0.s[3]
403
+ mls v19.4s, v25.4s, v31.s[0]
404
+ mul v25.4s, v9.4s, v2.s[0]
405
+ sub x4, x4, #0x1
406
+
407
+ Lintt_layer1234_start:
408
+ sub v22.4s, v21.4s, v16.4s
409
+ mls v25.4s, v12.4s, v31.s[0]
410
+ add v12.4s, v21.4s, v16.4s
411
+ mul v9.4s, v24.4s, v0.s[2]
412
+ mls v9.4s, v8.4s, v31.s[0]
413
+ sub v16.4s, v14.4s, v25.4s
414
+ add v14.4s, v14.4s, v25.4s
415
+ sqrdmulh v24.4s, v22.4s, v1.s[1]
416
+ sub v11.4s, v14.4s, v26.4s
417
+ sqrdmulh v21.4s, v16.4s, v0.s[3]
418
+ add v25.4s, v14.4s, v26.4s
419
+ mul v14.4s, v22.4s, v1.s[0]
420
+ mls v14.4s, v24.4s, v31.s[0]
421
+ mul v16.4s, v16.4s, v0.s[2]
422
+ mls v16.4s, v21.4s, v31.s[0]
423
+ add v24.4s, v9.4s, v14.4s
424
+ sqrdmulh v21.4s, v25.4s, v30.4s
425
+ sqrdmulh v26.4s, v11.4s, v0.s[1]
426
+ mul v8.4s, v25.4s, v29.4s
427
+ mls v8.4s, v21.4s, v31.s[0]
428
+ mul v25.4s, v24.4s, v29.4s
429
+ mul v22.4s, v11.4s, v0.s[0]
430
+ sub v11.4s, v17.4s, v12.4s
431
+ str q8, [x0, #0x80]
432
+ sub v8.4s, v9.4s, v14.4s
433
+ add v14.4s, v16.4s, v15.4s
434
+ sqrdmulh v9.4s, v11.4s, v0.s[1]
435
+ sub v21.4s, v16.4s, v15.4s
436
+ mls v22.4s, v26.4s, v31.s[0]
437
+ mul v15.4s, v11.4s, v0.s[0]
438
+ mls v15.4s, v9.4s, v31.s[0]
439
+ add v11.4s, v17.4s, v12.4s
440
+ mul v16.4s, v10.4s, v1.s[2]
441
+ str q22, [x0, #0x280]
442
+ sqrdmulh v26.4s, v10.4s, v1.s[3]
443
+ str q15, [x0, #0x240]
444
+ sqrdmulh v9.4s, v8.4s, v0.s[1]
445
+ mul v12.4s, v8.4s, v0.s[0]
446
+ mls v16.4s, v26.4s, v31.s[0]
447
+ sqrdmulh v10.4s, v27.4s, v1.s[1]
448
+ sqrdmulh v15.4s, v14.4s, v30.4s
449
+ add v22.4s, v16.4s, v19.4s
450
+ sub v19.4s, v16.4s, v19.4s
451
+ mls v12.4s, v9.4s, v31.s[0]
452
+ add v8.4s, v22.4s, v20.4s
453
+ sub v26.4s, v22.4s, v20.4s
454
+ mul v27.4s, v27.4s, v1.s[0]
455
+ sqrdmulh v17.4s, v11.4s, v30.4s
456
+ mls v27.4s, v10.4s, v31.s[0]
457
+ mul v20.4s, v11.4s, v29.4s
458
+ sqrdmulh v22.4s, v24.4s, v30.4s
459
+ mls v20.4s, v17.4s, v31.s[0]
460
+ mul v14.4s, v14.4s, v29.4s
461
+ sqrdmulh v16.4s, v23.4s, v30.4s
462
+ str q20, [x0, #0x40]
463
+ sqrdmulh v11.4s, v21.4s, v0.s[1]
464
+ sqrdmulh v20.4s, v28.4s, v0.s[3]
465
+ mul v17.4s, v23.4s, v29.4s
466
+ mul v23.4s, v28.4s, v0.s[2]
467
+ mls v17.4s, v16.4s, v31.s[0]
468
+ mul v10.4s, v21.4s, v0.s[0]
469
+ str q12, [x0, #0x340]
470
+ mls v25.4s, v22.4s, v31.s[0]
471
+ str q17, [x0], #0x10
472
+ ldr q17, [x0, #0x2c0]
473
+ mls v14.4s, v15.4s, v31.s[0]
474
+ ldr q12, [x0, #0x200]
475
+ sqrdmulh v16.4s, v13.4s, v0.s[1]
476
+ str q25, [x0, #0x130]
477
+ mul v28.4s, v13.4s, v0.s[0]
478
+ ldr q13, [x0, #0x240]
479
+ str q14, [x0, #0x170]
480
+ mul v14.4s, v18.4s, v1.s[0]
481
+ mls v28.4s, v16.4s, v31.s[0]
482
+ ldr q21, [x0, #0xc0]
483
+ mls v10.4s, v11.4s, v31.s[0]
484
+ mls v23.4s, v20.4s, v31.s[0]
485
+ str q28, [x0, #0x1f0]
486
+ ldr q11, [x0, #0x300]
487
+ sqrdmulh v28.4s, v18.4s, v1.s[1]
488
+ str q10, [x0, #0x370]
489
+ mul v16.4s, v19.4s, v0.s[2]
490
+ sqrdmulh v19.4s, v19.4s, v0.s[3]
491
+ sqrdmulh v10.4s, v26.4s, v0.s[1]
492
+ add v18.4s, v12.4s, v13.4s
493
+ sub v12.4s, v12.4s, v13.4s
494
+ mls v16.4s, v19.4s, v31.s[0]
495
+ ldr q9, [x0, #0x280]
496
+ ldr q20, [x0, #0x380]
497
+ add v24.4s, v23.4s, v27.4s
498
+ sub v25.4s, v23.4s, v27.4s
499
+ mul v19.4s, v26.4s, v0.s[0]
500
+ mls v14.4s, v28.4s, v31.s[0]
501
+ add v13.4s, v9.4s, v17.4s
502
+ sub v28.4s, v18.4s, v13.4s
503
+ mls v19.4s, v10.4s, v31.s[0]
504
+ sqrdmulh v23.4s, v25.4s, v0.s[1]
505
+ mul v15.4s, v25.4s, v0.s[0]
506
+ str q19, [x0, #0x2b0]
507
+ ldr q19, [x0, #0x80]
508
+ sqrdmulh v22.4s, v8.4s, v30.4s
509
+ mls v15.4s, v23.4s, v31.s[0]
510
+ add v26.4s, v16.4s, v14.4s
511
+ mul v10.4s, v8.4s, v29.4s
512
+ add v8.4s, v18.4s, v13.4s
513
+ sqrdmulh v13.4s, v26.4s, v30.4s
514
+ str q15, [x0, #0x2f0]
515
+ sub v18.4s, v9.4s, v17.4s
516
+ mul v27.4s, v26.4s, v29.4s
517
+ sqrdmulh v23.4s, v12.4s, v5.s[3]
518
+ mls v27.4s, v13.4s, v31.s[0]
519
+ mul v25.4s, v18.4s, v6.s[0]
520
+ sqrdmulh v13.4s, v18.4s, v6.s[1]
521
+ str q27, [x0, #0x1b0]
522
+ sub v27.4s, v19.4s, v21.4s
523
+ add v21.4s, v19.4s, v21.4s
524
+ mul v18.4s, v12.4s, v5.s[2]
525
+ sub v9.4s, v16.4s, v14.4s
526
+ mul v26.4s, v24.4s, v29.4s
527
+ ldr q12, [x0, #0x3c0]
528
+ mls v25.4s, v13.4s, v31.s[0]
529
+ sub v16.4s, v20.4s, v12.4s
530
+ sqrdmulh v17.4s, v24.4s, v30.4s
531
+ mul v13.4s, v16.4s, v7.s[0]
532
+ mls v18.4s, v23.4s, v31.s[0]
533
+ mls v26.4s, v17.4s, v31.s[0]
534
+ sqrdmulh v17.4s, v9.4s, v0.s[1]
535
+ sqrdmulh v24.4s, v16.4s, v7.s[1]
536
+ ldr q16, [x0, #0x340]
537
+ str q26, [x0, #0xf0]
538
+ sub v15.4s, v18.4s, v25.4s
539
+ mul v23.4s, v9.4s, v0.s[0]
540
+ ldr q19, [x0, #0x180]
541
+ ldr q14, [x0, #0x1c0]
542
+ sqrdmulh v9.4s, v15.4s, v2.s[3]
543
+ add v20.4s, v20.4s, v12.4s
544
+ add v12.4s, v11.4s, v16.4s
545
+ mul v26.4s, v15.4s, v2.s[2]
546
+ sub v16.4s, v11.4s, v16.4s
547
+ sub v11.4s, v12.4s, v20.4s
548
+ mls v23.4s, v17.4s, v31.s[0]
549
+ add v20.4s, v12.4s, v20.4s
550
+ sub v12.4s, v19.4s, v14.4s
551
+ mul v17.4s, v27.4s, v4.s[0]
552
+ mls v10.4s, v22.4s, v31.s[0]
553
+ add v22.4s, v19.4s, v14.4s
554
+ ldr q14, [x0, #0x40]
555
+ str q23, [x0, #0x3b0]
556
+ sqrdmulh v23.4s, v27.4s, v4.s[1]
557
+ ldr q19, [x0, #0x100]
558
+ ldr q15, [x0, #0x140]
559
+ mls v26.4s, v9.4s, v31.s[0]
560
+ str q10, [x0, #0xb0]
561
+ sqrdmulh v10.4s, v11.4s, v3.s[1]
562
+ sub v27.4s, v8.4s, v20.4s
563
+ mls v13.4s, v24.4s, v31.s[0]
564
+ add v8.4s, v8.4s, v20.4s
565
+ sub v20.4s, v19.4s, v15.4s
566
+ sqrdmulh v9.4s, v16.4s, v6.s[3]
567
+ add v19.4s, v19.4s, v15.4s
568
+ ldr q15, [x0]
569
+ mul v24.4s, v20.4s, v4.s[2]
570
+ mls v17.4s, v23.4s, v31.s[0]
571
+ add v23.4s, v15.4s, v14.4s
572
+ sub v14.4s, v15.4s, v14.4s
573
+ mul v15.4s, v11.4s, v3.s[0]
574
+ sub v11.4s, v23.4s, v21.4s
575
+ mul v16.4s, v16.4s, v6.s[2]
576
+ add v23.4s, v23.4s, v21.4s
577
+ add v21.4s, v18.4s, v25.4s
578
+ sqrdmulh v25.4s, v20.4s, v4.s[3]
579
+ sqrdmulh v18.4s, v12.4s, v5.s[1]
580
+ sqrdmulh v20.4s, v14.4s, v3.s[3]
581
+ mul v12.4s, v12.4s, v5.s[0]
582
+ mls v16.4s, v9.4s, v31.s[0]
583
+ mls v12.4s, v18.4s, v31.s[0]
584
+ mls v24.4s, v25.4s, v31.s[0]
585
+ sub v25.4s, v16.4s, v13.4s
586
+ add v16.4s, v16.4s, v13.4s
587
+ mul v13.4s, v28.4s, v2.s[2]
588
+ sqrdmulh v9.4s, v25.4s, v3.s[1]
589
+ mul v18.4s, v25.4s, v3.s[0]
590
+ sqrdmulh v25.4s, v28.4s, v2.s[3]
591
+ mls v18.4s, v9.4s, v31.s[0]
592
+ mls v15.4s, v10.4s, v31.s[0]
593
+ sub v9.4s, v24.4s, v12.4s
594
+ mul v28.4s, v14.4s, v3.s[2]
595
+ add v12.4s, v24.4s, v12.4s
596
+ mls v28.4s, v20.4s, v31.s[0]
597
+ add v20.4s, v26.4s, v18.4s
598
+ add v24.4s, v19.4s, v22.4s
599
+ mls v13.4s, v25.4s, v31.s[0]
600
+ sub v18.4s, v26.4s, v18.4s
601
+ sqrdmulh v26.4s, v11.4s, v1.s[3]
602
+ add v25.4s, v23.4s, v24.4s
603
+ mul v14.4s, v11.4s, v1.s[2]
604
+ sub v10.4s, v28.4s, v17.4s
605
+ add v17.4s, v28.4s, v17.4s
606
+ sub v28.4s, v23.4s, v24.4s
607
+ sqrdmulh v11.4s, v9.4s, v2.s[1]
608
+ sub v22.4s, v19.4s, v22.4s
609
+ sub v24.4s, v17.4s, v12.4s
610
+ mls v14.4s, v26.4s, v31.s[0]
611
+ add v17.4s, v17.4s, v12.4s
612
+ sqrdmulh v12.4s, v22.4s, v2.s[1]
613
+ sub v23.4s, v13.4s, v15.4s
614
+ add v26.4s, v13.4s, v15.4s
615
+ mul v19.4s, v9.4s, v2.s[0]
616
+ sqrdmulh v9.4s, v23.4s, v1.s[1]
617
+ mul v15.4s, v23.4s, v1.s[0]
618
+ mls v19.4s, v11.4s, v31.s[0]
619
+ sub v13.4s, v25.4s, v8.4s
620
+ mls v15.4s, v9.4s, v31.s[0]
621
+ add v23.4s, v25.4s, v8.4s
622
+ sqrdmulh v8.4s, v24.4s, v0.s[3]
623
+ mul v25.4s, v22.4s, v2.s[0]
624
+ subs x4, x4, #0x1
625
+ cbnz x4, Lintt_layer1234_start
626
+ mul v22.4s, v24.4s, v0.s[2]
627
+ sqrdmulh v9.4s, v23.4s, v30.4s
628
+ mls v25.4s, v12.4s, v31.s[0]
629
+ mul v23.4s, v23.4s, v29.4s
630
+ mls v23.4s, v9.4s, v31.s[0]
631
+ mls v22.4s, v8.4s, v31.s[0]
632
+ sqrdmulh v11.4s, v10.4s, v1.s[3]
633
+ sub v9.4s, v14.4s, v25.4s
634
+ str q23, [x0], #0x10
635
+ mul v23.4s, v10.4s, v1.s[2]
636
+ sqrdmulh v24.4s, v9.4s, v0.s[3]
637
+ mls v23.4s, v11.4s, v31.s[0]
638
+ mul v9.4s, v9.4s, v0.s[2]
639
+ mls v9.4s, v24.4s, v31.s[0]
640
+ sub v24.4s, v23.4s, v19.4s
641
+ add v19.4s, v23.4s, v19.4s
642
+ mul v8.4s, v28.4s, v0.s[2]
643
+ add v23.4s, v14.4s, v25.4s
644
+ mul v11.4s, v13.4s, v0.s[0]
645
+ sub v25.4s, v21.4s, v16.4s
646
+ sub v10.4s, v9.4s, v15.4s
647
+ add v15.4s, v9.4s, v15.4s
648
+ add v16.4s, v21.4s, v16.4s
649
+ sqrdmulh v28.4s, v28.4s, v0.s[3]
650
+ add v9.4s, v23.4s, v26.4s
651
+ add v14.4s, v17.4s, v16.4s
652
+ sqrdmulh v21.4s, v13.4s, v0.s[1]
653
+ sub v13.4s, v17.4s, v16.4s
654
+ mul v16.4s, v14.4s, v29.4s
655
+ sub v12.4s, v23.4s, v26.4s
656
+ mul v17.4s, v13.4s, v0.s[0]
657
+ mls v8.4s, v28.4s, v31.s[0]
658
+ sqrdmulh v28.4s, v14.4s, v30.4s
659
+ sub v14.4s, v19.4s, v20.4s
660
+ add v20.4s, v19.4s, v20.4s
661
+ sqrdmulh v19.4s, v13.4s, v0.s[1]
662
+ sqrdmulh v26.4s, v27.4s, v1.s[1]
663
+ mls v16.4s, v28.4s, v31.s[0]
664
+ sqrdmulh v28.4s, v12.4s, v0.s[1]
665
+ mul v27.4s, v27.4s, v1.s[0]
666
+ str q16, [x0, #0x30]
667
+ mul v12.4s, v12.4s, v0.s[0]
668
+ mls v12.4s, v28.4s, v31.s[0]
669
+ mls v27.4s, v26.4s, v31.s[0]
670
+ sqrdmulh v26.4s, v25.4s, v1.s[1]
671
+ str q12, [x0, #0x270]
672
+ sqrdmulh v12.4s, v14.4s, v0.s[1]
673
+ sub v13.4s, v8.4s, v27.4s
674
+ add v27.4s, v8.4s, v27.4s
675
+ mul v16.4s, v14.4s, v0.s[0]
676
+ mul v8.4s, v20.4s, v29.4s
677
+ mls v16.4s, v12.4s, v31.s[0]
678
+ mul v12.4s, v18.4s, v1.s[0]
679
+ sqrdmulh v14.4s, v20.4s, v30.4s
680
+ str q16, [x0, #0x2b0]
681
+ sqrdmulh v20.4s, v18.4s, v1.s[1]
682
+ mul v25.4s, v25.4s, v1.s[0]
683
+ mls v25.4s, v26.4s, v31.s[0]
684
+ mls v17.4s, v19.4s, v31.s[0]
685
+ mul v18.4s, v9.4s, v29.4s
686
+ add v28.4s, v22.4s, v25.4s
687
+ sqrdmulh v9.4s, v9.4s, v30.4s
688
+ sub v23.4s, v22.4s, v25.4s
689
+ str q17, [x0, #0x230]
690
+ mls v11.4s, v21.4s, v31.s[0]
691
+ mls v8.4s, v14.4s, v31.s[0]
692
+ sqrdmulh v21.4s, v28.4s, v30.4s
693
+ str q11, [x0, #0x1f0]
694
+ mul v17.4s, v28.4s, v29.4s
695
+ str q8, [x0, #0xb0]
696
+ mul v28.4s, v10.4s, v0.s[0]
697
+ mls v17.4s, v21.4s, v31.s[0]
698
+ sqrdmulh v21.4s, v10.4s, v0.s[1]
699
+ mul v8.4s, v15.4s, v29.4s
700
+ str q17, [x0, #0x130]
701
+ sqrdmulh v15.4s, v15.4s, v30.4s
702
+ mul v10.4s, v24.4s, v0.s[2]
703
+ sqrdmulh v24.4s, v24.4s, v0.s[3]
704
+ mls v12.4s, v20.4s, v31.s[0]
705
+ mls v8.4s, v15.4s, v31.s[0]
706
+ mls v10.4s, v24.4s, v31.s[0]
707
+ sqrdmulh v24.4s, v27.4s, v30.4s
708
+ str q8, [x0, #0x170]
709
+ mul v14.4s, v13.4s, v0.s[0]
710
+ sub v16.4s, v10.4s, v12.4s
711
+ sqrdmulh v17.4s, v13.4s, v0.s[1]
712
+ add v10.4s, v10.4s, v12.4s
713
+ mul v13.4s, v27.4s, v29.4s
714
+ sqrdmulh v20.4s, v10.4s, v30.4s
715
+ mls v14.4s, v17.4s, v31.s[0]
716
+ mls v13.4s, v24.4s, v31.s[0]
717
+ sqrdmulh v24.4s, v23.4s, v0.s[1]
718
+ str q14, [x0, #0x2f0]
719
+ sqrdmulh v8.4s, v16.4s, v0.s[1]
720
+ str q13, [x0, #0xf0]
721
+ mls v18.4s, v9.4s, v31.s[0]
722
+ mul v9.4s, v23.4s, v0.s[0]
723
+ mul v14.4s, v16.4s, v0.s[0]
724
+ str q18, [x0, #0x70]
725
+ mul v27.4s, v10.4s, v29.4s
726
+ mls v28.4s, v21.4s, v31.s[0]
727
+ mls v14.4s, v8.4s, v31.s[0]
728
+ mls v27.4s, v20.4s, v31.s[0]
729
+ str q28, [x0, #0x370]
730
+ mls v9.4s, v24.4s, v31.s[0]
731
+ str q14, [x0, #0x3b0]
732
+ str q27, [x0, #0x1b0]
733
+ str q9, [x0, #0x330]
734
+ ldp d8, d9, [sp]
735
+ .cfi_restore d8
736
+ .cfi_restore d9
737
+ ldp d10, d11, [sp, #0x10]
738
+ .cfi_restore d10
739
+ .cfi_restore d11
740
+ ldp d12, d13, [sp, #0x20]
741
+ .cfi_restore d12
742
+ .cfi_restore d13
743
+ ldp d14, d15, [sp, #0x30]
744
+ .cfi_restore d14
745
+ .cfi_restore d15
746
+ add sp, sp, #0x40
747
+ .cfi_adjust_cfa_offset -0x40
748
+ ret
749
+ .cfi_endproc
750
+
751
+ MLD_ASM_FN_SIZE(intt_asm)
752
+
753
+ #endif /* MLD_ARITH_BACKEND_AARCH64 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */