From ec7c05f94ea4c7a7e1e4eb79a9eddcc6d7f6be17 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Mon, 25 May 2026 14:00:31 +0200 Subject: [PATCH] fix issue #764 as suggested by @yaotushaozhu --- src/pk/ecc/ltc_ecc_verify_key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pk/ecc/ltc_ecc_verify_key.c b/src/pk/ecc/ltc_ecc_verify_key.c index 7c83d6a8..d196a1df 100644 --- a/src/pk/ecc/ltc_ecc_verify_key.c +++ b/src/pk/ecc/ltc_ecc_verify_key.c @@ -40,10 +40,10 @@ int ltc_ecc_verify_key(const ecc_key *key) /* Test 3: does nG = O? (n = order, O = point at infinity, G = public key) */ point = ltc_ecc_new_point(); - if ((err = ltc_ecc_mulmod(order, &(key->pubkey), point, a, prime, 1)) != CRYPT_OK) { goto done1; } + if ((err = ltc_ecc_mulmod(order, &(key->pubkey), point, a, prime, 0)) != CRYPT_OK) { goto done1; } err = ltc_ecc_is_point_at_infinity(point, prime, &inf); - if (err != CRYPT_OK || inf) { + if (err != CRYPT_OK || !inf) { err = CRYPT_ERROR; } else {