iaik.me.security
Class PublicKey

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

public class PublicKey
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
PublicKey(ASN1 asn1)
          Creates a public key from an ASN1 object.
 
Method Summary
 ASN1 getASN1()
          Fetches the ASN1 representation of the PublicKey.
static PublicKey makeDHPublicKey(BigInteger y, CryptoBag params)
          Generates a new DifffieHellman public key.
static PublicKey makeDSAPublicKey(BigInteger y, CryptoBag params)
          Generates a new DSA public key.
static PublicKey makeRSAPublicKey(BigInteger modulus, BigInteger publicExponent)
          Makes a RSA public key from modulus, exponent representation.
 
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

PublicKey

public PublicKey(ASN1 asn1)
          throws IOException
Creates a public key from an ASN1 object.
Parameters:
a - asn1 object
Throws:
IOException -  
Method Detail

getASN1

public ASN1 getASN1()
Fetches the ASN1 representation of the PublicKey.
Overrides:
getASN1 in class CryptoBag
Returns:
the object in ASN1 repr.

makeRSAPublicKey

public static PublicKey makeRSAPublicKey(BigInteger modulus,
                                         BigInteger publicExponent)
Makes a RSA public key from modulus, exponent representation.
Parameters:
modulus -  
publicExponent -  
Returns:
 

makeDSAPublicKey

public static PublicKey makeDSAPublicKey(BigInteger y,
                                         CryptoBag params)
Generates a new DSA public key.
Parameters:
biginteger - keygeneration
DSA - parameters for generation
Returns:
the new public key

makeDHPublicKey

public static PublicKey makeDHPublicKey(BigInteger y,
                                        CryptoBag params)
Generates a new DifffieHellman public key.
Parameters:
biginteger - for keygeneration
DH - params
Returns:
new DH public key

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