[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trouble with idea.c from cryptl99.zip



Tall men in dark suits made Jack Mott <[email protected]> write:
 
>Hey, I downloaded the crypto lib 'cryptl99.zip' from one of the crypto web
>sites, I got IDEA.C to compile, but it doesn't seem to encrypt.
>
>[...]
>       memcpy(YY, XX, 8);
>       for (l = 0; l < BLOCKS; l++)
>               ideaCipher(YY, YY, EK); /* repeated encryption */
>       memcpy(ZZ, YY, 8);
>       for (l = 0; l < BLOCKS; l++)
>               ideaCipher(ZZ, ZZ, DK); /* repeated decryption */
 
Arrgghh!!! That defeats the whole purpose of the library, which is to provide a
standard interface to many different algorithms.  If you use the routine the
way it's meant to be used (via initCryptContext(), etc) it'll work fine.
 
BTW the reason it isn't encrypting is that by the looks of it you're not
calling the IDEA key schedule code.
 
Peter.