]> git.codecow.com Git - nano25519.git/commitdiff
Revert function name for accuracy.
authorChris Duncan <chris@codecow.com>
Thu, 1 Oct 2026 21:02:09 +0000 (14:02 -0700)
committerChris Duncan <chris@codecow.com>
Thu, 1 Oct 2026 21:02:09 +0000 (14:02 -0700)
src/assembly/crypto_verify.ts
src/assembly/ed25519/ge.ts

index 9ea8dd694218d757fe0779e6c178154587027681..6540c5c106156d69e9924ab73208338266a586b7 100644 (file)
@@ -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<u8>, M: StaticArray<u8>, 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<u8>, M: StaticArray<u8>,
        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<u8>, M: StaticArray<u8>,
        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)
index 8ab07025108548ed8aae540c0f4f954d47dde7a0..4032647cbe040a1cafdede06ca9551745c50060f 100644 (file)
@@ -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<u8>, A: ge_p3, b: StaticArray<u8>): void {
+export function ge_double_scalarmult_vartime_to_p3 (r: ge_p3, a: StaticArray<u8>, A: ge_p3, b: StaticArray<u8>): void {
        const Bi = base2
        const aslide = ge_double_scalarmult_vartime_aslide
        const bslide = ge_double_scalarmult_vartime_bslide