Gamal's scheme