Bitcoin Forum
November 14, 2024, 07:15:17 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Modifying outputs before forwarding?  (Read 781 times)
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3486
Merit: 4851



View Profile
December 07, 2012, 03:25:42 PM
 #1

I'm sure I'm missing something simple and obvious, but as I look through the protocol I'm not seeing what keeps me from creating a client that modifies the tx_out of all transactions that it receives before relaying them.

The tx_in is already signed in the transaction, so I don't need the private key.  All I need to do is change the address in the pk_script of tx_out to one that I have the primary key to before relaying it.

What am I missing here?
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1140


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
December 07, 2012, 03:40:05 PM
 #2

The signatures sign a hash of the whole transaction with blanks in place of the signatures (obviously, since the signatures aren't known before signing).

Changing a txout will change the hash and therefore require a different signature.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3486
Merit: 4851



View Profile
December 07, 2012, 03:42:48 PM
 #3

The signatures sign a hash of the whole transaction with blanks in place of the signatures (obviously, since the signatures aren't known before signing).

Changing a txout will change the hash and therefore require a different signature.
I knew it would be something simple and obvious, I just wasn't seeing it.  Thanks.
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!