org.bouncycastle.crypto.params

## Class BLSPublicKeyParameters

- java.lang.Object
- - org.bouncycastle.crypto.params.AsymmetricKeyParameter
  - - org.bouncycastle.crypto.params.BLSKeyParameters
    - - org.bouncycastle.crypto.params.BLSPublicKeyParameters

- All Implemented Interfaces:
    CipherParameters

      public class BLSPublicKeyParameters
      extends BLSKeyParameters

  Public-key parameters for a BLS signature scheme. The underlying point lives on the suite-specific G1 curve (BLS12-381 G1 today; further BLS families add curves in the future).

  Constructor invariant. Construction runs the full draft-irtf-cfrg-bls-signature sec. 2.5 `KeyValidate` (on-curve + prime-order subgroup + non-identity) on the supplied point and rejects anything that fails. Callers and downstream consumers can therefore rely on the type itself as the validation boundary — once an instance exists, the point is a valid BLS public key, and verify-time code (e.g. `BLSSigner.verifySignature`) does not need to redo the ~128-bit GLV-shortened subgroup-membership scalar multiplication on every call.

  The validation cost is the same as a single verify call's previous pre-pairing keyValidate step, paid once at construction instead of N times for N verifies under the same key. Callers that deserialize public keys from untrusted bytes typically run `decompressG1` immediately before constructing this object; that decompression does not subgroup check, so the constructor is the place where the prime-order check happens.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BLSPublicKeyParameters(BLSParameters params, ECPoint publicPoint)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getEncoded()`
    `ECPoint` | `getPublicPoint()`

    - ### Methods inherited from class org.bouncycastle.crypto.params.BLSKeyParameters

      `getParameters`

    - ### Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter

      `isPrivate`

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

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

- - ### Constructor Detail

    - #### BLSPublicKeyParameters

          public BLSPublicKeyParameters(BLSParameters params,
                                        ECPoint publicPoint)

  - ### Method Detail

    - #### getPublicPoint

          public ECPoint getPublicPoint()

      Returns:
        the G1 public-key point.

    - #### getEncoded

          public byte[] getEncoded()

      Returns:
        the Zcash-format compressed G1 encoding (48 bytes), matching the `point_to_pubkey` encoding used by Eth2 and IETF draft-irtf-cfrg-bls-signature.