forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/arch/arm64/crypto/aes-cipher-glue.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Scalar AES core transform
34 *
45 * Copyright (C) 2017 Linaro Ltd <ard.biesheuvel@linaro.org>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #include <crypto/aes.h>
....@@ -13,12 +10,9 @@
1310 #include <linux/module.h>
1411
1512 asmlinkage void __aes_arm64_encrypt(u32 *rk, u8 *out, const u8 *in, int rounds);
16
-EXPORT_SYMBOL(__aes_arm64_encrypt);
17
-
1813 asmlinkage void __aes_arm64_decrypt(u32 *rk, u8 *out, const u8 *in, int rounds);
19
-EXPORT_SYMBOL(__aes_arm64_decrypt);
2014
21
-static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
15
+static void aes_arm64_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
2216 {
2317 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
2418 int rounds = 6 + ctx->key_length / 4;
....@@ -26,7 +20,7 @@
2620 __aes_arm64_encrypt(ctx->key_enc, out, in, rounds);
2721 }
2822
29
-static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
23
+static void aes_arm64_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
3024 {
3125 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
3226 int rounds = 6 + ctx->key_length / 4;
....@@ -46,8 +40,8 @@
4640 .cra_cipher.cia_min_keysize = AES_MIN_KEY_SIZE,
4741 .cra_cipher.cia_max_keysize = AES_MAX_KEY_SIZE,
4842 .cra_cipher.cia_setkey = crypto_aes_set_key,
49
- .cra_cipher.cia_encrypt = aes_encrypt,
50
- .cra_cipher.cia_decrypt = aes_decrypt
43
+ .cra_cipher.cia_encrypt = aes_arm64_encrypt,
44
+ .cra_cipher.cia_decrypt = aes_arm64_decrypt
5145 };
5246
5347 static int __init aes_init(void)