mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 02:21:36 +00:00
5ce26f3b5a
Put the struct definitions for AES keys and the asm function prototypes in a separate header and export the asm functions from the module. This allows other drivers to use them directly. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
20 lines
555 B
C
20 lines
555 B
C
|
|
#define AES_MAXNR 14
|
|
|
|
struct AES_KEY {
|
|
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
|
int rounds;
|
|
};
|
|
|
|
struct AES_CTX {
|
|
struct AES_KEY enc_key;
|
|
struct AES_KEY dec_key;
|
|
};
|
|
|
|
asmlinkage void AES_encrypt(const u8 *in, u8 *out, struct AES_KEY *ctx);
|
|
asmlinkage void AES_decrypt(const u8 *in, u8 *out, struct AES_KEY *ctx);
|
|
asmlinkage int private_AES_set_decrypt_key(const unsigned char *userKey,
|
|
const int bits, struct AES_KEY *key);
|
|
asmlinkage int private_AES_set_encrypt_key(const unsigned char *userKey,
|
|
const int bits, struct AES_KEY *key);
|