From: Chris Duncan Date: Thu, 27 Aug 2026 06:48:54 +0000 (-0700) Subject: Write verification results directly to output buffer. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=dedf66d13a50b5dd2a6127d423aa25bdc141069d;p=nano25519.git Write verification results directly to output buffer. --- diff --git a/src/assembly/index.ts b/src/assembly/index.ts index 77139c5..9ecb400 100644 --- a/src/assembly/index.ts +++ b/src/assembly/index.ts @@ -208,7 +208,7 @@ export function verify_blocks (count: i32): void { memory.copy(changetype(verify_blocks_sig), changetype(MESSAGE_BUFFER) + BLOCKHASH_BYTELENGTH + (96 * i), SIGNATURE_BYTELENGTH) // Verify hash and signature - verify_blocks_out[i] = u8(crypto_verify_relaxed(verify_blocks_sig, verify_blocks_msg, BLOCKHASH_BYTELENGTH, verify_blocks_pub)) + store(OUTPUT_BUFFER + i, u8(crypto_verify_relaxed(verify_blocks_sig, verify_blocks_msg, BLOCKHASH_BYTELENGTH, verify_blocks_pub)) } } @@ -216,8 +216,4 @@ export function verify_blocks (count: i32): void { MESSAGE_BUFFER.fill(0) verify_blocks_pub.fill(0) verify_blocks_sig.fill(0) - - // Clear output buffer of prior data, then copy local result to output buffer - OUTPUT_BUFFER.fill(0) - memory.copy(changetype(OUTPUT_BUFFER), changetype(verify_blocks_out), count) }