RSAPrivateKeySpec

RSAPrivateKeySpec (RSA 개인 키 명세)

RSA 개인 키를 지정하는 클래스예요. KeySpec 인터페이스의 구현으로, RSA 개인 키를 구성하는 수학적 값들을 담아요.

출처: Java API Reference

본문

public class RSAPrivateKeySpec
    extends Object
    implements KeySpec
public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent)
  • modulus — n (계수)
  • privateExponent — d (개인 지수)

각 값은 getModulus()getPrivateExponent()로 얻을 수 있어요.

RSAPrivateCrtKeySpec이 CRT(중국인 나머지 정리) 값까지 담는 더 많은 정보를 가진 변형이라면, 이 클래스는 필수 값인 modulus와 private exponent만 담는 기본 개인 키 명세예요. RSA 개인 키를 KeyFactory로 생성할 때 이 명세를 사용할 수 있어요.

더 알아보기 (Learn more)

Java 공식 API