Class WinternitzOTSignature
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.gmss.util.WinternitzOTSignature
This class implements key pair generation and 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
ConstructorsConstructorDescriptionWinternitzOTSignature(byte[] seed0, Digest digest, int w) The constructor generates an OTS key pair, usingseed0and the PRNG -
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[][]byte[]byte[]getSignature(byte[] message)
-
Constructor Details
-
WinternitzOTSignature
The constructor generates an OTS key pair, usingseed0and the PRNG- Parameters:
seed0- the seed for the PRGNdigest- an array of strings, containing the name of the used hash function, the name of the PRGN and the names of the corresponding providersw- the Winternitz parameter
-
-
Method Details
-
getPrivateKey
public byte[][] getPrivateKey()- Returns:
- The private OTS key
-
getPublicKey
public byte[] getPublicKey()- Returns:
- The public OTS key
-
getSignature
public byte[] getSignature(byte[] message) - Returns:
- The one-time signature of the message, generated with the private 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
-