This script performs vulnerability checks on Bitcoin transactions for the Random Signature Zero (RSZ) vulnerability. The vulnerability allows for recovering private keys from weak signatures in Bitcoin transactions.
It automatically scans transactions associated with a Bitcoin address, checks for signature reuse, and extracts R, S, and Z values from each transaction. If vulnerabilities are detected, it outputs the affected values and computes the corresponding private key.
- RSZ Vulnerability Scanner: Detects weak signatures in Bitcoin transactions.
- Transaction Fetching: Uses the Blockstream API to fetch transaction data.
- R, S, Z Extraction: Extracts R, S, and Z values from Bitcoin transaction inputs.
- Private Key Recovery: Attempts to recover Bitcoin private keys from vulnerable signatures.
- Python 3.x
sympy
librarybitcoinlib
libraryrequests
library
You can install the required dependencies by running the following command:
pip install -r sympy bitcoinlib requests
Enter the path to your Python addresses file: addresses.py
Enter the number of transactions to scan for each address: 10
Scanning address 1FeexV6b....
Scanning transaction 8e6f573f...
Extracted r: 4f9b06c..., s: b3e4b27...
Vulnerability detected in transaction 8e6f573f:
r: 4f9b06c..., s1: b3e4b27..., s2: 9a23354..., z1: abcdef..., z2: fghijk...
Private key: 1a2b3c4d5e6f7g8h9i...
No vulnerabilities found in transaction abcdef...
...