BLS12_381G2 (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto.bls

## Class BLS12_381G2

- java.lang.Object
- - org.bouncycastle.crypto.bls.BLS12_381G2

-     public class BLS12_381G2
      extends java.lang.Object

  Curve parameters for BLS12-381 G2, the prime-order subgroup of `E(Fp^2)` defined by `y^2 = x^3 + 4 * (1 + I)` over Fp^2.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.math.BigInteger` | `COFACTOR` G2 cofactor.
    `static java.math.BigInteger` | `H_EFF` Effective cofactor for hash-to-curve (RFC 9380 sec. 8.8.2).
    `static java.math.BigInteger` | `ORDER` G2 prime-order subgroup order — identical to G1's, since pairing-friendly curves have G1 and G2 share the same scalar field.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BLS12_381G2Point` | `getGenerator()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ORDER

          public static final java.math.BigInteger ORDER

      G2 prime-order subgroup order — identical to G1's, since pairing-friendly curves have G1 and G2 share the same scalar field.

    - #### COFACTOR

          public static final java.math.BigInteger COFACTOR

      G2 cofactor.

    - #### H_EFF

          public static final java.math.BigInteger H_EFF

      Effective cofactor for hash-to-curve (RFC 9380 sec. 8.8.2). Multiplying any point on E(Fp^2) by h_eff lands in the prime-order subgroup; the value is chosen for compatibility with the Budroni-Pintore optimised cofactor clearing.

  - ### Method Detail

    - #### getGenerator

          public static BLS12_381G2Point getGenerator()

      Returns:
        the standard generator G2 of the prime-order subgroup, as a fresh affine point. The returned point is verified against the curve equation.