- java.lang.Object
-
- java.security.spec.RSAPrivateKeySpec
-
- java.security.spec.RSAMultiPrimePrivateCrtKeySpec
-
- 实现的所有接口
-
KeySpec
public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
此类指定RSA多主私钥,如 PKCS#1 v2.2标准中所定义,使用中国剩余定理(CRT)信息值来提高效率。- 从以下版本开始:
- 1.4
- 另请参见:
-
Key,KeyFactory,KeySpec,PKCS8EncodedKeySpec,RSAPrivateKeySpec,RSAPublicKeySpec,RSAOtherPrimeInfo
-
-
构造方法摘要
构造方法 构造器 描述 RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo)创建一个新的RSAMultiPrimePrivateCrtKeySpec。RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo, AlgorithmParameterSpec keyParams)使用其他关键参数创建新的RSAMultiPrimePrivateCrtKeySpec。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 BigIntegergetCrtCoefficient()返回crtCoefficient。RSAOtherPrimeInfo[]getOtherPrimeInfo()返回otherPrimeInfo的副本,如果只有两个素因子(p和q),则返回null。BigIntegergetPrimeExponentP()返回primeExponentP。BigIntegergetPrimeExponentQ()返回primeExponentQ。BigIntegergetPrimeP()返回primeP。BigIntegergetPrimeQ()返回primeQ。BigIntegergetPublicExponent()返回公共指数。-
声明方法的类 java.security.spec.RSAPrivateKeySpec
getModulus, getParams, getPrivateExponent
-
-
-
-
构造方法详细信息
-
RSAMultiPrimePrivateCrtKeySpec
public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo)
创建一个新的RSAMultiPrimePrivateCrtKeySpec。请注意,复制
otherPrimeInfo的内容是为了防止在构造此对象时进行后续修改。- 参数
-
modulus- 模数n -
publicExponent- 公众指数e -
privateExponent- 私人指数d -
primeP- n的素因子p -
primeQ- q的素因子q -
primeExponentP- 这是d mod(p-1) -
primeExponentQ- 这是d mod(q-1) -
crtCoefficient- 中国剩余定理系数q-1 mod p -
otherPrimeInfo- 如果只有两个素因子(p和q),则可以指定其余素数的三元组 - 异常
-
NullPointerException- 如果除otherPrimeInfo之外的任何指定参数为null -
IllegalArgumentException- 如果指定为空,即0长度,otherPrimeInfo
-
RSAMultiPrimePrivateCrtKeySpec
public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient, RSAOtherPrimeInfo[] otherPrimeInfo, AlgorithmParameterSpec keyParams)
使用其他关键参数创建新的RSAMultiPrimePrivateCrtKeySpec。请注意,复制
otherPrimeInfo的内容是为了防止在构造此对象时进行后续修改。- 参数
-
modulus- 模数n -
publicExponent- 公众指数e -
privateExponent- 私人指数d -
primeP- n的主要因子p -
primeQ- n的素因子q -
primeExponentP- 这是d mod(p-1) -
primeExponentQ- 这是d mod(q-1) -
crtCoefficient- 中国剩余定理系数q-1 mod p -
otherPrimeInfo- 其余素数的三元组,如果只有两个素因子(p和q),则可以指定null -
keyParams- 与密钥关联的参数 - 异常
-
NullPointerException- 如果除otherPrimeInfo和keyParams之外的任何指定参数为null -
IllegalArgumentException- 如果指定为空,即0长度,otherPrimeInfo - 从以下版本开始:
- 11
-
-
方法详细信息
-
getPublicExponent
public BigInteger getPublicExponent()
返回公共指数。- 结果
- 公众指数。
-
getPrimeP
public BigInteger getPrimeP()
返回primeP。- 结果
- primeP。
-
getPrimeQ
public BigInteger getPrimeQ()
返回primeQ。- 结果
- primeQ。
-
getPrimeExponentP
public BigInteger getPrimeExponentP()
返回primeExponentP。- 结果
- primeExponentP。
-
getPrimeExponentQ
public BigInteger getPrimeExponentQ()
返回primeExponentQ。- 结果
- primeExponentQ。
-
getCrtCoefficient
public BigInteger getCrtCoefficient()
返回crtCoefficient。- 结果
- crtCoefficient。
-
getOtherPrimeInfo
public RSAOtherPrimeInfo[] getOtherPrimeInfo()
返回otherPrimeInfo的副本,如果只有两个素因子(p和q),则返回null。- 结果
- otherPrimeInfo。 每次调用此方法时返回一个新数组。
-
-