I have a message encrypted with the public key. Metamask has its corresponding private key (account). How can I decrypt it with the metamask? Does metamask provide such feature?
What I meant is just like while performing the web3.eth.sign function, metamask provides us the window to sign a message does it also provide some functionality to decrypt a message?
In my application server stores a code (text) encrypted with user's public key. In the client side (javascript) user first needs to decrypt this code to do some task. So, either I prompt user to enter its private key (which is considered a bad practice) or I use some wallet or account management like Metamask.
Please suggest.