See T1700: A NULL pointer may be dereferenced in file "cipher/elgamal.c" inside function "generate_using_x" on line 387