Re: Crypt_Blowfish encryption between to servers fail
| From: | Matthew Fonda | Date: | Thu, 28 Jul 2005 08:31:12 +0000 |
| Subject: | Re: Crypt_Blowfish encryption between to servers fail | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20179@lists.php.net to get a copy of this message | ||
Thomas Nilsen wrote:
>Hope someone can shed some light on this issue.
>
>I want to encrypt data between two servers using cookies. I've been trying to use the Crypt
>Blowfish pear class, but I'm not able to decrypt data sent between the two servers.
>
>A simple script like this generates a base64 encoded string on server A:
>
>include 'Crypt/Blowfish.php';
>$ob = new Crypt_Blowfish('test');
>$o = ($ob->encrypt('blowfish'));
>print base64_encode($o);
>
>Then on server B, the following is executed:
>
>include 'Crypt/Blowfish.php';
>$ob = new Crypt_Blowfish('test');
>print $ob->decrypt(base64_decode(<output from $o on server A>));
>
>But the output of the decrypted string is just gibberish. Also, comparing the plain output from
>the two servers when encrypting the same text using the same key, generates two completely different
>outputs.
>
>Is Blowfish not supposed to be transportable between two different systems? Seems a bit silly to
>only be able to decode the data on the same system it was encrypted...
>
>Server A is a Fedora #3 and Server B is a RedHat EL AS 3.0
>
>Regards,
>Thomas Nilsen
>
>Linux- The Ultimate Windows Service Pack
>
>
>
>
>
Nope, it should work between servers, output should be the same
regardless of what operating system you are on. If you could download
the Crypt_Blowfish version from CVS, and run the tests and send me the
results, as well as a phpinfo output from both servers, I will look into
fixing this.
Regards,
-- Matthew