Using libsodium, there are two routes you can go:<p><pre><code>    - crypto_box() for authenticated public-key encryption
    - crypto_box_seal() for anonymous public-key encryption
      (with message authentication)
</code></pre>
I know for a fact that there are JS bindings for libsodium.<p><a href="http:&#x2F;&#x2F;doc.libsodium.org&#x2F;bindings_for_other_languages&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;doc.libsodium.org&#x2F;bindings_for_other_languages&#x2F;index....</a><p>For PHP developers:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;chapters&#x2F;05-publickey-crypto.md#crypto-box" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;chapters&#x2F;08-advanced.md#crypto-box-seal" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;...</a>