]> git.codecow.com Git - nano25519.git/commitdiff
Fix input buffer size references.
authorChris Duncan <chris@zoso.dev>
Sat, 22 Aug 2026 06:15:16 +0000 (23:15 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 22 Aug 2026 06:15:16 +0000 (23:15 -0700)
src/assembly/index.ts

index bee7ad498a6f878e4796dd0b7dd042f24bf38335..9184811abf1d131c5dfea0b7b42b4e05c9261e91 100644 (file)
@@ -5,20 +5,19 @@ import { crypto_derive } from './crypto_derive'
 import { crypto_sign } from './crypto_sign'
 import { crypto_verify } from './crypto_verify'
 
-const MESSAGE_BYTES: i32 = 32
 const PRIVATEKEY_BYTES: i32 = 32
 const PUBLICKEY_BYTES: i32 = 32
 const SIGNATURE_BYTES: i32 = 64
 
 // Static I/O buffers
-const INPUT_BUFFER_BYTES: i32 = SIGNATURE_BYTES + MESSAGE_BYTES
+const INPUT_BUFFER_BYTES: i32 = SIGNATURE_BYTES + PUBLICKEY_BYTES
 const MESSAGE_BUFFER_BYTES: i32 = 32768
 const OUTPUT_BUFFER_BYTES: i32 = SIGNATURE_BYTES
 const INPUT_BUFFER = new StaticArray<u8>(INPUT_BUFFER_BYTES)
 const MESSAGE_BUFFER = new StaticArray<u8>(MESSAGE_BUFFER_BYTES)
 const OUTPUT_BUFFER = new StaticArray<u8>(OUTPUT_BUFFER_BYTES)
 
-/** Returns the pointer to the static input buffer (128 bytes). */
+/** Returns the pointer to the static input buffer (96 bytes). */
 export function getInputPointer (): usize {
        return changetype<usize>(INPUT_BUFFER)
 }