org.bouncycastle.crypto.params

## Class BLSPrivateKeyParameters

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

- All Implemented Interfaces:
    CipherParameters

      public class BLSPrivateKeyParameters
      extends BLSKeyParameters

  Private-key parameters for a BLS signature scheme. The underlying secret is an integer in `[1, r - 1]`, where r is the suite's G1 / G2 subgroup order.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BLSPrivateKeyParameters(BLSParameters params, java.math.BigInteger sk)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getEncoded()`
    `java.math.BigInteger` | `getSecret()`

    - ### 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

    - #### BLSPrivateKeyParameters

          public BLSPrivateKeyParameters(BLSParameters params,
                                         java.math.BigInteger sk)

  - ### Method Detail

    - #### getSecret

          public java.math.BigInteger getSecret()

      Returns:
        the BLS secret scalar.

    - #### getEncoded

          public byte[] getEncoded()

      Returns:
        the canonical 32-byte big-endian encoding of the secret scalar, matching the `sk_to_lebytes`/`os2ip` convention used by draft-irtf-cfrg-bls-signature `KeyGen`.