Bouncy Castle Cryptography Library 1.79

org.bouncycastle.pqc.legacy.crypto.gmss.util
Class WinternitzOTSVerify

java.lang.Object
  |
  +--org.bouncycastle.pqc.legacy.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
WinternitzOTSVerify(Digest digest, int w)
          The constructor
 
Method Summary
 int getLog(int intValue)
          This method returns the least integer that is greater or equal to the logarithm to the base 2 of an integer intValue.
 int getSignatureLength()
           
 byte[] Verify(byte[] message, byte[] signature)
          This method computes the public OTS key from the one-time signature of a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 function
w - 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 message
signature - 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 integer intValue.
Parameters:
intValue - an integer
Returns:
The least integer greater or equal to the logarithm to the base 256 of intValue

Bouncy Castle Cryptography Library 1.79