Skip to contentSkip to conversation

Twofish cipher - priority fix

PATCH In review Joachim Fritschi 1 participant 4 messages Jun 4, 2006 – Jun 19, 2006 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 Twofish cipher - priority fix

This patch adds a proper driver name and priority to the generic c implemtation to allow coexistance of c and assembler modules.

diff -uprN linux-2.6.17-rc5.twofish/crypto/twofish_c.c linux-2.6.17-rc5.twofish2/crypto/twofish_c.c
--- linux-2.6.17-rc5.twofish/crypto/twofish_c.c 2006-05-30 15:38:14.627954845
+0200
+++ linux-2.6.17-rc5.twofish2/crypto/twofish_c.c 2006-05-30 19:54:54.713680651
+0200
@@ -182,6 +182,8 @@ static void twofish_decrypt(void *cx, u8

static struct crypto_alg alg = {

 	.cra_name           =   "twofish",
+	.cra_driver_name    =   "twofish-generic",
+	.cra_priority       =   100,
 	.cra_flags          =   CRYPTO_ALG_TYPE_CIPHER,
 	.cra_blocksize      =   TF_BLOCK_SIZE,
 	.cra_ctxsize        =   sizeof(struct twofish_ctx),
#1 lore raw
Quoted 2 lines · Joachim Fritschi

This patch adds a proper driver name and priority to the generic c implemtation to allow coexistance of c and assembler modules.

My first mail was wordwrapped. This one should be unwrapped and working:

crypto/twofish_c.c +2 -0
diff -uprN linux-2.6.17-rc5.twofish/crypto/twofish_c.c linux-2.6.17-rc5.twofish2/crypto/twofish_c.c
@@ -182,6 +182,8 @@ static void twofish_decrypt(void *cx, u8
 
 static struct crypto_alg alg = {
 	.cra_name           =   "twofish",
+	.cra_driver_name    =   "twofish-generic",
+	.cra_priority       =   100,
 	.cra_flags          =   CRYPTO_ALG_TYPE_CIPHER,
 	.cra_blocksize      =   TF_BLOCK_SIZE,
 	.cra_ctxsize        =   sizeof(struct twofish_ctx),
#2 lore raw
In reply to Joachim Fritschi

Updated patch due to the new twofish_common patch

crypto/twofish.c +2 -0
diff -uprN linux-2.6.17-rc5.twofish/crypto/twofish.c linux-2.6.17-rc5.twofish2/crypto/twofish.c
@@ -182,6 +182,8 @@ static void twofish_decrypt(void *cx, u8
 
 static struct crypto_alg alg = {
 	.cra_name           =   "twofish",
+	.cra_driver_name    =   "twofish-generic",
+	.cra_priority       =   100,
 	.cra_flags          =   CRYPTO_ALG_TYPE_CIPHER,
 	.cra_blocksize      =   TF_BLOCK_SIZE,
 	.cra_ctxsize        =   sizeof(struct twofish_ctx),
#3 lore raw
In reply to Joachim Fritschi

This patch is now based on the cryptodev tree.

 crypto/twofish.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
crypto/twofish.c +2 -0
index d5ef89a..9c7f19f 100644
@@ -181,6 +181,8 @@ static void twofish_decrypt(struct crypt
 
 static struct crypto_alg alg = {
 	.cra_name           =   "twofish",
+	.cra_driver_name    =   "twofish-generic",
+	.cra_priority       =   100,
 	.cra_flags          =   CRYPTO_ALG_TYPE_CIPHER,
 	.cra_blocksize      =   TF_BLOCK_SIZE,
 	.cra_ctxsize        =   sizeof(struct twofish_ctx),