Package org.conscrypt

Class OpenSslMlKemKeyFactory

    • Field Detail

      • x509PreambleMlKem768

        static final byte[] x509PreambleMlKem768
      • x509PreambleMlKem1024

        static final byte[] x509PreambleMlKem1024
      • pkcs8PreambleMlKem768

        static final byte[] pkcs8PreambleMlKem768
      • pkcs8PreambleMlKem1024

        static final byte[] pkcs8PreambleMlKem1024
    • Constructor Detail

      • OpenSslMlKemKeyFactory

        private OpenSslMlKemKeyFactory​(MlKemAlgorithm defaultAlgorithm)
    • Method Detail

      • supportsAlgorithm

        abstract boolean supportsAlgorithm​(MlKemAlgorithm algorithm)
      • makePublicKeyFromRaw

        private OpenSslMlKemPublicKey makePublicKeyFromRaw​(byte[] raw,
                                                           MlKemAlgorithm algorithm)
                                                    throws java.security.spec.InvalidKeySpecException
        Throws:
        java.security.spec.InvalidKeySpecException
      • engineGeneratePublic

        protected java.security.PublicKey engineGeneratePublic​(java.security.spec.KeySpec keySpec)
                                                        throws java.security.spec.InvalidKeySpecException
        Specified by:
        engineGeneratePublic in class java.security.KeyFactorySpi
        Throws:
        java.security.spec.InvalidKeySpecException
      • makePrivateKeyFromSeed

        private OpenSslMlKemPrivateKey makePrivateKeyFromSeed​(byte[] seed,
                                                              MlKemAlgorithm algorithm)
                                                       throws java.security.spec.InvalidKeySpecException
        Throws:
        java.security.spec.InvalidKeySpecException
      • engineGeneratePrivate

        protected java.security.PrivateKey engineGeneratePrivate​(java.security.spec.KeySpec keySpec)
                                                          throws java.security.spec.InvalidKeySpecException
        Specified by:
        engineGeneratePrivate in class java.security.KeyFactorySpi
        Throws:
        java.security.spec.InvalidKeySpecException
      • engineGetKeySpec

        protected <T extends java.security.spec.KeySpec> T engineGetKeySpec​(java.security.Key key,
                                                                            java.lang.Class<T> keySpec)
                                                                     throws java.security.spec.InvalidKeySpecException
        Specified by:
        engineGetKeySpec in class java.security.KeyFactorySpi
        Throws:
        java.security.spec.InvalidKeySpecException
      • engineTranslateKey

        protected java.security.Key engineTranslateKey​(java.security.Key key)
                                                throws java.security.InvalidKeyException
        Specified by:
        engineTranslateKey in class java.security.KeyFactorySpi
        Throws:
        java.security.InvalidKeyException