The following case:

There is a dApp in place, connected with a wallet (e.g. Metamask). Wallets usually don't offer public/priate key encryption/decryption.

I want to decrypt a message for the owner of an address, using the recipient's public key. The recipient then decrypt's the message using his private key. However, the wallets today are limited to sing messages.

Is there a possibility to encrypt/decrypt messages using today's wallets?

1 Answer 1


Metamask provides: eth_decrypt and eth_getEncryptionPublicKey.

Together with eth-sig-util should help encrypt and decrypt messages.

  • Hi @Ismael. Thank you very much. That's great news. How can I use It in a Dapp? I usually use WalletConnect to connect my Dapp.
    – user66732
    Commented Nov 8, 2021 at 8:17
  • Okay, WalletConnect supports etc_decrypt and get_EncryptionPublicKey if supported by wallet: discord.com/channels/492410046307631105/833628540456140821/…
    – user66732
    Commented Nov 8, 2021 at 8:23
  • @user66732 The links from metamask docs provide an example. I looked around if there's a specification but so far I haven't found an EIP. I hope it will be standard EIP and other wallets will implement it.
    – Ismael
    Commented Nov 8, 2021 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.