mbed TLS v2.6.0
aesni.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_AESNI_H
26 #define MBEDTLS_AESNI_H
27 
28 #include "aes.h"
29 
30 #define MBEDTLS_AESNI_AES 0x02000000u
31 #define MBEDTLS_AESNI_CLMUL 0x00000002u
32 
33 #if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && \
34  ( defined(__amd64__) || defined(__x86_64__) ) && \
35  ! defined(MBEDTLS_HAVE_X86_64)
36 #define MBEDTLS_HAVE_X86_64
37 #endif
38 
39 #if defined(MBEDTLS_HAVE_X86_64)
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
53 int mbedtls_aesni_has_support( unsigned int what );
54 
65 int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx,
66  int mode,
67  const unsigned char input[16],
68  unsigned char output[16] );
69 
80 void mbedtls_aesni_gcm_mult( unsigned char c[16],
81  const unsigned char a[16],
82  const unsigned char b[16] );
83 
91 void mbedtls_aesni_inverse_key( unsigned char *invkey,
92  const unsigned char *fwdkey, int nr );
93 
103 int mbedtls_aesni_setkey_enc( unsigned char *rk,
104  const unsigned char *key,
105  size_t bits );
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* MBEDTLS_HAVE_X86_64 */
112 
113 #endif /* MBEDTLS_AESNI_H */
AES block cipher.
AES context structure.
Definition: aes.h:65