Class WinternitzOTSignature
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.gmss.util.WinternitzOTSignature
-
public class WinternitzOTSignature extends java.lang.Object
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
Constructors Constructor Description WinternitzOTSignature(byte[] seed0, Digest digest, int w)
The constructor generates an OTS key pair, usingseed0
and the PRNG
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
.byte[][]
getPrivateKey()
byte[]
getPublicKey()
byte[]
getSignature(byte[] message)
-
-
-
Constructor Detail
-
WinternitzOTSignature
public WinternitzOTSignature(byte[] seed0, Digest digest, int w)
The constructor generates an OTS key pair, usingseed0
and 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 Detail
-
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
-
-