Class BDS
java.lang.Object
org.bouncycastle.crypto.signers.xmss.BDS
- All Implemented Interfaces:
Serializable
-
Constructor Summary
ConstructorsConstructorDescriptionBDS(XMSSParameters params, int maxIndex, int index) Place holder BDS for when state is exhausted. -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()intvoidvalidate(XMSSParameters params) voidvalidate(XMSSParameters params, int expectedIndex) voidvalidateRoot(byte[] expectedRoot) Confirm the root this state carries is the one the enclosing private key declares.withMaxIndex(int maxIndex, ASN1ObjectIdentifier digestName) withMaxIndex(int maxIndex, ASN1ObjectIdentifier digestName, int digestSize) withWOTSDigest(ASN1ObjectIdentifier digestName) withWOTSDigest(ASN1ObjectIdentifier digestName, int digestSize)
-
Constructor Details
-
BDS
Place holder BDS for when state is exhausted.- Parameters:
params- tree parametersindex- the index that has been reached.
-
-
Method Details
-
validate
-
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
-
getIndex
public int getIndex() -
getMaxIndex
public int getMaxIndex() -
withWOTSDigest
-
withWOTSDigest
-
withMaxIndex
-
withMaxIndex
-