implement ui for elgamal