summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-08-30 15:48:02 +0100
committerHugo Landau <hlandau@openssl.org>2023-09-01 10:09:02 +0100
commit63cecc23e1b9b60c2dd030e887fee810f29ac197 (patch)
tree105818ed8d9b26feff0e3789eb7115386e54428f /crypto
parent31b9166ff41a252f34735c468e2b4700e945e219 (diff)
Remove a redundant point mul from ossl_ec_key_public_check()
This code was added in error and is entirely redundant. It is also an expensive operation (e.g. see #21833). Fixes #21834 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21902) (cherry picked from commit 3961991593f788b3efb2a27563d358c7c58f854c)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ec/ec_key.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 59862884a9..7b9d95c65b 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -543,11 +543,6 @@ int ossl_ec_key_public_check(const EC_KEY *eckey, BN_CTX *ctx)
ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
goto err;
}
- /* Perform a second check on the public key */
- if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx)) {
- ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
- goto err;
- }
if (!EC_POINT_is_at_infinity(eckey->group, point)) {
ERR_raise(ERR_LIB_EC, EC_R_WRONG_ORDER);
goto err;