checkArrayTypes(seed)\r
if (seed.length !== crypto_sign_SEEDBYTES)\r
throw new Error('bad seed size')\r
- const pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES)\r
- const sk = new Uint8Array(crypto_sign_SECRETKEYBYTES)\r
- for (let i = 0; i < 32; i++) sk[i] = seed[i]\r
\r
+ const pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES)\r
const p = [gf(), gf(), gf(), gf()]\r
\r
const hash = new Blake2b(64).update(seed).digest()\r
scalarbase(p, hash)\r
pack(pk, p)\r
\r
- for (let i = 0; i < 32; i++) sk[i + 32] = pk[i]\r
-\r
- return { publicKey: pk, secretKey: sk }\r
+ return { publicKey: pk }\r
}\r
\r
return { sign, open, detached, verify, keyPair }\r