Currently I am investigating https://github.com/orlp/ed25519 , and it has example for signing but how to use it for encrypting/decrypting data? Thanks
How to use ed25519 to encrypt/decrypt data?
10.2k views Asked by Mickey Shine At
2
Currently I am investigating https://github.com/orlp/ed25519 , and it has example for signing but how to use it for encrypting/decrypting data? Thanks
Assuming you want to send a message to Alice who has the public key
A
.e
,E
e
andA
using theed25519_key_exchange
function.NaCl's
crypto_box
works almost like this. The main differences are that it uses Montgomery form public keys and uses HSalsa20 as hash in step 3.Some people don't feel comfortable with using the same keypair for signing and encryption. Use at your own risk. If you don't need this key reuse, I'd recommend LibSodium as an alternative.