Most visited

Recently visited

Added in API level 1

RSAMultiPrimePrivateCrtKeySpec

public class RSAMultiPrimePrivateCrtKeySpec
extends RSAPrivateKeySpec

java.lang.Object
   ↳ java.security.spec.RSAPrivateKeySpec
     ↳ java.security.spec.RSAMultiPrimePrivateCrtKeySpec


该类使用中国剩余定理(CRT)信息值来指定RSA多主密钥,如PKCS#1 v2.1中所定义的那样,以提高效率。

也可以看看:

Summary

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创建新的 RSAMultiPrimePrivateCrtKeySpec

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

From class java.security.spec.RSAPrivateKeySpec
From class java.lang.Object

Public constructors

RSAMultiPrimePrivateCrtKeySpec

Added in API level 1
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.

Public methods

getCrtCoefficient

Added in API level 1
BigInteger getCrtCoefficient ()

返回crtCoefficient。

Returns
BigInteger the crtCoefficient.

getOtherPrimeInfo

Added in API level 1
RSAOtherPrimeInfo[] getOtherPrimeInfo ()

返回otherPrimeInfo的副本,如果只有两个素数因子(p和q),则返回null。

Returns
RSAOtherPrimeInfo[] the otherPrimeInfo. Returns a new array each time this method is called.

getPrimeExponentP

Added in API level 1
BigInteger getPrimeExponentP ()

返回primeExponentP。

Returns
BigInteger the primeExponentP.

getPrimeExponentQ

Added in API level 1
BigInteger getPrimeExponentQ ()

返回primeExponentQ。

Returns
BigInteger the primeExponentQ.

getPrimeP

Added in API level 1
BigInteger getPrimeP ()

返回primeP。

Returns
BigInteger the primeP.

getPrimeQ

Added in API level 1
BigInteger getPrimeQ ()

返回primeQ。

Returns
BigInteger the primeQ.

getPublicExponent

Added in API level 1
BigInteger getPublicExponent ()

返回公共指数。

Returns
BigInteger the public exponent.

Hooray!