]> git.codecow.com Git - nano25519.git/log
nano25519.git
5 weeks agoUpdate node tests to deprecate secret key format.
Chris Duncan [Tue, 25 Aug 2026 13:01:34 +0000 (06:01 -0700)]
Update node tests to deprecate secret key format.

5 weeks agoRemove async test calls and concatenated secret key vectors.
Chris Duncan [Tue, 25 Aug 2026 12:50:13 +0000 (05:50 -0700)]
Remove async test calls and concatenated secret key vectors.

5 weeks agoDeprecate async module and focus on organizing buffers for batch prep.
Chris Duncan [Tue, 25 Aug 2026 00:38:02 +0000 (17:38 -0700)]
Deprecate async module and focus on organizing buffers for batch prep.

5 weeks agoHoist buffer pointers to only reach into wasm once per buffer instead of every call...
Chris Duncan [Mon, 24 Aug 2026 22:26:47 +0000 (15:26 -0700)]
Hoist buffer pointers to only reach into wasm once per buffer instead of every call site. Export buffer sizes for consistency when clearing.

5 weeks agoFix documentation.
Chris Duncan [Mon, 24 Aug 2026 22:25:17 +0000 (15:25 -0700)]
Fix documentation.

6 weeks agoMerge branch 'next/out-buf'
Chris Duncan [Sat, 22 Aug 2026 07:47:14 +0000 (00:47 -0700)]
Merge branch 'next/out-buf'

- derive() and sign() can now optionally take a preallocated output buffer.
- Fixed verify() returning unsigned result instead of signed (-1 vs 255)
- Vastly reduced WASM module size by flattening base point arrays into a plain static memory data segment.
- Added lots more defensive buffer clearing.
- Fixed `equal()`, `negative()`, and `sodium_is_zero()` which silently broke due to AssemblyScript masking shift operands based on bit width.
- Extracted `crypto_derive`, `crypto_sign`, and `crypto_verify` from the WASM index entry point.
- Split async module into separate files for host code and worker code, and inject the worker code string using an esbuild process.
- Updated async error handling to reject all pending tasks when the worker resets.
- Move tests to separate subdirectory, add output buffer and offset coverage, and test a live cemented block from a small-order account that is rejected by strict verification (Nano needs ed25519-donna implementation here especially).

6 weeks agoReduce initial memory now that scratch message buffers are gone.
Chris Duncan [Sat, 22 Aug 2026 06:41:12 +0000 (23:41 -0700)]
Reduce initial memory now that scratch message buffers are gone.

6 weeks agoUpdate doc comments.
Chris Duncan [Sat, 22 Aug 2026 06:40:19 +0000 (23:40 -0700)]
Update doc comments.

6 weeks agoUse constant for message length within wasm and clear it with the other buffers.
Chris Duncan [Sat, 22 Aug 2026 06:31:10 +0000 (23:31 -0700)]
Use constant for message length within wasm and clear it with the other buffers.

6 weeks agoRevert to retrieving message buffer directly in wasm since it is fully synchronous...
Chris Duncan [Sat, 22 Aug 2026 06:28:17 +0000 (23:28 -0700)]
Revert to retrieving message buffer directly in wasm since it is fully synchronous, has no re-entry points from host JS, and is never written but only read by Blake2b.

6 weeks agoClear buffers on message length error.
Chris Duncan [Sat, 22 Aug 2026 06:18:29 +0000 (23:18 -0700)]
Clear buffers on message length error.

6 weeks agoReuse constant for message size to avoid bugs.
Chris Duncan [Sat, 22 Aug 2026 06:16:41 +0000 (23:16 -0700)]
Reuse constant for message size to avoid bugs.

6 weeks agoFix input buffer size references.
Chris Duncan [Sat, 22 Aug 2026 06:15:16 +0000 (23:15 -0700)]
Fix input buffer size references.

6 weeks agoSimplify base point pointer increment.
Chris Duncan [Fri, 21 Aug 2026 22:06:06 +0000 (15:06 -0700)]
Simplify base point pointer increment.

6 weeks agoMove base pointer out of move function entirely.
Chris Duncan [Fri, 21 Aug 2026 22:04:44 +0000 (15:04 -0700)]
Move base pointer out of move function entirely.

6 weeks agoUnroll hot path again.
Chris Duncan [Fri, 21 Aug 2026 21:59:44 +0000 (14:59 -0700)]
Unroll hot path again.

6 weeks agoReformat for const usage.
Chris Duncan [Fri, 21 Aug 2026 21:50:54 +0000 (14:50 -0700)]
Reformat for const usage.

6 weeks agoOverload conditional move of FieldElements for cleaner memory access.
Chris Duncan [Fri, 21 Aug 2026 21:38:41 +0000 (14:38 -0700)]
Overload conditional move of FieldElements for cleaner memory access.

6 weeks agoRename scratchpad to be more relevant.
Chris Duncan [Fri, 21 Aug 2026 21:32:46 +0000 (14:32 -0700)]
Rename scratchpad to be more relevant.

6 weeks agoEliminate redundant memory copy calls.
Chris Duncan [Fri, 21 Aug 2026 21:27:04 +0000 (14:27 -0700)]
Eliminate redundant memory copy calls.

6 weeks agoSort imports.
Chris Duncan [Fri, 21 Aug 2026 21:20:44 +0000 (14:20 -0700)]
Sort imports.

6 weeks agoEliminate memcpy in loop.
Chris Duncan [Fri, 21 Aug 2026 20:46:44 +0000 (13:46 -0700)]
Eliminate memcpy in loop.

6 weeks agoCopy field elements by passing pointers instead of objects.
Chris Duncan [Fri, 21 Aug 2026 20:32:29 +0000 (13:32 -0700)]
Copy field elements by passing pointers instead of objects.

6 weeks agoReduce down to one scratch object for base point arithmetic.
Chris Duncan [Fri, 21 Aug 2026 20:25:47 +0000 (13:25 -0700)]
Reduce down to one scratch object for base point arithmetic.

6 weeks agoReuse one ge for base point arithmetic.
Chris Duncan [Fri, 21 Aug 2026 20:17:51 +0000 (13:17 -0700)]
Reuse one ge for base point arithmetic.

6 weeks agoEliminate intermediate base copy.
Chris Duncan [Fri, 21 Aug 2026 20:14:43 +0000 (13:14 -0700)]
Eliminate intermediate base copy.

6 weeks agoReduce initial module memory with base point changes.
Chris Duncan [Fri, 21 Aug 2026 20:12:01 +0000 (13:12 -0700)]
Reduce initial module memory with base point changes.

6 weeks agoReduce base point size further by allocating it directly instead of including StaticA...
Chris Duncan [Fri, 21 Aug 2026 20:07:30 +0000 (13:07 -0700)]
Reduce base point size further by allocating it directly instead of including StaticArray headers.

6 weeks agoEliminate base buffer pointer computation entirely and use loop counter to avoid...
Chris Duncan [Fri, 21 Aug 2026 19:29:01 +0000 (12:29 -0700)]
Eliminate base buffer pointer computation entirely and use loop counter to avoid multiplication.

6 weeks agoRemove pointer arithmetic from base point entirely and put it in ge function.
Chris Duncan [Fri, 21 Aug 2026 19:24:56 +0000 (12:24 -0700)]
Remove pointer arithmetic from base point entirely and put it in ge function.

6 weeks agoFix base copy destination buffer size, and cast to i8 only when necessary.
Chris Duncan [Fri, 21 Aug 2026 19:18:46 +0000 (12:18 -0700)]
Fix base copy destination buffer size, and cast to i8 only when necessary.

6 weeks agoReturn pointer into base buffer instead of constructing new objects, and use pointer...
Chris Duncan [Fri, 21 Aug 2026 19:06:35 +0000 (12:06 -0700)]
Return pointer into base buffer instead of constructing new objects, and use pointer to copy memory one ge_precomp at a time.

6 weeks agoLoop over cmov to simplify for upcoming base accessor pattern change.
Chris Duncan [Fri, 21 Aug 2026 18:27:19 +0000 (11:27 -0700)]
Loop over cmov to simplify for upcoming base accessor pattern change.

6 weeks agoNaming convention.
Chris Duncan [Fri, 21 Aug 2026 17:42:59 +0000 (10:42 -0700)]
Naming convention.

6 weeks agoMerge single-use function into caller.
Chris Duncan [Fri, 21 Aug 2026 17:32:29 +0000 (10:32 -0700)]
Merge single-use function into caller.

6 weeks agoFlatten base point completely and retrieve values with offsets alone.
Chris Duncan [Fri, 21 Aug 2026 17:20:41 +0000 (10:20 -0700)]
Flatten base point completely and retrieve values with offsets alone.

6 weeks agoCombine base point elements into single buffer per ge_precomp.
Chris Duncan [Fri, 21 Aug 2026 15:08:41 +0000 (08:08 -0700)]
Combine base point elements into single buffer per ge_precomp.

6 weeks agoFurther flatten base point by constructing ge_precomp elements on the fly.
Chris Duncan [Fri, 21 Aug 2026 14:59:38 +0000 (07:59 -0700)]
Further flatten base point by constructing ge_precomp elements on the fly.

6 weeks agoMove base2 out of base to avoid modifying it at this time since it is relatively...
Chris Duncan [Fri, 21 Aug 2026 14:42:15 +0000 (07:42 -0700)]
Move base2 out of base to avoid modifying it at this time since it is relatively small.

6 weeks agoDecouple precomputed group element from base point return value.
Chris Duncan [Fri, 21 Aug 2026 14:19:24 +0000 (07:19 -0700)]
Decouple precomputed group element from base point return value.

6 weeks agoFlatten base point nested arrays into one StaticArray.
Chris Duncan [Fri, 21 Aug 2026 14:17:34 +0000 (07:17 -0700)]
Flatten base point nested arrays into one StaticArray.

6 weeks agoStart migrating to flatter base point by decoupling access from data.
Chris Duncan [Fri, 21 Aug 2026 13:14:39 +0000 (06:14 -0700)]
Start migrating to flatter base point by decoupling access from data.

6 weeks agoPad base point to align with FieldElement as documented.
Chris Duncan [Thu, 20 Aug 2026 22:22:31 +0000 (15:22 -0700)]
Pad base point to align with FieldElement as documented.

6 weeks agoFlatten base point to allocate StaticArrays directly so the FieldElement constructor...
Chris Duncan [Thu, 20 Aug 2026 22:18:19 +0000 (15:18 -0700)]
Flatten base point to allocate StaticArrays directly so the FieldElement constructor Array leak can be fixed.

6 weeks agoUse real math symbols in comments for legibility.
Chris Duncan [Thu, 20 Aug 2026 06:52:59 +0000 (23:52 -0700)]
Use real math symbols in comments for legibility.

6 weeks agoDeclare I/O buffers as StaticArray for memory safety. Set memory with live value...
Chris Duncan [Thu, 20 Aug 2026 04:20:49 +0000 (21:20 -0700)]
Declare I/O buffers as StaticArray for memory safety. Set memory with live value instead of ignored export.

6 weeks agoRemove other unused WASM export.
Chris Duncan [Thu, 20 Aug 2026 00:12:52 +0000 (17:12 -0700)]
Remove other unused WASM export.

6 weeks agoRemove unused WASM export.
Chris Duncan [Thu, 20 Aug 2026 00:11:55 +0000 (17:11 -0700)]
Remove unused WASM export.

6 weeks agoFormatting.
Chris Duncan [Thu, 20 Aug 2026 00:10:51 +0000 (17:10 -0700)]
Formatting.

6 weeks agoPromote primitives to top-level module functions.
Chris Duncan [Thu, 20 Aug 2026 00:08:38 +0000 (17:08 -0700)]
Promote primitives to top-level module functions.

6 weeks agoSplit async host and worker into separate files and export worker as string with...
Chris Duncan [Thu, 20 Aug 2026 00:04:42 +0000 (17:04 -0700)]
Split async host and worker into separate files and export worker as string with esbuid.

6 weeks agoAdjust variable names now that primitives are module-scoped. Copy parameters locally...
Chris Duncan [Wed, 19 Aug 2026 23:40:04 +0000 (16:40 -0700)]
Adjust variable names now that primitives are module-scoped. Copy parameters locally in derive to free buffer. Fill output buffer in verify for consistency between calls.

6 weeks agoExtract crypto functions from API definition file.
Chris Duncan [Wed, 19 Aug 2026 23:24:38 +0000 (16:24 -0700)]
Extract crypto functions from API definition file.

6 weeks agoRemove unused array and update documentation.
Chris Duncan [Wed, 19 Aug 2026 23:16:58 +0000 (16:16 -0700)]
Remove unused array and update documentation.

6 weeks agoRefactor primitives to align with RFC 8032.
Chris Duncan [Tue, 18 Aug 2026 06:43:44 +0000 (23:43 -0700)]
Refactor primitives to align with RFC 8032.

6 weeks agoStart updating Blake usage
Chris Duncan [Mon, 17 Aug 2026 20:39:48 +0000 (13:39 -0700)]
Start updating Blake usage

6 weeks agoHash from arrays which are passed as pointers not objects.
Chris Duncan [Mon, 17 Aug 2026 20:35:32 +0000 (13:35 -0700)]
Hash from arrays which are passed as pointers not objects.

6 weeks agoSpecify buffer sizes for clarity in implementation.
Chris Duncan [Mon, 17 Aug 2026 15:55:07 +0000 (08:55 -0700)]
Specify buffer sizes for clarity in implementation.

6 weeks agoChange WASM buffer view to Uint8Array since we don't need endianness features of...
Chris Duncan [Mon, 17 Aug 2026 15:46:03 +0000 (08:46 -0700)]
Change WASM buffer view to Uint8Array since we don't need endianness features of DataView. Reduce input buffer size to maximum needed and minimum required for verify() signature and public key.

7 weeks agoTest offset buffers with exact matches against untouched ranges.
Chris Duncan [Sun, 16 Aug 2026 10:32:44 +0000 (03:32 -0700)]
Test offset buffers with exact matches against untouched ranges.

7 weeks agoFix offset buffer tests to correctly target offsets including 0.
Chris Duncan [Sun, 16 Aug 2026 10:08:30 +0000 (03:08 -0700)]
Fix offset buffer tests to correctly target offsets including 0.

7 weeks agoAdjust buffer offset tests and remove unused function.
Chris Duncan [Sun, 16 Aug 2026 09:44:07 +0000 (02:44 -0700)]
Adjust buffer offset tests and remove unused function.

7 weeks agoReturn straightforward 0 or -1 from verify instead of handling buffer output.
Chris Duncan [Sun, 16 Aug 2026 09:22:04 +0000 (02:22 -0700)]
Return straightforward 0 or -1 from verify instead of handling buffer output.

7 weeks agoFix transfer of full buffer instead of just array view.
Chris Duncan [Sun, 16 Aug 2026 08:56:20 +0000 (01:56 -0700)]
Fix transfer of full buffer instead of just array view.

7 weeks agoDocument expected output.
Chris Duncan [Sun, 16 Aug 2026 08:41:22 +0000 (01:41 -0700)]
Document expected output.

7 weeks agoExpand to signed int to return -1 as libsodium instead of 255.
Chris Duncan [Sun, 16 Aug 2026 07:09:49 +0000 (00:09 -0700)]
Expand to signed int to return -1 as libsodium instead of 255.

7 weeks agoFix truncation in bit shift.
Chris Duncan [Sun, 16 Aug 2026 07:09:11 +0000 (00:09 -0700)]
Fix truncation in bit shift.

7 weeks agoTransfer data to worker if passed as buffer instead of just byte array.
Chris Duncan [Sun, 16 Aug 2026 06:53:08 +0000 (23:53 -0700)]
Transfer data to worker if passed as buffer instead of just byte array.

7 weeks agoFix similar issue with asc bit shift operand masking when checking canonicity.
Chris Duncan [Sun, 16 Aug 2026 05:54:12 +0000 (22:54 -0700)]
Fix similar issue with asc bit shift operand masking when checking canonicity.

7 weeks agoFix constant time zero check that was incorrect due to AssemblyScript shift operand...
Chris Duncan [Sun, 16 Aug 2026 05:48:43 +0000 (22:48 -0700)]
Fix constant time zero check that was incorrect due to AssemblyScript shift operand masking.

7 weeks agoLog more helpful info on wasm error.
Chris Duncan [Sun, 16 Aug 2026 05:47:59 +0000 (22:47 -0700)]
Log more helpful info on wasm error.

7 weeks agoFix test label.
Chris Duncan [Sat, 15 Aug 2026 22:09:05 +0000 (15:09 -0700)]
Fix test label.

7 weeks agoFix wording on problem vector.
Chris Duncan [Sat, 15 Aug 2026 21:41:04 +0000 (14:41 -0700)]
Fix wording on problem vector.

7 weeks agoReduce form on division by shift.
Chris Duncan [Sat, 15 Aug 2026 20:56:36 +0000 (13:56 -0700)]
Reduce form on division by shift.

7 weeks agoDeprecate global pointless in WASM.
Chris Duncan [Sat, 15 Aug 2026 20:53:03 +0000 (13:53 -0700)]
Deprecate global pointless in WASM.

7 weeks agoAdd integrity hashes to imported packages and revert nanocurrency-web to its own...
Chris Duncan [Sat, 15 Aug 2026 20:49:47 +0000 (13:49 -0700)]
Add integrity hashes to imported packages and revert nanocurrency-web to its own script since it works by polluting the global namespace.

7 weeks agoLoad packages with import map instead of dynamic import.
Chris Duncan [Sat, 15 Aug 2026 20:16:11 +0000 (13:16 -0700)]
Load packages with import map instead of dynamic import.

7 weeks agoClear worker starting promise on failure path.
Chris Duncan [Sat, 15 Aug 2026 19:47:48 +0000 (12:47 -0700)]
Clear worker starting promise on failure path.

7 weeks agoReject all pending tasks when worker resets.
Chris Duncan [Sat, 15 Aug 2026 19:44:48 +0000 (12:44 -0700)]
Reject all pending tasks when worker resets.

7 weeks agoDiscard nonce prefix `z` as sensitive material unnecessary for public key derivation...
Chris Duncan [Sat, 15 Aug 2026 19:29:13 +0000 (12:29 -0700)]
Discard nonce prefix `z` as sensitive material unnecessary for public key derivation. Document reason for clamping scalar.

7 weeks agoAdd missing type import and document a bit of context.
Chris Duncan [Sat, 15 Aug 2026 18:32:01 +0000 (11:32 -0700)]
Add missing type import and document a bit of context.

7 weeks agoAdjust errors and logging.
Chris Duncan [Sat, 15 Aug 2026 10:08:10 +0000 (03:08 -0700)]
Adjust errors and logging.

7 weeks agoAdjust function name.
Chris Duncan [Sat, 15 Aug 2026 10:02:01 +0000 (03:02 -0700)]
Adjust function name.

7 weeks agoSimplify errors from worker listener.
Chris Duncan [Sat, 15 Aug 2026 10:01:14 +0000 (03:01 -0700)]
Simplify errors from worker listener.

7 weeks agoFix WASM error message that varies between browsers.
Chris Duncan [Sat, 15 Aug 2026 09:52:02 +0000 (02:52 -0700)]
Fix WASM error message that varies between browsers.

7 weeks agoType adjustment.
Chris Duncan [Sat, 15 Aug 2026 09:50:42 +0000 (02:50 -0700)]
Type adjustment.

7 weeks agoDeprecate complicated worker state management and just determine if it's listening...
Chris Duncan [Sat, 15 Aug 2026 09:47:47 +0000 (02:47 -0700)]
Deprecate complicated worker state management and just determine if it's listening. Restore test webpage checks.

7 weeks agoRemove extraneous tests.
Chris Duncan [Sat, 15 Aug 2026 07:57:59 +0000 (00:57 -0700)]
Remove extraneous tests.

7 weeks agoFix output buffer copy.
Chris Duncan [Sat, 15 Aug 2026 07:57:46 +0000 (00:57 -0700)]
Fix output buffer copy.

7 weeks agoFix output buffer population.
Chris Duncan [Sat, 15 Aug 2026 07:38:09 +0000 (00:38 -0700)]
Fix output buffer population.

7 weeks agoEliminate redundant buffer clearing.
Chris Duncan [Sat, 15 Aug 2026 07:08:13 +0000 (00:08 -0700)]
Eliminate redundant buffer clearing.

7 weeks agoUpdate overloads and README examples with output buffer functionality.
Chris Duncan [Sat, 15 Aug 2026 07:06:26 +0000 (00:06 -0700)]
Update overloads and README examples with output buffer functionality.

7 weeks agoStart refactoring worker to simplify setup and teardown.
Chris Duncan [Sat, 15 Aug 2026 00:39:06 +0000 (17:39 -0700)]
Start refactoring worker to simplify setup and teardown.

7 weeks agoFix result listener.
Chris Duncan [Fri, 14 Aug 2026 23:41:14 +0000 (16:41 -0700)]
Fix result listener.

7 weeks agoMove constant into constants file.
Chris Duncan [Fri, 14 Aug 2026 23:38:03 +0000 (16:38 -0700)]
Move constant into constants file.

7 weeks agoAvoid writing seed to output buffer of derive since the private key bytes are discard...
Chris Duncan [Fri, 14 Aug 2026 23:29:17 +0000 (16:29 -0700)]
Avoid writing seed to output buffer of derive since the private key bytes are discarded by JS caller anyway.

7 weeks agoAdd tests for output buffers larger than necessary but still offset by 0.
Chris Duncan [Fri, 14 Aug 2026 23:21:06 +0000 (16:21 -0700)]
Add tests for output buffers larger than necessary but still offset by 0.

7 weeks agoAdd confirmed block from problematic account to check verification aligns with Nano...
Chris Duncan [Fri, 14 Aug 2026 21:26:08 +0000 (14:26 -0700)]
Add confirmed block from problematic account to check verification aligns with Nano node implementation, which it currently does not.

7 weeks agoFix buffer clearing way beyond its range.
Chris Duncan [Fri, 14 Aug 2026 05:26:46 +0000 (22:26 -0700)]
Fix buffer clearing way beyond its range.

7 weeks agoPin package version in example code.
Chris Duncan [Fri, 14 Aug 2026 05:01:58 +0000 (22:01 -0700)]
Pin package version in example code.