# RSAPrivateCrtKeySpec

public class **RSAPrivateCrtKeySpec** extends [RSAPrivateKeySpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateKeySpec.html)  
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

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/KeyFactory.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/KeySpec.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/PKCS8EncodedKeySpec.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateKeySpec.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPublicKeySpec.html`

### Public Constructor Summary

|---|---|
|   | [RSAPrivateCrtKeySpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#RSAPrivateCrtKeySpec(java.math.BigInteger,%20java.math.BigInteger,%20java.math.BigInteger,%20java.math.BigInteger,%20java.math.BigInteger,%20java.math.BigInteger,%20java.math.BigInteger,%20java.math.BigInteger))(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient) Creates a new `RSAPrivateCrtKeySpec` given the modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, and crtCoefficient as defined in PKCS#1. |

### Public Method Summary

|---|---|
| BigInteger | [getCrtCoefficient](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#getCrtCoefficient())() Returns the crtCoefficient. |
| BigInteger | [getPrimeExponentP](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#getPrimeExponentP())() Returns the primeExponentP. |
| BigInteger | [getPrimeExponentQ](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#getPrimeExponentQ())() Returns the primeExponentQ. |
| BigInteger | [getPrimeP](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#getPrimeP())() Returns the primeP. |
| BigInteger | [getPrimeQ](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#getPrimeQ())() Returns the primeQ. |
| BigInteger | [getPublicExponent](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateCrtKeySpec.html#getPublicExponent())() Returns the public exponent. |

### Inherited Method Summary

From class [java.security.spec.RSAPrivateKeySpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateKeySpec.html)

|---|---|
| BigInteger | [getModulus](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateKeySpec.html#getModulus())() Returns the modulus. |
| BigInteger | [getPrivateExponent](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/RSAPrivateKeySpec.html#getPrivateExponent())() Returns the private exponent. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Constructors

#### public
**RSAPrivateCrtKeySpec**
(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, 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 |
|---|---|

## Public Methods

#### public BigInteger
**getCrtCoefficient**
()

Returns the crtCoefficient.

##### Returns

- the crtCoefficient

#### public BigInteger
**getPrimeExponentP**
()

Returns the primeExponentP.

##### Returns

- the primeExponentP

#### public BigInteger
**getPrimeExponentQ**
()

Returns the primeExponentQ.

##### Returns

- the primeExponentQ

#### public BigInteger
**getPrimeP**
()

Returns the primeP.

##### Returns

- the primeP

#### public BigInteger
**getPrimeQ**
()

Returns the primeQ.

##### Returns

- the primeQ

#### public BigInteger
**getPublicExponent**
()

Returns the public exponent.

##### Returns

- the public exponent