com.ibm.crypto.fips.provider

Class DSAPrivateKey

  1. java.lang.Object
  2. extended bycom.ibm.security.pkcsutil.PKCSDerObject
  3. extended bycom.ibm.security.pkcs8.PrivateKeyInfo
  4. extended bycom.ibm.crypto.fips.provider.DSAPrivateKey
All implemented interfaces:
java.io.Serializable, java.lang.Cloneable, java.security.interfaces.DSAKey, java.security.interfaces.DSAPrivateKey, java.security.Key, java.security.PrivateKey

  1. public final class DSAPrivateKey
  2. extends com.ibm.security.pkcs8.PrivateKeyInfo
  3. implements java.security.interfaces.DSAPrivateKey, java.io.Serializable
This class represents an X.509 private key for the DSA Algorithm.
Version:
1.00, 07/20/99
Author:
Joyce Leung
See Also:
Serialized Form

Field Summary

Fields inherited from class com.ibm.security.pkcs8.PrivateKeyInfo
algid, attributes, key, version
Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject
provider

Constructor Summary

Constructor and Description
DSAPrivateKey(java.math.BigInteger x,java.math.BigInteger p,java.math.BigInteger q,java.math.BigInteger g)
Create a DSA private key from x, p, q, and g.
DSAPrivateKey(byte[] encoded)
Create a DSA private key from it's DER encoding (PKCS#8)

Method Summary

Modifier and Type Method and Description
  1. protected
  2. void
finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
  1. java.security.interfaces.DSAParams
getParams()
Returns the DSA parameters associated with this key, or null if the parameters could not be parsed.
  1. java.math.BigInteger
getX()
Return the value of the private key.
  1. protected
  2. void
parseKeyBits()
  1. java.lang.String
toString()
Returns a string containing a concise, human-readable description of the receiver.
  1. void
zeroize()
This function zeroizes the key so that it isn't in memory
Methods inherited from class com.ibm.security.pkcs8.PrivateKeyInfo
addAttribute, addAttributes, clone, decode, encode, equals, getAlgorithm, getAlgorithmId, getAttribute, getAttributes, getEncoded, getFormat, getKeyBytes, hasAttribute, hasAttributes, hashCode, parseKey, parseKey
Methods inherited from class com.ibm.security.pkcsutil.PKCSDerObject
decode, encode, getObjectIdentifier, read, readBASE64, write, write, writeBASE64
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Constructor Detail

DSAPrivateKey

  1. public DSAPrivateKey(java.math.BigInteger x,
  2. java.math.BigInteger p,
  3. java.math.BigInteger q,
  4. java.math.BigInteger g)
  5. throws java.security.InvalidKeyException
Create a DSA private key from x, p, q, and g.
Parameters:
x - the private key
p - the number p
q - the number q
g - the number g
Throws:
java.security.InvalidKeyException

DSAPrivateKey

  1. public DSAPrivateKey(byte[] encoded)
  2. throws java.security.InvalidKeyException
Create a DSA private key from it's DER encoding (PKCS#8)
Parameters:
encoded - the encoded parameters.
Throws:
java.security.InvalidKeyException

Method Detail

getParams

  1. public java.security.interfaces.DSAParams getParams( )
Returns the DSA parameters associated with this key, or null if the parameters could not be parsed.
Specified by:
getParams in interface java.security.interfaces.DSAKey
Returns:
DSAParams the DSA parameter of this instance

getX

  1. public java.math.BigInteger getX( )
Return the value of the private key.
Specified by:
getX in interface java.security.interfaces.DSAPrivateKey
Returns:
BigInteger the value of x

parseKeyBits

  1. protected void parseKeyBits()
  2. throws java.io.IOException
Overrides:
parseKeyBits in class com.ibm.security.pkcs8.PrivateKeyInfo
Throws:
java.io.IOException

toString

  1. public java.lang.String toString( )
Returns a string containing a concise, human-readable description of the receiver.
Overrides:
toString in class com.ibm.security.pkcs8.PrivateKeyInfo

zeroize

  1. public void zeroize()
This function zeroizes the key so that it isn't in memory

finalize

  1. protected void finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
Overrides:
finalize in class com.ibm.security.pkcs8.PrivateKeyInfo