padlock.h

Go to the documentation of this file.
00001 
00024 #ifndef MBEDTLS_PADLOCK_H
00025 #define MBEDTLS_PADLOCK_H
00026 
00027 #include "aes.h"
00028 
00029 #define MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED               -0x0030  
00031 #if defined(__has_feature)
00032 #if __has_feature(address_sanitizer)
00033 #define MBEDTLS_HAVE_ASAN
00034 #endif
00035 #endif
00036 
00037 /* Some versions of ASan result in errors about not enough registers */
00038 #if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && defined(__i386__) && \
00039     !defined(MBEDTLS_HAVE_ASAN)
00040 
00041 #ifndef MBEDTLS_HAVE_X86
00042 #define MBEDTLS_HAVE_X86
00043 #endif
00044 
00045 #include <stdint.h>
00046 
00047 #define MBEDTLS_PADLOCK_RNG 0x000C
00048 #define MBEDTLS_PADLOCK_ACE 0x00C0
00049 #define MBEDTLS_PADLOCK_PHE 0x0C00
00050 #define MBEDTLS_PADLOCK_PMM 0x3000
00051 
00052 #define MBEDTLS_PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00065 int mbedtls_padlock_has_support( int feature );
00066 
00077 int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx,
00078                        int mode,
00079                        const unsigned char input[16],
00080                        unsigned char output[16] );
00081 
00094 int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx,
00095                        int mode,
00096                        size_t length,
00097                        unsigned char iv[16],
00098                        const unsigned char *input,
00099                        unsigned char *output );
00100 
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 
00105 #endif /* HAVE_X86  */
00106 
00107 #endif /* padlock.h */

Generated on 11 Mar 2017 for mbed TLS v2.4.2 by  doxygen 1.4.7