gnu.crypto.pki.provider
Class GnuRSAPrivateKey
java.lang.Object
gnu.crypto.pki.provider.GnuRSAPrivateKey
- All Implemented Interfaces:
- Key, PrivateKey, RSAKey, RSAPrivateCrtKey, RSAPrivateKey, Serializable
- class GnuRSAPrivateKey
- extends Object
- implements RSAPrivateCrtKey
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GnuRSAPrivateKey
public GnuRSAPrivateKey(RSAPrivateCrtKeySpec spec)
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
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.