/mcl-python

Python bidings for mcl

Primary LanguagePythonMIT LicenseMIT

mcl-python

mcl-python is a Python library that creates bindings for mcl library by herumi.

Installation

For now mcl-python supports Linux only.

Requirements

  • Preinstalled mcl library

How to install

To install mcl-python clone this repository and use setup.py script

git clone https://github.com/Fadion96/mcl-python.git
cd mcl-python
python3 setup.py install 

And set mcl installation dir to MCL_PATH environment variable

export MCL_PATH=<path_to_mcl>

Usage

import mcl

mcl.mcl_init(mcl.CurveType.MCL_BLS12_381)

sk = mcl.Fr()
sk.set_by_CSPRNG()
print(sk)

License

LICENSE