PolarSSL v1.1.4
padlock.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_PADLOCK_H
28 #define POLARSSL_PADLOCK_H
29 
30 #include "aes.h"
31 
32 #define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED -0x0030
34 #if defined(POLARSSL_HAVE_ASM) && defined(__GNUC__) && defined(__i386__)
35 
36 #ifndef POLARSSL_HAVE_X86
37 #define POLARSSL_HAVE_X86
38 #endif
39 
40 #define PADLOCK_RNG 0x000C
41 #define PADLOCK_ACE 0x00C0
42 #define PADLOCK_PHE 0x0C00
43 #define PADLOCK_PMM 0x3000
44 
45 #define PADLOCK_ALIGN16(x) (unsigned long *) (16 + ((long) x & ~15))
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
58 int padlock_supports( int feature );
59 
70 int padlock_xcryptecb( aes_context *ctx,
71  int mode,
72  const unsigned char input[16],
73  unsigned char output[16] );
74 
87 int padlock_xcryptcbc( 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 */