Skip to content

nchain-innovation/elliptic_curves_package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elliptic_curves

Python library with implementations of:

  • Finite fields (prime fields: PrimeField, quadratic extensions: QuadraticExtension, and cubic extensions: CubicExtension)
  • Elliptic curves in Short-Weierstrass form: ShortWeierstrassEllipticCurve
  • Bilinear pairings: BilinearPairingCurve

The structure of the library follows in part that of the Arkworks library.

Instantiations currently implemented:

The library currently contains instantiations of the following curves:

  • BLS12_381
  • MNT4_753

Installation.

To install the elliptic_curves package in the system python directory, please run the command below.

pip install -e .

To install in the python virtual environment

export VIRTUAL_ENV=<SOME PATH>
python -m venv $VIRTUAL_ENV
source $VIRTUAL_ENV/bin/activate

pip3 install -e . 

Execute the tests in the system environment

cd tests/instantiations/bls13_381
python bls12_381_test.py

cd tests/instantiations/mnt4_753
python mnt4_753_test.py

Execute the tests in the python virtual environment

cd tests/instantiations/bls13_381
python3 bls12_381_test.py

cd tests/instantiations/mnt4_753
python3 mnt4_753_test.py

Disclaimer

The code and resources within this repository are intended for research and educational purposes only. Please note:

  • No guarantees are provided regarding the security or the performance of the code.
  • Users are responsible for validating the code and understanding its implications before using it in any capacity.
  • There may be edge cases causing bugs or unexpected behaviours. Please contact us if you find any bug.

LICENSE

The code in the current repository is licensed under the MIT license.

About

A python library for elliptic curves.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages