gnu.crypto.pki.provider

Class GnuRSAPrivateKey

Implemented Interfaces:
RSAPrivateCrtKey

(package private) class GnuRSAPrivateKey
extends Object
implements RSAPrivateCrtKey

Constructor Summary

GnuRSAPrivateKey(RSAPrivateCrtKeySpec spec)

Method Summary

String
getAlgorithm()
BigInteger
getCrtCoefficient()
byte[]
getEncoded()
The encoded form is:
 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 }
 

Which is in turn encoded in a PrivateKeyInfo structure from PKCS#8.

String
getFormat()
BigInteger
getModulus()
BigInteger
getPrimeExponentP()
BigInteger
getPrimeExponentQ()
BigInteger
getPrimeP()
BigInteger
getPrimeQ()
BigInteger
getPrivateExponent()
BigInteger
getPublicExponent()

Constructor Details

GnuRSAPrivateKey

public GnuRSAPrivateKey(RSAPrivateCrtKeySpec spec)

Method Details

getAlgorithm

public String getAlgorithm()

getCrtCoefficient

public BigInteger getCrtCoefficient()

getEncoded

public byte[] getEncoded()
The encoded form is:
 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 }
 

Which is in turn encoded in a PrivateKeyInfo structure from PKCS#8.


getFormat

public String getFormat()

getModulus

public BigInteger getModulus()

getPrimeExponentP

public BigInteger getPrimeExponentP()

getPrimeExponentQ

public BigInteger getPrimeExponentQ()

getPrimeP

public BigInteger getPrimeP()

getPrimeQ

public BigInteger getPrimeQ()

getPrivateExponent

public BigInteger getPrivateExponent()

getPublicExponent

public BigInteger getPublicExponent()

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.