|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.pqc.legacy.crypto.gmss.Treehash
This class implements a treehash instance for the Merkle tree traversal algorithm. The first node of the stack is stored in this instance itself, additional tail nodes are stored on a tailstack.
Constructor Summary | |
Treehash(Digest name,
byte[][] statByte,
int[] statInt)
This constructor regenerates a prior treehash object |
|
Treehash(java.util.Vector tailStack,
int maxHeight,
Digest digest)
Constructor |
Method Summary | |
void |
destroy()
Destroys a treehash instance after the top node was taken for authentication path. |
byte[] |
getFirstNode()
returns the first node stored in treehash instance itself |
int |
getFirstNodeHeight()
Returns the top node height |
int |
getLowestNodeHeight()
Returns the height of the lowest node stored either in treehash or on the stack. |
byte[] |
getSeedActive()
returns the active seed |
byte[][] |
getStatByte()
Returns the status byte array used by the GMSSPrivateKeyASN.1 class |
int[] |
getStatInt()
Returns the status int array used by the GMSSPrivateKeyASN.1 class |
java.util.Vector |
getTailStack()
Returns the tailstack |
void |
initialize()
initializes the treehash instance. |
void |
initializeSeed(byte[] seedIn)
Method to initialize the seeds needed for the precomputation of right nodes. |
void |
setFirstNode(byte[] hash)
This method sets the first node stored in the treehash instance itself |
java.lang.String |
toString()
returns a String representation of the treehash instance |
void |
update(GMSSRandom gmssRandom,
byte[] leaf)
Calculates one update of the treehash instance, i.e. |
void |
updateNextSeed(GMSSRandom gmssRandom)
updates the nextSeed of this treehash instance one step needed for the schedulng of the seeds |
boolean |
wasFinished()
Method to check whether the instance has been finished or not |
boolean |
wasInitialized()
Method to check whether the instance has been initialized or not |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Treehash(Digest name, byte[][] statByte, int[] statInt)
name
- an array of strings, containing the name of the used hash
function and PRNG and the name of the corresponding providerstatByte
- status bytesstatInt
- status intspublic Treehash(java.util.Vector tailStack, int maxHeight, Digest digest)
tailStack
- a vector element where the stack nodes are storedmaxHeight
- maximal height of the treehash instancedigest
- an array of strings, containing the name of the used hash
function and PRNG and the name of the corresponding providerMethod Detail |
public void initializeSeed(byte[] seedIn)
seedIn
- public void initialize()
public void update(GMSSRandom gmssRandom, byte[] leaf)
gmssRandom
- an instance of the PRNGleaf
- The byte value of the leaf needed for the updatepublic void destroy()
public int getLowestNodeHeight()
public int getFirstNodeHeight()
public boolean wasInitialized()
public boolean wasFinished()
public byte[] getFirstNode()
public byte[] getSeedActive()
public void setFirstNode(byte[] hash)
hash
- public void updateNextSeed(GMSSRandom gmssRandom)
gmssRandom
- the prng used for the seedspublic java.util.Vector getTailStack()
public byte[][] getStatByte()
public int[] getStatInt()
public java.lang.String toString()
toString
in class java.lang.Object
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |