]> err.no Git - linux-2.6/commitdiff
[HIFN]: Properly initialize ivsize for CBC modes
authorPatrick McHardy <kaber@trash.net>
Wed, 7 May 2008 14:35:47 +0000 (22:35 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jul 2008 12:35:12 +0000 (20:35 +0800)
For combined modes like cbc(aes) the driver is responsible for
initializing ivsize.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hifn_795x.c

index d09338f70dca8a7b513bc6ec38f7cf4c9209e898..a4b1cea59ae65630ab64c9a66d1888ab76ca52ab 100644 (file)
@@ -2377,6 +2377,7 @@ static struct hifn_alg_template hifn_alg_templates[] = {
        {
                .name = "cbc(des3_ede)", .drv_name = "cbc-3des", .bsize = 8,
                .ablkcipher = {
+                       .ivsize         =       HIFN_IV_LENGTH,
                        .min_keysize    =       HIFN_3DES_KEY_LENGTH,
                        .max_keysize    =       HIFN_3DES_KEY_LENGTH,
                        .setkey         =       hifn_setkey,
@@ -2421,6 +2422,7 @@ static struct hifn_alg_template hifn_alg_templates[] = {
        {
                .name = "cbc(des)", .drv_name = "cbc-des", .bsize = 8,
                .ablkcipher = {
+                       .ivsize         =       HIFN_IV_LENGTH,
                        .min_keysize    =       HIFN_DES_KEY_LENGTH,
                        .max_keysize    =       HIFN_DES_KEY_LENGTH,
                        .setkey         =       hifn_setkey,
@@ -2455,6 +2457,7 @@ static struct hifn_alg_template hifn_alg_templates[] = {
        {
                .name = "cbc(aes)", .drv_name = "cbc-aes", .bsize = 16,
                .ablkcipher = {
+                       .ivsize         =       HIFN_AES_IV_LENGTH,
                        .min_keysize    =       AES_MIN_KEY_SIZE,
                        .max_keysize    =       AES_MAX_KEY_SIZE,
                        .setkey         =       hifn_setkey,