com.ibm.crypto.fips.provider

Class SHA1withDSA

  1. java.lang.Object
  2. extended byjava.security.SignatureSpi
  3. extended byjava.security.Signature
  4. extended bycom.ibm.crypto.fips.provider.SHA1withDSA
All implemented interfaces:
AlgorithmStatus

  1. public class SHA1withDSA
  2. extends java.security.Signature
  3. implements AlgorithmStatus

Field Summary

Fields inherited from class java.security.Signature
SIGN, state, UNINITIALIZED, VERIFY
Fields inherited from class java.security.SignatureSpi
appRandom

Constructor Summary

Constructor and Description
SHA1withDSA()
Constructs a new instance of this class.

Method Summary

Modifier and Type Method and Description
  1. protected
  2. java.lang.Object
engineGetParameter(java.lang.String param)
Deprecated.
  1. protected
  2. void
engineInitSign(java.security.PrivateKey privateKey)
Initialize the receiver with the specified private key, to be used for signing purposes.
  1. protected
  2. void
engineInitVerify(java.security.PublicKey publicKey)
Initialize the receiver with the specified public key, to be used for verification purposes.
  1. protected
  2. void
engineSetParameter(java.lang.String param,java.lang.Object value)
Deprecated. Replaced with engineSetParameter(AlgorithmParameterSpec)
  1. protected
  2. byte[]
engineSign()
Answers the signature bytes of the data updated so far.
  1. protected
  2. void
engineUpdate(byte b)
Update the bytes signed so far with the extra byte provided.
  1. protected
  2. void
engineUpdate(byte[] buffer,int offset,int length)
Update the bytes signed so far with the extra bytes provided.
  1. protected
  2. boolean
engineVerify(byte[] sigBytes)
Verifies the passed signature.
  1. protected
  2. java.lang.Object
internalGetParameter(java.lang.String param)
Deprecated.
  1. protected
  2. void
internalInitSign(java.security.PrivateKey privateKey)
Initialize the receiver with the specified private key, to be used for signing purposes.
  1. protected
  2. void
internalInitVerify(java.security.PublicKey publicKey)
Initialize the receiver with the specified public key, to be used for verification purposes.
  1. protected
  2. void
internalSetParameter(java.lang.String param,java.lang.Object value)
Deprecated. Replaced with engineSetParameter(AlgorithmParameterSpec)
  1. protected
  2. byte[]
internalSign()
Answers the signature bytes of the data updated so far.
  1. protected
  2. java.lang.String
internalToString()
Answers a string containing a concise, human-readable description of the receiver.
  1. protected
  2. void
internalUpdate(byte b)
Update the bytes signed so far with the extra byte provided.
  1. protected
  2. void
internalUpdate(byte[] buffer,int offset,int length)
Update the bytes signed so far with the extra bytes provided.
  1. protected
  2. boolean
internalVerify(byte[] sigBytes)
Verifies the passed signature.
  1. boolean
isFipsApproved()
  1. java.lang.String
toString()
Answers a string containing a concise, human-readable description of the receiver.
Methods inherited from class java.security.Signature
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, update, update, update, update, verify, verify
Methods inherited from class java.security.SignatureSpi
engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SHA1withDSA

  1. public SHA1withDSA()
  2. throws java.security.NoSuchAlgorithmException
  3. java.security.NoSuchProviderException
Constructs a new instance of this class.
Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

Method Detail

isFipsApproved

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

engineGetParameter

  1. protected java.lang.Object engineGetParameter( java.lang.String param)
  2. throws java.security.InvalidParameterException
Deprecated.
Answers the specified algorithm parameter. Since no parameters can be specified, it always throws an exception.
Specified by:
engineGetParameter in class java.security.SignatureSpi
Parameters:
param - String the parameter name.
Returns:
the specified algorithm parameter.
Throws:
java.security.InvalidParameterException - if the specified parameter name is invalid
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGetParameter

  1. protected java.lang.Object internalGetParameter( java.lang.String param)
  2. throws java.security.InvalidParameterException
Deprecated.
Answers the specified algorithm parameter. Since no parameters can be specified, it always throws an exception.
Parameters:
param - String the parameter name.
Returns:
the specified algorithm parameter.
Throws:
java.security.InvalidParameterException - if the specified parameter name is invalid

engineInitSign

  1. protected void engineInitSign(java.security.PrivateKey privateKey)
  2. throws java.security.InvalidKeyException
Initialize the receiver with the specified private key, to be used for signing purposes.
Specified by:
engineInitSign in class java.security.SignatureSpi
Parameters:
privateKey - PrivateKey the key to be used when signing
Throws:
java.security.InvalidKeyException - if the specified key is not valid (improperly encoded, parameters missing, etc)
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalInitSign

  1. protected void internalInitSign( java.security.PrivateKey privateKey)
  2. throws java.security.InvalidKeyException
Initialize the receiver with the specified private key, to be used for signing purposes.
Parameters:
privateKey - PrivateKey the key to be used when signing
Throws:
java.security.InvalidKeyException - if the specified key is not valid (improperly encoded, parameters missing, etc)

engineInitVerify

  1. protected void engineInitVerify( java.security.PublicKey publicKey)
  2. throws java.security.InvalidKeyException
Initialize the receiver with the specified public key, to be used for verification purposes.
Specified by:
engineInitVerify in class java.security.SignatureSpi
Throws:
java.security.InvalidKeyException - if the specified key is not valid (improperly encoded, parameters missing, etc)
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalInitVerify

  1. protected void internalInitVerify( java.security.PublicKey publicKey)
  2. throws java.security.InvalidKeyException
Initialize the receiver with the specified public key, to be used for verification purposes.
Parameters:
publicKey - PublicKey the key to be used when verifying
Throws:
java.security.InvalidKeyException - if the specified key is not valid (improperly encoded, parameters missing, etc)

engineSetParameter

  1. protected void engineSetParameter( java.lang.String param,
  2. java.lang.Object value)
  3. throws java.security.InvalidParameterException
Deprecated. Replaced with engineSetParameter(AlgorithmParameterSpec)
Initializes the receiver with the given parameter set.
Specified by:
engineSetParameter in class java.security.SignatureSpi
Parameters:
param - String the parameter name
value - Object the parameter value
Throws:
java.security.InvalidParameterException - if the specified parameter name is not valid for the receiver or if it has been set already
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalSetParameter

  1. protected void internalSetParameter( java.lang.String param,
  2. java.lang.Object value)
  3. throws java.security.InvalidParameterException
Deprecated. Replaced with engineSetParameter(AlgorithmParameterSpec)
Initializes the receiver with the given parameter set.
Parameters:
param - String the parameter name
value - Object the parameter value
Throws:
java.security.InvalidParameterException - if the specified parameter name is not valid for the receiver or if it has been set already

engineSign

  1. protected byte[] engineSign()
  2. throws java.security.SignatureException
Answers the signature bytes of the data updated so far.
Specified by:
engineSign in class java.security.SignatureSpi
Returns:
the signature bytes of the data updated so far.
Throws:
java.security.SignatureException - if the engine is not initialized properly
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalSign

  1. protected byte[] internalSign()
  2. throws java.security.SignatureException
Answers the signature bytes of the data updated so far.
Returns:
the signature bytes of the data updated so far.
Throws:
java.security.SignatureException - if the engine is not initialized properly

engineUpdate

  1. protected void engineUpdate(byte b)
  2. throws java.security.SignatureException
Update the bytes signed so far with the extra byte provided.
Specified by:
engineUpdate in class java.security.SignatureSpi
Parameters:
b - byte the extra byte to be signed.
Throws:
java.security.SignatureException - if the receiver is not initialized properly
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalUpdate

  1. protected void internalUpdate(byte b)
  2. throws java.security.SignatureException
Update the bytes signed so far with the extra byte provided.
Parameters:
b - byte the extra byte to be signed.
Throws:
java.security.SignatureException - if the receiver is not initialized properly

engineUpdate

  1. protected void engineUpdate(byte[] buffer,
  2. int offset,
  3. int length)
  4. throws java.security.SignatureException
Update the bytes signed so far with the extra bytes provided.
Specified by:
engineUpdate in class java.security.SignatureSpi
Parameters:
buffer - byte[] the extra bytes to be signed.
offset - int offset in the buffer where to start getting bytes for signing
length - int how many bytes to get for signing
Throws:
java.security.SignatureException - if the receiver is not initialized properly
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalUpdate

  1. protected void internalUpdate(byte[] buffer,
  2. int offset,
  3. int length)
  4. throws java.security.SignatureException
Update the bytes signed so far with the extra bytes provided.
Parameters:
buffer - byte[] the extra bytes to be signed.
offset - int offset in the buffer where to start getting bytes for signing
length - int how many bytes to get for signing
Throws:
java.security.SignatureException - if the receiver is not initialized properly

engineVerify

  1. protected boolean engineVerify( byte[] sigBytes)
  2. throws java.security.SignatureException
Verifies the passed signature.
Specified by:
engineVerify in class java.security.SignatureSpi
Parameters:
sigBytes - byte[] the signature bytes to verify
Returns:
true if the signature was verified successfully, false otherwise.
Throws:
java.security.SignatureException - if the receiver is not initialized properly or if the key is not encoded properly.
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalVerify

  1. protected boolean internalVerify( byte[] sigBytes)
  2. throws java.security.SignatureException
Verifies the passed signature.
Parameters:
sigBytes - byte[] the signature bytes to verify
Returns:
true if the signature was verified successfully, false otherwise.
Throws:
java.security.SignatureException - if the receiver is not initialized properly or if the key is not encoded properly.

toString

  1. public java.lang.String toString( )
Answers a string containing a concise, human-readable description of the receiver.
Overrides:
toString in class java.security.Signature
Returns:
a printable representation for the receiver.
Throws:
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalToString

  1. protected java.lang.String internalToString( )
Answers a string containing a concise, human-readable description of the receiver.
Returns:
a printable representation for the receiver.