How can I do asymmetric encryption by using Stellar's private key of sender and Stellar's public key of receiver and vice-versa in case of case decryption? I had gone through many methods but I am not getting what I want.

  • 2
    There aren't that many options. tweetnacl-box, like, I showed you, does work. Maybe you can expand on what you're trying to accomplish? – Johan Stén Sep 27 '18 at 11:45
  • Yeah I tried using that but it is not accepting stellar's keypair. – pri Sep 27 '18 at 11:58
  • 1
    Of course it doesn't. ed25519 keys are signing keys. They need to be converted to curve25519 keys first. And before that, you need to convert the keys from StrKey encoding to raw binary. – Johan Stén Sep 27 '18 at 12:06
  • Yeah I know that but still I am facing problem because the library you suggested was written in js and I am a python developer – pri Sep 29 '18 at 5:28
  • There are python libraries for this also, that's what I used. Years ago though, so I don't remember what they are. – Johan Stén Oct 1 '18 at 5:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.