summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_exp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_exp.c')
-rw-r--r--src/lib/libcrypto/bn/bn_exp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c
index b756d2b305..4e90d5d871 100644
--- a/src/lib/libcrypto/bn/bn_exp.c
+++ b/src/lib/libcrypto/bn/bn_exp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_exp.c,v 1.43 2023/03/27 10:22:47 tb Exp $ */ 1/* $OpenBSD: bn_exp.c,v 1.44 2023/03/27 10:25:02 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 *
@@ -816,7 +816,7 @@ BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, const BIGNUM *m,
816 (BN_mod_ct(t, r, m, ctx) && (swap_tmp = r, r = t, t = swap_tmp, 1)))) 816 (BN_mod_ct(t, r, m, ctx) && (swap_tmp = r, r = t, t = swap_tmp, 1))))
817 /* BN_MOD_MUL_WORD is only used with 'w' large, 817 /* BN_MOD_MUL_WORD is only used with 'w' large,
818 * so the BN_ucmp test is probably more overhead 818 * so the BN_ucmp test is probably more overhead
819 * than always using BN_mod (which uses BN_copy if 819 * than always using BN_mod (which uses bn_copy if
820 * a similar test returns true). */ 820 * a similar test returns true). */
821 /* We can use BN_mod and do not need BN_nnmod because our 821 /* We can use BN_mod and do not need BN_nnmod because our
822 * accumulator is never negative (the result of BN_mod does 822 * accumulator is never negative (the result of BN_mod does
@@ -985,7 +985,7 @@ BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
985 985
986 if (m->neg) { 986 if (m->neg) {
987 /* ignore sign of 'm' */ 987 /* ignore sign of 'm' */
988 if (!BN_copy(aa, m)) 988 if (!bn_copy(aa, m))
989 goto err; 989 goto err;
990 aa->neg = 0; 990 aa->neg = 0;
991 if (BN_RECP_CTX_set(&recp, aa, ctx) <= 0) 991 if (BN_RECP_CTX_set(&recp, aa, ctx) <= 0)