Top Fields Constructors Methods
org.bouncycastle.asn1.pkcs

public Class RSAPrivateKeyStructure

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

Deprecated

use RSAPrivateKey

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 int

Constructor Summary

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

public

Method Summary

Modifier and TypeMethod and Description
public BigInteger
public BigInteger
public BigInteger
public static RSAPrivateKeyStructure
getInstance(ASN1TaggedObject obj, boolean explicit)
References Deprecated RSAPrivateKeyStructure is deprecated or references (maybe indirectly) at least one deprecated element.

public static RSAPrivateKeyStructure
getInstance(Object obj)
References Deprecated RSAPrivateKeyStructure is deprecated or references (maybe indirectly) at least one deprecated element.

public BigInteger
public BigInteger
public BigInteger
public BigInteger
public BigInteger
public int
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 int version

Constructor Detail

RSAPrivateKeyStructureback to summary
public RSAPrivateKeyStructure(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger prime1, BigInteger prime2, BigInteger exponent1, BigInteger exponent2, BigInteger coefficient)
RSAPrivateKeyStructureback to summary
public RSAPrivateKeyStructure(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 RSAPrivateKeyStructure getInstance(ASN1TaggedObject obj, boolean explicit)

References Deprecated

RSAPrivateKeyStructure is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

getInstanceback to summary
public static RSAPrivateKeyStructure getInstance(Object obj)

References Deprecated

RSAPrivateKeyStructure is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

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 int 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.