Module java.base

Class RSAMultiPrimePrivateCrtKeySpec

java.lang.Object
java.security.spec.RSAPrivateKeySpec
java.security.spec.RSAMultiPrimePrivateCrtKeySpec
所有实现的接口:
KeySpec

public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
该类指定了一个RSA多质数私钥,根据中国剩余定理(CRT)信息值在PKCS#1 v2.2标准中定义,以提高效率。
自从:
1.4
参见:
  • Constructor Details

    • 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 - n的质因子q
      primeExponentP - 这是d mod (p-1)
      primeExponentQ - 这是d mod (q-1)
      crtCoefficient - 中国剩余定理系数q-1 mod p
      otherPrimeInfo - 其余质数的三元组,如果只有两个质数因子(p和q),则可以指定为null
      抛出:
      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 - 如果除otherPrimeInfokeyParams之外的任何指定参数为null
      IllegalArgumentException - 如果指定了空的,即长度为0的otherPrimeInfo
      自从:
      11
  • Method Details

    • 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。每次调用此方法时都会返回一个新数组。