summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-08-13 23:10:39 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2009-08-13 23:10:39 +1000
commitaef27136b8b5e526f2e96ca1caa30a6d07e70f42 (patch)
tree3192bd703f2e4971318ac6a7eabb33007c1eac96 /crypto
parent73fec1209433d6b33924c1b06122ee217ce98931 (diff)
downloadlinux-3.10-aef27136b8b5e526f2e96ca1caa30a6d07e70f42.tar.gz
linux-3.10-aef27136b8b5e526f2e96ca1caa30a6d07e70f42.tar.bz2
linux-3.10-aef27136b8b5e526f2e96ca1caa30a6d07e70f42.zip
crypto: ctr - Use chainiv on raw counter mode
Raw counter mode only works with chainiv, which is no longer the default IV generator on SMP machines. This broke raw counter mode as it can no longer instantiate as a givcipher. This patch fixes it by always picking chainiv on raw counter mode. This is based on the diagnosis and a patch by Huang Ying. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ctr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ctr.c b/crypto/ctr.c
index 2d7425f0e7b..6c3bfabb9d1 100644
--- a/crypto/ctr.c
+++ b/crypto/ctr.c
@@ -219,6 +219,8 @@ static struct crypto_instance *crypto_ctr_alloc(struct rtattr **tb)
inst->alg.cra_blkcipher.encrypt = crypto_ctr_crypt;
inst->alg.cra_blkcipher.decrypt = crypto_ctr_crypt;
+ inst->alg.cra_blkcipher.geniv = "chainiv";
+
out:
crypto_mod_put(alg);
return inst;