00001 00004 #ifndef XYSSL_PADLOCK_H 00005 #define XYSSL_PADLOCK_H 00006 00007 #include "xyssl/aes.h" 00008 00009 #if (defined(__GNUC__) && defined(__i386__)) 00010 00011 #ifndef XYSSL_HAVE_X86 00012 #define XYSSL_HAVE_X86 00013 #endif 00014 00015 #define PADLOCK_RNG 0x000C 00016 #define PADLOCK_ACE 0x00C0 00017 #define PADLOCK_PHE 0x0C00 00018 #define PADLOCK_PMM 0x3000 00019 00020 #define PADLOCK_ALIGN16(x) (unsigned long *) (16 + ((long) x & ~15)) 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00031 int padlock_supports( int feature ); 00032 00043 int padlock_xcryptecb( aes_context *ctx, 00044 int mode, 00045 unsigned char input[16], 00046 unsigned char output[16] ); 00047 00060 int padlock_xcryptcbc( aes_context *ctx, 00061 int mode, 00062 int length, 00063 unsigned char iv[16], 00064 unsigned char *input, 00065 unsigned char *output ); 00066 00067 #ifdef __cplusplus 00068 } 00069 #endif 00070 00071 #endif /* HAVE_X86 */ 00072 00073 #endif /* padlock.h */