Top Inners Fields Constructors Methods
org.bouncycastle.jcajce.provider.asymmetric.edec

public Class KeyFactorySpi

extends BaseKeyFactorySpi
implements AsymmetricKeyInfoConverter
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi.XDH, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi.X448, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi.X25519, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi.EdDSA, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi.Ed448, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi.Ed25519
Imports
java.io.IOException, java.security.InvalidKeyException, .Key, .PrivateKey, .PublicKey, java.security.spec.InvalidKeySpecException, .KeySpec, .X509EncodedKeySpec, org.bouncycastle.asn1.ASN1Encoding, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, org.bouncycastle.asn1.edec.EdECObjectIdentifiers, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .SubjectPublicKeyInfo, org.bouncycastle.crypto.CipherParameters, org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters, .Ed25519PublicKeyParameters, .Ed448PublicKeyParameters, .X25519PublicKeyParameters, .X448PublicKeyParameters, org.bouncycastle.crypto.util.OpenSSHPrivateKeyUtil, .OpenSSHPublicKeyUtil, org.bouncycastle.jcajce.interfaces.EdDSAPublicKey, .XDHPublicKey, org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi, org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter, org.bouncycastle.jcajce.spec.OpenSSHPrivateKeySpec, .OpenSSHPublicKeySpec, .RawEncodedKeySpec, org.bouncycastle.util.Arrays, org.bouncycastle.util.encoders.Hex

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
pack-priv String
private static final byte
pack-priv static final byte[]
private static final byte
pack-priv static final byte[]
private final boolean
private final int
private static final byte
pack-priv static final byte[]
private static final byte
pack-priv static final byte[]

Constructor Summary

AccessConstructor and Description
public
KeyFactorySpi(String algorithm, boolean isXdh, int specificBase)

Method Summary

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

Overrides org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGeneratePrivate.

Generates a private key object from the provided key specification (key material).
protected PublicKey
engineGeneratePublic(KeySpec
the specification (key material) of the public key.
keySpec
)

Overrides org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGeneratePublic.

Generates a public key object from the provided key specification (key material).
protected KeySpec
engineGetKeySpec(Key
the key.
key
,
Class<T>
the specification class in which the key material should be returned.
spec
)

Overrides org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key object.
protected Key
engineTranslateKey(Key
the key whose provider is unknown or untrusted.
key
)

Implements abstract java.security.KeyFactorySpi.engineTranslateKey.

Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
public PrivateKey
public PublicKey

Field Detail

algorithmback to summary
pack-priv String algorithm
Ed25519_typeback to summary
private static final byte Ed25519_type
Ed25519Prefixback to summary
pack-priv static final byte[] Ed25519Prefix
Ed448_typeback to summary
private static final byte Ed448_type
Ed448Prefixback to summary
pack-priv static final byte[] Ed448Prefix
isXdhback to summary
private final boolean isXdh
specificBaseback to summary
private final int specificBase
x25519_typeback to summary
private static final byte x25519_type
x25519Prefixback to summary
pack-priv static final byte[] x25519Prefix
x448_typeback to summary
private static final byte x448_type
x448Prefixback to summary
pack-priv static final byte[] x448Prefix

Constructor Detail

KeyFactorySpiback to summary
public KeyFactorySpi(String algorithm, boolean isXdh, int specificBase)

Method Detail

engineGeneratePrivateback to summary
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException

Overrides org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.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
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException

Overrides org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.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.
engineGetKeySpecback to summary
protected KeySpec engineGetKeySpec(Key key, Class<T> spec) throws InvalidKeySpecException

Overrides org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGetKeySpec.

Doc from java.security.KeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key object. keySpec identifies the specification class in which the key material should be returned. It could, for example, be DSAPublicKeySpec.class, to indicate that the key material should be returned in an instance of the DSAPublicKeySpec class.

Parameters
key:Key

the key.

spec:Class<T>

the specification class in which the key material should be returned.

Returns:KeySpec

the underlying key specification (key material) in an instance of the requested specification class.

Exceptions
InvalidKeySpecException:
if the requested key specification is inappropriate for the given key, or the given key cannot be dealt with (e.g., the given key has an unrecognized format).
engineTranslateKeyback to summary
protected Key engineTranslateKey(Key key) throws InvalidKeyException

Implements abstract java.security.KeyFactorySpi.engineTranslateKey.

Doc from java.security.KeyFactorySpi.engineTranslateKey.

Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.

Parameters
key:Key

the key whose provider is unknown or untrusted.

Returns:Key

the translated key.

Exceptions
InvalidKeyException:
if the given key cannot be processed by this key factory.
generatePrivateback to summary
public PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws IOException

Implements org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter.generatePrivate.

generatePublicback to summary
public PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws IOException

Implements org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter.generatePublic.

org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyFactorySpi.Ed25519

extends KeyFactorySpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
algorithmEd25519PrefixEd448Prefixx25519Prefixx448Prefix

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
engineGeneratePrivateengineGeneratePublicengineGetKeySpecengineTranslateKeygeneratePrivategeneratePublic

Constructor Detail

Ed25519back to summary
public Ed25519()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyFactorySpi.Ed448

extends KeyFactorySpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
algorithmEd25519PrefixEd448Prefixx25519Prefixx448Prefix

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
engineGeneratePrivateengineGeneratePublicengineGetKeySpecengineTranslateKeygeneratePrivategeneratePublic

Constructor Detail

Ed448back to summary
public Ed448()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyFactorySpi.EdDSA

extends KeyFactorySpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
algorithmEd25519PrefixEd448Prefixx25519Prefixx448Prefix

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
engineGeneratePrivateengineGeneratePublicengineGetKeySpecengineTranslateKeygeneratePrivategeneratePublic

Constructor Detail

EdDSAback to summary
public EdDSA()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyFactorySpi.X25519

extends KeyFactorySpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
algorithmEd25519PrefixEd448Prefixx25519Prefixx448Prefix

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
engineGeneratePrivateengineGeneratePublicengineGetKeySpecengineTranslateKeygeneratePrivategeneratePublic

Constructor Detail

X25519back to summary
public X25519()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyFactorySpi.X448

extends KeyFactorySpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
algorithmEd25519PrefixEd448Prefixx25519Prefixx448Prefix

Constructor Summary

AccessConstructor and Description
public
X448()

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
engineGeneratePrivateengineGeneratePublicengineGetKeySpecengineTranslateKeygeneratePrivategeneratePublic

Constructor Detail

X448back to summary
public X448()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyFactorySpi.XDH

extends KeyFactorySpi
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
algorithmEd25519PrefixEd448Prefixx25519Prefixx448Prefix

Constructor Summary

AccessConstructor and Description
public
XDH()

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi:
engineGeneratePrivateengineGeneratePublicengineGetKeySpecengineTranslateKeygeneratePrivategeneratePublic

Constructor Detail

XDHback to summary
public XDH()