Class BCXMSSMTPrivateKey

java.lang.Object
org.bouncycastle.pqc.jcajce.provider.xmss.BCXMSSMTPrivateKey
All Implemented Interfaces:
Serializable, Key, PrivateKey, Destroyable, XMSSMTKey, XMSSMTPrivateKey

public class BCXMSSMTPrivateKey extends Object implements PrivateKey, XMSSMTPrivateKey
See Also:
  • Constructor Details

  • Method Details

    • getIndex

      public long getIndex()
      Description copied from interface: XMSSMTPrivateKey
      Return the index of the next signature.
      Specified by:
      getIndex in interface XMSSMTPrivateKey
      Returns:
      the index number for the next signature.
    • getUsagesRemaining

      public long getUsagesRemaining()
      Description copied from interface: XMSSMTPrivateKey
      Return the number of usages left for the private key.
      Specified by:
      getUsagesRemaining in interface XMSSMTPrivateKey
      Returns:
      the number of times the key can be used before it is exhausted.
    • extractKeyShard

      public XMSSMTPrivateKey extractKeyShard(int usageCount)
      Description copied from interface: XMSSMTPrivateKey
      Return a key representing a shard of the key space that can be used usageCount times.

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

      Specified by:
      extractKeyShard in interface XMSSMTPrivateKey
      Parameters:
      usageCount - the number of usages the key should have.
      Returns:
      a key based on the current key that can be used usageCount times.
    • getAlgorithm

      public String getAlgorithm()
      Specified by:
      getAlgorithm in interface Key
    • getFormat

      public String getFormat()
      Specified by:
      getFormat in interface Key
    • getEncoded

      public byte[] getEncoded()
      Specified by:
      getEncoded in interface Key
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface XMSSMTKey
    • getLayers

      public int getLayers()
      Specified by:
      getLayers in interface XMSSMTKey
    • getTreeDigest

      public String getTreeDigest()
      Specified by:
      getTreeDigest in interface XMSSMTKey