xilasu
Vitis Drivers API Documentation
ECC Client APIs

Functions

s32 XAsu_EccGenSign (XAsu_ClientParams *ClientParamsPtr, XAsu_EccParams *EccParamsPtr)
 This function sends command to ASUFW to generate an ECDSA signature for the provided hash by using the given private key associated with the elliptic curve. More...
 
s32 XAsu_EccVerifySign (XAsu_ClientParams *ClientParamsPtr, XAsu_EccParams *EccParamsPtr)
 This function sends a command to validate the ECDSA signature for the provided hash using the provided ecc public key. More...
 
s32 XAsu_EccGenPubKey (XAsu_ClientParams *ClientParamsPtr, XAsu_EccKeyParams *EccKeyParamsPtr)
 This function sends a command to generate public key for the specified elliptic curve using the provided private key. More...
 
s32 XAsu_EccKat (XAsu_ClientParams *ClientParamsPtr)
 This function sends a command to perform ECC Known Answer Tests (KAT's). More...
 
s32 XAsu_EcdhGenSharedSecret (XAsu_ClientParams *ClientParamsPtr, XAsu_EcdhParams *EcdhParamsPtr)
 This function sends a command to ASUFW, to generate an ECDH shared secret, by using the provided ECC public key and private key. More...
 
s32 XAsu_EcdhKat (XAsu_ClientParams *ClientParamsPtr)
 This function sends a command to ASUFW to perform ECDH Known Answer Tests (KAT's). More...
 

Function Documentation

s32 XAsu_EccGenPubKey ( XAsu_ClientParams ClientParamsPtr,
XAsu_EccKeyParams EccKeyParamsPtr 
)

This function sends a command to generate public key for the specified elliptic curve using the provided private key.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
EccKeyParamsPtrPointer to XAsu_EccKeyParams structure which holds the parameters of ECC input arguments.
Returns
  • XST_SUCCESS, if IPI request to ASU is sent successfully.
  • XASU_INVALID_ARGUMENT, if any argument is invalid.
  • XASU_QUEUE_FULL, if Queue buffer is full.
  • 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_EccKeyParams::CurveType, XAsu_EccKeyParams::KeyLen, XAsu_EccKeyParams::PubKeyAddr, XAsu_EccKeyParams::PvtKeyAddr, XAsu_CreateHeader(), XASU_ECC_GEN_PUBKEY_CMD_ID, XAsu_EccValidateCurveInfo(), XASU_INVALID_ARGUMENT, XASU_INVALID_CURVEINFO, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

s32 XAsu_EccGenSign ( XAsu_ClientParams ClientParamsPtr,
XAsu_EccParams EccParamsPtr 
)

This function sends command to ASUFW to generate an ECDSA signature for the provided hash by using the given private key associated with the elliptic curve.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
EccParamsPtrPointer to XAsu_EccParams structure which holds the parameters of ECC input arguments.
Returns
  • XST_SUCCESS, if IPI request to ASU is sent successfully.
  • XASU_INVALID_ARGUMENT, if any argument is invalid.
  • XASU_QUEUE_FULL, if Queue buffer is full.
  • 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_ECC_GEN_SIGNATURE_CMD_ID, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

s32 XAsu_EccKat ( XAsu_ClientParams ClientParamsPtr)

This function sends a command to perform ECC 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_QUEUE_FULL, if Queue buffer is full.
  • 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_ECC_KAT_CMD_ID, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

s32 XAsu_EccVerifySign ( XAsu_ClientParams ClientParamsPtr,
XAsu_EccParams EccParamsPtr 
)

This function sends a command to validate the ECDSA signature for the provided hash using the provided ecc public key.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters.
EccParamsPtrPointer to XAsu_EccParams structure which holds the parameters of ECC input arguments.
Returns
  • XST_SUCCESS, if IPI request to ASU is sent successfully.
  • XASU_INVALID_ARGUMENT, if any argument is invalid.
  • XASU_QUEUE_FULL, if Queue buffer is full.
  • XST_FAILURE, if sending IPI request to ASU fails.

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_ECC_VERIFY_SIGNATURE_CMD_ID, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

s32 XAsu_EcdhGenSharedSecret ( XAsu_ClientParams ClientParamsPtr,
XAsu_EcdhParams *  EcdhParamsPtr 
)

This function sends a command to ASUFW, to generate an ECDH shared secret, by using the provided ECC public key and private key.

Parameters
ClientParamsPtrPointer to the XAsu_ClientParams structure which holds the client input parameters
EcdhParamsPtrPointer to XAsu_EcdhParams structure which holds the parameters of ECDH input arguments.
Returns
  • XST_SUCCESS, if signature generated successfully
  • XASU_INVALID_ARGUMENT, if any argument is invalid
  • XASU_INVALID_UNIQUE_ID, if unique ID is invalid
  • XST_FAILURE, if send IPI 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_EccValidateCurveInfo(), XASU_ECDH_SHARED_SECRET_CMD_ID, XASU_INVALID_ARGUMENT, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().

Referenced by main().

s32 XAsu_EcdhKat ( XAsu_ClientParams ClientParamsPtr)

This function sends a command to ASUFW to perform ECDH Known Answer Tests (KAT's).

Parameters
ClientParamsPtrPointer to client params structure.
Returns
  • XST_SUCCESS, if ECDH Kat runs succefully
  • XASU_INVALID_UNIQUE_ID, if unique ID is invalid
  • XST_FAILURE, if send IPI 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_ECDH_KAT_CMD_ID, XASU_INVALID_UNIQUE_ID, XASU_MODULE_ECC_ID, XAsu_RegCallBackNGetUniqueId(), XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().