summaryrefslogtreecommitdiffstats
path: root/include/crypto/skcipher.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-10-25 21:41:12 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-01 06:38:32 +0100
commitc65058b7587fd3d001c57a50285477be521f5350 (patch)
tree2dbfbbedd874c0c15f65ab53238de22eef9012b1 /include/crypto/skcipher.h
parentcrypto: skcipher - rename crypto_skcipher_type2 to crypto_skcipher_type (diff)
downloadlinux-c65058b7587fd3d001c57a50285477be521f5350.tar.xz
linux-c65058b7587fd3d001c57a50285477be521f5350.zip
crypto: skcipher - remove the "blkcipher" algorithm type
Now that all "blkcipher" algorithms have been converted to "skcipher", remove the blkcipher algorithm type. The skcipher (symmetric key cipher) algorithm type was introduced a few years ago to replace both blkcipher and ablkcipher (synchronous and asynchronous block cipher). The advantages of skcipher include: - A much less confusing name, since none of these algorithm types have ever actually been for raw block ciphers, but rather for all length-preserving encryption modes including block cipher modes of operation, stream ciphers, and other length-preserving modes. - It unified blkcipher and ablkcipher into a single algorithm type which supports both synchronous and asynchronous implementations. Note, blkcipher already operated only on scatterlists, so the fact that skcipher does too isn't a regression in functionality. - Better type safety by using struct skcipher_alg, struct crypto_skcipher, etc. instead of crypto_alg, crypto_tfm, etc. - It sometimes simplifies the implementations of algorithms. Also, the blkcipher API was no longer being tested. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/skcipher.h')
-rw-r--r--include/crypto/skcipher.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h
index e34993f5d190..8c5a31e810da 100644
--- a/include/crypto/skcipher.h
+++ b/include/crypto/skcipher.h
@@ -241,10 +241,6 @@ static inline struct skcipher_alg *crypto_skcipher_alg(
static inline unsigned int crypto_skcipher_alg_ivsize(struct skcipher_alg *alg)
{
- if ((alg->base.cra_flags & CRYPTO_ALG_TYPE_MASK) ==
- CRYPTO_ALG_TYPE_BLKCIPHER)
- return alg->base.cra_blkcipher.ivsize;
-
if (alg->base.cra_ablkcipher.encrypt)
return alg->base.cra_ablkcipher.ivsize;
@@ -290,10 +286,6 @@ static inline unsigned int crypto_skcipher_blocksize(
static inline unsigned int crypto_skcipher_alg_chunksize(
struct skcipher_alg *alg)
{
- if ((alg->base.cra_flags & CRYPTO_ALG_TYPE_MASK) ==
- CRYPTO_ALG_TYPE_BLKCIPHER)
- return alg->base.cra_blocksize;
-
if (alg->base.cra_ablkcipher.encrypt)
return alg->base.cra_blocksize;