xilsecure
Vitis Drivers API Documentation
XilSecure ECDSA Client APIs

Functions

int XSecure_GenSharedSecret (XSecure_ClientInstance *InstancePtr, u32 CrvType, const u8 *PrivateKey, const u8 *PublicKey, u8 *SharedSecret)
 This function sends IPI request to generate shared secret using Elliptic Curve Diffie–Hellman Key Exchange (ECDH) More...
 
int XSecure_EllipticGenerateSign (XSecure_ClientInstance *InstancePtr, u32 CurveType, u64 HashAddr, u32 Size, u64 PrivKeyAddr, u64 EPrivKeyAddr, u64 SignAddr)
 This function sends IPI request to generate elliptic signature for a given hash and curve type. More...
 
int XSecure_EllipticGenerateKey (XSecure_ClientInstance *InstancePtr, u32 CurveType, u64 PrivKeyAddr, u64 PubKeyAddr)
 This function sends IPI request to generate Public Key for a given curve type. More...
 
int XSecure_EllipticValidateKey (XSecure_ClientInstance *InstancePtr, u32 CurveType, u64 KeyAddr)
 This function sends IPI request to validate the public key for a given curve type. More...
 
int XSecure_EllipticVerifySign (XSecure_ClientInstance *InstancePtr, u32 CurveType, u64 HashAddr, u32 Size, u64 PubKeyAddr, u64 SignAddr)
 This function sends IPI request to verify signature for a given hash, key and curve type. More...
 

Function Documentation

int XSecure_EllipticGenerateKey ( XSecure_ClientInstance *  InstancePtr,
u32  CurveType,
u64  PrivKeyAddr,
u64  PubKeyAddr 
)

This function sends IPI request to generate Public Key for a given curve type.

Parameters
InstancePtrPointer to the client instance
CurveTypeType of elliptic curve
PrivKeyAddrAddress of the static private key
PubKeyAddrAddress of the buffer where public key to be stored.
Returns
  • XST_SUCCESS On success
  • XST_FAILURE On failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Send an IPI request to the PLM by using the CDO command to call XSecure_EllipticGenKey API and returns the status of the IPI response.

References XSECURE_API_ELLIPTIC_GENERATE_KEY, and XSecure_ProcessMailbox().

int XSecure_EllipticGenerateSign ( XSecure_ClientInstance *  InstancePtr,
u32  CurveType,
u64  HashAddr,
u32  Size,
u64  PrivKeyAddr,
u64  EPrivKeyAddr,
u64  SignAddr 
)

This function sends IPI request to generate elliptic signature for a given hash and curve type.

Parameters
InstancePtrPointer to the client instance
CurveTypeType of elliptic curve
HashAddrAddress of the hash for which sign has to be generated
SizeLength of the hash in bytes
PrivKeyAddrAddress of the static private key
EPrivKeyAddrAddress of the Ephemeral private key
SignAddrAddress of the signature buffer
Returns
  • XST_SUCCESS On success
  • XST_FAILURE On failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Link shared memory of size EcdsaParams to EcdsaParams structure for IPI usage. Validates the size of the shared memory whether the required size is available or not.

Send an IPI request to the PLM by using the CDO command to call XSecure_EllipticGenSign API and returns the status of the IPI response.

References XSECURE_API_ELLIPTIC_GENERATE_SIGN, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().

int XSecure_EllipticValidateKey ( XSecure_ClientInstance *  InstancePtr,
u32  CurveType,
u64  KeyAddr 
)

This function sends IPI request to validate the public key for a given curve type.

Parameters
InstancePtrPointer to the client instance
CurveTypeType of elliptic curve
KeyAddrAddress of the public key to be validated
Returns
  • XST_SUCCESS On success
  • XST_FAILURE On failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Send an IPI request to the PLM by using the CDO command to call XSecure_EllipticValidatePubKey API and returns the status of the IPI response.

References XSECURE_API_ELLIPTIC_VALIDATE_KEY, and XSecure_ProcessMailbox().

Referenced by XSecure_EllipticVerifySignKat().

int XSecure_EllipticVerifySign ( XSecure_ClientInstance *  InstancePtr,
u32  CurveType,
u64  HashAddr,
u32  Size,
u64  PubKeyAddr,
u64  SignAddr 
)

This function sends IPI request to verify signature for a given hash, key and curve type.

Parameters
InstancePtrPointer to the client instance
CurveTypeType of elliptic curve
HashAddrAddress of the hash for which sign has to be generated
SizeLength of the hash in bytes
PubKeyAddrAddress of the pubilc key
SignAddrAddress of the signature buffer
Returns
  • XST_SUCCESS On success
  • XST_FAILURE On failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Link shared memory of size EcdsaParams to EcdsaParams structure for IPI usage. Validates the size of the shared memory whether the required size is available or not.

Send an IPI request to the PLM by using the CDO command to call XSecure_EllipticVerifySignature API and returns the status of the IPI response.

References XSECURE_API_ELLIPTIC_VERIFY_SIGN, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().

Referenced by XSecure_EllipticVerifySignKat().

int XSecure_GenSharedSecret ( XSecure_ClientInstance *  InstancePtr,
u32  CrvType,
const u8 *  PrivateKey,
const u8 *  PublicKey,
u8 *  SharedSecret 
)

This function sends IPI request to generate shared secret using Elliptic Curve Diffie–Hellman Key Exchange (ECDH)

Parameters
InstancePtrPointer to the client instance
CrvTypeType of elliptic curve
PrivateKeyPointer to the private key buffer
PublicKeyPointer to the public key buffer
SharedSecretPointer to the output buffer which shall be used to store shared secret
Returns
  • XST_SUCCESS On Success
  • XST_INVALID_PARAM If any input parameter is invalid.
  • XST_FAILURE If there is a failure

Link shared memory of size EcdsaParams to EcdsaParams structure for IPI usage. Validates the size of the shared memory whether the required size is available or not.

Send an IPI request to the PLM by using the CDO command to call XSecure_GenSharedSecret API and returns the status of the IPI response.

References XSECURE_ADDR_HIGH_SHIFT, XSECURE_API_GEN_SHARED_SECRET, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().

Referenced by XSecure_PlatEllipticIpiHandler().