PolarSSL v1.3.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 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
41 #include <basetsd.h>
42 typedef INT32 int32_t;
43 #else
44 #include <inttypes.h>
45 #endif
46 
47 
48 #define PADLOCK_RNG 0x000C
49 #define PADLOCK_ACE 0x00C0
50 #define PADLOCK_PHE 0x0C00
51 #define PADLOCK_PMM 0x3000
52 
53 #define PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
66 int padlock_supports( int feature );
67 
78 int padlock_xcryptecb( aes_context *ctx,
79  int mode,
80  const unsigned char input[16],
81  unsigned char output[16] );
82 
95 int padlock_xcryptcbc( aes_context *ctx,
96  int mode,
97  size_t length,
98  unsigned char iv[16],
99  const unsigned char *input,
100  unsigned char *output );
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* HAVE_X86 */
107 
108 #endif /* padlock.h */
AES context structure.
Definition: aes.h:64
AES block cipher.