.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Scalar AES core transform |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2017 Linaro Ltd. |
---|
5 | 6 | * 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. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <crypto/aes.h> |
---|
.. | .. |
---|
14 | 11 | #include <linux/module.h> |
---|
15 | 12 | |
---|
16 | 13 | asmlinkage void __aes_arm_encrypt(u32 *rk, int rounds, const u8 *in, u8 *out); |
---|
17 | | -EXPORT_SYMBOL(__aes_arm_encrypt); |
---|
18 | | - |
---|
19 | 14 | asmlinkage void __aes_arm_decrypt(u32 *rk, int rounds, const u8 *in, u8 *out); |
---|
20 | | -EXPORT_SYMBOL(__aes_arm_decrypt); |
---|
21 | 15 | |
---|
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) |
---|
23 | 17 | { |
---|
24 | 18 | struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); |
---|
25 | 19 | int rounds = 6 + ctx->key_length / 4; |
---|
.. | .. |
---|
27 | 21 | __aes_arm_encrypt(ctx->key_enc, rounds, in, out); |
---|
28 | 22 | } |
---|
29 | 23 | |
---|
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) |
---|
31 | 25 | { |
---|
32 | 26 | struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); |
---|
33 | 27 | int rounds = 6 + ctx->key_length / 4; |
---|
.. | .. |
---|
47 | 41 | .cra_cipher.cia_min_keysize = AES_MIN_KEY_SIZE, |
---|
48 | 42 | .cra_cipher.cia_max_keysize = AES_MAX_KEY_SIZE, |
---|
49 | 43 | .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, |
---|
52 | 46 | |
---|
53 | 47 | #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS |
---|
54 | 48 | .cra_alignmask = 3, |
---|