dchest / tweetnacl-js

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

Export scalarMult #189

Closed rg911 closed 4 years ago

rg911 commented 4 years ago

Hi any reason why the scalarMult method is not exported but only the crypto_scalarMult? Any chance to export the scalarMult: https://github.com/dchest/tweetnacl-js/blob/5bf1ff5fa15e89ae249401b0d5aa54c5c5955041/nacl.js#L680 ?

dchest commented 4 years ago

https://github.com/dchest/tweetnacl-js#scalar-multiplication

dchest commented 4 years ago

Oh, you mean for the Edwards curve? It's indeed not exported, that's how it is in TweetNaCl. I don't recommend using internals at all, since they are not suitable for the general use.

(Check the undocumented lowlevel exports, but they are 1) not documented/supported, 2) require careful consideration before using, that is familiarity with how tweetnacl is implemented https://tweetnacl.cr.yp.to/tweetnacl-20140917.pdf)