Skip to contentSkip to conversation

crypto: twofish: rename twofish to twofish_generic and add an alias

PATCH Superseded Joachim Fritschi 2 participants 2 messages May 24, 2010 – May 26, 2010 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: twofish: rename twofish to twofish_generic and add an alias

This fixes the broken autoloading of the corresponding twofish
assembler ciphers on x86 and x86_64 if they are available. The module
name of the generic implementation was in conflict with the alias in the assembler modules. The generic twofish c implementation is renamed to twofish_generic
according to the other algorithms with assembler implementations and an module alias is added for 'twofish'. You can now load 'twofish' giving you the best implementation by
priority, 'twofish-generic' to get the c implementation or 'twofish-asm' to get the assembler version of cipher.

---
 crypto/Makefile          |    2 +-
 crypto/twofish.c         |  214 
---------------------------------------------
 crypto/twofish_generic.c |  215 
++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 216 insertions(+), 215 deletions(-)
 delete mode 100644 crypto/twofish.c
 create mode 100644 crypto/twofish_generic.c
crypto/Makefile +1 -1
index d7e6441..d719716 100644
@@ -61,7 +61,7 @@ obj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o
 obj-$(CONFIG_CRYPTO_DES) += des_generic.o
 obj-$(CONFIG_CRYPTO_FCRYPT) += fcrypt.o
 obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
-obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
+obj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o
 obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
 obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
 obj-$(CONFIG_CRYPTO_AES) += aes_generic.o
crypto/twofish.c deleted +0 -211

211 lines not on this page · raw message

crypto/twofish_generic.c new file +212 -0

212 lines not on this page · raw message

Signature · 1 line
1.6.4.4
maintainer
#1 lore raw
Quoted 11 lines · Joachim Fritschi

This fixes the broken autoloading of the corresponding twofish assembler ciphers on x86 and x86_64 if they are available. The module name of the generic implementation was in conflict with the alias in the assembler modules.
The generic twofish c implementation is renamed to twofish_generic according to the other algorithms with assembler implementations and an module alias is added for 'twofish'.
You can now load 'twofish' giving you the best implementation by priority, 'twofish-generic' to get the c implementation or 'twofish-asm' to get the assembler version of cipher.

Quoted 1 line

Sorry, patch doesn't apply:

1 out of 1 hunk FAILED -- saving rejects to file crypto/Makefile.rej
patch: **** malformed patch at line 55: * have put this under the GNU General Public License.

BTW, when you regenerate your patch please use the -M option to git diff.

Thanks,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt