RSAPrivateCrtKeySpec (Java SE 9 & JDK 9 ) (original) (raw)
- java.security.spec.RSAPrivateKeySpec
- java.security.spec.RSAPrivateCrtKeySpec
All Implemented Interfaces:
[KeySpec](../../../java/security/spec/KeySpec.html "interface in java.security.spec")
public class RSAPrivateCrtKeySpec
extends RSAPrivateKeySpec
This class specifies an RSA private key, as defined in the PKCS#1 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency.
Since:
1.2
See Also:
Key, KeyFactory, KeySpec, PKCS8EncodedKeySpec, RSAPrivateKeySpec, RSAPublicKeySpec
Constructor Summary
Constructors
Constructor Description 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. Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method Description BigInteger getCrtCoefficient() Returns the crtCoefficient. BigInteger getPrimeExponentP() Returns the primeExponentP. BigInteger getPrimeExponentQ() Returns the primeExponentQ. BigInteger getPrimeP() Returns the primeP. BigInteger getPrimeQ() Returns the primeQ. BigInteger getPublicExponent() Returns the public exponent. * ### Methods inherited from class java.lang.[Object](../../../java/lang/Object.html "class in java.lang") `[clone](../../../java/lang/Object.html#clone--), [equals](../../../java/lang/Object.html#equals-java.lang.Object-), [finalize](../../../java/lang/Object.html#finalize--), [getClass](../../../java/lang/Object.html#getClass--), [hashCode](../../../java/lang/Object.html#hashCode--), [notify](../../../java/lang/Object.html#notify--), [notifyAll](../../../java/lang/Object.html#notifyAll--), [toString](../../../java/lang/Object.html#toString--), [wait](../../../java/lang/Object.html#wait--), [wait](../../../java/lang/Object.html#wait-long-), [wait](../../../java/lang/Object.html#wait-long-int-)` * ### Methods inherited from class java.security.spec.[RSAPrivateKeySpec](../../../java/security/spec/RSAPrivateKeySpec.html "class in java.security.spec") `[getModulus](../../../java/security/spec/RSAPrivateKeySpec.html#getModulus--), [getPrivateExponent](../../../java/security/spec/RSAPrivateKeySpec.html#getPrivateExponent--)`
Constructor Detail
* #### RSAPrivateCrtKeySpec public RSAPrivateCrtKeySpec([BigInteger](../../../java/math/BigInteger.html "class in java.math") modulus, [BigInteger](../../../java/math/BigInteger.html "class in java.math") publicExponent, [BigInteger](../../../java/math/BigInteger.html "class in java.math") privateExponent, [BigInteger](../../../java/math/BigInteger.html "class in java.math") primeP, [BigInteger](../../../java/math/BigInteger.html "class in java.math") primeQ, [BigInteger](../../../java/math/BigInteger.html "class in java.math") primeExponentP, [BigInteger](../../../java/math/BigInteger.html "class in java.math") primeExponentQ, [BigInteger](../../../java/math/BigInteger.html "class in java.math") 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
Method Detail
* #### getPublicExponent public [BigInteger](../../../java/math/BigInteger.html "class in java.math") getPublicExponent() Returns the public exponent. Returns: the public exponent * #### getPrimeP public [BigInteger](../../../java/math/BigInteger.html "class in java.math") getPrimeP() Returns the primeP. Returns: the primeP * #### getPrimeQ public [BigInteger](../../../java/math/BigInteger.html "class in java.math") getPrimeQ() Returns the primeQ. Returns: the primeQ * #### getPrimeExponentP public [BigInteger](../../../java/math/BigInteger.html "class in java.math") getPrimeExponentP() Returns the primeExponentP. Returns: the primeExponentP * #### getPrimeExponentQ public [BigInteger](../../../java/math/BigInteger.html "class in java.math") getPrimeExponentQ() Returns the primeExponentQ. Returns: the primeExponentQ * #### getCrtCoefficient public [BigInteger](../../../java/math/BigInteger.html "class in java.math") getCrtCoefficient() Returns the crtCoefficient. Returns: the crtCoefficient
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.