Skip to content
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

Closed
mjdietzx opened this issue Nov 8, 2018 · 7 comments
Labels
2.x 2.0 related issues Feature Request Stale Has not received enough activity

Comments

@mjdietzx
Copy link

mjdietzx commented Nov 8, 2018

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

@nivida nivida added this to the 1.0 milestone Nov 30, 2018
@nivida nivida added the 2.x 2.0 related issues label Jun 20, 2019
@emilianobonassi
Copy link

Completely agree with you @mjdietzx it's an enabler feature which could led to develop more l2 protocols on top of it.

Sign and decrypt are the basis of them.

@nivida I would like to work on it, do you have any suggestion on the workflow to follow?

@nivida
Copy link
Contributor

nivida commented Jan 6, 2020

@emilianobonassi Thanks for offering your help here! We currently do define contribution rules in PR #3224. Feel free to read them and to use the PR template we do provide and also don't hesitate to ask here in this issue or on your proposed PR if something isn't clear to you.

Btw.: I would recommend implementing this feature in the 1.x codebase because the 2.x architecture is changing heavily (refactoring 2.x: #3249).

@FCO
Copy link

FCO commented May 6, 2020

any update about this?

@GregTheGreek GregTheGreek removed this from the 1.0 milestone Jul 3, 2020
@github-actions
Copy link

github-actions bot commented Aug 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

@github-actions github-actions bot added the Stale Has not received enough activity label Aug 3, 2020
@mahdi-ln
Copy link

Metamask has added asymmetric encryption support in V8.0.0
how can I use it.in web3.js?

@mqklin
Copy link

mqklin commented Jul 12, 2023

hey @emilianobonassi
could you please send a link to a working github repo? a get 404 for the test-dapp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.x 2.0 related issues Feature Request Stale Has not received enough activity
Projects
None yet
Development

No branches or pull requests

7 participants