On Mon, Oct 02, 2006 at 03:16:31PM +1300, Richard Dingwall wrote: > 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 >
Your paste does not exist. > (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? > You can't. Either copy the required code from eggdrop's code (if permitted) or write your own. > Secondly, it uses ECB mode, and apparently ECB mode doesn't use an IV. > Am I initializing the key correctly? Actually unless I am mistaken, eggdrop uses hacked mode (yack). >From source: /* Robey: Reset blowfish boxes to initial state * (I guess normally it just keeps scrambling them, but here it's * important to get the same encrypted result each time) */ Thus I am not convinced at all that this is even possible. Aki Tuomi > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]