def elgamal_public_key(key):
 (p, r, e) = key
 return (p, r, pow(r, e, p))

def elgamal_public_key ( key ) : ( p , r , e ) = key return ( p , r , pow ( r , e , p ) )
return three number tuple as public key .