0

So thinking here about an offline transaction. Both myself and the receiver sign it, and then at a later time that transaction is broadcast to the network in the block.

What is stopping me from taking your "signature" and signing another transaction with it in the future? How does this signature prevent itself from being forged by a malicious actor.

I'm assuming this has something to do with hashing / encryption or something alike. Somehow, I have to know that your signature is authentic without knowing the exact phrase or seed used to sign it, but a little confused on how that works.

Thanks!

2
  • why does receiver [of funds] need to sign your transaction?
    – amaclin
    Jan 13, 2018 at 10:04
  • Only debtor has to sign the transaction with private key. Creditors public key is used for transaction. Jan 13, 2018 at 10:32

2 Answers 2

1

In bitcoin(and most other altcoins) uses Asymmetric signature scheme where every user has a pair of (public key, private key) pair where the public key is known to everyone(including the attacker) but the private key is only known to the account holder. To this signature scheme, the catch is only the person having the private key will be able to sign a message on behalf of the public key, but everybody having the public key will be able to verify that the signature is correct.

What is stopping me from taking your "signature" and signing another transaction with it in the future? How does this signature prevent itself from being forged by a malicious actor?

A transaction say from Alice to Bob in bitcoin is of the form I Alice pay x amount of coin to B which I got from Carol in block number i. Alice signs this message with its private key and sends it to the blockchain. Observe that each signature is unique to the message signing it.

Since each signature is unique the if the attacker retransmits the same signature again the miners will get to know about it due to the invalidation of UTXO at the first trial and reject the transaction immediately.

1

What is stopping me from taking your "signature" and signing another transaction with it in the future?

you can do that, but it would be recognized as invalid by other nodes, and as such disregarded. Here is why:

The signature signs the hash of the transaction. Included in this transaction are amongst others the original tx number(of the previous transaction) and the spending conditions (aka the target were funds will go to). Now imagine you have another transaction. This would probably have another "previous tx number", and another output. So the hash of this structure would be different. Hence the signature doesn't match for any other transaction.

btw: it would be good if you answer @amaclin comment, so we know if you want to talk about multisig transactions ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.