Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to get the private key for a generated address? #732

Closed
nopara73 opened this issue Feb 4, 2018 · 9 comments

Comments

@nopara73
Copy link

@nopara73 nopara73 commented Feb 4, 2018

Assuming I'm using the lnd daemon. I don't seem to find a way to do this. Maybe I can get the master extended private key somehow? Or am I supposed to do it manually? Find the wallet file, decrypt it and go on with my life?

@nopara73 nopara73 changed the title [Question] How to get a private key for a generated address? [Question] How to get the private key for a generated address? Feb 4, 2018
@Roasbeef

This comment has been minimized.

Copy link
Member

@Roasbeef Roasbeef commented Feb 4, 2018

There's no way to extract private keys from the daemon currently. All key handling and signing are abstracted behind a set of core interfaces. Assuming a btcwallet implementation for these interfaces, one would need to find the wallet file, decrypt it, etc.

What use case do you have in mind?

@nopara73

This comment has been minimized.

Copy link
Author

@nopara73 nopara73 commented Feb 4, 2018

@Roasbeef Thanks for your swift reply!

There's no way to extract private keys from the daemon currently.

Is it a security consideration or it just wasn't implemented?

What use case do you have in mind?

I am looking at the possibility of replacing HiddenWallet's back end, which is custom code right now with lnd, because of Neutrino and the possibility of seamless future LN integration. I must sign an arbitrary message, build transactions with shuffled input and output indexing, sign CoinJoin transactions partially, these comes to my mind, but there are many more. As I also figured there is no transaction hex propagation through the daemon, either, so I am starting to think there are too many walls to climb here.

@nopara73 nopara73 closed this Feb 4, 2018
@Roasbeef

This comment has been minimized.

Copy link
Member

@Roasbeef Roasbeef commented Feb 5, 2018

Well it's just that we haven't added such an interface yet, not that we'll never do so.

@halseth

This comment has been minimized.

Copy link
Collaborator

@halseth halseth commented Feb 5, 2018

Well ww do have the SignMessage RPC, maybe it could be extended to specify which address to sign for?

@plantOS

This comment has been minimized.

Copy link

@plantOS plantOS commented Jun 15, 2018

Any progress on this?

@patch-master

This comment has been minimized.

Copy link

@patch-master patch-master commented Oct 21, 2018

Hi there, any progress on enabling the extraction of private keys?

@rootzoll rootzoll referenced this issue Jan 9, 2019
@merclyn

This comment has been minimized.

Copy link

@merclyn merclyn commented Jan 17, 2019

Could we export the extended public Key?

@jacohend

This comment has been minimized.

Copy link

@jacohend jacohend commented Aug 12, 2019

@Roasbeef I second @merclyn, I need to get my wallet's public key so I can use the SignOutputRaw grpc, which requires either a "key_locator" or a wallet public key as an argument

@yohaaan

This comment has been minimized.

Copy link

@yohaaan yohaaan commented Nov 12, 2019

any update on this? I'd use private key extraction as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.