Amir said: ... It is simple to solve this (also more efficiently) by Kijn=h(g^ij,n) where h is our favorite one way hash (i.e. MD5...) This is essentially the X9.42 variant of Diffie-Hellman. The biggest difference is that they include an identifier to name the hash function in the data that is hashed. Russ