Closed getify closed 4 months ago
If you are talking about encrypting-to-public-key aka hybrid encryption, this is out of scope for noble-curves, because it involves using ciphers (noble-ciphers). The encryption itself does not involve curves at all. And we only provide low-level primitives per-package.
Dajiaji built HPKE.js on top of noble, conforming to RFC 9180, which has x25519 based encryption: https://github.com/dajiaji/hpke-js/blob/main/x/dhkem-x25519/README.md
I saw in another issue that you intentionally don't implement montgomery curve operations. I believe/assume this means you intentionally don't have an
encrypt()
/decrypt()
method pair on thex25519
API, correct?Is there a way to do so, perhaps with the abstract API or utils, given having the x25519 keypair ready?
I'd like to do something like this:
Thanks for any guidance.