Class BDS

java.lang.Object
org.bouncycastle.crypto.signers.xmss.BDS
All Implemented Interfaces:
Serializable

public final class BDS extends Object implements Serializable
BDS.
See Also:
  • Constructor Details

    • BDS

      public BDS(XMSSParameters params, int maxIndex, int index)
      Place holder BDS for when state is exhausted.
      Parameters:
      params - tree parameters
      index - the index that has been reached.
  • Method Details

    • validate

      public void validate(XMSSParameters params)
    • validateRoot

      public void validateRoot(byte[] expectedRoot)
      Confirm the root this state carries is the one the enclosing private key declares. The two are independent copies of the same value in one encoding and always agree on a genuine key, so a disagreement means the stored key has been corrupted. Left unchecked, a corrupted root is accepted and then poisons every signature the key makes - the root is hashed into the message digest, so the signature simply does not verify, with nothing to say why (github #2414).

      A null root on either side is not compared: BDS.validate tolerates an absent root node, and a key built without one carries zeros.

      Parameters:
      expectedRoot - the root the private key declares.
    • validate

      public void validate(XMSSParameters params, int expectedIndex)
    • getIndex

      public int getIndex()
    • getMaxIndex

      public int getMaxIndex()
    • withWOTSDigest

      public BDS withWOTSDigest(ASN1ObjectIdentifier digestName)
    • withWOTSDigest

      public BDS withWOTSDigest(ASN1ObjectIdentifier digestName, int digestSize)
    • withMaxIndex

      public BDS withMaxIndex(int maxIndex, ASN1ObjectIdentifier digestName)
    • withMaxIndex

      public BDS withMaxIndex(int maxIndex, ASN1ObjectIdentifier digestName, int digestSize)