padlock.h
mbedtls/config.h
mbedtls/aes.h
mbedtls/aes.h
mbedtls/check_config.h
mbedtls/config.h
padlock.h
mbedtls/platform_time.h
mbedtls/platform_util.h
limits.h
stddef.h
stdint.h
time.h
MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED
-0x0030

Input data should be aligned.

VIA PadLock ACE for HW encryption/decryption supported by some processors.

These functions are only for internal use by other library functions; you must not call them directly.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */
    #ifndefMBEDTLS_PADLOCK_H
    #defineMBEDTLS_PADLOCK_H

    #if!defined(MBEDTLS_CONFIG_FILE)
    #include"mbedtls/config.h"
    #else
    #includeMBEDTLS_CONFIG_FILE
    #endif

    #include"mbedtls/aes.h"

    #defineMBEDTLS_ERR_PADLOCK_DATA_MISALIGNED-0x0030

    #ifdefined(__has_feature)
    #if__has_feature(address_sanitizer)
    #defineMBEDTLS_HAVE_ASAN
    #endif
    #endif

    /*SomeversionsofASanresultinerrorsaboutnotenoughregisters*/
    #ifdefined(MBEDTLS_PADLOCK_C)&&defined(MBEDTLS_HAVE_ASM)&&\
    defined(__GNUC__)&&defined(__i386__)&&\
    !defined(MBEDTLS_HAVE_ASAN)

    #defineMBEDTLS_VIA_PADLOCK_HAVE_CODE

    #ifndefMBEDTLS_HAVE_X86
    #defineMBEDTLS_HAVE_X86
    #endif

    #include<stdint.h>

    #defineMBEDTLS_PADLOCK_RNG0x000C
    #defineMBEDTLS_PADLOCK_ACE0x00C0
    #defineMBEDTLS_PADLOCK_PHE0x0C00
    #defineMBEDTLS_PADLOCK_PMM0x3000

    #defineMBEDTLS_PADLOCK_ALIGN16(x)(uint32_t*)(16+((int32_t)(x)&~15))

    #ifdef__cplusplus
    extern"C"{
    #endif

    intmbedtls_padlock_has_support(intfeature);

    intmbedtls_padlock_xcryptecb(mbedtls_aes_context*ctx,
    intmode,
    constunsignedcharinput[16],
    unsignedcharoutput[16]);

    intmbedtls_padlock_xcryptcbc(mbedtls_aes_context*ctx,
    intmode,
    size_tlength,
    unsignedchariv[16],
    constunsignedchar*input,
    unsignedchar*output);

    #ifdef__cplusplus
    }
    #endif

    #endif/*MBEDTLS_PADLOCK_C&&MBEDTLS_HAVE_ASM&&
    __GNUC__&&__i386__&&!MBEDTLS_HAVE_ASAN*/

    #endif/*padlock.h*/