de.flexiprovider.pqc.hbc.cmss
Class Treehash
java.lang.Object
|
+--de.flexiprovider.pqc.hbc.cmss.Treehash
- class Treehash
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Treehash
public Treehash(Stack stack,
codec.asn1.ASN1Sequence treehashData)
Treehash
public Treehash(Stack stack,
int targetHeight)
initialize
public void initialize(byte[] seed)
update
public void update(PRNG prng,
OTS ots,
MessageDigest md,
NodeCalc pc)
storeNode
public void storeNode(Node newNode)
getNode
public Node getNode()
getHeight
public int getHeight()
copy
public void copy(Treehash otherTreehash)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- a human readable form of the treehash instance
getASN1
public codec.asn1.ASN1Sequence getASN1()
- Return the data to encode the treehash instance in SubjectPublicKeyInfo
structure.
The ASN.1 definition of treehash
TREEHASH ::= SEQUENCE {
node NODE -- node stored by this instance
seed OCTET STRING -- seed to compute next leaf
currentHeight INTEGER -- height of lowest tailnode stored by this instance
targetHeight INTEGER -- height of authentication node computed by this instance
nodesOnStack INTEGER -- number of nodes stored on stack by this instance
}
NODE ::= SEQUENCE {
value OCTET STRING -- node value
height INTEGER -- height of node in tree
}
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure