Bitcoin Forum
November 10, 2024, 04:30:11 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can a signature be reused in a new transaction to steal coins ?  (Read 966 times)
Farghaly (OP)
Newbie
*
Offline Offline

Activity: 38
Merit: 0


View Profile
December 20, 2015, 08:56:46 PM
 #1

Blockchain explorers contain alot of signatures in spent coins transaction in the scriptSig part of the transaction, can the attacker reuse this signature in a new transaction to steal coins received on this address ?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
December 20, 2015, 09:02:53 PM
 #2

Blockchain explorers contain alot of signatures in spent coins transaction in the scriptSig part of the transaction, can the attacker reuse this signature in a new transaction to steal coins received on this address ?
No. The signatures in a transaction applies only to that transaction due to hashes. The hash can only represent on specific set of data, that one specific transaction. If the data is different, then that hash will not match and thus the signature is invalid for that data. Unless the attacker is able to find a hash collision which also happens to be a proper transaction, then signatures cannot be reused. IIRC the current hash used is SHA256 which has no known attacks against it.

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1540


No I dont escrow anymore.


View Profile
December 20, 2015, 09:08:01 PM
 #3

Blockchain explorers contain alot of signatures in spent coins transaction in the scriptSig part of the transaction, can the attacker reuse this signature in a new transaction to steal coins received on this address ?

No, the signature is only valid for the given inputs and the given outputs of a transaction. Once the transaction is confirmed the inputs are no longer valid so they can not be used again. The siganture however is not valid for different inputs. So an attacker could only create a replay attack (send the exact same transaction again) which would get them banned by their peers over time as they keep broadcasting invalid transactions.

Im not really here, its just your imagination.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
December 21, 2015, 03:57:30 AM
 #4

shorena and knightdk have provided reasonably good answers.

Under normal circumstances with a properly operating wallet, a signature of one or more transactions will not provide enough information for an attacker to create valid signatures for other transactions that use inputs that were sent to the same address.

However, when generating a signature, it the signing software needs to generate a unique and unknown (to anyone else) number that will be used for that signature.  It is VERY important that that number not be re-used for any other signatures for the same address.

If the software that's generating your transactions re-uses the same number in more than one signature, then an attacker would be able to use the two signatures that were both generated with the same value to calculate your private key.

Generally it would be safest to just use a new address for every transaction that you receive. Then you won't have to worry about this.  If you choose not to use a new address for every transaction that you receive, then make sure you are using well reviewed and well written open source software on an operating system that you can trust.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
December 21, 2015, 03:24:28 PM
 #5

shorena and knightdk have provided reasonably good answers.

Under normal circumstances with a properly operating wallet, a signature of one or more transactions will not provide enough information for an attacker to create valid signatures for other transactions that use inputs that were sent to the same address.

However, when generating a signature, it the signing software needs to generate a unique and unknown (to anyone else) number that will be used for that signature.  It is VERY important that that number not be re-used for any other signatures for the same address.

If the software that's generating your transactions re-uses the same number in more than one signature, then an attacker would be able to use the two signatures that were both generated with the same value to calculate your private key.

Generally it would be safest to just use a new address for every transaction that you receive. Then you won't have to worry about this.  If you choose not to use a new address for every transaction that you receive, then make sure you are using well reviewed and well written open source software on an operating system that you can trust.
Wasnt there an issue before with re-used K values?

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
December 21, 2015, 03:31:13 PM
 #6

Wasnt there an issue before with re-used K values?

Yes.  There have been a few poor implementations of wallets and a few faulty operating systems that have resulted in re-use of the unique and unknown value that I was talking out.

That value is typically called a "k" value, but I figured that the OP wouldn't be asking if he knew what a K value was.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!