Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ZuzanaKiraly on March 06, 2018, 05:54:38 AM



Title: My private key is not accepted by any other wallet.
Post by: ZuzanaKiraly on March 06, 2018, 05:54:38 AM
Hi everyone, I have a small problem and I am absolutely desperate already.
I have downloaded a bitcoin core app and while still synchronising I have sent bitcoins on it.
Afterwards, I found out that my computer' hard drive is not big enough for the file so I tried to dump the private key and use it in another wallet. However, the private key that I receive by the bitcoin core is not accepted anywhere.
Can anyone help me please? I am new to this and not sure what to do...


Title: Re: My private key is not accepted by any other wallet.
Post by: Xynerise on March 06, 2018, 07:02:16 AM
What does the private key start with -- 5, K, or L?

Also, how did you get the private key?
Code:
 dumpprivkey <address>

Also, when you say "not accepted anywhere" what exactly do you mean?


Title: Re: My private key is not accepted by any other wallet.
Post by: LoyceV on March 06, 2018, 07:26:26 AM
I found out that my computer' hard drive is not big enough for the file
An easy solution is to prune (https://bitcoin.org/en/release/v0.12.0#wallet-pruning) Bitcoin Core:
Quote
To enable block pruning set prune=<N> on the command line or in bitcoin.conf, where N is the number of MiB to allot for raw block & undo data.
Use prune=550, and let Bitcoin Core sync. It still needs to download the full 170 GB, but won't take more than 10 GB disk space on your computer.


Title: Re: My private key is not accepted by any other wallet.
Post by: hugeblack on March 06, 2018, 08:42:42 AM
I think its problem is import a private key of a segwit address (P2SH-P2WPKH) into a non-segwit wallet.
What is your "another wallet"?
did you try electrum wallet? "sweep pvt key"


Title: Re: My private key is not accepted by any other wallet.
Post by: AdolfinWolf on March 06, 2018, 08:26:10 PM
I think its problem is import a private key of a segwit address (P2SH-P2WPKH) into a non-segwit wallet.
What is your "another wallet"?
did you try electrum wallet? "sweep pvt key"


Private keys of segwit adresses and nonsegwit adresses are exactly the same format ( and the same), so no, that's probably not the issue. The private key he has is either not a private key, or somehow encrypted.

To OP:

What wallet are you trying to import it in? Electrum? How many chars is the key you have?


Title: Re: My private key is not accepted by any other wallet.
Post by: AdolfinWolf on March 07, 2018, 05:35:57 PM
Actually SegWit address (Bech32) have different format with legacy address, i've tried import SegWit Bech32 private key to wallet which don't support SegWit and obviously the private key isn't accepted.
I don't think so.

Segwit is simply a different payment script + adress format, it does not generate a different key. A private key can both generate a traditional adress (P2PKH), or a segwit one, (P2SH).

This answer is a bit more indepth about it, https://bitcoin.stackexchange.com/a/70123


Title: Re: My private key is not accepted by any other wallet.
Post by: Xynerise on March 07, 2018, 05:58:00 PM
I don't think so.

Segwit is simply a different payment script + adress format, it does not generate a different key. A private key can both generate a traditional adress (P2PKH), or a segwit one, (P2SH).

This answer is a bit more indepth about it, https://bitcoin.stackexchange.com/a/70123
This is correct.
Addresses are derived from public keys, which are first derived from private keys.
Private key -> public key -> address
So you can have one (WIF) private key, with different addresses, depending on the private keys.
Ordinarily you can create 2 P2PKH addresses from one private key, by using either compressed or uncompressed public keys.
You can also derive P2PWKH, P2SH, and P2SH-P2WPKH addresses from the same public key (note that segwit addresses are all derived from compressed public keys)