RSAMultiPrimePrivateCrtKeySpec
RSAMultiPrimePrivateCrtKeySpec (RSA 다중 소수 CRT 개인 키 명세)
중국인 나머지 정리(CRT, Chinese Remainder Theorem) 정보 값을 효율성을 위해 사용해, PKCS#1 v2.2 표준에 정의된 RSA 다중 소수(multi-prime) 개인 키를 지정하는 클래스예요.
본문
public class RSAMultiPrimePrivateCrtKeySpec
extends RSAPrivateKeySpec
일반적인 RSA 개인 키에 더해 CRT 형식에 필요한 추가 값들(public exponent publicExponent, prime exponent primeExponentP, primeExponentQ, coefficient crtCoefficient, 그리고 추가 소수 정보 otherPrimeInfo)을 담아요.
기본 생성자는 다음과 같아요.
public RSAMultiPrimePrivateCrtKeySpec(
BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient,
RSAOtherPrimeInfo[] otherPrimeInfo)
modulus— npublicExponent— eprivateExponent— dprimeP— 소수 pprimeQ— 소수 qprimeExponentP— d mod (p-1)primeExponentQ— d mod (q-1)crtCoefficient— (inverse of q) mod potherPrimeInfo— 추가 소수의 triplets. 선택적이며null일 수 있어요.
각 값은 getModulus(), getPublicExponent(), getPrivateExponent(), getPrimeP(), getPrimeQ(), getPrimeExponentP(), getPrimeExponentQ(), getCrtCoefficient(), getOtherPrimeInfo()로 얻을 수 있어요. otherPrimeInfo가 유효하지 않으면 생성 시 IllegalArgumentException이 던져질 수 있어요.