xilasu
Vitis Drivers API Documentation
ECIES Client APIs

Functions

s32 XAsu_EciesEncrypt (XAsu_ClientParams *ClientParamsPtr, XAsu_EciesParams *EciesParamsPtr)
 This function sends a command to perform the encryption of the given plaintext message using the ECIES protocol. More...
 
s32 XAsu_EciesDecrypt (XAsu_ClientParams *ClientParamsPtr, XAsu_EciesParams *EciesParamsPtr)
 This function sends command to ASUFW to perform the decryption of the given ciphertext using the ECIES protocol. More...
 
s32 XAsu_EciesKat (XAsu_ClientParams *ClientParamsPtr)
 This function sends command to ASUFW to perform ECIES Known Answer Tests (KAT's). More...
 

Function Documentation

s32 XAsu_EciesDecrypt ( XAsu_ClientParams ClientParamsPtr,
XAsu_EciesParams EciesParamsPtr 
)

This function sends command to ASUFW to perform the decryption of the given ciphertext using the ECIES protocol.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
EciesParamsPtrPointer to XAsu_EciesParams structure which holds the parameters of ECIES decryption 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.

Generate a unique ID and register the callback function.

Create command header.

Update request buffer and send an IPI request to ASU.

References XAsu_EciesParams::EccCurveType, XAsu_EciesParams::EccKeyLength, XAsu_EciesParams::ShaType, XAsu_CreateHeader(), XAsu_EccValidateCurveInfo(), XASU_ECIES_DECRYPT_SHA2_CMD_ID, XASU_ECIES_DECRYPT_SHA3_CMD_ID, XASU_INVALID_ARGUMENT, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECIES_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA2_TYPE, XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), XAsu_ValidateClientParameters(), and XAsu_ValidateEciesParameters().

Referenced by main().

s32 XAsu_EciesEncrypt ( XAsu_ClientParams ClientParamsPtr,
XAsu_EciesParams EciesParamsPtr 
)

This function sends a command to perform the encryption of the given plaintext message using the ECIES protocol.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
EciesParamsPtrPointer to XAsu_EciesParams structure which holds the parameters of ECIES encryption 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.

Generate a unique ID and register the callback function.

Create command header.

Update request buffer and send an IPI request to ASU.

References XAsu_EciesParams::ShaType, XAsu_CreateHeader(), XASU_ECIES_ENCRYPT_SHA2_CMD_ID, XASU_ECIES_ENCRYPT_SHA3_CMD_ID, XASU_INVALID_ARGUMENT, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECIES_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA2_TYPE, XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), XAsu_ValidateClientParameters(), and XAsu_ValidateEciesParameters().

Referenced by main().

s32 XAsu_EciesKat ( XAsu_ClientParams ClientParamsPtr)

This function sends command to ASUFW to perform ECIES 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_ECIES_KAT_CMD_ID, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECIES_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().