GMSSKeyPairGenerator (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.pqc.crypto.gmss

## Class GMSSKeyPairGenerator

- java.lang.Object
- - org.bouncycastle.pqc.crypto.gmss.GMSSKeyPairGenerator

- All Implemented Interfaces:
    AsymmetricCipherKeyPairGenerator

      public class GMSSKeyPairGenerator
      extends java.lang.Object
      implements AsymmetricCipherKeyPairGenerator

  This class implements key pair generation of the generalized Merkle signature scheme (GMSS).
  See Also:
    `GMSSSigner`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `OID` The GMSS OID.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GMSSKeyPairGenerator(GMSSDigestProvider digestProvider)` The standard constructor tries to generate the GMSS algorithm identifier with the corresponding OID.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsymmetricCipherKeyPair` | `generateKeyPair()` return an AsymmetricCipherKeyPair containing the generated keys.
    `void` | `init(KeyGenerationParameters param)` intialise the key pair generator.
    `void` | `initialize(int keySize, java.security.SecureRandom secureRandom)` This method initializes the GMSS KeyPairGenerator using an integer value `keySize` as input.
    `void` | `initialize(KeyGenerationParameters param)` Initalizes the key pair generator using a parameter set as input

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

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

- - ### Field Detail

    - #### OID

          public static final java.lang.String OID

      The GMSS OID.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### GMSSKeyPairGenerator

          public GMSSKeyPairGenerator(GMSSDigestProvider digestProvider)

      The standard constructor tries to generate the GMSS algorithm identifier with the corresponding OID.
      Parameters:
        `digestProvider` - provider for digest implementations.

  - ### Method Detail

    - #### initialize

          public void initialize(int keySize,
                        java.security.SecureRandom secureRandom)

      This method initializes the GMSS KeyPairGenerator using an integer value `keySize` as input. It provides a simple use of the GMSS for testing demands.

      A given `keysize` of less than 10 creates an amount 2^10 signatures. A keySize between 10 and 20 creates 2^20 signatures. Given an integer greater than 20 the key pair generator creates 2^40 signatures.

      Parameters:
        `keySize` - Assigns the parameters used for the GMSS signatures. There are 3 choices:
        1. keysize <= 10: creates 2^10 signatures using the parameterset
        P = (2, (5, 5), (3, 3), (3, 3))
        2. keysize > 10 and <= 20: creates 2^20 signatures using the parameterset
        P = (2, (10, 10), (5, 4), (2, 2))
        3. keysize > 20: creates 2^40 signatures using the parameterset
        P = (2, (10, 10, 10, 10), (9, 9, 9, 3), (2, 2, 2, 2))
        `secureRandom` - not used by GMSS, the SHA1PRNG of the SUN Provider is always used

    - #### initialize

          public void initialize(KeyGenerationParameters param)

      Initalizes the key pair generator using a parameter set as input

    - #### init

          public void init(KeyGenerationParameters param)

      Description copied from interface: `AsymmetricCipherKeyPairGenerator`
      intialise the key pair generator.
      Specified by:
        `init` in interface `AsymmetricCipherKeyPairGenerator`
      Parameters:
        `param` - the parameters the key pair is to be initialised with.

    - #### generateKeyPair

          public AsymmetricCipherKeyPair generateKeyPair()

      Description copied from interface: `AsymmetricCipherKeyPairGenerator`
      return an AsymmetricCipherKeyPair containing the generated keys.
      Specified by:
        `generateKeyPair` in interface `AsymmetricCipherKeyPairGenerator`
      Returns:
        an AsymmetricCipherKeyPair containing the generated keys.