com.ibm.crypto.fips.provider
Class DSAParameters

java.lang.Object
  |
  +--java.security.AlgorithmParametersSpi
        |
        +--com.ibm.crypto.fips.provider.DSAParameters
All Implemented Interfaces:
AlgorithmStatus

public class DSAParameters
extends java.security.AlgorithmParametersSpi
implements AlgorithmStatus

This class implements Digital Signature Algorithm paremters specified by com.ibm.crypto.fips.provider 186 standard.

Version:
1.00, 07/20/99
Author:
Joyce Leung

Field Summary
protected  java.math.BigInteger g
           
protected  java.math.BigInteger p
           
protected  java.math.BigInteger q
           
 
Constructor Summary
DSAParameters()
           
 
Method Summary
protected  byte[] engineGetEncoded()
          Returns the parameters in encoded bytes.
protected  byte[] engineGetEncoded(java.lang.String encodingMethod)
          Returns the parameters in encoded bytes with encoding method specified.
protected  java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class paramSpec)
          Return the parameter spec used by this parameter instance.
protected  void engineInit(java.security.spec.AlgorithmParameterSpec paramSpec)
          Initialize the DSAParameters by a DSAParameterSpec
protected  void engineInit(byte[] params)
          Initialize the DSAParameters by encoded bytes
protected  void engineInit(byte[] params, java.lang.String decodingMethod)
          Initialize the DSAParameters by encoded bytes with the specified decoding method.
protected  java.lang.String engineToString()
           
protected  byte[] internalGetEncoded()
          Returns the parameters in encoded bytes.
protected  byte[] internalGetEncoded(java.lang.String encodingMethod)
          Returns the parameters in encoded bytes with encoding method specified.
protected  java.security.spec.AlgorithmParameterSpec internalGetParameterSpec(java.lang.Class paramSpec)
          Return the parameter spec used by this parameter instance.
protected  void internalInit(java.security.spec.AlgorithmParameterSpec paramSpec)
          Initialize the DSAParameters by a DSAParameterSpec
protected  void internalInit(byte[] params)
          Initialize the DSAParameters by encoded bytes
protected  void internalInit(byte[] params, java.lang.String decodingMethod)
          Initialize the DSAParameters by encoded bytes with the specified decoding method.
protected  java.lang.String internalToString()
           
 boolean isFipsApproved()
          Module identifies if the cryptographic operation (algorithm) is FIPS certified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

protected java.math.BigInteger p

q

protected java.math.BigInteger q

g

protected java.math.BigInteger g
Constructor Detail

DSAParameters

public DSAParameters()
Method Detail

isFipsApproved

public boolean isFipsApproved()
Description copied from interface: AlgorithmStatus
Module identifies if the cryptographic operation (algorithm) is FIPS certified
Specified by:
isFipsApproved in interface AlgorithmStatus
See Also:
AlgorithmStatus.isFipsApproved()

engineInit

protected void engineInit(java.security.spec.AlgorithmParameterSpec paramSpec)
                   throws java.security.spec.InvalidParameterSpecException
Initialize the DSAParameters by a DSAParameterSpec
Overrides:
engineInit in class java.security.AlgorithmParametersSpi
Parameters:
paramSpec - the DSA algorithm parameter spec for this instance.
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalInit

protected void internalInit(java.security.spec.AlgorithmParameterSpec paramSpec)
                     throws java.security.spec.InvalidParameterSpecException
Initialize the DSAParameters by a DSAParameterSpec
Parameters:
paramSpec - the DSA algorithm parameter spec for this instance.

engineInit

protected void engineInit(byte[] params)
                   throws java.io.IOException
Initialize the DSAParameters by encoded bytes
Overrides:
engineInit in class java.security.AlgorithmParametersSpi
Parameters:
params - the encoded bytes of the parameters.
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalInit

protected void internalInit(byte[] params)
                     throws java.io.IOException
Initialize the DSAParameters by encoded bytes
Parameters:
params - the encoded bytes of the parameters.

engineInit

protected void engineInit(byte[] params,
                          java.lang.String decodingMethod)
                   throws java.io.IOException
Initialize the DSAParameters by encoded bytes with the specified decoding method.
Overrides:
engineInit in class java.security.AlgorithmParametersSpi
Parameters:
params - the encoded bytes of the parameters.
decodingMethod - the decoding method to be used.
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalInit

protected void internalInit(byte[] params,
                            java.lang.String decodingMethod)
                     throws java.io.IOException
Initialize the DSAParameters by encoded bytes with the specified decoding method.
Parameters:
params - the encoded bytes of the parameters.
decodingMethod - the decoding method to be used.

engineGetParameterSpec

protected java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class paramSpec)
                                                                    throws java.security.spec.InvalidParameterSpecException
Return the parameter spec used by this parameter instance.
Overrides:
engineGetParameterSpec in class java.security.AlgorithmParametersSpi
Parameters:
paramSpec - the parameter spec class to be returned
Returns:
AlgorithmParameterSpec the newly generated parameterSpec
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGetParameterSpec

protected java.security.spec.AlgorithmParameterSpec internalGetParameterSpec(java.lang.Class paramSpec)
                                                                      throws java.security.spec.InvalidParameterSpecException
Return the parameter spec used by this parameter instance.
Parameters:
paramSpec - the parameter spec class to be returned
Returns:
AlgorithmParameterSpec the newly generated parameterSpec

engineGetEncoded

protected byte[] engineGetEncoded()
                           throws java.io.IOException
Returns the parameters in encoded bytes.
Overrides:
engineGetEncoded in class java.security.AlgorithmParametersSpi
Returns:
byte[] the encoded parameters
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGetEncoded

protected byte[] internalGetEncoded()
                             throws java.io.IOException
Returns the parameters in encoded bytes.
Returns:
byte[] the encoded parameters

engineGetEncoded

protected byte[] engineGetEncoded(java.lang.String encodingMethod)
                           throws java.io.IOException
Returns the parameters in encoded bytes with encoding method specified.
Overrides:
engineGetEncoded in class java.security.AlgorithmParametersSpi
Returns:
byte[] encoded parameters.
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGetEncoded

protected byte[] internalGetEncoded(java.lang.String encodingMethod)
                             throws java.io.IOException
Returns the parameters in encoded bytes with encoding method specified.
Returns:
byte[] encoded parameters.
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

engineToString

protected java.lang.String engineToString()
Overrides:
engineToString in class java.security.AlgorithmParametersSpi

internalToString

protected java.lang.String internalToString()