org.bouncycastle.crypto.params

## Class ECCSIKeyGenerationParameters

- java.lang.Object
- - org.bouncycastle.crypto.KeyGenerationParameters
  - - org.bouncycastle.crypto.params.ECCSIKeyGenerationParameters

-     public class ECCSIKeyGenerationParameters
      extends KeyGenerationParameters

  Parameters for ECCSI key generation.

  This class encapsulates the parameters required for ECCSI (Elliptic Curve Certificateless Signatures for Identity-based encryption) key generation. It holds the elliptic curve domain parameters and computes the key pair components used in ECCSI.

  The secret component `ksak` is generated randomly and reduced modulo `q`, while `kpak` is derived from `ksak` by multiplying the generator point.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECCSIKeyGenerationParameters(java.security.SecureRandom random, X9ECParameters params, Digest digest, byte[] id)` Constructs an instance of `ECCSIKeyGenerationParameters` with the specified source of randomness, elliptic curve parameters, digest algorithm, and identifier.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.math.BigInteger` | `computeSSK(java.math.BigInteger hs_v)` Computes the session secret key (SSK) by adding the provided value to the secret key component and reducing modulo the curve order.
    `Digest` | `getDigest()` Returns the digest algorithm used for key generation.
    `ECPoint` | `getG()` Returns the generator (base point) of the elliptic curve.
    `byte[]` | `getId()` Returns a copy of the identifier used in these parameters.
    `ECPoint` | `getKPAK()` Returns the public key component (kpak) corresponding to the secret key.
    `int` | `getN()` Returns the bit length used in key generation.
    `java.math.BigInteger` | `getQ()` Returns the order of the elliptic curve.

    - ### Methods inherited from class org.bouncycastle.crypto.KeyGenerationParameters

      `getRandom, getStrength`

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

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

- - ### Constructor Detail

    - #### ECCSIKeyGenerationParameters

          public ECCSIKeyGenerationParameters(java.security.SecureRandom random,
                                              X9ECParameters params,
                                              Digest digest,
                                              byte[] id)

      Constructs an instance of `ECCSIKeyGenerationParameters` with the specified source of randomness, elliptic curve parameters, digest algorithm, and identifier.
      Parameters:
        `random` - the source of randomness.
        `params` - the elliptic curve parameters (in X9.62 format) providing the curve, order, and generator.
        `digest` - the digest algorithm to be used.
        `id` - the identifier associated with the key generation (e.g. a user or device ID).

  - ### Method Detail

    - #### getId

          public byte[] getId()

      Returns a copy of the identifier used in these parameters.
      Returns:
        a byte array containing the identifier.

    - #### getKPAK

          public ECPoint getKPAK()

      Returns the public key component (kpak) corresponding to the secret key.
      Returns:
        the public key point.

    - #### computeSSK

          public java.math.BigInteger computeSSK(java.math.BigInteger hs_v)

      Computes the session secret key (SSK) by adding the provided value to the secret key component and reducing modulo the curve order.
      Parameters:
        `hs_v` - a BigInteger value (typically derived from a hash) to be added to the secret.
      Returns:
        the computed session secret key.

    - #### getQ

          public java.math.BigInteger getQ()

      Returns the order of the elliptic curve.
      Returns:
        the curve order.

    - #### getG

          public ECPoint getG()

      Returns the generator (base point) of the elliptic curve.
      Returns:
        the generator point.

    - #### getDigest

          public Digest getDigest()

      Returns the digest algorithm used for key generation.
      Returns:
        the digest.

    - #### getN

          public int getN()

      Returns the bit length used in key generation.
      Returns:
        the bit length.