<blockquote>
  <p>Then the interpreter checks to see that the next value on the stack is
  0, which it is not:</p>
</blockquote>

<p>I am not sure, but pushing <code>OP_FALSE</code> is not a requirement, but some kind a mumbo-jumbo to fix the bug in the very first (and still current) implementation of <code>OP_CHECKMULTISIG</code> :)</p>

<p>In fact, you can push 3 or even more signatures redeeming 2-of-3 multisignature output. Not all miners will accept this transaction, because it is non-standard. But it will be valid.</p>

CC BY-SA 3.0
2014-12-12T19:32:54.660Z
2015-03-13T00:15:05.107Z
2015-03-13T00:15:05.107Z
amaclin
<p>Let's say a coin has been locked with a 2-of-3 challenge script. In other words, spending the coin requires two signatures, each of which matches one of three designated public keys.</p>

<p>Now I try to spend the coin with a transaction containing, not two signatures, but three. All three signatures are valid and match a different designated public key.</p>

<p>The complete validation script will contain eight values:</p>

<pre><code>&lt;3&gt;
&lt;PK1&gt;
&lt;PK2&gt;
&lt;PK3&gt;
&lt;2&gt;
&lt;SIG1&gt;
&lt;SIG2&gt;
&lt;SIG3&gt;
&lt;0&gt;
</code></pre>

<p>AFAIK, the only way for the interpreter to know the number of signatures is the value &lt;2>, which was provided by the challenge script, not my response script. It seems that the only way for OP_CHECKMULTISIG to know how many signatures to pop is the value &lt;2>.</p>

<p>However, popping only two values leaves the stack like this:</p>

<pre><code>&lt;SIG3&gt;
&lt;0&gt;
</code></pre>

<p>Then the interpreter checks to see that the next value on the stack is 0, which it is not:</p>

<p><a href="https://github.com/bitcoin/bitcoin/blob/0.10/src/script/interpreter.cpp#L894" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/0.10/src/script/interpreter.cpp#L894</a></p>

<p>As I understand it, this scenario should lead to failure of the verification script.</p>

<p>Is this correct?</p>

<script><multi-signature>
Multisignature: what happens if the number of signatures exceeds the "threshold" number of public keys?
Rich Apodaca
# Multisignature: what happens if the number of signatures exceeds the "threshold" number of public keys?

(Asked by: username_0 on 2014-12-12)

Let's say a coin has been locked with a 2-of-3 challenge script. In other words, spending the coin requires two signatures, each of which matches one of three designated public keys.

Now I try to spend the coin with a transaction containing, not two signatures, but three. All three signatures are valid and match a different designated public key.

The complete validation script will contain eight values:

```
<3>
<PK1>
<PK2>
<PK3>
<2>
<SIG1>
<SIG2>
<SIG3>
<0>

```

AFAIK, the only way for the interpreter to know the number of signatures is the value <2>, which was provided by the challenge script, not my response script. It seems that the only way for OP\_CHECKMULTISIG to know how many signatures to pop is the value <2>.

However, popping only two values leaves the stack like this:

```
<SIG3>
<0>

```

Then the interpreter checks to see that the next value on the stack is 0, which it is not:

<https://github.com/bitcoin/bitcoin/blob/0.10/src/script/interpreter.cpp#L894>

As I understand it, this scenario should lead to failure of the verification script.

Is this correct?

**Tags:** script, multi-signature


---

## 1 answers

### Answer by username_1 on 2014-12-12. Score: 3

> Then the interpreter checks to see that the next value on the stack is
> 0, which it is not:

I am not sure, but pushing `OP_FALSE` is not a requirement, but some kind a mumbo-jumbo to fix the bug in the very first (and still current) implementation of `OP_CHECKMULTISIG` :)

In fact, you can push 3 or even more signatures redeeming 2-of-3 multisignature output. Not all miners will accept this transaction, because it is non-standard. But it will be valid.


---

