<p>Yes, you can use a redeemScript that has a lot of OP_CHECKSIGs and boolean operations. You would have to enumerate all possible combinations of signatures however.</p>

<p>As a simple example, if you used a 2-of-2 multisig, traditionally your redeemScript would be</p>

<pre><code>OP_2 &lt;pubkey1&gt; &lt;pubkey2&gt; OP_2 OP_CHECKMULTISIG
</code></pre>

<p>and the scriptSig is then</p>

<pre><code>OP_0 &lt;sig1&gt; &lt;sig2&gt; &lt;redeemScript&gt;
</code></pre>

<p>Without OP_CHECKMULTISIG, your redeemScript would be</p>

<pre><code>&lt;pubkey1&gt; OP_CHECKSIG OP_SWAP &lt;pubkey2&gt; OP_CHECKSIG OP_BOOLAND
</code></pre>

<p>and the scriptSig would be</p>

<pre><code>&lt;sig2&gt; &lt;sig1&gt; &lt;redeemScript&gt;
</code></pre>

<p>For more complex multisigs with more keys and m-of-n, the scripts will be much more complicated with more OP_SWAPs, OP_BOOLORs, and OP_BOOLANDs.</p>

CC BY-SA 4.0
2018-05-11T22:12:38.743Z
There was also this very old tx with a more complicated script, which you and me have replied to: https://bitcoin.stackexchange.com/questions/71326/what-does-this-transaction-script-mean/71407#71407
pebwindkraft
CC BY-SA 4.0
2018-05-09T21:21:04.163Z
2018-05-09T21:21:04.163Z
Ava Chow
<p>I've learned that OP_CHECKMULTISIG is a Bitcoin builtin opcode to validate Multisig transactions. Can I write Bitcoin script to validate the Multisig transactions without invoking OP_CHECKMULTISIG? If so, what do I need to change in the redeemScript?</p>

<multi-signature>
How to implement Multisig transaction without using OP_CHECKMULTISIG
Ju Chen
# How to implement Multisig transaction without using OP_CHECKMULTISIG

(Asked by: username_0 on 2018-05-09)

I've learned that OP\_CHECKMULTISIG is a Bitcoin builtin opcode to validate Multisig transactions. Can I write Bitcoin script to validate the Multisig transactions without invoking OP\_CHECKMULTISIG? If so, what do I need to change in the redeemScript?

**Tags:** multi-signature


---

## 1 answers

### Answer by username_1 on 2018-05-09. Score: 3

Yes, you can use a redeemScript that has a lot of OP\_CHECKSIGs and boolean operations. You would have to enumerate all possible combinations of signatures however.

As a simple example, if you used a 2-of-2 multisig, traditionally your redeemScript would be

```
OP_2 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIG

```

and the scriptSig is then

```
OP_0 <sig1> <sig2> <redeemScript>

```

Without OP\_CHECKMULTISIG, your redeemScript would be

```
<pubkey1> OP_CHECKSIG OP_SWAP <pubkey2> OP_CHECKSIG OP_BOOLAND

```

and the scriptSig would be

```
<sig2> <sig1> <redeemScript>

```

For more complex multisigs with more keys and m-of-n, the scripts will be much more complicated with more OP\_SWAPs, OP\_BOOLORs, and OP\_BOOLANDs.

> **Comments:**
> **username_2**: There was also this very old tx with a more complicated script, which you and me have replied to: https://bitcoin.stackexchange.com/questions/71326/what-does-this-transaction-script-mean/71407#71407  

---

