crypto: crypto4xx - Remove cfb and ofb
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 16 Sep 2023 09:21:14 +0000 (17:21 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Dec 2023 03:59:45 +0000 (11:59 +0800)
Remove the unused CFB/OFB implementation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/amcc/crypto4xx_alg.c
drivers/crypto/amcc/crypto4xx_core.c
drivers/crypto/amcc/crypto4xx_core.h

index ded7322427329596b98c2bba1483106e13eac7dd..e0af611a95d88f89da3b2cde4bac06f6886c92ab 100644 (file)
@@ -181,13 +181,6 @@ int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher,
                                    CRYPTO_FEEDBACK_MODE_NO_FB);
 }
 
-int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher,
-                            const u8 *key, unsigned int keylen)
-{
-       return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB,
-                                   CRYPTO_FEEDBACK_MODE_128BIT_CFB);
-}
-
 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher,
                             const u8 *key, unsigned int keylen)
 {
@@ -195,13 +188,6 @@ int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher,
                                    CRYPTO_FEEDBACK_MODE_NO_FB);
 }
 
-int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher,
-                            const u8 *key, unsigned int keylen)
-{
-       return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_OFB,
-                                   CRYPTO_FEEDBACK_MODE_64BIT_OFB);
-}
-
 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher,
                             const u8 *key, unsigned int keylen)
 {
index 8d53372245ad6bc93121c37c064899fb32c06c9a..6006703fb6d767c15f24e876bd79ec1e860fc542 100644 (file)
@@ -1209,26 +1209,6 @@ static struct crypto4xx_alg_common crypto4xx_alg[] = {
                .init = crypto4xx_sk_init,
                .exit = crypto4xx_sk_exit,
        } },
-       { .type = CRYPTO_ALG_TYPE_SKCIPHER, .u.cipher = {
-               .base = {
-                       .cra_name = "cfb(aes)",
-                       .cra_driver_name = "cfb-aes-ppc4xx",
-                       .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
-                       .cra_flags = CRYPTO_ALG_ASYNC |
-                               CRYPTO_ALG_KERN_DRIVER_ONLY,
-                       .cra_blocksize = 1,
-                       .cra_ctxsize = sizeof(struct crypto4xx_ctx),
-                       .cra_module = THIS_MODULE,
-               },
-               .min_keysize = AES_MIN_KEY_SIZE,
-               .max_keysize = AES_MAX_KEY_SIZE,
-               .ivsize = AES_IV_SIZE,
-               .setkey = crypto4xx_setkey_aes_cfb,
-               .encrypt = crypto4xx_encrypt_iv_stream,
-               .decrypt = crypto4xx_decrypt_iv_stream,
-               .init = crypto4xx_sk_init,
-               .exit = crypto4xx_sk_exit,
-       } },
        { .type = CRYPTO_ALG_TYPE_SKCIPHER, .u.cipher = {
                .base = {
                        .cra_name = "ctr(aes)",
@@ -1289,26 +1269,6 @@ static struct crypto4xx_alg_common crypto4xx_alg[] = {
                .init = crypto4xx_sk_init,
                .exit = crypto4xx_sk_exit,
        } },
-       { .type = CRYPTO_ALG_TYPE_SKCIPHER, .u.cipher = {
-               .base = {
-                       .cra_name = "ofb(aes)",
-                       .cra_driver_name = "ofb-aes-ppc4xx",
-                       .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
-                       .cra_flags = CRYPTO_ALG_ASYNC |
-                               CRYPTO_ALG_KERN_DRIVER_ONLY,
-                       .cra_blocksize = 1,
-                       .cra_ctxsize = sizeof(struct crypto4xx_ctx),
-                       .cra_module = THIS_MODULE,
-               },
-               .min_keysize = AES_MIN_KEY_SIZE,
-               .max_keysize = AES_MAX_KEY_SIZE,
-               .ivsize = AES_IV_SIZE,
-               .setkey = crypto4xx_setkey_aes_ofb,
-               .encrypt = crypto4xx_encrypt_iv_stream,
-               .decrypt = crypto4xx_decrypt_iv_stream,
-               .init = crypto4xx_sk_init,
-               .exit = crypto4xx_sk_exit,
-       } },
 
        /* AEAD */
        { .type = CRYPTO_ALG_TYPE_AEAD, .u.aead = {
index 56c10668c0ab0ae514d4be59463ca2be6b0e8a79..96355d463b04e653095db8a75af7a80601b153b5 100644 (file)
@@ -162,14 +162,10 @@ int crypto4xx_build_pd(struct crypto_async_request *req,
                       struct scatterlist *dst_tmp);
 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher,
                             const u8 *key, unsigned int keylen);
-int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher,
-                            const u8 *key, unsigned int keylen);
 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher,
                             const u8 *key, unsigned int keylen);
 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher,
                             const u8 *key, unsigned int keylen);
-int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher,
-                            const u8 *key, unsigned int keylen);
 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher,
                             const u8 *key, unsigned int keylen);
 int crypto4xx_encrypt_ctr(struct skcipher_request *req);