Class 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, using seed0 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 integer intValue.
      byte[][] getPrivateKey()  
      byte[] getPublicKey()  
      byte[] getSignature​(byte[] message)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WinternitzOTSignature

        public WinternitzOTSignature​(byte[] seed0,
                                     Digest digest,
                                     int w)
        The constructor generates an OTS key pair, using seed0 and the PRNG
        Parameters:
        seed0 - the seed for the PRGN
        digest - an array of strings, containing the name of the used hash function, the name of the PRGN and the names of the corresponding providers
        w - 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 integer intValue.
        Parameters:
        intValue - an integer
        Returns:
        The least integer greater or equal to the logarithm to the base 2 of intValue