Bitcoin Forum

Other => Beginners & Help => Topic started by: KleinMatthias on November 29, 2013, 10:28:53 PM



Title: Where is the private key / signature located?
Post by: KleinMatthias on November 29, 2013, 10:28:53 PM
As far as I understand BTC, the system is based on digital signatures that require a private key. Since no BTC client I am aware of requires the manual creation of a key or key pair, I assume, this task is done automatically and fully transparent to the user. But where is that thing actually located? In the wallet? Or is there a second location? If it was in the wallet, creating a backup of the wallet file is all that would be necessary to make sure that no BTC are ever "lost", right?


Title: Re: Where is the private key / signature located?
Post by: BurtW on November 29, 2013, 10:31:15 PM
bitcoin-qt?

Then wallet.dat


Title: Re: Where is the private key / signature located?
Post by: manoamano on November 29, 2013, 10:33:39 PM
You can go to https://www.bitaddress.org/ and create a new address.
There, you will see the private and public keys.


Title: Re: Where is the private key / signature located?
Post by: Light on November 29, 2013, 10:34:14 PM
Depending on what client your using and whether your using an online wallet or not, it should either be in your wallet.dat file or you should be able to find an option to export your private keys.


Title: Re: Where is the private key / signature located?
Post by: BurtW on November 29, 2013, 10:36:37 PM
You can go to https://www.bitaddress.org/ and create a new address.
There, you will see the private and public keys.
Is not relevent to his question.

Yes, if you are using the standard bitcoin-qt wallet (from bitcoin.org) then you will need to backup your wallet.dat file.


Title: Re: Where is the private key / signature located?
Post by: manoamano on November 29, 2013, 10:38:33 PM
You can go to https://www.bitaddress.org/ and create a new address.
There, you will see the private and public keys.
Is not relevent to his question.

Yes, if you are using the standard bitcoin-qt wallet (from bitcoin.org) then you will need to backup your wallet.dat file.


It is relevant to what he wants to know (how to know a private key related to a public key).
For instance, if he has no IT knowledge, and no btc in his wallet, he can easily create a new one (as I said), and import it.





Title: Re: Where is the private key / signature located?
Post by: DannyHamilton on November 29, 2013, 10:39:08 PM
As far as I understand BTC, the system is based on digital signatures that require a private key. Since no BTC client I am aware of requires the manual creation of a key or key pair, I assume, this task is done automatically and fully transparent to the user. But where is that thing actually located? In the wallet? Or is there a second location? If it was in the wallet, creating a backup of the wallet file is all that would be necessary to make sure that no BTC are ever "lost", right?

Depends on the wallet you use.

With Bitcoin-Qt you need to create backups regularly since it creates a new key pair every time you send a transaction.

It pre-generates the next 100 keypairs that it will use, so you don't have to backup after every transaction.


Title: Re: Where is the private key / signature located?
Post by: KleinMatthias on November 29, 2013, 10:44:57 PM
Excellent, thank you all very much for the quick help. Yes, I was referring to QT.

But to be honest, I am now somewhat confused by the answer of DannyHamilton. So I'd like to ask: aren't all key pairs stored in the wallet, then? Or why is a frequent backup especially necessary with qt?


Title: Re: Where is the private key / signature located?
Post by: DannyHamilton on November 29, 2013, 10:54:46 PM
Excellent, thank you all very much for the quick help. Yes, I was referring to QT.

But to be honest, I am now somewhat confused by the answer of DannyHamilton. So I'd like to ask: aren't all key pairs stored in the wallet, then? Or why is a frequent backup especially necessary with qt?

Bitcoin-Qt pre-generates 100 key pairs, and uses one of those every time you send a transaction.

Then it generates a brand new key pair and adds it to the pool of pre-generated key pairs.

So if you install Bitcoin-Qt and then create a backup, the backup will have 100 unused key pairs.

Then if you generate 25 receiving addresses and send out 75 transactions the backup that you previously made will still only have the 100 key pairs that where backed up.  However, your Bitcoin-Qt will have 200 key pairs.

That's 100 key pairs that are not in your backup.

The next transaction that you send will use one of these newer key pairs that are not in your backup.  If you then restore the backup, you'll lose the bitcoins that were associated with that most recent public key.


Title: Re: Where is the private key / signature located?
Post by: KleinMatthias on November 29, 2013, 11:04:20 PM
Excellent, thank you all very much for the quick help. Yes, I was referring to QT.

But to be honest, I am now somewhat confused by the answer of DannyHamilton. So I'd like to ask: aren't all key pairs stored in the wallet, then? Or why is a frequent backup especially necessary with qt?

Bitcoin-Qt pre-generates 100 key pairs, and uses one of those every time you send a transaction.

Then it generates a brand new key pair and adds it to the pool of pre-generated key pairs.

So if you install Bitcoin-Qt and then create a backup, the backup will have 100 unused key pairs.

Then if you generate 25 receiving addresses and send out 75 transactions the backup that you previously made will still only have the 100 key pairs that where backed up.  However, your Bitcoin-Qt will have 200 key pairs.

That's 100 key pairs that are not in your backup.

The next transaction that you send will use one of these newer key pairs that are not in your backup.  If you then restore the backup, you'll lose the bitcoins that were associated with that most recent public key.

Perfect answer - now I understand. Thanks!


Title: Re: Where is the private key / signature located?
Post by: Wili on November 30, 2013, 02:38:05 AM
Excellent, thank you all very much for the quick help. Yes, I was referring to QT.

But to be honest, I am now somewhat confused by the answer of DannyHamilton. So I'd like to ask: aren't all key pairs stored in the wallet, then? Or why is a frequent backup especially necessary with qt?

Bitcoin-Qt pre-generates 100 key pairs, and uses one of those every time you send a transaction.

Then it generates a brand new key pair and adds it to the pool of pre-generated key pairs.

So if you install Bitcoin-Qt and then create a backup, the backup will have 100 unused key pairs.

Then if you generate 25 receiving addresses and send out 75 transactions the backup that you previously made will still only have the 100 key pairs that where backed up.  However, your Bitcoin-Qt will have 200 key pairs.

That's 100 key pairs that are not in your backup.

The next transaction that you send will use one of these newer key pairs that are not in your backup.  If you then restore the backup, you'll lose the bitcoins that were associated with that most recent public key.

Perfect answer - now I understand. Thanks!

Just one more thing to add.
You can pre-gen more keys by using the argument "-keypool=<n>" if you want to.