BLS12-381 elliptic-curve and pairing operations for Motoko, including the operations required by Ethereum's EIP-2537 precompile interface.
Warning
This package has not received an independent cryptographic security audit. Review it carefully before using it to protect production assets or consensus-critical state.
After the first Mops release is published:
mops add bls12-381import BLS "mo:bls12-381";The public API is exported by src/lib.mo. It includes field-tower arithmetic, G1 and G2 point operations, encoding and decoding, hash-to-curve helpers, multi-scalar multiplication, and pairing checks.
The package targets moc 1.8.2 and uses mo:core exclusively; it has no mo:base dependency.
mops install
dfx build --check bls_test
npm ci
npm test -- --runInBand
mops benchThe randomized pairing/MSM suite is computationally expensive and should run in release CI with a generous timeout. Saved .bench/ results provide the checked-in pre-Core performance baseline.
The implementation was developed for ICDevs and is licensed under Apache-2.0. Constants and algorithm structure were checked against @noble/curves; its MIT attribution is recorded in THIRD_PARTY_LICENSES.md. Ethereum EIP-2537 defines the externally compatible operation set.
Releases require a clean dependency installation, dfx build --check bls_test, the deterministic and randomized Noble-reference suites, and an EVM downstream build/test checkpoint.