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 >
