The El Gamal variant of Diffie-Hellman has the same setup with a public prime and generator .

Let be any symmetric encryption function. The schema is as follows:

  1. chooses and computes .
  2. chooses integer , computes , and computes key .
  3. computes .