public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 1/2] Twofish cipher i586-asm optimized
@ 2006-05-07  9:56 Joachim Fritschi
  2006-05-07 20:47 ` Joachim Fritschi
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Fritschi @ 2006-05-07  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: herbert, davem

Implementation:
-----------------------
This code is based on the current linux twofish cipher c implementation. Only 
the decrypt/encrypt routines were replaced by optimized assembler code. The 
in-kernel code by Matthew Skala takes care of the keysetup and precomputation 
of the sbox lookup tables.
I have tried to cut down stack use to a minimum (1 push/pop per round) and 
optimize the code as much as possible. The patch is similar to the existing 
aes assembler implementation.

Testing:
-----------
The code passed the kernel test module and passed automated tests on a 
dm-crypt volume reading/writing large files with alternating modules ( c / 
assembler ) and comparing results.

Benchmarks:
-------------------

Performance on a dm-crypt volume increased about 30% while reading. With 
256bit keylength it even outperformed the 128bit aes assembler code.

http://homepages.tu-darmstadt.de/~fritschi/twofish/output_20060417_185029_x86.html

The write performance in this benchmark was limited by the harddrive and not 
the algorithm / system speed. Any suggestions how to benchmark the overall 
speed accurately are welcome.


Patch:
----------

http://homepages.tu-darmstadt.de/~fritschi/twofish/twofish-i586-asm-2.6.17.diff


Please have a look, try, improve and criticise.

Regards,
Joachim




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-16 11:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-07  9:56 [RFC][PATCH 1/2] Twofish cipher i586-asm optimized Joachim Fritschi
2006-05-07 20:47 ` Joachim Fritschi
2006-05-08  6:01   ` YOSHIFUJI Hideaki / 吉藤英明
2006-05-08 17:25     ` Joachim Fritschi
2006-05-16  7:44   ` Herbert Xu
2006-05-16 11:52     ` Joachim Fritschi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox