in reply to Re: Re: Crypt CBC using IDEA - output differs btwn systems
in thread Crypt CBC using IDEA - output differs btwn systems

The Crypt::CBC on the old server was 2.02... On the new server I have Crypt::CBC 2.08

Are you absolutely sure that 2.02 is really the version that's being used on the old server? Maybe there's an older version installed somewhere that's getting loaded instead. Because the default behavior of 2.02 is to prepend the IV and produce a 48-digit output for a one-block input. Or maybe someone upgraded Crypt::CBC on the old server a long time ago, and your old data has been broken for a while without being noticed.

IDEA.xs: In function `XS_Crypt__IDEA_crypt': IDEA.xs:66: `sv_undef' undeclared (first use in this function)

I don't know if this is the best solution, but you can get Crypt::IDEA 1.01 to compile by adding this to the .xs file:

#define sv_undef PL_sv_undef

Replies are listed 'Best First'.
Re: Re: Re: Crypt CBC using IDEA - output differs btwn systems
by ewitch (Initiate) on May 13, 2003 at 16:33 UTC
    Well, things are getting weirder.. I double-checked on the old server, looking for all files named CBC.pm - and the only one I found in my @INC does have "version 2.02" in the source. But I did notice that I upgraded the module earlier this year from version 1.20. The perl program I use for encryption runs as a daemon and hasn't been restarted since I upgraded Crypt CBC on that server. Is it possible that the daemon perl script could be using the older CBC module, ignoring the upgraded one? I did try installing CBC version 1.20 on the new server, and the older IDEA as well, and now the output length is 16 like in the old system. (btw it was 48, not 50 chars; I ++'d where I should have --'d)