This project requires several external cryptographic libraries for full EVM precompile support.
Status: Installed and integrated
OpenSSL is used for secp256r1 (P-256) signature verification.
Installation (macOS):
brew install openssl@3Installation (Linux):
sudo apt-get install libssl-dev # Debian/Ubuntu
sudo yum install openssl-devel # RHEL/CentOSStatus: Needs installation
blst is a high-performance BLS12-381 signature library used for:
- BLS12-381 precompiles (G1 Add, G1 MSM, G2 Add, G2 MSM, Pairing, MapFpToG1, MapFp2ToG2)
- KZG point evaluation precompile
Installation:
# Clone the repository
git clone https://github.com/supranational/blst.git
cd blst
# Build the library
make
# Install (optional, or use from build directory)
sudo make install
# Or set BLST_DIR environment variable to point to the blst directoryEnvironment Variable:
export BLST_DIR=/path/to/blstStatus: Needs installation
mcl is a portable pairing-based cryptography library used for:
- BN254 precompiles (Add, Mul, Pairing)
Installation:
# Clone the repository
git clone https://github.com/herumi/mcl.git
cd mcl
# Build the library
make -j4
# Install (optional, or use from build directory)
sudo make install
# Or set MCL_DIR environment variable to point to the mcl directoryEnvironment Variable:
export MCL_DIR=/path/to/mclStatus: Optional alternative to blst for KZG
c-kzg is a C implementation of KZG commitments.
Installation:
# Clone the repository
git clone https://github.com/ethereum/c-kzg.git
cd c-kzg
# Build the library
make
# Install (optional)
sudo make install
# Or set CKZG_DIR environment variableEnvironment Variable:
export CKZG_DIR=/path/to/c-kzgThe build system (build.zig) will automatically link against these libraries if they are:
- Installed system-wide (via
make install) - Available via
pkg-config - Set via environment variables (BLST_DIR, MCL_DIR, CKZG_DIR)
- ✅ OpenSSL: Fully integrated and working
⚠️ blst: Bindings created, needs library installation⚠️ mcl: Bindings created, needs library installation⚠️ c-kzg: Optional, bindings can be added if needed
After installing the libraries, run:
zig buildIf libraries are not found, the precompiles will use placeholder implementations that return errors for invalid inputs but won't perform actual cryptographic operations.