Top Fields Constructors Methods
org.bouncycastle.jce.provider

public Class JCEElGamalPrivateKey

extends Object
implements ElGamalPrivateKey, DHPrivateKey, PKCS12BagAttributeCarrier
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier, javax.crypto.interfaces.DHPrivateKey, java.security.PrivateKey, javax.security.auth.Destroyable, java.security.Key, java.io.Serializable, javax.crypto.interfaces.DHKey, org.bouncycastle.jce.interfaces.ElGamalPrivateKey, org.bouncycastle.jce.interfaces.ElGamalKey
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, java.math.BigInteger, java.util.Enumeration, javax.crypto.interfaces.DHPrivateKey, javax.crypto.spec.DHParameterSpec, .DHPrivateKeySpec, org.bouncycastle.asn1.ASN1Encodable, .ASN1Integer, .ASN1ObjectIdentifier, org.bouncycastle.asn1.oiw.ElGamalParameter, .OIWObjectIdentifiers, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.crypto.params.ElGamalPrivateKeyParameters, org.bouncycastle.jcajce.provider.asymmetric.util.KeyUtil, .PKCS12BagAttributeCarrierImpl, org.bouncycastle.jce.interfaces.ElGamalPrivateKey, .PKCS12BagAttributeCarrier, org.bouncycastle.jce.spec.ElGamalParameterSpec, .ElGamalPrivateKeySpec

Field Summary

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

Constructor Summary

AccessConstructor and Description
protected
pack-priv
pack-priv
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 ASN1Encodable
public Enumeration<E>
public byte[]

Returns:

a PKCS8 representation of the key.
getEncoded
()

Implements java.security.Key.getEncoded.

Return a PKCS8 representation of the key.
public String

Returns:

the string "PKCS#8"
getFormat
()

Implements java.security.Key.getFormat.

return the encoding format we produce in getEncoded().
public ElGamalParameterSpec
public DHParameterSpec
getParams()

Implements javax.crypto.interfaces.DHKey.getParams.

Returns the key parameters.
public BigInteger
private void
public void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

Hides javax.crypto.interfaces.DHPrivateKey.serialVersionUID.

xback to summary
pack-priv BigInteger x

Constructor Detail

JCEElGamalPrivateKeyback to summary
protected JCEElGamalPrivateKey()
JCEElGamalPrivateKeyback to summary
pack-priv JCEElGamalPrivateKey(ElGamalPrivateKey key)
JCEElGamalPrivateKeyback to summary
pack-priv JCEElGamalPrivateKey(DHPrivateKey key)
JCEElGamalPrivateKeyback to summary
pack-priv JCEElGamalPrivateKey(ElGamalPrivateKeySpec spec)
JCEElGamalPrivateKeyback to summary
pack-priv JCEElGamalPrivateKey(DHPrivateKeySpec spec)
JCEElGamalPrivateKeyback to summary
pack-priv JCEElGamalPrivateKey(PrivateKeyInfo info) throws IOException
JCEElGamalPrivateKeyback to summary
pack-priv JCEElGamalPrivateKey(ElGamalPrivateKeyParameters params)

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.

getBagAttributeback to summary
public ASN1Encodable getBagAttribute(ASN1ObjectIdentifier oid)

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.getBagAttribute.

getBagAttributeKeysback to summary
public Enumeration<E> getBagAttributeKeys()

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.getBagAttributeKeys.

getEncodedback to summary
public byte[] getEncoded()

Implements java.security.Key.getEncoded.

Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.

Returns:byte[]

a PKCS8 representation of the key.

getFormatback to summary
public String getFormat()

Implements java.security.Key.getFormat.

return the encoding format we produce in getEncoded().

Returns:String

the string "PKCS#8"

getParametersback to summary
public ElGamalParameterSpec getParameters()

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

getParamsback to summary
public DHParameterSpec getParams()

Implements javax.crypto.interfaces.DHKey.getParams.

Doc from javax.crypto.interfaces.DHKey.getParams.

Returns the key parameters.

Returns:DHParameterSpec

the key parameters

getXback to summary
public BigInteger getX()

Implements org.bouncycastle.jce.interfaces.ElGamalPrivateKey.getX, javax.crypto.interfaces.DHPrivateKey.getX.

Doc from javax.crypto.interfaces.DHPrivateKey.getX.

Returns the private value, x.

Returns:BigInteger

the private value, x

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
setBagAttributeback to summary
public void setBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute)

Implements org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier.setBagAttribute.

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException