Skip to content

[RPC] dumpmasterprivkey command - #9504

Closed
achow101 wants to merge 1 commit into
bitcoin:masterfrom
achow101:dumpmasterprivkey
Closed

[RPC] dumpmasterprivkey command#9504
achow101 wants to merge 1 commit into
bitcoin:masterfrom
achow101:dumpmasterprivkey

Conversation

@achow101

Copy link
Copy Markdown
Member

RPC command to export the master private key from a wallet.

@luke-jr

luke-jr commented Jan 10, 2017

Copy link
Copy Markdown
Contributor

dumpwallet already does this...?

@achow101

Copy link
Copy Markdown
Member Author

dumpwallet requires that you dump to a file then find that file and open it to get the master private key. This just gives it to you with the command.

@jonasschnelli jonasschnelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should add more private key exporting features because it increases the risk of doing something wrong with that.

If we are going to add this, it would require...
... add dumpmasterprivkey to the UI's sensitiv data filter
... add a test somewhere

Comment thread src/wallet/rpcwallet.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: column alignment.

Comment thread src/wallet/rpcdump.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CWallet::IsHDEnabled()?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well,... you need the masterKeys CKeyID anyway,... but I guess it would still make sense to use CWallet::IsHDEnabled()

@achow101

Copy link
Copy Markdown
Member Author

@jonasschnelli there is no sensitive data filter for the dump* commands. The user is not entering sensitive data, only sensitive data being output.

@achow101

Copy link
Copy Markdown
Member Author

Addressed nits and added a test.

It may need more tests, but I'm not sure what actually needs to be tested.

@jonasschnelli

Copy link
Copy Markdown
Contributor

@jonasschnelli there is no sensitive data filter for the dump* commands. The user is not entering sensitive data, only sensitive data being output.

Argh. Right. I was confusing the sensitiv history filter with the idea of having a filter that disables certain sensitive commands.

@achow101
achow101 force-pushed the dumpmasterprivkey branch 2 times, most recently from c74e66b to dfa8648 Compare August 17, 2017 01:15
RPC command to export the master private key from a wallet.
@achow101

achow101 commented Feb 8, 2018

Copy link
Copy Markdown
Member Author

Closing this for now

@achow101 achow101 closed this Feb 8, 2018
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants