<p>To spend bitcoin, you must know the private key of the address it sits in. The private key signs the transaction itself, so if someone else attempted to 'copy this signature onto a new transaction', it would not be a valid signature on that new transaction. </p>

<p>Importantly, there is a difference between a private key and a digital signature made by that private key. Knowing the digital signature does not allow you to figure out the private key. </p>

<p>A simplified example:</p>

<ul>
<li><p>PrivKey A signs transaction B, which makes a digital signature B*. This transaction is broadcast to the network.</p></li>
<li><p>Someone takes digital signature B*, and adds it to transaction C (stealing the bitcoin).</p></li>
<li><p>The network can tell that transaction C has an invalid signature, and reject it. This happens because the signature was <em>made for transaction B</em>. If PrivKey A signed transaction C, it would make digital signature C*. So in order to steal the coins, the attacker must know PrivKey A, and use it to create digital signature C*; knowing B* will not help them do this. </p></li>
</ul>

<p>For more info, <a href="https://en.wikipedia.org/wiki/Public-key_cryptography" rel="nofollow noreferrer">read more about public-key cryptography.</a></p>

CC BY-SA 3.0
2018-01-15T06:07:39.790Z
2018-01-15T06:12:50.637Z
2018-01-15T06:12:50.637Z
chytrik
<p>Digital signature is made from private key of sender A.if only public key of B can use it then public key is available to everybody then why can anyone catch that digital signature and use it to his own public key ? Sorry for my bad english my native language is not english</p>

CC BY-SA 3.0
2018-01-15T07:59:04.663Z
in bitcoin the transaction is assembled by lots of data (verion,inputs,outputs,locktime). This transaction is hashed, and this hash is signed. So the signature only proofs, that you where signing this specific transaction hash. If you use it for another transaction, the output or the transaction id is different, which makes the hash different, hence when checking the signature, it would become invalid...
pebwindkraft
<digitalcoin>
Digital signature why it can't be used by other public key
red hair shanks
# Digital signature why it can't be used by other public key

(Asked by: username_0 on 2018-01-15)

Digital signature is made from private key of sender A.if only public key of B can use it then public key is available to everybody then why can anyone catch that digital signature and use it to his own public key ? Sorry for my bad english my native language is not english

**Tags:** digitalcoin

> **Comments:**
> **username_1**: in bitcoin the transaction is assembled by lots of data (verion,inputs,outputs,locktime). This transaction is hashed, and this hash is signed. So the signature only proofs, that you where signing this specific transaction hash. If you use it for another transaction, the output or the transaction id is different, which makes the hash different, hence when checking the signature, it would become invalid...  

---

## 1 answers

### Answer by username_2 on 2018-01-15. Score: 1

To spend bitcoin, you must know the private key of the address it sits in. The private key signs the transaction itself, so if someone else attempted to 'copy this signature onto a new transaction', it would not be a valid signature on that new transaction.

Importantly, there is a difference between a private key and a digital signature made by that private key. Knowing the digital signature does not allow you to figure out the private key.

A simplified example:

* PrivKey A signs transaction B, which makes a digital signature B\*. This transaction is broadcast to the network.
* Someone takes digital signature B\*, and adds it to transaction C (stealing the bitcoin).
* The network can tell that transaction C has an invalid signature, and reject it. This happens because the signature was *made for transaction B*. If PrivKey A signed transaction C, it would make digital signature C\*. So in order to steal the coins, the attacker must know PrivKey A, and use it to create digital signature C\*; knowing B\* will not help them do this.

For more info, [read more about public-key cryptography.](https://en.wikipedia.org/wiki/Public-key_cryptography)


---

