<p>In modern times, this problem is solved using P2SH (and later P2WSH). It means the sender only needs to know a hash of the actual script the receiver wants to use, which has its own address format so it's easy to convey.</p>
<p>If your question is how was this done before P2SH: the answer is simply that multisig was not used in practice. Note that P2SH was introduced in 2012; Bitcoin was relatively young at the time and not as much was built on top. There were probably a few experiments that used multisig, but I doubt anything practical.</p>

CC BY-SA 4.0
2020-07-08T22:21:24.020Z
2020-07-08T22:21:24.020Z
Pieter Wuille
<p>Any address that a spender will send to is provided by the receiver. As the owner of the address, the receiver knows these details and will be able to provide the correct sending instructions to the spender. This holds true even for the outdated original multisig construction that required the spender to know the pubkeys, but today most multisig transactions actually make use of pay-to-script-hash (p2sh), so the receiver would simply provide a standard p2sh address to the spender.</p>

CC BY-SA 4.0
2020-07-08T22:24:49.670Z
2020-07-08T22:24:49.670Z
Murch
<p>Assume that Alice is controlling an address that requires multisig to spend bitcoins. Someone wants to send Alice bitcoins and this sender needs to create a <code>scriptPubKey</code> as part of the output paying Alice.</p>
<p>The <code>scriptPubKey</code> in the sender's transaction should look like this:</p>
<pre><code>m pubKey_1, pubkey_2, ...pubKey_m n OP_CHECKMULTISIGVERIFY
</code></pre>
<p>How does the sender know the public keys to send funds to Alice? And further more, how does the sender know the value of <code>m</code>? Isn't it more logical that Alice determines what the minimal number of signatures is?</p>
<p>If I understood correctly this output format is not used anymore, but I still want to understand how it worked.</p>

<transactions><script><multi-signature>
How does the sender know the receiver's public keys in a m-of-n transaction?
ddavi031
# How does the sender know the receiver's public keys in a m-of-n transaction?

(Asked by: username_0 on 2020-07-08)

Assume that Alice is controlling an address that requires multisig to spend bitcoins. Someone wants to send Alice bitcoins and this sender needs to create a `scriptPubKey` as part of the output paying Alice.

The `scriptPubKey` in the sender's transaction should look like this:

```
m pubKey_1, pubkey_2, ...pubKey_m n OP_CHECKMULTISIGVERIFY

```

How does the sender know the public keys to send funds to Alice? And further more, how does the sender know the value of `m`? Isn't it more logical that Alice determines what the minimal number of signatures is?

If I understood correctly this output format is not used anymore, but I still want to understand how it worked.

**Tags:** transactions, script, multi-signature


---

## 2 answers

### Answer by username_2 on 2020-07-08. Score: 3 | Accepted answer

Any address that a spender will send to is provided by the receiver. As the owner of the address, the receiver knows these details and will be able to provide the correct sending instructions to the spender. This holds true even for the outdated original multisig construction that required the spender to know the pubkeys, but today most multisig transactions actually make use of pay-to-script-hash (p2sh), so the receiver would simply provide a standard p2sh address to the spender.


---

### Answer by username_1 on 2020-07-08. Score: 2

In modern times, this problem is solved using P2SH (and later P2WSH). It means the sender only needs to know a hash of the actual script the receiver wants to use, which has its own address format so it's easy to convey.

If your question is how was this done before P2SH: the answer is simply that multisig was not used in practice. Note that P2SH was introduced in 2012; Bitcoin was relatively young at the time and not as much was built on top. There were probably a few experiments that used multisig, but I doubt anything practical.


---

