py_arkworks_bls12381
Python bindings for BLS12-381 curve operations using arkworks
What it is and what it does
py_arkworks_bls12381 wraps the Rust arkworks algebra library to provide Python access to BLS12-381 elliptic curve operations. It exposes G1 and G2 point types with arithmetic (addition, subtraction, scalar multiplication), identity and generator elements, subgroup checks, and multi-scalar multiplication. The library also supports point serialization in compressed and uncompressed formats with both big-endian and little-endian byte order variants, plus unchecked variants that skip subgroup validation for trusted inputs.
The package includes pairing operations—both single and multi-pairing with optimized final exponentiation—and pairing checks for cryptographic proofs. It provides map-to-curve functions for hashing to G1 and G2 using SWU mapping with cofactor clearing. Scalar types support arithmetic, division, exponentiation, and inversion. The primary use case is generating test vectors for EIP4844 in Ethereum consensus-specs, though the generic design supports other BLS12-381 applications.
Use it for:
- Generate EIP4844 test vectors for Ethereum consensus layer specifications.
- Implement BLS signature schemes or threshold cryptography in Python applications.
- Perform elliptic curve pairing checks and bilinear map operations for zero-knowledge proofs.
- Serialize and deserialize BLS12-381 curve points in cryptographic protocols.
- Hash arbitrary data to elliptic curve points using map-to-curve functions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python bindings for BLS12-381 elliptic curve cryptography operations, enabling G1/G2 point arithmetic, pairing, serialization, and scalar operations via Rust's arkworks library.
Yes, if you need BLS12-381 operations in Python and are targeting Python 3.11+. The package is actively maintained, has no known vulnerabilities, and offers comprehensive curve operations with good platform coverage via prebuilt wheels. Install friction is moderate but manageable; the dual MIT/Apache-2.0 license is permissive. Verify suitability for your specific cryptographic use case beyond EIP4844 test generation.
Install
py-arkworks-bls12381 on PyPI
pip
pip install py-arkworks-bls12381uv
uv add py-arkworks-bls12381poetry
poetry add py-arkworks-bls12381Installing py_arkworks_bls12381
Before you install
Medium install friction due to compiled Rust bindings; prebuilt wheels cover Python 3.11–3.14 across Linux, macOS, and Windows architectures. Repository is active with recent commits and no known vulnerabilities.
License in practice
Dual-licensed under MIT OR Apache-2.0, both permissive; you may choose either license when using or distributing this package.
Quickstart
pip install py_arkworks_bls12381
from py_arkworks_bls12381 import G1Point, G2Point, Scalar
gen = G1Point()
scalar = Scalar(4)
result = gen * scalar
Requires Python >= 3.11; compiled wheels available for common platforms but may require a Rust toolchain if building from source.
Verify before relying
- Performance characteristics and benchmarks for pairing and multi-scalar multiplication operations.
- Stability guarantees and API compatibility policy across minor versions.
- Whether the library is suitable for production cryptographic use beyond EIP4844 test vectors.
Package facts
| License | MIT OR Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 52 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,839/month — #13,896 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_arkworks_bls12381-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-macosx_11_0_arm64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-musllinux_1_2_aarch64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-musllinux_1_2_armv7l.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-musllinux_1_2_i686.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-win32.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-win_amd64.whl; py_arkworks_bls12381-0.5.0-cp311-cp311-win_arm64.whl; py_arkworks_bls12381-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl; py_arkworks_bls12381-0.5.0-cp312-cp312-macosx_11_0_arm64.whl; py_arkworks_bls12381-0.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; py_arkworks_bls12381-0.5.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; py_arkworks_bls12381-0.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
py-eccImplements elliptic curve cryptography…
permissive · top 5,000 on PyPI
x25519Provides pure Python implementations of…
permissive · top 15,000 on PyPI
lighteccLightECC provides elliptic curve arithmetic…
permissive · top 15,000 on PyPI
coincurvecoincurve provides Python bindings to…
permissive · top 5,000 on PyPI
diffiehellmanlibGenerates Diffie-Hellman key exchange…
permissive · top 15,000 on PyPI
eciespyEncrypts and decrypts data using Elliptic Curve…
permissive · top 15,000 on PyPI
lightpheLightPHE provides a Python library implementing…
permissive · top 15,000 on PyPI
ECPyECPy is a pure Python elliptic curve library…
permissive · top 15,000 on PyPI
delta-kernel-rust-sharing-wrapperProvides Python bindings to the Rust-based…
permissive · top 5,000 on PyPI
chia-rsProvides Python bindings to Rust crates for…
unclear · top 15,000 on PyPI