{
@@ -434,8 +450,16 @@ static int crypto_init_blkcipher_ops_async(struct
crypto_tfm *tfm)
crt->setkey = async_setkey;
crt->encrypt = async_encrypt;
crt->decrypt = async_decrypt;
+ crt->geniv = async_geniv;
crt->ivsize = alg->ivsize;
+ if (!alg->geniv) {
+ if (alg->ivsize)
+ return -EINVAL;
+
+ crt->geniv = async_nogeniv;
+ }
+
return 0;
}
@@ -449,6 +473,14 @@ static int crypto_init_blkcipher_ops_sync(struct
crypto_tfm *tfm)
crt->setkey = setkey;
crt->encrypt = alg->encrypt;
crt->decrypt = alg->decrypt;
+ crt->geniv = alg->geniv;
+
+ if (!alg->geniv) {
+ if (alg->ivsize)
+ return -EINVAL;
+
+ crt->geniv = nogeniv;
+ }
So, I am thinking CTR and some of the other modes,
other than CBC, that use an IV will fail with this
change since they currently don't have an alg->geniv...
should they have a geniv similar to that of CBC, which
is gotten randomly?
Regards,
Joy
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html