A really nice feature of web3 is personal.sign, enabling a user to sign data with their wallet. It seems like this has enabled a lot of interesting features in DApps (i.e. logging in by signing a message with wallet, signing legal documents with wallet, etc..)
I think it would be great to also support the 'inverse', personal.decrypt - enabling a user to decrypt data (encrypted for their public key) with their private key. ie data for a specific public wallet address can be decrypted from the wallet (similar to https://github.com/pubkey/eth-crypto#decryptwithprivatekey). assuming the data was encrypted for that specific public wallet address (similar to: https://github.com/pubkey/eth-crypto#encryptwithpublickey)
One example use-case, a DApp has some info for a specific user (ie a transaction receipt), so they encrypt it for that user's public wallet address, upload this encyrpted data to ipfs, and then the user can pull this encypted data and decrypt it by confirming in their wallet. this way the DApp can display the data to the user in the frontend without access to the user's private key
DApps could even facilitate the sharing of data between parties (ie user to user, or user to a different dapp) without actually having access to that data
Is this a realistic feature to get added to the web3 interface? Any potential blockers or issues?
Thanks,
Mike