Are private keys published to the blockchain after spending coins from a wallet?

8

1

Always I spend coins the final balance of the address that is used for transaction will go to zero. The remaining coins comes back as a change to a new address. Will this indicate that the private key of the spending address is published now to the block chain for validation? Is it a risk to use this address furthermore for receiving and storing coins?

Joachim

Posted 2011-10-31T10:59:17.457

Reputation: 191

Amm ... paragraphs, please.ripper234 2011-10-31T23:02:41.303

Answers

10

The answer is no. Your private key is never transmitted to the network for any reason. You may wonder how the network can validate that a transaction is "yours".

This is possible because Bitcoin uses Public Key Cryptography (also know as asymetric cryptopgraphy).

http://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Public_key_signing.svg/250px-

Your addresses consist of a pair of keys which are mathematically linked. It is easy to determine the public key from the private key but impossible to determine the private key from the public key. It is more accurate to say it is computationally infeasible to determine the private key from the public key unless there is some cryptographic flaw.

Your public key is included in the transaction (along with destination and amount). The entire transaction is then signed with your private key. The signature is unique based on your private key and the contents of the transaction. Someone can't re-use a signature because it is only valid for a unique transaction.

When the network detects a transaction it will verify it by comparing the signature and public key to the transaction. While an attacker knows the public key he would need to know the private key to generate a valid signature.

Forgery/counterfiting is prevented because it is computationally infeasible (millions of years) to determine the correct signature without the private key. It is not possible for an attacker to change part of the transaction (like changing amount in fiat check fraud) as that would require different signature to be valid. The network can safely assume that if the signature is valid it must have been signed by the owner (presuambly with owners consent) and thus the transaction is valid.

This is why you must keep your wallet.dat secure. If someone gains access to your private keys they can sign transactions as you. Once an attacker can sign any transaction as you the best transaction is to transfer of all funds into account they control.

DeathAndTaxes

Posted 2011-10-31T10:59:17.457

Reputation: 8 269

1

Absolutely not. 1A corresponding private key used to sign spending transaction, in another words encrypt message, and everyone can verify it's authenticity by using 1A public key to decrypt the message. Private key never leaves wallet unless explicitly extracted.

Serith

Posted 2011-10-31T10:59:17.457

Reputation: 5 220

1OK Thanks for quickly answer. I understand that all my key pairs are save and I can use it again and again.Joachim 2011-10-31T11:53:13.983