Top Fields Constructors Methods
org.bouncycastle.pqc.jcajce.provider.util

public abstract Class BaseKeyFactorySpi

extends KeyFactorySpi
implements AsymmetricKeyInfoConverter
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.mldsa.MLDSAKeyFactorySpi, org.bouncycastle.jcajce.provider.asymmetric.mlkem.MLKEMKeyFactorySpi, org.bouncycastle.jcajce.provider.asymmetric.slhdsa.SLHDSAKeyFactorySpi, org.bouncycastle.pqc.jcajce.provider.dilithium.DilithiumKeyFactorySpi, org.bouncycastle.pqc.jcajce.provider.falcon.FalconKeyFactorySpi, org.bouncycastle.pqc.jcajce.provider.kyber.KyberKeyFactorySpi
Imports
java.security.KeyFactorySpi, .PrivateKey, .PublicKey, java.security.spec.InvalidKeySpecException, .KeySpec, .PKCS8EncodedKeySpec, .X509EncodedKeySpec, java.util.Set, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter

Field Summary

Modifier and TypeField and Description
private final ASN1ObjectIdentifier
private final Set<ASN1ObjectIdentifier>

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
private void
public PrivateKey
engineGeneratePrivate(KeySpec
the specification (key material) of the private key.
keySpec
)

Implements abstract java.security.KeyFactorySpi.engineGeneratePrivate.

Generates a private key object from the provided key specification (key material).

public PublicKey
engineGeneratePublic(KeySpec
the specification (key material) of the public key.
keySpec
)

Implements abstract java.security.KeyFactorySpi.engineGeneratePublic.

Generates a public key object from the provided key specification (key material).

Inherited from java.security.KeyFactorySpi:
engineGetKeySpecengineTranslateKey

Field Detail

keyOidback to summary
private final ASN1ObjectIdentifier keyOid
keyOidsback to summary
private final Set<ASN1ObjectIdentifier> keyOids

Constructor Detail

BaseKeyFactorySpiback to summary
protected BaseKeyFactorySpi(Set<ASN1ObjectIdentifier> keyOids)
BaseKeyFactorySpiback to summary
protected BaseKeyFactorySpi(ASN1ObjectIdentifier keyOid)

Method Detail

checkAlgorithmback to summary
private void checkAlgorithm(ASN1ObjectIdentifier algOid) throws InvalidKeySpecException
engineGeneratePrivateback to summary
public PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException

Implements abstract java.security.KeyFactorySpi.engineGeneratePrivate.

Doc from java.security.KeyFactorySpi.engineGeneratePrivate.

Generates a private key object from the provided key specification (key material).

Parameters
keySpec:KeySpec

the specification (key material) of the private key.

Returns:PrivateKey

the private key.

Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this key factory to produce a private key.
engineGeneratePublicback to summary
public PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException

Implements abstract java.security.KeyFactorySpi.engineGeneratePublic.

Doc from java.security.KeyFactorySpi.engineGeneratePublic.

Generates a public key object from the provided key specification (key material).

Parameters
keySpec:KeySpec

the specification (key material) of the public key.

Returns:PublicKey

the public key.

Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this key factory to produce a public key.