java.security.spec
Class RSAPrivateCrtKeySpec

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.spec.RSAPrivateKeySpec sample code for java.security.spec.RSAPrivateKeySpec definition code for java.security.spec.RSAPrivateKeySpec 
      extended by java.security.spec.RSAPrivateCrtKeySpec
All Implemented Interfaces:
KeySpec sample code for java.security.spec.KeySpec definition code for java.security.spec.KeySpec

public class RSAPrivateCrtKeySpec
extends RSAPrivateKeySpec sample code for java.security.spec.RSAPrivateKeySpec definition code for java.security.spec.RSAPrivateKeySpec

This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.

See Also:
Key sample code for java.security.Key definition code for java.security.Key , KeyFactory sample code for java.security.KeyFactory definition code for java.security.KeyFactory , KeySpec sample code for java.security.spec.KeySpec definition code for java.security.spec.KeySpec , PKCS8EncodedKeySpec sample code for java.security.spec.PKCS8EncodedKeySpec definition code for java.security.spec.PKCS8EncodedKeySpec , RSAPrivateKeySpec sample code for java.security.spec.RSAPrivateKeySpec definition code for java.security.spec.RSAPrivateKeySpec , RSAPublicKeySpec sample code for java.security.spec.RSAPublicKeySpec definition code for java.security.spec.RSAPublicKeySpec

Constructor Summary
RSAPrivateCrtKeySpec sample code for java.security.spec.RSAPrivateCrtKeySpec.RSAPrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger) definition code for java.security.spec.RSAPrivateCrtKeySpec.RSAPrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger) (BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  modulus, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  publicExponent, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  privateExponent, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeP, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeQ, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeExponentP, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeExponentQ, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  crtCoefficient)
          Creates a new RSAPrivateCrtKeySpec given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1.
 
Method Summary
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getCrtCoefficient sample code for java.security.spec.RSAPrivateCrtKeySpec.getCrtCoefficient() definition code for java.security.spec.RSAPrivateCrtKeySpec.getCrtCoefficient() ()
          Returns the crtCoefficient.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getPrimeExponentP sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentP() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentP() ()
          Returns the primeExponentP.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getPrimeExponentQ sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentQ() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentQ() ()
          Returns the primeExponentQ.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getPrimeP sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeP() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeP() ()
          Returns the primeP.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getPrimeQ sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeQ() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeQ() ()
          Returns the primeQ.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getPublicExponent sample code for java.security.spec.RSAPrivateCrtKeySpec.getPublicExponent() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPublicExponent() ()
          Returns the public exponent.
 
Methods inherited from class java.security.spec.RSAPrivateKeySpec sample code for java.security.spec.RSAPrivateKeySpec definition code for java.security.spec.RSAPrivateKeySpec
getModulus sample code for java.security.spec.RSAPrivateKeySpec.getModulus() definition code for java.security.spec.RSAPrivateKeySpec.getModulus() , getPrivateExponent sample code for java.security.spec.RSAPrivateKeySpec.getPrivateExponent() definition code for java.security.spec.RSAPrivateKeySpec.getPrivateExponent()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

RSAPrivateCrtKeySpec sample code for java.security.spec.RSAPrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger) definition code for java.security.spec.RSAPrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger)

public RSAPrivateCrtKeySpec(BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  modulus,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  publicExponent,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  privateExponent,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeP,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeQ,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeExponentP,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  primeExponentQ,
                            BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  crtCoefficient)
Creates a new RSAPrivateCrtKeySpec given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1.

Parameters:
modulus - the modulus n
publicExponent - the public exponent e
privateExponent - the private exponent d
primeP - the prime factor p of n
primeQ - the prime factor q of n
primeExponentP - this is d mod (p-1)
primeExponentQ - this is d mod (q-1)
crtCoefficient - the Chinese Remainder Theorem coefficient q-1 mod p
Method Detail

getPublicExponent sample code for java.security.spec.RSAPrivateCrtKeySpec.getPublicExponent() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPublicExponent()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getPublicExponent()
Returns the public exponent.

Returns:
the public exponent

getPrimeP sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeP() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeP()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getPrimeP()
Returns the primeP.

Returns:
the primeP

getPrimeQ sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeQ() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeQ()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getPrimeQ()
Returns the primeQ.

Returns:
the primeQ

getPrimeExponentP sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentP() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentP()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getPrimeExponentP()
Returns the primeExponentP.

Returns:
the primeExponentP

getPrimeExponentQ sample code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentQ() definition code for java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentQ()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getPrimeExponentQ()
Returns the primeExponentQ.

Returns:
the primeExponentQ

getCrtCoefficient sample code for java.security.spec.RSAPrivateCrtKeySpec.getCrtCoefficient() definition code for java.security.spec.RSAPrivateCrtKeySpec.getCrtCoefficient()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getCrtCoefficient()
Returns the crtCoefficient.

Returns:
the crtCoefficient