![]() |
xilasu
Vitis Drivers API Documentation
|
Functions | |
| s32 | XAsu_HmacCompute (XAsu_ClientParams *ClientParamsPtr, XAsu_HmacParams *HmacParamsPtr) |
| This function sends command to ASUFW to computes the Message Authentication Code (MAC) for the given message using the specified hash function and the provided key. More... | |
| s32 | XAsu_HmacKat (XAsu_ClientParams *ClientParamsPtr) |
| This function sends command to ASUFW to perform HMAC Known Answer Tests (KAT's). More... | |
| s32 XAsu_HmacCompute | ( | XAsu_ClientParams * | ClientParamsPtr, |
| XAsu_HmacParams * | HmacParamsPtr | ||
| ) |
This function sends command to ASUFW to computes the Message Authentication Code (MAC) for the given message using the specified hash function and the provided key.
| ClientParamsPtr | Pointer to the XAsu_ClientParams structure which holds the client input parameters. |
| HmacParamsPtr | Pointer to XAsu_HmacParams structure which holds the parameters of HMAC input arguments. |
Validate input parameters.
If operation flag is set to START,
If operation flag is either UPDATE or FINISH,
If FINISH operation flag is set, update response buffer details.
Get the command ID based on SHA type.
Create command header.
Update request buffer and send an IPI request to ASU.
References XAsu_ClientParams::ClientCtx, XAsu_HmacParams::HmacAddr, XAsu_HmacParams::HmacLen, XAsu_HmacParams::OperationFlags, XAsu_HmacParams::ShaType, XAsu_CreateHeader(), XASU_FAIL_SAVE_CTX, XAsu_FreeCtx(), XASU_HMAC_COMPUTE_SHA2_CMD_ID, XASU_HMAC_COMPUTE_SHA3_CMD_ID, XASU_HMAC_INIT, XASU_INVALID_UNIQUE_ID, XASU_MODULE_HMAC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA2_TYPE, XASU_SHA_FINISH, XASU_UNIQUE_ID_MAX, XAsu_UpdateCallBackDetails(), XAsu_UpdateNGetCtx(), XAsu_UpdateQueueBufferNSendIpi(), XAsu_ValidateClientParameters(), and XAsu_VerifyNGetUniqueIdCtx().
| s32 XAsu_HmacKat | ( | XAsu_ClientParams * | ClientParamsPtr | ) |
This function sends command to ASUFW to perform HMAC Known Answer Tests (KAT's).
| ClientParamsPtr | Pointer to the XAsu_ClientParams structure which holds the client input parameters. |
Validate input parameters.
Generate a unique ID and register the callback function.
Create command header.
Update request buffer and send an IPI request to ASU.
References XAsu_CreateHeader(), XASU_HMAC_KAT_CMD_ID, XASU_INVALID_UNIQUE_ID, XASU_MODULE_HMAC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().