Retrieve ECDSA signature R,S,Z values from blockchain rawtx or txid.

Overview

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]

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

Comments
  • RSZ different value?

    RSZ different value?

    Starting Program...

    [Input Index #: 0] R: 6d88d6de1c154910d768c5bb857ae79cafe73d8fac3c9b05feaf3674a8a32089 S: 4f992a212410b69371fa4271095418f9b1621d5cb01a723db3a166f505f12d17 Z: 5da587be81bfeedfbf17ad8a4927a1b698601a78d53ffbf9ea7402f4f4ab8a2b PubKey: 035f41af49a08af0b4051951e80fa80e61825b933dffc092e2f5fb486c5ae93321

    [Input Index #: 1] R: 00adb8b26048cc4e3c2ed85b3203af413cdbfa1cabefb9499b5c1ab5964857e9eb S: 2c20e458daf8078141dcd1acd13f5ae0307182214208c1cbaadf7d4b056b12e6 Z: 45aab64359449ead09fb3bb158642a621923c465b5d54920b3c43c534b2ac6e1 PubKey: 03c1f06c71bc2888e47f4eb35a3ef3cf0e434947911a1ed1b81f2a7ad1e4d90b9c

    opened by Taimor-artist 1
  • When I run the script it cant find RSZ values for me?

    When I run the script it cant find RSZ values for me?

    \Downloads\rsz-main\rsz-main>python getz_input.py -txid 454c90738880a6635446805303c89871f0bb7b362d1ff9ff4e8646ff4e24ef49

    Starting Program... Unsupported Tx Input. Presence of Witness Data

    opened by Taimor-artist 0
  • what is the solve and where did i go wrong please

    what is the solve and where did i go wrong please

    C:\Users\Murphy\Desktop\rsz-main>python getz_input.py -txid 82e5e1689ee396c8416b94c86aed9f4fe793a0fa2fa729df4a8312a287bc2d5e Traceback (most recent call last): File "C:\Users\Murphy\Desktop\rsz-main\getz_input.py", line 14, in parser.add_argument("", help = "txid of the transaction. Automatically fetch rawtx from given txid", action="store") File "C:\Users\MurphyE\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 1401, in add_argument if not args or len(args) == 1 and args[0][0] not in chars: IndexError: string index out of range

    opened by Murphyfmg 4
  • Retrieve ECDSA signature return wrong m hash

    Retrieve ECDSA signature return wrong m hash

    Something is wrong with Retrieve ECDSA signature R,S,Z from rawtx or txid online. I tried on txid: ce9fa9cb962ae5a30fa4da5a8aae0c4b76b6268014015b4b38adb84d5d69624f

    
    # TX1
    tx_z = 'f2f21f36996c14c70c669ab1ccba10ab79c148748fb25ac58c2b8a4b748764ff'
    tx_r = '763052a7c77f2689cadb58b339a7ea23152bfcc39028094fb078bd24928a2226'
    tx_s = 'e2a1158fff5b1b5f49ef3e1df6984ae2ce8eccdf2f87137b8e066e5d967c766'
    pub  = '0213841028dbe9616021858b8e1e3f32d58102aa8ba1ae5a520caeab71d19a5e43'
    # TX1 VALID
    
    # TX2
    tx_z = 'ff04fb7a469a4a8d6858c63188e99413ba87e3bb9a26257130a957a6a7dfd15c'
    tx_r = 'fde7125dc4a73be2c1a22512c176d393eb0568a9909453ce84617e5c98019fdd'
    tx_s = '1bfcfabec9106935256e4dca057296d64521fc90dfe74aed0d35cc13a9686a68'
    pub  = '03227c98f8cc660a00fa26ff434757617a4fa6a0078a94d0e3e6d974e81d0f18fe'
    # TX2 NOT VALID (WRONG Z)
    
    

    first signature have correct Z, but second Z is wrong. Signature is not valid.

    Another example of txid: d49e18570f6059aa8c781c67acfbf9e9e4266e63b65e9f4016681d7c2e5fdfd9 On both signature return wrong hash ...

    opened by ronix73 2
  • What can I go with R,S,Z of a raw txid

    What can I go with R,S,Z of a raw txid

    I have come across a lot of people attempting to get a r,z of a BTC txid. I guess I'm new to this aspect that's why I'm asking for help. If anyone can help 😩 I don't know what is meant for. Any short Intro from anyone,I'll get it fast

    opened by manager26 0
Owner
iceland
Orion Nebula, M42
iceland
Mysterium the first tool which permits you to retrieve the most part of a Python code even the .py or .pyc was extracted from an executable file, even it is encrypted with every existing encryptage. Mysterium don't make any difference between encrypted and non encrypted files, it can retrieve code from Pyarmor or .pyc files.

Mysterium the first tool which permits you to retrieve the most part of a Python code even the .py or .pyc was extracted from an executable file, even it is encrypted with every existing encryptage. Mysterium don't make any difference between encrypted and non encrypted files, it can retrieve code from Pyarmor or .pyc files.

Venax 116 Dec 21, 2022
Deriving RSA public keys from message-signature pairs

The repository contains: Experimental code to calculate RSA public keys based on two known message-signature pairs

Silent Signal 120 Dec 31, 2022
Ethereum ETL lets you convert blockchain data into convenient formats like CSVs and relational databases.

Python scripts for ETL (extract, transform and load) jobs for Ethereum blocks, transactions, ERC20 / ERC721 tokens, transfers, receipts, logs, contracts, internal transactions.

Blockchain ETL 2.3k Jan 1, 2023
Learn Blockchains by Building One, A simple Blockchain in Python using Flask as a micro web framework.

Blockchain ✨ Learn Blockchains by Building One Yourself Installation Make sure Python 3.6+ is installed. Install Flask Web Framework. Clone this repos

Vaibhaw 46 Jan 5, 2023
Tools for running airdrop and token distribution campaigns on the Solana blockchain.

Overview This repository contains some of the scripts we have used for running our airdrop campaigns and other distributions. Initially, all of these

null 147 Nov 17, 2022
seno-blockchain is just a fork of Chia, designed to be efficient, decentralized, and secure

seno-blockchain https://seno.uno Seno is just a fork of Chia, designed to be efficient, decentralized, and secure. Here are some of the features and b

Denis Erygin 27 Jul 2, 2022
Ceres is a combine harvester designed to harvest plots for Chia blockchain and its forks using proof-of-space-and-time(PoST) consensus algorithm.

Ceres Combine-Harvester Ceres is a combine harvester designed to harvest plots for Chia blockchain and its forks using proof-of-space-and-time(PoST) c

null 38 Nov 14, 2022
blockchain address database

Blockchain Address Ownership Database The database is in data/addresses.db This is a SQLite database of addresses from several blockchains. It's obtai

null 37 Nov 26, 2022
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Contracts for your own applications. Smart

Choice Coin 3 Dec 20, 2022
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts This Repository is dedicated to code for Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Co

Choice Coin 3 Dec 20, 2022
High Performance Blockchain Deserializer

bitcoin_explorer is an efficient library for reading bitcoin-core binary blockchain file as a database (utilising multi-threading).

Congyu 2 Dec 28, 2021
Python implementation of a blockchain.

The goal of this project is to explain and to make clearer how is a blockchain structured at the very core. It's not built with the intention to replicate an advanced blockchain like Bitcoin or Ethereum

Rahul raikwar 5 Jan 28, 2022
An BlockChain Based solution for storing the medical records

Blockchain-based Medical Records ?? Abstract Blockchain has the ability to keep an incorruptible, decentralized, and transparent log of all patient da

Yuvraj Singh Deora 3 Jan 14, 2022
A little side-project API for me to learn about Blockchain and Tokens

BlockChain API I built this little side project to learn more about Blockchain and Tokens. It might be maintained and implemented to other projects bu

Loïk Mallat 1 Nov 16, 2021
A workshop to build an NFT smart contract on the polygon blockchain

Polygon NFT Workshop This is an interactive workshop that guides you through the steps to deploy an NFT smart contract on the Polygon blockchain. By t

Banjo Obayomi 56 Oct 14, 2022
Blockchain Python Implementation

Blockchain Python Implementation

0918nobita 2 Nov 21, 2021
Accounting Cycle Program with Blockchain Component

In the first iteration of my accounting cycle program, I talked about adding in a blockchain component that allows the user to verify the inegrity of

J. Brandon Walker 1 Nov 29, 2021
Best blockchain in the world

alphachain Best blockchain in the world!!! Can be used to implement Layer 2 cryptocurrency protocol just click alphachain.py and it will execute autom

Niño Sison 0 Feb 18, 2022
Cryptocurrency with implementet Blockchain

Cryptocurrency with implementet Blockchain

Mario 1 Mar 24, 2022