0

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

  • 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 Jan 15 '18 at 07:59

1 Answers1

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.

chytrik
  • 17,910
  • 3
  • 18
  • 47