def elgamal_enc(params, gamma, m, h):
    """ encrypts the values of a message (h^m) """
    G, o, g1, hs, g2, e = params
    k = o.random()
    a = k * g1
    b = k * gamma + m * h
    return a, b, k
