pq_crypto 0.4.2 → 0.5.1

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 (410) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +27 -2
  3. data/CHANGELOG.md +59 -0
  4. data/GET_STARTED.md +21 -16
  5. data/README.md +26 -0
  6. data/SECURITY.md +22 -16
  7. data/ext/pqcrypto/extconf.rb +183 -99
  8. data/ext/pqcrypto/mldsa_api.h +1 -118
  9. data/ext/pqcrypto/mlkem_api.h +1 -42
  10. data/ext/pqcrypto/pq_externalmu.c +88 -216
  11. data/ext/pqcrypto/pqcrypto_native_api.h +132 -0
  12. data/ext/pqcrypto/pqcrypto_ruby_secure.c +234 -12
  13. data/ext/pqcrypto/pqcrypto_secure.c +429 -334
  14. data/ext/pqcrypto/pqcrypto_secure.h +13 -45
  15. data/ext/pqcrypto/pqcrypto_version.h +1 -1
  16. data/ext/pqcrypto/randombytes.h +9 -0
  17. data/ext/pqcrypto/vendor/.vendored +12 -5
  18. data/ext/pqcrypto/vendor/mldsa-native/BUILDING.md +105 -0
  19. data/ext/pqcrypto/vendor/mldsa-native/LICENSE +286 -0
  20. data/ext/pqcrypto/vendor/mldsa-native/META.yml +24 -0
  21. data/ext/pqcrypto/vendor/mldsa-native/README.md +221 -0
  22. data/ext/pqcrypto/vendor/mldsa-native/SECURITY.md +8 -0
  23. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.c +721 -0
  24. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.h +975 -0
  25. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_asm.S +724 -0
  26. data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_config.h +723 -0
  27. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/cbmc.h +166 -0
  28. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/common.h +321 -0
  29. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.c +21 -0
  30. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.h +385 -0
  31. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.c +73 -0
  32. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.h +130 -0
  33. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.c +277 -0
  34. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.h +244 -0
  35. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +182 -0
  36. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +117 -0
  37. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +438 -0
  38. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +105 -0
  39. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +71 -0
  40. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +62 -0
  41. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S +376 -0
  42. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S +204 -0
  43. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S +259 -0
  44. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S +1077 -0
  45. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S +987 -0
  46. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +41 -0
  47. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +26 -0
  48. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +35 -0
  49. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +37 -0
  50. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +27 -0
  51. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +36 -0
  52. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/api.h +69 -0
  53. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/README.md +10 -0
  54. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +32 -0
  55. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +20 -0
  56. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +638 -0
  57. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +136 -0
  58. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +52 -0
  59. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +29 -0
  60. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.c +488 -0
  61. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.h +16 -0
  62. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/xkcp.h +31 -0
  63. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +247 -0
  64. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +231 -0
  65. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +150 -0
  66. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/intt.S +753 -0
  67. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4.S +129 -0
  68. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5.S +145 -0
  69. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7.S +177 -0
  70. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/ntt.S +653 -0
  71. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/pointwise_montgomery.S +79 -0
  72. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_caddq_asm.S +53 -0
  73. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_chknorm_asm.S +55 -0
  74. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_32_asm.S +85 -0
  75. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_88_asm.S +85 -0
  76. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_32_asm.S +102 -0
  77. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_88_asm.S +110 -0
  78. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_17_asm.S +72 -0
  79. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_19_asm.S +69 -0
  80. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +40 -0
  81. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_asm.S +189 -0
  82. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta2_asm.S +135 -0
  83. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta4_asm.S +128 -0
  84. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +543 -0
  85. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +62 -0
  86. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/api.h +649 -0
  87. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/meta.h +23 -0
  88. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +315 -0
  89. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +124 -0
  90. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +157 -0
  91. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +27 -0
  92. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/intt.S +2311 -0
  93. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/ntt.S +2383 -0
  94. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/nttunpack.S +239 -0
  95. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise.S +131 -0
  96. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l4.S +139 -0
  97. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l5.S +155 -0
  98. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l7.S +187 -0
  99. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_caddq_avx2.c +61 -0
  100. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_chknorm_avx2.c +52 -0
  101. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_32_avx2.c +155 -0
  102. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_88_avx2.c +155 -0
  103. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_32_avx2.c +102 -0
  104. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_88_avx2.c +104 -0
  105. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_17_avx2.c +91 -0
  106. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_19_avx2.c +93 -0
  107. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_avx2.c +126 -0
  108. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta2_avx2.c +155 -0
  109. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta4_avx2.c +139 -0
  110. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +160 -0
  111. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.c +293 -0
  112. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.h +224 -0
  113. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/params.h +77 -0
  114. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.c +991 -0
  115. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.h +393 -0
  116. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.c +946 -0
  117. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.h +360 -0
  118. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.c +877 -0
  119. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.h +725 -0
  120. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/randombytes.h +26 -0
  121. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/reduce.h +139 -0
  122. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/rounding.h +249 -0
  123. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.c +1511 -0
  124. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.h +806 -0
  125. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/symmetric.h +68 -0
  126. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sys.h +268 -0
  127. data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/zetas.inc +55 -0
  128. data/ext/pqcrypto/vendor/mlkem-native/BUILDING.md +104 -0
  129. data/ext/pqcrypto/vendor/mlkem-native/LICENSE +294 -0
  130. data/ext/pqcrypto/vendor/mlkem-native/META.yml +30 -0
  131. data/ext/pqcrypto/vendor/mlkem-native/README.md +223 -0
  132. data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +86 -0
  133. data/ext/pqcrypto/vendor/mlkem-native/SECURITY.md +8 -0
  134. data/ext/pqcrypto/vendor/mlkem-native/mlkem/README.md +23 -0
  135. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +660 -0
  136. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +538 -0
  137. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +681 -0
  138. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +709 -0
  139. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/cbmc.h +174 -0
  140. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +274 -0
  141. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +717 -0
  142. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +688 -0
  143. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.c +64 -0
  144. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.h +128 -0
  145. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.c +251 -0
  146. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +158 -0
  147. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.c +208 -0
  148. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.h +80 -0
  149. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +463 -0
  150. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.h +98 -0
  151. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/auto.h +70 -0
  152. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h +69 -0
  153. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S +375 -0
  154. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S +203 -0
  155. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S +258 -0
  156. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S +1076 -0
  157. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S +986 -0
  158. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +46 -0
  159. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_scalar.h +25 -0
  160. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_v84a.h +34 -0
  161. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x2_v84a.h +35 -0
  162. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h +26 -0
  163. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +35 -0
  164. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/api.h +117 -0
  165. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/README.md +10 -0
  166. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/mve.h +79 -0
  167. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h +35 -0
  168. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +667 -0
  169. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +40 -0
  170. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +51 -0
  171. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +290 -0
  172. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +314 -0
  173. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/auto.h +28 -0
  174. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +33 -0
  175. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h +41 -0
  176. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2.S +451 -0
  177. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccakf1600_constants.c +51 -0
  178. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +622 -0
  179. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.h +156 -0
  180. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.c +446 -0
  181. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +326 -0
  182. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/README.md +16 -0
  183. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +122 -0
  184. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/aarch64_zetas.c +174 -0
  185. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +177 -0
  186. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/intt.S +628 -0
  187. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/ntt.S +562 -0
  188. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_mulcache_compute_asm.S +127 -0
  189. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_reduce_asm.S +150 -0
  190. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_tobytes_asm.S +117 -0
  191. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/poly_tomont_asm.S +98 -0
  192. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S +261 -0
  193. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S +314 -0
  194. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S +368 -0
  195. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_asm.S +226 -0
  196. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_table.c +542 -0
  197. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +637 -0
  198. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +25 -0
  199. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/README.md +11 -0
  200. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/meta.h +128 -0
  201. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/arith_native_riscv64.h +45 -0
  202. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.c +81 -0
  203. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.h +145 -0
  204. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_izetas.inc +27 -0
  205. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +805 -0
  206. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_zetas.inc +27 -0
  207. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_zetas_basemul.inc +39 -0
  208. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/README.md +4 -0
  209. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/meta.h +304 -0
  210. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +309 -0
  211. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.c +94 -0
  212. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.h +45 -0
  213. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.c +102 -0
  214. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.h +25 -0
  215. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/intt.S +719 -0
  216. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/mulcache_compute.S +90 -0
  217. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/ntt.S +639 -0
  218. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/nttfrombytes.S +193 -0
  219. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/ntttobytes.S +181 -0
  220. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/nttunpack.S +174 -0
  221. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d10.S +382 -0
  222. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d11.S +448 -0
  223. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d4.S +163 -0
  224. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_compress_d5.S +220 -0
  225. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d10.S +228 -0
  226. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d11.S +277 -0
  227. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d4.S +180 -0
  228. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/poly_decompress_d5.S +192 -0
  229. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S +502 -0
  230. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S +750 -0
  231. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S +998 -0
  232. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/reduce.S +218 -0
  233. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_asm.S +103 -0
  234. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_table.c +544 -0
  235. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/tomont.S +155 -0
  236. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/params.h +76 -0
  237. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.c +572 -0
  238. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.h +317 -0
  239. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +502 -0
  240. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +668 -0
  241. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/randombytes.h +60 -0
  242. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.c +362 -0
  243. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.h +118 -0
  244. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/symmetric.h +70 -0
  245. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +260 -0
  246. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.c +20 -0
  247. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +464 -0
  248. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/zetas.inc +30 -0
  249. data/lib/pq_crypto/hybrid_kem.rb +10 -1
  250. data/lib/pq_crypto/version.rb +1 -1
  251. data/lib/pq_crypto.rb +5 -1
  252. data/script/vendor_libs.rb +228 -154
  253. metadata +236 -160
  254. data/ext/pqcrypto/vendor/pqclean/common/aes.c +0 -639
  255. data/ext/pqcrypto/vendor/pqclean/common/aes.h +0 -64
  256. data/ext/pqcrypto/vendor/pqclean/common/compat.h +0 -73
  257. data/ext/pqcrypto/vendor/pqclean/common/crypto_declassify.h +0 -7
  258. data/ext/pqcrypto/vendor/pqclean/common/fips202.c +0 -928
  259. data/ext/pqcrypto/vendor/pqclean/common/fips202.h +0 -166
  260. data/ext/pqcrypto/vendor/pqclean/common/keccak2x/feat.S +0 -168
  261. data/ext/pqcrypto/vendor/pqclean/common/keccak2x/fips202x2.c +0 -684
  262. data/ext/pqcrypto/vendor/pqclean/common/keccak2x/fips202x2.h +0 -60
  263. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/KeccakP-1600-times4-SIMD256.c +0 -1028
  264. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/KeccakP-1600-times4-SnP.h +0 -50
  265. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/KeccakP-1600-unrolling.macros +0 -198
  266. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/Makefile +0 -8
  267. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/Makefile.Microsoft_nmake +0 -8
  268. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/SIMD256-config.h +0 -3
  269. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/align.h +0 -34
  270. data/ext/pqcrypto/vendor/pqclean/common/keccak4x/brg_endian.h +0 -142
  271. data/ext/pqcrypto/vendor/pqclean/common/nistseedexpander.c +0 -101
  272. data/ext/pqcrypto/vendor/pqclean/common/nistseedexpander.h +0 -39
  273. data/ext/pqcrypto/vendor/pqclean/common/randombytes.c +0 -355
  274. data/ext/pqcrypto/vendor/pqclean/common/randombytes.h +0 -27
  275. data/ext/pqcrypto/vendor/pqclean/common/sha2.c +0 -769
  276. data/ext/pqcrypto/vendor/pqclean/common/sha2.h +0 -173
  277. data/ext/pqcrypto/vendor/pqclean/common/sp800-185.c +0 -156
  278. data/ext/pqcrypto/vendor/pqclean/common/sp800-185.h +0 -27
  279. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/LICENSE +0 -5
  280. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/Makefile +0 -19
  281. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/Makefile.Microsoft_nmake +0 -23
  282. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/api.h +0 -18
  283. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/cbd.c +0 -83
  284. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/cbd.h +0 -11
  285. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/indcpa.c +0 -327
  286. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/indcpa.h +0 -22
  287. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/kem.c +0 -164
  288. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/kem.h +0 -23
  289. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/ntt.c +0 -146
  290. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/ntt.h +0 -14
  291. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/params.h +0 -36
  292. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/poly.c +0 -311
  293. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/poly.h +0 -37
  294. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/polyvec.c +0 -198
  295. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/polyvec.h +0 -26
  296. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/reduce.c +0 -41
  297. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/reduce.h +0 -13
  298. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/symmetric-shake.c +0 -71
  299. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/symmetric.h +0 -30
  300. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/verify.c +0 -67
  301. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-1024/clean/verify.h +0 -13
  302. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/LICENSE +0 -5
  303. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/Makefile +0 -19
  304. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/Makefile.Microsoft_nmake +0 -23
  305. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/api.h +0 -18
  306. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/cbd.c +0 -108
  307. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/cbd.h +0 -11
  308. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/indcpa.c +0 -327
  309. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/indcpa.h +0 -22
  310. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/kem.c +0 -164
  311. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/kem.h +0 -23
  312. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/ntt.c +0 -146
  313. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/ntt.h +0 -14
  314. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/params.h +0 -36
  315. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/poly.c +0 -299
  316. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/poly.h +0 -37
  317. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/polyvec.c +0 -188
  318. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/polyvec.h +0 -26
  319. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/reduce.c +0 -41
  320. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/reduce.h +0 -13
  321. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/symmetric-shake.c +0 -71
  322. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/symmetric.h +0 -30
  323. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/verify.c +0 -67
  324. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-512/clean/verify.h +0 -13
  325. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/LICENSE +0 -5
  326. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/Makefile +0 -19
  327. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/Makefile.Microsoft_nmake +0 -23
  328. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/api.h +0 -18
  329. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/cbd.c +0 -83
  330. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/cbd.h +0 -11
  331. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/indcpa.c +0 -327
  332. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/indcpa.h +0 -22
  333. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/kem.c +0 -164
  334. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/kem.h +0 -23
  335. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/ntt.c +0 -146
  336. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/ntt.h +0 -14
  337. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/params.h +0 -36
  338. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/poly.c +0 -299
  339. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/poly.h +0 -37
  340. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/polyvec.c +0 -188
  341. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/polyvec.h +0 -26
  342. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/reduce.c +0 -41
  343. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/reduce.h +0 -13
  344. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/symmetric-shake.c +0 -71
  345. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/symmetric.h +0 -30
  346. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/verify.c +0 -67
  347. data/ext/pqcrypto/vendor/pqclean/crypto_kem/ml-kem-768/clean/verify.h +0 -13
  348. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/LICENSE +0 -5
  349. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/Makefile +0 -19
  350. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/Makefile.Microsoft_nmake +0 -23
  351. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/api.h +0 -50
  352. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/ntt.c +0 -98
  353. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/ntt.h +0 -10
  354. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/packing.c +0 -261
  355. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/packing.h +0 -31
  356. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/params.h +0 -44
  357. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/poly.c +0 -848
  358. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/poly.h +0 -52
  359. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/polyvec.c +0 -415
  360. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/polyvec.h +0 -65
  361. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/reduce.c +0 -69
  362. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/reduce.h +0 -17
  363. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/rounding.c +0 -98
  364. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/rounding.h +0 -14
  365. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/sign.c +0 -407
  366. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/sign.h +0 -47
  367. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/symmetric-shake.c +0 -26
  368. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-44/clean/symmetric.h +0 -34
  369. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/LICENSE +0 -5
  370. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/Makefile +0 -19
  371. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/Makefile.Microsoft_nmake +0 -23
  372. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/api.h +0 -50
  373. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/ntt.c +0 -98
  374. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/ntt.h +0 -10
  375. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/packing.c +0 -261
  376. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/packing.h +0 -31
  377. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/params.h +0 -44
  378. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/poly.c +0 -799
  379. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/poly.h +0 -52
  380. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/polyvec.c +0 -415
  381. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/polyvec.h +0 -65
  382. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/reduce.c +0 -69
  383. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/reduce.h +0 -17
  384. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/rounding.c +0 -92
  385. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/rounding.h +0 -14
  386. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/sign.c +0 -407
  387. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/sign.h +0 -47
  388. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/symmetric-shake.c +0 -26
  389. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-65/clean/symmetric.h +0 -34
  390. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/LICENSE +0 -5
  391. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/Makefile +0 -19
  392. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/Makefile.Microsoft_nmake +0 -23
  393. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/api.h +0 -50
  394. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/ntt.c +0 -98
  395. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/ntt.h +0 -10
  396. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/packing.c +0 -261
  397. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/packing.h +0 -31
  398. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/params.h +0 -44
  399. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/poly.c +0 -823
  400. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/poly.h +0 -52
  401. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/polyvec.c +0 -415
  402. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/polyvec.h +0 -65
  403. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/reduce.c +0 -69
  404. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/reduce.h +0 -17
  405. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/rounding.c +0 -92
  406. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/rounding.h +0 -14
  407. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/sign.c +0 -407
  408. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/sign.h +0 -47
  409. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/symmetric-shake.c +0 -26
  410. data/ext/pqcrypto/vendor/pqclean/crypto_sign/ml-dsa-87/clean/symmetric.h +0 -34
@@ -0,0 +1,681 @@
1
+ /*
2
+ * Copyright (c) The mlkem-native project authors
3
+ * SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
4
+ */
5
+
6
+ /*
7
+ * WARNING: This file is auto-generated from scripts/autogen
8
+ * in the mlkem-native repository.
9
+ * Do not modify it directly.
10
+ */
11
+
12
+ /******************************************************************************
13
+ *
14
+ * Single assembly unit for fixed-level build of mlkem-native
15
+ *
16
+ * This assembly unit bundles together all assembly files for a build
17
+ * of mlkem-native for a fixed security level (MLKEM-512/768/1024).
18
+ *
19
+ * # Multi-level build
20
+ *
21
+ * If you want an SCU build of mlkem-native with support for multiple security
22
+ * levels, you should include this file once with
23
+ * MLK_CONFIG_MULTILEVEL_WITH_SHARED set.
24
+ *
25
+ * (You could also follow the same pattern as for mlkem_native_monobuild.c
26
+ * and include it for every level, setting MLK_CONFIG_MULTILEVEL_NO_SHARED
27
+ * for all but one. For builds with MLK_CONFIG_MULTILEVEL_NO_SHARED, this
28
+ * file will then be ignored.)
29
+ *
30
+ * # Configuration
31
+ *
32
+ * The following options from the mlkem-native configuration are relevant:
33
+ *
34
+ * - MLK_CONFIG_FIPS202_CUSTOM_HEADER
35
+ * Set this option if you use a custom FIPS202 implementation.
36
+ *
37
+ * - MLK_CONFIG_USE_NATIVE_BACKEND_ARITH
38
+ * Set this option if you want to include the native arithmetic backends
39
+ * in your build.
40
+ *
41
+ * - MLK_CONFIG_USE_NATIVE_BACKEND_FIPS202
42
+ * Set this option if you want to include the native FIPS202 backends
43
+ * in your build.
44
+ *
45
+ * - MLK_CONFIG_MONOBUILD_KEEP_SHARED_HEADERS
46
+ * Set this option if you want to keep the directives defined in
47
+ * level-independent headers. This is needed for a multi-level build.
48
+ */
49
+
50
+ /* If parts of the mlkem-native source tree are not used,
51
+ * consider reducing this header via `unifdef`.
52
+ *
53
+ * Example:
54
+ * ```bash
55
+ * unifdef -UMLK_CONFIG_USE_NATIVE_BACKEND_ARITH mlkem_native_asm.S
56
+ * ```
57
+ */
58
+
59
+ #include "src/common.h"
60
+
61
+ #if defined(MLK_CONFIG_USE_NATIVE_BACKEND_ARITH)
62
+ #if defined(MLK_SYS_AARCH64)
63
+ #include "src/native/aarch64/src/intt.S"
64
+ #include "src/native/aarch64/src/ntt.S"
65
+ #include "src/native/aarch64/src/poly_mulcache_compute_asm.S"
66
+ #include "src/native/aarch64/src/poly_reduce_asm.S"
67
+ #include "src/native/aarch64/src/poly_tobytes_asm.S"
68
+ #include "src/native/aarch64/src/poly_tomont_asm.S"
69
+ #include "src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S"
70
+ #include "src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S"
71
+ #include "src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S"
72
+ #include "src/native/aarch64/src/rej_uniform_asm.S"
73
+ #endif /* MLK_SYS_AARCH64 */
74
+ #if defined(MLK_SYS_X86_64)
75
+ #include "src/native/x86_64/src/intt.S"
76
+ #include "src/native/x86_64/src/mulcache_compute.S"
77
+ #include "src/native/x86_64/src/ntt.S"
78
+ #include "src/native/x86_64/src/nttfrombytes.S"
79
+ #include "src/native/x86_64/src/ntttobytes.S"
80
+ #include "src/native/x86_64/src/nttunpack.S"
81
+ #include "src/native/x86_64/src/poly_compress_d10.S"
82
+ #include "src/native/x86_64/src/poly_compress_d11.S"
83
+ #include "src/native/x86_64/src/poly_compress_d4.S"
84
+ #include "src/native/x86_64/src/poly_compress_d5.S"
85
+ #include "src/native/x86_64/src/poly_decompress_d10.S"
86
+ #include "src/native/x86_64/src/poly_decompress_d11.S"
87
+ #include "src/native/x86_64/src/poly_decompress_d4.S"
88
+ #include "src/native/x86_64/src/poly_decompress_d5.S"
89
+ #include "src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S"
90
+ #include "src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S"
91
+ #include "src/native/x86_64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S"
92
+ #include "src/native/x86_64/src/reduce.S"
93
+ #include "src/native/x86_64/src/rej_uniform_asm.S"
94
+ #include "src/native/x86_64/src/tomont.S"
95
+ #endif /* MLK_SYS_X86_64 */
96
+ #if defined(MLK_SYS_RISCV64)
97
+ #endif
98
+ #endif /* MLK_CONFIG_USE_NATIVE_BACKEND_ARITH */
99
+
100
+ #if defined(MLK_CONFIG_USE_NATIVE_BACKEND_FIPS202)
101
+ #if defined(MLK_SYS_AARCH64)
102
+ #include "src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S"
103
+ #include "src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S"
104
+ #include "src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S"
105
+ #include "src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S"
106
+ #include "src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S"
107
+ #endif /* MLK_SYS_AARCH64 */
108
+ #if defined(MLK_SYS_X86_64)
109
+ #include "src/fips202/native/x86_64/src/keccak_f1600_x4_avx2.S"
110
+ #endif
111
+ #if defined(MLK_SYS_ARMV81M_MVE)
112
+ #include "src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S"
113
+ #include "src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S"
114
+ #include "src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S"
115
+ #endif
116
+ #endif /* MLK_CONFIG_USE_NATIVE_BACKEND_FIPS202 */
117
+
118
+
119
+ /* Macro #undef's
120
+ *
121
+ * The following undefines macros from headers
122
+ * included by the source files imported above.
123
+ *
124
+ * This is to allow building and linking multiple builds
125
+ * of mlkem-native for varying parameter sets through concatenation
126
+ * of this file, as if the files had been compiled separately.
127
+ * If this is not relevant to you, you may remove the following.
128
+ *
129
+ * NOTE: This is not needed for the assembly SCU since, at present,
130
+ * there is no need to include it multiple times.
131
+ * We keep it for uniformity with mlkem_native.c only.
132
+ *
133
+ * NOTE: To avoid having to distinguish between which headers are included
134
+ * from the assembly files, we #undef the same set of directives
135
+ * as in mlkem_native.c
136
+ */
137
+
138
+ /*
139
+ * Undefine macros from MLK_CONFIG_PARAMETER_SET-specific files
140
+ */
141
+ /* mlkem/mlkem_native.h */
142
+ #undef CRYPTO_BYTES
143
+ #undef CRYPTO_CIPHERTEXTBYTES
144
+ #undef CRYPTO_PUBLICKEYBYTES
145
+ #undef CRYPTO_SECRETKEYBYTES
146
+ #undef CRYPTO_SYMBYTES
147
+ #undef MLKEM1024_BYTES
148
+ #undef MLKEM1024_CIPHERTEXTBYTES
149
+ #undef MLKEM1024_PUBLICKEYBYTES
150
+ #undef MLKEM1024_SECRETKEYBYTES
151
+ #undef MLKEM1024_SYMBYTES
152
+ #undef MLKEM512_BYTES
153
+ #undef MLKEM512_CIPHERTEXTBYTES
154
+ #undef MLKEM512_PUBLICKEYBYTES
155
+ #undef MLKEM512_SECRETKEYBYTES
156
+ #undef MLKEM512_SYMBYTES
157
+ #undef MLKEM768_BYTES
158
+ #undef MLKEM768_CIPHERTEXTBYTES
159
+ #undef MLKEM768_PUBLICKEYBYTES
160
+ #undef MLKEM768_SECRETKEYBYTES
161
+ #undef MLKEM768_SYMBYTES
162
+ #undef MLKEM_BYTES
163
+ #undef MLKEM_CIPHERTEXTBYTES
164
+ #undef MLKEM_CIPHERTEXTBYTES_
165
+ #undef MLKEM_PUBLICKEYBYTES
166
+ #undef MLKEM_PUBLICKEYBYTES_
167
+ #undef MLKEM_SECRETKEYBYTES
168
+ #undef MLKEM_SECRETKEYBYTES_
169
+ #undef MLKEM_SYMBYTES
170
+ #undef MLK_API_CONCAT
171
+ #undef MLK_API_CONCAT_
172
+ #undef MLK_API_CONCAT_UNDERSCORE
173
+ #undef MLK_API_LEGACY_CONFIG
174
+ #undef MLK_API_MUST_CHECK_RETURN_VALUE
175
+ #undef MLK_API_NAMESPACE
176
+ #undef MLK_API_QUALIFIER
177
+ #undef MLK_CONFIG_API_CONSTANTS_ONLY
178
+ #undef MLK_CONFIG_API_NAMESPACE_PREFIX
179
+ #undef MLK_CONFIG_API_NO_SUPERCOP
180
+ #undef MLK_CONFIG_API_PARAMETER_SET
181
+ #undef MLK_CONFIG_API_QUALIFIER
182
+ #undef MLK_ERR_FAIL
183
+ #undef MLK_ERR_OUT_OF_MEMORY
184
+ #undef MLK_ERR_RNG_FAIL
185
+ #undef MLK_H
186
+ #undef MLK_MAX3_
187
+ #undef MLK_TOTAL_ALLOC_1024
188
+ #undef MLK_TOTAL_ALLOC_1024_DECAPS
189
+ #undef MLK_TOTAL_ALLOC_1024_ENCAPS
190
+ #undef MLK_TOTAL_ALLOC_1024_KEYPAIR
191
+ #undef MLK_TOTAL_ALLOC_1024_KEYPAIR_NO_PCT
192
+ #undef MLK_TOTAL_ALLOC_1024_KEYPAIR_PCT
193
+ #undef MLK_TOTAL_ALLOC_512
194
+ #undef MLK_TOTAL_ALLOC_512_DECAPS
195
+ #undef MLK_TOTAL_ALLOC_512_ENCAPS
196
+ #undef MLK_TOTAL_ALLOC_512_KEYPAIR
197
+ #undef MLK_TOTAL_ALLOC_512_KEYPAIR_NO_PCT
198
+ #undef MLK_TOTAL_ALLOC_512_KEYPAIR_PCT
199
+ #undef MLK_TOTAL_ALLOC_768
200
+ #undef MLK_TOTAL_ALLOC_768_DECAPS
201
+ #undef MLK_TOTAL_ALLOC_768_ENCAPS
202
+ #undef MLK_TOTAL_ALLOC_768_KEYPAIR
203
+ #undef MLK_TOTAL_ALLOC_768_KEYPAIR_NO_PCT
204
+ #undef MLK_TOTAL_ALLOC_768_KEYPAIR_PCT
205
+ #undef crypto_kem_check_pk
206
+ #undef crypto_kem_check_sk
207
+ #undef crypto_kem_dec
208
+ #undef crypto_kem_enc
209
+ #undef crypto_kem_enc_derand
210
+ #undef crypto_kem_keypair
211
+ #undef crypto_kem_keypair_derand
212
+ /* mlkem/src/common.h */
213
+ #undef MLK_ADD_PARAM_SET
214
+ #undef MLK_ALLOC
215
+ #undef MLK_APPLY
216
+ #undef MLK_ASM_FN_SIZE
217
+ #undef MLK_ASM_FN_SYMBOL
218
+ #undef MLK_ASM_NAMESPACE
219
+ #undef MLK_BUILD_INTERNAL
220
+ #undef MLK_COMMON_H
221
+ #undef MLK_CONCAT
222
+ #undef MLK_CONCAT_
223
+ #undef MLK_CONTEXT_PARAMETERS_0
224
+ #undef MLK_CONTEXT_PARAMETERS_1
225
+ #undef MLK_CONTEXT_PARAMETERS_2
226
+ #undef MLK_CONTEXT_PARAMETERS_3
227
+ #undef MLK_CONTEXT_PARAMETERS_4
228
+ #undef MLK_EMPTY_CU
229
+ #undef MLK_ERR_FAIL
230
+ #undef MLK_ERR_OUT_OF_MEMORY
231
+ #undef MLK_ERR_RNG_FAIL
232
+ #undef MLK_EXTERNAL_API
233
+ #undef MLK_FIPS202X4_HEADER_FILE
234
+ #undef MLK_FIPS202_HEADER_FILE
235
+ #undef MLK_FREE
236
+ #undef MLK_INTERNAL_API
237
+ #undef MLK_NAMESPACE
238
+ #undef MLK_NAMESPACE_K
239
+ #undef MLK_NAMESPACE_PREFIX
240
+ #undef MLK_NAMESPACE_PREFIX_K
241
+ #undef mlk_memcpy
242
+ #undef mlk_memset
243
+ /* mlkem/src/indcpa.h */
244
+ #undef MLK_INDCPA_H
245
+ #undef mlk_gen_matrix
246
+ #undef mlk_indcpa_dec
247
+ #undef mlk_indcpa_enc
248
+ #undef mlk_indcpa_keypair_derand
249
+ /* mlkem/src/kem.h */
250
+ #undef MLK_KEM_H
251
+ #undef mlk_kem_check_pk
252
+ #undef mlk_kem_check_sk
253
+ #undef mlk_kem_dec
254
+ #undef mlk_kem_enc
255
+ #undef mlk_kem_enc_derand
256
+ #undef mlk_kem_keypair
257
+ #undef mlk_kem_keypair_derand
258
+ /* mlkem/src/params.h */
259
+ #undef MLKEM_DU
260
+ #undef MLKEM_DV
261
+ #undef MLKEM_ETA1
262
+ #undef MLKEM_ETA2
263
+ #undef MLKEM_INDCCA_CIPHERTEXTBYTES
264
+ #undef MLKEM_INDCCA_PUBLICKEYBYTES
265
+ #undef MLKEM_INDCCA_SECRETKEYBYTES
266
+ #undef MLKEM_INDCPA_BYTES
267
+ #undef MLKEM_INDCPA_MSGBYTES
268
+ #undef MLKEM_INDCPA_PUBLICKEYBYTES
269
+ #undef MLKEM_INDCPA_SECRETKEYBYTES
270
+ #undef MLKEM_K
271
+ #undef MLKEM_N
272
+ #undef MLKEM_POLYBYTES
273
+ #undef MLKEM_POLYCOMPRESSEDBYTES_D10
274
+ #undef MLKEM_POLYCOMPRESSEDBYTES_D11
275
+ #undef MLKEM_POLYCOMPRESSEDBYTES_D4
276
+ #undef MLKEM_POLYCOMPRESSEDBYTES_D5
277
+ #undef MLKEM_POLYCOMPRESSEDBYTES_DU
278
+ #undef MLKEM_POLYCOMPRESSEDBYTES_DV
279
+ #undef MLKEM_POLYVECBYTES
280
+ #undef MLKEM_POLYVECCOMPRESSEDBYTES_DU
281
+ #undef MLKEM_Q
282
+ #undef MLKEM_Q_HALF
283
+ #undef MLKEM_SSBYTES
284
+ #undef MLKEM_SYMBYTES
285
+ #undef MLKEM_UINT12_LIMIT
286
+ #undef MLK_PARAMS_H
287
+ /* mlkem/src/poly_k.h */
288
+ #undef MLK_POLY_K_H
289
+ #undef mlk_poly_compress_du
290
+ #undef mlk_poly_compress_dv
291
+ #undef mlk_poly_decompress_du
292
+ #undef mlk_poly_decompress_dv
293
+ #undef mlk_poly_getnoise_eta1122_4x
294
+ #undef mlk_poly_getnoise_eta1_4x
295
+ #undef mlk_poly_getnoise_eta2
296
+ #undef mlk_poly_getnoise_eta2_4x
297
+ #undef mlk_polymat
298
+ #undef mlk_polyvec
299
+ #undef mlk_polyvec_add
300
+ #undef mlk_polyvec_basemul_acc_montgomery_cached
301
+ #undef mlk_polyvec_compress_du
302
+ #undef mlk_polyvec_decompress_du
303
+ #undef mlk_polyvec_frombytes
304
+ #undef mlk_polyvec_invntt_tomont
305
+ #undef mlk_polyvec_mulcache
306
+ #undef mlk_polyvec_mulcache_compute
307
+ #undef mlk_polyvec_ntt
308
+ #undef mlk_polyvec_reduce
309
+ #undef mlk_polyvec_tobytes
310
+ #undef mlk_polyvec_tomont
311
+
312
+ #if !defined(MLK_CONFIG_MONOBUILD_KEEP_SHARED_HEADERS)
313
+ /*
314
+ * Undefine macros from MLK_CONFIG_PARAMETER_SET-generic files
315
+ */
316
+ /* mlkem/src/compress.h */
317
+ #undef MLK_COMPRESS_H
318
+ #undef mlk_poly_compress_d10
319
+ #undef mlk_poly_compress_d11
320
+ #undef mlk_poly_compress_d4
321
+ #undef mlk_poly_compress_d5
322
+ #undef mlk_poly_decompress_d10
323
+ #undef mlk_poly_decompress_d11
324
+ #undef mlk_poly_decompress_d4
325
+ #undef mlk_poly_decompress_d5
326
+ #undef mlk_poly_frombytes
327
+ #undef mlk_poly_frommsg
328
+ #undef mlk_poly_tobytes
329
+ #undef mlk_poly_tomsg
330
+ /* mlkem/src/debug.h */
331
+ #undef MLK_DEBUG_H
332
+ #undef mlk_assert
333
+ #undef mlk_assert_abs_bound
334
+ #undef mlk_assert_abs_bound_2d
335
+ #undef mlk_assert_bound
336
+ #undef mlk_assert_bound_2d
337
+ #undef mlk_debug_check_assert
338
+ #undef mlk_debug_check_bounds
339
+ /* mlkem/src/poly.h */
340
+ #undef MLK_INVNTT_BOUND
341
+ #undef MLK_NTT_BOUND
342
+ #undef MLK_POLY_H
343
+ #undef mlk_poly_add
344
+ #undef mlk_poly_invntt_tomont
345
+ #undef mlk_poly_mulcache_compute
346
+ #undef mlk_poly_ntt
347
+ #undef mlk_poly_reduce
348
+ #undef mlk_poly_sub
349
+ #undef mlk_poly_tomont
350
+ /* mlkem/src/randombytes.h */
351
+ #undef MLK_RANDOMBYTES_H
352
+ /* mlkem/src/sampling.h */
353
+ #undef MLK_SAMPLING_H
354
+ #undef mlk_poly_cbd2
355
+ #undef mlk_poly_cbd3
356
+ #undef mlk_poly_rej_uniform
357
+ #undef mlk_poly_rej_uniform_x4
358
+ /* mlkem/src/symmetric.h */
359
+ #undef MLK_SYMMETRIC_H
360
+ #undef MLK_XOF_RATE
361
+ #undef mlk_hash_g
362
+ #undef mlk_hash_h
363
+ #undef mlk_hash_j
364
+ #undef mlk_prf_eta
365
+ #undef mlk_prf_eta1
366
+ #undef mlk_prf_eta1_x4
367
+ #undef mlk_prf_eta2
368
+ #undef mlk_xof_absorb
369
+ #undef mlk_xof_ctx
370
+ #undef mlk_xof_init
371
+ #undef mlk_xof_release
372
+ #undef mlk_xof_squeezeblocks
373
+ #undef mlk_xof_x4_absorb
374
+ #undef mlk_xof_x4_ctx
375
+ #undef mlk_xof_x4_init
376
+ #undef mlk_xof_x4_release
377
+ #undef mlk_xof_x4_squeezeblocks
378
+ /* mlkem/src/sys.h */
379
+ #undef MLK_ALIGN
380
+ #undef MLK_ALIGN_UP
381
+ #undef MLK_ALWAYS_INLINE
382
+ #undef MLK_CET_ENDBR
383
+ #undef MLK_CT_TESTING_DECLASSIFY
384
+ #undef MLK_CT_TESTING_SECRET
385
+ #undef MLK_DEFAULT_ALIGN
386
+ #undef MLK_HAVE_INLINE_ASM
387
+ #undef MLK_INLINE
388
+ #undef MLK_MUST_CHECK_RETURN_VALUE
389
+ #undef MLK_RESTRICT
390
+ #undef MLK_STATIC_TESTABLE
391
+ #undef MLK_SYS_AARCH64
392
+ #undef MLK_SYS_AARCH64_EB
393
+ #undef MLK_SYS_APPLE
394
+ #undef MLK_SYS_ARMV81M_MVE
395
+ #undef MLK_SYS_BIG_ENDIAN
396
+ #undef MLK_SYS_H
397
+ #undef MLK_SYS_LINUX
398
+ #undef MLK_SYS_LITTLE_ENDIAN
399
+ #undef MLK_SYS_PPC64LE
400
+ #undef MLK_SYS_RISCV32
401
+ #undef MLK_SYS_RISCV64
402
+ #undef MLK_SYS_RISCV64_RVV
403
+ #undef MLK_SYS_WINDOWS
404
+ #undef MLK_SYS_X86_64
405
+ #undef MLK_SYS_X86_64_AVX2
406
+ /* mlkem/src/verify.h */
407
+ #undef MLK_USE_ASM_VALUE_BARRIER
408
+ #undef MLK_VERIFY_H
409
+ #undef mlk_ct_opt_blocker_u64
410
+ /* mlkem/src/cbmc.h */
411
+ #undef MLK_CBMC_H
412
+ #undef __contract__
413
+ #undef __loop__
414
+
415
+ #if !defined(MLK_CONFIG_FIPS202_CUSTOM_HEADER)
416
+ /*
417
+ * Undefine macros from FIPS-202 files
418
+ */
419
+ /* mlkem/src/fips202/fips202.h */
420
+ #undef FIPS202_X4_DEFAULT_IMPLEMENTATION
421
+ #undef MLK_FIPS202_FIPS202_H
422
+ #undef SHA3_256_HASHBYTES
423
+ #undef SHA3_256_RATE
424
+ #undef SHA3_384_RATE
425
+ #undef SHA3_512_HASHBYTES
426
+ #undef SHA3_512_RATE
427
+ #undef SHAKE128_RATE
428
+ #undef SHAKE256_RATE
429
+ #undef mlk_sha3_256
430
+ #undef mlk_sha3_512
431
+ #undef mlk_shake128_absorb_once
432
+ #undef mlk_shake128_init
433
+ #undef mlk_shake128_release
434
+ #undef mlk_shake128_squeezeblocks
435
+ #undef mlk_shake256
436
+ /* mlkem/src/fips202/fips202x4.h */
437
+ #undef MLK_FIPS202_FIPS202X4_H
438
+ #undef mlk_shake128x4_absorb_once
439
+ #undef mlk_shake128x4_init
440
+ #undef mlk_shake128x4_release
441
+ #undef mlk_shake128x4_squeezeblocks
442
+ #undef mlk_shake256x4
443
+ /* mlkem/src/fips202/keccakf1600.h */
444
+ #undef MLK_FIPS202_KECCAKF1600_H
445
+ #undef MLK_KECCAK_LANES
446
+ #undef MLK_KECCAK_WAY
447
+ #undef mlk_keccakf1600_extract_bytes
448
+ #undef mlk_keccakf1600_permute
449
+ #undef mlk_keccakf1600_xor_bytes
450
+ #undef mlk_keccakf1600x4_extract_bytes
451
+ #undef mlk_keccakf1600x4_permute
452
+ #undef mlk_keccakf1600x4_xor_bytes
453
+ #endif /* !MLK_CONFIG_FIPS202_CUSTOM_HEADER */
454
+
455
+ #if defined(MLK_CONFIG_USE_NATIVE_BACKEND_FIPS202)
456
+ /* mlkem/src/fips202/native/api.h */
457
+ #undef MLK_FIPS202_NATIVE_API_H
458
+ #undef MLK_NATIVE_FUNC_FALLBACK
459
+ #undef MLK_NATIVE_FUNC_SUCCESS
460
+ /* mlkem/src/fips202/native/auto.h */
461
+ #undef MLK_FIPS202_NATIVE_AUTO_H
462
+ #if defined(MLK_SYS_AARCH64)
463
+ /*
464
+ * Undefine macros from native code (FIPS202, AArch64)
465
+ */
466
+ /* mlkem/src/fips202/native/aarch64/auto.h */
467
+ #undef MLK_FIPS202_NATIVE_AARCH64_AUTO_H
468
+ /* mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h */
469
+ #undef MLK_FIPS202_NATIVE_AARCH64_SRC_FIPS202_NATIVE_AARCH64_H
470
+ #undef mlk_keccak_f1600_x1_scalar_asm
471
+ #undef mlk_keccak_f1600_x1_v84a_asm
472
+ #undef mlk_keccak_f1600_x2_v84a_asm
473
+ #undef mlk_keccak_f1600_x4_v8a_scalar_hybrid_asm
474
+ #undef mlk_keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm
475
+ #undef mlk_keccakf1600_round_constants
476
+ /* mlkem/src/fips202/native/aarch64/x1_scalar.h */
477
+ #undef MLK_FIPS202_AARCH64_NEED_X1_SCALAR
478
+ #undef MLK_FIPS202_NATIVE_AARCH64_X1_SCALAR_H
479
+ #undef MLK_USE_FIPS202_X1_NATIVE
480
+ /* mlkem/src/fips202/native/aarch64/x1_v84a.h */
481
+ #undef MLK_FIPS202_AARCH64_NEED_X1_V84A
482
+ #undef MLK_FIPS202_NATIVE_AARCH64_X1_V84A_H
483
+ #undef MLK_USE_FIPS202_X1_NATIVE
484
+ /* mlkem/src/fips202/native/aarch64/x2_v84a.h */
485
+ #undef MLK_FIPS202_AARCH64_NEED_X2_V84A
486
+ #undef MLK_FIPS202_NATIVE_AARCH64_X2_V84A_H
487
+ #undef MLK_USE_FIPS202_X4_NATIVE
488
+ /* mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h */
489
+ #undef MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID
490
+ #undef MLK_FIPS202_NATIVE_AARCH64_X4_V8A_SCALAR_H
491
+ #undef MLK_USE_FIPS202_X4_NATIVE
492
+ /* mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h */
493
+ #undef MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID
494
+ #undef MLK_FIPS202_NATIVE_AARCH64_X4_V8A_V84A_SCALAR_H
495
+ #undef MLK_USE_FIPS202_X4_NATIVE
496
+ #endif /* MLK_SYS_AARCH64 */
497
+ #if defined(MLK_SYS_X86_64)
498
+ /*
499
+ * Undefine macros from native code (FIPS202, x86_64)
500
+ */
501
+ /* mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h */
502
+ #undef MLK_FIPS202_NATIVE_X86_64_KECCAK_F1600_X4_AVX2_H
503
+ #undef MLK_FIPS202_X86_64_NEED_X4_AVX2
504
+ #undef MLK_USE_FIPS202_X4_NATIVE
505
+ /* mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h */
506
+ #undef MLK_FIPS202_NATIVE_X86_64_SRC_FIPS202_NATIVE_X86_64_H
507
+ #undef mlk_keccak_f1600_x4_avx2
508
+ #undef mlk_keccak_rho56
509
+ #undef mlk_keccak_rho8
510
+ #undef mlk_keccakf1600_round_constants
511
+ #endif /* MLK_SYS_X86_64 */
512
+ #if defined(MLK_SYS_ARMV81M_MVE)
513
+ /*
514
+ * Undefine macros from native code (FIPS202, Armv8.1-M)
515
+ */
516
+ /* mlkem/src/fips202/native/armv81m/mve.h */
517
+ #undef MLK_FIPS202_ARMV81M_NEED_X4
518
+ #undef MLK_FIPS202_NATIVE_ARMV81M
519
+ #undef MLK_FIPS202_NATIVE_ARMV81M_MVE_H
520
+ #undef MLK_USE_FIPS202_X4_EXTRACT_BYTES_NATIVE
521
+ #undef MLK_USE_FIPS202_X4_NATIVE
522
+ #undef MLK_USE_FIPS202_X4_XOR_BYTES_NATIVE
523
+ #undef mlk_keccak_f1600_x4_native_impl
524
+ #undef mlk_keccak_f1600_x4_state_extract_bytes
525
+ #undef mlk_keccak_f1600_x4_state_xor_bytes
526
+ /* mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h */
527
+ #undef MLK_FIPS202_NATIVE_ARMV81M_SRC_FIPS202_NATIVE_ARMV81M_H
528
+ #undef mlk_keccak_f1600_x4_mve_asm
529
+ #undef mlk_keccak_f1600_x4_state_extract_bytes_asm
530
+ #undef mlk_keccak_f1600_x4_state_xor_bytes_asm
531
+ #undef mlk_keccakf1600_round_constants
532
+ #endif /* MLK_SYS_ARMV81M_MVE */
533
+ #endif /* MLK_CONFIG_USE_NATIVE_BACKEND_FIPS202 */
534
+ #if defined(MLK_CONFIG_USE_NATIVE_BACKEND_ARITH)
535
+ /* mlkem/src/native/api.h */
536
+ #undef MLK_INVNTT_BOUND
537
+ #undef MLK_NATIVE_API_H
538
+ #undef MLK_NATIVE_FUNC_FALLBACK
539
+ #undef MLK_NATIVE_FUNC_SUCCESS
540
+ #undef MLK_NTT_BOUND
541
+ /* mlkem/src/native/meta.h */
542
+ #undef MLK_NATIVE_META_H
543
+ #if defined(MLK_SYS_AARCH64)
544
+ /*
545
+ * Undefine macros from native code (Arith, AArch64)
546
+ */
547
+ /* mlkem/src/native/aarch64/meta.h */
548
+ #undef MLK_ARITH_BACKEND_AARCH64
549
+ #undef MLK_NATIVE_AARCH64_META_H
550
+ #undef MLK_USE_NATIVE_INTT
551
+ #undef MLK_USE_NATIVE_NTT
552
+ #undef MLK_USE_NATIVE_POLYVEC_BASEMUL_ACC_MONTGOMERY_CACHED
553
+ #undef MLK_USE_NATIVE_POLY_MULCACHE_COMPUTE
554
+ #undef MLK_USE_NATIVE_POLY_REDUCE
555
+ #undef MLK_USE_NATIVE_POLY_TOBYTES
556
+ #undef MLK_USE_NATIVE_POLY_TOMONT
557
+ #undef MLK_USE_NATIVE_REJ_UNIFORM
558
+ /* mlkem/src/native/aarch64/src/arith_native_aarch64.h */
559
+ #undef MLK_NATIVE_AARCH64_SRC_ARITH_NATIVE_AARCH64_H
560
+ #undef mlk_aarch64_invntt_zetas_layer12345
561
+ #undef mlk_aarch64_invntt_zetas_layer67
562
+ #undef mlk_aarch64_ntt_zetas_layer12345
563
+ #undef mlk_aarch64_ntt_zetas_layer67
564
+ #undef mlk_aarch64_zetas_mulcache_native
565
+ #undef mlk_aarch64_zetas_mulcache_twisted_native
566
+ #undef mlk_intt_asm
567
+ #undef mlk_ntt_asm
568
+ #undef mlk_poly_mulcache_compute_asm
569
+ #undef mlk_poly_reduce_asm
570
+ #undef mlk_poly_tobytes_asm
571
+ #undef mlk_poly_tomont_asm
572
+ #undef mlk_polyvec_basemul_acc_montgomery_cached_asm_k2
573
+ #undef mlk_polyvec_basemul_acc_montgomery_cached_asm_k3
574
+ #undef mlk_polyvec_basemul_acc_montgomery_cached_asm_k4
575
+ #undef mlk_rej_uniform_asm
576
+ #undef mlk_rej_uniform_table
577
+ #endif /* MLK_SYS_AARCH64 */
578
+ #if defined(MLK_SYS_X86_64)
579
+ /*
580
+ * Undefine macros from native code (Arith, X86_64)
581
+ */
582
+ /* mlkem/src/native/x86_64/meta.h */
583
+ #undef MLK_ARITH_BACKEND_X86_64_DEFAULT
584
+ #undef MLK_NATIVE_X86_64_META_H
585
+ #undef MLK_USE_NATIVE_INTT
586
+ #undef MLK_USE_NATIVE_NTT
587
+ #undef MLK_USE_NATIVE_NTT_CUSTOM_ORDER
588
+ #undef MLK_USE_NATIVE_POLYVEC_BASEMUL_ACC_MONTGOMERY_CACHED
589
+ #undef MLK_USE_NATIVE_POLY_COMPRESS_D10
590
+ #undef MLK_USE_NATIVE_POLY_COMPRESS_D11
591
+ #undef MLK_USE_NATIVE_POLY_COMPRESS_D4
592
+ #undef MLK_USE_NATIVE_POLY_COMPRESS_D5
593
+ #undef MLK_USE_NATIVE_POLY_DECOMPRESS_D10
594
+ #undef MLK_USE_NATIVE_POLY_DECOMPRESS_D11
595
+ #undef MLK_USE_NATIVE_POLY_DECOMPRESS_D4
596
+ #undef MLK_USE_NATIVE_POLY_DECOMPRESS_D5
597
+ #undef MLK_USE_NATIVE_POLY_FROMBYTES
598
+ #undef MLK_USE_NATIVE_POLY_MULCACHE_COMPUTE
599
+ #undef MLK_USE_NATIVE_POLY_REDUCE
600
+ #undef MLK_USE_NATIVE_POLY_TOBYTES
601
+ #undef MLK_USE_NATIVE_POLY_TOMONT
602
+ #undef MLK_USE_NATIVE_REJ_UNIFORM
603
+ /* mlkem/src/native/x86_64/src/arith_native_x86_64.h */
604
+ #undef MLK_AVX2_REJ_UNIFORM_BUFLEN
605
+ #undef MLK_NATIVE_X86_64_SRC_ARITH_NATIVE_X86_64_H
606
+ #undef mlk_invntt_avx2
607
+ #undef mlk_ntt_avx2
608
+ #undef mlk_nttfrombytes_avx2
609
+ #undef mlk_ntttobytes_avx2
610
+ #undef mlk_nttunpack_avx2
611
+ #undef mlk_poly_compress_d10_avx2
612
+ #undef mlk_poly_compress_d11_avx2
613
+ #undef mlk_poly_compress_d4_avx2
614
+ #undef mlk_poly_compress_d5_avx2
615
+ #undef mlk_poly_decompress_d10_avx2
616
+ #undef mlk_poly_decompress_d11_avx2
617
+ #undef mlk_poly_decompress_d4_avx2
618
+ #undef mlk_poly_decompress_d5_avx2
619
+ #undef mlk_poly_mulcache_compute_avx2
620
+ #undef mlk_polyvec_basemul_acc_montgomery_cached_asm_k2
621
+ #undef mlk_polyvec_basemul_acc_montgomery_cached_asm_k3
622
+ #undef mlk_polyvec_basemul_acc_montgomery_cached_asm_k4
623
+ #undef mlk_reduce_avx2
624
+ #undef mlk_rej_uniform_asm
625
+ #undef mlk_rej_uniform_table
626
+ #undef mlk_tomont_avx2
627
+ /* mlkem/src/native/x86_64/src/compress_consts.h */
628
+ #undef MLK_NATIVE_X86_64_SRC_COMPRESS_CONSTS_H
629
+ #undef mlk_compress_d10_data
630
+ #undef mlk_compress_d11_data
631
+ #undef mlk_compress_d4_data
632
+ #undef mlk_compress_d5_data
633
+ #undef mlk_decompress_d10_data
634
+ #undef mlk_decompress_d11_data
635
+ #undef mlk_decompress_d4_data
636
+ #undef mlk_decompress_d5_data
637
+ /* mlkem/src/native/x86_64/src/consts.h */
638
+ #undef MLK_AVX2_BACKEND_DATA_OFFSET_MULCACHE_TWIDDLES
639
+ #undef MLK_AVX2_BACKEND_DATA_OFFSET_REVIDXB
640
+ #undef MLK_AVX2_BACKEND_DATA_OFFSET_REVIDXD
641
+ #undef MLK_AVX2_BACKEND_DATA_OFFSET_ZETAS_EXP
642
+ #undef MLK_NATIVE_X86_64_SRC_CONSTS_H
643
+ #undef mlk_qdata
644
+ #endif /* MLK_SYS_X86_64 */
645
+ #if defined(MLK_SYS_RISCV64)
646
+ /*
647
+ * Undefine macros from native code (Arith, RISC-V 64)
648
+ */
649
+ /* mlkem/src/native/riscv64/meta.h */
650
+ #undef MLK_ARITH_BACKEND_RISCV64
651
+ #undef MLK_NATIVE_RISCV64_META_H
652
+ #undef MLK_USE_NATIVE_INTT
653
+ #undef MLK_USE_NATIVE_NTT
654
+ #undef MLK_USE_NATIVE_POLYVEC_BASEMUL_ACC_MONTGOMERY_CACHED
655
+ #undef MLK_USE_NATIVE_POLY_MULCACHE_COMPUTE
656
+ #undef MLK_USE_NATIVE_POLY_REDUCE
657
+ #undef MLK_USE_NATIVE_POLY_TOMONT
658
+ #undef MLK_USE_NATIVE_REJ_UNIFORM
659
+ /* mlkem/src/native/riscv64/src/arith_native_riscv64.h */
660
+ #undef MLK_NATIVE_RISCV64_SRC_ARITH_NATIVE_RISCV64_H
661
+ #undef mlk_rv64v_poly_add
662
+ #undef mlk_rv64v_poly_basemul_mont_add_k2
663
+ #undef mlk_rv64v_poly_basemul_mont_add_k3
664
+ #undef mlk_rv64v_poly_basemul_mont_add_k4
665
+ #undef mlk_rv64v_poly_invntt_tomont
666
+ #undef mlk_rv64v_poly_ntt
667
+ #undef mlk_rv64v_poly_reduce
668
+ #undef mlk_rv64v_poly_sub
669
+ #undef mlk_rv64v_poly_tomont
670
+ #undef mlk_rv64v_rej_uniform
671
+ /* mlkem/src/native/riscv64/src/rv64v_debug.h */
672
+ #undef MLK_NATIVE_RISCV64_SRC_RV64V_DEBUG_H
673
+ #undef mlk_assert_abs_bound_int16m1
674
+ #undef mlk_assert_abs_bound_int16m2
675
+ #undef mlk_assert_bound_int16m1
676
+ #undef mlk_assert_bound_int16m2
677
+ #undef mlk_debug_check_bounds_int16m1
678
+ #undef mlk_debug_check_bounds_int16m2
679
+ #endif /* MLK_SYS_RISCV64 */
680
+ #endif /* MLK_CONFIG_USE_NATIVE_BACKEND_ARITH */
681
+ #endif /* !MLK_CONFIG_MONOBUILD_KEEP_SHARED_HEADERS */