From: Chris Duncan Date: Thu, 1 Oct 2026 21:02:09 +0000 (-0700) Subject: Revert function name for accuracy. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=82019f2741ace4098e14f013f9b5ed9caee92446;p=nano25519.git Revert function name for accuracy. --- diff --git a/src/assembly/crypto_verify.ts b/src/assembly/crypto_verify.ts index 9ea8dd6..6540c5c 100644 --- a/src/assembly/crypto_verify.ts +++ b/src/assembly/crypto_verify.ts @@ -3,7 +3,7 @@ import { BLOCKHASH_BYTELENGTH, KEY_BYTELENGTH } from './constants' import { Blake2b } from './ed25519/blake2b' -import { ge_double_scalarmult_vartime, ge_frombytes, ge_frombytes_negate_vartime, ge_has_small_order, ge_is_canonical } from './ed25519/ge' +import { ge_double_scalarmult_vartime_to_p3, ge_frombytes, ge_frombytes_negate_vartime, ge_has_small_order, ge_is_canonical } from './ed25519/ge' import { ge_p3, ge_p3_tobytes, ge_sub_p3 } from './ed25519/p' import { sc_is_canonical, sc_reduce } from './ed25519/sc' import { equalbytes } from './ed25519/utils' @@ -56,7 +56,7 @@ export function crypto_verify_donna (sig: StaticArray, M: StaticArray, A blake2b.init().update(sig, 32).update(pub, KEY_BYTELENGTH).update(M, BLOCKHASH_BYTELENGTH).digest(h) sc_reduce(h) - ge_double_scalarmult_vartime(sb_ah, h, A, S) + ge_double_scalarmult_vartime_to_p3(sb_ah, h, A, S) ge_p3_tobytes(check_r, sb_ah) return equalbytes(sig, check_r, KEY_BYTELENGTH) @@ -88,7 +88,7 @@ export function crypto_verify_sodium (sig: StaticArray, M: StaticArray, blake2b.init().update(sig, 32).update(pub, 32).update(M, mlen).digest(h) sc_reduce(h) - ge_double_scalarmult_vartime(sb_ah, h, A, S) + ge_double_scalarmult_vartime_to_p3(sb_ah, h, A, S) ge_sub_p3(check, expected_r, sb_ah) return ge_has_small_order(check) @@ -121,7 +121,7 @@ export function crypto_verify_strict (sig: StaticArray, M: StaticArray, blake2b.init().update(sig, 32).update(pub, 32).update(M, mlen).digest(h) sc_reduce(h) - ge_double_scalarmult_vartime(sb_ah, h, A, S) + ge_double_scalarmult_vartime_to_p3(sb_ah, h, A, S) ge_sub_p3(check, expected_r, sb_ah) ge_p3_tobytes(check_r, sb_ah) diff --git a/src/assembly/ed25519/ge.ts b/src/assembly/ed25519/ge.ts index 8ab0702..4032647 100644 --- a/src/assembly/ed25519/ge.ts +++ b/src/assembly/ed25519/ge.ts @@ -319,7 +319,7 @@ const ge_double_scalarmult_vartime_A2: ge_p3 = new ge_p3() * * Only used for signatures verification. */ -export function ge_double_scalarmult_vartime (r: ge_p3, a: StaticArray, A: ge_p3, b: StaticArray): void { +export function ge_double_scalarmult_vartime_to_p3 (r: ge_p3, a: StaticArray, A: ge_p3, b: StaticArray): void { const Bi = base2 const aslide = ge_double_scalarmult_vartime_aslide const bslide = ge_double_scalarmult_vartime_bslide