Skip to content

Commit

Permalink
[CRYPTO] twofish: Split out common c code
Browse files Browse the repository at this point in the history
This patch splits up the twofish crypto routine into a common part ( key
setup  ) which will be uses by all twofish crypto modules ( generic-c , i586
assembler and x86_64 assembler ) and generic-c part. It also creates a new
header file which will be used by all 3 modules.

This eliminates all code duplication.

Correctness was verified with the tcrypt module and automated test scripts.

Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
jfritschi authored and herbertx committed Sep 21, 2006
1 parent 7991110 commit 2729bb4
Show file tree
Hide file tree
Showing 5 changed files with 777 additions and 697 deletions.
8 changes: 8 additions & 0 deletions crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ config CRYPTO_BLOWFISH
config CRYPTO_TWOFISH
tristate "Twofish cipher algorithm"
depends on CRYPTO
select CRYPTO_TWOFISH_COMMON
help
Twofish cipher algorithm.

Expand All @@ -142,6 +143,13 @@ config CRYPTO_TWOFISH
See also:
<http://www.schneier.com/twofish.html>

config CRYPTO_TWOFISH_COMMON
tristate
depends on CRYPTO
help
Common parts of the Twofish cipher algorithm shared by the
generic c and the assembler implementations.

config CRYPTO_SERPENT
tristate "Serpent cipher algorithm"
depends on CRYPTO
Expand Down
1 change: 1 addition & 0 deletions crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
obj-$(CONFIG_CRYPTO_DES) += des.o
obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
obj-$(CONFIG_CRYPTO_AES) += aes.o
obj-$(CONFIG_CRYPTO_CAST5) += cast5.o
Expand Down
Loading

0 comments on commit 2729bb4

Please sign in to comment.