xilasu
Vitis Drivers API Documentation
Keywrap Client APIs

Functions

s32 XAsu_KeyWrap (XAsu_ClientParams *ClientParamsPtr, XAsu_KeyWrapParams *KeyWrapParamsPtr)
 This function sends a command to wrap a given key using a specified AES wrapping key. More...
 
s32 XAsu_KeyUnwrap (XAsu_ClientParams *ClientParamsPtr, XAsu_KeyWrapParams *KeyUnwrapParamsPtr)
 This function sends a command to ASUFW to unwrap a given key using a specified AES wrapping key. More...
 
s32 XAsu_KeyWrapKat (XAsu_ClientParams *ClientParamsPtr)
 This function sends command to ASUFW to perform Key Wrap Unwrap Known Answer Tests (KAT's). More...
 

Function Documentation

s32 XAsu_KeyUnwrap ( XAsu_ClientParams ClientParamsPtr,
XAsu_KeyWrapParams KeyUnwrapParamsPtr 
)

This function sends a command to ASUFW to unwrap a given key using a specified AES wrapping key.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
KeyUnwrapParamsPtrPointer to XAsu_KeyWrapParams structure which holds the parameters of key wrap input arguments.
Returns
  • XST_SUCCESS, if IPI request to ASU is sent successfully.
  • XASU_INVALID_ARGUMENT, if any argument is invalid.
  • XASU_INVALID_UNIQUE_ID, if received Queue ID is invalid.
  • XST_FAILURE, if sending IPI request to ASU fails.

Validate input parameters.

Set the command ID based on SHA type.

Generate a unique ID and register the callback function.

Create command header.

Update request buffer and send an IPI request to ASU.

References XAsu_KeyWrapParams::ActualOutuputDataLenAddr, XAsu_KeyWrapParams::ShaType, XAsu_CreateHeader(), XASU_INVALID_ARGUMENT, XASU_INVALID_UNIQUE_ID, XASU_KEYWRAP_KEY_UNWRAP_SHA2_CMD_ID, XASU_KEYWRAP_KEY_UNWRAP_SHA3_CMD_ID, XASU_KEYWRAP_OUTPUT_LEN_SIZE_IN_BYTES, XAsu_KeyWrapUnwrapValidateInputParams(), XASU_MODULE_KEYWRAP_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA2_TYPE, XASU_SHA3_TYPE, XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

s32 XAsu_KeyWrap ( XAsu_ClientParams ClientParamsPtr,
XAsu_KeyWrapParams KeyWrapParamsPtr 
)

This function sends a command to wrap a given key using a specified AES wrapping key.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
KeyWrapParamsPtrPointer to XAsu_KeyWrapParams structure which holds the parameters of key wrap input arguments.
Returns
  • XST_SUCCESS, if IPI request to ASU is sent successfully.
  • XASU_INVALID_ARGUMENT, if any argument is invalid.
  • XASU_INVALID_UNIQUE_ID, if received Queue ID is invalid.
  • XST_FAILURE, if sending IPI request to ASU fails.

Validate input parameters.

Set the command ID based on SHA type.

Generate a unique ID and register the callback function.

Create command header.

Update request buffer and send an IPI request to ASU.

References XAsu_KeyWrapParams::ActualOutuputDataLenAddr, XAsu_KeyWrapParams::ShaType, XAsu_CreateHeader(), XASU_INVALID_ARGUMENT, XASU_INVALID_UNIQUE_ID, XASU_KEYWRAP_KEY_WRAP_SHA2_CMD_ID, XASU_KEYWRAP_KEY_WRAP_SHA3_CMD_ID, XASU_KEYWRAP_OUTPUT_LEN_SIZE_IN_BYTES, XAsu_KeyWrapUnwrapValidateInputParams(), XASU_MODULE_KEYWRAP_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA2_TYPE, XASU_SHA3_TYPE, XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

s32 XAsu_KeyWrapKat ( XAsu_ClientParams ClientParamsPtr)

This function sends command to ASUFW to perform Key Wrap Unwrap Known Answer Tests (KAT's).

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
Returns
  • XST_SUCCESS, if IPI request to ASU is sent successfully.
  • XASU_INVALID_ARGUMENT, if any argument is invalid.
  • XASU_INVALID_UNIQUE_ID, if received Queue ID is invalid.
  • XST_FAILURE, if sending IPI request to ASU fails.

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_INVALID_UNIQUE_ID, XASU_KEYWRAP_KAT_CMD_ID, XASU_MODULE_KEYWRAP_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().