<p>If you signed your Bitcoin transaction with only one key, you would see the same behavior.</p>

<p>What you are observing is how Electrum handles partially signed transactions. It does not produce the correct scripts until the transaction is fully signed. What you see as the public key in your transaction is just how Electrum internally represents public keys.</p>

CC BY-SA 4.0
2019-02-19T16:31:41.490Z
It is not, as redeem script is the same regardless, whether you signed transaction or not.  Electrum for bitcoin works as expected. Electrum for litecoin does not and I wonder wither this is bug or protocol difference
Max
CC BY-SA 4.0
2019-02-19T17:18:10.980Z
Then this is an issue with Electrum. Litecoin works pretty much in the same way Bitcoin does. The script and UTXO systems are identical. Also keep in mind that Electrum-ltc may not be up to date with Electrum. At some point in time, IIRC Electrum itself exhibited this behavior.
Ava Chow
CC BY-SA 4.0
2019-02-20T21:57:10.880Z
Can you recommend any GUI based Litecoin wallet that support multi signatures?
Max
CC BY-SA 4.0
2019-02-19T15:39:20.707Z
2019-02-19T15:39:20.707Z
Ava Chow
<p>I am building a service that is based on multisig wallets. My current progress is so that I've implemented the multisigs for Bitcoin network and it works fine. Now I am on Litecoin and I am facing some issues and would appreciate any help or guidance on that.</p>

<p>Disclaimer: This may be related to how Electrum-LTC works, I am not sure. I am happy to hear experts oppinion on that.</p>

<p>On Bitcoin network your multisig wallet is composed of 3 parts:</p>

<pre><code>ScriptSig
  Signatures
  0 &lt;Sig1&gt; &lt;Sig2&gt; ... &lt;SigM&gt;

  Redeem script
  M &lt;PubKey1&gt; &lt;PubKey2&gt; ... &lt;PubKeyN&gt; N OP_CHECKMULTISIG

ScriptPubKey
  OP_HASH160 &lt;Redeem script hash&gt; OP_EQUAL
</code></pre>

<p>And that works just fine with my implementation. I can generate 2-of-2 multisig with Electrum (btc) and sign it with both keys, both with my code and with Electrum wallets. Outcome transaction in both cases is correct and accepted by network.</p>

<p>Now, for Litecoin I am using Electrum-ltc and the process is exactly the same. I can successfully generate multisig address on Litecoin</p>

<pre><code>Suppose I Have following  Redeem script
  2 028c895128a8113bb5d599b4f463df685220ba726fc664013b3df56cb0bae74dc4 02c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf435 2 OP_CHECKMULTISIG
</code></pre>

<p>The address I see in Electrum-ltc matches the one I generated myself which tells me I am on the right way.</p>

<p>However, when I sing a transaction with wallet a redeem script in the transaction hex looks totally different and does not match my manually generated redeem script</p>

<pre><code>Manually generated redeem script
5221028c895128a8113bb5d599b4f463df685220ba726fc664013b3df56cb0bae74dc42102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf43552ae

broken apart
52 - OP_2
21028c895128a8113bb5d599b4f463df685220ba726fc664013b3df56cb0bae74dc4 - PubKey1
2102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf435 - PubKey2
52 - OP_2
ae - OP_CHECKMULTISIG
</code></pre>

<p>And here is a redeem script that I get from Electrum-ltc once I signed transaction with one key</p>

<pre><code>524c53ff0488b21e0000000000000000006a88a8afff7c30e2adc4ebee877e842b7868f11c6fafe5635fecd85337366bd802f8ecc3fc0be1c7b7d7bf4968df349845ede9dd6044beb0bcf25145612fa3b4e4000000002102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf43552ae

broken apart
52 - OP_2
4c53ff0488b21e0000000000000000006a88a8afff7c30e2adc4ebee877e842b7868f11c6fafe5635fecd85337366bd802f8ecc3fc0be1c7b7d7bf4968df349845ede9dd6044beb0bcf25145612fa3b4e4000000002102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf435
52 - OP_2
ae - OP_CHECKMULTISIG
</code></pre>

<p>So, what this thing the middle? And why it does not match my redeem script? Is this a bug with Electrum-ltc or I am missing something. Would appreciate any feedback.</p>

<bitcoin-core><litecoin><multi-signature>
What is the difference between P2SH redeem script on Bitcoin and on Litecoin?
Max
# What is the difference between P2SH redeem script on Bitcoin and on Litecoin?

(Asked by: username_0 on 2019-02-19)

I am building a service that is based on multisig wallets. My current progress is so that I've implemented the multisigs for Bitcoin network and it works fine. Now I am on Litecoin and I am facing some issues and would appreciate any help or guidance on that.

Disclaimer: This may be related to how Electrum-LTC works, I am not sure. I am happy to hear experts oppinion on that.

On Bitcoin network your multisig wallet is composed of 3 parts:

```
ScriptSig
  Signatures
  0 <Sig1> <Sig2> ... <SigM>

  Redeem script
  M <PubKey1> <PubKey2> ... <PubKeyN> N OP_CHECKMULTISIG

ScriptPubKey
  OP_HASH160 <Redeem script hash> OP_EQUAL

```

And that works just fine with my implementation. I can generate 2-of-2 multisig with Electrum (btc) and sign it with both keys, both with my code and with Electrum wallets. Outcome transaction in both cases is correct and accepted by network.

Now, for Litecoin I am using Electrum-ltc and the process is exactly the same. I can successfully generate multisig address on Litecoin

```
Suppose I Have following  Redeem script
  2 028c895128a8113bb5d599b4f463df685220ba726fc664013b3df56cb0bae74dc4 02c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf435 2 OP_CHECKMULTISIG

```

The address I see in Electrum-ltc matches the one I generated myself which tells me I am on the right way.

However, when I sing a transaction with wallet a redeem script in the transaction hex looks totally different and does not match my manually generated redeem script

```
Manually generated redeem script
5221028c895128a8113bb5d599b4f463df685220ba726fc664013b3df56cb0bae74dc42102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf43552ae

broken apart
52 - OP_2
21028c895128a8113bb5d599b4f463df685220ba726fc664013b3df56cb0bae74dc4 - PubKey1
2102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf435 - PubKey2
52 - OP_2
ae - OP_CHECKMULTISIG

```

And here is a redeem script that I get from Electrum-ltc once I signed transaction with one key

```
524c53ff0488b21e0000000000000000006a88a8afff7c30e2adc4ebee877e842b7868f11c6fafe5635fecd85337366bd802f8ecc3fc0be1c7b7d7bf4968df349845ede9dd6044beb0bcf25145612fa3b4e4000000002102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf43552ae

broken apart
52 - OP_2
4c53ff0488b21e0000000000000000006a88a8afff7c30e2adc4ebee877e842b7868f11c6fafe5635fecd85337366bd802f8ecc3fc0be1c7b7d7bf4968df349845ede9dd6044beb0bcf25145612fa3b4e4000000002102c09fdcf2cd2281ac5d35dedb8b19499db847fad469c151428d28c9cf1aabf435
52 - OP_2
ae - OP_CHECKMULTISIG

```

So, what this thing the middle? And why it does not match my redeem script? Is this a bug with Electrum-ltc or I am missing something. Would appreciate any feedback.

**Tags:** bitcoin-core, litecoin, multi-signature


---

## 1 answers

### Answer by username_1 on 2019-02-19. Score: 0

If you signed your Bitcoin transaction with only one key, you would see the same behavior.

What you are observing is how Electrum handles partially signed transactions. It does not produce the correct scripts until the transaction is fully signed. What you see as the public key in your transaction is just how Electrum internally represents public keys.

> **Comments:**
> **username_0**: It is not, as redeem script is the same regardless, whether you signed transaction or not.  Electrum for bitcoin works as expected. Electrum for litecoin does not and I wonder wither this is bug or protocol difference  
> **username_1**: Then this is an issue with Electrum. Litecoin works pretty much in the same way Bitcoin does. The script and UTXO systems are identical. Also keep in mind that Electrum-ltc may not be up to date with Electrum. At some point in time, IIRC Electrum itself exhibited this behavior.  
> **username_0**: Can you recommend any GUI based Litecoin wallet that support multi signatures?  

---

