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'
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)
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)
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)
*
* 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