Hi,

I'm trying to decrypt messages that are encrypted with Eggdrop's
blowfish encrypt() method. This method is also used by a
irssi/mirc/xchat encryption module called FiSH.

I have already written some code to do it using libcrypto's EVP, but
it produces gibberish output. You can see it here:

http://rafb.net/paste/results/e15Deu53.html

(ignore the == key.length(); on EVP_BytesToKey, it was part of an
assertion I forgot to remove).

I have two questions.

Firstly, I understand the eggdrop's blowfish stuff uses a custom
base64 method. The differences from 'standard base64' RFC 2045
(inherits RFC 1421) include:

* The character assignments are different ("./0-9a-zA-Z" instead of
"A-Za-z0-9+/")
* Encoding is done low-order to high-order in 32bit blocks, instead of
high-order to low-order in 24bit blocks. This leaves leftovers.
* No support for padding character (=)

How might I use libcrypto to solve my problem?

Secondly, it uses ECB mode, and apparently ECB mode doesn't use an IV.
Am I initializing the key correctly?
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org