Class WinternitzOTSignature


  • public class WinternitzOTSignature
    extends 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 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