diff options
author | tb <> | 2025-02-12 21:22:15 +0000 |
---|---|---|
committer | tb <> | 2025-02-12 21:22:15 +0000 |
commit | 70b5e4a9ddfad29232b45bb7cfe175cb06edf1a7 (patch) | |
tree | 00fbb29bbf0de65fc765fd01daf26906137a18ea | |
parent | a43783ab93f8c9d6f36f0c78557e0db12ae47b12 (diff) | |
download | openbsd-70b5e4a9ddfad29232b45bb7cfe175cb06edf1a7.tar.gz openbsd-70b5e4a9ddfad29232b45bb7cfe175cb06edf1a7.tar.bz2 openbsd-70b5e4a9ddfad29232b45bb7cfe175cb06edf1a7.zip |
recp -> reciprocal renaming in tests
-rw-r--r-- | src/regress/lib/libcrypto/bn/bn_mod_exp.c | 4 | ||||
-rw-r--r-- | src/regress/lib/libcrypto/bn/bn_test.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_mod_exp.c b/src/regress/lib/libcrypto/bn/bn_mod_exp.c index 98b6a5d2ef..5cfacddf17 100644 --- a/src/regress/lib/libcrypto/bn/bn_mod_exp.c +++ b/src/regress/lib/libcrypto/bn/bn_mod_exp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mod_exp.c,v 1.40 2023/10/19 13:38:12 tb Exp $ */ | 1 | /* $OpenBSD: bn_mod_exp.c,v 1.41 2025/02/12 21:22:15 tb Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2022,2023 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2022,2023 Theo Buehler <tb@openbsd.org> |
@@ -59,7 +59,7 @@ static const struct mod_exp_test { | |||
59 | INIT_MOD_EXP_FN(BN_mod_exp), | 59 | INIT_MOD_EXP_FN(BN_mod_exp), |
60 | INIT_MOD_EXP_FN(BN_mod_exp_ct), | 60 | INIT_MOD_EXP_FN(BN_mod_exp_ct), |
61 | INIT_MOD_EXP_FN(BN_mod_exp_nonct), | 61 | INIT_MOD_EXP_FN(BN_mod_exp_nonct), |
62 | INIT_MOD_EXP_FN(BN_mod_exp_recp), | 62 | INIT_MOD_EXP_FN(BN_mod_exp_reciprocal), |
63 | INIT_MOD_EXP_FN(BN_mod_exp_simple), | 63 | INIT_MOD_EXP_FN(BN_mod_exp_simple), |
64 | INIT_MOD_EXP_MONT_FN(BN_mod_exp_mont), | 64 | INIT_MOD_EXP_MONT_FN(BN_mod_exp_mont), |
65 | INIT_MOD_EXP_MONT_FN(BN_mod_exp_mont_ct), | 65 | INIT_MOD_EXP_MONT_FN(BN_mod_exp_mont_ct), |
diff --git a/src/regress/lib/libcrypto/bn/bn_test.c b/src/regress/lib/libcrypto/bn/bn_test.c index 4aeb3ee284..5348788f50 100644 --- a/src/regress/lib/libcrypto/bn/bn_test.c +++ b/src/regress/lib/libcrypto/bn/bn_test.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_test.c,v 1.22 2025/01/22 13:02:14 tb Exp $ */ | 1 | /* $OpenBSD: bn_test.c,v 1.23 2025/02/12 21:22:15 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -91,7 +91,7 @@ int test_rshift1(BIO *bp, BN_CTX *ctx); | |||
91 | int test_rshift(BIO *bp, BN_CTX *ctx); | 91 | int test_rshift(BIO *bp, BN_CTX *ctx); |
92 | int test_div(BIO *bp, BN_CTX *ctx); | 92 | int test_div(BIO *bp, BN_CTX *ctx); |
93 | int test_div_word(BIO *bp, BN_CTX *ctx); | 93 | int test_div_word(BIO *bp, BN_CTX *ctx); |
94 | int test_div_recp(BIO *bp, BN_CTX *ctx); | 94 | int test_div_reciprocal(BIO *bp, BN_CTX *ctx); |
95 | int test_mul(BIO *bp, BN_CTX *ctx); | 95 | int test_mul(BIO *bp, BN_CTX *ctx); |
96 | int test_sqr(BIO *bp, BN_CTX *ctx); | 96 | int test_sqr(BIO *bp, BN_CTX *ctx); |
97 | int test_mont(BIO *bp, BN_CTX *ctx); | 97 | int test_mont(BIO *bp, BN_CTX *ctx); |
@@ -225,7 +225,7 @@ main(int argc, char *argv[]) | |||
225 | (void)BIO_flush(out); | 225 | (void)BIO_flush(out); |
226 | 226 | ||
227 | message(out, "BN_div_reciprocal"); | 227 | message(out, "BN_div_reciprocal"); |
228 | if (!test_div_recp(out, ctx)) | 228 | if (!test_div_reciprocal(out, ctx)) |
229 | goto err; | 229 | goto err; |
230 | (void)BIO_flush(out); | 230 | (void)BIO_flush(out); |
231 | 231 | ||
@@ -561,7 +561,7 @@ test_div_word(BIO *bp, BN_CTX *ctx) | |||
561 | } | 561 | } |
562 | 562 | ||
563 | int | 563 | int |
564 | test_div_recp(BIO *bp, BN_CTX *ctx) | 564 | test_div_reciprocal(BIO *bp, BN_CTX *ctx) |
565 | { | 565 | { |
566 | BN_RECP_CTX *recp = NULL; | 566 | BN_RECP_CTX *recp = NULL; |
567 | BIGNUM *a, *b, *c, *d, *e; | 567 | BIGNUM *a, *b, *c, *d, *e; |
@@ -1501,7 +1501,7 @@ test_kron(BIO *bp, BN_CTX *ctx) | |||
1501 | /* r := a^t mod b */ | 1501 | /* r := a^t mod b */ |
1502 | BN_set_negative(b, 0); | 1502 | BN_set_negative(b, 0); |
1503 | 1503 | ||
1504 | if (!BN_mod_exp_recp(r, a, t, b, ctx)) | 1504 | if (!BN_mod_exp_reciprocal(r, a, t, b, ctx)) |
1505 | goto err; | 1505 | goto err; |
1506 | BN_set_negative(b, 1); | 1506 | BN_set_negative(b, 1); |
1507 | 1507 | ||