Simon Josefsson simon@josefsson.org writes:
What about the nettle.texinfo patch below?
Sorry, forgot that. I've just checked in the following:
@item BLOWFISH The implementation of the BLOWFISH cipher is written by Werner Koch, copyright owned by the Free Software Foundation. Also hacked by Simon Josefsson and Niels Möller. Released under the LGPL.
I'm not sure what changes Ray Dassen did, maybe those were part of the old optimizations? Do they need to be re-licensed?
No, those optimizations were done by me. I tried to look up the origin of the old code. Ray Dassen copied blowfish code from GNUPG to LSH, with a changelog entry dated Dec 12 1998 (see lsh/ChangeLog.1), the fourth oldest ChangeLog entry for lsh.
The optimizations I reapplied were done by me, originally recorded in Nettle's ChangeLog 2001-06-17.
Btw, did you record what kind of performance you got with your optimization applied? I would be surprised if you couldn't get close to the same speed with simple changes.
I'm not sure what you mean. The changes *are* simple.
2010-11-26 Niels Möller nisse@lysator.liu.se
Reapplied optimizations (150% speedup on x86_32) and other fixes, relicensing them as LGPL. * blowfish.c (do_encrypt): Renamed, to... (encrypt): ...new name. (F): Added context argument. Shift input explicitly, instead of reading individual bytes via memory. (R): Added context argument. (encrypt): Deleted a bunch of local variables. Using the context pointer for everything should consume less registers. (decrypt): Likewise. (initial_ctx): Arrange constants into a struct, to simplify key setup. (blowfish_set_key): Some simplification.
I'll look at serpent next.
Great!
Regards, /Niels