com.ibm.crypto.fips.provider

Class DSAKeyFactory

  1. java.lang.Object
  2. extended byjava.security.KeyFactorySpi
  3. extended bycom.ibm.crypto.fips.provider.DSAKeyFactory
All implemented interfaces:
AlgorithmStatus

  1. public class DSAKeyFactory
  2. extends java.security.KeyFactorySpi
  3. implements AlgorithmStatus
This class is a concrete implementaion of key factory for DSA.
Version:
1.0
Author:
OTI

Constructor Summary

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

Method Summary

Modifier and Type Method and Description
  1. protected
  2. java.security.PrivateKey
engineGeneratePrivate(java.security.spec.KeySpec keySpec)
Generates a private key for the given key specification.
  1. protected
  2. java.security.PublicKey
engineGeneratePublic(java.security.spec.KeySpec keySpec)
Generates a public key for the given key specification.
  1. protected
  2. java.security.spec.KeySpec
engineGetKeySpec(java.security.Key key,java.lang.Class keySpec)
Answers a key specification for a given key.
  1. protected
  2. java.security.Key
engineTranslateKey(java.security.Key key)
This action is not allowed in this provider.
  1. protected
  2. java.security.PrivateKey
internalGeneratePrivate(java.security.spec.KeySpec keySpec)
Generates a private key for the given key specification.
  1. protected
  2. java.security.PublicKey
internalGeneratePublic(java.security.spec.KeySpec keySpec)
Generates a public key for the given key specification.
  1. protected
  2. java.security.spec.KeySpec
internalGetKeySpec(java.security.Key key,java.lang.Class keySpec)
Answers a key specification for a given key.
  1. boolean
isFipsApproved()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DSAKeyFactory

  1. public DSAKeyFactory()
Constructs a new instance of this class.

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:

engineGeneratePrivate

  1. protected java.security.PrivateKey engineGeneratePrivate( java.security.spec.KeySpec keySpec)
  2. throws java.security.spec.InvalidKeySpecException
Generates a private key for the given key specification.
Specified by:
engineGeneratePrivate in class java.security.KeyFactorySpi
Parameters:
keySpec - KeySpec the key specification to be used for key generation.
Returns:
PrivateKey the newly created DSA private key
Throws:
java.security.spec.InvalidKeySpecException - if the provided key specification is not appropriate
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGeneratePrivate

  1. protected java.security.PrivateKey internalGeneratePrivate( java.security.spec.KeySpec keySpec)
  2. throws java.security.spec.InvalidKeySpecException
Generates a private key for the given key specification.
Parameters:
keySpec - KeySpec the key specification to be used for key generation.
Returns:
PrivateKey the newly created DSA private key
Throws:
java.security.spec.InvalidKeySpecException - if the provided key specification is not appropriate

engineGeneratePublic

  1. protected java.security.PublicKey engineGeneratePublic( java.security.spec.KeySpec keySpec)
  2. throws java.security.spec.InvalidKeySpecException
Generates a public key for the given key specification.
Specified by:
engineGeneratePublic in class java.security.KeyFactorySpi
Parameters:
keySpec - KeySpec the key specification to be used for key generation.
Returns:
PublicKey the newly created public key
Throws:
java.security.spec.InvalidKeySpecException - if the provided key specification is not appropriate
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGeneratePublic

  1. protected java.security.PublicKey internalGeneratePublic( java.security.spec.KeySpec keySpec)
  2. throws java.security.spec.InvalidKeySpecException
Generates a public key for the given key specification.
Parameters:
keySpec - KeySpec the key specification to be used for key generation.
Returns:
PublicKey the newly created public key
Throws:
java.security.spec.InvalidKeySpecException - if the provided key specification is not appropriate

engineGetKeySpec

  1. protected java.security.spec.KeySpec engineGetKeySpec( java.security.Key key,
  2. java.lang.Class keySpec)
  3. throws java.security.spec.InvalidKeySpecException
Answers a key specification for a given key.
Specified by:
engineGetKeySpec in class java.security.KeyFactorySpi
Parameters:
key - Key the key for which the specification is to be computed.
keySpec - Class the class of the result specification
Returns:
a key specification for a given key. The class of the result object will be keySpec.
Throws:
java.security.spec.InvalidKeySpecException - if the provided key specification is not appropriate
FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.

internalGetKeySpec

  1. protected java.security.spec.KeySpec internalGetKeySpec( java.security.Key key,
  2. java.lang.Class keySpec)
  3. throws java.security.spec.InvalidKeySpecException
Answers a key specification for a given key.
Parameters:
key - Key the key for which the specification is to be computed.
keySpec - Class the class of the result specification
Returns:
a key specification for a given key. The class of the result object will be keySpec.
Throws:
java.security.spec.InvalidKeySpecException - if the provided key specification is not appropriate

engineTranslateKey

  1. protected java.security.Key engineTranslateKey( java.security.Key key)
  2. throws java.security.InvalidKeyException
This action is not allowed in this provider. This method is only here to be complient wiht the SUN JCE JCK tests. If a key is passed in, this method will basically return it back to you without doing any work.
Specified by:
engineTranslateKey in class java.security.KeyFactorySpi
Parameters:
key - the key.
Throws:
java.security.InvalidKeyException - if the given key is null.