Class GMSSRootSig


  • public class GMSSRootSig
    extends java.lang.Object
    This class implements the distributed 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
      GMSSRootSig​(Digest digest, byte[][] statByte, int[] statInt)
      This constructor regenerates a prior GMSSRootSig object used by the GMSSPrivateKeyASN.1 class
      GMSSRootSig​(Digest digest, int w, int height)
      The constructor generates the PRNG and initializes some variables
    • 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[] getSig()  
      byte[][] getStatByte()
      This method returns the status byte array
      int[] getStatInt()
      This method returns the status int array
      byte[] getStatLong()
      Converts the long parameters into byte arrays to store it in statByte-Array
      void initSign​(byte[] seed0, byte[] message)
      This method initializes the distributed sigature calculation.
      java.lang.String toString()
      returns a string representation of the instance
      boolean updateSign()
      This Method performs steps steps of distributed signature calculaion
      • Methods inherited from class java.lang.Object

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

      • GMSSRootSig

        public GMSSRootSig​(Digest digest,
                           byte[][] statByte,
                           int[] statInt)
        This constructor regenerates a prior GMSSRootSig object used by the GMSSPrivateKeyASN.1 class
        Parameters:
        digest - an array of strings, containing the digest of the used hash function, the digest of the PRGN and the names of the corresponding providers
        statByte - status byte array
        statInt - status int array
      • GMSSRootSig

        public GMSSRootSig​(Digest digest,
                           int w,
                           int height)
        The constructor generates the PRNG and initializes some variables
        Parameters:
        digest - an array of strings, containing the digest of the used hash function, the digest of the PRGN and the names of the corresponding providers
        w - the winternitz parameter
        height - the heigth of the tree
    • Method Detail

      • initSign

        public void initSign​(byte[] seed0,
                             byte[] message)
        This method initializes the distributed sigature calculation. Variables are reseted and necessary steps are calculated
        Parameters:
        seed0 - the initial OTSseed
        message - the massage which will be signed
      • updateSign

        public boolean updateSign()
        This Method performs steps steps of distributed signature calculaion
        Returns:
        true if signature is generated completly, else false
      • getSig

        public byte[] getSig()
        Returns:
        The private 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 2 of intValue
      • getStatByte

        public byte[][] getStatByte()
        This method returns the status byte array
        Returns:
        statBytes
      • getStatInt

        public int[] getStatInt()
        This method returns the status int array
        Returns:
        statInt
      • getStatLong

        public byte[] getStatLong()
        Converts the long parameters into byte arrays to store it in statByte-Array
      • toString

        public java.lang.String toString()
        returns a string representation of the instance
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of the instance