Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Feature request: personal.decrypt, enable an encrypted message for a publicKey to be decrypted from that wallet #2039

@mjdietzx

Description

@mjdietzx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.x2.0 related issuesFeature RequestStaleHas not received enough activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions