Our great sponsors
-
age
A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
But if you need to send an encrypted message to someone who will not be able to reply (but whose public key you already have), you can't use Diffie-Hellman. PGP used to be the way to do this, but it's gotten quite old, Age encryption is a good modern program targeted to this sort of use-case. It's important to keep in mind here that without Diffie-Hellman, you have no forward secrecy, meaning all encrypted messages are sent to the same key which can all be decrypted if that key is later compromised.
there are JS/TS version of Nacl for browsers: https://github.com/katyo/tweetnacl-ts