Package java.security.spec
Class RSAPrivateCrtKeySpec
java.lang.Object
java.security.spec.RSAPrivateKeySpec
java.security.spec.RSAPrivateCrtKeySpec
- All Implemented Interfaces:
KeySpec
public class RSAPrivateCrtKeySpec extends RSAPrivateKeySpec
The key specification of a RSA private key using Chinese Remainder Theorem
(CRT) values.
Defined in the PKCS #1 v2.1 standard.
-
Constructor Summary
Constructors Constructor Description RSAPrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient)Creates a newRSAMultiPrimePrivateCrtKeySpecwith the specified modulus, public exponent, private exponent, prime factors, prime exponents, crt coefficient, and additional primes. -
Method Summary
Modifier and Type Method Description BigIntegergetCrtCoefficient()Returns the CRT coefficient,q^-1 mod p.BigIntegergetPrimeExponentP()Returns the exponent of the primep.BigIntegergetPrimeExponentQ()Returns the exponent of the primeq.BigIntegergetPrimeP()Returns the prime factorp.BigIntegergetPrimeQ()Returns the prime factorq.BigIntegergetPublicExponent()Returns the public exponente.Methods inherited from class java.security.spec.RSAPrivateKeySpec
getModulus, getPrivateExponent
-
Constructor Details
-
RSAPrivateCrtKeySpec
public RSAPrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient)Creates a newRSAMultiPrimePrivateCrtKeySpecwith the specified modulus, public exponent, private exponent, prime factors, prime exponents, crt coefficient, and additional primes.- Parameters:
modulus- the modulusn.publicExponent- the public exponente.privateExponent- the private exponentd.primeP- the prime factorpofn.primeQ- the prime factorqofn.primeExponentP- the exponent of the primep.primeExponentQ- the exponent of the primeq.crtCoefficient- the CRT coefficientq^-1 mod p.
-
-
Method Details
-
getCrtCoefficient
Returns the CRT coefficient,q^-1 mod p.- Returns:
- the CRT coefficient,
q^-1 mod p.
-
getPrimeExponentP
Returns the exponent of the primep.- Returns:
- the exponent of the prime
p.
-
getPrimeExponentQ
Returns the exponent of the primeq.- Returns:
- the exponent of the prime
q.
-
getPrimeP
Returns the prime factorp.- Returns:
- the prime factor
p.
-
getPrimeQ
Returns the prime factorq.- Returns:
- the prime factor
q.
-
getPublicExponent
Returns the public exponente.- Returns:
- the public exponent
e.
-