Package org.gudy.bouncycastle.asn1.pkcs
Class RSAPrivateKeyStructure
java.lang.Object
org.gudy.bouncycastle.asn1.ASN1Encodable
org.gudy.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure
- All Implemented Interfaces:
DEREncodable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BigInteger
private BigInteger
private BigInteger
private BigInteger
private ASN1Sequence
private BigInteger
private BigInteger
private BigInteger
private BigInteger
private int
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
-
Constructor Summary
ConstructorsConstructorDescriptionRSAPrivateKeyStructure
(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient) -
Method Summary
Modifier and TypeMethodDescriptionstatic RSAPrivateKeyStructure
getInstance
(Object obj) static RSAPrivateKeyStructure
getInstance
(ASN1TaggedObject obj, boolean explicit) int
This outputs the key in PKCS1v2 format.Methods inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
Field Details
-
version
private int version -
modulus
-
publicExponent
-
privateExponent
-
prime1
-
prime2
-
exponent1
-
exponent2
-
coefficient
-
otherPrimeInfos
-
-
Constructor Details
-
RSAPrivateKeyStructure
public RSAPrivateKeyStructure(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient) -
RSAPrivateKeyStructure
-
-
Method Details
-
getInstance
-
getInstance
-
getVersion
public int getVersion() -
getModulus
-
getPublicExponent
-
getPrivateExponent
-
getPrime1
-
getPrime2
-
getExponent1
-
getExponent2
-
getCoefficient
-
toASN1Object
This outputs the key in PKCS1v2 format.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.
- Specified by:
toASN1Object
in classASN1Encodable
-