summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-08-09 08:31:14 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-08-09 08:31:14 +0000
commit6a0e5c2aea5c87c835bbbd30db16dc02cfe454b4 (patch)
treef70f2f7ed5a3e4a882d58ecbc86b6fbf57c0f717 /lib/libcrypto/bn
parent5600a150eee1c1e3b33a119134973d1796e99787 (diff)
Compute a square using BN_mod_sqr() instead of BN_mod_mul()
ok jsing
Diffstat (limited to 'lib/libcrypto/bn')
-rw-r--r--lib/libcrypto/bn/bn_blind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/bn/bn_blind.c b/lib/libcrypto/bn/bn_blind.c
index e13c36c5f15..1cf2a4b1f4e 100644
--- a/lib/libcrypto/bn/bn_blind.c
+++ b/lib/libcrypto/bn/bn_blind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_blind.c,v 1.38 2023/08/09 08:29:23 tb Exp $ */
+/* $OpenBSD: bn_blind.c,v 1.39 2023/08/09 08:31:13 tb Exp $ */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
@@ -228,9 +228,9 @@ BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx)
if (!BN_BLINDING_setup(b, ctx))
goto err;
} else {
- if (!BN_mod_mul(b->A, b->A, b->A, b->mod, ctx))
+ if (!BN_mod_sqr(b->A, b->A, b->mod, ctx))
goto err;
- if (!BN_mod_mul(b->Ai, b->Ai, b->Ai, b->mod, ctx))
+ if (!BN_mod_sqr(b->Ai, b->Ai, b->mod, ctx))
goto err;
}