<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged signing</title>
<link>https://www.multichain.com/qa/tag/signing</link>
<description>Powered by Question2Answer</description>
<item>
<title>signing message gets different result from bitcoin core</title>
<link>https://www.multichain.com/qa/16539/signing-message-gets-different-result-from-bitcoin-core</link>
<description>&lt;p&gt;Dear multichain,&lt;/p&gt;&lt;p&gt;I need to understand better the sign message algorithm.&lt;br&gt;I have the following scenario in a bitcoin-compatible Multichain setting:&lt;/p&gt;&lt;p&gt;address: 1PYdSSwsXgJe1MGMzkeXCdshxjMfDP64wi&lt;br&gt;pvkey: L4PW5JZVpLkNmCKNUSjji3Fpd29s3ci8onwyhvGody4e633Th6vT&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new,courier,monospace&quot;&gt;signmessage &quot;1PYdSSwsXgJe1MGMzkeXCdshxjMfDP64wi&quot; &quot;message_to_sign&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;signature: IC8PmdB4gwxfszrCS0JWPgq/sKt9F+FXtfnZl0eMExNULfcF7rXX7LnGczQ3VaK5pBJQsbn/MGSH/GII+/99zUQ=&lt;/p&gt;&lt;p&gt;I can check the result&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new,courier,monospace&quot;&gt;verifymessage &quot;1PYdSSwsXgJe1MGMzkeXCdshxjMfDP64wi&quot; &quot;IC8PmdB4gwxfszrCS0JWPgq/sKt9F+FXtfnZl0eMExNULfcF7rXX7LnGczQ3VaK5pBJQsbn/MGSH/GII+/99zUQ=&quot; &quot;message_to_sign&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;true&lt;/p&gt;&lt;p&gt;Everything works fine but using bitcoin core I get a different result (I used this online tool &lt;a href=&quot;https://reinproject.org/bitcoin-signature-tool/#sign&quot; rel=&quot;nofollow&quot;&gt;https://reinproject.org/bitcoin-signature-tool/#sign&lt;/a&gt;) :&lt;/p&gt;&lt;p&gt;-----BEGIN BITCOIN SIGNED MESSAGE-----&lt;br&gt;message_to_sign&lt;br&gt;-----BEGIN SIGNATURE-----&lt;br&gt;1PYdSSwsXgJe1MGMzkeXCdshxjMfDP64wi&lt;br&gt;IDvDfON3ikxMOXOoOuOl50ZZ517CWqBDcniGMqBH187CVwS3fxXj8WzK13n1QDbov33vyBhs5To8TqdjqWsjxVs=&lt;br&gt;-----END BITCOIN SIGNED MESSAGE-----&lt;/p&gt;&lt;p&gt;Could you help me understanding this point?&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/16539/signing-message-gets-different-result-from-bitcoin-core</guid>
<pubDate>Wed, 06 Nov 2019 23:04:45 +0000</pubDate>
</item>
<item>
<title>I have a basic send transaction I need to sign</title>
<link>https://www.multichain.com/qa/15159/i-have-a-basic-send-transaction-i-need-to-sign</link>
<description>When using send to move an asset between addresses, is it possible to sign the successful transaction? If so, is there an example? Which parameters do I need?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/15159/i-have-a-basic-send-transaction-i-need-to-sign</guid>
<pubDate>Tue, 20 Aug 2019 19:21:29 +0000</pubDate>
</item>
<item>
<title>Block-signing key off-node</title>
<link>https://www.multichain.com/qa/10966/block-signing-key-off-node</link>
<description>A high level of security is essential for private keys. Fortunately, it is possible to sign transactions with keys that are stored on a HSM. However, is the same also possible for signing blocks, as part of the multichain 'mining' process?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/10966/block-signing-key-off-node</guid>
<pubDate>Fri, 07 Sep 2018 13:30:26 +0000</pubDate>
</item>
<item>
<title>Manually signing a transaction with multiple inputs</title>
<link>https://www.multichain.com/qa/10849/manually-signing-a-transaction-with-multiple-inputs</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;After referencing the discussion thread from &lt;a href=&quot;https://www.multichain.com/qa/1923/manually-sign-a-raw-transaction,&quot; rel=&quot;nofollow&quot;&gt;https://www.multichain.com/qa/1923/manually-sign-a-raw-transaction,&lt;/a&gt; I've been using daanporon's method for signing multichain transactions using javascript, as provided here: &lt;a href=&quot;https://gist.github.com/daanporon/28087f042fb83507f5dc9389119a0508&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/daanporon/28087f042fb83507f5dc9389119a0508&lt;/a&gt;&lt;/p&gt;&lt;p&gt;However, his method only works for transactions that have a single input, as he is only signing transaction.vin[0]. So I encountered a problem when trying to sign a transaction with 2 inputs.&lt;/p&gt;&lt;p&gt;I tried to modify his implementation to sign all the inputs. I assumed it's similar to bitcoin, so I used the answer from this thread as reference: &lt;a href=&quot;https://bitcoin.stackexchange.com/questions/41209/how-to-sign-a-transaction-with-multiple-inputs&quot; rel=&quot;nofollow&quot;&gt;https://bitcoin.stackexchange.com/questions/41209/how-to-sign-a-transaction-with-multiple-inputs&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Basically, my algorithm is:&lt;/p&gt;&lt;p&gt;For each vin&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Remove the scriptSig from all other vins&lt;/li&gt;&lt;li&gt;Set this vin.scriptSig = OP_DUP+OP_HASH160+pubkeyhash+OP_EQUAL_VERIFY+OP_CHECKSIG (to mimic the output of the prevtx; this is what daan's code already does)&lt;/li&gt;&lt;li&gt;Generate the hash from this new version of the transaction&lt;/li&gt;&lt;li&gt;Sign the hash and store the signature in a separate array (so that it doesnt get lost when the next vin is processed)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;After all vins are processed, I copy the generated signatures from the separate array in the last step to their respective vins.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;However, when I try this approach with my transaction which has two inputs, the transaction is still invalid (raises ConnectInputs error when sending it). I compared it to the equivalent output of signrawtransaction using the multichain API, and found that the scriptSig of vin #0 is wrong, but the scriptSig of vin#1 is correct. Both vins reference prevtx that are sent to the same address and I'm signing them using the same private key.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Given that I'm getting one of the signatures right, I'm assuming I'm kind of on the right track, but maybe I'm just missing a step or two somewhere?&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Would anyone be able to advice if the approach I'm using is incorrect, or how else I can update it? (Actually, I'm hoping daanporon would be able to comment as well if he sees this - or anyone who can help)&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/10849/manually-signing-a-transaction-with-multiple-inputs</guid>
<pubDate>Fri, 31 Aug 2018 04:59:51 +0000</pubDate>
</item>
<item>
<title>Windows executable signing</title>
<link>https://www.multichain.com/qa/6856/windows-executable-signing</link>
<description>Would it be possible for the next release to request that all windows executables are signed? &lt;br /&gt;
&lt;br /&gt;
I required them to be signed else i cannot run them from within another console application. I have an application that monitors applications and restarts them in case the server crashes or a particular application crashes for an unknown reason. &lt;br /&gt;
&lt;br /&gt;
I cannot restart/start multichaind in this instance, i have to do it manually at the moment , i am getting untrusted publisher messages when i try to automate this process.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/6856/windows-executable-signing</guid>
<pubDate>Tue, 26 Sep 2017 08:34:08 +0000</pubDate>
</item>
<item>
<title>Example of external signing of a transaction</title>
<link>https://www.multichain.com/qa/2831/example-of-external-signing-of-a-transaction</link>
<description>Hi Multichain Team,&lt;br /&gt;
&lt;br /&gt;
Do we have an example which shows external signing of a transaction before passing to sendrawtransaction api?&lt;br /&gt;
&lt;br /&gt;
I have a B2C scenario where I am thinking of having multiple addresses at one node for different customers but in watch only mode. And keeping the the private key of the customer on the app side which will externally sign the transaction and pass it to node.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/2831/example-of-external-signing-of-a-transaction</guid>
<pubDate>Mon, 03 Oct 2016 10:23:27 +0000</pubDate>
</item>
</channel>
</rss>