blob: 8471abaa41121c409749f67479c302abdad77788 [file] [log] [blame]
This Python version of the library is ideal for beginners, or for people
interested in quickly putting together a "proof of concept" implementation
that requires Elliptic curve or pairing based cryptography.
Note this Python version is NOT for serious production use. Since the
handling of big numbers is outside of our control, side-channel attacks
cannot be prevented, so we have not even attempted to make this version
side-channel secure. Also since Python will never be fast, no extreme attempts
at optimization have been made, and some optimizations which result in larger
code size have been omitted. Once the Proof of Concept has been established,
the programmer should switch to one of the other supported languages.
Some limitations: RSA is not currently supported. Also larger pairing-friendly
curves like BLS24 and BLS48 are not supported. The curves files are not
currently automatically generated by the romgen utility.
Curve parameters are provided in individual files like ed25519.py and
bn254.py. It is a simple matter to support more curves.
This Python version is very small, accessible, and easy to use.
--------------------------------------
To see it in action, copy all of the files in this directory to a fresh directory.
Then execute the python3 script config.py and select the curves that you wish
to support. (On Linux use python3 instead of py).
py config.py
Select options 1 and 8, which are fixed for the example program. Select 0
to exit.
Then run the test program
py test.py
or
python3 test.py
Elliptic curve key exchange, signature and encryption (ECDH, ECDSA and ECCSI) will be tested.
Also MPIN and BLS (Boneh-Lynn-Shacham) signature (using pairings)