Top Description Inners Constructors Methods
org.bouncycastle.jcajce.util

public Class ECKeyUtil

extends Object
Class Inheritance
Imports
java.io.IOException, java.security.interfaces.ECPublicKey, java.security.spec.ECParameterSpec, .ECPoint, org.bouncycastle.asn1.ASN1ObjectIdentifier, .ASN1OctetString, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, org.bouncycastle.asn1.x9.ECNamedCurveTable, .X962Parameters, .X9ECParameters, .X9ECParametersHolder, .X9ECPoint, org.bouncycastle.crypto.ec.CustomNamedCurves

Utility class for EC Keys.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ECPublicKey

Returns:

a wrapped version of ecPublicKey which uses point compression.
createKeyWithCompression
(ECPublicKey
the originating public key.
ecPublicKey
)

Convert an ECPublicKey into an ECPublicKey which always encodes with point compression.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ECKeyUtilback to summary
public ECKeyUtil()

Method Detail

createKeyWithCompressionback to summary
public static ECPublicKey createKeyWithCompression(ECPublicKey ecPublicKey)

Convert an ECPublicKey into an ECPublicKey which always encodes with point compression.

Parameters
ecPublicKey:ECPublicKey

the originating public key.

Returns:ECPublicKey

a wrapped version of ecPublicKey which uses point compression.

org.bouncycastle.jcajce.util back to summary

private Class ECKeyUtil.ECPublicKeyWithCompression

extends Object
implements ECPublicKey
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.jcajce.util.ECKeyUtil.ECPublicKeyWithCompression
All Implemented Interfaces
java.security.interfaces.ECPublicKey, java.security.interfaces.ECKey, java.security.PublicKey, java.security.Key, java.io.Serializable

Field Summary

Modifier and TypeField and Description
private final ECPublicKey

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getAlgorithm()

Implements java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key.
public byte[]
getEncoded()

Implements java.security.Key.getEncoded.

Returns the key in its primary encoding format, or null if this key does not support encoding.
public String
getFormat()

Implements java.security.Key.getFormat.

Returns the name of the primary encoding format of this key, or null if this key does not support encoding.
public ECParameterSpec
getParams()

Implements java.security.interfaces.ECKey.getParams.

Returns the domain parameters associated with this key.
public ECPoint
getW()

Implements java.security.interfaces.ECPublicKey.getW.

Returns the public point W.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ecPublicKeyback to summary
private final ECPublicKey ecPublicKey

Constructor Detail

ECPublicKeyWithCompressionback to summary
public ECPublicKeyWithCompression(ECPublicKey ecPublicKey)

Method Detail

getAlgorithmback to summary
public String getAlgorithm()

Implements java.security.Key.getAlgorithm.

Doc from java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key. For example, "DSA" would indicate that this key is a DSA key. See the key related sections (KeyFactory, KeyGenerator, KeyPairGenerator, and SecretKeyFactory) in the Java Security Standard Algorithm Names Specification for information about standard key algorithm names.

Returns:String

the name of the algorithm associated with this key.

getEncodedback to summary
public byte[] getEncoded()

Implements java.security.Key.getEncoded.

Doc from java.security.Key.getEncoded.

Returns the key in its primary encoding format, or null if this key does not support encoding.

Returns:byte[]

the encoded key, or null if the key does not support encoding.

getFormatback to summary
public String getFormat()

Implements java.security.Key.getFormat.

Doc from java.security.Key.getFormat.

Returns the name of the primary encoding format of this key, or null if this key does not support encoding. The primary encoding format is named in terms of the appropriate ASN.1 data format, if an ASN.1 specification for this key exists. For example, the name of the ASN.1 data format for public keys is SubjectPublicKeyInfo, as defined by the X.509 standard; in this case, the returned format is "X.509". Similarly, the name of the ASN.1 data format for private keys is PrivateKeyInfo, as defined by the PKCS #8 standard; in this case, the returned format is "PKCS#8".

Returns:String

the primary encoding format of the key.

getParamsback to summary
public ECParameterSpec getParams()

Implements java.security.interfaces.ECKey.getParams.

Doc from java.security.interfaces.ECKey.getParams.

Returns the domain parameters associated with this key. The domain parameters are either explicitly specified or implicitly created during key generation.

Returns:ECParameterSpec

the associated domain parameters.

getWback to summary
public ECPoint getW()

Implements java.security.interfaces.ECPublicKey.getW.

Doc from java.security.interfaces.ECPublicKey.getW.

Returns the public point W.

Returns:ECPoint

the public point W.