0

When signing transaction I think the following is done (in short):

For each input

  • all inputs and outputs are taken
  • the respective input scriptSig is filled with txPrev.pubScript, other inputs's scriptSigs are left blank?
  • this is signed and signature is put in scriptSig

Is there any benefit for bundling all inputs prior to making each signature? Could just respective input be used when signing for that input?

1
  • this is how segwit transactions work :) read more about quadratic hashing problem and segwit solution. you are on right way
    – amaclin
    Commented Nov 27, 2017 at 13:57

1 Answer 1

1

Answer provided by @Andrew Chow:

The benefit is that each signature commits to the inputs and outputs of the transaction so that they cannot be changed. If each input only commit to one input, then more inputs could be added and malleate the transaction. However, there is a sighash type that allows this: sighash ANYONECANPAY.

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.