Rsz
Retrieve ECDSA signature R,S,Z values from blockchain rawtx or txid.
Install / Use
/learn @iceland2k14/RszREADME
rsz
Retrieve ECDSA signature R,S,Z values from blockchain rawtx or txid.
Info
The script parse the data of rawtx to fetch all the inputs in the transaction and reconstructs the unsigned message for each of them to find the Z value. The result is given as R,S,Z,Pubkey for each of the inputs present in the rawtx data. [No Internet required]
If txid is given, instead of rawtx then blockchain API is used to fetch the details of rawtx and then R,S,Z calculation starts. [Internet required]
Requirements
The required library (3 files) can be obtained from the location https://github.com/iceland2k14/secp256k1
Math
Usage: Python 3
python getz_input.py
Run
usage: getz_input.py [-h] [-txid TXID] [-rawtx RAWTX]
This tool helps to get ECDSA Signature r,s,z values from Bitcoin rawtx or txid
optional arguments:
-h, --help show this help message and exit
-txid TXID txid of the transaction. Use Internet to fetch rawtx from
given txid
-rawtx RAWTX Raw Transaction on the blockchain. No internet required
Enjoy the program! :) Tips BTC: bc1q39meky2mn5qjq704zz0nnkl0v7kj4uz6r529at
(base) C:\anaconda3\RSZ>python getz_input.py -txid 82e5e1689ee396c8416b94c86aed9f4fe793a0fa2fa729df4a8312a287bc2d5e
Starting Program...
======================================================================
[Input Index #: 0]
R: 009bf436ce1f12979ff47b4671f16b06a71e74269005c19178384e9d267e50bbe9
S: 00c7eabd8cf796a78d8a7032f99105cdcb1ae75cd8b518ed4efe14247fb00c9622
Z: 9f4503ab6cae01b9fc124e40de9f3ec3cb7a794129aa3a5c2dfec3809f04c354
PubKey: 04e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6c
======================================================================
[Input Index #: 1]
R: 0094b12a2dd0f59b3b4b84e6db0eb4ba4460696a4f3abf5cc6e241bbdb08163b45
S: 07eaf632f320b5d9d58f1e8d186ccebabea93bad4a6a282a3c472393fe756bfb
Z: 94bbf25ba5b93ba78ee017eff80c986ee4e87804bee5770fae5b486f05608d95
PubKey: 04e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6c
(base) C:\anaconda3\RSZ>python getz_input.py -rawtx 01000000028370ef64eb83519fd14f9d74826059b4ce00eae33b5473629486076c5b3bf215000000008c4930460221009bf436ce1f12979ff47b4671f16b06a71e74269005c19178384e9d267e50bbe9022100c7eabd8cf796a78d8a7032f99105cdcb1ae75cd8b518ed4efe14247fb00c9622014104e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6cffffffffb0385cd9a933545628469aa1b7c151b85cc4a087760a300e855af079eacd25c5000000008b48304502210094b12a2dd0f59b3b4b84e6db0eb4ba4460696a4f3abf5cc6e241bbdb08163b45022007eaf632f320b5d9d58f1e8d186ccebabea93bad4a6a282a3c472393fe756bfb014104e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6cffffffff01404b4c00000000001976a91402d8103ac969fe0b92ba04ca8007e729684031b088ac00000000
Starting Program...
======================================================================
[Input Index #: 0]
R: 009bf436ce1f12979ff47b4671f16b06a71e74269005c19178384e9d267e50bbe9
S: 00c7eabd8cf796a78d8a7032f99105cdcb1ae75cd8b518ed4efe14247fb00c9622
Z: 9f4503ab6cae01b9fc124e40de9f3ec3cb7a794129aa3a5c2dfec3809f04c354
PubKey: 04e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6c
======================================================================
[Input Index #: 1]
R: 0094b12a2dd0f59b3b4b84e6db0eb4ba4460696a4f3abf5cc6e241bbdb08163b45
S: 07eaf632f320b5d9d58f1e8d186ccebabea93bad4a6a282a3c472393fe756bfb
Z: 94bbf25ba5b93ba78ee017eff80c986ee4e87804bee5770fae5b486f05608d95
PubKey: 04e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6c
(base) C:\anaconda3\RSZ>python rsz_solve.py
========================================================================
True Privatekey = 0x6a0d91cdd5cf761fe02de7b56bbe4ae1ed55b7a4faca12db65f02ee8e5b61602
========================================================================
k1: 0x3c977dbdb3deeefcffef9fda93cdfeacfb83a8a9a6439585bb37f052a16f314
r1: 0x2c0a015c8976d170edc918480ee981e75c513dfea11086ddc89baadfd9038a29
s1: 0xf06ac541347ff93f4269579d9ca71cf7ad32859b83596721798b370ec9100749
z1: 0x37c7de2760ab892174e6680d621e72eb60b4b7cde365164ee00fee7f3a3e83dd
Tx1 Correct: rsz Validated the Pubkey
========================================================================
k2: 0x85e0356d099499f90c926619fdde95b4f60c0a4644daf6f3b597d89dbb27f31c
r2: 0xc2e6e5acb70205a4f8a2639568e2bfd855111ecf334304193d70e967c1e3d7d8
s2: 0xfe7b7da891dfbb1d33a94b810d45caa7e8768b0e3b1bd750da76f08fcd00d814
z2: 0x2a3a32220a7376ce84cbbd96673a89d534f94b0d887fac8e532ec764aab9e86a
Tx2 Correct: rsz Validated the Pubkey
========================================================================
Starting to solve rsz using difference of k between 2 Tx
Extracted Privatekey = 0x6a0d91cdd5cf761fe02de7b56bbe4ae1ed55b7a4faca12db65f02ee8e5b61602
==== Nonce Found using 2 rsz diff = 0x3c977dbdb3deeefcffef9fda93cdfeacfb83a8a9a6439585bb37f052a16f314
(base) C:\anaconda3\RSZ>python LLL_nonce_leakage.py
Fixed Nonce bits = 56 Minimum Signature Required = 8
###############################################################################
secret: f13a1e3ceb21a8537c5b0c6a68ba01fc256edbd874c48275e0e43bb17b8df505
Pubkey: 043eb4b61f32e3365ebb679990f15c9049f2c452b3c72ec5c3e8e4359c2dccb886f8eaaa94d9e37140d9784020d0de9b4c8a4d7f16b8813703aff6f35c8be3c0f3
###############################################################################
Original Matrix
[[115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0, 0, 0, 0, 0, 0, 0], [0, 115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0, 0, 0, 0, 0, 0], [0, 0, 115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0, 0, 0, 0, 0], [0, 0, 0, 115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0, 0, 0, 0], [0, 0, 0, 0, 115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0, 0, 0], [0, 0, 0, 0, 0, 115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0, 0], [0, 0, 0, 0, 0, 0, 115792089237316195423570985008687907852837564279074904382605163141518161494337, 0, 0], [2988567097096369072114256704492752094134370478079672678724583563784523759380194381101303007421348038236013182197166091841310496678504274536669021895976687, -6738142932705740457105677849364580346544371553506799055378865962606747928093276755130757431460273806911522952651290394284163090327037989241628588755641563, -4609254798108186796170670673211114832918863612866138122054703317440751592943691412538893967917280774176482822495579075978206122967125902798957244551197095, -4241018251166027250833859007695934733691821946409054337471303047554210658455462398597308443919577256694427852291869818071497434990022568279646523419972974, -3786532040371568123260653635376072873735808584513069558430341354041374072323853425713333359031171721704455202520148845248110455200710766560032938878291436, -1455140373318134753656398793208140405472020050459686656109449769771489208866781231797782913592880545869819687376301918352653011562080323940635317208444392, -4531215516145026319614661110389205527691723869606480801406600020033638258342487080403483208628657933375998193530783342366298428990681271342765206141765890, 1.3877787807814457e-17, 0], [-3640897815219273726171209317919836168123870485952174405025247556887841773680519710925144846918890366983311099492360262678907710529974609367712450770232532, -2297328352498726261502892431990017228169119063790068441607856150715311591699626613603902401787786285587075499186045363199489859617591793008665855383016252, -954965833481163842583176851975881485172685582439393133772147837653200782253861390815646522387162631100976408183149777942842142453670313611884197350568958, -2673403826021012432158013606849776453129157388761886651386316233860577260189931431343792659010346167776362261841946472117774484438917640474689303485763098, -1657543466262215935719403308193088630371918573859132142053143226330371430854549309565433337909468889463607488811009398826177343366007786144219522532417902, 1998395227990224857517731021436691048749744756792397727553558892310572739051578625185843809195440634123692570493347436858750712895821615045659992558344464, 457104288102981440020849854044141614291770019109689785077187721851181461921741961531220677053564384775687984813817030125552994012190695367500652879856115, 0, 1606938044258990275541962092341162602522202993782792835301376]]
Reduced Matrix
[[0, 0, 0, 0, 0, 0, 0, 1606938044258990275541962092341162602516201955414261509405631, 0], [-1216674236050858179778423307933806313861976262663692177459505, -961319248046196147935690067612344523652647960777891808172466, -939218274296704509334085803490832671730917030741052720700551, -689284247273089543013034679061282951432484510730477009401773, -1205585714487743872094134206478015239912732375554422876465541, -47328867541166285983202769828718987202468065927547743537509, -1062793502486645769413900352391018429582619366049041166256918, -92731473947427358386673554123082880122698072324206367720926, 1606938044258990275541962092341162602522202993782792835301376], [162385477386577120585255320203282660417928558451013086108488700271, 47131978009850197658079125034631639172826410207172291580304122
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
