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.
merimaxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fridomCEO/ProgrammerCommented:
Sure you can use libssl for decryption. Have you seen the examples? Have you written some code to try out?
0
fridomCEO/ProgrammerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
merimaxAuthor Commented:
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.
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

merimaxAuthor Commented:
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="MCtwzLQuwdQdhwhciKlhORtKO5K8g8HhA7JGMfpxs41Wtct7lVwHKw==" ;
$blowfish = new Crypt_Blowfish($p);
$output = $blowfish->decrypt(base64_decode($i));
0
masheikCommented:
hi,
here is list of blowfish libraries are available,you can download one and compile and run
http://www.schneier.com/blowfish-download.html
0
TolomirAdministratorCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Encryption

From novice to tech pro — start learning today.