Skip to main content
Became Hot Network Question
added 439 characters in body
Source Link

In Bitcoin you can have different UTXO with different public keys in a single transaction.

So suppose someone broadcasts a transaction with sending 10000 BTC. Theoretically I can copy this transaction, add my input with 0.1 BTC and change output to my address. Then sign a transaction and rebroadcast it.

Some miner will receive it, and get transaction with two inputs: from initial sender (10000 BTC unlocked by him) and mine (0.1 BTC unlocked with my public key); and 1 output to my address. The whole transaction is signed with my private key. Public key for verifying the signature is extracted from one of the inputs. So my public key from the second input can be used for this purpose and the transaction will be valid. The source of 10000 BTC is unlocked with owner's private key, so I'll just steal the money.

Suppose my transaction has bigger fee and propagates across the network faster then original.

Is this threat real or not? If not then why? If yes then why isn't it eliminated trough restricting transaction inputs so all of them have the same public key?

EDIT: What I mean is use a transaction with 2 inputs: one is used as an actual source of coins and is unlocked with a valid signature (because it is copied from the transaction of the one who owns the money) and another one is used as public key provider (it can be 0.00001 BTC, but must be unlocked with my public key so that is can be retrieved during whole transaction signature verifying and the whole transaction would be valid).

In Bitcoin you can have different UTXO with different public keys in a single transaction.

So suppose someone broadcasts a transaction with sending 10000 BTC. Theoretically I can copy this transaction, add my input with 0.1 BTC and change output to my address. Then sign a transaction and rebroadcast it.

Some miner will receive it, and get transaction with two inputs: from initial sender (10000 BTC unlocked by him) and mine (0.1 BTC unlocked with my public key); and 1 output to my address. The whole transaction is signed with my private key. Public key for verifying the signature is extracted from one of the inputs. So my public key from the second input can be used for this purpose and the transaction will be valid. The source of 10000 BTC is unlocked with owner's private key, so I'll just steal the money.

Suppose my transaction has bigger fee and propagates across the network faster then original.

Is this threat real or not? If not then why? If yes then why isn't it eliminated trough restricting transaction inputs so all of them have the same public key?

In Bitcoin you can have different UTXO with different public keys in a single transaction.

So suppose someone broadcasts a transaction with sending 10000 BTC. Theoretically I can copy this transaction, add my input with 0.1 BTC and change output to my address. Then sign a transaction and rebroadcast it.

Some miner will receive it, and get transaction with two inputs: from initial sender (10000 BTC unlocked by him) and mine (0.1 BTC unlocked with my public key); and 1 output to my address. The whole transaction is signed with my private key. Public key for verifying the signature is extracted from one of the inputs. So my public key from the second input can be used for this purpose and the transaction will be valid. The source of 10000 BTC is unlocked with owner's private key, so I'll just steal the money.

Suppose my transaction has bigger fee and propagates across the network faster then original.

Is this threat real or not? If not then why? If yes then why isn't it eliminated trough restricting transaction inputs so all of them have the same public key?

EDIT: What I mean is use a transaction with 2 inputs: one is used as an actual source of coins and is unlocked with a valid signature (because it is copied from the transaction of the one who owns the money) and another one is used as public key provider (it can be 0.00001 BTC, but must be unlocked with my public key so that is can be retrieved during whole transaction signature verifying and the whole transaction would be valid).

edited tags; edited tags
Link
Michael Folkson
  • 15.8k
  • 3
  • 21
  • 58
Source Link

Strange double-spending attack possibility

In Bitcoin you can have different UTXO with different public keys in a single transaction.

So suppose someone broadcasts a transaction with sending 10000 BTC. Theoretically I can copy this transaction, add my input with 0.1 BTC and change output to my address. Then sign a transaction and rebroadcast it.

Some miner will receive it, and get transaction with two inputs: from initial sender (10000 BTC unlocked by him) and mine (0.1 BTC unlocked with my public key); and 1 output to my address. The whole transaction is signed with my private key. Public key for verifying the signature is extracted from one of the inputs. So my public key from the second input can be used for this purpose and the transaction will be valid. The source of 10000 BTC is unlocked with owner's private key, so I'll just steal the money.

Suppose my transaction has bigger fee and propagates across the network faster then original.

Is this threat real or not? If not then why? If yes then why isn't it eliminated trough restricting transaction inputs so all of them have the same public key?