opencard.opt.security
Class DSAPrivateKey

java.lang.Object
  |
  +--opencard.opt.security.DSAPrivateKey

public class DSAPrivateKey
extends java.lang.Object
implements java.security.interfaces.DSAPrivateKey

Contains a public DSA key. Implements the java.security.interfaces.DSAPrivateKey interface CardServices using PKA algorithms like SignatureCardService require keys implementing the PrivateKey/PublicKey interface. In this package OpenCard provides key classes for common algorithms like RSA, DSA (or DES) that each concrete card service implementing a card service interface should support instead of defining its own key classes. Only for new PKA algorithms that OpenCard does not yet support a card service may define its own key classes.

See Also:
DSAPrivateKey, Serialized Form

Constructor Summary
DSAPrivateKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger x)
          Produce an DSAPrivateKey from the given BigIntegers.
 
Method Summary
 java.lang.String getAlgorithm()
          Conformance to the java.security interface
 byte[] getEncoded()
          Conformance to the java.security interface
 java.lang.String getFormat()
          Conformance to the java.security interface
 java.security.interfaces.DSAParams getParams()
          Returns the DSA-specific key parameters.
 java.math.BigInteger getX()
          Returns the value of the private key, x.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSAPrivateKey

public DSAPrivateKey(java.math.BigInteger p,
                     java.math.BigInteger q,
                     java.math.BigInteger g,
                     java.math.BigInteger x)
Produce an DSAPrivateKey from the given BigIntegers.

Parameters:
q - subprime
p - prime
g - base
x - private key
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Conformance to the java.security interface
See Also:
PublicKey

getEncoded

public byte[] getEncoded()
Conformance to the java.security interface
See Also:
PublicKey

getFormat

public java.lang.String getFormat()
Conformance to the java.security interface
See Also:
PublicKey

getParams

public java.security.interfaces.DSAParams getParams()
Returns the DSA-specific key parameters. These parameters are never secret.
Returns:
the DSA-specific key parameters.
See Also:
DSAParams

getX

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