]> zoso.dev Git - libnemo.git/commitdiff
Document source and reason for changes.
authorChris Duncan <chris@zoso.dev>
Sat, 23 Nov 2024 08:40:55 +0000 (00:40 -0800)
committerChris Duncan <chris@zoso.dev>
Sat, 23 Nov 2024 08:40:55 +0000 (00:40 -0800)
src/lib/workers/nano25519.ts

index fcc526e8944c355256dd8f57884db0d92a0c760e..dcf656045b3c2b6e59640835949e2723194f73e6 100644 (file)
@@ -1,3 +1,8 @@
+// SPDX-FileCopyrightText: 2024 Chris Duncan <chris@zoso.dev>\r
+// SPDX-License-Identifier: GPL-3.0-or-later\r
+\r
+import blake2b from 'blake2b'\r
+\r
 (function(nacl) {\r
        'use strict';\r
        \r
@@ -6,6 +11,12 @@
        //\r
        // Implementation derived from TweetNaCl version 20140427.\r
        // See for details: http://tweetnacl.cr.yp.to/\r
+       //\r
+       // Modified in 2024 by Chris Duncan to hash secret key to public key using\r
+       // BLAKE2b instead of SHA-512 as specified in the documentation for Nano\r
+       // cryptocurrency.\r
+       // See for details: https://docs.nano.org/integration-guides/the-basics/\r
+       // Original source commit: https://github.com/dchest/tweetnacl-js/blob/71df1d6a1d78236ca3e9f6c788786e21f5a651a6/nacl-fast.js\r
        \r
        var gf = function(init) {\r
                var i, r = new Float64Array(16);\r