aesni.h

Go to the documentation of this file.
00001 
00023 #ifndef MBEDTLS_AESNI_H
00024 #define MBEDTLS_AESNI_H
00025 
00026 #include "aes.h"
00027 
00028 #define MBEDTLS_AESNI_AES      0x02000000u
00029 #define MBEDTLS_AESNI_CLMUL    0x00000002u
00030 
00031 #if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) &&  \
00032     ( defined(__amd64__) || defined(__x86_64__) )   &&  \
00033     ! defined(MBEDTLS_HAVE_X86_64)
00034 #define MBEDTLS_HAVE_X86_64
00035 #endif
00036 
00037 #if defined(MBEDTLS_HAVE_X86_64)
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00051 int mbedtls_aesni_has_support( unsigned int what );
00052 
00063 int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx,
00064                      int mode,
00065                      const unsigned char input[16],
00066                      unsigned char output[16] );
00067 
00078 void mbedtls_aesni_gcm_mult( unsigned char c[16],
00079                      const unsigned char a[16],
00080                      const unsigned char b[16] );
00081 
00089 void mbedtls_aesni_inverse_key( unsigned char *invkey,
00090                         const unsigned char *fwdkey, int nr );
00091 
00101 int mbedtls_aesni_setkey_enc( unsigned char *rk,
00102                       const unsigned char *key,
00103                       size_t bits );
00104 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif /* MBEDTLS_HAVE_X86_64 */
00110 
00111 #endif /* MBEDTLS_AESNI_H */

Generated on 11 Mar 2017 for mbed TLS v2.4.2 by  doxygen 1.4.7