From d0891a3e2b374b6fb8c265feb5a0f7e1982c3160 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 23 Nov 2024 00:40:55 -0800 Subject: [PATCH] Document source and reason for changes. --- src/lib/workers/nano25519.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/workers/nano25519.ts b/src/lib/workers/nano25519.ts index fcc526e..dcf6560 100644 --- a/src/lib/workers/nano25519.ts +++ b/src/lib/workers/nano25519.ts @@ -1,3 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Chris Duncan +// SPDX-License-Identifier: GPL-3.0-or-later + +import blake2b from 'blake2b' + (function(nacl) { 'use strict'; @@ -6,6 +11,12 @@ // // Implementation derived from TweetNaCl version 20140427. // See for details: http://tweetnacl.cr.yp.to/ + // + // Modified in 2024 by Chris Duncan to hash secret key to public key using + // BLAKE2b instead of SHA-512 as specified in the documentation for Nano + // cryptocurrency. + // See for details: https://docs.nano.org/integration-guides/the-basics/ + // Original source commit: https://github.com/dchest/tweetnacl-js/blob/71df1d6a1d78236ca3e9f6c788786e21f5a651a6/nacl-fast.js var gf = function(init) { var i, r = new Float64Array(16); -- 2.34.1