public class GMSSRootCalc
extends java.lang.Object
Constructor and Description |
---|
GMSSRootCalc(Digest digest,
byte[][] statByte,
int[] statInt,
Treehash[] treeH,
java.util.Vector[] ret)
This constructor regenerates a prior treehash object
|
GMSSRootCalc(int heightOfTree,
int K,
GMSSDigestProvider digestProvider)
Constructor
|
Modifier and Type | Method and Description |
---|---|
byte[][] |
getAuthPath()
returns the authentication path of the first leaf of the tree
|
java.util.Vector[] |
getRetain()
returns the retain stacks storing all right nodes near to the root
|
byte[] |
getRoot()
returns the finished root value
|
java.util.Vector |
getStack()
returns the shared stack
|
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
|
Treehash[] |
getTreehash()
returns the initial treehash instances, storing value y_3(i)
|
void |
initialize(java.util.Vector sharedStack)
Initializes the calculation of a new root
|
void |
initializeTreehashSeed(byte[] seed,
int index)
initializes the seeds for the treehashs of the tree precomputed by this
class
|
java.lang.String |
toString() |
void |
update(byte[] leaf)
Updates the root with one leaf and stores the needed values in retain,
treehash or authpath
|
void |
update(byte[] seed,
byte[] leaf)
updates the root with one leaf and stores needed values in retain,
treehash or authpath.
|
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
|
public GMSSRootCalc(Digest digest, byte[][] statByte, int[] statInt, Treehash[] treeH, java.util.Vector[] ret)
digest
- an array of strings, containing the digest of the used hash
function and PRNG and the digest of the corresponding
providerstatByte
- status bytesstatInt
- status intspublic GMSSRootCalc(int heightOfTree, int K, GMSSDigestProvider digestProvider)
heightOfTree
- maximal height of the treedigestProvider
- an array of strings, containing the name of the used hash
function and PRNG and the name of the corresponding
providerpublic void initialize(java.util.Vector sharedStack)
sharedStack
- the stack shared by all treehash instances of this treepublic void update(byte[] seed, byte[] leaf)
seed
- the initial seed for treehash: seedNextleaf
- the height of the treehashpublic void update(byte[] leaf)
public void initializeTreehashSeed(byte[] seed, int index)
seed
- the initial seed for treehash: seedNextindex
- the height of the treehashpublic boolean wasInitialized()
public boolean wasFinished()
public byte[][] getAuthPath()
public Treehash[] getTreehash()
public java.util.Vector[] getRetain()
public byte[] getRoot()
public java.util.Vector getStack()
public byte[][] getStatByte()
public int[] getStatInt()
public java.lang.String toString()
toString
in class java.lang.Object