Repository navigation
Crypto12381 v0.2.1 Release
This release improves correctness, standard-library compatibility, pairing-verification performance, automated testing, and build configuration. The public cryptographic group, field, hashing, and pairing interfaces remain unchanged.
Fixed
- Fixed polynomial evaluation so every supplied nonconstant coefficient contributes to the result.
- Fixed hashing of ranges so their elements are hashed in sequence instead of hashing container metadata or object representations.
- Equivalent ranges now hash consistently regardless of container type or storage location.
- Fixed the piped
hash | valuesyntax by removing an undeducible template parameter. - Avoided relying on range-adaptor pipelines to preserve reference return types, working around libstdc++ implementations affected by the behavior discussed in LWG 3981.
- Algebraic range rewrapping now preserves lvalue references while taking ownership of rvalues and removing inappropriate
constqualification from stored rvalue values.
Performance
- Deferred pairing final exponentiation until a concrete GT value is required.
- Pairing products now retain their intermediate results across compatible operations.
- Pairing equations are verified by multiplying one side by the conjugate of the other, performing one final exponentiation, and checking for the GT identity.
- GT inversion uses conjugation where applicable.
- These optimizations preserve the existing public GT interface.
Testing
- Added a Catch2 v3 unit-test suite covering the algebra DSL, chunk ranges, constants, serialization, hashing, random generation, Zp arithmetic and polynomials, G1, G2, GT, pairings, and the MIRACL Core adapter.
- The current suite contains 87 test cases with 459 assertions.
- Unit-test source files are discovered automatically from
unit-tests/*.cpp. - Tests can be built and registered with CTest through the standard
BUILD_TESTINGoption. - Tests can also be built as an ordinary executable with
CRYPTO12381_INCLUDE_TESTS=ON, even when CTest integration is disabled. - The release has been verified on Windows x64 and GNU/Linux AArch64 targets.
Build and distribution
- The library is built as a static library.
- Examples are optional and controlled by
CRYPTO12381_INCLUDE_EXAMPLES. example_psis only built when examples are enabled.- Removed the legacy
algebra_testand smoke-test executables. - Added prebuilt static-library packages for Windows x64 and GNU/Linux AArch64.
Compatibility
The public cryptographic API remains unchanged.
unwrap is now invoked directly as unwrap(range). Code using the previous range | unwrap form must be updated.
Projects that relied on examples being built unconditionally, or directly referenced the removed algebra_test or smoke-test targets, should update their CMake configuration.