From 3d7e6563d134ba44280f79d65ce7832fa39ef123 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 2 Jan 2026 12:00:59 +0100 Subject: [PATCH] Remove unnecessary multiplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To make the check projective‑invariant. --- src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c index 55369757..2f62a8a5 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c @@ -1180,8 +1180,7 @@ ge25519_has_small_order(const ge25519_p3 *p) fe25519_mul(y_sqrtm1, p->Y, fe25519_sqrtm1); fe25519_sub(c, y_sqrtm1, p->X); ret |= fe25519_iszero(c); - fe25519_mul(c, p->X, p->Z); - fe25519_add(c, y_sqrtm1, c); + fe25519_add(c, y_sqrtm1, p->X); ret |= fe25519_iszero(c); return ret;