Package java.security.spec
Class RSAMultiPrimePrivateCrtKeySpec
java.lang.Object
java.security.spec.RSAPrivateKeySpec
java.security.spec.RSAMultiPrimePrivateCrtKeySpec
- All Implemented Interfaces:
KeySpec
public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
The key specification of a RSA multi-prime private key with the Chinese
Remainder Theorem (CRT) information values used.
Defined in the PKCS #1 v2.1 standard.
-
Constructor Summary
Constructors Constructor Description RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo)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.RSAOtherPrimeInfo[]getOtherPrimeInfo()Returns the information for the additional primes.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
-
RSAMultiPrimePrivateCrtKeySpec
public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo)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.otherPrimeInfo- the information for the additional primes ornullif there are only the two primes (p, q).- Throws:
IllegalArgumentException- ifotherPrimeInfois not null but empty.
-
-
Method Details
-
getCrtCoefficient
Returns the CRT coefficient,q^-1 mod p.- Returns:
- the CRT coefficient,
q^-1 mod p.
-
getOtherPrimeInfo
Returns the information for the additional primes.- Returns:
- the information for the additional primes, or
nullif there are only the two primes (p, q).
-
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.
-