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
All Methods Instance Methods Concrete Methods 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 Detail
-
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 Detail
-
getCrtCoefficient
public BigInteger getCrtCoefficient()
Returns the CRT coefficient,q^-1 mod p.- Returns:
- the CRT coefficient,
q^-1 mod p.
-
getPrimeExponentP
public BigInteger getPrimeExponentP()
Returns the exponent of the primep.- Returns:
- the exponent of the prime
p.
-
getPrimeExponentQ
public BigInteger getPrimeExponentQ()
Returns the exponent of the primeq.- Returns:
- the exponent of the prime
q.
-
getPrimeP
public BigInteger getPrimeP()
Returns the prime factorp.- Returns:
- the prime factor
p.
-
getPrimeQ
public BigInteger getPrimeQ()
Returns the prime factorq.- Returns:
- the prime factor
q.
-
getPublicExponent
public BigInteger getPublicExponent()
Returns the public exponente.- Returns:
- the public exponent
e.
-
-