Top Fields Constructors Methods
org.bouncycastle.jce.provider

public Class JCEElGamalPublicKey

extends Object
implements ElGamalPublicKey, DHPublicKey
Class Inheritance
All Implemented Interfaces
javax.crypto.interfaces.DHPublicKey, java.security.PublicKey, java.security.AsymmetricKey, java.security.Key, java.io.Serializable, javax.crypto.interfaces.DHKey, org.bouncycastle.jce.interfaces.ElGamalPublicKey, org.bouncycastle.jce.interfaces.ElGamalKey
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, java.math.BigInteger, javax.crypto.interfaces.DHPublicKey, javax.crypto.spec.DHParameterSpec, .DHPublicKeySpec, org.bouncycastle.asn1.ASN1Integer, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .SubjectPublicKeyInfo, org.bouncycastle.crypto.params.ElGamalPublicKeyParameters, org.bouncycastle.internal.asn1.oiw.ElGamalParameter, .OIWObjectIdentifiers, org.bouncycastle.jcajce.provider.asymmetric.util.KeyUtil, org.bouncycastle.jce.interfaces.ElGamalPublicKey, org.bouncycastle.jce.spec.ElGamalParameterSpec, .ElGamalPublicKeySpec

References Deprecated

ElGamalPublicKey is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private ElGamalParameterSpec
pack-priv static final long
private BigInteger
y

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
pack-priv
JCEElGamalPublicKey(ElGamalPublicKey key)
References Deprecated ElGamalPublicKey is deprecated or references (maybe indirectly) at least one deprecated element.

pack-priv
pack-priv
pack-priv
pack-priv

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 ElGamalParameterSpec
public DHParameterSpec
getParams()

Overrides default javax.crypto.interfaces.DHPublicKey.getParams.

Implements javax.crypto.interfaces.DHKey.getParams.

Returns the parameters associated with this key.

public BigInteger
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

elSpecback to summary
private ElGamalParameterSpec elSpec
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.crypto.interfaces.DHPublicKey.serialVersionUID.

yback to summary
private BigInteger y

Constructor Detail

JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(ElGamalPublicKeySpec spec)
JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(DHPublicKeySpec spec)
JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(ElGamalPublicKey key)

References Deprecated

ElGamalPublicKey is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(DHPublicKey key)
JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(ElGamalPublicKeyParameters params)
JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(BigInteger y, ElGamalParameterSpec elSpec)
JCEElGamalPublicKeyback to summary
pack-priv JCEElGamalPublicKey(SubjectPublicKeyInfo info)

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.

getParametersback to summary
public ElGamalParameterSpec getParameters()

Implements org.bouncycastle.jce.interfaces.ElGamalKey.getParameters.

getParamsback to summary
public DHParameterSpec getParams()

Overrides default javax.crypto.interfaces.DHPublicKey.getParams.

Implements javax.crypto.interfaces.DHKey.getParams.

Doc from javax.crypto.interfaces.DHPublicKey.getParams.

Returns the parameters associated with this key. The parameters are optional and may be either explicitly specified or implicitly created during key pair generation.

Returns:DHParameterSpec

the associated parameters, may be null

getYback to summary
public BigInteger getY()

Implements org.bouncycastle.jce.interfaces.ElGamalPublicKey.getY, javax.crypto.interfaces.DHPublicKey.getY.

Doc from javax.crypto.interfaces.DHPublicKey.getY.

Returns the public value, y.

Returns:BigInteger

the public value, y

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException