A pure-Python implementation of ECDSA, EdDSA, and ECDH for elliptic curve cryptography.
python-ecdsa is a pure-Python library that implements elliptic curve cryptography, specifically ECDSA for digital signatures, EdDSA for Edwards-curve signatures, and ECDH for key agreement. It solves the need for a portable, dependency-light cryptographic tool for testing, education, and environments where native extensions are impractical.
Developers and researchers needing a pure-Python elliptic curve cryptography library for interoperability testing, educational projects, or environments where C extensions cannot be used.
It offers a straightforward, portable implementation with support for multiple curves and OpenSSL compatibility, without requiring external C libraries, making it uniquely suitable for testing and learning.
pure-python ECDSA signature/verification and ECDH key agreement
Runs without C extensions on standard Python and PyPy, making it ideal for environments where native code is not feasible, as emphasized in the README's focus on interoperability testing and educational purposes.
Includes popular curves like NIST Suite B, Brainpool, Ed25519, Ed448, and Bitcoin's secp256k1, providing flexibility for various cryptographic standards and use cases.
Supports reading and writing keys in PEM/DER formats and can verify signatures from OpenSSL tools, ensuring seamless interoperability with common cryptographic systems, as detailed in the Usage section.
Implements RFC6979 for repeatable, secure signatures without random number generation, enhancing reliability in testing and deterministic protocol scenarios.
The library explicitly warns against use in security-critical applications due to lack of side-channel protection, making it unsuitable for real-world deployments where attackers could exploit timing or power analysis.
As a pure-Python implementation, it is significantly slower than native alternatives like OpenSSL, with speed tables showing performance gaps of up to 100x for some operations, limiting use in high-throughput scenarios.
To achieve better performance, it relies on optional packages like gmpy2, which may not be available in all environments and adds installation complexity, as noted in the Dependencies section.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.