dchest / tweetnacl-js

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

Is there API for Point addition? #184

Closed SHiftLin closed 4 years ago

SHiftLin commented 4 years ago

Scalar multiplication is provided. From my understanding, for a Point P, and a integer c, it returns cP=P+P+....+P. But For Point P and Q, can I compute P+Q through tweetnacl?

valerini commented 4 years ago

Yeh, function add(p, q) gives point addition (see https://github.com/dchest/tweetnacl-js/blob/1b61c87b6df9859ac136c3c025cdb974220c333c/nacl.js#L638).