summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-07-13 11:20:00 +0000
committertb <>2022-07-13 11:20:00 +0000
commitd9188a8b0fbacddf3ebd84a4543221902dca1ede (patch)
tree979882e7ca1cc054c3f8017b8f9b590d84cbac1b /src
parent7a5008ebfb96a88e3667f3e8fe5d5d8d01d93a00 (diff)
downloadopenbsd-d9188a8b0fbacddf3ebd84a4543221902dca1ede.tar.gz
openbsd-d9188a8b0fbacddf3ebd84a4543221902dca1ede.tar.bz2
openbsd-d9188a8b0fbacddf3ebd84a4543221902dca1ede.zip
Do not make tables static so we can access them from regress.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_isqrt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_isqrt.c b/src/lib/libcrypto/bn/bn_isqrt.c
index c6a3a9760c..19e31eab34 100644
--- a/src/lib/libcrypto/bn/bn_isqrt.c
+++ b/src/lib/libcrypto/bn/bn_isqrt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_isqrt.c,v 1.1 2022/07/13 06:28:22 tb Exp $ */ 1/* $OpenBSD: bn_isqrt.c,v 1.2 2022/07/13 11:20:00 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
4 * 4 *
@@ -162,12 +162,12 @@ bn_isqrt(BIGNUM *out_sqrt, int *out_perfect, const BIGNUM *n, BN_CTX *in_ctx)
162 * The tables are generated in regress/lib/libcrypto/bn/bn_isqrt.c. 162 * The tables are generated in regress/lib/libcrypto/bn/bn_isqrt.c.
163 */ 163 */
164 164
165static const uint8_t is_square_mod_11[] = { 165const uint8_t is_square_mod_11[] = {
166 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 166 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,
167}; 167};
168CTASSERT(sizeof(is_square_mod_11) == 11); 168CTASSERT(sizeof(is_square_mod_11) == 11);
169 169
170static const uint8_t is_square_mod_63[] = { 170const uint8_t is_square_mod_63[] = {
171 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 171 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
172 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 172 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0,
173 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 173 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0,
@@ -175,7 +175,7 @@ static const uint8_t is_square_mod_63[] = {
175}; 175};
176CTASSERT(sizeof(is_square_mod_63) == 63); 176CTASSERT(sizeof(is_square_mod_63) == 63);
177 177
178static const uint8_t is_square_mod_64[] = { 178const uint8_t is_square_mod_64[] = {
179 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 179 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
180 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 180 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
181 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 181 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
@@ -183,7 +183,7 @@ static const uint8_t is_square_mod_64[] = {
183}; 183};
184CTASSERT(sizeof(is_square_mod_64) == 64); 184CTASSERT(sizeof(is_square_mod_64) == 64);
185 185
186static const uint8_t is_square_mod_65[] = { 186const uint8_t is_square_mod_65[] = {
187 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 187 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0,
188 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 188 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0,
189 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 189 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,