ajanta.crypto
Class ElGamal

java.lang.Object
  |
  +--ajanta.crypto.ElGamal
All Implemented Interfaces:
java.io.Serializable

public class ElGamal
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
ElGamal(ajanta.crypto.EGPublicKey pub)
           
ElGamal(ajanta.crypto.EGPublicKey pub, ajanta.crypto.EGPrivateKey priv)
           
ElGamal(ajanta.crypto.EGPublicKey pub, java.security.SecureRandom s)
           
ElGamal(java.security.KeyPair kp)
           
 
Method Summary
 byte[] decrypt(ajanta.crypto.EGCipherText cipher)
           
 java.lang.String decryptToString(ajanta.crypto.EGCipherText cipher)
           
 ajanta.crypto.EGCipherText encrypt(byte[] message)
           
 ajanta.crypto.EGCipherText encrypt(java.lang.String message)
           
 ajanta.crypto.CipherBlock encryptBlock(byte[] msgBlock)
           
 ajanta.crypto.EGSignature sign(byte[] message)
           
 ajanta.crypto.EGSignature sign(java.lang.String message)
           
 boolean verify(byte[] message, ajanta.crypto.EGSignature sig)
           
 boolean verify(java.lang.String message, ajanta.crypto.EGSignature sig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElGamal

public ElGamal(ajanta.crypto.EGPublicKey pub)

ElGamal

public ElGamal(ajanta.crypto.EGPublicKey pub,
               ajanta.crypto.EGPrivateKey priv)

ElGamal

public ElGamal(java.security.KeyPair kp)

ElGamal

public ElGamal(ajanta.crypto.EGPublicKey pub,
               java.security.SecureRandom s)
Method Detail

sign

public ajanta.crypto.EGSignature sign(byte[] message)

verify

public boolean verify(byte[] message,
                      ajanta.crypto.EGSignature sig)

encryptBlock

public ajanta.crypto.CipherBlock encryptBlock(byte[] msgBlock)

encrypt

public ajanta.crypto.EGCipherText encrypt(byte[] message)

decrypt

public byte[] decrypt(ajanta.crypto.EGCipherText cipher)

sign

public ajanta.crypto.EGSignature sign(java.lang.String message)

verify

public boolean verify(java.lang.String message,
                      ajanta.crypto.EGSignature sig)

encrypt

public ajanta.crypto.EGCipherText encrypt(java.lang.String message)

decryptToString

public java.lang.String decryptToString(ajanta.crypto.EGCipherText cipher)