Class DilithiumKeyPairGenerator


  • public class DilithiumKeyPairGenerator
    extends java.security.KeyPairGeneratorSpi
    This class generates CRSTALS-Dilithium public/private key pairs via hardware. An application can specify the size, the key label, the storage type and usage type of the key pair to be generated via an instance of the DilithiumKeyParameterSpec class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.KeyPair generateKeyPair()
      Generates a CRYSTALS-Dilithium key pair via hardware.
      void initialize​(int keysize, java.security.SecureRandom random)
      CRYSTALS-Dilithium does not support key size specifications.
      void initialize​(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
      Initializes this KeyPairGenerator for given parameters and secure random source.
      • Methods inherited from class java.lang.Object

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

      • DilithiumKeyPairGenerator

        public DilithiumKeyPairGenerator()
    • Method Detail

      • initialize

        public void initialize​(int keysize,
                               java.security.SecureRandom random)
        CRYSTALS-Dilithium does not support key size specifications.
        Specified by:
        initialize in class java.security.KeyPairGeneratorSpi
      • initialize

        public void initialize​(java.security.spec.AlgorithmParameterSpec params,
                               java.security.SecureRandom random)
                        throws java.security.InvalidAlgorithmParameterException
        Initializes this KeyPairGenerator for given parameters and secure random source.
        Overrides:
        initialize in class java.security.KeyPairGeneratorSpi
        Parameters:
        params - the AlgorithmParameterSpec for this object.
        random - the SecureRandom object for generating random numbers.
        Throws:
        java.security.InvalidAlgorithmParameterException - thrown when parameter set is not recognized.
      • generateKeyPair

        public java.security.KeyPair generateKeyPair()
        Generates a CRYSTALS-Dilithium key pair via hardware.
        Specified by:
        generateKeyPair in class java.security.KeyPairGeneratorSpi
        Returns:
        a KeyPair contains a pair of generated CRYSTALS-Dilithium keys
        Throws:
        java.lang.IllegalArgumentException - in the key label formal is not valid