{"id":48794019,"url":"https://github.com/gitctrlx/bitcoin-from-scratch","last_synced_at":"2026-04-13T21:33:26.573Z","repository":{"id":331305499,"uuid":"1126099235","full_name":"gitctrlx/bitcoin-from-scratch","owner":"gitctrlx","description":"A simple bitcoin implementation in Rust.","archived":false,"fork":false,"pushed_at":"2026-03-28T11:13:31.000Z","size":142,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T15:12:12.684Z","etag":null,"topics":["bitcoin","crypto","from-scratch","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitctrlx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T05:18:03.000Z","updated_at":"2026-03-28T11:12:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitctrlx/bitcoin-from-scratch","commit_stats":null,"previous_names":["pyroth/bitcoin-from-scratch","gitctrlx/bitcoin-from-scratch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gitctrlx/bitcoin-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitctrlx%2Fbitcoin-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitctrlx%2Fbitcoin-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitctrlx%2Fbitcoin-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitctrlx%2Fbitcoin-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitctrlx","download_url":"https://codeload.github.com/gitctrlx/bitcoin-from-scratch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitctrlx%2Fbitcoin-from-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","crypto","from-scratch","rust"],"created_at":"2026-04-13T21:33:16.676Z","updated_at":"2026-04-13T21:33:26.563Z","avatar_url":"https://github.com/gitctrlx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcoin from Scratch\n\nA pure Rust implementation of Bitcoin's core cryptographic primitives and data structures for educational purposes.\n\n## Overview\n\nThis library implements Bitcoin's fundamental building blocks from first principles, including:\n\n- **Elliptic Curve Cryptography** — secp256k1 curve operations, point addition, scalar multiplication\n- **ECDSA Signatures** — Digital signature creation and verification\n- **Hash Functions** — SHA-256, RIPEMD-160, HASH160, HASH256\n- **Key Management** — Key pair generation, public key encoding (SEC format), Base58Check addresses\n- **Transactions** — Legacy and SegWit transaction parsing, encoding, and validation\n- **Blocks** — Block header parsing, proof-of-work validation, difficulty calculation\n- **Scripts** — Bitcoin Script parsing and P2PKH evaluation\n- **Networking** — P2P protocol messages (version, verack, headers, ping/pong)\n\n## Quick Start\n\n```bash\n# Run the demo\ncargo run\n\n# Run an example\ncargo run --example keygen\n```\n\n## Examples\n\nThe `examples/` directory contains demonstration programs:\n\n- `keygen.rs` — Generate Bitcoin key pairs and addresses\n- `hash_demo.rs` — Demonstrate hash functions (SHA-256, RIPEMD-160, HASH160)\n- `parse_tx.rs` — Parse and display a real Bitcoin transaction\n- `parse_block.rs` — Parse and validate a Bitcoin block header\n- `sign_verify.rs` — Sign messages and verify ECDSA signatures\n\n## License\n\nThis project is licensed under either of the following licenses, at your option:\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0))\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in `bitcoin-from-scratch` by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitctrlx%2Fbitcoin-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitctrlx%2Fbitcoin-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitctrlx%2Fbitcoin-from-scratch/lists"}