Generating Diffie Hellman key pairs

I’m trying to integrate a FirstData gift card balance finder into a website, but the documentation is very basic, and their encryption scheme sounds convoluted.

How the heck to I generate a diffie hellman private key from a specified parameter file in PHP? There’s openssl_ dh_ compute_ key, but I think it’s only available in nightly builds. Anyone have to deal with this system before?

PEAR has a [URL=“”]Diffie-Hellman Key Exchange implementation.


Yes, that’s perfect, thanks!

I have same problem with First Data’s Gift card integration.
Did you find any solution for their encryption part ?
If so, can you please help me?