diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2013-09-15 17:10:43 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2013-10-04 09:26:54 +0200 |
commit | 5ce26f3b5ae8fafdd28375a004f7b8e924e9bacb (patch) | |
tree | 1d94d98023fee6f9f0433c2bad5309c269f73e52 /arch/arm/crypto/aes_glue.h | |
parent | ARM: pull in <asm/simd.h> from asm-generic (diff) | |
download | linux-5ce26f3b5ae8fafdd28375a004f7b8e924e9bacb.tar.xz linux-5ce26f3b5ae8fafdd28375a004f7b8e924e9bacb.zip |
ARM: move AES typedefs and function prototypes to separate header
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>
Diffstat (limited to 'arch/arm/crypto/aes_glue.h')
-rw-r--r-- | arch/arm/crypto/aes_glue.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/crypto/aes_glue.h b/arch/arm/crypto/aes_glue.h new file mode 100644 index 000000000000..cca3e51eb606 --- /dev/null +++ b/arch/arm/crypto/aes_glue.h @@ -0,0 +1,19 @@ + +#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); |