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
@@ -9,9 +9,9 @@
9
9
  // Author: Matthias Kannwischer <matthias@kannwischer.eu>
10
10
 
11
11
  /*yaml
12
- Name: keccak_f1600_x1_scalar_asm
12
+ Name: keccak_f1600_x1_scalar_aarch64_asm
13
13
  Description: AArch64 scalar implementation of Keccak-f[1600] permutation for single state
14
- Signature: void mlk_keccak_f1600_x1_scalar_asm(uint64_t state[25], const uint64_t rc[24])
14
+ Signature: void mlk_keccak_f1600_x1_scalar_aarch64_asm(uint64_t state[25], const uint64_t rc[24])
15
15
  ABI:
16
16
  x0:
17
17
  type: buffer
@@ -36,17 +36,13 @@
36
36
 
37
37
  /*
38
38
  * WARNING: This file is auto-derived from the mlkem-native source file
39
- * dev/fips202/aarch64/src/keccak_f1600_x1_scalar_asm.S using scripts/simpasm. Do not modify it directly.
39
+ * dev/fips202/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
40
40
  */
41
41
 
42
- #if defined(__ELF__)
43
- .section .note.GNU-stack,"",@progbits
44
- #endif
45
-
46
42
  .text
47
43
  .balign 4
48
- .global MLK_ASM_NAMESPACE(keccak_f1600_x1_scalar_asm)
49
- MLK_ASM_FN_SYMBOL(keccak_f1600_x1_scalar_asm)
44
+ .global MLK_ASM_NAMESPACE(keccak_f1600_x1_scalar_aarch64_asm)
45
+ MLK_ASM_FN_SYMBOL(keccak_f1600_x1_scalar_aarch64_asm)
50
46
 
51
47
  .cfi_startproc
52
48
  sub sp, sp, #0x80
@@ -369,7 +365,11 @@ Lkeccak_f1600_x1_scalar_loop:
369
365
  ret
370
366
  .cfi_endproc
371
367
 
372
- MLK_ASM_FN_SIZE(keccak_f1600_x1_scalar_asm)
368
+ MLK_ASM_FN_SIZE(keccak_f1600_x1_scalar_aarch64_asm)
373
369
 
374
370
  #endif /* MLK_FIPS202_AARCH64_NEED_X1_SCALAR && \
375
371
  !MLK_CONFIG_MULTILEVEL_NO_SHARED */
372
+
373
+ #if defined(__ELF__)
374
+ .section .note.GNU-stack,"",%progbits
375
+ #endif
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  /*yaml
18
- Name: keccak_f1600_x1_v84a_asm
18
+ Name: keccak_f1600_x1_v84a_aarch64_asm
19
19
  Description: AArch64 ARMv8.4-A implementation of Keccak-f[1600] permutation for single state
20
- Signature: void mlk_keccak_f1600_x1_v84a_asm(uint64_t state[25], const uint64_t rc[24])
20
+ Signature: void mlk_keccak_f1600_x1_v84a_aarch64_asm(uint64_t state[25], const uint64_t rc[24])
21
21
  ABI:
22
22
  x0:
23
23
  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/fips202/aarch64/src/keccak_f1600_x1_v84a_asm.S using scripts/simpasm. Do not modify it directly.
56
+ * dev/fips202/aarch64/src/keccak_f1600_x1_v84a_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(keccak_f1600_x1_v84a_asm)
66
- MLK_ASM_FN_SYMBOL(keccak_f1600_x1_v84a_asm)
61
+ .global MLK_ASM_NAMESPACE(keccak_f1600_x1_v84a_aarch64_asm)
62
+ MLK_ASM_FN_SYMBOL(keccak_f1600_x1_v84a_aarch64_asm)
67
63
 
68
64
  .cfi_startproc
69
65
  sub sp, sp, #0x40
@@ -195,9 +191,13 @@ Lkeccak_f1600_x1_v84a_loop:
195
191
  ret
196
192
  .cfi_endproc
197
193
 
198
- MLK_ASM_FN_SIZE(keccak_f1600_x1_v84a_asm)
194
+ MLK_ASM_FN_SIZE(keccak_f1600_x1_v84a_aarch64_asm)
199
195
 
200
196
  #endif /* __ARM_FEATURE_SHA3 */
201
197
 
202
198
  #endif /* MLK_FIPS202_AARCH64_NEED_X1_V84A && !MLK_CONFIG_MULTILEVEL_NO_SHARED \
203
199
  */
200
+
201
+ #if defined(__ELF__)
202
+ .section .note.GNU-stack,"",%progbits
203
+ #endif
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  /*yaml
18
- Name: keccak_f1600_x2_v84a_asm
18
+ Name: keccak_f1600_x2_v84a_aarch64_asm
19
19
  Description: AArch64 ARMv8.4-A implementation of Keccak-f[1600] permutation for two sequential states
20
- Signature: void mlk_keccak_f1600_x2_v84a_asm(uint64_t state[50], const uint64_t rc[24])
20
+ Signature: void mlk_keccak_f1600_x2_v84a_aarch64_asm(uint64_t state[50], const uint64_t rc[24])
21
21
  ABI:
22
22
  x0:
23
23
  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/fips202/aarch64/src/keccak_f1600_x2_v84a_asm.S using scripts/simpasm. Do not modify it directly.
56
+ * dev/fips202/aarch64/src/keccak_f1600_x2_v84a_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(keccak_f1600_x2_v84a_asm)
66
- MLK_ASM_FN_SYMBOL(keccak_f1600_x2_v84a_asm)
61
+ .global MLK_ASM_NAMESPACE(keccak_f1600_x2_v84a_aarch64_asm)
62
+ MLK_ASM_FN_SYMBOL(keccak_f1600_x2_v84a_aarch64_asm)
67
63
 
68
64
  .cfi_startproc
69
65
  sub sp, sp, #0x40
@@ -250,9 +246,13 @@ Lkeccak_f1600_x2_v84a_loop:
250
246
  ret
251
247
  .cfi_endproc
252
248
 
253
- MLK_ASM_FN_SIZE(keccak_f1600_x2_v84a_asm)
249
+ MLK_ASM_FN_SIZE(keccak_f1600_x2_v84a_aarch64_asm)
254
250
 
255
251
  #endif /* __ARM_FEATURE_SHA3 */
256
252
 
257
253
  #endif /* MLK_FIPS202_AARCH64_NEED_X2_V84A && !MLK_CONFIG_MULTILEVEL_NO_SHARED \
258
254
  */
255
+
256
+ #if defined(__ELF__)
257
+ .section .note.GNU-stack,"",%progbits
258
+ #endif
@@ -9,9 +9,9 @@
9
9
  // Author: Matthias Kannwischer <matthias@kannwischer.eu>
10
10
 
11
11
  /*yaml
12
- Name: keccak_f1600_x4_v8a_scalar_hybrid_asm
12
+ Name: keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm
13
13
  Description: AArch64 hybrid scalar/vector implementation of Keccak-f[1600] permutation for four sequential states
14
- Signature: void mlk_keccak_f1600_x4_v8a_scalar_hybrid_asm(uint64_t state[100], const uint64_t rc[24])
14
+ Signature: void mlk_keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm(uint64_t state[100], const uint64_t rc[24])
15
15
  ABI:
16
16
  x0:
17
17
  type: buffer
@@ -36,17 +36,13 @@
36
36
 
37
37
  /*
38
38
  * WARNING: This file is auto-derived from the mlkem-native source file
39
- * dev/fips202/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S using scripts/simpasm. Do not modify it directly.
39
+ * dev/fips202/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
40
40
  */
41
41
 
42
- #if defined(__ELF__)
43
- .section .note.GNU-stack,"",@progbits
44
- #endif
45
-
46
42
  .text
47
43
  .balign 4
48
- .global MLK_ASM_NAMESPACE(keccak_f1600_x4_v8a_scalar_hybrid_asm)
49
- MLK_ASM_FN_SYMBOL(keccak_f1600_x4_v8a_scalar_hybrid_asm)
44
+ .global MLK_ASM_NAMESPACE(keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm)
45
+ MLK_ASM_FN_SYMBOL(keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm)
50
46
 
51
47
  .cfi_startproc
52
48
  sub sp, sp, #0xe0
@@ -1070,7 +1066,11 @@ Lkeccak_f1600_x4_v8a_scalar_hybrid_done:
1070
1066
  ret
1071
1067
  .cfi_endproc
1072
1068
 
1073
- MLK_ASM_FN_SIZE(keccak_f1600_x4_v8a_scalar_hybrid_asm)
1069
+ MLK_ASM_FN_SIZE(keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm)
1074
1070
 
1075
1071
  #endif /* MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID && \
1076
1072
  !MLK_CONFIG_MULTILEVEL_NO_SHARED */
1073
+
1074
+ #if defined(__ELF__)
1075
+ .section .note.GNU-stack,"",%progbits
1076
+ #endif
@@ -9,9 +9,9 @@
9
9
  // Author: Matthias Kannwischer <matthias@kannwischer.eu>
10
10
 
11
11
  /*yaml
12
- Name: keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm
12
+ Name: keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm
13
13
  Description: AArch64 hybrid scalar/vector implementation of Keccak-f[1600] permutation for four sequential states with ARMv8.4-A optimizations
14
- Signature: void mlk_keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm(uint64_t state[100], const uint64_t rc[24])
14
+ Signature: void mlk_keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm(uint64_t state[100], const uint64_t rc[24])
15
15
  ABI:
16
16
  x0:
17
17
  type: buffer
@@ -38,17 +38,13 @@
38
38
 
39
39
  /*
40
40
  * WARNING: This file is auto-derived from the mlkem-native source file
41
- * dev/fips202/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S using scripts/simpasm. Do not modify it directly.
41
+ * dev/fips202/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
42
42
  */
43
43
 
44
- #if defined(__ELF__)
45
- .section .note.GNU-stack,"",@progbits
46
- #endif
47
-
48
44
  .text
49
45
  .balign 4
50
- .global MLK_ASM_NAMESPACE(keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm)
51
- MLK_ASM_FN_SYMBOL(keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm)
46
+ .global MLK_ASM_NAMESPACE(keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm)
47
+ MLK_ASM_FN_SYMBOL(keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm)
52
48
 
53
49
  .cfi_startproc
54
50
  sub sp, sp, #0xe0
@@ -978,9 +974,13 @@ Lkeccak_f1600_x4_v8a_v84a_scalar_hybrid_done:
978
974
  ret
979
975
  .cfi_endproc
980
976
 
981
- MLK_ASM_FN_SIZE(keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm)
977
+ MLK_ASM_FN_SIZE(keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm)
982
978
 
983
979
  #endif /* __ARM_FEATURE_SHA3 */
984
980
 
985
981
  #endif /* MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID && \
986
982
  !MLK_CONFIG_MULTILEVEL_NO_SHARED */
983
+
984
+ #if defined(__ELF__)
985
+ .section .note.GNU-stack,"",%progbits
986
+ #endif
@@ -20,15 +20,16 @@
20
20
 
21
21
  #include "fips202_native_aarch64.h"
22
22
 
23
- MLK_ALIGN const uint64_t mlk_keccakf1600_round_constants[] = {
24
- 0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
25
- 0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
26
- 0x8000000080008081, 0x8000000000008009, 0x000000000000008a,
27
- 0x0000000000000088, 0x0000000080008009, 0x000000008000000a,
28
- 0x000000008000808b, 0x800000000000008b, 0x8000000000008089,
29
- 0x8000000000008003, 0x8000000000008002, 0x8000000000000080,
30
- 0x000000000000800a, 0x800000008000000a, 0x8000000080008081,
31
- 0x8000000000008080, 0x0000000080000001, 0x8000000080008008,
23
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const uint64_t
24
+ mlk_keccakf1600_round_constants[24] = {
25
+ 0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
26
+ 0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
27
+ 0x8000000080008081, 0x8000000000008009, 0x000000000000008a,
28
+ 0x0000000000000088, 0x0000000080008009, 0x000000008000000a,
29
+ 0x000000008000808b, 0x800000000000008b, 0x8000000000008089,
30
+ 0x8000000000008003, 0x8000000000008002, 0x8000000000000080,
31
+ 0x000000000000800a, 0x800000008000000a, 0x8000000080008081,
32
+ 0x8000000000008080, 0x0000000080000001, 0x8000000080008008,
32
33
  };
33
34
 
34
35
  #else /* (MLK_FIPS202_AARCH64_NEED_X1_SCALAR || \
@@ -17,7 +17,8 @@
17
17
  MLK_MUST_CHECK_RETURN_VALUE
18
18
  static MLK_INLINE int mlk_keccak_f1600_x1_native(uint64_t *state)
19
19
  {
20
- mlk_keccak_f1600_x1_scalar_asm(state, mlk_keccakf1600_round_constants);
20
+ mlk_keccak_f1600_x1_scalar_aarch64_asm(state,
21
+ mlk_keccakf1600_round_constants);
21
22
  return MLK_NATIVE_FUNC_SUCCESS;
22
23
  }
23
24
  #endif /* !__ASSEMBLER__ */
@@ -26,7 +26,7 @@ static MLK_INLINE int mlk_keccak_f1600_x1_native(uint64_t *state)
26
26
  return MLK_NATIVE_FUNC_FALLBACK;
27
27
  }
28
28
 
29
- mlk_keccak_f1600_x1_v84a_asm(state, mlk_keccakf1600_round_constants);
29
+ mlk_keccak_f1600_x1_v84a_aarch64_asm(state, mlk_keccakf1600_round_constants);
30
30
  return MLK_NATIVE_FUNC_SUCCESS;
31
31
  }
32
32
  #endif /* !__ASSEMBLER__ */
@@ -26,8 +26,10 @@ static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
26
26
  return MLK_NATIVE_FUNC_FALLBACK;
27
27
  }
28
28
 
29
- mlk_keccak_f1600_x2_v84a_asm(state + 0 * 25, mlk_keccakf1600_round_constants);
30
- mlk_keccak_f1600_x2_v84a_asm(state + 2 * 25, mlk_keccakf1600_round_constants);
29
+ mlk_keccak_f1600_x2_v84a_aarch64_asm(state + 0 * 25,
30
+ mlk_keccakf1600_round_constants);
31
+ mlk_keccak_f1600_x2_v84a_aarch64_asm(state + 2 * 25,
32
+ mlk_keccakf1600_round_constants);
31
33
  return MLK_NATIVE_FUNC_SUCCESS;
32
34
  }
33
35
  #endif /* !__ASSEMBLER__ */
@@ -17,8 +17,8 @@
17
17
  MLK_MUST_CHECK_RETURN_VALUE
18
18
  static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
19
19
  {
20
- mlk_keccak_f1600_x4_v8a_scalar_hybrid_asm(state,
21
- mlk_keccakf1600_round_constants);
20
+ mlk_keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm(
21
+ state, mlk_keccakf1600_round_constants);
22
22
  return MLK_NATIVE_FUNC_SUCCESS;
23
23
  }
24
24
  #endif /* !__ASSEMBLER__ */
@@ -26,7 +26,7 @@ static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
26
26
  return MLK_NATIVE_FUNC_FALLBACK;
27
27
  }
28
28
 
29
- mlk_keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm(
29
+ mlk_keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm(
30
30
  state, mlk_keccakf1600_round_constants);
31
31
  return MLK_NATIVE_FUNC_SUCCESS;
32
32
  }
@@ -10,7 +10,8 @@
10
10
  /* Keccak round constants in bit-interleaved form */
11
11
  #define mlk_keccakf1600_round_constants \
12
12
  MLK_NAMESPACE(keccakf1600_round_constants)
13
- extern const uint32_t mlk_keccakf1600_round_constants[48];
13
+ MLK_INTERNAL_DATA_DECLARATION const uint32_t
14
+ mlk_keccakf1600_round_constants[48];
14
15
 
15
16
  #define mlk_keccak_f1600_x4_mve_asm MLK_NAMESPACE(keccak_f1600_x4_mve_asm)
16
17
  void mlk_keccak_f1600_x4_mve_asm(uint64_t state[100], uint64_t tmpstate[100],
@@ -28,8 +28,8 @@
28
28
  c_parameter: const uint32_t *rc
29
29
  description: Keccak round constants in bit-interleaved form (24 pairs of 32-bit words)
30
30
  Stack:
31
- bytes: 236
32
- description: register preservation (44) + SIMD registers (64) + temporary storage (128)
31
+ bytes: 228
32
+ description: register preservation (36) + SIMD registers (64) + temporary storage (128)
33
33
  */
34
34
 
35
35
  // ---------------------------------------------------------------------------
@@ -79,9 +79,30 @@
79
79
  .global MLK_ASM_NAMESPACE(keccak_f1600_x4_mve_asm)
80
80
  MLK_ASM_FN_SYMBOL(keccak_f1600_x4_mve_asm)
81
81
 
82
- push.w {r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
82
+ .cfi_startproc
83
+ push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
84
+ .cfi_adjust_cfa_offset 0x24
85
+ .cfi_rel_offset r4, 0x0
86
+ .cfi_rel_offset r5, 0x4
87
+ .cfi_rel_offset r6, 0x8
88
+ .cfi_rel_offset r7, 0xc
89
+ .cfi_rel_offset r8, 0x10
90
+ .cfi_rel_offset r9, 0x14
91
+ .cfi_rel_offset r10, 0x18
92
+ .cfi_rel_offset r11, 0x1c
93
+ .cfi_rel_offset lr, 0x20
83
94
  vpush {d8, d9, d10, d11, d12, d13, d14, d15}
95
+ .cfi_adjust_cfa_offset 0x40
96
+ .cfi_rel_offset d8, 0x0
97
+ .cfi_rel_offset d9, 0x8
98
+ .cfi_rel_offset d10, 0x10
99
+ .cfi_rel_offset d11, 0x18
100
+ .cfi_rel_offset d12, 0x20
101
+ .cfi_rel_offset d13, 0x28
102
+ .cfi_rel_offset d14, 0x30
103
+ .cfi_rel_offset d15, 0x38
84
104
  sub sp, #0x80
105
+ .cfi_adjust_cfa_offset 0x80
85
106
  mov r6, r2
86
107
  mov.w lr, #0x18
87
108
  mov r2, r0
@@ -90,9 +111,9 @@ MLK_ASM_FN_SYMBOL(keccak_f1600_x4_mve_asm)
90
111
  vldrw.u32 q0, [r3]
91
112
  vldrw.u32 q1, [r2]
92
113
  vldrw.u32 q2, [r2, #32]
93
- wls lr, lr, keccak_f1600_x4_mve_asm_roundend @ imm = #0x8c0
114
+ wls lr, lr, Lkeccak_f1600_x4_mve_asm_roundend @ imm = #0x8c0
94
115
 
95
- keccak_f1600_x4_mve_asm_roundstart:
116
+ Lkeccak_f1600_x4_mve_asm_roundstart:
96
117
  vldrw.u32 q6, [r2, #112]
97
118
  veor q7, q6, q2
98
119
  vldrw.u32 q2, [r2, #80]
@@ -653,15 +674,40 @@ keccak_f1600_x4_mve_asm_roundstart:
653
674
  veor q0, q4, q6
654
675
  vstrw.32 q0, [r5]
655
676
 
656
- keccak_f1600_x4_mve_asm_roundend_pre:
657
- le lr, keccak_f1600_x4_mve_asm_roundstart @ imm = #-0x8c0
677
+ Lkeccak_f1600_x4_mve_asm_roundend_pre:
678
+ le lr, Lkeccak_f1600_x4_mve_asm_roundstart @ imm = #-0x8c0
658
679
 
659
- keccak_f1600_x4_mve_asm_roundend:
680
+ Lkeccak_f1600_x4_mve_asm_roundend:
660
681
  add sp, #0x80
682
+ .cfi_adjust_cfa_offset -0x80
661
683
  vpop {d8, d9, d10, d11, d12, d13, d14, d15}
662
- pop.w {r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, pc}
684
+ .cfi_restore d8
685
+ .cfi_restore d9
686
+ .cfi_restore d10
687
+ .cfi_restore d11
688
+ .cfi_restore d12
689
+ .cfi_restore d13
690
+ .cfi_restore d14
691
+ .cfi_restore d15
692
+ .cfi_adjust_cfa_offset -0x40
693
+ pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
694
+ .cfi_restore r4
695
+ .cfi_restore r5
696
+ .cfi_restore r6
697
+ .cfi_restore r7
698
+ .cfi_restore r8
699
+ .cfi_restore r9
700
+ .cfi_restore r10
701
+ .cfi_restore r11
702
+ .cfi_restore lr
703
+ .cfi_adjust_cfa_offset -0x24
704
+ .cfi_endproc
663
705
  nop
664
706
 
665
707
  MLK_ASM_FN_SIZE(keccak_f1600_x4_mve_asm)
666
708
 
667
709
  #endif /* MLK_FIPS202_ARMV81M_NEED_X4 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
710
+
711
+ #if defined(__ELF__)
712
+ .section .note.GNU-stack,"",%progbits
713
+ #endif
@@ -16,31 +16,32 @@
16
16
  * - low word contains even-indexed bits
17
17
  * - high word contains odd-indexed bits
18
18
  */
19
- MLK_ALIGN const uint32_t mlk_keccakf1600_round_constants[48] = {
20
- 0x00000001, 0x00000000, /* RC0 */
21
- 0x00000000, 0x00000089, /* RC1 */
22
- 0x00000000, 0x8000008b, /* RC2 */
23
- 0x00000000, 0x80008080, /* RC3 */
24
- 0x00000001, 0x0000008b, /* RC4 */
25
- 0x00000001, 0x00008000, /* RC5 */
26
- 0x00000001, 0x80008088, /* RC6 */
27
- 0x00000001, 0x80000082, /* RC7 */
28
- 0x00000000, 0x0000000b, /* RC8 */
29
- 0x00000000, 0x0000000a, /* RC9 */
30
- 0x00000001, 0x00008082, /* RC10 */
31
- 0x00000000, 0x00008003, /* RC11 */
32
- 0x00000001, 0x0000808b, /* RC12 */
33
- 0x00000001, 0x8000000b, /* RC13 */
34
- 0x00000001, 0x8000008a, /* RC14 */
35
- 0x00000001, 0x80000081, /* RC15 */
36
- 0x00000000, 0x80000081, /* RC16 */
37
- 0x00000000, 0x80000008, /* RC17 */
38
- 0x00000000, 0x00000083, /* RC18 */
39
- 0x00000000, 0x80008003, /* RC19 */
40
- 0x00000001, 0x80008088, /* RC20 */
41
- 0x00000000, 0x80000088, /* RC21 */
42
- 0x00000001, 0x00008000, /* RC22 */
43
- 0x00000000, 0x80008082, /* RC23 */
19
+ MLK_ALIGN MLK_INTERNAL_DATA_DEFINITION const uint32_t
20
+ mlk_keccakf1600_round_constants[48] = {
21
+ 0x00000001, 0x00000000, /* RC0 */
22
+ 0x00000000, 0x00000089, /* RC1 */
23
+ 0x00000000, 0x8000008b, /* RC2 */
24
+ 0x00000000, 0x80008080, /* RC3 */
25
+ 0x00000001, 0x0000008b, /* RC4 */
26
+ 0x00000001, 0x00008000, /* RC5 */
27
+ 0x00000001, 0x80008088, /* RC6 */
28
+ 0x00000001, 0x80000082, /* RC7 */
29
+ 0x00000000, 0x0000000b, /* RC8 */
30
+ 0x00000000, 0x0000000a, /* RC9 */
31
+ 0x00000001, 0x00008082, /* RC10 */
32
+ 0x00000000, 0x00008003, /* RC11 */
33
+ 0x00000001, 0x0000808b, /* RC12 */
34
+ 0x00000001, 0x8000000b, /* RC13 */
35
+ 0x00000001, 0x8000008a, /* RC14 */
36
+ 0x00000001, 0x80000081, /* RC15 */
37
+ 0x00000000, 0x80000081, /* RC16 */
38
+ 0x00000000, 0x80000008, /* RC17 */
39
+ 0x00000000, 0x00000083, /* RC18 */
40
+ 0x00000000, 0x80008003, /* RC19 */
41
+ 0x00000001, 0x80008088, /* RC20 */
42
+ 0x00000000, 0x80000088, /* RC21 */
43
+ 0x00000001, 0x00008000, /* RC22 */
44
+ 0x00000000, 0x80008082, /* RC23 */
44
45
  };
45
46
 
46
47
  #else /* MLK_FIPS202_ARMV81M_NEED_X4 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
@@ -73,19 +73,39 @@
73
73
  .global MLK_ASM_NAMESPACE(keccak_f1600_x4_state_extract_bytes_asm)
74
74
  MLK_ASM_FN_SYMBOL(keccak_f1600_x4_state_extract_bytes_asm)
75
75
 
76
+ .cfi_startproc
76
77
  push.w {r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
78
+ .cfi_adjust_cfa_offset 0x28
79
+ .cfi_rel_offset r4, 0x0
80
+ .cfi_rel_offset r5, 0x4
81
+ .cfi_rel_offset r6, 0x8
82
+ .cfi_rel_offset r7, 0xc
83
+ .cfi_rel_offset r8, 0x10
84
+ .cfi_rel_offset r9, 0x14
85
+ .cfi_rel_offset r10, 0x18
86
+ .cfi_rel_offset r11, 0x1c
87
+ .cfi_rel_offset lr, 0x24
77
88
  vpush {d8, d9, d10, d11, d12, d13, d14, d15}
89
+ .cfi_adjust_cfa_offset 0x40
90
+ .cfi_rel_offset d8, 0x0
91
+ .cfi_rel_offset d9, 0x8
92
+ .cfi_rel_offset d10, 0x10
93
+ .cfi_rel_offset d11, 0x18
94
+ .cfi_rel_offset d12, 0x20
95
+ .cfi_rel_offset d13, 0x28
96
+ .cfi_rel_offset d14, 0x30
97
+ .cfi_rel_offset d15, 0x38
78
98
  ldr r4, [sp, #0x68]
79
99
  ldr.w r10, [sp, #0x6c]
80
100
  ldr r6, [sp, #0x70]
81
101
  cmp r6, #0x0
82
- beq.w keccak_f1600_x4_state_extract_bytes_asm_exit @ imm = #0x2ea
102
+ beq.w Lkeccak_f1600_x4_state_extract_bytes_asm_exit @ imm = #0x2ea
83
103
  and r5, r10, #0x7
84
104
  bic r9, r10, #0x7
85
105
  add.w r8, r0, r9, lsl #1
86
106
  add.w r7, r8, #0x190
87
107
  cmp r5, #0x0
88
- beq.w keccak_f1600_x4_state_extract_bytes_asm_pre_main @ imm = #0x112
108
+ beq.w Lkeccak_f1600_x4_state_extract_bytes_asm_pre_main @ imm = #0x112
89
109
  vldrw.u32 q0, [r8], #16
90
110
  vldrw.u32 q1, [r7], #16
91
111
  vrev32.16 q2, q0
@@ -148,29 +168,29 @@ MLK_ASM_FN_SYMBOL(keccak_f1600_x4_state_extract_bytes_asm)
148
168
  subs r2, r2, r5
149
169
  subs r3, r3, r5
150
170
  subs r4, r4, r5
151
- vpstttt
171
+ vpstttt
152
172
  vstrbt.8 q0, [r1], #4
153
173
  vstrbt.8 q1, [r2], #4
154
174
  vstrbt.8 q2, [r3], #4
155
175
  vstrbt.8 q3, [r4], #4
156
176
  subs.w r6, r6, lr
157
177
  cmp r6, #0x0
158
- beq.w keccak_f1600_x4_state_extract_bytes_asm_exit @ imm = #0x1cc
178
+ beq.w Lkeccak_f1600_x4_state_extract_bytes_asm_exit @ imm = #0x1cc
159
179
  vmov q7[2], q7[0], r1, r3
160
180
  vmov q7[3], q7[1], r2, r4
161
- b keccak_f1600_x4_state_extract_bytes_asm_main_body @ imm = #0xe
181
+ b Lkeccak_f1600_x4_state_extract_bytes_asm_main_body @ imm = #0xe
162
182
 
163
- keccak_f1600_x4_state_extract_bytes_asm_pre_main:
183
+ Lkeccak_f1600_x4_state_extract_bytes_asm_pre_main:
164
184
  vmov q7[2], q7[0], r1, r3
165
185
  vmov q7[3], q7[1], r2, r4
166
186
  mov.w r12, #0x4
167
187
  vsub.i32 q7, q7, r12
168
188
 
169
- keccak_f1600_x4_state_extract_bytes_asm_main_body:
189
+ Lkeccak_f1600_x4_state_extract_bytes_asm_main_body:
170
190
  lsr.w lr, r6, #0x3
171
- wls lr, lr, keccak_f1600_x4_state_extract_bytes_asm_main_loop_end @ imm = #0xb4
191
+ wls lr, lr, Lkeccak_f1600_x4_state_extract_bytes_asm_main_loop_end @ imm = #0xb4
172
192
 
173
- keccak_f1600_x4_state_extract_bytes_asm_main_loop_start:
193
+ Lkeccak_f1600_x4_state_extract_bytes_asm_main_loop_start:
174
194
  vldrw.u32 q0, [r8], #16
175
195
  vldrw.u32 q1, [r7], #16
176
196
  vrev32.16 q2, q0
@@ -215,11 +235,11 @@ keccak_f1600_x4_state_extract_bytes_asm_main_loop_start:
215
235
  vorr q1, q1, q3
216
236
  vstrw.32 q0, [q7, #4]!
217
237
  vstrw.32 q1, [q7, #4]!
218
- le lr, keccak_f1600_x4_state_extract_bytes_asm_main_loop_start @ imm = #-0xb4
238
+ le lr, Lkeccak_f1600_x4_state_extract_bytes_asm_main_loop_start @ imm = #-0xb4
219
239
 
220
- keccak_f1600_x4_state_extract_bytes_asm_main_loop_end:
240
+ Lkeccak_f1600_x4_state_extract_bytes_asm_main_loop_end:
221
241
  ands r6, r6, #0x7
222
- beq keccak_f1600_x4_state_extract_bytes_asm_exit @ imm = #0xee
242
+ beq Lkeccak_f1600_x4_state_extract_bytes_asm_exit @ imm = #0xee
223
243
  mov.w r12, #0x4
224
244
  vadd.i32 q7, q7, r12
225
245
  vmov r1, r3, q7[2], q7[0]
@@ -275,16 +295,40 @@ keccak_f1600_x4_state_extract_bytes_asm_main_loop_end:
275
295
  vmov.f64 d4, d1
276
296
  vmov.f64 d6, d3
277
297
  vctp.8 r6
278
- vpstttt
298
+ vpstttt
279
299
  vstrbt.8 q0, [r1], #4
280
300
  vstrbt.8 q1, [r2], #4
281
301
  vstrbt.8 q2, [r3], #4
282
302
  vstrbt.8 q3, [r4], #4
283
303
 
284
- keccak_f1600_x4_state_extract_bytes_asm_exit:
304
+ Lkeccak_f1600_x4_state_extract_bytes_asm_exit:
285
305
  vpop {d8, d9, d10, d11, d12, d13, d14, d15}
306
+ .cfi_restore d8
307
+ .cfi_restore d9
308
+ .cfi_restore d10
309
+ .cfi_restore d11
310
+ .cfi_restore d12
311
+ .cfi_restore d13
312
+ .cfi_restore d14
313
+ .cfi_restore d15
314
+ .cfi_adjust_cfa_offset -0x40
286
315
  pop.w {r4, r5, r6, r7, r8, r9, r10, r11, r12, pc}
316
+ .cfi_restore r4
317
+ .cfi_restore r5
318
+ .cfi_restore r6
319
+ .cfi_restore r7
320
+ .cfi_restore r8
321
+ .cfi_restore r9
322
+ .cfi_restore r10
323
+ .cfi_restore r11
324
+ .cfi_restore lr
325
+ .cfi_adjust_cfa_offset -0x28
326
+ .cfi_endproc
287
327
 
288
328
  MLK_ASM_FN_SIZE(keccak_f1600_x4_state_extract_bytes_asm)
289
329
 
290
330
  #endif /* MLK_FIPS202_ARMV81M_NEED_X4 && !MLK_CONFIG_MULTILEVEL_NO_SHARED */
331
+
332
+ #if defined(__ELF__)
333
+ .section .note.GNU-stack,"",%progbits
334
+ #endif