Author

Topic: Help: Unserendipitous Multisig Transaction (Read 1260 times)

newbie
Activity: 5
Merit: 0
April 14, 2015, 07:01:53 PM
#8
I have discovered a vast explanation for the mysteries of the schematics for DER encoding. Thanks with your help, I am in full possession of the knowledge to make flawless multisig transactions occur. It is exciting!
newbie
Activity: 5
Merit: 0
Thank you for the quantity of time you have commited for my mind!
legendary
Activity: 1260
Merit: 1019
S number the first is also of beginning "00".  What reason is there for S value the first to stay unaltered?
I can not explain this  Grin Grin Grin Grin Grin Grin
Read standards yourself.

DER-encoded integers in bitcoin signatures
must be positive, so they can not start with 8,9,a...f
if you have such value - you must append zero byte in front

But
you must also check that there are no extra zero-bytes in front of positive integers


Example from your transaction:

0xbc0e789a6b8a42062ac62cfe81b3593d515f7d6407d50dcda82c095b83403d77
this is negative number
you must convert it to positive adding zero at front
So, der-encoding will be 0221 00bc0e789a6b8a42062ac62cfe81b3593d515f7d6407d50dcda82c095b83403d77

0x21efaa0b875a691eb9d279619443f74fc6b50b349e4e2f98a3ce8f2fbb8658d7
this is positive number
der-encoding is 0220 21efaa0b875a691eb9d279619443f74fc6b50b349e4e2f98a3ce8f2fbb8658d7

0x0003fa03e29a0ab057533f0a2f11c36695456199b8feb0f4c0ffbeea312b9d9d
this is positive number with a zero in the head
remove zero
0x03fa03e29a0ab057533f0a2f11c36695456199b8feb0f4c0ffbeea312b9d9d
this is the same number
der-encoding is 021F 03fa03e29a0ab057533f0a2f11c36695456199b8feb0f4c0ffbeea312b9d9d





newbie
Activity: 5
Merit: 0
S number the first is also of beginning "00".  What reason is there for S value the first to stay unaltered?
legendary
Activity: 1260
Merit: 1019
What to replace with blue zeros?  Number opposite has height beyond (N/2) correct?  How does number fix?
No. This is a number
0x03fa03e29a0ab057533f0a2f11c36695456199b8feb0f4c0ffbeea312b9d9d
You should not use any zeroes at the head of if, because it is positive number
There are only 31 bytes in this number, not 32
So, we encode S-prefix as 021F (1F stands for 32decimal)


Quote
Perhaps K number to be random and not to be RFC-6979 and make signature all over is solely the method of harmonous reconstruction.  Does your mind present alternatives?
K does not matter here
newbie
Activity: 5
Merit: 0
Thank you for help to investigate!

What to replace with blue zeros?  Number opposite has height beyond (N/2) correct?  How does number fix?

Perhaps K number to be random and not to be RFC-6979 and make signature all over is solely the method of harmonous reconstruction.  Does your mind present alternatives?


The addition of your green bottom numbers provides solution!  Thank you!
legendary
Activity: 1260
Merit: 1019
https://blockchain.info/tx/437fd815857b77a2adf1b5607576386fe4b8f962942dec04015cb910b0b63956

01000000
02
c80e4cab53d77932329f13991c8dcecac332ec96a4e48e77c874dfb7cf24833b
01000000

fdfd00
00
48
  30450221 00bc0e789a6b8a42062ac62cfe81b3593d515f7d6407d50dcda82c095b83403d77
      0220   00a601b727ef3141c344072b51b96a5a52064e079eb76ffd62044e80406799dd 01
47
  30440220   21efaa0b875a691eb9d279619443f74fc6b50b349e4e2f98a3ce8f2fbb8658d7
      0220   4d18d4ba03f4f29a8d10d66ba6ba2602e68aca6a6ea1d0aad0b7f92161068e6f 01
4c69
  52
    2102c1d7b4cd3d3eaa7f78273821f837a2d050b3982d684b8d7c530203cbb5fa7de6
    210349d8034876a8528fafb5424ea482cac1212b585e670127b889ad9c7ac993ed26
    2103b6f776158f58011ecea29fedf175f11410f6b08761cc72b0efe2250c5e4fe10a
  53ae
ffffffff

9d3bb1c83e30c5b2976832759008f0dd9f1679c51e896bcc44d563e0ed1a1771
00000000

fdfd00
00
47
  30440220   521baa167e46b7ee8a5a1194ba8ec9a27b26aa3df2b9e2f68a229770becddbbb
      0220   0003fa03e29a0ab057533f0a2f11c36695456199b8feb0f4c0ffbeea312b9d9d 01
48
  30450221 00dad1b9377e5a43fe7228b6148b11a1e6ef2eeae2c18a4655f8eeaeff949d3590
      0220   5bf15d581924eeefa7d963782906fded242d36b6d6330eec2baed37e9a105dba 01
4c69
  52
    2102c1d7b4cd3d3eaa7f78273821f837a2d050b3982d684b8d7c530203cbb5fa7de6
    210349d8034876a8528fafb5424ea482cac1212b585e670127b889ad9c7ac993ed26
    2103b6f776158f58011ecea29fedf175f11410f6b08761cc72b0efe2250c5e4fe10a
  53ae
ffffffff

03
6818070000000000
1976a9144fe1deb3351ae4832a11920a59bce71f862f5c8b88ac
a861000000000000
1976a914fa8cfcebce094a1ac169cff48c2f814a29151cbf88ac
400d030000000000
1976a91473a7d47fbaf28daba0799e5780b6035f99cfcb2c88ac
00000000

One signature marked blue has invalid der-encoding
1) instead of 02200003 should be 021F03
2) after changing it you should also change der length 44 to 43
3) also change push length 47 to 46
4) also change scriptSig length fdfd00 to fc
newbie
Activity: 5
Merit: 0
Please forgive for my English. I have manual transaction receive error:

64: non-mandatory-script-verify-flag (No error) (code -26)

Transaction:

Code:
0100000002c80e4cab53d77932329f13991c8dcecac332ec96a4e48e77c874dfb7cf24833b01000000fdfd0000483045022100bc0e789a6b8a42062ac62cfe81b3593d515f7d6407d50dcda82c095b83403d77022000a601b727ef3141c344072b51b96a5a52064e079eb76ffd62044e80406799dd01473044022021efaa0b875a691eb9d279619443f74fc6b50b349e4e2f98a3ce8f2fbb8658d702204d18d4ba03f4f29a8d10d66ba6ba2602e68aca6a6ea1d0aad0b7f92161068e6f014c69522102c1d7b4cd3d3eaa7f78273821f837a2d050b3982d684b8d7c530203cbb5fa7de6210349d8034876a8528fafb5424ea482cac1212b585e670127b889ad9c7ac993ed262103b6f776158f58011ecea29fedf175f11410f6b08761cc72b0efe2250c5e4fe10a53aeffffffff9d3bb1c83e30c5b2976832759008f0dd9f1679c51e896bcc44d563e0ed1a177100000000fdfd00004730440220521baa167e46b7ee8a5a1194ba8ec9a27b26aa3df2b9e2f68a229770becddbbb02200003fa03e29a0ab057533f0a2f11c36695456199b8feb0f4c0ffbeea312b9d9d01483045022100dad1b9377e5a43fe7228b6148b11a1e6ef2eeae2c18a4655f8eeaeff949d359002205bf15d581924eeefa7d963782906fded242d36b6d6330eec2baed37e9a105dba014c69522102c1d7b4cd3d3eaa7f78273821f837a2d050b3982d684b8d7c530203cbb5fa7de6210349d8034876a8528fafb5424ea482cac1212b585e670127b889ad9c7ac993ed262103b6f776158f58011ecea29fedf175f11410f6b08761cc72b0efe2250c5e4fe10a53aeffffffff0368180700000000001976a9144fe1deb3351ae4832a11920a59bce71f862f5c8b88aca8610000000000001976a914fa8cfcebce094a1ac169cff48c2f814a29151cbf88ac400d0300000000001976a91473a7d47fbaf28daba0799e5780b6035f99cfcb2c88ac00000000

K number enters being from RFC-6979, S number always the lesser than (N/2).  My mind inquires that problem exists from S number beginning "00".  Are the probability for my mind's explanation vastly probable?

How to alter signature to make happy propogate network?
Jump to: