dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

Add RPC to validate seed matches running wallet

Open jrick opened this issue 6 years ago • 3 comments

The wallet does not save the seed, so it is impossible to fetch the seed at a later time (it must be saved at wallet creation), but it is possible to verify that a seed matches the running wallet by deriving coin type pubkeys and comparing against the running wallet. Add a new JSON-RPC method verifyseed that performs this check. It is also desirable for the response to include the coin type so that the user is aware of what coin type the seed restored wallet should be operating on.

The seed can be a single parameter to the request, and the response a JSON object with the result of the match and the current coin type.

This allows seed verification without introducing a new one-off tool (such as one that would compare a dumped xpub from the wallet).

For users concerned about the security of seeds in their command history, dcrctl supports using - as a parameter to read input from stdin. This enables easy checking for a seed saved in a text file, decrypted in a command stream, or typed manually using an existing tool such as promptsecret.

jrick avatar Jan 20 '18 00:01 jrick

@githubsands will take this (but i can't assign him the issue through github because he's not part of the decred org)

jrick avatar Mar 08 '18 18:03 jrick

Feature still required? I'll like to implement.

itswisdomagain avatar Apr 16 '20 08:04 itswisdomagain

I have it done @itswisdomagain

githubsands avatar Apr 20 '20 16:04 githubsands