For the latest news and information visit
The GNU Crypto project

gnu.crypto.pki.provider
Class GnuRSAPrivateKey

java.lang.Object
  extended by gnu.crypto.pki.provider.GnuRSAPrivateKey
All Implemented Interfaces:
Serializable, RSAKey, RSAPrivateCrtKey, RSAPrivateKey, Key, PrivateKey

 class GnuRSAPrivateKey
extends Object
implements RSAPrivateCrtKey


Field Summary
 
Fields inherited from interface java.security.interfaces.RSAPrivateCrtKey
serialVersionUID
 
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GnuRSAPrivateKey

public GnuRSAPrivateKey(RSAPrivateCrtKeySpec spec)
Method Detail

getModulus

public BigInteger getModulus()
Specified by:
getModulus in interface RSAKey

getPrivateExponent

public BigInteger getPrivateExponent()
Specified by:
getPrivateExponent in interface RSAPrivateKey

getCrtCoefficient

public BigInteger getCrtCoefficient()
Specified by:
getCrtCoefficient in interface RSAPrivateCrtKey

getPrimeExponentP

public BigInteger getPrimeExponentP()
Specified by:
getPrimeExponentP in interface RSAPrivateCrtKey

getPrimeExponentQ

public BigInteger getPrimeExponentQ()
Specified by:
getPrimeExponentQ in interface RSAPrivateCrtKey

getPrimeP

public BigInteger getPrimeP()
Specified by:
getPrimeP in interface RSAPrivateCrtKey

getPrimeQ

public BigInteger getPrimeQ()
Specified by:
getPrimeQ in interface RSAPrivateCrtKey

getPublicExponent

public BigInteger getPublicExponent()
Specified by:
getPublicExponent in interface RSAPrivateCrtKey

getAlgorithm

public String getAlgorithm()
Specified by:
getAlgorithm in interface Key

getFormat

public String getFormat()
Specified by:
getFormat in interface Key

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.

Specified by:
getEncoded in interface Key

For the latest news and information visit
The GNU Crypto project

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