]> git.codecow.com Git - nano25519.git/commitdiff
Use constant instead of hardcoded value.
authorChris Duncan <chris@codecow.com>
Fri, 4 Sep 2026 21:35:46 +0000 (14:35 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 4 Sep 2026 21:35:46 +0000 (14:35 -0700)
src/assembly/crypto_verify.ts

index 09f1b394e2978aedb8b1c0a60e6fef96f7cbca6a..cf31a16019c5790e6ecb20a854d1dd3ce09e5a6b 100644 (file)
@@ -59,7 +59,7 @@ export function crypto_verify_donna (sig: StaticArray<u8>, M: StaticArray<u8>, A
        ge_double_scalarmult_vartime_to_p3(sb_ah, h, changetype<ge_p3>(A), S)
        ge_p3_tobytes(check_r, sb_ah)
 
-       return equalbytes(sig, check_r, 32) - 1
+       return equalbytes(sig, check_r, KEY_BYTELENGTH) - 1
 }
 
 /**