pq_crypto 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/ext/pqcrypto/pqcrypto_version.h +1 -1
  4. data/ext/pqcrypto/vendor/.vendored +4 -4
  5. data/ext/pqcrypto/vendor/mlkem-native/README.md +6 -3
  6. data/ext/pqcrypto/vendor/mlkem-native/RELEASE.md +22 -0
  7. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.c +77 -36
  8. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native.h +135 -146
  9. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_asm.S +116 -72
  10. data/ext/pqcrypto/vendor/mlkem-native/mlkem/mlkem_native_config.h +351 -415
  11. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/cbmc.h +43 -20
  12. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/common.h +16 -8
  13. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.c +57 -31
  14. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/compress.h +260 -349
  15. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/debug.h +17 -24
  16. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.c +35 -37
  17. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202.h +43 -57
  18. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.c +14 -15
  19. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/fips202x4.h +5 -4
  20. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/keccakf1600.c +42 -6
  21. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/fips202_native_aarch64.h +31 -20
  22. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x1_scalar_asm.S → keccak_f1600_x1_scalar_aarch64_asm.S} +10 -10
  23. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x1_v84a_asm.S → keccak_f1600_x1_v84a_aarch64_asm.S} +10 -10
  24. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x2_v84a_asm.S → keccak_f1600_x2_v84a_aarch64_asm.S} +10 -10
  25. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x4_v8a_scalar_hybrid_asm.S → keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S} +10 -10
  26. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/{keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S → keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S} +10 -10
  27. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +10 -9
  28. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_scalar.h +2 -1
  29. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x1_v84a.h +1 -1
  30. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x2_v84a.h +4 -2
  31. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_scalar.h +2 -2
  32. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +1 -1
  33. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/fips202_native_armv81m.h +2 -1
  34. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +55 -9
  35. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +26 -25
  36. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +58 -14
  37. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +57 -16
  38. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/auto.h +2 -1
  39. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +2 -2
  40. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/fips202_native_x86_64.h +10 -7
  41. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/{keccak_f1600_x4_avx2.S → keccak_f1600_x4_avx2_asm.S} +13 -11
  42. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/fips202/native/x86_64/src/keccakf1600_constants.c +12 -11
  43. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.c +167 -136
  44. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/indcpa.h +75 -68
  45. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/kem.h +135 -157
  46. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/meta.h +15 -13
  47. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/aarch64_zetas.c +143 -135
  48. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/arith_native_aarch64.h +52 -46
  49. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{intt.S → intt_aarch64_asm.S} +10 -10
  50. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{ntt.S → ntt_aarch64_asm.S} +10 -10
  51. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_mulcache_compute_asm.S → poly_mulcache_compute_aarch64_asm.S} +10 -10
  52. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_reduce_asm.S → poly_reduce_aarch64_asm.S} +10 -10
  53. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tobytes_asm.S → poly_tobytes_aarch64_asm.S} +10 -10
  54. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{poly_tomont_asm.S → poly_tomont_aarch64_asm.S} +10 -12
  55. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k2.S → polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S} +10 -10
  56. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k3.S → polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S} +10 -10
  57. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{polyvec_basemul_acc_montgomery_cached_asm_k4.S → polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S} +10 -10
  58. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/{rej_uniform_asm.S → rej_uniform_aarch64_asm.S} +12 -12
  59. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/aarch64/src/rej_uniform_table.c +514 -513
  60. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/api.h +254 -253
  61. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/meta.h +6 -1
  62. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/README.md +6 -0
  63. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/meta.h +77 -0
  64. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/arith_native_ppc64le.h +24 -0
  65. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.c +299 -0
  66. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/consts.h +34 -0
  67. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/intt_ppc_asm.S +3222 -0
  68. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/ntt_ppc_asm.S +1651 -0
  69. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/poly_tomont_ppc_asm.S +294 -0
  70. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/ppc64le/src/reduce_ppc_asm.S +710 -0
  71. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/meta.h +5 -0
  72. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.c +18 -16
  73. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_debug.h +19 -24
  74. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/riscv64/src/rv64v_poly.c +53 -65
  75. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/meta.h +20 -20
  76. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/arith_native_x86_64.h +106 -88
  77. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.c +45 -35
  78. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/compress_consts.h +8 -8
  79. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.c +1 -1
  80. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/consts.h +1 -1
  81. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{intt.S → intt_avx2_asm.S} +8 -8
  82. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntt.S → ntt_avx2_asm.S} +8 -8
  83. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttfrombytes.S → nttfrombytes_avx2_asm.S} +8 -8
  84. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{ntttobytes.S → ntttobytes_avx2_asm.S} +8 -8
  85. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{nttunpack.S → nttunpack_avx2_asm.S} +8 -8
  86. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d10.S → poly_compress_d10_avx2_asm.S} +9 -9
  87. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d11.S → poly_compress_d11_avx2_asm.S} +9 -9
  88. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d4.S → poly_compress_d4_avx2_asm.S} +9 -9
  89. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_compress_d5.S → poly_compress_d5_avx2_asm.S} +9 -9
  90. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d10.S → poly_decompress_d10_avx2_asm.S} +9 -9
  91. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d11.S → poly_decompress_d11_avx2_asm.S} +9 -9
  92. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d4.S → poly_decompress_d4_avx2_asm.S} +9 -9
  93. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{poly_decompress_d5.S → poly_decompress_d5_avx2_asm.S} +9 -9
  94. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{mulcache_compute.S → poly_mulcache_compute_avx2_asm.S} +8 -8
  95. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k2.S → polyvec_basemul_acc_montgomery_cached_k2_avx2_asm.S} +8 -8
  96. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k3.S → polyvec_basemul_acc_montgomery_cached_k3_avx2_asm.S} +8 -8
  97. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{polyvec_basemul_acc_montgomery_cached_asm_k4.S → polyvec_basemul_acc_montgomery_cached_k4_avx2_asm.S} +8 -8
  98. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{reduce.S → reduce_avx2_asm.S} +8 -8
  99. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{rej_uniform_asm.S → rej_uniform_avx2_asm.S} +9 -9
  100. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/rej_uniform_table.c +514 -513
  101. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/native/x86_64/src/{tomont.S → tomont_avx2_asm.S} +8 -8
  102. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.c +61 -57
  103. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly.h +89 -116
  104. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.c +31 -32
  105. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/poly_k.h +226 -301
  106. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/randombytes.h +21 -29
  107. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.c +68 -63
  108. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sampling.h +37 -48
  109. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/sys.h +44 -2
  110. data/ext/pqcrypto/vendor/mlkem-native/mlkem/src/verify.h +141 -159
  111. data/lib/pq_crypto/version.rb +1 -1
  112. data/script/vendor_libs.rb +3 -3
  113. metadata +47 -38
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  /*yaml
7
- Name: poly_mulcache_compute_asm
7
+ Name: poly_mulcache_compute_aarch64_asm
8
8
  Description: Compute multiplication cache for polynomial
9
- Signature: void mlk_poly_mulcache_compute_asm(int16_t cache[128], const int16_t mlk_poly[256], const int16_t zetas[128], const int16_t zetas_twisted[128])
9
+ Signature: void mlk_poly_mulcache_compute_aarch64_asm(int16_t cache[128], const int16_t mlk_poly[256], const int16_t zetas[128], const int16_t zetas_twisted[128])
10
10
  ABI:
11
11
  x0:
12
12
  type: buffer
@@ -41,17 +41,13 @@
41
41
 
42
42
  /*
43
43
  * WARNING: This file is auto-derived from the mlkem-native source file
44
- * dev/aarch64_opt/src/poly_mulcache_compute_asm.S using scripts/simpasm. Do not modify it directly.
44
+ * dev/aarch64_opt/src/poly_mulcache_compute_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
45
45
  */
46
46
 
47
- #if defined(__ELF__)
48
- .section .note.GNU-stack,"",@progbits
49
- #endif
50
-
51
47
  .text
52
48
  .balign 4
53
- .global MLK_ASM_NAMESPACE(poly_mulcache_compute_asm)
54
- MLK_ASM_FN_SYMBOL(poly_mulcache_compute_asm)
49
+ .global MLK_ASM_NAMESPACE(poly_mulcache_compute_aarch64_asm)
50
+ MLK_ASM_FN_SYMBOL(poly_mulcache_compute_aarch64_asm)
55
51
 
56
52
  .cfi_startproc
57
53
  mov w5, #0xd01 // =3329
@@ -122,6 +118,10 @@ Lpoly_mulcache_compute_loop_start:
122
118
  ret
123
119
  .cfi_endproc
124
120
 
125
- MLK_ASM_FN_SIZE(poly_mulcache_compute_asm)
121
+ MLK_ASM_FN_SIZE(poly_mulcache_compute_aarch64_asm)
126
122
 
127
123
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
124
+
125
+ #if defined(__ELF__)
126
+ .section .note.GNU-stack,"",%progbits
127
+ #endif
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  /*yaml
7
- Name: poly_reduce_asm
7
+ Name: poly_reduce_aarch64_asm
8
8
  Description: Barrett reduction of polynomial coefficients
9
- Signature: void mlk_poly_reduce_asm(int16_t p[256])
9
+ Signature: void mlk_poly_reduce_aarch64_asm(int16_t p[256])
10
10
  ABI:
11
11
  x0:
12
12
  type: buffer
@@ -23,17 +23,13 @@
23
23
 
24
24
  /*
25
25
  * WARNING: This file is auto-derived from the mlkem-native source file
26
- * dev/aarch64_opt/src/poly_reduce_asm.S using scripts/simpasm. Do not modify it directly.
26
+ * dev/aarch64_opt/src/poly_reduce_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
27
27
  */
28
28
 
29
- #if defined(__ELF__)
30
- .section .note.GNU-stack,"",@progbits
31
- #endif
32
-
33
29
  .text
34
30
  .balign 4
35
- .global MLK_ASM_NAMESPACE(poly_reduce_asm)
36
- MLK_ASM_FN_SYMBOL(poly_reduce_asm)
31
+ .global MLK_ASM_NAMESPACE(poly_reduce_aarch64_asm)
32
+ MLK_ASM_FN_SYMBOL(poly_reduce_aarch64_asm)
37
33
 
38
34
  .cfi_startproc
39
35
  mov w2, #0xd01 // =3329
@@ -145,6 +141,10 @@ Lpoly_reduce_loop_start:
145
141
  ret
146
142
  .cfi_endproc
147
143
 
148
- MLK_ASM_FN_SIZE(poly_reduce_asm)
144
+ MLK_ASM_FN_SIZE(poly_reduce_aarch64_asm)
149
145
 
150
146
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
147
+
148
+ #if defined(__ELF__)
149
+ .section .note.GNU-stack,"",%progbits
150
+ #endif
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  /*yaml
7
- Name: poly_tobytes_asm
7
+ Name: poly_tobytes_aarch64_asm
8
8
  Description: Convert polynomial to byte representation
9
- Signature: void mlk_poly_tobytes_asm(uint8_t r[384], const int16_t a[256])
9
+ Signature: void mlk_poly_tobytes_aarch64_asm(uint8_t r[384], const int16_t a[256])
10
10
  ABI:
11
11
  x0:
12
12
  type: buffer
@@ -29,17 +29,13 @@
29
29
 
30
30
  /*
31
31
  * WARNING: This file is auto-derived from the mlkem-native source file
32
- * dev/aarch64_opt/src/poly_tobytes_asm.S using scripts/simpasm. Do not modify it directly.
32
+ * dev/aarch64_opt/src/poly_tobytes_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
33
33
  */
34
34
 
35
- #if defined(__ELF__)
36
- .section .note.GNU-stack,"",@progbits
37
- #endif
38
-
39
35
  .text
40
36
  .balign 4
41
- .global MLK_ASM_NAMESPACE(poly_tobytes_asm)
42
- MLK_ASM_FN_SYMBOL(poly_tobytes_asm)
37
+ .global MLK_ASM_NAMESPACE(poly_tobytes_aarch64_asm)
38
+ MLK_ASM_FN_SYMBOL(poly_tobytes_aarch64_asm)
43
39
 
44
40
  .cfi_startproc
45
41
  mov x2, #0x10 // =16
@@ -112,6 +108,10 @@ Lpoly_tobytes_loop_start:
112
108
  ret
113
109
  .cfi_endproc
114
110
 
115
- MLK_ASM_FN_SIZE(poly_tobytes_asm)
111
+ MLK_ASM_FN_SIZE(poly_tobytes_aarch64_asm)
116
112
 
117
113
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
114
+
115
+ #if defined(__ELF__)
116
+ .section .note.GNU-stack,"",%progbits
117
+ #endif
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  /*yaml
7
- Name: poly_tomont_asm
7
+ Name: poly_tomont_aarch64_asm
8
8
  Description: Convert polynomial to Montgomery domain
9
- Signature: void mlk_poly_tomont_asm(int16_t p[256])
9
+ Signature: void mlk_poly_tomont_aarch64_asm(int16_t p[256])
10
10
  ABI:
11
11
  x0:
12
12
  type: buffer
@@ -23,23 +23,17 @@
23
23
 
24
24
  /*
25
25
  * WARNING: This file is auto-derived from the mlkem-native source file
26
- * dev/aarch64_opt/src/poly_tomont_asm.S using scripts/simpasm. Do not modify it directly.
26
+ * dev/aarch64_opt/src/poly_tomont_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
27
27
  */
28
28
 
29
- #if defined(__ELF__)
30
- .section .note.GNU-stack,"",@progbits
31
- #endif
32
-
33
29
  .text
34
30
  .balign 4
35
- .global MLK_ASM_NAMESPACE(poly_tomont_asm)
36
- MLK_ASM_FN_SYMBOL(poly_tomont_asm)
31
+ .global MLK_ASM_NAMESPACE(poly_tomont_aarch64_asm)
32
+ MLK_ASM_FN_SYMBOL(poly_tomont_aarch64_asm)
37
33
 
38
34
  .cfi_startproc
39
35
  mov w2, #0xd01 // =3329
40
36
  dup v4.8h, w2
41
- mov w2, #0x4ebf // =20159
42
- dup v5.8h, w2
43
37
  mov w2, #-0x414 // =-1044
44
38
  dup v2.8h, w2
45
39
  mov w2, #-0x2824 // =-10276
@@ -93,6 +87,10 @@ Lpoly_tomont_loop:
93
87
  ret
94
88
  .cfi_endproc
95
89
 
96
- MLK_ASM_FN_SIZE(poly_tomont_asm)
90
+ MLK_ASM_FN_SIZE(poly_tomont_aarch64_asm)
97
91
 
98
92
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
93
+
94
+ #if defined(__ELF__)
95
+ .section .note.GNU-stack,"",%progbits
96
+ #endif
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  /*yaml
16
- Name: polyvec_basemul_acc_montgomery_cached_asm_k2
16
+ Name: polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm
17
17
  Description: Re-implementation of asymmetric base multiplication following @[NeonNTT] for k=2
18
- Signature: void mlk_polyvec_basemul_acc_montgomery_cached_asm_k2(int16_t r[256], const int16_t a[512], const int16_t b[512], const int16_t b_cache[256])
18
+ Signature: void mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm(int16_t r[256], const int16_t a[512], const int16_t b[512], const int16_t b_cache[256])
19
19
  ABI:
20
20
  x0:
21
21
  type: buffer
@@ -53,17 +53,13 @@
53
53
 
54
54
  /*
55
55
  * WARNING: This file is auto-derived from the mlkem-native source file
56
- * dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S using scripts/simpasm. Do not modify it directly.
56
+ * dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
57
57
  */
58
58
 
59
- #if defined(__ELF__)
60
- .section .note.GNU-stack,"",@progbits
61
- #endif
62
-
63
59
  .text
64
60
  .balign 4
65
- .global MLK_ASM_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k2)
66
- MLK_ASM_FN_SYMBOL(polyvec_basemul_acc_montgomery_cached_asm_k2)
61
+ .global MLK_ASM_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm)
62
+ MLK_ASM_FN_SYMBOL(polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm)
67
63
 
68
64
  .cfi_startproc
69
65
  sub sp, sp, #0x40
@@ -254,8 +250,12 @@ Lpolyvec_basemul_acc_montgomery_cached_k2_loop_start:
254
250
  ret
255
251
  .cfi_endproc
256
252
 
257
- MLK_ASM_FN_SIZE(polyvec_basemul_acc_montgomery_cached_asm_k2)
253
+ MLK_ASM_FN_SIZE(polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm)
258
254
 
259
255
 
260
256
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED && \
261
257
  (MLK_CONFIG_MULTILEVEL_WITH_SHARED || MLKEM_K == 2) */
258
+
259
+ #if defined(__ELF__)
260
+ .section .note.GNU-stack,"",%progbits
261
+ #endif
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  /*yaml
16
- Name: polyvec_basemul_acc_montgomery_cached_asm_k3
16
+ Name: polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm
17
17
  Description: Re-implementation of asymmetric base multiplication following @[NeonNTT] for k=3
18
- Signature: void mlk_polyvec_basemul_acc_montgomery_cached_asm_k3(int16_t r[256], const int16_t a[768], const int16_t b[768], const int16_t b_cache[384])
18
+ Signature: void mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm(int16_t r[256], const int16_t a[768], const int16_t b[768], const int16_t b_cache[384])
19
19
  ABI:
20
20
  x0:
21
21
  type: buffer
@@ -53,17 +53,13 @@
53
53
 
54
54
  /*
55
55
  * WARNING: This file is auto-derived from the mlkem-native source file
56
- * dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S using scripts/simpasm. Do not modify it directly.
56
+ * dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
57
57
  */
58
58
 
59
- #if defined(__ELF__)
60
- .section .note.GNU-stack,"",@progbits
61
- #endif
62
-
63
59
  .text
64
60
  .balign 4
65
- .global MLK_ASM_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k3)
66
- MLK_ASM_FN_SYMBOL(polyvec_basemul_acc_montgomery_cached_asm_k3)
61
+ .global MLK_ASM_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm)
62
+ MLK_ASM_FN_SYMBOL(polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm)
67
63
 
68
64
  .cfi_startproc
69
65
  sub sp, sp, #0x40
@@ -308,7 +304,11 @@ Lpolyvec_basemul_acc_montgomery_cached_k3_loop_start:
308
304
  ret
309
305
  .cfi_endproc
310
306
 
311
- MLK_ASM_FN_SIZE(polyvec_basemul_acc_montgomery_cached_asm_k3)
307
+ MLK_ASM_FN_SIZE(polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm)
312
308
 
313
309
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED && \
314
310
  (MLK_CONFIG_MULTILEVEL_WITH_SHARED || MLKEM_K == 3) */
311
+
312
+ #if defined(__ELF__)
313
+ .section .note.GNU-stack,"",%progbits
314
+ #endif
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  /*yaml
16
- Name: polyvec_basemul_acc_montgomery_cached_asm_k4
16
+ Name: polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm
17
17
  Description: Re-implementation of asymmetric base multiplication following @[NeonNTT] for k=4
18
- Signature: void mlk_polyvec_basemul_acc_montgomery_cached_asm_k4(int16_t r[256], const int16_t a[1024], const int16_t b[1024], const int16_t b_cache[512])
18
+ Signature: void mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm(int16_t r[256], const int16_t a[1024], const int16_t b[1024], const int16_t b_cache[512])
19
19
  ABI:
20
20
  x0:
21
21
  type: buffer
@@ -53,17 +53,13 @@
53
53
 
54
54
  /*
55
55
  * WARNING: This file is auto-derived from the mlkem-native source file
56
- * dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S using scripts/simpasm. Do not modify it directly.
56
+ * dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
57
57
  */
58
58
 
59
- #if defined(__ELF__)
60
- .section .note.GNU-stack,"",@progbits
61
- #endif
62
-
63
59
  .text
64
60
  .balign 4
65
- .global MLK_ASM_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k4)
66
- MLK_ASM_FN_SYMBOL(polyvec_basemul_acc_montgomery_cached_asm_k4)
61
+ .global MLK_ASM_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm)
62
+ MLK_ASM_FN_SYMBOL(polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm)
67
63
 
68
64
  .cfi_startproc
69
65
  sub sp, sp, #0x40
@@ -362,7 +358,11 @@ Lpolyvec_basemul_acc_montgomery_cached_k4_loop_start:
362
358
  ret
363
359
  .cfi_endproc
364
360
 
365
- MLK_ASM_FN_SIZE(polyvec_basemul_acc_montgomery_cached_asm_k4)
361
+ MLK_ASM_FN_SIZE(polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm)
366
362
 
367
363
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED && \
368
364
  (MLK_CONFIG_MULTILEVEL_WITH_SHARED || MLKEM_K == 4) */
365
+
366
+ #if defined(__ELF__)
367
+ .section .note.GNU-stack,"",%progbits
368
+ #endif
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  /*yaml
7
- Name: rej_uniform_asm
7
+ Name: rej_uniform_aarch64_asm
8
8
  Description: Run rejection sampling on uniform random bytes to generate uniform random integers mod q
9
- Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[2048])
9
+ Signature: uint64_t mlk_rej_uniform_aarch64_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[4096])
10
10
  ABI:
11
11
  x0:
12
12
  type: buffer
@@ -27,9 +27,9 @@
27
27
  test_with: 504 # MLKEM_GEN_MATRIX_NBLOCKS * MLK_XOF_RATE
28
28
  x3:
29
29
  type: buffer
30
- size_bytes: 2048
30
+ size_bytes: 4096
31
31
  permissions: read-only
32
- c_parameter: const uint8_t table[2048]
32
+ c_parameter: const uint8_t table[4096]
33
33
  description: Lookup table
34
34
  Stack:
35
35
  bytes: 576
@@ -42,17 +42,13 @@
42
42
 
43
43
  /*
44
44
  * WARNING: This file is auto-derived from the mlkem-native source file
45
- * dev/aarch64_opt/src/rej_uniform_asm.S using scripts/simpasm. Do not modify it directly.
45
+ * dev/aarch64_opt/src/rej_uniform_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
46
46
  */
47
47
 
48
- #if defined(__ELF__)
49
- .section .note.GNU-stack,"",@progbits
50
- #endif
51
-
52
48
  .text
53
49
  .balign 4
54
- .global MLK_ASM_NAMESPACE(rej_uniform_asm)
55
- MLK_ASM_FN_SYMBOL(rej_uniform_asm)
50
+ .global MLK_ASM_NAMESPACE(rej_uniform_aarch64_asm)
51
+ MLK_ASM_FN_SYMBOL(rej_uniform_aarch64_asm)
56
52
 
57
53
  .cfi_startproc
58
54
  sub sp, sp, #0x240
@@ -221,6 +217,10 @@ Lrej_uniform_return:
221
217
  ret
222
218
  .cfi_endproc
223
219
 
224
- MLK_ASM_FN_SIZE(rej_uniform_asm)
220
+ MLK_ASM_FN_SIZE(rej_uniform_aarch64_asm)
225
221
 
226
222
  #endif /* MLK_ARITH_BACKEND_AARCH64 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
223
+
224
+ #if defined(__ELF__)
225
+ .section .note.GNU-stack,"",%progbits
226
+ #endif