blob: 35d5926cdee9d6ea6228deb0bfc4c0b810ca5680 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef AES_ARM_H
#define AES_ARM_H
#include "gnutls_int.h"
#define ALIGN16(x) \
((void *)(((ptrdiff_t)(x)+(ptrdiff_t)0x0f)&~((ptrdiff_t)0x0f)))
#define AES_KEY_ALIGN_SIZE 4
#define AES_MAXNR 14
typedef struct {
/* We add few more integers to allow alignment
* on a 16-byte boundary.
*/
uint32_t rd_key[4 * (AES_MAXNR + 1) + AES_KEY_ALIGN_SIZE];
uint32_t rounds;
} AES_KEY;
int aes_v8_set_encrypt_key(const unsigned char *userKey, int bits, AES_KEY *key);
int aes_v8_set_decrypt_key(const unsigned char *userKey, int bits, AES_KEY *key);
void aes_v8_cbc_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key, unsigned char *ivec, int enc);
void aes_v8_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key);
void aes_v8_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key);
extern const gnutls_crypto_cipher_st _gnutls_aes_gcm_aarch64;
extern const gnutls_crypto_cipher_st _gnutls_aes_cbc_aarch64;
#endif
|