I have been studying Bitcoin transaction signatures and noticed some interesting patterns when analyzing transactions involving the same address in different contexts. Here are my observations.
Case 1: Same address, two different transactions (T1 and T2)
As expected, for two separate transactions originating from the same address, I observed the following witness data:
30450221008dbd2c3c33413a58d0217897daa9cfe75a7aaad3d80d915ed74dbfbc7dc70d43022034a8328a99065ff8f47acb9da4ce213ee6bf90448580cfd5129e36f39a985c3801 023b6bdc0869a329e9d0cb036257eff362aeab11512668090746bf31647a42039e
3045022100cc584f8b3c0a23d5531d1e46b15e10be7138409c46c04a16716af89ea8a653ec02202a1e364f7c2b0f4f6e995bf73b65a4ed86e5166f9c7544a397a6c38b8db4a43301 023b6bdc0869a329e9d0cb036257eff362aeab11512668090746bf31647a42039e
Here, I assume/guess that:
- The first hexadecimal string in the witness is the signature, and
- The second hexadecimal string is the public key.
As expected:
- The signatures are different because each signature is tied to the specific transaction.
- The public key is the same since it corresponds to the address.
This makes sense because the signature generation process incorporates the transaction data (or its hash)…. but:
Case 2: A transaction (T3) with two inputs from the same address
When I analyzed a single transaction with two inputs, both originating from the same address, I observed the following witness data:
30450221008dbd2c3c33413a58d0217897daa9cfe75a7aaad3d80d915ed74dbfbc7dc70d43022034a8328a99065ff8f47acb9da4ce213ee6bf90448580cfd5129e36f39a985c3801
023b6bdc0869a329e9d0cb036257eff362aeab11512668090746bf31647a42039e
3045022100cc584f8b3c0a23d5531d1e46b15e10be7138409c46c04a16716af89ea8a653ec02202a1e364f7c2b0f4f6e995bf73b65a4ed86e5166f9c7544a397a6c38b8db4a43301
023b6bdc0869a329e9d0cb036257eff362aeab11512668090746bf31647a42039e
In this case:
- The signatures are different, even though both inputs are from the same address.
- The public key is identical for both inputs, as expected.
This suggests that the signature is not for the entire transaction but rather for each input individually. It seems that each input signs a specific “message”.
Questions:
- Why are the signatures different for each input within the same transaction?
- Does this mean that a signature is not generated for the entire transaction but rather for each input independently?
- What exactly is being signed in each input, and what role does UTXO play in this process? Does the signature have a reference in some way a SPECIFIC UTXO?
- Why is the Witness data only represented by hex binary? I couldn’t find any converter to “human” Script instructions. Is there any?
- So basically, is it correct to say that, for the same address, the locking script will be the same, while the unlocking script (witness) will be different because it depend on the SPECIFIC SINGLE INPUT of a transaction?
Any clarification on this behavior and the underlying mechanisms would be greatly appreciated. Thank you!













