Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-drm-fsl-dcu.git] / crypto / cts.c
index bd9405820e8ac5ade61d6d6793ec18510d456ad9..e467ec0acf9f091cc2865963b5370cd975791ed3 100644 (file)
@@ -290,6 +290,9 @@ static struct crypto_instance *crypto_cts_alloc(struct rtattr **tb)
        if (!is_power_of_2(alg->cra_blocksize))
                goto out_put_alg;
 
+       if (strncmp(alg->cra_name, "cbc(", 4))
+               goto out_put_alg;
+
        inst = crypto_alloc_instance("cts", alg);
        if (IS_ERR(inst))
                goto out_put_alg;
@@ -307,8 +310,6 @@ static struct crypto_instance *crypto_cts_alloc(struct rtattr **tb)
        inst->alg.cra_blkcipher.min_keysize = alg->cra_blkcipher.min_keysize;
        inst->alg.cra_blkcipher.max_keysize = alg->cra_blkcipher.max_keysize;
 
-       inst->alg.cra_blkcipher.geniv = "seqiv";
-
        inst->alg.cra_ctxsize = sizeof(struct crypto_cts_ctx);
 
        inst->alg.cra_init = crypto_cts_init_tfm;