2

A geth node is managing an Ethereum account, having the control over its private key at keystore folder. I guess to keep it safe, best practices are letting geth by its own perform all operations that require access to the private key. Well, the case is I need to decrypt a message that was encrypted using the public key of the geth account, in order to be only readable by this account. So, is there any geth function via JSON-RPC capable of decrypting a message using the private key of the account? Something like this:

ECIES.Decrypt(account, message);

The only other choice is left seems to be accessing directly to the keystore folder and decrypt the message using the private key there, but I don't feel comfortable doing so, it seems a quite insecure scheme, right?

Ref.:

How to encrypt a message with the public-key of an Ethereum address

1 Answers1

2

You can't do that with Geth. However Parity does expose a module that does just that: see the parity_decryptMessage() function.

David Ammouial
  • 415
  • 3
  • 11