|
Cryptix V3.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--cryptix.provider.elgamal.ElGamalAlgorithm
A class that calculates the ElGamal family of algorithms (encryption, decryption, signing and verification).
References:
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.2 $
| Method Summary | |
static java.math.BigInteger |
decrypt(java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger x)
The decryption algorithm for ElGamal. |
static void |
encrypt(java.math.BigInteger M,
java.math.BigInteger[] ab,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger y,
java.util.Random rng)
The encryption algorithm for ElGamal. |
static void |
sign(java.math.BigInteger M,
java.math.BigInteger[] ab,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger x,
java.util.Random rng)
The signature algorithm for ElGamal. |
static boolean |
verify(java.math.BigInteger M,
java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger y)
The verification algorithm for ElGamal. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
public static void encrypt(java.math.BigInteger M,
java.math.BigInteger[] ab,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger y,
java.util.Random rng)
ab[0] and
ab[1] respectively.M - the plaintext.ab - a 2-element BigInteger array in which to store the ciphertext.p - the prime from the public key.g - the generator from the public key.y - the value of y from the public key.rng - a random number generator to be used for encryption.
public static java.math.BigInteger decrypt(java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger x)
a - the first part of the ciphertext.b - the second part of the ciphertext.p - the prime from the private key.g - the generator from the private key.x - the value of x from the private key.
public static void sign(java.math.BigInteger M,
java.math.BigInteger[] ab,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger x,
java.util.Random rng)
ab[0] and ab[1] respectively.M - the value to be signed.ab - an array in which to store the result.p - the prime from the private key.g - the generator from the private key.x - the value of x from the private key.rng - a random number generator to be used for signing.
public static boolean verify(java.math.BigInteger M,
java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger y)
M - the value that was signed.a - the first part of the signature.b - the second part of the signature.p - the prime from the public key.g - the generator from the public key.y - the value of y from the public key.
|
Cryptix V3.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||