Class GMSSRootSig
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.gmss.GMSSRootSig
This class implements the distributed signature generation of the Winternitz
one-time signature scheme (OTSS), described in C.Dods, N.P. Smart, and M.
Stam, "Hash Based Digital Signature Schemes", LNCS 3796, pages 96–115,
2005. The class is used by the GMSS classes.
-
Constructor Summary
ConstructorsConstructorDescriptionGMSSRootSig(Digest digest, byte[][] statByte, int[] statInt) This constructor regenerates a prior GMSSRootSig object used by the GMSSPrivateKeyASN.1 classGMSSRootSig(Digest digest, int w, int height) The constructor generates the PRNG and initializes some variables -
Method Summary
Modifier and TypeMethodDescriptionintgetLog(int intValue) This method returns the least integer that is greater or equal to the logarithm to the base 2 of an integerintValue.byte[]getSig()byte[][]This method returns the status byte arrayint[]This method returns the status int arraybyte[]Converts the long parameters into byte arrays to store it in statByte-ArrayvoidinitSign(byte[] seed0, byte[] message) This method initializes the distributed sigature calculation.toString()returns a string representation of the instancebooleanThis Method performsstepssteps of distributed signature calculaion
-
Constructor Details
-
GMSSRootSig
This constructor regenerates a prior GMSSRootSig object used by the GMSSPrivateKeyASN.1 class- Parameters:
digest- an array of strings, containing the digest of the used hash function, the digest of the PRGN and the names of the corresponding providersstatByte- status byte arraystatInt- status int array
-
GMSSRootSig
The constructor generates the PRNG and initializes some variables- Parameters:
digest- an array of strings, containing the digest of the used hash function, the digest of the PRGN and the names of the corresponding providersw- the winternitz parameterheight- the heigth of the tree
-
-
Method Details
-
initSign
public void initSign(byte[] seed0, byte[] message) This method initializes the distributed sigature calculation. Variables are reseted and necessary steps are calculated- Parameters:
seed0- the initial OTSseedmessage- the massage which will be signed
-
updateSign
public boolean updateSign()This Method performsstepssteps of distributed signature calculaion- Returns:
- true if signature is generated completly, else false
-
getSig
public byte[] getSig()- Returns:
- The private OTS key
-
getLog
public int getLog(int intValue) This method returns the least integer that is greater or equal to the logarithm to the base 2 of an integerintValue.- Parameters:
intValue- an integer- Returns:
- The least integer greater or equal to the logarithm to the base 2
of
intValue
-
getStatByte
public byte[][] getStatByte()This method returns the status byte array- Returns:
- statBytes
-
getStatInt
public int[] getStatInt()This method returns the status int array- Returns:
- statInt
-
getStatLong
public byte[] getStatLong()Converts the long parameters into byte arrays to store it in statByte-Array -
toString
returns a string representation of the instance
-