Gerbil-crypto is collection of cryptographic primitives that complement those included in Gerbil itself (as interfaced from OpenSSL).
Current primitives are sufficient to interface with Ethereum: keccak256 and secp256k1.
More primitives may be added in the future.
Copyright 2020 MuKn Inc All rights reserved. Gerbil-crypto is distributed under the Apache License, version 2.0. See the file LICENSE.
You need to first install the Gerbil Scheme compiler.
Gerbil depends on openssl so you'll have it installed.
Then you must install the Gerbil Clan utilities
and the Gerbil-POO object system,
which gxpkg may automatically download for you.
Finally, you need to install the following libraries:
libsecp256k1: On Debian/Ubuntu, install withapt install libsecp256k1-devlibsodium: On Debian/Ubuntu, install withapt install libsodium-devlibblst: You might have to install withgit clone https://github.com/supranational/blst.git
The nix recipe for gerbil-crypto installs these dependencies automatically.
YMMV on other Linux distributions.
If you need to install the blst library from git, you might proceed as follows:
# Clone the repository
git clone https://github.com/supranational/blst.git
# Build the library
cd blst && ./build.sh
# Copy the library and headers
sudo cp libblst.a /usr/local/lib/ && sudo cp bindings/blst.h bindings/blst_aux.h /usr/local/include/
# Clean up
cd .. && rm -rf blst
# Export paths for the library so GCC can find it, if not already in your environment
# You might want to edit your ~/.bashrc ~/.zshenv or some such to include these:
export C_INCLUDE_PATH=/usr/local/include
export LIBRARY_PATH=/usr/local/lib
Once all dependencies are installed, you may build with:
./build.ss
Test with:
./unit-tests.ss