Top Description Inners Fields Constructors Methods
org.bouncycastle.crypto.util

public Class PublicKeyFactory

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, java.math.BigInteger, java.util.HashMap, .Map, org.bouncycastle.asn1.ASN1BitString, .ASN1Encodable, .ASN1InputStream, .ASN1Integer, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1Primitive, .DEROctetString, org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers, .ECGOST3410NamedCurves, .GOST3410PublicKeyAlgParameters, org.bouncycastle.asn1.edec.EdECObjectIdentifiers, org.bouncycastle.asn1.oiw.ElGamalParameter, .OIWObjectIdentifiers, org.bouncycastle.asn1.pkcs.DHParameter, .PKCSObjectIdentifiers, .RSAPublicKey, org.bouncycastle.asn1.rosstandart.RosstandartObjectIdentifiers, org.bouncycastle.asn1.ua.DSTU4145BinaryField, .DSTU4145ECBinary, .DSTU4145NamedCurves, .DSTU4145Params, .DSTU4145PointEncoder, .UAObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .DSAParameter, .SubjectPublicKeyInfo, .X509ObjectIdentifiers, org.bouncycastle.asn1.x9.DHPublicKey, .DomainParameters, .ECNamedCurveTable, .ValidationParams, .X962Parameters, .X9ECParameters, .X9ECPoint, .X9IntegerConverter, .X9ObjectIdentifiers, org.bouncycastle.crypto.ec.CustomNamedCurves, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .DHParameters, .DHPublicKeyParameters, .DHValidationParameters, .DSAParameters, .DSAPublicKeyParameters, .ECDomainParameters, .ECGOST3410Parameters, .ECNamedDomainParameters, .ECPublicKeyParameters, .Ed25519PublicKeyParameters, .Ed448PublicKeyParameters, .ElGamalParameters, .ElGamalPublicKeyParameters, .RSAKeyParameters, .X25519PublicKeyParameters, .X448PublicKeyParameters, org.bouncycastle.math.ec.ECCurve, .ECPoint, org.bouncycastle.util.Arrays

Factory to create asymmetric public key parameters for asymmetric ciphers from range of ASN.1 encoded SubjectPublicKeyInfo objects.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private abstract static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static Map<K, V>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static AsymmetricKeyParameter

Returns:

the appropriate key parameter
createKey
(byte[]
the SubjectPublicKeyInfo encoding
keyInfoData
)

Create a public key from a SubjectPublicKeyInfo encoding

public static AsymmetricKeyParameter

Returns:

the appropriate key parameter
createKey
(InputStream
the stream to read the SubjectPublicKeyInfo encoding from
inStr
)

Create a public key from a SubjectPublicKeyInfo encoding read from a stream

public static AsymmetricKeyParameter

Returns:

the appropriate key parameter
createKey
(SubjectPublicKeyInfo
the SubjectPublicKeyInfo containing the key data
keyInfo
)

Create a public key from the passed in SubjectPublicKeyInfo

public static AsymmetricKeyParameter

Returns:

the appropriate key parameter
createKey
(SubjectPublicKeyInfo
the SubjectPublicKeyInfo containing the key data
keyInfo
,
Object
default parameters that might be needed.
defaultParams
)

Create a public key from the passed in SubjectPublicKeyInfo

private static byte[]
getRawKey(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

convertersback to summary
private static Map<K, V> converters

Constructor Detail

PublicKeyFactoryback to summary
public PublicKeyFactory()

Method Detail

createKeyback to summary
public static AsymmetricKeyParameter createKey(byte[] keyInfoData) throws IOException

Create a public key from a SubjectPublicKeyInfo encoding

Parameters
keyInfoData:byte[]

the SubjectPublicKeyInfo encoding

Returns:AsymmetricKeyParameter

the appropriate key parameter

Exceptions
IOException:
on an error decoding the key
createKeyback to summary
public static AsymmetricKeyParameter createKey(InputStream inStr) throws IOException

Create a public key from a SubjectPublicKeyInfo encoding read from a stream

Parameters
inStr:InputStream

the stream to read the SubjectPublicKeyInfo encoding from

Returns:AsymmetricKeyParameter

the appropriate key parameter

Exceptions
IOException:
on an error decoding the key
createKeyback to summary
public static AsymmetricKeyParameter createKey(SubjectPublicKeyInfo keyInfo) throws IOException

Create a public key from the passed in SubjectPublicKeyInfo

Parameters
keyInfo:SubjectPublicKeyInfo

the SubjectPublicKeyInfo containing the key data

Returns:AsymmetricKeyParameter

the appropriate key parameter

Exceptions
IOException:
on an error decoding the key
createKeyback to summary
public static AsymmetricKeyParameter createKey(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Create a public key from the passed in SubjectPublicKeyInfo

Parameters
keyInfo:SubjectPublicKeyInfo

the SubjectPublicKeyInfo containing the key data

defaultParams:Object

default parameters that might be needed.

Returns:AsymmetricKeyParameter

the appropriate key parameter

Exceptions
IOException:
on an error decoding the key
getRawKeyback to summary
private static byte[] getRawKey(SubjectPublicKeyInfo keyInfo, Object defaultParams)
org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.DHAgreementConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

DHAgreementConverterback to summary
private DHAgreementConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.DHPublicNumberConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

DHPublicNumberConverterback to summary
private DHPublicNumberConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.DSAConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

DSAConverterback to summary
private DSAConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.DSTUConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter
private void
reverseBytes(byte[] bytes)

Constructor Detail

DSTUConverterback to summary
private DSTUConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

reverseBytesback to summary
private void reverseBytes(byte[] bytes)
org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.ECConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

ECConverterback to summary
private ECConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.Ed25519Converter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

Ed25519Converterback to summary
private Ed25519Converter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.Ed448Converter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

Ed448Converterback to summary
private Ed448Converter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.ElGamalConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

ElGamalConverterback to summary
private ElGamalConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.GOST3410_2001Converter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

GOST3410_2001Converterback to summary
private GOST3410_2001Converter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.GOST3410_2012Converter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

GOST3410_2012Converterback to summary
private GOST3410_2012Converter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.RSAConverter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

RSAConverterback to summary
private RSAConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private abstract Class PublicKeyFactory.SubjectPublicKeyInfoConverter

extends Object
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter
Known Direct Subclasses
org.bouncycastle.crypto.util.PublicKeyFactory.RSAConverter, org.bouncycastle.crypto.util.PublicKeyFactory.DHPublicNumberConverter, org.bouncycastle.crypto.util.PublicKeyFactory.DHAgreementConverter, org.bouncycastle.crypto.util.PublicKeyFactory.ElGamalConverter, org.bouncycastle.crypto.util.PublicKeyFactory.DSAConverter, org.bouncycastle.crypto.util.PublicKeyFactory.ECConverter, org.bouncycastle.crypto.util.PublicKeyFactory.GOST3410_2001Converter, org.bouncycastle.crypto.util.PublicKeyFactory.GOST3410_2012Converter, org.bouncycastle.crypto.util.PublicKeyFactory.DSTUConverter, org.bouncycastle.crypto.util.PublicKeyFactory.X25519Converter, org.bouncycastle.crypto.util.PublicKeyFactory.X448Converter, org.bouncycastle.crypto.util.PublicKeyFactory.Ed25519Converter, org.bouncycastle.crypto.util.PublicKeyFactory.Ed448Converter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract AsymmetricKeyParameter
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SubjectPublicKeyInfoConverterback to summary
private SubjectPublicKeyInfoConverter()

Method Detail

getPublicKeyParametersback to summary
pack-priv abstract AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams) throws IOException
org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.X25519Converter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

X25519Converterback to summary
private X25519Converter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.

org.bouncycastle.crypto.util back to summary

private Class PublicKeyFactory.X448Converter

extends SubjectPublicKeyInfoConverter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv AsymmetricKeyParameter

Constructor Detail

X448Converterback to summary
private X448Converter()

Method Detail

getPublicKeyParametersback to summary
pack-priv AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)

Implements abstract org.bouncycastle.crypto.util.PublicKeyFactory.SubjectPublicKeyInfoConverter.getPublicKeyParameters.