public class RSAMultiPrimePrivateCrtKeySpec
extends RSAPrivateKeySpec
| java.lang.Object | ||
| java.security.spec.RSAPrivateKeySpec | ||
| java.security.spec.RSAMultiPrimePrivateCrtKeySpec | ||
该类使用中国剩余定理(CRT)信息值来指定RSA多主密钥,如PKCS#1 v2.1中所定义的那样,以提高效率。
也可以看看:
Public constructors |
|
|---|---|
RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo) 根据PKCS#1 v2.1中定义的模数,publicExponent,privateExponent,primeP,primeQ,primeExponentP,primeExponentQ,crtCoefficient和otherPrimeInfo创建新的 |
|
公共方法(Public methods) |
|
|---|---|
BigInteger |
getCrtCoefficient() 返回crtCoefficient。 |
RSAOtherPrimeInfo[] |
getOtherPrimeInfo() 返回otherPrimeInfo的副本,如果只有两个素数因子(p和q),则返回null。 |
BigInteger |
getPrimeExponentP() 返回primeExponentP。 |
BigInteger |
getPrimeExponentQ() 返回primeExponentQ。 |
BigInteger |
getPrimeP() 返回primeP。 |
BigInteger |
getPrimeQ() 返回primeQ。 |
BigInteger |
getPublicExponent() 返回公共指数。 |
继承方法(Inherited methods) |
|
|---|---|
java.security.spec.RSAPrivateKeySpec
|
|
java.lang.Object
|
|
RSAMultiPrimePrivateCrtKeySpec (BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo)
根据PKCS#1 v2.1中定义的模数,publicExponent,privateExponent,primeP,primeQ,primeExponentP,primeExponentQ,crtCoefficient和otherPrimeInfo创建新的 RSAMultiPrimePrivateCrtKeySpec 。
请注意,复制 otherPrimeInfo的内容是为了防止构建此对象时的后续修改。
| 参数(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. |
otherPrimeInfo |
RSAOtherPrimeInfo: triplets of the rest of primes, null can be specified if there are only two prime factors (p and q). |
| 抛出异常(Throws) | |
|---|---|
NullPointerException |
if any of the parameters, i.e. modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, primeExponentQ, crtCoefficient, is null. |
IllegalArgumentException |
if an empty, i.e. 0-length, otherPrimeInfo is specified. |
BigInteger getCrtCoefficient ()
返回crtCoefficient。
| 返回(Returns) | |
|---|---|
BigInteger |
the crtCoefficient. |
RSAOtherPrimeInfo[] getOtherPrimeInfo ()
返回otherPrimeInfo的副本,如果只有两个素数因子(p和q),则返回null。
| 返回(Returns) | |
|---|---|
RSAOtherPrimeInfo[] |
the otherPrimeInfo. Returns a new array each time this method is called. |
BigInteger getPrimeExponentP ()
返回primeExponentP。
| 返回(Returns) | |
|---|---|
BigInteger |
the primeExponentP. |
BigInteger getPrimeExponentQ ()
返回primeExponentQ。
| 返回(Returns) | |
|---|---|
BigInteger |
the primeExponentQ. |
BigInteger getPublicExponent ()
返回公共指数。
| 返回(Returns) | |
|---|---|
BigInteger |
the public exponent. |