Package org.bouncycastle.pqc.crypto.lms

## Class HSSPrivateKeyParameters

- java.lang.Object
- - org.bouncycastle.crypto.params.AsymmetricKeyParameter
  - - org.bouncycastle.pqc.crypto.lms.LMSKeyParameters
    - - org.bouncycastle.pqc.crypto.lms.HSSPrivateKeyParameters

- All Implemented Interfaces:
    `CipherParameters`, `LMSContextBasedSigner`, `Encodable`

      public class HSSPrivateKeyParameters
      extends LMSKeyParameters
      implements LMSContextBasedSigner

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HSSPrivateKeyParameters​(int l, java.util.List<LMSPrivateKeyParameters> keys, java.util.List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig, long index, long indexLimit)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected java.lang.Object` | `clone()` |
    `boolean` | `equals​(java.lang.Object o)` |
    `HSSPrivateKeyParameters` | `extractKeyShard​(int usageCount)` | Return a key that can be used usageCount times.
    `LMSContext` | `generateLMSContext()` |
    `byte[]` | `generateSignature​(LMSContext context)` |
    `byte[]` | `getEncoded()` | Return a byte array representing the implementing object.
    `long` | `getIndex()` |
    `static HSSPrivateKeyParameters` | `getInstance​(byte[] privEnc, byte[] pubEnc)` |
    `static HSSPrivateKeyParameters` | `getInstance​(java.lang.Object src)` |
    `int` | `getL()` |
    `LMSParameters[]` | `getLMSParameters()` |
    `HSSPublicKeyParameters` | `getPublicKey()` |
    `long` | `getUsagesRemaining()` |
    `int` | `hashCode()` |
    `protected void` | `updateHierarchy​(LMSPrivateKeyParameters[] newKeys, org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig)` |

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

      `isPrivate`

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

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HSSPrivateKeyParameters

          public HSSPrivateKeyParameters​(int l,
                                         java.util.List<LMSPrivateKeyParameters> keys,
                                         java.util.List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig,
                                         long index,
                                         long indexLimit)

  - ### Method Detail

    - #### getInstance

          public static HSSPrivateKeyParameters getInstance​(byte[] privEnc,
                                                            byte[] pubEnc)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getInstance

          public static HSSPrivateKeyParameters getInstance​(java.lang.Object src)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getL

          public int getL()

    - #### getIndex

          public long getIndex()

    - #### getLMSParameters

          public LMSParameters[] getLMSParameters()

    - #### updateHierarchy

          protected void updateHierarchy​(LMSPrivateKeyParameters[] newKeys,
                                         org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig)

    - #### getUsagesRemaining

          public long getUsagesRemaining()

      Specified by:
        `getUsagesRemaining` in interface `LMSContextBasedSigner`

    - #### extractKeyShard

          public HSSPrivateKeyParameters extractKeyShard​(int usageCount)

      Return a key that can be used usageCount times.

      Note: this will use the range [index...index + usageCount) for the current key.

      Parameters:
        `usageCount` - the number of usages the key should have.
      Returns:
        a key based on the current key that can be used usageCount times.

    - #### getPublicKey

          public HSSPublicKeyParameters getPublicKey()

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getEncoded

          public byte[] getEncoded()
                            throws java.io.IOException

      Description copied from interface: `Encodable`
      Return a byte array representing the implementing object.
      Specified by:
        `getEncoded` in interface `Encodable`
      Specified by:
        `getEncoded` in class `LMSKeyParameters`
      Returns:
        a byte array representing the encoding.
      Throws:
        `java.io.IOException` - if an issue arises generation the encoding.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### clone

          protected java.lang.Object clone()
                                    throws java.lang.CloneNotSupportedException

      Overrides:
        `clone` in class `java.lang.Object`
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### generateLMSContext

          public LMSContext generateLMSContext()

      Specified by:
        `generateLMSContext` in interface `LMSContextBasedSigner`

    - #### generateSignature

          public byte[] generateSignature​(LMSContext context)

      Specified by:
        `generateSignature` in interface `LMSContextBasedSigner`