0

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

0

Metamask provides: eth_decrypt and eth_getEncryptionPublicKey.

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

3
  • 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
    Nov 8, 2021 at 8:17
  • Okay, WalletConnect supports etc_decrypt and get_EncryptionPublicKey if supported by wallet: discord.com/channels/492410046307631105/833628540456140821/…
    – user66732
    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
    Nov 8, 2021 at 13:46

Your Answer

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

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