part7
Class ECPublicKey

java.lang.Object
  extended bypart7.ECPublicKey

public class ECPublicKey
extends java.lang.Object

A class to implement a public key for ElGamal using elliptics curves.


Field Summary
protected  ECPoint _b
           
protected  Curve _c
           
protected  ECPoint _p
           
 
Constructor Summary
ECPublicKey(Curve c, ECPoint b, ECPoint p)
          A constructor for an ElGamal public key (c,b,p).
ECPublicKey(ECPublicKey key)
          A copy constructor for an ElGamal public key.
 
Method Summary
 ECCipherText encrypt(ECPoint m, java.security.SecureRandom rnd)
          A method to encrypt the point m using this public key.
 MVCipherText MVEncrypt(java.math.BigInteger x1, java.math.BigInteger x2, java.security.SecureRandom rnd)
          A method to encrypt the message (x1,x2) using this public key with Menezes-Vanstone.
 java.lang.String toString()
          A method to produce a string representation of this public EG key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_c

protected Curve _c

_b

protected ECPoint _b

_p

protected ECPoint _p
Constructor Detail

ECPublicKey

public ECPublicKey(Curve c,
                   ECPoint b,
                   ECPoint p)
            throws java.lang.Exception
A constructor for an ElGamal public key (c,b,p).

Throws:
Exception.
java.lang.Exception

ECPublicKey

public ECPublicKey(ECPublicKey key)
            throws java.lang.Exception
A copy constructor for an ElGamal public key.

Throws:
Exception.
java.lang.Exception
Method Detail

encrypt

public ECCipherText encrypt(ECPoint m,
                            java.security.SecureRandom rnd)
                     throws java.lang.Exception
A method to encrypt the point m using this public key.

Throws:
Exception.
java.lang.Exception

MVEncrypt

public MVCipherText MVEncrypt(java.math.BigInteger x1,
                              java.math.BigInteger x2,
                              java.security.SecureRandom rnd)
                       throws java.lang.Exception
A method to encrypt the message (x1,x2) using this public key with Menezes-Vanstone.

Throws:
Exception.
java.lang.Exception

toString

public java.lang.String toString()
A method to produce a string representation of this public EG key.

Throws:
Exception.