crypto: skcipher - remove crypto_skcipher::keysize

Due to the removal of the blkcipher and ablkcipher algorithm types,
crypto_skcipher::keysize is now redundant since it always equals
crypto_skcipher_alg(tfm)->max_keysize.

Remove it and update crypto_skcipher_default_keysize() accordingly.

Also rename crypto_skcipher_default_keysize() to
crypto_skcipher_max_keysize() to clarify that it specifically returns
the maximum key size, not some unspecified "default".

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Eric Biggers
2019-11-29 10:23:04 -08:00
committed by Herbert Xu
parent 140734d371
commit 9ac0d13693
5 changed files with 12 additions and 12 deletions

View File

@@ -41,7 +41,6 @@ struct crypto_skcipher {
int (*decrypt)(struct skcipher_request *req);
unsigned int reqsize;
unsigned int keysize;
struct crypto_tfm base;
};
@@ -377,10 +376,10 @@ static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm,
return crypto_skcipher_setkey(&tfm->base, key, keylen);
}
static inline unsigned int crypto_skcipher_default_keysize(
static inline unsigned int crypto_skcipher_max_keysize(
struct crypto_skcipher *tfm)
{
return tfm->keysize;
return crypto_skcipher_alg(tfm)->max_keysize;
}
/**