Looking for a Triple DES implementation

David Kramer david-8uUts6sDVDvs2Lz0fTdYFQ at public.gmane.org
Wed Jun 13 23:32:06 EDT 2007


I am not Mr. Crypto.  I needed to have a PHP-based website I'm working
on talk to a license key generator program a cow-orker wrote and return
the key to the user. So I get it today, and guess what?  He wrote it in
C#/.NET, which ain't gonna fly on the Linux-based web server.  DOH!

So I wrote a little Triple DES program in PHP using mcrypt(), only it
produces different output than his program.

So I wrote a little Triple DES program in Perl using Crypt::TripleDES,
only it produces different output than his program AND the PHP program.

Of note, the C# program outputs text and punctuation, and both the PHP
and Perl programs output high0order characters (non-printable).  I fed
them both through OD to see the difference, and there was nothing in
common between their outputs at all.

Next language: C++.  Obviously, no native Triple DES functionality, and
I haven't been able to find a library with suitable licensing which is
cross-platform.

Oh, and I have about a day to implement this, so studying Applied
Cryptography and writing my own.

- Is there some aspect of Triple DES that would produce such different
outputs, especially the printable vs non-printable output?

- Any recommendations?  PHP would be best, but if it gets implemented in
another language, I can run the program with popen().

Thanks.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.






More information about the Discuss mailing list