Class WinternitzOTSVerify

java.lang.Object
org.bouncycastle.pqc.legacy.crypto.gmss.util.WinternitzOTSVerify

public class WinternitzOTSVerify extends 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

    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 integer intValue.
    int
     
    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 Details

    • 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 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 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