public class RSAPrivateKey extends ASN1Object
Constructor and Description |
---|
RSAPrivateKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger prime1,
BigInteger prime2,
BigInteger exponent1,
BigInteger exponent2,
BigInteger coefficient) |
Modifier and Type | Method and Description |
---|---|
BigInteger |
getCoefficient() |
BigInteger |
getExponent1() |
BigInteger |
getExponent2() |
static RSAPrivateKey |
getInstance(ASN1TaggedObject obj,
boolean explicit) |
static RSAPrivateKey |
getInstance(Object obj) |
BigInteger |
getModulus() |
BigInteger |
getPrime1() |
BigInteger |
getPrime2() |
BigInteger |
getPrivateExponent() |
BigInteger |
getPublicExponent() |
BigInteger |
getVersion() |
ASN1Primitive |
toASN1Primitive()
This outputs the key in PKCS1v2 format.
|
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
public RSAPrivateKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient)
public static RSAPrivateKey getInstance(ASN1TaggedObject obj, boolean explicit)
public static RSAPrivateKey getInstance(Object obj)
public BigInteger getVersion()
public BigInteger getModulus()
public BigInteger getPublicExponent()
public BigInteger getPrivateExponent()
public BigInteger getPrime1()
public BigInteger getPrime2()
public BigInteger getExponent1()
public BigInteger getExponent2()
public BigInteger getCoefficient()
public ASN1Primitive toASN1Primitive()
RSAPrivateKey ::= SEQUENCE { version Version, modulus INTEGER, -- n publicExponent INTEGER, -- e privateExponent INTEGER, -- d prime1 INTEGER, -- p prime2 INTEGER, -- q exponent1 INTEGER, -- d mod (p-1) exponent2 INTEGER, -- d mod (q-1) coefficient INTEGER, -- (inverse of q) mod p otherPrimeInfos OtherPrimeInfos OPTIONAL } Version ::= INTEGER { two-prime(0), multi(1) } (CONSTRAINED BY {-- version must be multi if otherPrimeInfos present --})
This routine is written to output PKCS1 version 2.1, private keys.
toASN1Primitive
in interface ASN1Encodable
toASN1Primitive
in class ASN1Object
Copyright © 2017 BouncyCastle.org. All rights reserved.