tintinweb / ecdsa-private-key-recovery

A simple library to recover the private key of ECDSA and DSA signatures sharing the same nonce k and therefore having identical signature parameter r

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are these import errors (SubstrateUnderrunError) expected ?

sky305 opened this issue · comments

just a few errors I am pasting, but I have a lot.

a5f2a2ac57ddfcac7676206295d0beccd9465cb9f3ecd54fcc5dbf60f7d39378 SubstrateUnderrunError('6474783460033649989034322563450230481921537397102288762140255867845827293516803597815007821184117773513250-octet short',)
8b230b2382b1a3a9ff1a65ec9d229a1036f2b42ef0e9f7a8c6e51db5e09abf70 SubstrateUnderrunError('99-octet short',)
5eeb36071d8939304ab7d7f4f012762e21712cf3c91d89c51a12e55bdbbd9a91 SubstrateUnderrunError('6808720870271415304186620630572-octet short',)
2a1777694d456ca9b0f56653a2ee2757b534fa8243eed9e002a02d5f659edb9c SubstrateUnderrunError('112<29 at <TagSet object at 0x7f5a5f32c9d0 tags 0:32:16>',)
e0b2e83b770993215c3174ade14c0f1306336a304dcd37c8720e90d0a755ff10 SubstrateUnderrunError('108<43 at <TagSet object at 0x7f5a5f32c9d0 tags 0:32:16>',)
1368d598475023560de6e10b007cfc418edf38e0334723a4f5102a9f849892cb SubstrateUnderrunError('34-octet short',)
e4cb5f6be0a61330eff5cbc80f1a8bdf49c5fa859e9ab0e755cc111da439b822 SubstrateUnderrunError('99-octet short',)
05e7da0ab92b04f2c7c59ba1d419bade5b1b931a6d74ec108eeae4f9edceb937 SubstrateUnderrunError('31-octet short',)
f103c31716e24559c01d43f48352b2a80781b5a953271e577329ce802627a5d1 SubstrateUnderrunError('24-octet short',)
1f688c8937d0c4ffd0dfbee905970e7ec806f8b456bebac0a731a4faf22c2f2a SubstrateUnderrunError('60-octet short',)
085e7ec68093e006fe4517ff108a3e721deaedb9bacab5faa412ad220aa651fc SubstrateUnderrunError('42-octet short',)
47d151dc4297c89afc111518a01c6e9db9617c8e7353e1550168d270af9cd96c SubstrateUnderrunError('34-octet short',)
0dd12fcd6c3b4f711677ea16d794abbddd519134d09212d2ede6f44a3efa6c42 SubstrateUnderrunError('50<34 at <TagSet object at 0x7f5a5f32c9d0 tags 0:32:16>',)

Hi @sky305,

The ecdsa signature parsing from script-sig is a bit hacky I must confess :) For example see this method that attempts to find an asn.1 sequence start \x30 and assumes that what follows is an asn.1 encoded ecdsa sigparam. This may not always be true as the scriptsig can be arbitrary. In order to minimize these decoding errors one would have to implement proper scriptsig parsing which was not in scope for this PoC.
Feel free to contribute your code if you have a more reliable solution (afaik some pybitcoin libraries provide proper scriptsig parsing)

cheers
tin

Same here 👎

253698f42c236f891ae95f7a26245f9fd1143140ed0714911200c7399790f4b5 SubstrateUnderrunError('2-octet short',)
2b43268b31d3559732f133147e587ff10f2da33ffa91384a7ab645a0e5dc6055 SubstrateUnderrunError('Short octet stream on length decoding',)
ab5d7a0e8c42940685a6870e4a557408bb0038aab653f9174e85174adcac1922 SubstrateUnderrunError('Short octet stream on length decoding',)
95a44218c315eaa18ea98815b741de49d225c29e7710eb051ec9d699c540da2e SubstrateUnderrunError('Short octet stream on length decoding',)
24dda88171d8fc5b9a176dfe63727ddf937fbe165e89d08918ceefad528ce7e2 SubstrateUnderrunError('6-octet short',)

Nothing is imported in the database.

@johnlockejrr,

it should definitely import signatures into the database. do you get the substrateunderrune for every transaction?

TinTin, can you send me a email, i would like to talk to you about this bugginess LoL...
Granted i do have all the applicable info already but there is a oddity i want to show you and get your input on. No need to pull the database parse and all of that. i just would like to discuss off record :)
So if you got 10 mins send me a email and can IRS XXMP whatever works.
mikejnpc@protonmail.com Thx!!

@mikejnpc feel free to discuss in here or open a new issue :)

cheers,
tin