Closed redDwarf03 closed 3 years ago
Hello thanks for your work
I would like to use your library to translate this js code:
const { public: ephemeralPublicKey, private: ephemeralPrivateKey} = curve25519.generateKeyPair(randomBytes(32)) const curve25519pub = ed2curve.convertPublicKey(pubBuf) var sharedKey = curve25519.sharedKey(ephemeralPrivateKey, curve25519pub)
But I don't know how. Is it possible with your library ?
Best
Full code https://github.com/archethic-foundation/libjs/blob/b2b22f79d91bd88d7afd9828c536af930f4c7f19/lib/crypto.js#L286
ed2curve documentation: https://www.npmjs.com/package/ed2curve
Hi,
There is a conversion utility to use ed25519 for encryption/decryption, that you can use to achieve what you want.
https://github.com/ilap/pinenacl-dart/blob/c6f9c71f1cc5c1696389c9d57e2add447ae91480/lib/src/tweetnacl/tweetnacl_ext.dart#L57
https://github.com/ilap/pinenacl-dart/blob/c6f9c71f1cc5c1696389c9d57e2add447ae91480/lib/src/tweetnacl/tweetnacl_ext.dart#L79
great. it works. thank you!
Hello thanks for your work
I would like to use your library to translate this js code:
But I don't know how. Is it possible with your library ?
Best