merimax
asked on
Blowfish decryption in C
In C (linux), I am pulling a Blowfish encoded string from the database. I know the "passphrase" and obviously I have the encoded string. Can I use the crypto libraries to decode this string?
I've tried decrypting from the command line using openssl but I have been unsuccessful. Strangely enough, I found an online tool which uses the the crypt_blowfish class of the PEAR project and this does decode my string successfully. That tool is: http://thom-patterson.com/Toys/Encryption/index.php
A little guidance would be greatly appreciated.
I've tried decrypting from the command line using openssl but I have been unsuccessful. Strangely enough, I found an online tool which uses the the crypt_blowfish class of the PEAR project and this does decode my string successfully. That tool is: http://thom-patterson.com/Toys/Encryption/index.php
A little guidance would be greatly appreciated.
Sure you can use libssl for decryption. Have you seen the examples? Have you written some code to try out?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, at this point I can't even get the openssl command line routines to decrypt the string. Since I can get the tool http://thom-patterson.com/Toys/Encryption/index.php to decrypt the string then I realize I am missing something pretty obvious.
ASKER
Ok. I am able to get this to work the way I want in PHP. Could someone offer some suggestions on how to convert this to C using the openssl blowfish libraries. I have tried several different combinations of openssl blowfish routines and I keep going around in circles. Anyway this is how I got it to work in PHP....
$p="password.sample" ;
$i="MCtwzLQuwdQdhwhciKlhOR tKO5K8g8Hh A7JGMfpxs4 1Wtct7lVwH Kw==" ;
$blowfish = new Crypt_Blowfish($p);
$output = $blowfish->decrypt(base64_ decode($i) );
$p="password.sample" ;
$i="MCtwzLQuwdQdhwhciKlhOR
$blowfish = new Crypt_Blowfish($p);
$output = $blowfish->decrypt(base64_
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.