mldsa_gh 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +88 -0
- data/ext/mldsa_gh_native/extconf.rb +14 -0
- data/ext/mldsa_gh_native/mldsa_gh_native.c +222 -0
- data/ext/mldsa_gh_native/mldsa_gh_native_all.c +24 -0
- data/ext/mldsa_gh_native/mldsa_gh_native_all.h +26 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/BUILDING.md +108 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/LICENSE +305 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/README.md +247 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/README.md +23 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native.c +803 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native.h +956 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native_asm.S +830 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native_config.h +855 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/cbmc.h +233 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/common.h +301 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/context.h +152 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/ct.c +21 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/ct.h +373 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/debug.c +75 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/debug.h +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202.c +270 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202.h +224 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +187 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +510 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +110 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +85 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +69 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +378 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +207 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +262 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +1080 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +990 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +47 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +27 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +36 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +40 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +32 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +37 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/api.h +129 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/README.md +10 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +67 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +37 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +717 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +42 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_extract_bytes_mve.S +334 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_xor_bytes_mve.S +355 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +53 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +35 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +34 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +45 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +488 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccakf1600_constants.c +52 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +314 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +248 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +367 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_intt_aarch64_asm.S +786 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_ntt_aarch64_asm.S +686 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_pointwise_montgomery_aarch64_asm.S +106 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_caddq_aarch64_asm.S +69 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_chknorm_aarch64_asm.S +76 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_32_aarch64_asm.S +108 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_88_aarch64_asm.S +108 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_32_aarch64_asm.S +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_88_aarch64_asm.S +133 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S +157 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S +173 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S +205 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_17_aarch64_asm.S +103 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_19_aarch64_asm.S +100 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_aarch64_asm.S +222 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta2_aarch64_asm.S +170 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta4_aarch64_asm.S +163 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +52 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +547 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +63 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/api.h +617 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/meta.h +24 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +323 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +330 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +157 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +27 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_intt_avx2_asm.S +2333 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_ntt_avx2_asm.S +2405 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_nttunpack_avx2_asm.S +254 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l4_avx2_asm.S +173 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l5_avx2_asm.S +189 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l7_avx2_asm.S +221 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_avx2_asm.S +158 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_caddq_avx2_asm.S +199 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_chknorm_avx2_asm.S +176 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_32_avx2_asm.S +490 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_88_avx2_asm.S +489 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_32_avx2_asm.S +123 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_88_avx2_asm.S +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_17_avx2_asm.S +355 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_19_avx2_asm.S +355 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_avx2_asm.S +132 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta2_avx2_asm.S +205 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta4_avx2_asm.S +176 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +161 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/packing.c +213 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/packing.h +277 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/params.h +153 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly.c +1066 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly.h +464 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly_kl.c +910 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly_kl.h +367 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec.c +509 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec.h +435 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +311 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +652 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/randombytes.h +26 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/reduce.h +144 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/rounding.h +265 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sign.c +1720 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sign.h +850 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/symmetric.h +68 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sys.h +327 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/zetas.inc +55 -0
- data/lib/mldsa/parameter_set.rb +82 -0
- data/lib/mldsa/signing_key.rb +147 -0
- data/lib/mldsa/verify_key.rb +72 -0
- data/lib/mldsa/version.rb +7 -0
- data/lib/mldsa_gh.rb +93 -0
- metadata +225 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) The mlkem-native project authors
|
|
3
|
+
* Copyright (c) The mldsa-native project authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#ifndef MLD_NATIVE_AARCH64_META_H
|
|
8
|
+
#define MLD_NATIVE_AARCH64_META_H
|
|
9
|
+
|
|
10
|
+
/* Set of primitives that this backend replaces */
|
|
11
|
+
#define MLD_USE_NATIVE_NTT
|
|
12
|
+
#define MLD_USE_NATIVE_INTT
|
|
13
|
+
#define MLD_USE_NATIVE_REJ_UNIFORM
|
|
14
|
+
#define MLD_USE_NATIVE_REJ_UNIFORM_ETA2
|
|
15
|
+
#define MLD_USE_NATIVE_REJ_UNIFORM_ETA4
|
|
16
|
+
#define MLD_USE_NATIVE_POLY_DECOMPOSE_32
|
|
17
|
+
#define MLD_USE_NATIVE_POLY_DECOMPOSE_88
|
|
18
|
+
#define MLD_USE_NATIVE_POLY_CADDQ
|
|
19
|
+
#define MLD_USE_NATIVE_POLY_USE_HINT_32
|
|
20
|
+
#define MLD_USE_NATIVE_POLY_USE_HINT_88
|
|
21
|
+
#define MLD_USE_NATIVE_POLY_CHKNORM
|
|
22
|
+
#define MLD_USE_NATIVE_POLYZ_UNPACK_17
|
|
23
|
+
#define MLD_USE_NATIVE_POLYZ_UNPACK_19
|
|
24
|
+
#define MLD_USE_NATIVE_POINTWISE_MONTGOMERY
|
|
25
|
+
#define MLD_USE_NATIVE_POLYVECL_POINTWISE_ACC_MONTGOMERY_L4
|
|
26
|
+
#define MLD_USE_NATIVE_POLYVECL_POINTWISE_ACC_MONTGOMERY_L5
|
|
27
|
+
#define MLD_USE_NATIVE_POLYVECL_POINTWISE_ACC_MONTGOMERY_L7
|
|
28
|
+
|
|
29
|
+
/* Identifier for this backend so that source and assembly files
|
|
30
|
+
* in the build can be appropriately guarded. */
|
|
31
|
+
#define MLD_ARITH_BACKEND_AARCH64
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
#if !defined(__ASSEMBLER__)
|
|
35
|
+
#include "../api.h"
|
|
36
|
+
#include "src/arith_native_aarch64.h"
|
|
37
|
+
|
|
38
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
39
|
+
static MLD_INLINE int mld_ntt_native(int32_t data[MLDSA_N])
|
|
40
|
+
{
|
|
41
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
42
|
+
{
|
|
43
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
44
|
+
}
|
|
45
|
+
mld_ntt_aarch64_asm(data, mld_aarch64_ntt_zetas_layer123456,
|
|
46
|
+
mld_aarch64_ntt_zetas_layer78);
|
|
47
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
51
|
+
static MLD_INLINE int mld_intt_native(int32_t data[MLDSA_N])
|
|
52
|
+
{
|
|
53
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
54
|
+
{
|
|
55
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
56
|
+
}
|
|
57
|
+
mld_intt_aarch64_asm(data, mld_aarch64_intt_zetas_layer78,
|
|
58
|
+
mld_aarch64_intt_zetas_layer123456);
|
|
59
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
63
|
+
static MLD_INLINE int mld_rej_uniform_native(int32_t *r, unsigned len,
|
|
64
|
+
const uint8_t *buf,
|
|
65
|
+
unsigned buflen)
|
|
66
|
+
{
|
|
67
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON) || len != MLDSA_N ||
|
|
68
|
+
buflen % 24 != 0)
|
|
69
|
+
{
|
|
70
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Safety: outlen is at most MLDSA_N, hence, this cast is safe. */
|
|
74
|
+
return (int)mld_rej_uniform_aarch64_asm(r, buf, buflen,
|
|
75
|
+
mld_rej_uniform_table);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
#if !defined(MLD_CONFIG_NO_KEYPAIR_API)
|
|
79
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_ETA == 2
|
|
80
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
81
|
+
static MLD_INLINE int mld_rej_uniform_eta2_native(int32_t *r, unsigned len,
|
|
82
|
+
const uint8_t *buf,
|
|
83
|
+
unsigned buflen)
|
|
84
|
+
{
|
|
85
|
+
uint64_t outlen;
|
|
86
|
+
/* AArch64 implementation assumes specific buffer lengths */
|
|
87
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON) || len != MLDSA_N ||
|
|
88
|
+
buflen != MLD_AARCH64_REJ_UNIFORM_ETA2_BUFLEN)
|
|
89
|
+
{
|
|
90
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
91
|
+
}
|
|
92
|
+
/* Constant time: Inputs and outputs to this function are secret.
|
|
93
|
+
* It is safe to leak which coefficients are accepted/rejected.
|
|
94
|
+
* The assembly implementation must not leak any other information about the
|
|
95
|
+
* accepted coefficients. Constant-time testing cannot cover this, and we
|
|
96
|
+
* hence have to manually verify the assembly.
|
|
97
|
+
* We declassify prior the input data and mark the outputs as secret.
|
|
98
|
+
*/
|
|
99
|
+
MLD_CT_TESTING_DECLASSIFY(buf, buflen);
|
|
100
|
+
outlen = mld_rej_uniform_eta2_aarch64_asm(r, buf, buflen,
|
|
101
|
+
mld_rej_uniform_eta_table);
|
|
102
|
+
MLD_CT_TESTING_SECRET(r, sizeof(int32_t) * outlen);
|
|
103
|
+
/* Safety: outlen is at most MLDSA_N and, hence, this cast is safe. */
|
|
104
|
+
return (int)outlen;
|
|
105
|
+
}
|
|
106
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLDSA_ETA == 2 */
|
|
107
|
+
|
|
108
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_ETA == 4
|
|
109
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
110
|
+
static MLD_INLINE int mld_rej_uniform_eta4_native(int32_t *r, unsigned len,
|
|
111
|
+
const uint8_t *buf,
|
|
112
|
+
unsigned buflen)
|
|
113
|
+
{
|
|
114
|
+
uint64_t outlen;
|
|
115
|
+
/* AArch64 implementation assumes specific buffer lengths */
|
|
116
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON) || len != MLDSA_N ||
|
|
117
|
+
buflen != MLD_AARCH64_REJ_UNIFORM_ETA4_BUFLEN)
|
|
118
|
+
{
|
|
119
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
120
|
+
}
|
|
121
|
+
/* Constant time: Inputs and outputs to this function are secret.
|
|
122
|
+
* It is safe to leak which coefficients are accepted/rejected.
|
|
123
|
+
* The assembly implementation must not leak any other information about the
|
|
124
|
+
* accepted coefficients. Constant-time testing cannot cover this, and we
|
|
125
|
+
* hence have to manually verify the assembly.
|
|
126
|
+
* We declassify prior the input data and mark the outputs as secret.
|
|
127
|
+
*/
|
|
128
|
+
MLD_CT_TESTING_DECLASSIFY(buf, buflen);
|
|
129
|
+
outlen = mld_rej_uniform_eta4_aarch64_asm(r, buf, buflen,
|
|
130
|
+
mld_rej_uniform_eta_table);
|
|
131
|
+
MLD_CT_TESTING_SECRET(r, sizeof(int32_t) * outlen);
|
|
132
|
+
/* Safety: outlen is at most MLDSA_N and, hence, this cast is safe. */
|
|
133
|
+
return (int)outlen;
|
|
134
|
+
}
|
|
135
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLDSA_ETA == 4 */
|
|
136
|
+
#endif /* !MLD_CONFIG_NO_KEYPAIR_API */
|
|
137
|
+
|
|
138
|
+
#if !defined(MLD_CONFIG_NO_SIGN_API)
|
|
139
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
|
|
140
|
+
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87)
|
|
141
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
142
|
+
static MLD_INLINE int mld_poly_decompose_32_native(int32_t *a1, int32_t *a0)
|
|
143
|
+
{
|
|
144
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
145
|
+
{
|
|
146
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
147
|
+
}
|
|
148
|
+
mld_poly_decompose_32_aarch64_asm(a1, a0);
|
|
149
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
150
|
+
}
|
|
151
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 65 \
|
|
152
|
+
|| MLD_CONFIG_PARAMETER_SET == 87 */
|
|
153
|
+
|
|
154
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLD_CONFIG_PARAMETER_SET == 44
|
|
155
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
156
|
+
static MLD_INLINE int mld_poly_decompose_88_native(int32_t *a1, int32_t *a0)
|
|
157
|
+
{
|
|
158
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
159
|
+
{
|
|
160
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
161
|
+
}
|
|
162
|
+
mld_poly_decompose_88_aarch64_asm(a1, a0);
|
|
163
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
164
|
+
}
|
|
165
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 44 \
|
|
166
|
+
*/
|
|
167
|
+
#endif /* !MLD_CONFIG_NO_SIGN_API */
|
|
168
|
+
|
|
169
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
170
|
+
static MLD_INLINE int mld_poly_caddq_native(int32_t a[MLDSA_N])
|
|
171
|
+
{
|
|
172
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
173
|
+
{
|
|
174
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
175
|
+
}
|
|
176
|
+
mld_poly_caddq_aarch64_asm(a);
|
|
177
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
#if !defined(MLD_CONFIG_NO_VERIFY_API)
|
|
181
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
|
|
182
|
+
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87)
|
|
183
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
184
|
+
static MLD_INLINE int mld_poly_use_hint_32_native(int32_t *a, const int32_t *h)
|
|
185
|
+
{
|
|
186
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
187
|
+
{
|
|
188
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
189
|
+
}
|
|
190
|
+
mld_poly_use_hint_32_aarch64_asm(a, h);
|
|
191
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
192
|
+
}
|
|
193
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 65 \
|
|
194
|
+
|| MLD_CONFIG_PARAMETER_SET == 87 */
|
|
195
|
+
|
|
196
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLD_CONFIG_PARAMETER_SET == 44
|
|
197
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
198
|
+
static MLD_INLINE int mld_poly_use_hint_88_native(int32_t *a, const int32_t *h)
|
|
199
|
+
{
|
|
200
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
201
|
+
{
|
|
202
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
203
|
+
}
|
|
204
|
+
mld_poly_use_hint_88_aarch64_asm(a, h);
|
|
205
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
206
|
+
}
|
|
207
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 44 \
|
|
208
|
+
*/
|
|
209
|
+
#endif /* !MLD_CONFIG_NO_VERIFY_API */
|
|
210
|
+
|
|
211
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
212
|
+
static MLD_INLINE int mld_poly_chknorm_native(const int32_t *a, int32_t B)
|
|
213
|
+
{
|
|
214
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
215
|
+
{
|
|
216
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
217
|
+
}
|
|
218
|
+
return mld_poly_chknorm_aarch64_asm(a, B);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
#if !defined(MLD_CONFIG_NO_SIGN_API) || !defined(MLD_CONFIG_NO_VERIFY_API)
|
|
222
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLD_CONFIG_PARAMETER_SET == 44
|
|
223
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
224
|
+
static MLD_INLINE int mld_polyz_unpack_17_native(int32_t *r, const uint8_t *buf)
|
|
225
|
+
{
|
|
226
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
227
|
+
{
|
|
228
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
229
|
+
}
|
|
230
|
+
mld_polyz_unpack_17_aarch64_asm(r, buf, mld_polyz_unpack_17_indices);
|
|
231
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
232
|
+
}
|
|
233
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 44 \
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
|
|
237
|
+
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87)
|
|
238
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
239
|
+
static MLD_INLINE int mld_polyz_unpack_19_native(int32_t *r, const uint8_t *buf)
|
|
240
|
+
{
|
|
241
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
242
|
+
{
|
|
243
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
244
|
+
}
|
|
245
|
+
mld_polyz_unpack_19_aarch64_asm(r, buf, mld_polyz_unpack_19_indices);
|
|
246
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
247
|
+
}
|
|
248
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 65 \
|
|
249
|
+
|| MLD_CONFIG_PARAMETER_SET == 87 */
|
|
250
|
+
#endif /* !MLD_CONFIG_NO_SIGN_API || !MLD_CONFIG_NO_VERIFY_API */
|
|
251
|
+
|
|
252
|
+
#if !defined(MLD_CONFIG_NO_SIGN_API) || !defined(MLD_CONFIG_NO_VERIFY_API) || \
|
|
253
|
+
defined(MLD_CONFIG_REDUCE_RAM) || defined(MLD_UNIT_TEST)
|
|
254
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
255
|
+
static MLD_INLINE int mld_poly_pointwise_montgomery_native(
|
|
256
|
+
int32_t a[MLDSA_N], const int32_t b[MLDSA_N])
|
|
257
|
+
{
|
|
258
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
259
|
+
{
|
|
260
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
261
|
+
}
|
|
262
|
+
mld_poly_pointwise_montgomery_aarch64_asm(a, b);
|
|
263
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
264
|
+
}
|
|
265
|
+
#endif /* !MLD_CONFIG_NO_SIGN_API || !MLD_CONFIG_NO_VERIFY_API || \
|
|
266
|
+
MLD_CONFIG_REDUCE_RAM || MLD_UNIT_TEST */
|
|
267
|
+
|
|
268
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_L == 4
|
|
269
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
270
|
+
static MLD_INLINE int mld_polyvecl_pointwise_acc_montgomery_l4_native(
|
|
271
|
+
int32_t w[MLDSA_N], const int32_t u[4][MLDSA_N],
|
|
272
|
+
const int32_t v[4][MLDSA_N])
|
|
273
|
+
{
|
|
274
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
275
|
+
{
|
|
276
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
277
|
+
}
|
|
278
|
+
mld_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm(w, u, v);
|
|
279
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
280
|
+
}
|
|
281
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLDSA_L == 4 */
|
|
282
|
+
|
|
283
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_L == 5
|
|
284
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
285
|
+
static MLD_INLINE int mld_polyvecl_pointwise_acc_montgomery_l5_native(
|
|
286
|
+
int32_t w[MLDSA_N], const int32_t u[5][MLDSA_N],
|
|
287
|
+
const int32_t v[5][MLDSA_N])
|
|
288
|
+
{
|
|
289
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
290
|
+
{
|
|
291
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
292
|
+
}
|
|
293
|
+
mld_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm(w, u, v);
|
|
294
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
295
|
+
}
|
|
296
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLDSA_L == 5 */
|
|
297
|
+
|
|
298
|
+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_L == 7
|
|
299
|
+
MLD_MUST_CHECK_RETURN_VALUE
|
|
300
|
+
static MLD_INLINE int mld_polyvecl_pointwise_acc_montgomery_l7_native(
|
|
301
|
+
int32_t w[MLDSA_N], const int32_t u[7][MLDSA_N],
|
|
302
|
+
const int32_t v[7][MLDSA_N])
|
|
303
|
+
{
|
|
304
|
+
if (!mld_sys_check_capability(MLD_SYS_CAP_AARCH64_NEON))
|
|
305
|
+
{
|
|
306
|
+
return MLD_NATIVE_FUNC_FALLBACK;
|
|
307
|
+
}
|
|
308
|
+
mld_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm(w, u, v);
|
|
309
|
+
return MLD_NATIVE_FUNC_SUCCESS;
|
|
310
|
+
}
|
|
311
|
+
#endif /* MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLDSA_L == 7 */
|
|
312
|
+
|
|
313
|
+
#endif /* !__ASSEMBLER__ */
|
|
314
|
+
#endif /* !MLD_NATIVE_AARCH64_META_H */
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) The mldsa-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 mldsa-native repository.
|
|
9
|
+
* Do not modify it directly.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#include "../../../common.h"
|
|
13
|
+
|
|
14
|
+
#if defined(MLD_ARITH_BACKEND_AARCH64) && \
|
|
15
|
+
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
|
|
16
|
+
|
|
17
|
+
#include "arith_native_aarch64.h"
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Table of zeta values used in the AArch64 forward NTT
|
|
21
|
+
* See autogen for details.
|
|
22
|
+
*/
|
|
23
|
+
MLD_ALIGN MLD_INTERNAL_DATA_DEFINITION const int32_t
|
|
24
|
+
mld_aarch64_ntt_zetas_layer123456[144] = {
|
|
25
|
+
-3572223, -915382907, 3765607, 964937599, 3761513, 963888510,
|
|
26
|
+
-3201494, -820383522, -2883726, -738955404, -3145678, -806080660,
|
|
27
|
+
-3201430, -820367122, 0, 0, -601683, -154181397,
|
|
28
|
+
-3370349, -863652652, -4063053, -1041158200, 3602218, 923069133,
|
|
29
|
+
3182878, 815613168, 2740543, 702264730, -3586446, -919027554,
|
|
30
|
+
0, 0, 3542485, 907762539, 2663378, 682491182,
|
|
31
|
+
-1674615, -429120452, -3110818, -797147778, 2101410, 538486762,
|
|
32
|
+
3704823, 949361686, 1159875, 297218217, 0, 0,
|
|
33
|
+
2682288, 687336873, -3524442, -903139016, -434125, -111244624,
|
|
34
|
+
394148, 101000509, 928749, 237992130, 1095468, 280713909,
|
|
35
|
+
-3506380, -898510625, 0, 0, 2129892, 545785280,
|
|
36
|
+
676590, 173376332, -1335936, -342333886, 2071829, 530906624,
|
|
37
|
+
-4018989, -1029866791, 3241972, 830756018, 2156050, 552488273,
|
|
38
|
+
0, 0, 3764867, 964747974, -3227876, -827143915,
|
|
39
|
+
1714295, 439288460, 3415069, 875112161, 1759347, 450833045,
|
|
40
|
+
-817536, -209493775, -3574466, -915957677, 0, 0,
|
|
41
|
+
-1005239, -257592709, 2453983, 628833668, 1460718, 374309300,
|
|
42
|
+
3756790, 962678241, -1935799, -496048908, -1716988, -439978542,
|
|
43
|
+
-3950053, -1012201926, 0, 0, 557458, 142848732,
|
|
44
|
+
-642628, -164673562, -3585098, -918682129, -2897314, -742437332,
|
|
45
|
+
3192354, 818041395, 556856, 142694469, 3870317, 991769559,
|
|
46
|
+
0, 0, -1221177, -312926867, 2815639, 721508096,
|
|
47
|
+
2283733, 585207070, 2917338, 747568486, 1853806, 475038184,
|
|
48
|
+
3345963, 857403734, 1858416, 476219497, 0, 0,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
MLD_ALIGN MLD_INTERNAL_DATA_DEFINITION const int32_t
|
|
52
|
+
mld_aarch64_ntt_zetas_layer78[384] = {
|
|
53
|
+
3073009, 1277625, -2635473, 3852015, 787459213,
|
|
54
|
+
327391679, -675340520, 987079667, 1753, -2659525,
|
|
55
|
+
2660408, -59148, 449207, -681503850, 681730119,
|
|
56
|
+
-15156688, -1935420, -1455890, -1780227, 2772600,
|
|
57
|
+
-495951789, -373072124, -456183549, 710479343, 4183372,
|
|
58
|
+
-3222807, -3121440, -274060, 1071989969, -825844983,
|
|
59
|
+
-799869667, -70227934, 1182243, 636927, -3956745,
|
|
60
|
+
-3284915, 302950022, 163212680, -1013916752, -841760171,
|
|
61
|
+
87208, -3965306, -2296397, -3716946, 22347069,
|
|
62
|
+
-1016110510, -588452222, -952468207, 2508980, 2028118,
|
|
63
|
+
1937570, -3815725, 642926661, 519705671, 496502727,
|
|
64
|
+
-977780347, -27812, 1009365, -1979497, -3956944,
|
|
65
|
+
-7126831, 258649997, -507246529, -1013967746, 822541,
|
|
66
|
+
-2454145, 1596822, -3759465, 210776307, -628875181,
|
|
67
|
+
409185979, -963363710, 2811291, -2983781, -1109516,
|
|
68
|
+
4158088, 720393920, -764594519, -284313712, 1065510939,
|
|
69
|
+
-1685153, 2678278, -3551006, -250446, -431820817,
|
|
70
|
+
686309310, -909946047, -64176841, -3410568, -3768948,
|
|
71
|
+
635956, -2455377, -873958779, -965793731, 162963861,
|
|
72
|
+
-629190881, 1528066, 482649, 1148858, -2962264,
|
|
73
|
+
391567239, 123678909, 294395108, -759080783, -4146264,
|
|
74
|
+
2192938, 2387513, -268456, -1062481036, 561940831,
|
|
75
|
+
611800717, -68791907, -1772588, -1727088, -3611750,
|
|
76
|
+
-3180456, -454226054, -442566669, -925511710, -814992530,
|
|
77
|
+
-565603, 169688, 2462444, -3334383, -144935890,
|
|
78
|
+
43482586, 631001801, -854436357, 3747250, 1239911,
|
|
79
|
+
3195676, 1254190, 960233614, 317727459, 818892658,
|
|
80
|
+
321386456, 2296099, -3838479, 2642980, -12417,
|
|
81
|
+
588375860, -983611064, 677264190, -3181859, -4166425,
|
|
82
|
+
-3488383, 1987814, -3197248, -1067647297, -893898890,
|
|
83
|
+
509377762, -819295484, 2998219, -89301, -1354892,
|
|
84
|
+
-1310261, 768294260, -22883400, -347191365, -335754661,
|
|
85
|
+
141835, 2513018, 613238, -2218467, 36345249,
|
|
86
|
+
643961400, 157142369, -568482643, 1736313, 235407,
|
|
87
|
+
-3250154, 3258457, 444930577, 60323094, -832852657,
|
|
88
|
+
834980303, -458740, 4040196, 2039144, -818761,
|
|
89
|
+
-117552223, 1035301089, 522531086, -209807681, -1921994,
|
|
90
|
+
-3472069, -1879878, -2178965, -492511373, -889718424,
|
|
91
|
+
-481719139, -558360247, -2579253, 1787943, -2391089,
|
|
92
|
+
-2254727, -660934133, 458160776, -612717067, -577774276,
|
|
93
|
+
-1623354, -2374402, 586241, 527981, -415984810,
|
|
94
|
+
-608441020, 150224382, 135295244, 2105286, -2033807,
|
|
95
|
+
-1179613, -2743411, 539479988, -521163479, -302276083,
|
|
96
|
+
-702999655, 3482206, -4182915, -1300016, -2362063,
|
|
97
|
+
892316032, -1071872863, -333129378, -605279149, -1476985,
|
|
98
|
+
2491325, 507927, -724804, -378477722, 638402564,
|
|
99
|
+
130156402, -185731180, 1994046, -1393159, -1187885,
|
|
100
|
+
-1834526, 510974714, -356997292, -304395785, -470097680,
|
|
101
|
+
-1317678, 2461387, 3035980, 621164, -337655269,
|
|
102
|
+
630730945, 777970524, 159173408, -3033742, 2647994,
|
|
103
|
+
-2612853, 749577, -777397036, 678549029, -669544140,
|
|
104
|
+
192079267, -338420, 3009748, 4148469, -4022750,
|
|
105
|
+
-86720197, 771248568, 1063046068, -1030830548, 3901472,
|
|
106
|
+
-1226661, 2925816, 3374250, 999753034, -314332144,
|
|
107
|
+
749740976, 864652284, 3980599, -1615530, 1665318,
|
|
108
|
+
1163598, 1020029345, -413979908, 426738094, 298172236,
|
|
109
|
+
2569011, 1723229, 2028038, -3369273, 658309618,
|
|
110
|
+
441577800, 519685171, -863376927, 1356448, -2775755,
|
|
111
|
+
2683270, -2778788, 347590090, -711287812, 687588511,
|
|
112
|
+
-712065019, 3994671, -1370517, 3363542, 545376,
|
|
113
|
+
1023635298, -351195274, 861908357, 139752717, -11879,
|
|
114
|
+
3020393, 214880, -770441, -3043996, 773976352,
|
|
115
|
+
55063046, -197425671, -3467665, 2312838, -653275,
|
|
116
|
+
-459163, -888589898, 592665232, -167401858, -117660617,
|
|
117
|
+
3105558, 508145, 860144, 140244, 795799901,
|
|
118
|
+
130212265, 220412084, 35937555, -1103344, -553718,
|
|
119
|
+
3430436, -1514152, -282732136, -141890356, 879049958,
|
|
120
|
+
-388001774, 348812, -327848, 1011223, -2354215,
|
|
121
|
+
89383150, -84011120, 259126110, -603268097, -2185084,
|
|
122
|
+
2358373, -3014420, 2926054, -559928242, 604333585,
|
|
123
|
+
-772445769, 749801963, 3123762, -2193087, -1716814,
|
|
124
|
+
-392707, 800464680, -561979013, -439933955, -100631253,
|
|
125
|
+
-3818627, -1922253, -2236726, 1744507, -978523985,
|
|
126
|
+
-492577742, -573161516, 447030292, -303005, -3974485,
|
|
127
|
+
1900052, 1054478, -77645096, -1018462631, 486888731,
|
|
128
|
+
270210213, 3531229, -3773731, -781875, -731434,
|
|
129
|
+
904878186, -967019376, -200355636, -187430119,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
MLD_ALIGN MLD_INTERNAL_DATA_DEFINITION const int32_t
|
|
133
|
+
mld_aarch64_intt_zetas_layer78[384] = {
|
|
134
|
+
-1744507, 2236726, 1922253, 3818627, -447030292,
|
|
135
|
+
573161516, 492577742, 978523985, 731434, 781875,
|
|
136
|
+
3773731, -3531229, 187430119, 200355636, 967019376,
|
|
137
|
+
-904878186, -1054478, -1900052, 3974485, 303005,
|
|
138
|
+
-270210213, -486888731, 1018462631, 77645096, 2354215,
|
|
139
|
+
-1011223, 327848, -348812, 603268097, -259126110,
|
|
140
|
+
84011120, -89383150, 392707, 1716814, 2193087,
|
|
141
|
+
-3123762, 100631253, 439933955, 561979013, -800464680,
|
|
142
|
+
-2926054, 3014420, -2358373, 2185084, -749801963,
|
|
143
|
+
772445769, -604333585, 559928242, 459163, 653275,
|
|
144
|
+
-2312838, 3467665, 117660617, 167401858, -592665232,
|
|
145
|
+
888589898, 1514152, -3430436, 553718, 1103344,
|
|
146
|
+
388001774, -879049958, 141890356, 282732136, -140244,
|
|
147
|
+
-860144, -508145, -3105558, -35937555, -220412084,
|
|
148
|
+
-130212265, -795799901, 2778788, -2683270, 2775755,
|
|
149
|
+
-1356448, 712065019, -687588511, 711287812, -347590090,
|
|
150
|
+
770441, -214880, -3020393, 11879, 197425671,
|
|
151
|
+
-55063046, -773976352, 3043996, -545376, -3363542,
|
|
152
|
+
1370517, -3994671, -139752717, -861908357, 351195274,
|
|
153
|
+
-1023635298, -3374250, -2925816, 1226661, -3901472,
|
|
154
|
+
-864652284, -749740976, 314332144, -999753034, 3369273,
|
|
155
|
+
-2028038, -1723229, -2569011, 863376927, -519685171,
|
|
156
|
+
-441577800, -658309618, -1163598, -1665318, 1615530,
|
|
157
|
+
-3980599, -298172236, -426738094, 413979908, -1020029345,
|
|
158
|
+
-621164, -3035980, -2461387, 1317678, -159173408,
|
|
159
|
+
-777970524, -630730945, 337655269, 4022750, -4148469,
|
|
160
|
+
-3009748, 338420, 1030830548, -1063046068, -771248568,
|
|
161
|
+
86720197, -749577, 2612853, -2647994, 3033742,
|
|
162
|
+
-192079267, 669544140, -678549029, 777397036, 2362063,
|
|
163
|
+
1300016, 4182915, -3482206, 605279149, 333129378,
|
|
164
|
+
1071872863, -892316032, 1834526, 1187885, 1393159,
|
|
165
|
+
-1994046, 470097680, 304395785, 356997292, -510974714,
|
|
166
|
+
724804, -507927, -2491325, 1476985, 185731180,
|
|
167
|
+
-130156402, -638402564, 378477722, 2254727, 2391089,
|
|
168
|
+
-1787943, 2579253, 577774276, 612717067, -458160776,
|
|
169
|
+
660934133, 2743411, 1179613, 2033807, -2105286,
|
|
170
|
+
702999655, 302276083, 521163479, -539479988, -527981,
|
|
171
|
+
-586241, 2374402, 1623354, -135295244, -150224382,
|
|
172
|
+
608441020, 415984810, -3258457, 3250154, -235407,
|
|
173
|
+
-1736313, -834980303, 832852657, -60323094, -444930577,
|
|
174
|
+
2178965, 1879878, 3472069, 1921994, 558360247,
|
|
175
|
+
481719139, 889718424, 492511373, 818761, -2039144,
|
|
176
|
+
-4040196, 458740, 209807681, -522531086, -1035301089,
|
|
177
|
+
117552223, 3197248, -1987814, 3488383, 4166425,
|
|
178
|
+
819295484, -509377762, 893898890, 1067647297, 2218467,
|
|
179
|
+
-613238, -2513018, -141835, 568482643, -157142369,
|
|
180
|
+
-643961400, -36345249, 1310261, 1354892, 89301,
|
|
181
|
+
-2998219, 335754661, 347191365, 22883400, -768294260,
|
|
182
|
+
3334383, -2462444, -169688, 565603, 854436357,
|
|
183
|
+
-631001801, -43482586, 144935890, 12417, -2642980,
|
|
184
|
+
3838479, -2296099, 3181859, -677264190, 983611064,
|
|
185
|
+
-588375860, -1254190, -3195676, -1239911, -3747250,
|
|
186
|
+
-321386456, -818892658, -317727459, -960233614, 2962264,
|
|
187
|
+
-1148858, -482649, -1528066, 759080783, -294395108,
|
|
188
|
+
-123678909, -391567239, 3180456, 3611750, 1727088,
|
|
189
|
+
1772588, 814992530, 925511710, 442566669, 454226054,
|
|
190
|
+
268456, -2387513, -2192938, 4146264, 68791907,
|
|
191
|
+
-611800717, -561940831, 1062481036, -4158088, 1109516,
|
|
192
|
+
2983781, -2811291, -1065510939, 284313712, 764594519,
|
|
193
|
+
-720393920, 2455377, -635956, 3768948, 3410568,
|
|
194
|
+
629190881, -162963861, 965793731, 873958779, 250446,
|
|
195
|
+
3551006, -2678278, 1685153, 64176841, 909946047,
|
|
196
|
+
-686309310, 431820817, 3815725, -1937570, -2028118,
|
|
197
|
+
-2508980, 977780347, -496502727, -519705671, -642926661,
|
|
198
|
+
3759465, -1596822, 2454145, -822541, 963363710,
|
|
199
|
+
-409185979, 628875181, -210776307, 3956944, 1979497,
|
|
200
|
+
-1009365, 27812, 1013967746, 507246529, -258649997,
|
|
201
|
+
7126831, 274060, 3121440, 3222807, -4183372,
|
|
202
|
+
70227934, 799869667, 825844983, -1071989969, 3716946,
|
|
203
|
+
2296397, 3965306, -87208, 952468207, 588452222,
|
|
204
|
+
1016110510, -22347069, 3284915, 3956745, -636927,
|
|
205
|
+
-1182243, 841760171, 1013916752, -163212680, -302950022,
|
|
206
|
+
-3852015, 2635473, -1277625, -3073009, -987079667,
|
|
207
|
+
675340520, -327391679, -787459213, -2772600, 1780227,
|
|
208
|
+
1455890, 1935420, -710479343, 456183549, 373072124,
|
|
209
|
+
495951789, 59148, -2660408, 2659525, -1753,
|
|
210
|
+
15156688, -681730119, 681503850, -449207,
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
MLD_ALIGN MLD_INTERNAL_DATA_DEFINITION const int32_t
|
|
214
|
+
mld_aarch64_intt_zetas_layer123456[160] = {
|
|
215
|
+
-2283733, -585207070, 0, 0, -1858416, -476219497,
|
|
216
|
+
-3345963, -857403734, -2815639, -721508096, 0, 0,
|
|
217
|
+
-1853806, -475038184, -2917338, -747568486, 3585098, 918682129,
|
|
218
|
+
0, 0, -3870317, -991769559, -556856, -142694469,
|
|
219
|
+
642628, 164673562, 0, 0, -3192354, -818041395,
|
|
220
|
+
2897314, 742437332, -1460718, -374309300, 0, 0,
|
|
221
|
+
3950053, 1012201926, 1716988, 439978542, -2453983, -628833668,
|
|
222
|
+
0, 0, 1935799, 496048908, -3756790, -962678241,
|
|
223
|
+
-1714295, -439288460, 0, 0, 3574466, 915957677,
|
|
224
|
+
817536, 209493775, 3227876, 827143915, 0, 0,
|
|
225
|
+
-1759347, -450833045, -3415069, -875112161, 1335936, 342333886,
|
|
226
|
+
0, 0, -2156050, -552488273, -3241972, -830756018,
|
|
227
|
+
-676590, -173376332, 0, 0, 4018989, 1029866791,
|
|
228
|
+
-2071829, -530906624, 434125, 111244624, 0, 0,
|
|
229
|
+
3506380, 898510625, -1095468, -280713909, 3524442, 903139016,
|
|
230
|
+
0, 0, -928749, -237992130, -394148, -101000509,
|
|
231
|
+
1674615, 429120452, 0, 0, -1159875, -297218217,
|
|
232
|
+
-3704823, -949361686, -2663378, -682491182, 0, 0,
|
|
233
|
+
-2101410, -538486762, 3110818, 797147778, 4063053, 1041158200,
|
|
234
|
+
0, 0, 3586446, 919027554, -2740543, -702264730,
|
|
235
|
+
3370349, 863652652, 0, 0, -3182878, -815613168,
|
|
236
|
+
-3602218, -923069133, -294725, -75523344, -3761513, -963888510,
|
|
237
|
+
-3765607, -964937599, 3201430, 820367122, 3145678, 806080660,
|
|
238
|
+
2883726, 738955404, 3201494, 820383522, 1221177, 312926867,
|
|
239
|
+
-557458, -142848732, 1005239, 257592709, -3764867, -964747974,
|
|
240
|
+
-2129892, -545785280, -2682288, -687336873, -3542485, -907762539,
|
|
241
|
+
601683, 154181397, 0, 0,
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
#else /* MLD_ARITH_BACKEND_AARCH64 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */
|
|
245
|
+
|
|
246
|
+
MLD_EMPTY_CU(aarch64_zetas)
|
|
247
|
+
|
|
248
|
+
#endif /* !(MLD_ARITH_BACKEND_AARCH64 && !MLD_CONFIG_MULTILEVEL_NO_SHARED) */
|