APIdia Launch Partner
Top Description Fields Constructors Methods
java.security.spec

public Class RSAPrivateCrtKeySpec

extends RSAPrivateKeySpec
Class Inheritance
Imports
java.math.BigInteger

This class specifies an RSA private key, as defined in the PKCS#1 v2.2 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
Author
Jan Luehe
Since
1.2
External Specification
https://www.rfc-editor.org/info/rfc8017
See Also
java.security.Key, java.security.KeyFactory, KeySpec, PKCS8EncodedKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec

Field Summary

Modifier and TypeField and Description
private final BigInteger
private final BigInteger
private final BigInteger
private final BigInteger
private final BigInteger
private final BigInteger

Constructor Summary

AccessConstructor and Description
public
RSAPrivateCrtKeySpec(BigInteger
the modulus n
modulus
,
BigInteger
the public exponent e
publicExponent
,
BigInteger
the private exponent d
privateExponent
,
BigInteger
the prime factor p of n
primeP
,
BigInteger
the prime factor q of n
primeQ
,
BigInteger
this is d mod (p-1)
primeExponentP
,
BigInteger
this is d mod (q-1)
primeExponentQ
,
BigInteger
the Chinese Remainder Theorem coefficient q-1 mod p
crtCoefficient
)

Creates a new RSAPrivateCrtKeySpec.

public
RSAPrivateCrtKeySpec(BigInteger
the modulus n
modulus
,
BigInteger
the public exponent e
publicExponent
,
BigInteger
the private exponent d
privateExponent
,
BigInteger
the prime factor p of n
primeP
,
BigInteger
the prime factor q of n
primeQ
,
BigInteger
this is d mod (p-1)
primeExponentP
,
BigInteger
this is d mod (q-1)
primeExponentQ
,
BigInteger
the Chinese Remainder Theorem coefficient q-1 mod p
crtCoefficient
,
AlgorithmParameterSpec
the parameters associated with key
keyParams
)

Creates a new RSAPrivateCrtKeySpec with additional key parameters.

Method Summary

Modifier and TypeMethod and Description
public BigInteger

Returns:

the crtCoefficient
getCrtCoefficient
()

Returns the crtCoefficient.

public BigInteger

Returns:

the primeExponentP
getPrimeExponentP
()

Returns the primeExponentP.

public BigInteger

Returns:

the primeExponentQ
getPrimeExponentQ
()

Returns the primeExponentQ.

public BigInteger

Returns:

the primeP
getPrimeP
()

Returns the primeP.

public BigInteger

Returns:

the primeQ
getPrimeQ
()

Returns the primeQ.

public BigInteger

Returns:

the public exponent
getPublicExponent
()

Returns the public exponent.

Inherited from java.security.spec.RSAPrivateKeySpec:
getModulusgetParamsgetPrivateExponent

Field Detail

crtCoefficientback to summary
private final BigInteger crtCoefficient
primeExponentPback to summary
private final BigInteger primeExponentP
primeExponentQback to summary
private final BigInteger primeExponentQ
primePback to summary
private final BigInteger primeP
primeQback to summary
private final BigInteger primeQ
publicExponentback to summary
private final BigInteger publicExponent

Constructor Detail

RSAPrivateCrtKeySpecback to summary
public RSAPrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient)

Creates a new RSAPrivateCrtKeySpec.

Parameters
modulus:BigInteger

the modulus n

publicExponent:BigInteger

the public exponent e

privateExponent:BigInteger

the private exponent d

primeP:BigInteger

the prime factor p of n

primeQ:BigInteger

the prime factor q of n

primeExponentP:BigInteger

this is d mod (p-1)

primeExponentQ:BigInteger

this is d mod (q-1)

crtCoefficient:BigInteger

the Chinese Remainder Theorem coefficient q-1 mod p

RSAPrivateCrtKeySpecback to summary
public RSAPrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, AlgorithmParameterSpec keyParams)

Creates a new RSAPrivateCrtKeySpec with additional key parameters.

Parameters
modulus:BigInteger

the modulus n

publicExponent:BigInteger

the public exponent e

privateExponent:BigInteger

the private exponent d

primeP:BigInteger

the prime factor p of n

primeQ:BigInteger

the prime factor q of n

primeExponentP:BigInteger

this is d mod (p-1)

primeExponentQ:BigInteger

this is d mod (q-1)

crtCoefficient:BigInteger

the Chinese Remainder Theorem coefficient q-1 mod p

keyParams:AlgorithmParameterSpec

the parameters associated with key

Since
11

Method Detail

getCrtCoefficientback to summary
public BigInteger getCrtCoefficient()

Returns the crtCoefficient.

Returns:BigInteger

the crtCoefficient

getPrimeExponentPback to summary
public BigInteger getPrimeExponentP()

Returns the primeExponentP.

Returns:BigInteger

the primeExponentP

getPrimeExponentQback to summary
public BigInteger getPrimeExponentQ()

Returns the primeExponentQ.

Returns:BigInteger

the primeExponentQ

getPrimePback to summary
public BigInteger getPrimeP()

Returns the primeP.

Returns:BigInteger

the primeP

getPrimeQback to summary
public BigInteger getPrimeQ()

Returns the primeQ.

Returns:BigInteger

the primeQ

getPublicExponentback to summary
public BigInteger getPublicExponent()

Returns the public exponent.

Returns:BigInteger

the public exponent