dchest / tweetnacl-js

Port of TweetNaCl cryptographic library to JavaScript
https://tweetnacl.js.org
The Unlicense
1.75k stars 292 forks source link

Please also export "pack" function in nacl.lowlevel #214

Closed tetratorus closed 2 years ago

tetratorus commented 3 years ago

in some instances, we may want to import 32 byte partial private keys

this requires using a custom modified version of crypto_sign_keypair, which uses the pack function, and the pack function isn't exported. reimplementing using nacl.lowlevel primitives is troublesome.

would be great if every function was exported in nacl.lowlevel IMHO, since the purpose of lowlevel is to expose the internal methods so that implementers can reuse them for custom requirements

dchest commented 3 years ago

Will nacl.sign.keyPair.fromSeed work for your purpose?

CMEONE commented 3 years ago

@tetratorus @dchest I believe #218 resolves this issue, please take a look.