Skip to content

Releases

Crypto12381 v0.2.1

Choose a tag to compare

@Adttil Adttil released this 20 Aug 08:46

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 | value syntax 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 const qualification 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_TESTING option.
  • 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_ps is only built when examples are enabled.
  • Removed the legacy algebra_test and 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.

Crypto12381 v0.2.0

Choose a tag to compare

@Adttil Adttil released this 09 Aug 20:03

Added

  • Added parse<GT> support for deserializing serialized target-group elements.
  • Added a Shamir Secret Sharing example covering share generation and Lagrange-based reconstruction.
  • Added a complete MHAC-BBS example covering threshold issuance with public and private attributes, credential presentation, verification, and reusable precomputation for participant sets and presentation types.
  • Added AC-BBS, AC-RBBS, and AC-RPS examples covering issuance, selective disclosure or redaction, presentation, and verification.

Changed

  • Refactored and generalized the existing range-based algebra DSL into algebra.hpp, adding named symbols, partial substitution, symbolic invocations, runtime-sized random selections, and composable algebraic range adaptors.
  • Moved MIRACL Core usage behind an internal adapter so public crypto12381 headers no longer include MIRACL Core headers or require its include directories.
  • Updated the MHAC-BBS example so complete private attributes are not retained; only the required private-attribute shares are stored.
  • Updated the AC-RPS example to follow the corrected protocol, including user key generation and binding issued signatures to user public keys.

Fixed

  • Fixed partially substituted algebraic expressions being evaluated before all remaining symbols were supplied.
  • Corrected Zp limb masking, range propagation, carry handling, multiplication safety checks, negation, accumulation, reduction, and serialization-time normalization.
  • G1 and G2 deserialization now checks MIRACL Core's return status and throws when a non-identity point encoding is invalid.
  • Added round-trip serialization support for G1 and G2 identity elements using the library's zero-filled representation.
  • Fixed the omitted G1 public-key slot in the AC-RBBS example so every eagerly deserialized slot contains a valid group element.

Breaking Changes

  • RandomEngine is now non-copyable, and its constructor is no longer declared noexcept.
  • crypto12381/ranges.hpp has been replaced by crypto12381/algebra.hpp. Code that directly included the former header or depended on its concrete range wrapper types must be updated.

Crypto12381 v0.1.1

Choose a tag to compare

@Adttil Adttil released this 03 Dec 04:50
  1. More aligned with the functional programming paradigm.
  2. Added more support for range operations, such as summation of sequences, product of sequences, and hashing of sequences.
  3. Add cartesian product for groups.
  4. Fix bugs in prev release.

Crypto12381 v0.1.0

Choose a tag to compare

@Adttil Adttil released this 14 Nov 12:52

first release.