{"id":19405822,"url":"https://github.com/vladkens/ecloop","last_synced_at":"2025-04-24T09:31:01.871Z","repository":{"id":236676720,"uuid":"792947938","full_name":"vladkens/ecloop","owner":"vladkens","description":"🔐💻 ecloop: A high-performance, CPU-optimized tool for computing public keys on the secp256k1 elliptic curve, with features for searching compressed \u0026 uncompressed public keys and customizable search parameters.","archived":false,"fork":false,"pushed_at":"2025-02-15T22:47:56.000Z","size":95,"stargazers_count":25,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T02:01:41.487Z","etag":null,"topics":["bitcoin","brainwallet","password-recovery","puzzle","secp256k1","simd"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vladkens.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"vladkens","buy_me_a_coffee":"vladkens"}},"created_at":"2024-04-28T02:11:00.000Z","updated_at":"2025-03-23T04:15:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b27e788-47d0-417d-a81d-44a57444bb9a","html_url":"https://github.com/vladkens/ecloop","commit_stats":null,"previous_names":["vladkens/ecloop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladkens%2Fecloop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladkens%2Fecloop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladkens%2Fecloop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladkens%2Fecloop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vladkens","download_url":"https://codeload.github.com/vladkens/ecloop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250600614,"owners_count":21456995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","brainwallet","password-recovery","puzzle","secp256k1","simd"],"created_at":"2024-11-10T11:39:40.855Z","updated_at":"2025-04-24T09:31:01.860Z","avatar_url":"https://github.com/vladkens.png","language":"C","funding_links":["https://github.com/sponsors/vladkens","https://buymeacoffee.com/vladkens"],"categories":[],"sub_categories":[],"readme":"# ecloop\n\nA high-performance, CPU-optimized tool for computing public keys on the secp256k1 elliptic curve, with features for searching compressed \u0026 uncompressed public keys and customizable search parameters.\n\n[\u003cimg src=\"https://badges.ws/badge/-/buy%20me%20a%20coffee/ff813f?icon=buymeacoffee\u0026label\" alt=\"donate\" /\u003e](https://buymeacoffee.com/vladkens)\n\n## Features\n\n- 🍏 Fixed 256-bit modular arithmetic\n- 🔄 Group inversion for point addition operation\n- 🍇 Precomputed table for points multiplication\n- 🔍 Search for compressed \u0026 uncompressed public keys (hash160)\n- 🌟 Utilizes SIMD for optimized sha256 (uses SHA extensions, both ARM and Intel)\n- 🍎 Works seamlessly on MacOS and Linux\n- 🔧 Customizable search range and thread count for flexible usage\n\n\n## Build\n\n```sh\ngit clone https://github.com/vladkens/ecloop.git \u0026\u0026 cd ecloop\nmake build\n```\n\n## Usage\n\n```text\nUsage: ./ecloop \u003ccmd\u003e [-t \u003cthreads\u003e] [-f \u003cfilepath\u003e] [-a \u003caddr_type\u003e] [-r \u003crange\u003e]\n\nCompute commands:\n  add             - search in given range with batch addition\n  mul             - search hex encoded private keys (from stdin)\n\nCompute options:\n  -f \u003cfile\u003e       - filter file to search (list of hashes or bloom fitler)\n  -o \u003cfile\u003e       - output file to write found keys (default: stdout)\n  -t \u003cthreads\u003e    - number of threads to run (default: 1)\n  -a \u003caddr_type\u003e  - address type to search: c - addr33, u - addr65 (default: c)\n  -r \u003crange\u003e      - search range in hex format (example: 8000:ffff, default all)\n  -q              - quiet mode (no output to stdout; -o required)\n\nOther commands:\n  blf-gen         - create bloom filter from list of hex-encoded hash160\n  bench           - run benchmark of internal functions\n  bench-gtable    - run benchmark of ecc multiplication (with different table size)\n```\n\n### Example 1: Check keys in given range (sequential addition)\n\n`-f` is filter file with hash160 to search. Can be list of hex encoded hashes (one per line) or bloom fitler (must have `.blf` extension). `-t` use 4 threads. `r` – start:end of search range. `-o` file where found keys should be saved (if not provided `stdout` fill be used). No `-a` option provided, so `c` (compressed) hash160 will be checked.\n\n```sh\n./ecloop add -f data/btc-puzzles-hash -t 4 -r 800000:ffffff -o /tmp/found.txt\n```\n\n### Example 2: Check given privkeys list (multiply)\n\n`cat privkeys.txt` – source of HEX encoded priv keys to search (can be file or generator program). `-f` – hash160 to search as bloom filter (can have false positive results, but has a much smaller size; eg. all BTC addresses ever used have size ~6GB). `-a` – what type of hash160 to search (`c` – compressed, `u` – uncopressed, `cu` check both). `-t` use 8 threads.\n\n```sh\ncat privkeys.txt | ./ecloop mul -f data/btc-puzzles.blf -a cu -t 4\n```\n\n`ecloop` can also take a raw word list and automatically hash it with sha256. Use `-raw` flag to it.\n\n```sh\ncat wordlist.txt | ./ecloop mul -f data/btc-puzzles.blf -a cu -t 4 -raw\n```\n\n### Example 3: Generating bloom filter\n\n`cat` reads the list of hex-encoded hash160 values from a file. `-n` specifies the number of entries for the Bloom filter (count of hashes). `-o` defines the output where to write filter (`.blf` extension requried).\n\nBloom filter uses p = 0.000001 (1 in 1,000,000 false positive). You can adjusting this option by playing with `n`. See [Bloom Filter Calculator](https://hur.st/bloomfilter/?n=1024\u0026p=0.000001\u0026m=\u0026k=20). List of all addressed can be found [here](https://bitcointalk.org/index.php?topic=5265993.0). \n\n```sh\ncat data/btc-puzzles-hash | ./ecloop blf-gen -n 1024 -o /tmp/test.blf\n```\n\nThen created bloom filter can be used in `ecloop` as filter:\n```sh\n./ecloop add -f /tmp/test.blf -t 4 -r 8000:ffffff\n```\n\nNote: Bloom filter works with both `add` and `mul` commands.\n\n## Benchmark\n\nGet performance of different function for single thread:\n\n```sh\n./ecloop bench\n```\n\nShould print output like:\n\n```sh\n     _ec_jacobi_add1: 6.52M it/s ~ 0.92s\n     _ec_jacobi_add2: 5.26M it/s ~ 1.14s\n     _ec_jacobi_dbl1: 5.42M it/s ~ 1.11s\n     _ec_jacobi_dbl2: 7.57M it/s ~ 0.79s\n       ec_jacobi_mul: 0.02M it/s ~ 0.57s\n       ec_gtable_mul: 0.29M it/s ~ 1.73s\n       ec_affine_add: 0.30M it/s ~ 1.67s\n       ec_affine_dbl: 0.30M it/s ~ 1.69s\n   _fe_modinv_binpow: 0.20M it/s ~ 0.51s\n   _fe_modinv_addchn: 0.31M it/s ~ 0.32s\n              addr33: 4.95M it/s ~ 1.01s\n              addr65: 4.41M it/s ~ 1.14s\n```\n\n## Build on Windows with WSL\n\nI just leave here all steps I do to run `ecloop` on Windows.\n\n1. Open PowerShell\n2. `wsl --install`\n3. Restart Windows\n4. `wsl --install Ubuntu` (not sure it required, Ubuntu should be installed by default and this command hung when I tried it, so I continued in new tab)\n5. `wsl -d Ubuntu`\n6. `apt update \u0026\u0026 apt install build-essential git`\n7. `git clone https://github.com/vladkens/ecloop.git \u0026\u0026 cd ecloop`\n8. `make build`\n\nIf no errors appear, `ecloop` has been compiled successfully and is ready to use. For example, you can run a benchmark with: `./ecloop bench`.\n\n## Disclaimer\n\nThis project is written to learn the math over elliptic curves in cryptocurrencies. Functionality as a search for Bitcoin Puzzles is added as a real-world use case.\n\n## Cudos to\n- [sharpden](https://github.com/sharpden)\n\n## See also\n\n- [ryancdotorg/brainflayer](https://github.com/ryancdotorg/brainflayer)\n- [albertobsd/keyhunt](https://github.com/albertobsd/keyhunt)\n- [JeanLucPons/VanitySearch](https://github.com/JeanLucPons/VanitySearch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladkens%2Fecloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvladkens%2Fecloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladkens%2Fecloop/lists"}