<p>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".</p>

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

<p><img src="https://i.sstatic.net/MSXaf.png" alt="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Public_key_signing.svg/250px-"></p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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. <strong>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.</strong>  </p>

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

CC BY-SA 3.0
2011-10-31T13:51:22.307Z
2011-10-31T13:51:22.307Z
DeathAndTaxes
<p>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.</p>

CC BY-SA 3.0
2011-10-31T11:53:13.983Z
OK Thanks for quickly answer. I understand that all my key pairs are save and I can use it again and again.
Joachim
CC BY-SA 3.0
2011-10-31T11:21:40.067Z
2011-10-31T11:21:40.067Z
Serith
<p>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?</p>

CC BY-SA 3.0
2011-10-31T23:02:41.303Z
Amm ... paragraphs, _please_.
ripper234
<transactions><blockchain><wallet>
Are private keys published to the blockchain after spending coins from a wallet?
Joachim
# Are private keys published to the blockchain after spending coins from a wallet?

(Asked by: username_0 on 2011-10-31)

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?

**Tags:** transactions, blockchain, wallet

> **Comments:**
> **username_1**: Amm ... paragraphs, _please_.  

---

## 2 answers

### Answer by username_2 on 2011-10-31. Score: 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-](https://i.sstatic.net/MSXaf.png)

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.


---

### Answer by username_3 on 2011-10-31. Score: 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.

> **Comments:**
> **username_0**: OK Thanks for quickly answer. I understand that all my key pairs are save and I can use it again and again.  

---

