Sifmole has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I hope I can get some help here, because going through the pod isn't helping me. I have a client who has decided that are going to create a URL linking to my system. In this URL will be a parameter (meaning something after the "?" or in the post buffer), that has been Blowfish encoded. I have the key, but am not sure what I need to do.

I found the Blowfish module on Cpan, however it almost seems that OpenSSL does something Blowfish related and I already have that installed. Is there anyway to use OpenSSL to decrypt this Blowfish encrypted string?

If yes, or there is something I need to look at, I would appreciate a pointer to the right documentation.

Further details

Thanks in advance.

Replies are listed 'Best First'.
Re: Decrypting with OpenSSL
by kschwab (Vicar) on Jan 20, 2001 at 02:38 UTC
    Yes, you could do this with the openssl toolkit. You want the "enc" option. See this page for details.

    On the other hand, this would require either calling out to the /whatever/bin/openssl command, or using the OpenCA::OpenSSL module, which does pretty much the same thing. (if it even supports the "enc" function)

    The Crypt::Blowfish_PP perl module would seem to be a simpler option if you are already processing the cgi request in perl.

    From the docs:

    $blowfish=new Crypt::Blowfish_PP($key); $plaintextBlock=$blowfish->decrypt($ciphertextBlock);
    That's pretty lucid for your needs, eh ?
      Thanks.
Re: Decrypting with OpenSSL
by Pug (Monk) on Jan 20, 2001 at 02:47 UTC
    I have yet to use this part of openssl BUT on the command line this may/probly work.
    openssl bf -in ./stuff_after_the_? -out ./decoded_info -d -k./key_here
    For figuiring out OpenSSL (because the Docs are alittle on the light side.) try openssl (command you want) asfd and it will print out a list of args for that openssl command. As for using the OpenSSL Modual. Sorry I can't help with that yet.