xilpki
Vitis Drivers API Documentation
xilpki.h File Reference

Data Structures

struct  XPki_Request_Info
 PKI Request info struct. More...
 

Macros

#define XPKI_INVALID_PARAM   0x2U
 Error codes. More...
 
#define XPKI_ERROR_UNALIGN_ADDR   0x3U
 For unaligned address. More...
 
#define XPKI_INVALID_QUEUE_ID   0x4U
 Invalid Queue ID. More...
 
#define XPKI_UNSUPPORTED_OPS   0x5U
 Unsupported operation. More...
 
#define XPKI_QUEUE_FULL   0x6U
 Queue full. More...
 
#define XPKI_SLOT_SIZE_ERR   0x7U
 For incompatiable slot size. More...
 
#define XPKI_INVALID_REQ_ID   0x8U
 Invalid request ID. More...
 
#define XPKI_SIGN_COPY_ERR   0x9U
 Failed to copy the signature into the user pointed buffer. More...
 
#define XPKI_PRIV_KEY_COPY_ERR   0xAU
 Failed to copy the private-key into the user pointed buffer. More...
 
#define XPKI_PUB_KEY_COPY_ERR   0xBU
 Failed to copy the public-key into the user pointed buffer. More...
 

Enumerations

enum  Xpki_OpsType {
  PKI_ECC_NIST_P192_SIGN = 1, PKI_ECC_NIST_P256_SIGN, PKI_ECC_NIST_P384_SIGN, PKI_ECC_NIST_P521_SIGN,
  PKI_ECC_NIST_P192_SIGN_VERIFY, PKI_ECC_NIST_P256_SIGN_VERIFY, PKI_ECC_NIST_P384_SIGN_VERIFY, PKI_ECC_NIST_P521_SIGN_VERIFY,
  PKI_ECC_NIST_P192_KEY_PRIV_GEN, PKI_ECC_NIST_P256_KEY_PRIV_GEN, PKI_ECC_NIST_P384_KEY_PRIV_GEN, PKI_ECC_NIST_P521_KEY_PRIV_GEN,
  PKI_ECC_NIST_P192_KEY_PUB_GEN, PKI_ECC_NIST_P256_KEY_PUB_GEN, PKI_ECC_NIST_P384_KEY_PUB_GEN, PKI_ECC_NIST_P521_KEY_PUB_GEN,
  PKI_MAX_OPS
}
 PKI ECC supported operation. More...
 

Functions

void XPki_Reset (void)
 This function reset the PKI module. More...
 
void XPki_SoftReset (void)
 This function performs the PKI module soft reset. More...
 
int XPki_Initialize (XPki_Instance *InstancePtr)
 This function performs the PKI module initialization. More...
 
int XPki_EcdsaGenerateKeyPair (XPki_Instance *InstancePtr, XPki_EcdsaCrvType CrvType, XPki_EcdsaKey *PubKey, u8 *PrivKey)
 This function Generate key pairs for the ECC curves NIST-P192, P256, P384, and P521. More...
 
int XPki_EcdsaVerifySignKat (XPki_Instance *InstancePtr, XPki_EcdsaCrvInfo *CrvInfo)
 This function performs ECC sign verify known answer test(KAT) More...
 
int XPki_EcdsaSignGenerateKat (XPki_Instance *InstancePtr, XPki_EcdsaCrvInfo *CrvInfo)
 This function performs ECC sign generate known answer test(KAT) More...
 
int XPki_EcdsaPwct (XPki_Instance *InstancePtr, XPki_EcdsaCrvInfo *CrvInfo, XPki_EcdsaKey *PubKey, u8 *PrivKey)
 This function performs ECC pairwise consistency test on ECC Curves. More...
 
int XPki_TrngGenerateRandomNum (u8 GenSize, u8 *RandBuf)
 This function is used to generate the Random number for the give size. More...
 
int XilPki_EnQueue (XPki_Instance *InstancePtr, XPki_Request_Info *Request_InfoPtr, u32 *RequestID)
 This function is used to submit the crypto operation to the PKI Queue. More...
 
int XilPki_DeQueue (XPki_Instance *InstancePtr, XPki_Request_Info *Request_InfoPtr, u32 RequestID)
 This function is used to get the crypto operation results from the PKI Queue. More...
 
void XPki_Close (void)
 This function is used to disable access to the PKI Hardware. More...