模块 java.base

类 RSAMultiPrimePrivateCrtKeySpec

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
参见:
  • 构造方法详细信息

    • 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 之外的任何指定参数为空
      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 之外的任何指定参数为空
      IllegalArgumentException - 如果指定了一个空的,即 0 长度的 otherPrimeInfo
      自从:
      11
  • 方法详情

    • getPublicExponent

      public BigInteger  getPublicExponent()
      返回公共指数。
      返回:
      公共指数。
    • getPrimeP

      public BigInteger  getPrimeP()
      返回 primeP。
      返回:
      总理P。
    • getPrimeQ

      public BigInteger  getPrimeQ()
      返回素数 Q。
      返回:
      质数Q。
    • getPrimeExponentP

      public BigInteger  getPrimeExponentP()
      返回 primeExponentP。
      返回:
      素数指数 P。
    • getPrimeExponentQ

      public BigInteger  getPrimeExponentQ()
      返回 primeExponentQ。
      返回:
      质数指数 Q。
    • getCrtCoefficient

      public BigInteger  getCrtCoefficient()
      返回 crtCoefficient。
      返回:
      crt 系数。
    • getOtherPrimeInfo

      public RSAOtherPrimeInfo [] getOtherPrimeInfo()
      如果只有两个素因子(p 和 q),则返回 otherPrimeInfo 的副本或 null。
      返回:
      otherPrimeInfo。每次调用此方法时返回一个新数组。