Currently, It’s possible to encrypt a message by first using eth_getEncryptionPublicKey which uses my private key for retrieval. I can then decrypt the message using eth_decrypt.
What if I want to encrypt a message and send it to any Ethereum address? I know that I can get the Ethereum public key of any address, as long as that account has signed and sent at least one transaction. Can I use that Ethereum public key to encrypt a message that MetaMask will be able to decrypt?
Right now Metamask eliminates the use case of encrypting messages and sending them to any address, and allowing the owner of the private key associated with the address to decrypt with MetaMask.
Could we consider allowing other decryption algorithms to MetaMask, like ECIES? Though the security properties might be worse, can we leave that up to developers to decide what algorithms they should use, and not restrict use cases?
- Used @lastmjs comment as inspiration for this topic as part of a discussion at Add support for encryption · Issue #1190 · MetaMask/metamask-extension · GitHub