pq_crypto 0.6.1 → 0.6.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/SECURITY.md +7 -0
- data/ext/pqcrypto/pqcrypto_version.h +1 -1
- data/ext/pqcrypto/vendor/.vendored +4 -4
- data/ext/pqcrypto/vendor/mldsa-native/README.md +23 -10
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/README.md +23 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.c +114 -58
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native.h +498 -461
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_asm.S +145 -85
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/mldsa_native_config.h +456 -422
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/cbmc.h +47 -25
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/common.h +26 -14
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/ct.h +56 -81
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/debug.h +17 -24
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.c +33 -40
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202.h +67 -87
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +19 -14
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +13 -5
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +84 -10
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +10 -5
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +6 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +22 -15
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +376 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +204 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +259 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +1077 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +987 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +16 -10
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +2 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +1 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +4 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +2 -2
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +1 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/api.h +60 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +48 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +18 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +658 -582
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +5 -100
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +26 -25
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/state_extract_bytes_x4_mve.S +334 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S +355 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +8 -3
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/{xkcp.h → keccak_f1600_x4_avx2.h} +11 -8
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +44 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +454 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccakf1600_constants.c +52 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +37 -28
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +213 -196
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +248 -64
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/intt_aarch64_asm.S +753 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S +129 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S +145 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S +177 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/ntt_aarch64_asm.S +653 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/pointwise_montgomery_aarch64_asm.S +84 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_caddq_aarch64_asm.S +53 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_chknorm_aarch64_asm.S +55 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_32_aarch64_asm.S +86 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_88_aarch64_asm.S +86 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_32_aarch64_asm.S +103 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_88_aarch64_asm.S +111 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_17_aarch64_asm.S +75 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_19_aarch64_asm.S +72 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +23 -11
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_aarch64_asm.S +189 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta2_aarch64_asm.S +137 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta4_aarch64_asm.S +130 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +520 -516
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +34 -33
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/api.h +202 -242
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +25 -17
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +112 -28
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +1 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +1 -1
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/intt_avx2_asm.S +2311 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/ntt_avx2_asm.S +2383 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/nttunpack_avx2_asm.S +238 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l4_avx2_asm.S +139 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l5_avx2_asm.S +155 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l7_avx2_asm.S +187 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_avx2_asm.S +130 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_caddq_avx2_asm.S +190 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_32_avx2.c +6 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_decompose_88_avx2.c +6 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_32_avx2.c +9 -8
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_use_hint_88_avx2.c +10 -9
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_17_avx2.c +8 -5
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/polyz_unpack_19_avx2.c +8 -5
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta2_avx2.c +6 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_eta4_avx2.c +6 -4
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +130 -129
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.c +109 -180
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/packing.h +169 -150
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.c +56 -40
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly.h +149 -164
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.c +52 -57
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/poly_kl.h +132 -167
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.c +57 -424
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec.h +167 -474
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +308 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +653 -0
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/reduce.h +22 -29
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/rounding.h +37 -43
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.c +511 -367
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/sign.h +456 -417
- data/lib/pq_crypto/version.rb +1 -1
- data/script/vendor_libs.rb +3 -3
- metadata +41 -35
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S +0 -376
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S +0 -204
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S +0 -259
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S +0 -1077
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S +0 -987
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.c +0 -488
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.h +0 -16
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/intt.S +0 -753
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4.S +0 -129
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5.S +0 -145
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7.S +0 -177
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/ntt.S +0 -653
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/pointwise_montgomery.S +0 -79
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_caddq_asm.S +0 -53
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_chknorm_asm.S +0 -55
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_32_asm.S +0 -85
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_decompose_88_asm.S +0 -85
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_32_asm.S +0 -102
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/poly_use_hint_88_asm.S +0 -110
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_17_asm.S +0 -72
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_19_asm.S +0 -69
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_asm.S +0 -189
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta2_asm.S +0 -135
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta4_asm.S +0 -128
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/intt.S +0 -2311
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/ntt.S +0 -2383
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/nttunpack.S +0 -239
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise.S +0 -131
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l4.S +0 -139
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l5.S +0 -155
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/pointwise_acc_l7.S +0 -187
- data/ext/pqcrypto/vendor/mldsa-native/mldsa/src/native/x86_64/src/poly_caddq_avx2.c +0 -61
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) The mlkem-native project authors
|
|
3
|
+
* Copyright (c) The mldsa-native project authors
|
|
4
|
+
* Copyright (c) 2021-2022 Arm Limited
|
|
5
|
+
* Copyright (c) 2022 Matthias Kannwischer
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* References
|
|
10
|
+
* ==========
|
|
11
|
+
*
|
|
12
|
+
* - [HYBRID]
|
|
13
|
+
* Hybrid scalar/vector implementations of Keccak and SPHINCS+ on AArch64
|
|
14
|
+
* Becker, Kannwischer
|
|
15
|
+
* https://eprint.iacr.org/2022/1243
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/*yaml
|
|
19
|
+
Name: keccak_f1600_x2_v84a_asm
|
|
20
|
+
Description: AArch64 ARMv8.4-A implementation of Keccak-f[1600] permutation for two sequential states
|
|
21
|
+
Signature: void mld_keccak_f1600_x2_v84a_aarch64_asm(uint64_t state[50], const uint64_t rc[24])
|
|
22
|
+
ABI:
|
|
23
|
+
x0:
|
|
24
|
+
type: buffer
|
|
25
|
+
size_bytes: 400
|
|
26
|
+
permissions: read/write
|
|
27
|
+
c_parameter: uint64_t state[50]
|
|
28
|
+
description: Two sequential Keccak states (state0[25], state1[25])
|
|
29
|
+
x1:
|
|
30
|
+
type: buffer
|
|
31
|
+
size_bytes: 192
|
|
32
|
+
permissions: read-only
|
|
33
|
+
c_parameter: const uint64_t rc[24]
|
|
34
|
+
description: Round constants (24 x uint64_t)
|
|
35
|
+
Stack:
|
|
36
|
+
bytes: 64
|
|
37
|
+
description: register preservation
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
//
|
|
41
|
+
// Author: Hanno Becker <hanno.becker@arm.com>
|
|
42
|
+
// Author: Matthias Kannwischer <matthias@kannwischer.eu>
|
|
43
|
+
//
|
|
44
|
+
// This implementation is essentially from the paper @[HYBRID].
|
|
45
|
+
// The only difference is interleaving/deinterleaving of Keccak state
|
|
46
|
+
// during load and store, so that the caller need not do this.
|
|
47
|
+
//
|
|
48
|
+
|
|
49
|
+
#include "../../../../common.h"
|
|
50
|
+
#if defined(MLD_FIPS202_AARCH64_NEED_X2_V84A) && \
|
|
51
|
+
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
|
|
52
|
+
|
|
53
|
+
#if defined(__ARM_FEATURE_SHA3)
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* WARNING: This file is auto-derived from the mldsa-native source file
|
|
57
|
+
* dev/fips202/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S using scripts/simpasm. Do not modify it directly.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
.text
|
|
61
|
+
.balign 4
|
|
62
|
+
.global MLD_ASM_NAMESPACE(keccak_f1600_x2_v84a_aarch64_asm)
|
|
63
|
+
MLD_ASM_FN_SYMBOL(keccak_f1600_x2_v84a_aarch64_asm)
|
|
64
|
+
|
|
65
|
+
.cfi_startproc
|
|
66
|
+
sub sp, sp, #0x40
|
|
67
|
+
.cfi_adjust_cfa_offset 0x40
|
|
68
|
+
stp d8, d9, [sp]
|
|
69
|
+
.cfi_rel_offset d8, 0x0
|
|
70
|
+
.cfi_rel_offset d9, 0x8
|
|
71
|
+
stp d10, d11, [sp, #0x10]
|
|
72
|
+
.cfi_rel_offset d10, 0x10
|
|
73
|
+
.cfi_rel_offset d11, 0x18
|
|
74
|
+
stp d12, d13, [sp, #0x20]
|
|
75
|
+
.cfi_rel_offset d12, 0x20
|
|
76
|
+
.cfi_rel_offset d13, 0x28
|
|
77
|
+
stp d14, d15, [sp, #0x30]
|
|
78
|
+
.cfi_rel_offset d14, 0x30
|
|
79
|
+
.cfi_rel_offset d15, 0x38
|
|
80
|
+
add x2, x0, #0xc8
|
|
81
|
+
ldp q25, q26, [x0], #0x20
|
|
82
|
+
ld1 { v27.2d, v28.2d }, [x2], #32
|
|
83
|
+
trn1 v0.2d, v25.2d, v27.2d
|
|
84
|
+
trn2 v1.2d, v25.2d, v27.2d
|
|
85
|
+
trn1 v2.2d, v26.2d, v28.2d
|
|
86
|
+
trn2 v3.2d, v26.2d, v28.2d
|
|
87
|
+
ldp q25, q26, [x0], #0x20
|
|
88
|
+
ld1 { v27.2d, v28.2d }, [x2], #32
|
|
89
|
+
trn1 v4.2d, v25.2d, v27.2d
|
|
90
|
+
trn2 v5.2d, v25.2d, v27.2d
|
|
91
|
+
trn1 v6.2d, v26.2d, v28.2d
|
|
92
|
+
trn2 v7.2d, v26.2d, v28.2d
|
|
93
|
+
ldp q25, q26, [x0], #0x20
|
|
94
|
+
ld1 { v27.2d, v28.2d }, [x2], #32
|
|
95
|
+
trn1 v8.2d, v25.2d, v27.2d
|
|
96
|
+
trn2 v9.2d, v25.2d, v27.2d
|
|
97
|
+
trn1 v10.2d, v26.2d, v28.2d
|
|
98
|
+
trn2 v11.2d, v26.2d, v28.2d
|
|
99
|
+
ldp q25, q26, [x0], #0x20
|
|
100
|
+
ld1 { v27.2d, v28.2d }, [x2], #32
|
|
101
|
+
trn1 v12.2d, v25.2d, v27.2d
|
|
102
|
+
trn2 v13.2d, v25.2d, v27.2d
|
|
103
|
+
trn1 v14.2d, v26.2d, v28.2d
|
|
104
|
+
trn2 v15.2d, v26.2d, v28.2d
|
|
105
|
+
ldp q25, q26, [x0], #0x20
|
|
106
|
+
ld1 { v27.2d, v28.2d }, [x2], #32
|
|
107
|
+
trn1 v16.2d, v25.2d, v27.2d
|
|
108
|
+
trn2 v17.2d, v25.2d, v27.2d
|
|
109
|
+
trn1 v18.2d, v26.2d, v28.2d
|
|
110
|
+
trn2 v19.2d, v26.2d, v28.2d
|
|
111
|
+
ldp q25, q26, [x0], #0x20
|
|
112
|
+
ld1 { v27.2d, v28.2d }, [x2], #32
|
|
113
|
+
trn1 v20.2d, v25.2d, v27.2d
|
|
114
|
+
trn2 v21.2d, v25.2d, v27.2d
|
|
115
|
+
trn1 v22.2d, v26.2d, v28.2d
|
|
116
|
+
trn2 v23.2d, v26.2d, v28.2d
|
|
117
|
+
ldr d25, [x0]
|
|
118
|
+
ldr d27, [x2]
|
|
119
|
+
trn1 v24.2d, v25.2d, v27.2d
|
|
120
|
+
mov x2, #0x18 // =24
|
|
121
|
+
|
|
122
|
+
Lkeccak_f1600_x2_v84a_loop:
|
|
123
|
+
eor3 v30.16b, v0.16b, v5.16b, v10.16b
|
|
124
|
+
eor3 v29.16b, v1.16b, v6.16b, v11.16b
|
|
125
|
+
eor3 v28.16b, v2.16b, v7.16b, v12.16b
|
|
126
|
+
eor3 v27.16b, v3.16b, v8.16b, v13.16b
|
|
127
|
+
eor3 v26.16b, v4.16b, v9.16b, v14.16b
|
|
128
|
+
eor3 v30.16b, v30.16b, v15.16b, v20.16b
|
|
129
|
+
eor3 v29.16b, v29.16b, v16.16b, v21.16b
|
|
130
|
+
eor3 v28.16b, v28.16b, v17.16b, v22.16b
|
|
131
|
+
eor3 v27.16b, v27.16b, v18.16b, v23.16b
|
|
132
|
+
eor3 v26.16b, v26.16b, v19.16b, v24.16b
|
|
133
|
+
rax1 v25.2d, v30.2d, v28.2d
|
|
134
|
+
rax1 v28.2d, v28.2d, v26.2d
|
|
135
|
+
rax1 v26.2d, v26.2d, v29.2d
|
|
136
|
+
rax1 v29.2d, v29.2d, v27.2d
|
|
137
|
+
rax1 v27.2d, v27.2d, v30.2d
|
|
138
|
+
eor v30.16b, v0.16b, v26.16b
|
|
139
|
+
xar v0.2d, v2.2d, v29.2d, #0x2
|
|
140
|
+
xar v2.2d, v12.2d, v29.2d, #0x15
|
|
141
|
+
xar v12.2d, v13.2d, v28.2d, #0x27
|
|
142
|
+
xar v13.2d, v19.2d, v27.2d, #0x38
|
|
143
|
+
xar v19.2d, v23.2d, v28.2d, #0x8
|
|
144
|
+
xar v23.2d, v15.2d, v26.2d, #0x17
|
|
145
|
+
xar v15.2d, v1.2d, v25.2d, #0x3f
|
|
146
|
+
xar v1.2d, v8.2d, v28.2d, #0x9
|
|
147
|
+
xar v8.2d, v16.2d, v25.2d, #0x13
|
|
148
|
+
xar v16.2d, v7.2d, v29.2d, #0x3a
|
|
149
|
+
xar v7.2d, v10.2d, v26.2d, #0x3d
|
|
150
|
+
xar v10.2d, v3.2d, v28.2d, #0x24
|
|
151
|
+
xar v3.2d, v18.2d, v28.2d, #0x2b
|
|
152
|
+
xar v18.2d, v17.2d, v29.2d, #0x31
|
|
153
|
+
xar v17.2d, v11.2d, v25.2d, #0x36
|
|
154
|
+
xar v11.2d, v9.2d, v27.2d, #0x2c
|
|
155
|
+
xar v9.2d, v22.2d, v29.2d, #0x3
|
|
156
|
+
xar v22.2d, v14.2d, v27.2d, #0x19
|
|
157
|
+
xar v14.2d, v20.2d, v26.2d, #0x2e
|
|
158
|
+
xar v20.2d, v4.2d, v27.2d, #0x25
|
|
159
|
+
xar v4.2d, v24.2d, v27.2d, #0x32
|
|
160
|
+
xar v24.2d, v21.2d, v25.2d, #0x3e
|
|
161
|
+
xar v21.2d, v5.2d, v26.2d, #0x1c
|
|
162
|
+
xar v27.2d, v6.2d, v25.2d, #0x14
|
|
163
|
+
ld1r { v31.2d }, [x1], #8
|
|
164
|
+
bcax v5.16b, v10.16b, v7.16b, v11.16b
|
|
165
|
+
bcax v6.16b, v11.16b, v8.16b, v7.16b
|
|
166
|
+
bcax v7.16b, v7.16b, v9.16b, v8.16b
|
|
167
|
+
bcax v8.16b, v8.16b, v10.16b, v9.16b
|
|
168
|
+
bcax v9.16b, v9.16b, v11.16b, v10.16b
|
|
169
|
+
bcax v10.16b, v15.16b, v12.16b, v16.16b
|
|
170
|
+
bcax v11.16b, v16.16b, v13.16b, v12.16b
|
|
171
|
+
bcax v12.16b, v12.16b, v14.16b, v13.16b
|
|
172
|
+
bcax v13.16b, v13.16b, v15.16b, v14.16b
|
|
173
|
+
bcax v14.16b, v14.16b, v16.16b, v15.16b
|
|
174
|
+
bcax v15.16b, v20.16b, v17.16b, v21.16b
|
|
175
|
+
bcax v16.16b, v21.16b, v18.16b, v17.16b
|
|
176
|
+
bcax v17.16b, v17.16b, v19.16b, v18.16b
|
|
177
|
+
bcax v18.16b, v18.16b, v20.16b, v19.16b
|
|
178
|
+
bcax v19.16b, v19.16b, v21.16b, v20.16b
|
|
179
|
+
bcax v20.16b, v0.16b, v22.16b, v1.16b
|
|
180
|
+
bcax v21.16b, v1.16b, v23.16b, v22.16b
|
|
181
|
+
bcax v22.16b, v22.16b, v24.16b, v23.16b
|
|
182
|
+
bcax v23.16b, v23.16b, v0.16b, v24.16b
|
|
183
|
+
bcax v24.16b, v24.16b, v1.16b, v0.16b
|
|
184
|
+
bcax v0.16b, v30.16b, v2.16b, v27.16b
|
|
185
|
+
bcax v1.16b, v27.16b, v3.16b, v2.16b
|
|
186
|
+
bcax v2.16b, v2.16b, v4.16b, v3.16b
|
|
187
|
+
bcax v3.16b, v3.16b, v30.16b, v4.16b
|
|
188
|
+
bcax v4.16b, v4.16b, v27.16b, v30.16b
|
|
189
|
+
eor v0.16b, v0.16b, v31.16b
|
|
190
|
+
sub x2, x2, #0x1
|
|
191
|
+
cbnz x2, Lkeccak_f1600_x2_v84a_loop
|
|
192
|
+
sub x0, x0, #0xc0
|
|
193
|
+
add x2, x0, #0xc8
|
|
194
|
+
trn1 v25.2d, v0.2d, v1.2d
|
|
195
|
+
trn1 v26.2d, v2.2d, v3.2d
|
|
196
|
+
stp q25, q26, [x0], #0x20
|
|
197
|
+
trn2 v27.2d, v0.2d, v1.2d
|
|
198
|
+
trn2 v28.2d, v2.2d, v3.2d
|
|
199
|
+
st1 { v27.2d, v28.2d }, [x2], #32
|
|
200
|
+
trn1 v25.2d, v4.2d, v5.2d
|
|
201
|
+
trn1 v26.2d, v6.2d, v7.2d
|
|
202
|
+
stp q25, q26, [x0], #0x20
|
|
203
|
+
trn2 v27.2d, v4.2d, v5.2d
|
|
204
|
+
trn2 v28.2d, v6.2d, v7.2d
|
|
205
|
+
st1 { v27.2d, v28.2d }, [x2], #32
|
|
206
|
+
trn1 v25.2d, v8.2d, v9.2d
|
|
207
|
+
trn1 v26.2d, v10.2d, v11.2d
|
|
208
|
+
stp q25, q26, [x0], #0x20
|
|
209
|
+
trn2 v27.2d, v8.2d, v9.2d
|
|
210
|
+
trn2 v28.2d, v10.2d, v11.2d
|
|
211
|
+
st1 { v27.2d, v28.2d }, [x2], #32
|
|
212
|
+
trn1 v25.2d, v12.2d, v13.2d
|
|
213
|
+
trn1 v26.2d, v14.2d, v15.2d
|
|
214
|
+
stp q25, q26, [x0], #0x20
|
|
215
|
+
trn2 v27.2d, v12.2d, v13.2d
|
|
216
|
+
trn2 v28.2d, v14.2d, v15.2d
|
|
217
|
+
st1 { v27.2d, v28.2d }, [x2], #32
|
|
218
|
+
trn1 v25.2d, v16.2d, v17.2d
|
|
219
|
+
trn1 v26.2d, v18.2d, v19.2d
|
|
220
|
+
stp q25, q26, [x0], #0x20
|
|
221
|
+
trn2 v27.2d, v16.2d, v17.2d
|
|
222
|
+
trn2 v28.2d, v18.2d, v19.2d
|
|
223
|
+
st1 { v27.2d, v28.2d }, [x2], #32
|
|
224
|
+
trn1 v25.2d, v20.2d, v21.2d
|
|
225
|
+
trn1 v26.2d, v22.2d, v23.2d
|
|
226
|
+
stp q25, q26, [x0], #0x20
|
|
227
|
+
trn2 v27.2d, v20.2d, v21.2d
|
|
228
|
+
trn2 v28.2d, v22.2d, v23.2d
|
|
229
|
+
st1 { v27.2d, v28.2d }, [x2], #32
|
|
230
|
+
str d24, [x0]
|
|
231
|
+
trn2 v25.2d, v24.2d, v24.2d
|
|
232
|
+
str d25, [x2]
|
|
233
|
+
ldp d8, d9, [sp]
|
|
234
|
+
.cfi_restore d8
|
|
235
|
+
.cfi_restore d9
|
|
236
|
+
ldp d10, d11, [sp, #0x10]
|
|
237
|
+
.cfi_restore d10
|
|
238
|
+
.cfi_restore d11
|
|
239
|
+
ldp d12, d13, [sp, #0x20]
|
|
240
|
+
.cfi_restore d12
|
|
241
|
+
.cfi_restore d13
|
|
242
|
+
ldp d14, d15, [sp, #0x30]
|
|
243
|
+
.cfi_restore d14
|
|
244
|
+
.cfi_restore d15
|
|
245
|
+
add sp, sp, #0x40
|
|
246
|
+
.cfi_adjust_cfa_offset -0x40
|
|
247
|
+
ret
|
|
248
|
+
.cfi_endproc
|
|
249
|
+
|
|
250
|
+
MLD_ASM_FN_SIZE(keccak_f1600_x2_v84a_aarch64_asm)
|
|
251
|
+
|
|
252
|
+
#endif /* __ARM_FEATURE_SHA3 */
|
|
253
|
+
|
|
254
|
+
#endif /* MLD_FIPS202_AARCH64_NEED_X2_V84A && !MLD_CONFIG_MULTILEVEL_NO_SHARED \
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
#if defined(__ELF__)
|
|
258
|
+
.section .note.GNU-stack,"",%progbits
|
|
259
|
+
#endif
|