73,
ShawnWeins, Thorsten wrote:
Hello,
unfortunately I have to use ElGamal and I still do not know how to use it. I have tried the follwing:
ElGamalKeys::PrivateKey pk;
RandomPool randPool;
pk.Initialize( clP, clG, clX); ElGamal::Decryptor clDecrypter(pk);
clDecrypter.Decrypt(randPool, ciphertext, cipherTextLength, plaintext);
Every time I try to decrypt a message I run into an exception called DL_BadElement. What am I doing wrong?
When do I have to use the method "SymmetricDecrypt()"?
Thanks in advance,
Thorsten
-----Urspr�ngliche Nachricht----- Von: Wei Dai [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 30. Juli 2003 01:54 An: [EMAIL PROTECTED] Betreff: Re: ElGamal Decryption
You should avoid ElGamal encryption, because it's not standard, and not secure against some attacks. Instead, use DLIES.
If you must use ElGamal encryption for some reason, it takes ciphertext that is twice as long as the prime modulus. The first half of the ciphertext is a, the second is b.
On Mon, Jul 28, 2003 at 02:06:04PM +0200, Weins, Thorsten wrote:
Hello,
I want to decrypt a ciphertext which has been encrypted using the ElGamal-algorithm. I know the parameters a, b which represent the ciphertext, the paramter x (private key), the parameter g (Group
Generator)
and the modulus p.
I found the functions Decrypt() (from a base class) and the function
SymmetricDecrypt() but they both do not take the ciphertext splitted in a
and b. Does anybody know how to decrypt the message using crypptopp? The
elgamal example in validate2.cpp is not helpful in this case.
Thanks in advance,
Thorsten
