iaik.me.security
Class PrivateKey

java.lang.Object
  |
  +--iaik.me.security.CryptoBag
        |
        +--iaik.me.security.PrivateKey

public class PrivateKey
extends CryptoBag


Fields inherited from class iaik.me.security.CryptoBag
TYPE_DH_PARAMS, TYPE_DH_PRIVATE, TYPE_DH_PUBLIC, TYPE_DSA_PARAMS, TYPE_DSA_PRIVATE, TYPE_DSA_PUBLIC, TYPE_IV, TYPE_KEYPAIR, TYPE_RSA_PRIVATE, TYPE_RSA_PUBLIC, TYPE_SECRET_KEY, V_DH_G, V_DH_P, V_DH_PARAMS, V_DH_X, V_DH_Y, V_DSA_G, V_DSA_P, V_DSA_PARAMS, V_DSA_Q, V_DSA_X, V_DSA_Y, V_IV, V_KEY, V_KEY_PRIVATE, V_KEY_PUBLIC, V_RSA_CRT_C, V_RSA_CRT_EP, V_RSA_CRT_EQ, V_RSA_CRT_P, V_RSA_CRT_Q, V_RSA_D, V_RSA_E, V_RSA_N
 
Constructor Summary
PrivateKey(ASN1 asn1)
           
PrivateKey(byte[] data)
           
PrivateKey(byte[] data, int type)
           
PrivateKey(InputStream in)
           
PrivateKey(InputStream in, int type)
           
 
Method Summary
 ASN1 getASN1()
          Returns this CryptoBag as ASN.1 object representing an DSA or DH algorithmID with parameters included.
 PublicKey getPublicKey()
           
static PrivateKey makeDHPrivateKey(BigInteger x, CryptoBag params)
           
static PrivateKey makeDSAPrivateKey(BigInteger x, CryptoBag params)
           
static PrivateKey makeRSAPrivateKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger p, BigInteger q, BigInteger exp1, BigInteger exp2, BigInteger coeff)
           
 
Methods inherited from class iaik.me.security.CryptoBag
equals, getBigInteger, getByteArray, getCryptoBag, getEncoded, getKeyLength, getType, hashCode, makeDHParameters, makeDSAParameters, makeIV, makeKeyPair, makeSecretKey, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrivateKey

public PrivateKey(InputStream in)
           throws IOException

PrivateKey

public PrivateKey(ASN1 asn1)
           throws IOException

PrivateKey

public PrivateKey(byte[] data)
           throws IOException

PrivateKey

public PrivateKey(byte[] data,
                  int type)
           throws IOException

PrivateKey

public PrivateKey(InputStream in,
                  int type)
           throws IOException
Method Detail

getASN1

public ASN1 getASN1()
Description copied from class: CryptoBag
Returns this CryptoBag as ASN.1 object representing an DSA or DH algorithmID with parameters included. For retrieving the ASN1 representation of a key use class PublicKey immediately.
Overrides:
getASN1 in class CryptoBag
Following copied from class: iaik.me.security.CryptoBag
Returns:
the CryptoBag as ASN1 object

getPublicKey

public PublicKey getPublicKey()

makeRSAPrivateKey

public static PrivateKey makeRSAPrivateKey(BigInteger modulus,
                                           BigInteger publicExponent,
                                           BigInteger privateExponent,
                                           BigInteger p,
                                           BigInteger q,
                                           BigInteger exp1,
                                           BigInteger exp2,
                                           BigInteger coeff)

makeDSAPrivateKey

public static PrivateKey makeDSAPrivateKey(BigInteger x,
                                           CryptoBag params)

makeDHPrivateKey

public static PrivateKey makeDHPrivateKey(BigInteger x,
                                          CryptoBag params)

This Javadoc may contain text parts from IETF Internet Standard specifications, see copyright note) and RSA Data Security Public-Key Cryptography Standards (see copyright note).

IAIK-JCE ME 3.04, (c) 2002 IAIK, (c) 2003 to 2006 Stiftung SIC