Top Fields Constructors Methods
org.bouncycastle.asn1.pkcs

public Class RSAPrivateKey

extends ASN1Object
Class Inheritance
Imports
java.math.BigInteger, java.util.Enumeration, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERSequence

Field Summary

Modifier and TypeField and Description
private BigInteger
private BigInteger
private BigInteger
private BigInteger
private ASN1Sequence
private BigInteger
private BigInteger
private BigInteger
private BigInteger
private BigInteger

Constructor Summary

AccessConstructor and Description
public
RSAPrivateKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient)

private

Method Summary

Modifier and TypeMethod and Description
public BigInteger
public BigInteger
public BigInteger
public static RSAPrivateKey
getInstance(ASN1TaggedObject obj, boolean explicit)

public static RSAPrivateKey
public BigInteger
public BigInteger
public BigInteger
public BigInteger
public BigInteger
public BigInteger
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

This outputs the key in PKCS1v2 format.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

coefficientback to summary
private BigInteger coefficient
exponent1back to summary
private BigInteger exponent1
exponent2back to summary
private BigInteger exponent2
modulusback to summary
private BigInteger modulus
otherPrimeInfosback to summary
private ASN1Sequence otherPrimeInfos
prime1back to summary
private BigInteger prime1
prime2back to summary
private BigInteger prime2
privateExponentback to summary
private BigInteger privateExponent
publicExponentback to summary
private BigInteger publicExponent
versionback to summary
private BigInteger version

Constructor Detail

RSAPrivateKeyback to summary
public RSAPrivateKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient)
RSAPrivateKeyback to summary
private RSAPrivateKey(ASN1Sequence seq)

Method Detail

getCoefficientback to summary
public BigInteger getCoefficient()
getExponent1back to summary
public BigInteger getExponent1()
getExponent2back to summary
public BigInteger getExponent2()
getInstanceback to summary
public static RSAPrivateKey getInstance(ASN1TaggedObject obj, boolean explicit)
getInstanceback to summary
public static RSAPrivateKey getInstance(Object obj)
getModulusback to summary
public BigInteger getModulus()
getPrime1back to summary
public BigInteger getPrime1()
getPrime2back to summary
public BigInteger getPrime2()
getPrivateExponentback to summary
public BigInteger getPrivateExponent()
getPublicExponentback to summary
public BigInteger getPublicExponent()
getVersionback to summary
public BigInteger getVersion()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

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.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.