diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c index dda67360..2356de7f 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c @@ -2540,13 +2540,13 @@ ge25519_elligator2(unsigned char s[32], const fe25519 r, const unsigned char x_s fe25519_sq2(rr2, r); rr2[0]++; fe25519_invert(rr2, rr2); - fe25519_mul(x, curve25519_A, rr2); + fe25519_mul32(x, curve25519_A[0], rr2); fe25519_neg(x, x); fe25519_sq(x2, x); fe25519_mul(x3, x, x2); fe25519_add(e, x3, x); - fe25519_mul(x2, x2, curve25519_A); + fe25519_mul32(x2, x2, curve25519_A[0]); fe25519_add(e, x2, e); chi25519(e, e); diff --git a/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c b/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c index 4272ae24..9eaf0235 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +++ b/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c @@ -123,7 +123,7 @@ crypto_scalarmult_curve25519_ref10(unsigned char *q, fe25519_mul(x2, tmp1, tmp0); fe25519_sub(tmp1, tmp1, tmp0); fe25519_sq(z2, z2); - fe25519_scalar_product(z3, tmp1, 121666); + fe25519_mul32(z3, tmp1, 121666); fe25519_sq(x3, x3); fe25519_add(tmp0, tmp0, z3); fe25519_mul(z3, x1, z2); diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h index 5a0b6148..f2782d9d 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h @@ -979,7 +979,7 @@ fe25519_sq2(fe25519 h, const fe25519 f) } static void -fe25519_scalar_product(fe25519 h, const fe25519 f, uint32_t n) +fe25519_mul32(fe25519 h, const fe25519 f, uint32_t n) { int64_t sn = (int64_t) n; int32_t f0 = f[0]; diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h index 3a30f301..6c0d775b 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h @@ -490,7 +490,7 @@ fe25519_sq2(fe25519 h, const fe25519 f) } static void -fe25519_scalar_product(fe25519 h, const fe25519 f, uint32_t n) +fe25519_mul32(fe25519 h, const fe25519 f, uint32_t n) { const uint64_t mask = 0x7ffffffffffffULL; uint128_t a;