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