/* secCipherXexAes.h - XEX-AES Private Header File */ /* * Copyright (c) 2016-2017, 2021 Wind River Systems, Inc. * * The right to copy, distribute, modify, or otherwise make use * of this software may be licensed only pursuant to the terms * of an applicable Wind River license agreement. */ #ifndef __INCsecCipherXexAesh #define __INCsecCipherXexAesh /* includes */ #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* typedefs */ typedef struct secXexAesCtx { SEC_CIPHER_CTX key1EncrCtx; SEC_CIPHER_CTX key1DecrCtx; SEC_CIPHER_CTX key2EncrCtx; size_t sectorSize; long long sectorNum; UINT8 * pSectorTweak; } SEC_XEX_AES_CTX; /* function declarations */ STATUS secXexAesInit (SEC_XEX_AES_CTX * pCtx, const SEC_CIPHER_TEMPLATE * pAesCipher, UINT8* key1, UINT8* key2, size_t sectorSize); STATUS secXexAesUpdate (SEC_XEX_AES_CTX * pCtx, unsigned char * out, int * outLen, const unsigned char * in, int inLen, long long sectorNum, int encr); STATUS secXexAesCleanup (SEC_XEX_AES_CTX * pCtx); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __INCsecCipherXexAesh */