5

The project I'm trying to make has this flow:

  1. User inputs some data
  2. It gets encrypted using their private key
  3. It gets stored to a place which is accessible to anyone but only the person in possession of the private key will be able to decrypt it.

Is there a way I can implement that and make it compatible with all wallets?

1 Answer 1

3

I'm not sure if it's the same way you me but I was using metamask for something like this before, but it's not suggested anymore. Also metamask deprecated its related method. The main reason is that it's not that safe to use the same key for signing and encrypting. You can see the message from metamask: MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future. For more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686

On the other hand, there is a new proposal for this purpose EIP-5630. I'm still trying to figure it out how to use it. You can check it out https://eips.ethereum.org/EIPS/eip-5630

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.