Chapter 21. The java.security.spec PackageThe java.security.spec package contains classes that define transparent representations for DSA and RSA public and private keys and for X.509 and PKCS#8 encodings of those keys. It also defines a transparent representation for DSA algorithm parameters. The classes in this package are used in conjunction with java.security.KeyFactory and java.security.AlgorithmParameters for converting opaque Key and AlgorithmParameters objects to and from transparent representations. Figure 21-1 shows the class hierarchy of this package. Figure 21-1. The java.security.spec packageThis package is not frequently used. To make use of it, you must be somewhat familiar with the mathematics that underlies DSA and RSA public-key encryption and the encoding standards that specify how keys are encoded as byte streams.
This interface defines no methods; it marks classes that define a transparent representation of cryptographic parameters. You can use an AlgorithmParameterSpec object to initialize an opaque java.security.AlgorithmParameters object.
Implementations: DSAParameterSpec, RSAKeyGenParameterSpec, javax.crypto.spec.DHGenParameterSpec, javax.crypto.spec.DHParameterSpec, javax.crypto.spec.IvParameterSpec, javax.crypto.spec.PBEParameterSpec, javax.crypto.spec.RC2ParameterSpec, javax.crypto.spec.RC5ParameterSpec Passed To: Too many methods to list. Returned By: java.security.AlgorithmParameters.getParameterSpec(), java.security.AlgorithmParametersSpi.engineGetParameterSpec()
This class represents algorithm parameters used with DSA public-key cryptography.
Hierarchy: Object-->DSAParameterSpec(AlgorithmParameterSpec,java.security.interfaces.DSAParams)
This class is a transparent representation of a DSA private key.
Hierarchy: Object-->DSAPrivateKeySpec(KeySpec)
This class is a transparent representation of a DSA public key.
Hierarchy: Object-->DSAPublicKeySpec(KeySpec)
This abstract class represents a public or private key in an encoded format. It serves as the superclass for encoding-specific classes.
Hierarchy: Object-->EncodedKeySpec(KeySpec) Subclasses: PKCS8EncodedKeySpec, X509EncodedKeySpec
Signals a problem with a KeySpec.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->java.security.GeneralSecurityException-->InvalidKeySpecException Thrown By: java.security.KeyFactory.{generatePrivate(), generatePublic(), getKeySpec()}, java.security.KeyFactorySpi.{engineGeneratePrivate(), engineGeneratePublic(), engineGetKeySpec()}, javax.crypto.SecretKeyFactory.{generateSecret(), getKeySpec()}, javax.crypto.SecretKeyFactorySpi.{engineGenerateSecret(), engineGetKeySpec()}
Signals a problem with an AlgorithmParameterSpec.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->java.security.GeneralSecurityException-->InvalidParameterSpecException Thrown By: java.security.AlgorithmParameters.{getParameterSpec(), init()}, java.security.AlgorithmParametersSpi.{engineGetParameterSpec(), engineInit()}
This interface defines no methods; it marks classes that define a transparent representation of a cryptographic key. Use a java.security.KeyFactory to convert a KeySpec to and from an opaque java.security.Key.
Implementations: DSAPrivateKeySpec, DSAPublicKeySpec, EncodedKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec, javax.crypto.spec.DESedeKeySpec, javax.crypto.spec.DESKeySpec, javax.crypto.spec.DHPrivateKeySpec, javax.crypto.spec.DHPublicKeySpec, javax.crypto.spec.PBEKeySpec, javax.crypto.spec.SecretKeySpec Passed To: java.security.KeyFactory.{generatePrivate(), generatePublic()}, java.security.KeyFactorySpi.{engineGeneratePrivate(), engineGeneratePublic()}, javax.crypto.SecretKeyFactory.generateSecret(), javax.crypto.SecretKeyFactorySpi.engineGenerateSecret() Returned By: java.security.KeyFactory.getKeySpec(), java.security.KeyFactorySpi.engineGetKeySpec(), javax.crypto.SecretKeyFactory.getKeySpec(), javax.crypto.SecretKeyFactorySpi.engineGetKeySpec()
This class represents a private key, encoded according to the PKCS#8 standard.
Hierarchy: Object-->EncodedKeySpec(KeySpec)-->PKCS8EncodedKeySpec
This class represents parameters that generate public/private key pairs for RSA cryptography.
Hierarchy: Object-->RSAKeyGenParameterSpec(AlgorithmParameterSpec)
This class is a transparent representation of an RSA private key including, for convenience, the Chinese remainder theorem values associated with the key.
Hierarchy: Object-->RSAPrivateKeySpec(KeySpec)-->RSAPrivateCrtKeySpec
This class is a transparent representation of an RSA private key.
Hierarchy: Object-->RSAPrivateKeySpec(KeySpec) Subclasses: RSAPrivateCrtKeySpec
This class is a transparent representation of an RSA public key.
Hierarchy: Object-->RSAPublicKeySpec(KeySpec)
This class represents a public or private key encoded according to the X.509 standard.
Hierarchy: Object-->EncodedKeySpec(KeySpec)-->X509EncodedKeySpec Copyright © 2001 O'Reilly & Associates. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|