Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- phpmyadmin's blowfish / mcrypt
June 8, 2005, 3:54 am
rate this thread
I'm writing an app that will use blowfish encryption..
PHP's mcrypt will be used if available.
if not, I'll use PHPmyadmin's blowfish.php library.
The problem is I can't figure out what initialization vector
blowfish.php is useing (or if that's even my problem).
ie, if I encrypt with blowfish.php and decrypt with mcrypt:
/* include path to phpmyadmin '/libraries/blowfish.php'; */
$secret = 'secret';
$string = 'test string';
$iv = blah;
$encrypted = PMA_blowfish_encrypt($string,$secret);
will output something like
Anyhow, how do I make these two interchangeable?
Re: phpmyadmin's blowfish / mcrypt
Last time I played around with PHP mcrypt to any extenet I found that the
mcrypt functions were returning C type strings (terminated by '') for the
Only getting partial output suggests that it may be a string termination
issue somewhere, but you're getting the key right.
I must admit to being rather in the dark regards IVs, but if you're not
supplying one to PMA_Blowfish_encrypt() why do you need one for
mcrypt_decrypt()? (it's optional anyway for CBC). Bearing in mind the issue
regarding C strings and the recommended use of mcrypt_enc_get_iv_size(),
I'd suggest that it is not only advisable to avoid using it for now, it may
even be the source of the error.
- » OT: Reminder: comp.databases.mysql discussion taking place in news.groups Please Join In!
- — Previous thread in » PHP Scripting Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum