From 67c0f68ce4fed348f81231b7523222c68fea5503 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 9 Aug 2023 08:31:13 +0000 Subject: [PATCH] Compute a square using BN_mod_sqr() instead of BN_mod_mul() ok jsing --- lib/libcrypto/bn/bn_blind.c | 6 +++--- 1 file 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; } -- 2.20.1