de.flexiprovider.pqc.hbc.gmss
Class GMSSLeaf

java.lang.Object
  |
  +--de.flexiprovider.pqc.hbc.gmss.GMSSLeaf

public class GMSSLeaf
extends java.lang.Object

This class implements the distributed computation of the public key of the Winternitz one-time signature scheme (OTSS). The class is used by the GMSS classes for calculation of upcoming leafs.

Author:
Sebastian Blume, Michael Schneider

Field Summary
(package private)  byte[] privateKeyOTS
          the OTS privateKey parts
 
Constructor Summary
GMSSLeaf(java.lang.String[] name, byte[][] statByte, int[] statInt)
          This constructor regenerates a prior GMSSLeaf object
GMSSLeaf(java.lang.String[] name, int w, int numLeafs)
          The constructor precomputes some needed variables for ditributed leaf calculation
 
Method Summary
 byte[] getLeaf()
          Returns the leaf value.
 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
 void initLeafCalc(byte[] seed0)
          initialize the distributed leaf calculation reset i,j and compute OTSseed with seed0
 java.lang.String toString()
          Returns a String representation of the main part of this element
 boolean updateLeafCalc()
          Processes steps steps of distributed leaf calculation
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

privateKeyOTS

byte[] privateKeyOTS
the OTS privateKey parts
Constructor Detail

GMSSLeaf

public GMSSLeaf(java.lang.String[] name,
                byte[][] statByte,
                int[] statInt)
This constructor regenerates a prior GMSSLeaf object
Parameters:
name - an array of strings, containing the name of the used hash function and PRNG and the name of the corresponding provider
statByte - status bytes
statInt - status ints

GMSSLeaf

public GMSSLeaf(java.lang.String[] name,
                int w,
                int numLeafs)
The constructor precomputes some needed variables for ditributed leaf calculation
Parameters:
name - an array of strings, containing the name of the used hash function and PRNG and the name of the corresponding provider
w - the winterniz parameter of that tree the leaf is computed for
numLeafs - the number of leafs of the tree from where the distributed computation is called
Method Detail

initLeafCalc

public void initLeafCalc(byte[] seed0)
initialize the distributed leaf calculation reset i,j and compute OTSseed with seed0
Parameters:
seed0 - the starting seed

updateLeafCalc

public boolean updateLeafCalc()
Processes steps steps of distributed leaf calculation
Returns:
true if leaf is completed, else false

getLeaf

public byte[] getLeaf()
Returns the leaf value.
Returns:
the leaf value

getStatByte

public byte[][] getStatByte()
Returns the status byte array used by the GMSSPrivateKeyASN.1 class
Returns:
The status bytes

getStatInt

public int[] getStatInt()
Returns the status int array used by the GMSSPrivateKeyASN.1 class
Returns:
The status ints

toString

public java.lang.String toString()
Returns a String representation of the main part of this element
Overrides:
toString in class java.lang.Object
Returns:
a String representation of the main part of this element