Cryptos is a pure Python implementation of major Bitcoin concepts built from scratch for educational purposes. It deliberately avoids external dependencies so readers can inspect how the underlying cryptography and protocol mechanics work. The project implements SHA-256, finite-field elliptic-curve mathematics, Bitcoin key generation, addresses, and ECDSA digital signatures. It can parse and inspect legacy and SegWit transaction structures, although its transaction validation is intentionally incomplete compared with a full Bitcoin node. Block utilities cover headers, proof-of-work validation, and difficulty calculations. A lightweight network client can connect to Bitcoin peers, perform the protocol handshake, and request block headers. The implementation is intentionally slow and should be treated as learning code rather than production cryptocurrency software.
Features
- Pure Python SHA-256 implementation
- Elliptic-curve cryptography primitives
- Bitcoin key and address generation
- ECDSA signing and verification
- Transaction and block parsing
- Lightweight Bitcoin peer networking