![]() |
TrustCore SDK Crypto Interface API reference
version 2.0
|
Cryptographic Interface header file for declaring AES-XTS methods. More...
Go to the source code of this file.
Functions | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_AESXTSDecrypt (MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext *pCtx, ubyte pTweak[AES_BLOCK_SIZE], ubyte *pCipher, ubyte4 cipherLen) |
Performs the AES-XTS cipher operation to do an inplace decryption. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_AESXTSDecryptExt (MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext *pCtx, ubyte pTweak[AES_BLOCK_SIZE], ubyte *pCipher, ubyte4 cipherLen, void *pExtCtx) |
Performs the AES-XTS cipher operation to do an inplace decryption. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_AESXTSEncrypt (MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext *pCtx, ubyte pTweak[AES_BLOCK_SIZE], ubyte *pPlain, ubyte4 plainLen) |
Performs the AES-XTS cipher operation to do an inplace encryption. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_AESXTSEncryptExt (MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext *pCtx, ubyte pTweak[AES_BLOCK_SIZE], ubyte *pPlain, ubyte4 plainLen, void *pExtCtx) |
Performs the AES-XTS cipher operation to do an inplace encryption. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_CloneAESXTSCtx (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, BulkCtx *ppNewCtx) |
Clones an AES-XTS context. More... | |
MOC_EXTERN BulkCtx | CRYPTO_INTERFACE_CreateAESXTSCtx (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte *pKeyMaterial, sbyte4 keyLength, sbyte4 encrypt) |
Creates and initializes a new AES-XTS context. More... | |
MOC_EXTERN BulkCtx | CRYPTO_INTERFACE_CreateAESXTSCtxExt (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte *pKeyMaterial, sbyte4 keyLength, sbyte4 encrypt, void *pExtCtx) |
Creates and initializes a new AES-XTS context. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_DeleteAESXTSCtx (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppCtx) |
Deletes an AES-XTS context. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_DeleteAESXTSCtxExt (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppCtx, void *pExtCtx) |
Deletes an AES-XTS context. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_DoAESXTS (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pData, sbyte4 dataLen, sbyte4 encrypt, ubyte *pTweak) |
Performs the AES-XTS cipher operation to do an inplace encryption or decryption. More... | |
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_DoAESXTSExt (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pData, sbyte4 dataLen, sbyte4 encrypt, ubyte *pTweak, void *pExtCtx) |
Performs the AES-XTS cipher operation to do an inplace encryption or decryption. More... | |
Add details here.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_AESXTSDecrypt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext * | pCtx, |
ubyte | pTweak[AES_BLOCK_SIZE], | ||
ubyte * | pCipher, | ||
ubyte4 | cipherLen | ||
) |
pCtx | A pointer to a previously inialized context. |
pTweak | The 16 byte tweak. |
pCipher | The ciphertext to decrypt. |
cipherLen | Length in bytes of pCipher. Does not have to be a multiple of the AES block size (16). |
OK
(0) if successful, otherwise a negative number error code from merrors.h MOC_EXTERN MSTATUS CRYPTO_INTERFACE_AESXTSDecryptExt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext * | pCtx, |
ubyte | pTweak[AES_BLOCK_SIZE], | ||
ubyte * | pCipher, | ||
ubyte4 | cipherLen, | ||
void * | pExtCtx | ||
) |
pCtx | A pointer to a previously inialized context. |
pTweak | The 16 byte tweak. |
pCipher | The ciphertext to decrypt. |
cipherLen | Length in bytes of pCipher. Does not have to be a multiple of the AES block size (16). |
pExtCtx | An extended context reserved for future use. |
OK
(0) if successful, otherwise a negative number error code from merrors.h MOC_EXTERN MSTATUS CRYPTO_INTERFACE_AESXTSEncrypt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext * | pCtx, |
ubyte | pTweak[AES_BLOCK_SIZE], | ||
ubyte * | pPlain, | ||
ubyte4 | plainLen | ||
) |
pCtx | A pointer to a previously inialized context. |
pTweak | The 16 byte tweak. |
pPlain | The plaintext to encrypt. |
plainLen | Length in bytes of pPlain. Does not have to be a multiple of the AES block size (16). |
OK
(0) if successful, otherwise a negative number error code from merrors.h MOC_EXTERN MSTATUS CRYPTO_INTERFACE_AESXTSEncryptExt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) aesXTSCipherContext * | pCtx, |
ubyte | pTweak[AES_BLOCK_SIZE], | ||
ubyte * | pPlain, | ||
ubyte4 | plainLen, | ||
void * | pExtCtx | ||
) |
pCtx | A pointer to a previously inialized context. |
pTweak | The 16 byte tweak. |
pPlain | The plaintext to encrypt. |
plainLen | Length in bytes of pPlain. Does not have to be a multiple of the AES block size (16). |
pExtCtx | An extended context reserved for future use. |
OK
(0) if successful, otherwise a negative number error code from merrors.h MOC_EXTERN MSTATUS CRYPTO_INTERFACE_CloneAESXTSCtx | ( | MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx | pCtx, |
BulkCtx * | ppNewCtx | ||
) |
pCtx | Pointer to an instantiated BulkCtx. |
ppNewCtx | Double pointer to the BulkCtx to be created and populated with the data from the source context. |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. MOC_EXTERN BulkCtx CRYPTO_INTERFACE_CreateAESXTSCtx | ( | MOC_SYM(hwAccelDescr hwAccelCtx) ubyte * | pKeyMaterial, |
sbyte4 | keyLength, | ||
sbyte4 | encrypt | ||
) |
Note it is the callers responsibility to free this object after use by calling CRYPTO_INTERFACE_DeleteAESXTSCtx.
pKeyMaterial | Key material to use for the cipher operation. |
keyLength | Length in bytes of the key material. Two AES-128 or AES-256 keys will be formed hence keyLength must be either 32 or 64. |
encrypt | TRUE to prepare the context for encryption; FALSE to prepare the context for decryption. |
OK
(0) if successful, otherwise a negative number error code from merrors.h. MOC_EXTERN BulkCtx CRYPTO_INTERFACE_CreateAESXTSCtxExt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) ubyte * | pKeyMaterial, |
sbyte4 | keyLength, | ||
sbyte4 | encrypt, | ||
void * | pExtCtx | ||
) |
Note it is the callers responsibility to free this object after use by calling CRYPTO_INTERFACE_DeleteAESXTSCtxExt.
pKeyMaterial | Key material to use for the cipher operation. |
keyLength | Length in bytes of the key material. Two AES-128 or AES-256 keys will be formed hence keyLength must be either 32 or 64. |
encrypt | TRUE to prepare the context for encryption; FALSE to prepare the context for decryption. |
pExtCtx | An extended context reserved for future use. |
OK
(0) if successful, otherwise a negative number error code from merrors.h. MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DeleteAESXTSCtx | ( | MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx * | ppCtx | ) |
ppCtx | Pointer to the BulkCtx to be deleted. |
OK
(0) if successful, otherwise a negative number error code from merrors.h. MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DeleteAESXTSCtxExt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx * | ppCtx, |
void * | pExtCtx | ||
) |
ppCtx | Pointer to the BulkCtx to be deleted. |
pExtCtx | An extended context reserved for future use. |
OK
(0) if successful, otherwise a negative number error code from merrors.h. MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DoAESXTS | ( | MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx | pCtx, |
ubyte * | pData, | ||
sbyte4 | dataLen, | ||
sbyte4 | encrypt, | ||
ubyte * | pTweak | ||
) |
This is effectively a wrapper of CRYPTO_INTERFACE_AESXTSEncrypt and CRYPTO_INTERFACE_AESXTSDecrypt.
pCtx | A previously initialized context. |
pData | Data to encrypt or decrypt. |
dataLen | Length in bytes of the data to process. Does not have to be a multiple of the AES block size (16). |
encrypt | TRUE to prepare the context for encryption; FALSE to prepare the context for decryption. |
pTweak | The 16 byte tweak. |
OK
(0) if successful, otherwise a negative number error code from merrors.h MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DoAESXTSExt | ( | MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx | pCtx, |
ubyte * | pData, | ||
sbyte4 | dataLen, | ||
sbyte4 | encrypt, | ||
ubyte * | pTweak, | ||
void * | pExtCtx | ||
) |
This is effectively a wrapper of CRYPTO_INTERFACE_AESXTSEncryptExt and CRYPTO_INTERFACE_AESXTSDecryptExt.
pCtx | A previously initialized context. |
pData | Data to encrypt or decrypt. |
dataLen | Length in bytes of the data to process. Does not have to be a multiple of the AES block size (16). |
encrypt | TRUE to prepare the context for encryption; FALSE to prepare the context for decryption. |
pTweak | The 16 byte tweak. |
pExtCtx | An extended context reserved for future use. |
OK
(0) if successful, otherwise a negative number error code from merrors.h