|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.pqc.legacy.crypto.gmss.GMSSRootCalc
This class computes a whole Merkle tree and saves the needed values for AuthPath computation. It is used for precomputation of the root of a following tree. After initialization, 2^H updates are required to complete the root. Every update requires one leaf value as parameter. While computing the root all initial values for the authentication path algorithm (treehash, auth, retain) are stored for later use.
Constructor Summary | |
GMSSRootCalc(int heightOfTree,
int K,
GMSSDigestProvider digestProvider)
Constructor |
Method Summary | |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public 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
providerMethod Detail |
public 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()
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |