Class KeyGen

java.lang.Object
dk.hyperdivision.multisig_hmac.IndexKey
dk.hyperdivision.multisig_hmac.KeyGen

public class KeyGen
extends IndexKey
KeyGen represents a pair of index + cryptographically random key. Used for the key management method where each component key is stored.
Author:
Amalie Due Jensen
  • Constructor Summary

    Constructors 
    Constructor Description
    KeyGen​(int index, int KEYBYTES)
    Constructs and initializes a pair of index + a new cryptographically random key.
  • Method Summary

    Modifier and Type Method Description
    static byte[] keygen​(int KEYBYTES)
    Generates a new cryptographically random key

    Methods inherited from class java.lang.Object

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

    • KeyGen

      public KeyGen​(int index, int KEYBYTES)
      Constructs and initializes a pair of index + a new cryptographically random key. Note that index should be counted from 0.
      Parameters:
      index - - index of the key
      KEYBYTES - - length of the key
  • Method Details

    • keygen

      public static byte[] keygen​(int KEYBYTES)
      Generates a new cryptographically random key
      Parameters:
      KEYBYTES - - length of the key
      Returns:
      key in bytes of length KEYBYTES