Class HawkKeyPairGenerator

java.lang.Object
org.bouncycastle.pqc.crypto.hawk.HawkKeyPairGenerator
All Implemented Interfaces:
AsymmetricCipherKeyPairGenerator

public class HawkKeyPairGenerator extends Object implements AsymmetricCipherKeyPairGenerator
Lightweight Hawk key pair generator. Initialised with a HawkKeyGenerationParameters containing the parameter set and a SecureRandom; produces a HawkPublicKeyParameters / HawkPrivateKeyParameters pair.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    encodePrivate(int logn, byte[] dst, int dstOffset, byte[] seed, int seedOffset, byte[] F, int fOffset, byte[] G, int gOffset, byte[] pub, int pubOffset, int pubLen)
     
    static boolean
    encodePublic(int logn, byte[] dst, int dstOffset, int dstLen, short[] q00, int q00Offset, short[] q01, int q01Offset)
     
    static void
    extractLowBit(int logn, byte[] dst, int dstOffset, byte[] f)
     
    return an AsymmetricCipherKeyPair containing the generated keys.
    int
    Hawk_keygen(int logn, byte[] f, int fOffset, byte[] g, int gOffset, byte[] F, int FOffset, byte[] G, int GOffset, short[] q00, int q00Offset, short[] q01, int q01Offset, int[] q11, int q11Offset, byte[] seed, int seedOffset, int[] tmp, int tmpOffset, int tmpLen)
     
    void
    intialise the key pair generator.

    Methods inherited from class Object

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

    • HawkKeyPairGenerator

      public HawkKeyPairGenerator()
  • Method Details

    • init

      public void init(KeyGenerationParameters param)
      Description copied from interface: AsymmetricCipherKeyPairGenerator
      intialise the key pair generator.
      Specified by:
      init in interface AsymmetricCipherKeyPairGenerator
      Parameters:
      param - the parameters the key pair is to be initialised with.
    • generateKeyPair

      public AsymmetricCipherKeyPair generateKeyPair()
      Description copied from interface: AsymmetricCipherKeyPairGenerator
      return an AsymmetricCipherKeyPair containing the generated keys.
      Specified by:
      generateKeyPair in interface AsymmetricCipherKeyPairGenerator
      Returns:
      an AsymmetricCipherKeyPair containing the generated keys.
    • encodePublic

      public static boolean encodePublic(int logn, byte[] dst, int dstOffset, int dstLen, short[] q00, int q00Offset, short[] q01, int q01Offset)
    • extractLowBit

      public static void extractLowBit(int logn, byte[] dst, int dstOffset, byte[] f)
    • Hawk_keygen

      public int Hawk_keygen(int logn, byte[] f, int fOffset, byte[] g, int gOffset, byte[] F, int FOffset, byte[] G, int GOffset, short[] q00, int q00Offset, short[] q01, int q01Offset, int[] q11, int q11Offset, byte[] seed, int seedOffset, int[] tmp, int tmpOffset, int tmpLen)
    • encodePrivate

      public static int encodePrivate(int logn, byte[] dst, int dstOffset, byte[] seed, int seedOffset, byte[] F, int fOffset, byte[] G, int gOffset, byte[] pub, int pubOffset, int pubLen)