Class WinternitzOTSVerify
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.gmss.util.WinternitzOTSVerify
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
-
Method Summary
Modifier and TypeMethodDescriptionint
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
byte[]
Verify
(byte[] message, byte[] signature) This method computes the public OTS key from the one-time signature of a message.
-
Constructor Details
-
WinternitzOTSVerify
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 Details
-
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
-