A high-performance BLS12-381 cryptography library for .NET, developed and maintained by the Neo Project.
It provides fast and secure pairing-based cryptography for blockchain, distributed systems, and cryptographic research.
Neo.Cryptography.BLS12_381 implements the BLS12-381 elliptic curve in pure C#.
It offers full support for pairing operations, group arithmetic (G1/G2), and BLS signature schemes — enabling use cases like aggregated signatures, threshold signatures, and multi-party consensus validation.
This library powers Neo’s blockchain cryptographic layer and can also be used as a general-purpose .NET cryptography component.
- Full implementation of the BLS12-381 curve over a prime field
- Fast and constant-time pairing computation (Miller loop + final exponentiation)
- Complete G1 / G2 curve arithmetic with serialization and compression
- BLS signature generation, verification, and aggregation
- Cross-platform (.NET 6+, Windows / Linux / macOS)
- Comprehensive unit tests and performance benchmarks
src/
└── Neo.Cryptography.BLS12_381/ # Core library implementation
tests/
└── Neo.Cryptography.BLS12_381.Tests/ # Unit and integration tests
- The library is designed with constant-time primitives where applicable.
- Always use cryptographic randomness (
RandomNumberGenerator.Create()) for key generation. - Review and audit before using in production-critical systems.
Contributions are welcome! Please open an issue or pull request following the Neo contribution guidelines.
This project is released under the MIT License. See LICENSE.txt for details.