Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Blockchain password recovery - #3

Open
taquann wants to merge 909 commits into
madacol:masterfrom
3rdIteration:master
Open

Blockchain password recovery #3
taquann wants to merge 909 commits into
madacol:masterfrom
3rdIteration:master

Conversation

@taquann

@taquann taquann commented Feb 19, 2021

Copy link
Copy Markdown

I don't remember my back up phrase

@taquann taquann left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need assistance

3rdIteration and others added 29 commits February 15, 2022 06:32
… same character as a custom delimiter) in a custom expanding wildcard (#329)

* A simple fix to handle the situation where someone has a space in a custom expanding wildcard
*Add Tezos Support and Tests
*Expand --checksinglexpubaddress to work with Eth (and other) wallets. (This is how Atomic wallet implements Eth, so adds support for Atomic Wallet Eth address and ERC20 tokens)
These v3 wallets with second password still used the v0 encryption for the encrypted private keys... (Based on a sample wallet from 2016)
SQLite file with wallet descriptors. (No longer BerkeleyDB)
* Add SQLite Support (Updated in BTCRecover + Extract Script)
* Remove bsddb3 dependencies from extract script
* Add Tests
* Update documentation
* Add Secret Network Support
* Update requirements-full.txt (Secret Network needs py_crypto_hd_wallet at least 1.1.0)
Add ability to add blocks of tokens to tokenlist based seed recoveries. Added functionality, usage example and CI test.
* Update c32.py to work with Python3 and without older Python2 project specific dependencies that are no longer available.
* Verify functionality with Hiro desktop and browser wallets, including how multiple accounts are handled.
* Verify passphrase functionality with Hiro+Ledger
* Add CI tests, documentation
*Add functionality and logic to support both desktop and mobile wallet types
*Update extract scripts to support both wallet types
*Add CI tests
*Update documentation
As used in wallets like Cakewallet (Generates a 24 word Electrum mnemonic)
…ows Android-Termux and Ubuntu 22.04 to work) (#372)

Also update actions to check latest Ubuntu LTS (22.04)
*Add brew build environment to MacOS tests
*Bump windows version
*Move full tests to run for all PRs
Copilot AI and others added 16 commits April 11, 2026 12:48
… builds (#704)

* Add benchmarking tool with system info collection and mkdocs integration

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/8532c884-f101-4b2f-aa2a-9f97cffc6f2a

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Address code review feedback: fix error handling, unused vars, and add comments

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/8532c884-f101-4b2f-aa2a-9f97cffc6f2a

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Run generate_benchmark_docs.py during ReadTheDocs pre_build step

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/00ba8418-6bef-48b6-8605-03974839d287

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add GPU/OpenCL/thread pass-through args to benchmark.py

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f261d6b4-dddf-441a-9eaa-eb627f7f757d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Refactor: extract GPU/OpenCL arg helpers, remove unused parameters

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f261d6b4-dddf-441a-9eaa-eb627f7f757d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify help text: GPU/OpenCL defaults come from btcrecover

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f261d6b4-dddf-441a-9eaa-eb627f7f757d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Replace hostname with hashed system ID, fix Windows socket error, add structured OpenCL device info

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/e7ceac9d-300c-4b56-a9e7-1b52cee81397

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Update OpenCL display for structured data, add OpenCL column to docs table

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/e7ceac9d-300c-4b56-a9e7-1b52cee81397

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Extract magic numbers into named constants

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/e7ceac9d-300c-4b56-a9e7-1b52cee81397

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add benchmark comment option and new benchmark matrix workflow

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/50291e35-49bd-4930-a79b-5e8df75fca60

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Plan update: include wallet difficulty logging

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/50291e35-49bd-4930-a79b-5e8df75fca60

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Log wallet difficulty per benchmark and include in summary

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/50291e35-49bd-4930-a79b-5e8df75fca60

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Plan update: add optional upload of benchmark outputs to repo

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/50291e35-49bd-4930-a79b-5e8df75fca60

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add optional repo upload for benchmark workflow artifacts

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/50291e35-49bd-4930-a79b-5e8df75fca60

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Run benchmark workflow automatically on pull requests

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/63129e0f-8778-48c5-8ea9-525102483c39

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix Windows benchmark run and include eth-keyfile for full benchmark coverage

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/43c5281c-e584-451f-a3b2-dcb7bb8f9705

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
* Deploy docs to GitHub Pages on master push, add PR preview artifact

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/0fd7e7fb-06ef-4374-a855-a039608e5182

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Remove compiled benchmark results from Benchmarks.md; generate at build time

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f3291e5e-f5fc-47d3-a062-da8815e979eb

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Remove compiled benchmark results from Benchmarks.md, leave empty markers for build-time generation

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/26a36d68-c656-4fea-9ef7-bc38f12f8c93

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Enable docs deployment for PR previews via gh-pages branch

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/3be35f75-b090-4714-b0ac-3abc7c2402da

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…711)

* Add wallet difficulty column to Password Recovery Benchmarks table

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/77fc7274-2c72-4f63-a370-32771393d388

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Include wallet difficulty in the test name instead of a separate column

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/77fc7274-2c72-4f63-a370-32771393d388

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…-second-hash.py (#714)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/5e789a29-7e96-427b-a6e3-a519cd6daeb0

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
* tweak

* Update benchmark.py

* Add benchmark outputs from GitHub Actions run 24297703507

* add some test results

* change test selection

* fixes

* Fix merge conflicts with master, Windows physical core and version detection (#708)

* Deploy docs to GitHub Pages with PR preview artifacts (#707)

* Deploy docs to GitHub Pages on master push, add PR preview artifact

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/0fd7e7fb-06ef-4374-a855-a039608e5182

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Remove compiled benchmark results from Benchmarks.md; generate at build time

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f3291e5e-f5fc-47d3-a062-da8815e979eb

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Remove compiled benchmark results from Benchmarks.md, leave empty markers for build-time generation

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/26a36d68-c656-4fea-9ef7-bc38f12f8c93

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Enable docs deployment for PR previews via gh-pages branch

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/3be35f75-b090-4714-b0ac-3abc7c2402da

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix Windows physical core detection and version detection in benchmark.py

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/91e7d8e9-0960-48f3-b60f-74457c5e5ff4

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix AMD CPU model name detection on Windows via registry (#709)

* Fix AMD CPU model name detection on Windows using registry

On Windows, use winreg to read ProcessorNameString from the registry
as the primary CPU name source. This always contains the full
human-readable brand string (e.g. "AMD Ryzen 9 7950X 16-Core Processor")
instead of raw CPUID identifiers like
"AMD64 Family 25 Model 17 Stepping 1, AuthenticAMD" that
platform.processor() returns. Falls back to wmic then platform.processor().

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/5db0e600-28e6-46d7-af38-5f3082e41c63

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Ensure Windows registry key is closed on exception with try-finally

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/5db0e600-28e6-46d7-af38-5f3082e41c63

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add benchmark outputs from GitHub Actions run 24318916857

* fix: show GPU name in System column for GPU/OpenCL benchmark rows (#710)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/485c1f23-d7b2-461d-a8f8-0264a10f2001

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Merge master into improve_benchmarking: resolve conflicts, keep template-based docs (#712)

* Include wallet difficulty in Password Recovery Benchmark test names (#711)

* Add wallet difficulty column to Password Recovery Benchmarks table

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/77fc7274-2c72-4f63-a370-32771393d388

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Include wallet difficulty in the test name instead of a separate column

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/77fc7274-2c72-4f63-a370-32771393d388

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* fix: add explicit utf-8 encoding to file open calls in update_docs_file

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/57c0d0d9-1438-4ceb-bcbd-1681ac43bb26

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Restore template-based docs generation (reverse points 2 and 3 of merge resolution)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/68ffa611-4985-4ba2-a88e-b4bae26de035

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Remove generated docs/Benchmarks.md from git tracking (already in .gitignore)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/68ffa611-4985-4ba2-a88e-b4bae26de035

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix CI failures: broken chained assignments in generate_benchmark_docs.py and wallycore build on Termux (#713)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/65194a24-21e3-43de-aac9-52d38e8db476

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…ypes (#715)

* Fix benchmark table generation: use systems as columns instead of test types

The _generate_table function was incorrectly using test type labels as column
headers while rows iterated over systems, causing a column count mismatch.
This resulted in test types appearing as column headers and many blank cells.

Fixed by making system numbers the column headers and adding a separate
Difficulty column for wallet difficulty info.

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/705dc9e1-bb06-45b5-8add-7eddc7fff096

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix benchmark table: system info as first column, test types as column headers

Reverts incorrect row/column swap and properly fixes _generate_table:
- Test types (label + mode + difficulty) as column headers
- Rows iterate over systems, not test types
- First column shows system number + CPU/GPU name
- Adds _get_system_label helper for building row labels

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/ee901bac-b22c-4b24-a2e3-4ad3327db559

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add Mode column and show relevant hardware per mode in benchmark tables

- Adds separate Mode column (CPU/GPU/OPENCL)
- Column headers show test names without mode (deduplicated)
- Rows iterate over (system, mode) pairs
- First column shows CPU name for CPU rows, GPU name for GPU/OPENCL rows

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/0bd00b80-6911-4ba3-9415-45e1f0e2d32f

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix garbled chars and incorrect seed length statement in benchmark template

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/d5b6aaa4-3a56-412d-9501-ec9a2b2bcb70

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add wallet difficulty note and seed recovery performance factors to benchmark template

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/d5b6aaa4-3a56-412d-9501-ec9a2b2bcb70

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Include CPU core count in system name for CPU benchmark rows

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/d5b6aaa4-3a56-412d-9501-ec9a2b2bcb70

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…#717)

* Remove bitcoin-utils/hdwallet dependency; inline block.io decryption using stdlib+ecdsa+pycryptodome

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/42d27430-b24f-4b54-af01-3b4a39b3f209

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Bump coincurve from 20.0.0 to 21.0.0

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a1647160-bcfe-47f1-8c1d-47fa7497e772

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Revert coincurve to 20.0.0 - 21.0.0 source build is broken

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/44cc467a-a4b9-4574-b54a-57d3e6118dc5

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Try coincurve 21 first, fall back to 20 in all CI workflows

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a13328d1-1170-4184-9468-66f8198dc555

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* coincurve: platform-dependent pin (v20 aarch64/Termux, v21 others) + Python 3.14 docs note

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a77dfc43-3077-4bc7-88c8-313df7f53c45

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* fix: add libsodium pkg install and SODIUM_INSTALL=system for pynacl on Termux Full job

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/4937364d-9032-4945-add1-0c67da90d492

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* docs: add libsodium and SODIUM_INSTALL=system to Termux installation instructions

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/fd109b9e-ab9e-4842-a4dc-ae342d0e9288

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…716)

* Also check change (/1) derivation paths by default for UTXO wallets

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/1880eb40-9d7a-45c0-9789-68cd9c1369cb

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add CI tests for change-address derivation path checking

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/30be8a25-a306-4a66-9702-c6cd57dfdd45

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…x Blockchain V2 legacy mnemonic; add end-to-end dump tests (#719)

* Fix dump bugs in WalletBlockchain (v4 derivations, v0 alt schemes, decrypt_old) and V2 legacy mnemonic, add CI dump tests

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/9ad5a29a-e666-4cd6-a719-767c72c593e8

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix `--dump-privkeys`/`--dump-wallet` for several wallet versions; fix Blockchain V2 legacy mnemonic; add end-to-end dump tests

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/9ad5a29a-e666-4cd6-a719-767c72c593e8

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Fix V3/V5 mnemonic bugs; add canonical test vectors for V2/V3/V4/V5; fix MultiBitHD dump decorator

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/eaf32e6c-593a-4584-bd80-dea45860e64e

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Address code review: move binascii import to module level, remove redundant bytes() cast

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/eaf32e6c-593a-4584-bd80-dea45860e64e

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add auto-detect Blockchain legacy mnemonic wallet and tests through V5

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/941d5fd5-34d6-425d-a8ef-847f9ed7d9e0

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…720)

* Add skills.md guiding AI agents through BTCRecover-assisted recoveries

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/e4e460f9-febb-47e3-a8d8-fc94accce68b

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* skills.md: recognise wallets by internal contents; note Blockchain.com wallet.aes.json

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/c8a8490c-f280-4ece-8b22-02f5e475704c

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* skills.md: handle online/cloud-agent case via split-workflow + extract scripts

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/78e2ff43-23bb-40ad-80c6-9db0616dbcc1

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* docs: add AI-Assisted Recovery page; link from README and AGENTS.md

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/987621a5-943d-42a3-b849-14c01fa12620

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* skills.md: add Step 8 — ask user to upstream agent-authored fixes / features

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/ac3e6700-68ff-4d53-93de-ba1960c5929f

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Rename skills.md → SKILL.md (Claude Code skill convention) + add frontmatter

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/6b336bb1-a202-4183-8f6e-41494a909a28

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Clarified requirements for BIP39 passphrase recovery and adjusted wording on typo detection.
Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f19790d5-5181-45a9-b5fd-aac5da93dfbe

Update AI Assisted Recovery documentation

Clarified instructions for setting context length and using compact prompts for local LLMs.

Clarify model usability and context length settings

Updated model usability descriptions and context length recommendations for better clarity.

docs: add “less capable agents” workflow to AI-assisted recovery guide (#738)

* docs: add less-capable-agent prompt workflow to AI recovery guide

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/75308dfc-d291-4b84-82f4-86e45065e86c

* docs: compact SKILL files for low-context agents

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/ca65ab85-364f-40cf-870a-fd2d2144862d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Enhance AI recovery instructions in documentation

Added instructions for using BTCRecover with AI assistance.

* Update AI Assisted Recovery documentation

Added details about local model settings and cloud models.

* Update tested models and local LLM settings

Revised descriptions for tested models and clarified their usability on different systems. Updated notes on local LLM settings.

* docs: discourage unnecessary threads and seed typo flags in recovery commands

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/80a1018b-b92b-4eb4-ae27-6eb214e7a78d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify performance of qwen/qwen3.5-4b model

Updated description for the qwen/qwen3.5-4b model to clarify performance on systems without a GPU.

* docs: fix typo in AI assisted recovery guide

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/80a1018b-b92b-4eb4-ae27-6eb214e7a78d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Update AI Assisted Recovery documentation for model performance

Clarify performance expectations for different model sizes and add a note about lower parameter models getting stuck in loops.

* Update AI_Assisted_Recovery.md

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Clarify BTC address-type handling in recovery triage (#737)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/e5db1f65-cfb8-44c4-b1b9-d7fb24bd478b

Tighten SKILL.md to enforce default-first seed recovery runs and conservative `--addr-limit` (#736)

* Update recovery skill to prefer seedrecover defaults first

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f8e2ca4c-081f-4a22-b8c5-f67cf214d28d

* Refine default-first guidance for addr-limit and seed runs

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f8e2ca4c-081f-4a22-b8c5-f67cf214d28d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify typo-flag exception language for seed defaults

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f8e2ca4c-081f-4a22-b8c5-f67cf214d28d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Disambiguate placeholder guidance to three-missing-word case

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f8e2ca4c-081f-4a22-b8c5-f67cf214d28d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Clarify triage: invalid mnemonic is seed-word issue, not passphrase symptom (#735)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/4a98b84e-f95d-4257-a868-42c5b43a10ff

docs: forbid collecting seed words during triage (#734)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/bf5cda68-8fe0-4f02-9333-ba5f9cda19b9

Harden recovery skill sequencing: require complete install validation before offline step (#733)

* Clarify offline step happens after install validation

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/2ee49cc6-1ab3-4dd7-856b-b30044252358

* Add fallback install gating when sub-skill is unavailable

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/2ee49cc6-1ab3-4dd7-856b-b30044252358

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Refine recovery skill to prefer pre-made AddressDBs only for no/uncertain address cases (#731)

* Clarify pre-made AddressDB guidance in recovery skill

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/51d5039b-dddd-42e9-8be6-6fc02a4d3237

* Clarify manual AddressDB fallback when no pre-made DB exists

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/6ab5df40-3a53-4126-9df4-560ff174e5ba

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Add explicit AI-install risk warning and dual installation modes to install skill (#730)

* Add install-safety warning and automatic/guided routes

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/abc6a2a9-7d78-42f6-ac7a-69cb306c5219

* Swap guided and automatic route order in install skill

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/8fcb683a-2cda-4e4d-8daa-bed36530660a

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add wallet-type targeted dependency install mode to install skill

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a4ee264a-d66c-42b1-9254-b5273f585396

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify base-only wallet types in targeted install guidance

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a4ee264a-d66c-42b1-9254-b5273f585396

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Use canonical package name for py-crypto-hd-wallet install hint

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a4ee264a-d66c-42b1-9254-b5273f585396

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Document mapping source and shell quoting note for targeted installs

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a4ee264a-d66c-42b1-9254-b5273f585396

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify triage reference and coupled-extras wording in install skill

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a4ee264a-d66c-42b1-9254-b5273f585396

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify shell quoting and mapping maintenance notes in install skill

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/a4ee264a-d66c-42b1-9254-b5273f585396

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Adjust install skill validation for full versus selective installs

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/067ced38-ccba-4084-b266-d50638e52c90

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify SLIP39 quoting note in install skill

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/067ced38-ccba-4084-b266-d50638e52c90

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Add support consultation fallback to skill docs (#729)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/7838ae20-792b-493c-a411-f63b3c11c478

docs: add top note on chatbot vs AI CLI approaches (#727)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/9ebf8f20-ad44-45d0-923b-b4b447a4bcf3

docs: assume mnemonic words are in-order; only descramble when explicitly asked (#726)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/96df94ce-5ea8-4891-9617-97be2f078db5

Remove bip32-path argument from SKILL command guidance (#725)

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/8b60ede2-f325-48b8-8488-8d5779e0a767

Update SKILL.md

Split SKILL.md into separate sub-skills for install, tokenlist construction, and wallet-file location (#724)

* Split SKILL.md into three separate sub-skills

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/de3916de-bda2-4c25-97bb-157fabdbbdd3

* Replace non-ASCII ≲ with plain text for accessibility

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/de3916de-bda2-4c25-97bb-157fabdbbdd3

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Refine AI-assisted recovery guidance with tested model notes and safer BIP32 path defaults (#723)

* Update AI recovery docs with tested models and bip32-path guidance

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/4d058e1c-3002-4183-8453-dc7689b146a5

* Move tested-models notes to a new section just after Quick start

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/cecba691-bcc3-4fac-a09e-4dae4096a7c8

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

Clarify SKILL.md seed-recovery guidance for missing words and mnemonic-length inference (#722)

* Clarify SKILL.md: no user placeholders needed for <=2 missing seed words

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/7c31ad79-eceb-4704-8dad-78920722b70c

* Refine SKILL.md: avoid exact missing-word fixation for seed recovery

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/7c31ad79-eceb-4704-8dad-78920722b70c

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Clarify: no placeholders needed at all for <=2 missing BIP39 words; only needed for 3

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/65c14c4a-f5c2-4a20-ae6b-84c2509027cb

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

---------

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Co-Authored-By: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-Authored-By: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Co-Authored-By: 3rd Iteration <steve@cryptoguide.tips>
3rdIteration and others added 7 commits May 21, 2026 19:02
Updated recommendations for local-model combinations and settings, clarified usage for smaller models, and adjusted section titles.
* Add skill evaluation harness and scenarios

* Refine skill harness error handling

* Add per-model API endpoint support to skill evaluation harness

* Add first batch of evaluations for initial skills

* Improve skill evaluation judge and skill docs

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/997397f0-6eca-4dea-9e1d-ac05d2fba296

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add usage example evaluation scenarios

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/f1482729-8d0a-429b-9f0e-a4234fd695f8

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Deduplicate evaluation scenarios

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/5448b1b6-3913-497a-87bc-ee5b5b4b2e7d

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Add batch candidate controls

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/5663bd41-2e23-40c2-bfe9-22d35d818078

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Isolate Docker evaluation workspace

Agent-Logs-Url: https://github.com/3rdIteration/btcrecover/sessions/62786c0a-b6fa-4877-aaaa-5d9ead85a701

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>

* Update skills and harness

* updated skills

* update model summaries

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 3rd Iteration <steve@cryptoguide.tips>
Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
* Fix WalletBlockchainLegacyMnemonic id_to_word TypeError (gh-740)

id_to_word is a @classmethod that reads the class-level _words attribute,
but __init__ was setting _words as an instance attribute. This caused
TypeError: 'NoneType' object is not subscriptable when converting found
mnemonic IDs back to words.

Assign _words to the class so id_to_word can find it. Add regression test.

* Update GitHub Actions to latest versions (checkout@v7, setup-python@v5)

---------

Co-authored-by: 3rdIteration <stephen@3rditeration.com>
…@v7 (#742)

Co-authored-by: 3rdIteration <stephen@3rditeration.com>
…d mnemonic phrases (#743)

* Add WalletFinder utility for scanning directories for wallet files and mnemonic phrases

* Add walletfinder tests to run-all-tests.py

* Fix walletfinder import path for CI test runner

* Skip SLIP39 test if shamir-mnemonic not installed

* Add debug output to wallet scanner test

* Add debug output to scan_wallet_mode

* Fix scan_wallet_mode: remove bad import of get_wallet_type_name from btcrpass

* Add skipUnless guards and fix depth test for wallet scan tests

* Fix can_detect_wallet to catch SystemExit from btcrpass dependency check

* Move wallet detection skip to test body for runtime evaluation

* Fix test_blockchain_v4_2025: test wallet type detection instead of password decrypt

* Fix test_blockchain_v4_2025: use correct password Btcr-test-passw0rd!

* walletfinder: tighten Blockchain detector, add --debug flag with detection reasons

- Add base64 purity check to WalletBlockchain v0 detection:
  reject files containing non-base64 characters (accept only backslash
  escaping found in exported wallets)
- Add detection_confidence: v2+ wallets with JSON structure are
  'definite', v0 heuristic matches are 'possible'
- Add detection_reason to wallet objects showing why each file matched
- Add --debug flag to walletfinder.py that prints detection reason per file
- Add --debug argument parsing test

* walletfinder: add textract document scanning with warning when unavailable

* Expand walletfinder text mode: detect WIF, BIP38, and BIP32 extended keys

- Rename --mnemonic-mode to --text-mode with backward-compatible alias
- Add regex patterns for raw WIF private keys (5H/5J/K/L/c prefixes)
- Add BIP38 encrypted key detection (6Pn prefix)
- Add BIP32 extended key detection using SLIP-0132 registered prefixes
  (xprv/xpub, yprv/ypub, zprv/zpub, tprv/tpub, uprv/upub + Y/Z/v/V variants)
- Fix Base58 character class to include full alphabet [1-9A-HJ-NP-Za-km-z]
- Fix WIF compressed key quantifiers to match correct 52-char length
- Update test keys with valid Base58 characters and correct SLIP-0132 version bytes

* walletfinder text mode: checksum validation, raise min-sequential to 12, suppress noise without --debug

---------

Co-authored-by: 3rdIteration <stephen@3rditeration.com>
)

* Replace scrypt library with hashlib.scrypt in tests

Removes the third-party `scrypt` import and replaces `scrypt.hash()` with Python's built-in `hashlib.scrypt()`. This eliminates an external dependency for testing, as `hashlib.scrypt` has been available since Python 3.6.

* Fix OpenCL for AMD APUs with unified memory

Add detection and graceful fallbacks for AMD APU devices with unified memory (>32GB VRAM) that cause buffer allocation failures in sCrypt kernels. Changes include: cap concurrent cores to 64 in opencl.py, add try/except fallback to CPU in btcrpass.py, disable OpenCL for SLIP39 (uses custom KDF), fix MetaMask PBKDF2 kernel selection on RDNA iGPUs, and update tests with skip conditions. Also adds RuntimeError conversion for cross-process pyopencl exception handling.

* Add OpenCL support tracking for password wallet benchmarks

Extended benchmark.py to track which wallet types support OpenCL via a new `supports_opencl` field. Updated the wallet test configuration and added skip logic in `run_all_benchmarks()` so OpenCL benchmarks are skipped for unsupported wallets (e.g., Blockchain.com v0, MultiBit HD, Coinomi, Ethereum Keystore scrypt). Also cleaned up an outdated docstring.

* fixes

* Update benchmark results and rename file

Rename benchmark JSON to new timestamp and update metadata (timestamp, threads set to "auto", python version, GPU memory). Refreshes many benchmark measurements (passwords_per_second and passwords_tried) across CPU and GPU results, and adds new entries including Coinomi, Ethereum Keystore (scrypt), SLIP39 Passphrase, SLIP39 Seed Share and multiple OPENCL-mode results. Miscellaneous small adjustments to labels/modes/categories preserved.

* Update benchmark results with auto thread detection

Renamed benchmark output file to reflect new run timestamp. Key changes: threads configuration changed from fixed 32 to 'auto', and performance metrics updated across CPU, GPU, and OPENCL wallet types.
Document `pypdf` as an optional PDF companion to `textract` and explain when it helps recover text from PDFs with custom font encodings. Update `walletfinder.py` to emit a one-time warning when a PDF needs the `pypdf` fallback but the dependency is not installed, so users know why that file could not be scanned.

Walletfinder - Add progress, test-wallet skipping, and filename context (#745)

* Add progress, test-wallet skipping, and filename context

Improve wallet scanning UX and error context across the project.

- btcrecover/btcrpass.py: propagate an optional filename into _load_from_filedata and include the filename in printed messages and warnings for bitcoinj and Coinomi wallets (unencrypted warnings and unexpected encrypted key lengths). Adjusted method signatures to accept filename=None.
- walletfinder.py: add automatic skipping for bundled test-wallet directories, path truncation helpers, and a single-line progress indicator (spinner + progress bar). walk_directory now supports skipping test-wallets; scan_wallet_mode does a two-pass file count to drive the progress UI, captures unencrypted-wallet ValueErrors into results, and clears the progress line on completion. Added CLI flag --no-skip-test-wallets to override automatic skipping.

These changes improve usability when scanning large trees and make diagnostic output more actionable by showing file context. Function signature changes are backwards-compatible (filename is optional).

* Use ASCII progress bar & robust scanning

Improve directory scanning robustness and make the console progress output Windows-safe. Handle additional filesystem errors in walk_directory (PermissionError, FileNotFoundError, OSError) and guard entry.is_dir() calls against OSError. Replace Unicode progress characters with ASCII (#, - and simple spinner) and switch to .format() for progress lines. Add an optional two-pass status bar behavior to scan_wallet_mode (statusbar param) that does a discovery pass to count files before scanning; provide --no-statusbar CLI flag to skip discovery and scan immediately. Also improve handling of wallet load errors (report unencrypted wallets) and ensure progress lines are cleared/updated safely.

Add timeouts, graceful shutdown and path formatting

Introduce graceful Ctrl+C handling and responsive shutdown via a threading.Event and SIGINT handler. Wrap blocking file operations (os.path.getsize and load_wallet) in a _timed_operation using ThreadPoolExecutor with a 10s timeout and suppressed stdout/stderr so long-running or noisy operations don't block the scanner. Improve path display/truncation with _format_path_for_display and two truncation modes (normal and aggressive) to produce compact, consistent progress output. Update progress printing to show formatted absolute paths and make scanning honor the stop flag, printing an interruption message when stopped.

Revamp WalletFinder scan modes and filtering

WalletFinder now runs wallet-file and text/key scanning together by default in a single pass, with new `--skip-wallet-mode`/`--skip-text-mode` controls and compatibility aliases for old flags. The scanner adds bundled path-substring exclusions via `walletfinder-exclusionlist.txt`, plus `--update-exclusions` to regenerate and merge repo self-matches so `--folder .` stays clean.

Detection was hardened with safer timed operations, better discovery/progress reporting, directory wallet candidate handling (e.g., MetaMask-style folders), and clearer wallet-type/module warnings. Text/key scanning was improved with larger limits for document types, PDF fallback extraction via `pypdf`, numbered/bulleted seed-run handling, Base58Check validation for WIF/BIP38/xprv/xpub, and recovery of whitespace-split keys. Related docs were expanded and a dedicated `requirements-walletfinder.txt` was added; `btcrpass.load_wallet()` directory error paths now return a clear "not recognized wallet" error when directory loading fails.
Multiple improvements to reduce false positives and improve usability:

- Fix BitGo detection to require quoted SJCL field names (`"adata"`, `"iv"`, etc.) instead of bare substrings that matched inside words like "metadata"
- Add shell-style glob pattern support (fnmatch) and case-insensitive matching to the exclusion list, with directory-aware patterns ending in `/`
- Suppress well-known BIP39 spec test mnemonics from normal output (still visible with `--debug`)
- Label extended public keys (xpub/ypub/zpub/Zpub/etc.) separately from private keys
- Add support for multisig extended key prefixes (Zprv, Zpub, Uprv, Upub, Vprv, Vpub)
- Expand exclusion list with curated defaults for browser data, Windows files, Linux wordlists, crypto library source trees, and package caches
- Improve textract/pypdf warnings to reflect partial PDF support when only pypdf is installed

Support redirected output in progress reporting

When stdout is redirected to a file or pipe (not a TTY), walletfinder now prints occasional milestone progress lines instead of in-place updates. This prevents large scan logs from becoming bloated with repeated status bar rewrites.

Changes:
- Added `_progress_enabled()` to detect TTY vs redirected output
- Modified `_print_progress()`, `_print_scan_status()`, `_clear_progress_line()`, and `_make_discovery_reporter()` to output plain milestone lines (every 10k items) when redirected
- Refactored duplicate progress display code in `scan_wallet_mode()` and `scan_combined()` to use `_print_scan_status()`
- Added comprehensive test suite (`TestProgressRedirect`) covering TTY and non-TTY behavior
- Added documentation showing how to save reports and monitor with `tail -f` or `Get-Content -Wait`

Harden wallet scan exclusions and dir pruning

Adds new exclusion patterns for common false positives (Chromium metadata, Hugging Face cache, BTCRecover temp test dirs, and more repo/test-vector paths) and updates tests to cover them. Introduces absolute-path system directory pruning (`/proc`, `/sys`, `/dev`, etc. by OS) in both directory walk paths to avoid hangs/loops on pseudo filesystems. Also reduces scan noise by raising `pdfminer` logging to error level in `main()`.

Skip symlinked dirs to prevent infinite loops

Add `_is_symlink()` helper and use it in `walk_directory` and `_collect_wallet_candidates` to avoid following symlinked directories (e.g. `/proc/<pid>/root`). Also wrap `os.path.getsize` calls in `scan_combined` with `OSError` handlers to gracefully skip broken or vanished symlinks.
Add new exclusion entries to reduce false positives from non-wallet artifacts and third-party repos. This update covers Chromium/CEF cache paths, Minecraft and Steam Link app data files, trezor/electrum/liana/bipsea/BIP39-Solver-GPU/xpub tool test-doc vectors, and PyInstaller `.dist-info/METADATA` files that can embed seed/key examples.

Update exclusion list and reorder requirements

Move textract/pypdf entries to the top of requirements-walletfinder.txt (before wallet-type coverage section). Add new path exclusions for Chromium GPU/Tap caches, OEM blobs, OpenSSL tests, JetBrains cache, Bitcoin Core docs, and Specter DIY firmware source.
)

* Make secp256k1 backend pluggable (coincurve/wallycore/pure-python)

- Add btcrecover/crypto_backends.py with auto-selection of coincurve,
  wallycore, or a bundled pure-Python fallback (with a startup warning)
- Support BTCR_BACKEND env override to force a backend
- Route EC operations through the backend in btcrseed, btcrpass
  (incl. Electrum 2.8 ECIES) and P2TR_tools
- requirements.txt: coincurve optional, wallycore>=1.0.0 added
- Add benchmark_crypto_backends.py
- Linux CI now tests all three backends (Latest/Weekly base+full, Termux)
- Document the three backends and relative performance in INSTALL.md

* Fix CI: make coincurve install resilient, drop wallycore from Termux

- coincurve install now installs requirements minus coincurve first (pulling in
  wallycore as fallback) and only then attempts coincurve, tolerating build
  failures (e.g. Python 3.14) instead of hard-failing the install step
- Drop wallycore from the Termux matrix: it has no Android/aarch64 wheel and its
  source build fails under Termux, so only coincurve and pure-python are tested there

* Correct coincurve 3.14 guidance; keep resilient coincurve install fallback

- Verify via PyPI: neither coincurve 20.0.0 (wheels cp38-cp312) nor 21.0.0
  (wheels cp39-cp313) ships a Python 3.14 wheel, and both fail to build from
  source on 3.14. So coincurve simply cannot be installed on 3.14 today.
- Keep the CI coincurve install as 'coincurve==21.0.0 || coincurve==20.0.0 || true'
  (gets a wheel on 3.10-3.13) with '|| true' so 3.14 falls back to the already
  installed wallycore backend instead of failing the install step
- Update docs/INSTALL.md and skills/install-btcrecover/windows/SKILL.md: the
  previous claim that 'coincurve==20.0.0 has a 3.14 wheel' is incorrect; on 3.14
  users should install wallycore (or rely on the pure-Python fallback)

* Use per-Python-version coincurve pin in CI

- 3.13 -> coincurve==21.0.0 (only version with a 3.13 wheel)
- 3.10/3.11/3.12 -> coincurve==21.0.0 || 20.0.0 (both have wheels)
- 3.14 -> no coincurve wheel; install allowed to fail and the job runs on the
  already-installed wallycore fallback backend

* Pin coincurve per Python version in requirements files

Use PEP 508 python_version markers so pip installs the coincurve release that
actually has a prebuilt wheel for the running interpreter:
  - python_version < 3.13  -> coincurve==20.0.0 (wheels cp38-cp312)
  - python_version >= 3.13 and < 3.14 -> coincurve==21.0.0 (cp313 wheel)
  - python_version >= 3.14 -> omitted (no coincurve wheel exists); BTCRecover
    falls back to the wallycore backend instead

This replaces the previous platform_machine-based split, which is no longer
needed since both releases now ship aarch64 and x86_64 wheels. Updated in
requirements.txt, requirements-full.txt, and the commented example in
requirements-walletfinder.txt.

* Fix CI: update stale walletfinder tests, make Termux test pure-python only

- test_walletfinder.py: the 3 argument-parsing tests referenced old argparse
  attribute names (args.wallet_mode / args.text_mode) that no longer exist after
  the backward-compat flags were renamed to *_compat. Update them to the current
  API (skip_wallet_mode default, text_mode_compat, wallet_mode_compat). These 3
  errors were failing every Linux/Windows/macOS test run (pre-existing on master).
- termux-tests.yml: on Android/aarch64 neither coincurve nor wallycore has a wheel
  or builds from source (and bip-utils forces coincurve), so Termux can only run
  the bundled pure-Python backend. Test that backend only, excluding the
  unbuildable C libraries from the install.

* Termux Full: exclude bip-utils-dependent packages (they force coincurve, which cannot build on aarch64)

* Revert Termux workflow to master-equivalent setup

Termux/aarch64 cannot use coincurve (ofek/coincurve#189: build/runtime
incompatibility), so restore the original single-backend Termux jobs. Exclude
wallycore from the main install so only coincurve is attempted (matching the
historical Termux setup), avoiding the wallycore-from-source failure introduced
by adding wallycore to the base requirements.

* Fix CI install on Windows: replace 'pip install -r /dev/stdin' with temp file

On Windows, 'pip install -r /dev/stdin' fails with
'Could not open requirements file: /proc/self/fd/0' (no /proc). Write the
filtered requirements to $RUNNER_TEMP/btcr-reqs.txt and install from that file
instead. This makes the coincurve install step (which previously failed on all
Windows Python versions) work, falling back to the wallycore wheel on 3.14.

* Remove literal backslashes around RUNNER_TEMP path in CI install steps

The YAML block scalar preserved the backslash-escaped quotes as literal
characters, so the shell received a path wrapped in literal backslashes and the
temp requirements file was never created. Use plain double quotes.

* Fix Weekly/Latest Full on Python 3.14: exclude bip-utils subtree

bip-utils (and py_crypto_hd_wallet, slip10, stellar_sdk) hard-require
coincurve, which has no wheel and cannot build on Python 3.14. Exclude that
subtree from the Full requirements install on 3.14 so the job installs using
the wallycore fallback instead of failing on a coincurve source build.

* Termux Full: exclude bip-utils subtree (coincurve cannot build on aarch64)

Mirrors the Weekly/Latest Full fix: bip-utils and its dependents hard-require
coincurve, which has no aarch64 wheel and fails to build on Termux, so exclude
that subtree from the Termux Full install.

* Docs: recommend Python 3.13, warn about coincurve on 3.14+ and Termux

* benchmark: add --backend flag to force a backend, record it in results

* Add pure-python fallback backends for AES, ChaCha20-Poly1305, and Keccak

- btcrecover/aes_backends.py: Unified AES & ChaCha20-Poly1305 backend
  (pycryptodome -> pure-python fallback)
- lib/aes_gcm.py: Pure-python AES-GCM using pyaes + GHASH
- lib/chacha20_poly1305.py: Pure-python ChaCha20 + Poly1305 (RFC 8439)
- lib/keccak.py: Pure-python Keccak-256 (Ethereum-compatible)
- lib/eth_hash/backends/purepython.py: eth_hash backend wrapping lib.keccak
- btcrpass.py: Use aes_backends instead of direct Crypto.Cipher imports;
  improve protobuf error handling (exit -> ValueError/False)
- emip3.py: Use chacha20_poly1305_new from aes_backends
- requirements.txt: Document optional dependencies
- CI: Exclude pycryptodome/protobuf in purepython backend scenario so
  the pure-python fallbacks are actually exercised

* Fix: add __name__ to _AESModule for load_aes256_library callers

load_aes256_library() returns _AESModule (the pure-python fallback),
but callers access __name__ on the result to estimate password speed.
Without __name__, the CI pure-python scenario crashed with:
  AttributeError: '_AESModule' object has no attribute '__name__'

* Fix Poly1305 reduction in pure-python ChaCha20-Poly1305

The old 5-limb carry-chain decomposition was broken — when h values
exceeded 32 bits, it produced integers too large for struct.pack('<I', ...),
causing OverflowError in the pure-python backend CI scenario.

Rewrite _poly1305_mac using clean big-integer arithmetic (int.from_bytes /
to_bytes) that is provably correct and matches RFC 8439 test vectors.

Also fix a minor struct.pack call in the section about patating the other.
Bug found by CI testing with pycryptodome excluded.

* Fix pure-python AES-GCM: correct inc32 and support non-12-byte IVs

- _inc32 now increments only the low 32 bits (GCM spec), preventing
  values >128 bits that caused OverflowError: int too big to convert
- _compute_j0 handles arbitrary-length IVs via GHASH (SP 800-38D),
  fixing Metamask/btc_com wallets that use 16-byte IVs

* Document that simple 1-2 BIP39 word recoveries work with pure-python backends in under 24h

* Fix: wallycore is ~2× slower than coincurve for BIP39 recovery

* Add --backend option to benchmark.py to force secp256k1 backend

Sets BTCR_BACKEND env var for all subprocesses so users can compare
coincurve, wallycore, and pure-python performance from a single tool.

* fixes

---------

Co-authored-by: 3rdIteration <stephen@3rditeration.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants