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

Feature request: Allow users to insert seed / passphrases / master hd key #538

Open
UserError0815 opened this issue Dec 27, 2023 · 6 comments

Comments

@UserError0815
Copy link

UserError0815 commented Dec 27, 2023

Please describe the feature you'd like to see added.

Hello

I miss the ability to insert my own passphrase while creating a new wallet.

Is your feature related to a problem, if so please describe it.

I am currently using a blank wallet with a single private key from a specific seed that is imported with the console which has no hdseed*.

The support for the legacy wallets will be removed in the future.

My concern is how can i create a wallet with my own private key?
Or will my current wallet, a blank wallet+single private key (no hdseed), work in the future?

warning

I have no trust in wallets that randomly created. My keys my wallet.

*console: sethdseed is not the solution because the private key i use is derived from a seed word. And it will generate other private keys rather than my.

Describe the solution you'd like

This is an example of how Raven Core solved it with the extended seed words.

wallet

Describe any alternatives you've considered

No response

Please leave any additional context

No response

@UserError0815
Copy link
Author

bitcoin #29130

@UserError0815 UserError0815 changed the title Feature request: CreateWallet() from passphrase window. (Wallet Recovery) Feature request: Allow users to add private keys Dec 27, 2023
@UserError0815 UserError0815 changed the title Feature request: Allow users to add private keys Feature request: Allow users to insert seed / passphrases / master hd key Dec 27, 2023
@Frank-GER
Copy link
Member

Under Settings -> Change Passphrase... you can set your password.

"using a blank wallet with a single private key" is highly NOT recommended for security reasons. Reusing keys over and over again reduces their security. That's why the wallet default is to generate new keys.

"sethdseed is not the solution because the private key i use is derived from a seed word"
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#from-mnemonic-to-seed
mnemonic -> hdseed -> priv keys
(HD Wallets: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)
Based on the hdseed wallets are generating 2 sets of keys: 'normal' keys (external keys) and 'change' keys (internal keys). Coin Control show you which keys are actually in use.

"will my current wallet, a blank wallet+single private key (no hdseed), work in the future?"
While legacy wallets will still work for some time, the future are descriptor wallets.

@UserError0815
Copy link
Author

UserError0815 commented Dec 28, 2023

Hello Frank-GER

first of all thank you for the reply.

Under Settings -> Change Passphrase... you can set your password.

Yes I did it too but It protects the wallet. What I mean is the additional passphrase/seed word -> see Raven Core Wallet above.

"using a blank wallet with a single private key" is highly NOT recommended for security reasons. Reusing keys over and over again reduces their security. That's why the wallet default is to generate new keys.

Thats why I ask for an option to generate the hd keys from a given seed word and NOT generating keys per default.

sethdseed
mnemonic -> hdseed -> priv keys

Ok, it was a little bit hard for me to describe it. Unfortunately, the sethdseed RPC cannot import the master hdseed, only the private key.

While legacy wallets will still work for some time, the future are descriptor wallets.

I'd like to use the descriptor wallet but i also cannot export my private keys from RPC to save it offline.
I know nothing about my keys... THIS is a security problem.

dumpwallet dumpprivkey
Only legacy wallets are supported by this command (code -4)

dumpwallet

dumppriv

@Frank-GER
Copy link
Member

Frank-GER commented Dec 29, 2023

Unfortunately, the sethdseed RPC cannot import the master hdseed, only the private key.

Master hdseed? Do you mean extended private masterkey?
What you need to look for is the line with hdseed in the wallet dumpfile of the wallet that created your key; use the priv key shown at the beginning of that line.
---> BE CAREFUL WITH YOUR KEY DUMPFILE; it has your priv keys and whoever gets that file can steal your coins!

I'd like to use the descriptor wallet but i also cannot export my private keys from RPC to save it offline.
Yeah, looks like you created that wallet from your screenshot as descriptor wallet.
For descriptor wallets there are separate commands like listdescriptors, importdescriptors,...

If you don't have a masternode:
You could simply create a descriptor wallet and send your coins from the actual address to a new address of your descriptor wallet.
Or you could check Pali Wallet (the Firefox browser extension) and send your coins there, it uses mnemonic for the seed.

@sidhujag
Copy link
Member

Most Bitcoin ecosystem is transitioning from HD core wallets to descriptor based wallets. If BTC supports seed phrases then i think we should but there is a reason they use a random seed and not words to generate keys or work with those type of keys as they are probably less secure. For more convenience as Frank said probably best to use pali or external wallets that support words or BIP39 based wallets.

@UserError0815
Copy link
Author

UserError0815 commented Dec 29, 2023

@Frank-GER
@sidhujag

Thank you for the informations.

Master hdseed? Do you mean extended private masterkey?

No. I meant the bip39 seed with a length of 128/256 bit. The sethdseed imports only the wifkey private key.

What you need to look for is the line with hdseed in the wallet dumpfile (...)

At this stage its unknown if you have a blank wallet.
To get this it should generated from the seed phrase or hdseed or xprv key.

---> BE CAREFUL WITH YOUR KEY DUMPFILE; it has your priv keys and whoever gets that file can steal your coins!

Thank you for the warnings, I'm aware of this. This accounts are for testing purposes. ;)
The private keys are on a offline computer. The main wallet is also created on a offline computer.

For descriptor wallets there are separate commands like listdescriptors, importdescriptors,...
You could simply create a descriptor wallet and send your coins from the actual address to a new address of your descriptor wallet.

That's my goal. I will look deeper at the RPC's listdescriptors and importdescriptors try to import the xprv keys.
I think this will solve the problem.

For more convenience as Frank said probably best to use pali or external wallets that support words or BIP39 based wallets.

But that's the point. Why can't the two wallets be consistent?
From aspect of an end user it should be more convenience to use the same keys & addresses across the two wallets Syscoin Core and Pali. And have a backup system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants