<p>First, it should be said it's not possible to enforce which sighash flags may be used in a P2SH address. Signing is a concern for only the parties to wish to spend funds. Their intent can be captured using SIGHASH flags when signing. </p>

<p>OP is right, and certainly can mix SIGHASH flags in an input script. Signatures in the same script are considered separately, meaning each specifies its own SIGHASH flags. This informs validating nodes how to verify the signature, and mixing them </p>

CC BY-SA 3.0
2016-05-12T15:53:59.277Z
2016-05-12T15:53:59.277Z
karimkorun
<p>I <a href="https://bitcoin.stackexchange.com/questions/4213/what-is-the-point-of-sighash-none">know</a> that using SIGHASH_NONE in signatures is safe for a transaction only if at least one of the inputs is signed with SIGHASH_ALL, so that a miner can't change the outputs and reclaim the inputs.
This kind of transaction is useful when the parties signing their inputs want to leave the capability to decide the outputs to a trusted coordinator.</p>

<p>Let's now suppose that we have a transaction consisting of inputs using P2SH address implementing a 2of2 multisig signature scheme.
Since two signatures are required for each input, what does it happen if one of the signatures is made with SIGHASH_NONE and the second one with SIGHASH_ALL?</p>

<p>My understanding is that the party signing with SIGHASH_NONE leaves the capability to the cosigner to choose the outputs at will and the resulting transaction will be safe (from malicious miners) since all inputs are signed also with one SIGHASH_ALL signature.</p>

<p>Is that correct?</p>

CC BY-SA 3.0
2015-11-12T23:02:32.060Z
I think that is correct, but doesn't that defeat the point of using 2of2 multisig?
Nick ODell
CC BY-SA 3.0
2015-11-13T06:52:02.427Z
Of course, but it's a special application I'm thinking about.
Alessandro Polverini
<p2sh><sighash-flags>
Using SIGHASH_NONE in P2SH address
Alessandro Polverini
# Using SIGHASH_NONE in P2SH address

(Asked by: username_0 on 2015-11-12)

I [know](https://bitcoin.stackexchange.com/questions/4213/what-is-the-point-of-sighash-none) that using SIGHASH\_NONE in signatures is safe for a transaction only if at least one of the inputs is signed with SIGHASH\_ALL, so that a miner can't change the outputs and reclaim the inputs.
This kind of transaction is useful when the parties signing their inputs want to leave the capability to decide the outputs to a trusted coordinator.

Let's now suppose that we have a transaction consisting of inputs using P2SH address implementing a 2of2 multisig signature scheme.
Since two signatures are required for each input, what does it happen if one of the signatures is made with SIGHASH\_NONE and the second one with SIGHASH\_ALL?

My understanding is that the party signing with SIGHASH\_NONE leaves the capability to the cosigner to choose the outputs at will and the resulting transaction will be safe (from malicious miners) since all inputs are signed also with one SIGHASH\_ALL signature.

Is that correct?

**Tags:** p2sh, sighash-flags

> **Comments:**
> **username_1**: I think that is correct, but doesn't that defeat the point of using 2of2 multisig?  
> **username_0**: Of course, but it's a special application I'm thinking about.  

---

## 1 answers

### Answer by username_2 on 2016-05-12. Score: 1

First, it should be said it's not possible to enforce which sighash flags may be used in a P2SH address. Signing is a concern for only the parties to wish to spend funds. Their intent can be captured using SIGHASH flags when signing.

OP is right, and certainly can mix SIGHASH flags in an input script. Signatures in the same script are considered separately, meaning each specifies its own SIGHASH flags. This informs validating nodes how to verify the signature, and mixing them


---

