Class WinternitzOTSVerify
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.gmss.util.WinternitzOTSVerify
-
public class WinternitzOTSVerify extends java.lang.Object
This class implements signature verification 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 WinternitzOTSVerify(Digest digest, int w)
The constructor
-
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
.int
getSignatureLength()
byte[]
Verify(byte[] message, byte[] signature)
This method computes the public OTS key from the one-time signature of a message.
-
-
-
Constructor Detail
-
WinternitzOTSVerify
public WinternitzOTSVerify(Digest digest, int w)
The constructor- Parameters:
digest
- the name of the hash function used by the OTS and the provider name of the hash functionw
- the Winternitz parameter
-
-
Method Detail
-
getSignatureLength
public int getSignatureLength()
- Returns:
- The length of the one-time signature
-
Verify
public byte[] Verify(byte[] message, byte[] signature)
This method computes the public OTS key from the one-time signature of a message. This is *NOT* a complete OTS signature verification, but it suffices for usage with CMSS.- Parameters:
message
- the messagesignature
- the one-time signature- Returns:
- The public 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
256 of
intValue
-
-