]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
crypto: skcipher - remove crypto_skcipher::ivsize
authorEric Biggers <ebiggers@google.com>
Fri, 29 Nov 2019 18:23:03 +0000 (10:23 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Dec 2019 08:36:56 +0000 (16:36 +0800)
Due to the removal of the blkcipher and ablkcipher algorithm types,
crypto_skcipher::ivsize is now redundant since it always equals
crypto_skcipher_alg(tfm)->ivsize.

Remove it and update crypto_skcipher_ivsize() accordingly.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/skcipher.c
include/crypto/skcipher.h

index 13da43c84b6483ec7a473727b5a9827f55776d5e..7d2e722e82af59a7be790b65d476045e975c2c0f 100644 (file)
@@ -686,7 +686,6 @@ static int crypto_skcipher_init_tfm(struct crypto_tfm *tfm)
        skcipher->setkey = skcipher_setkey;
        skcipher->encrypt = alg->encrypt;
        skcipher->decrypt = alg->decrypt;
-       skcipher->ivsize = alg->ivsize;
        skcipher->keysize = alg->max_keysize;
 
        skcipher_set_needkey(skcipher);
index b4655d91661fbe343f193dda0719d7be4359aea8..bf656a97cb6573e2a645e01b536a27b900ed04a8 100644 (file)
@@ -40,7 +40,6 @@ struct crypto_skcipher {
        int (*encrypt)(struct skcipher_request *req);
        int (*decrypt)(struct skcipher_request *req);
 
-       unsigned int ivsize;
        unsigned int reqsize;
        unsigned int keysize;
 
@@ -255,7 +254,7 @@ static inline unsigned int crypto_skcipher_alg_ivsize(struct skcipher_alg *alg)
  */
 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm)
 {
-       return tfm->ivsize;
+       return crypto_skcipher_alg(tfm)->ivsize;
 }
 
 static inline unsigned int crypto_sync_skcipher_ivsize(