Text this: Generalizations of the Diffie-Hellman protocol : exposition and implementation