PolarSSL v1.3.9
padlock.h
Go to the documentation of this file.
1 
28 #ifndef POLARSSL_PADLOCK_H
29 #define POLARSSL_PADLOCK_H
30 
31 #include "aes.h"
32 
33 #define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED -0x0030
35 #if defined(POLARSSL_HAVE_ASM) && defined(__GNUC__) && defined(__i386__)
36 
37 #ifndef POLARSSL_HAVE_X86
38 #define POLARSSL_HAVE_X86
39 #endif
40 
41 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
42 #include <basetsd.h>
43 typedef INT32 int32_t;
44 #else
45 #include <inttypes.h>
46 #endif
47 
48 
49 #define PADLOCK_RNG 0x000C
50 #define PADLOCK_ACE 0x00C0
51 #define PADLOCK_PHE 0x0C00
52 #define PADLOCK_PMM 0x3000
53 
54 #define PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
67 int padlock_supports( int feature );
68 
79 int padlock_xcryptecb( aes_context *ctx,
80  int mode,
81  const unsigned char input[16],
82  unsigned char output[16] );
83 
96 int padlock_xcryptcbc( aes_context *ctx,
97  int mode,
98  size_t length,
99  unsigned char iv[16],
100  const unsigned char *input,
101  unsigned char *output );
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* HAVE_X86 */
108 
109 #endif /* padlock.h */
AES context structure.
Definition: aes.h:68
AES block cipher.