mbed TLS v1.3.11
padlock.h
Go to the documentation of this file.
1 
25 #ifndef POLARSSL_PADLOCK_H
26 #define POLARSSL_PADLOCK_H
27 
28 #include "aes.h"
29 
30 #define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED -0x0030
32 #if defined(POLARSSL_HAVE_ASM) && defined(__GNUC__) && defined(__i386__)
33 
34 #ifndef POLARSSL_HAVE_X86
35 #define POLARSSL_HAVE_X86
36 #endif
37 
38 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
39 #include <basetsd.h>
40 typedef INT32 int32_t;
41 #else
42 #include <inttypes.h>
43 #endif
44 
45 #define PADLOCK_RNG 0x000C
46 #define PADLOCK_ACE 0x00C0
47 #define PADLOCK_PHE 0x0C00
48 #define PADLOCK_PMM 0x3000
49 
50 #define PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
63 int padlock_supports( int feature );
64 
75 int padlock_xcryptecb( aes_context *ctx,
76  int mode,
77  const unsigned char input[16],
78  unsigned char output[16] );
79 
92 int padlock_xcryptcbc( aes_context *ctx,
93  int mode,
94  size_t length,
95  unsigned char iv[16],
96  const unsigned char *input,
97  unsigned char *output );
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* HAVE_X86 */
104 
105 #endif /* padlock.h */
AES context structure.
Definition: aes.h:65
AES block cipher.