On Sat, 6 Jun 1998, Hamdi Tounsi wrote:
> is someone writing hard-optimized versions of blowfish ? (just well
> optimized software implementations, not hardware ones).
> i looked to the assembler version by eric, unfortunately, only encryption &
> decryption are done in assembly, key setup is not there :(
> of course blowfish is designed for apps that does not require frequent key
> changes, but that's another story ;)
The 2 loops that matter in blowfish key setup are
for (i=0; i<(BF_ROUNDS+2); i+=2)
{
BF_encrypt(in,key);
p[i ]=in[0];
p[i+1]=in[1];
}
p=key->S;
for (i=0; i<4*256; i+=2)
{
BF_encrypt(in,key);
p[i ]=in[0];
p[i+1]=in[1];
}
The BF_encrypt() function is use. This is assember code.
To put it another way, the key set function calles BF_encrypt 521 times,
or is the same as encrypting 4168 bytes with blowfish. Blowfish as an
algorithm has an algorithmically slow key setup function.
eric
+-------------------------------------------------------------------------+
| Administrative requests should be sent to [EMAIL PROTECTED] |
| List service provided by Open Software Associates, http://www.osa.com/ |
+-------------------------------------------------------------------------+