mbed TLS v2.0.0
padlock.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_PADLOCK_H
26 #define MBEDTLS_PADLOCK_H
27 
28 #include "aes.h"
29 
30 #define MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED -0x0030
32 #if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && defined(__i386__)
33 
34 #ifndef MBEDTLS_HAVE_X86
35 #define MBEDTLS_HAVE_X86
36 #endif
37 
38 #include <stdint.h>
39 
40 #define MBEDTLS_PADLOCK_RNG 0x000C
41 #define MBEDTLS_PADLOCK_ACE 0x00C0
42 #define MBEDTLS_PADLOCK_PHE 0x0C00
43 #define MBEDTLS_PADLOCK_PMM 0x3000
44 
45 #define MBEDTLS_PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
58 int mbedtls_padlock_has_support( int feature );
59 
70 int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx,
71  int mode,
72  const unsigned char input[16],
73  unsigned char output[16] );
74 
87 int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx,
88  int mode,
89  size_t length,
90  unsigned char iv[16],
91  const unsigned char *input,
92  unsigned char *output );
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* HAVE_X86 */
99 
100 #endif /* padlock.h */
AES block cipher.
AES context structure.
Definition: aes.h:59