Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • $\begingroup$ So why exactly can I decrypt the message with the same public key used for encryption? $\endgroup$ Commented Aug 15, 2019 at 13:57
  • 1
    $\begingroup$ The same key can be computed either from (Alice PK, Bob SK) or (Bob PK, Alice SK). This is the key actually used for encryption, and decryption. $\endgroup$ Commented Aug 15, 2019 at 14:02
  • $\begingroup$ So this is ECDH with some symmetric cipher then? On the website, they mention not a single bit about DH. $\endgroup$ Commented Aug 15, 2019 at 14:18
  • 3
    $\begingroup$ Yes, crypto_box() is ECDH using X25519, and encryption using salsa20poly1305. $\endgroup$ Commented Aug 15, 2019 at 16:25