--- id: py-arkworks-bls12381 version: "0.5.0" license: MIT OR Apache-2.0 license_treatment: permissive maintenance: active --- # py_arkworks_bls12381 — Python bindings for BLS12-381 curve operations using arkworks License: permissive · Maintenance: active · Downloads: 85.8K/mo ## 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 above — 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 pip install py-arkworks-bls12381 uv add py-arkworks-bls12381 poetry add py-arkworks-bls12381 ## Installing 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_current - Install friction: medium - Maintenance: active - Downloads: 85.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bls12-381 python bindings, elliptic curve cryptography, pairing operations, eip4844 test vectors, g1 g2 point arithmetic, cryptographic curve operations, arkworks rust bindings, elliptic-curves, bls12-381, cryptography [View on SkillFed](https://skillfed.io/packages/py-arkworks-bls12381) · [View on PyPI](https://pypi.org/project/py-arkworks-bls12381/)