Skip to content

Commit

Permalink
[HIFN]: Properly initialize ivsize for CBC modes
Browse files Browse the repository at this point in the history
    
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>
  • Loading branch information
Patrick McHardy authored and Herbert Xu committed Jul 10, 2008
1 parent 281d6bd commit 4b804b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/crypto/hifn_795x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4b804b5

Please sign in to comment.