jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.18k stars 1.73k forks source link

Sign by 32-byte nacl.box secretKey and verify by 32-byte publicKey #956

Closed username1565 closed 4 years ago

username1565 commented 4 years ago

You can rewrite this from JavaScript and add yourself. See this commit: https://github.com/username1565/nanoboard-javascript-captcha/commit/1bcefd221d430e630e8f4b999ce0eadfaa6e7e85

In this case no need to generate another public key to sign messages and verify this. And one keyPair can be used to encrypt/decrypt and sign/verify. This is Tox private key and public key in ToxID: https://tox.chat/download.html

Best regards.

jedisct1 commented 4 years ago

?

username1565 commented 4 years ago

Demo - here: https://username1565.github.io/nanoboard-javascript-captcha/index.html#/sign Press Random32-button to generate two 32-bytes .box-keys, sign the message of this and verify it. This is base64-encoded .box-keysPair, not a sign-keyPair.