Skip to content

Python implementation of elliptic curve cryptography

License

Notifications You must be signed in to change notification settings

netesf13d/py-ecc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-ecc

Python implementation of elliptic curve cryptography primitives, elliptic curve algebra, and some cryptanalysis algorithms. It is intended for educational purposes, and the implementation aims to expose as much as possible the components to experiment with them. The jupyter notebook ecc_examples.ipynb illustrates the use of the package.

Overview

The package provides:

  • Elliptic curve cryptography algorithms
    • Elliptic Curve Digital Signature Algorithm (ECDSA)
    • Edwards Curve Digital Signature Algorithm (EdDSA)
    • Elliptic Curve Diffie-Hellman (ECDH) key exchange
  • Elliptic curve algebra with different forms of curves
    • Weierstrass curves (the canonical form)
    • Montgomery curves
    • (twisted) Edwards curves
  • Some cryptanalysis algorithms
    • Attacks on the discrete logarithm problem
    • Partially known nonces attack on ECDSA

However, this package does NOT provide:

  • A fast and secure implementation of the algorithms and elliptic curve algebra.
  • Support for elliptic curves over finite fields $\mathrm{F}_q$ with non-prime $q$ (eg $q = 2^m$).
  • Random key generation for the various protocols.

Dependencies

Apart from the cryptanalysis module, the package uses only the standard library. Third party packages are necessary to run cryptanalysis algoritms:

Notes

The typing annotations in the code are by no means rigorous. They are made to facilitate the understanding of the nature of various parameters.

References

About

Python implementation of elliptic curve cryptography

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published