forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/arm/crypto/aes-cipher-glue.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Scalar AES core transform
34 *
45 * Copyright (C) 2017 Linaro Ltd.
56 * Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <crypto/aes.h>
....@@ -14,12 +11,9 @@
1411 #include <linux/module.h>
1512
1613 asmlinkage void __aes_arm_encrypt(u32 *rk, int rounds, const u8 *in, u8 *out);
17
-EXPORT_SYMBOL(__aes_arm_encrypt);
18
-
1914 asmlinkage void __aes_arm_decrypt(u32 *rk, int rounds, const u8 *in, u8 *out);
20
-EXPORT_SYMBOL(__aes_arm_decrypt);
2115
22
-static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
16
+static void aes_arm_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
2317 {
2418 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
2519 int rounds = 6 + ctx->key_length / 4;
....@@ -27,7 +21,7 @@
2721 __aes_arm_encrypt(ctx->key_enc, rounds, in, out);
2822 }
2923
30
-static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
24
+static void aes_arm_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
3125 {
3226 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
3327 int rounds = 6 + ctx->key_length / 4;
....@@ -47,8 +41,8 @@
4741 .cra_cipher.cia_min_keysize = AES_MIN_KEY_SIZE,
4842 .cra_cipher.cia_max_keysize = AES_MAX_KEY_SIZE,
4943 .cra_cipher.cia_setkey = crypto_aes_set_key,
50
- .cra_cipher.cia_encrypt = aes_encrypt,
51
- .cra_cipher.cia_decrypt = aes_decrypt,
44
+ .cra_cipher.cia_encrypt = aes_arm_encrypt,
45
+ .cra_cipher.cia_decrypt = aes_arm_decrypt,
5246
5347 #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
5448 .cra_alignmask = 3,