com.ibm.security12.sun.security.x509
Class AlgIdDSA

java.lang.Object
  |
  +--com.ibm.security12.sun.security.x509.AlgorithmId
        |
        +--com.ibm.security12.sun.security.x509.AlgIdDSA

public final class AlgIdDSA
extends AlgorithmId
implements DSAParams

This class identifies DSS/DSA Algorithm variants, which are distinguished by using different algorithm parameters P, Q, G. It uses the NIST/IETF standard DER encoding. These are used to implement the Digital Signature Standard (DSS), FIPS 186.

NOTE: At this time, DSS/DSA Algorithm IDs must always include these parameters. Use of DSS/DSA in modes where parameters are either implicit (e.g. a default applicable to a site or a larger scope), or are derived from some Certificate Authority's DSS certificate, is not currently supported.

Version:
1.32
Author:
David Brownell
See Also:
Serialized Form

Fields inherited from class com.ibm.security12.sun.security.x509.AlgorithmId
DH_oid, DH_PKIX_oid, DSA_oid, DSA_OIW_oid, MD2_oid, md2WithRSAEncryption_oid, MD5_oid, md5WithRSAEncryption_oid, params, RSA_oid, RSAEncryption_oid, SHA_oid, sha1WithDSA_oid, sha1WithDSA_OIW_oid, sha1WithRSAEncryption_oid, sha1WithRSAEncryption_OIW_oid, shaWithDSA_OIW_oid
 
Constructor Summary
AlgIdDSA()
          Default constructor.
AlgIdDSA(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)
          Constructs a DSS/DSA Algorithm ID from numeric parameters.
AlgIdDSA(byte[] encodedAlg)
          Construct an AlgIdDSA from an X.509 encoded byte array.
AlgIdDSA(byte[] p, byte[] q, byte[] g)
          Constructs a DSS/DSA Algorithm ID from unsigned integers that define the algorithm parameters.
AlgIdDSA(DerValue val)
           
 
Method Summary
protected  void decodeParams()
          Parses algorithm parameters P, Q, and G.
 java.math.BigInteger getG()
          Returns the DSS/DSA parameter "G"
 String getName()
          Returns "DSA", indicating the Digital Signature Algorithm (DSA) as defined by the Digital Signature Standard (DSS), FIPS 186.
 java.math.BigInteger getP()
          Returns the DSS/DSA parameter "P"
 java.math.BigInteger getQ()
          Returns the DSS/DSA parameter "Q"
protected  String paramsToString()
           
 String toString()
           
 
Methods inherited from class com.ibm.security12.sun.security.x509.AlgorithmId
derEncode, encode, encode, equals, equals, equals, get, getAlgorithmId, getEncodedParams, getOID, getParameters, parse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlgIdDSA

public AlgIdDSA()
Default constructor. The OID and parameters must be deserialized before this algorithm ID is used.

AlgIdDSA

public AlgIdDSA(DerValue val)
         throws IOException

AlgIdDSA

public AlgIdDSA(byte[] encodedAlg)
         throws IOException
Construct an AlgIdDSA from an X.509 encoded byte array.

AlgIdDSA

public AlgIdDSA(byte[] p,
                byte[] q,
                byte[] g)
         throws IOException
Constructs a DSS/DSA Algorithm ID from unsigned integers that define the algorithm parameters. Those integers are encoded as big-endian byte arrays.
Parameters:
p - the DSS/DSA paramter "P"
q - the DSS/DSA paramter "Q"
g - the DSS/DSA paramter "G"

AlgIdDSA

public AlgIdDSA(java.math.BigInteger p,
                java.math.BigInteger q,
                java.math.BigInteger g)
Constructs a DSS/DSA Algorithm ID from numeric parameters.
Parameters:
p - the DSS/DSA paramter "P"
q - the DSS/DSA paramter "Q"
g - the DSS/DSA paramter "G"
Method Detail

getP

public java.math.BigInteger getP()
Returns the DSS/DSA parameter "P"
Specified by:
getP in interface DSAParams

getQ

public java.math.BigInteger getQ()
Returns the DSS/DSA parameter "Q"
Specified by:
getQ in interface DSAParams

getG

public java.math.BigInteger getG()
Returns the DSS/DSA parameter "G"
Specified by:
getG in interface DSAParams

getName

public String getName()
Returns "DSA", indicating the Digital Signature Algorithm (DSA) as defined by the Digital Signature Standard (DSS), FIPS 186.
Overrides:
getName in class AlgorithmId

decodeParams

protected void decodeParams()
                     throws IOException
Parses algorithm parameters P, Q, and G. They're found in the "params" member, which never needs to be changed.
Overrides:
decodeParams in class AlgorithmId

toString

public String toString()
Overrides:
toString in class AlgorithmId

paramsToString

protected String paramsToString()
Overrides:
paramsToString in class AlgorithmId