Skip to content

Commit

Permalink
crypto: x86/glue_helper - fix storing of new IV in CBC encryption
Browse files Browse the repository at this point in the history
Glue_helper incorrectly XORs new IV over old IV at end of CBC encryption
function when it should store. This causes CBC encryption to give
incorrect output on multi-page encryption requests.

Signed-off-by: Jussi Kivilinna <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
jkivilin authored and herbertx committed Oct 4, 2012
1 parent 200429c commit c9f97a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/crypto/glue_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static unsigned int __glue_cbc_encrypt_128bit(const common_glue_func_t fn,
nbytes -= bsize;
} while (nbytes >= bsize);

u128_xor((u128 *)walk->iv, (u128 *)walk->iv, iv);
*(u128 *)walk->iv = *iv;
return nbytes;
}

Expand Down

0 comments on commit c9f97a2

Please sign in to comment.