Commit c9f97a27ceee84998999bf3341e6d5d207b05539

Authored by Jussi Kivilinna
Committed by Herbert Xu
1 parent 200429cc63

crypto: x86/glue_helper - fix storing of new IV in CBC encryption

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 <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/x86/crypto/glue_helper.c
... ... @@ -110,7 +110,7 @@
110 110 nbytes -= bsize;
111 111 } while (nbytes >= bsize);
112 112  
113   - u128_xor((u128 *)walk->iv, (u128 *)walk->iv, iv);
  113 + *(u128 *)walk->iv = *iv;
114 114 return nbytes;
115 115 }
116 116