elgamal: fix? endless loop