Barreto-Naehrig curve implementation and BLS
Your system needs have installed first llvm, g++, gmp and openssl{-dev}. On Ubuntu:
sudo apt install llvm g++ libgmp-dev libssl-dev
To install from source, you can run the following commands:
git clone https://github.com/dfinity/bn
cd bn
make
make install
The library is then installed under /usr/local/
.
In order to use it as a library for any project (see go-dfinity-crypto for example), your loader must be aware of this location. There are two common solutions:
- To use it for the current session:
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
- To use it permanently, add
/usr/local/lib
to/etc/ld.so.conf
, then runldconfig
as root
If you wish to change the path where the libraries are installed, you can use:
make install PREFIX=/my/custom/path
Prebuilt libraries are available for select platforms.
You may need to place the libraries in the correct path as explained in the above section.
All code and designs are open sourced under GPL V3.