![]() |
xilsecure
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XSecure_RsaInParam |
| Structure for input parameters for RSA Encryption and Decryption. More... | |
| struct | XSecure_RsaSignParams |
| Structure for input parameters for RSA Sign verification. More... | |
| struct | XSecure_EllipticSignGenParams |
| Structure for input parameters for Ellitic Sign generation. More... | |
| struct | XSecure_EllipticSignVerifyParams |
| Structure for input parameters for Ellitic Sign Verification. More... | |
| struct | XSecure_AesInitOps |
| Structure for input parameters for Initialisation of AES Encryption and Decryption. More... | |
| struct | XSecure_AesInParams |
| Structure for input parameters for AES Encryption and Decryption. More... | |
| struct | XSecure_EcdhParams |
| Structure for input parameters for ECDH. More... | |
| struct | XSecure_AesDataBlockParams |
| Structure for input parameters for AES Encryption and Decryption of single block of data. More... | |
| struct | XSecure_KeyMetaData |
| AES Key metadata for Key wrap unwrap. More... | |
| struct | XSecure_KeyWrapData |
| Input and output parameters for Key wrap. More... | |
| struct | XSecure_RsaPubKeyAddr |
| Addresses of Input parameters of RSA. More... | |
Macros | |
| #define | XSECURE_AES_BASEADDR (0xF11E0000U) |
| AES Base Address. More... | |
| #define | XSecure_Printf(DebugType,...) if ((DebugType) == 1U) {xil_printf (__VA_ARGS__);} |
| For prints in XilSecure library. More... | |
| #define | XSecure_DCacheFlushRange(SrcAddr, Len) Xil_DCacheFlushRange((INTPTR)SrcAddr, Len) |
| Cache Invalidate function. More... | |
| #define | XSECURE_API(ApiId) ((u32)ApiId) |
| Macro to typecast XILSECURE API ID. More... | |
| #define | XSECURE_API_ID_MASK (0xFFU) |
| Mask for API ID in Secure IPI command. More... | |
| #define | XILSECURE_MODULE_ID (0x05U) |
| XilSecure Module Id. More... | |
| #define | XSECURE_KAT_API_ERR_ID (((u32)XILSECURE_MODULE_ID << 8U) | ((u32)XSECURE_API_KAT)) |
| XilSecure KAT API error id. More... | |
| #define | XSECURE_KAT_MAJOR_ERROR |
| Xilsecure KAT major error for client APIs. More... | |
| #define | XSECURE_ADDR_HIGH_SHIFT (32U) |
| Shift to get higher address. More... | |
| #define | XSECURE_IPI_MASK_DEF_VAL (0U) |
| Default IPI mask value. More... | |
| #define | XSECURE_ECDSA_PRIME (XSECURE_ECC_PRIME) |
| This macro is for backward compatibility. More... | |
| #define | XSecure_EllipticCrvClass XSecure_EccCrvClass |
| Alias for XSecure_EccCrvClass enum for backward compatibility. More... | |
| #define | XSECURE_KAT_HDR_LEN (1U) |
| < KAT macros More... | |
| #define | XSECURE_MAX_KAT_MASK_LEN (3U) |
| Maximum mask length. More... | |
| #define | XSECURE_MIN_KAT_MASK_LEN (1U) |
| Minimum mask length. More... | |
| #define | XSECURE_WORD_LEN (4U) |
| Word length. More... | |
| #define | XSECURE_ADDR_HIGH_SHIFT (32U) |
| Shift for getting higher address. More... | |
| #define | XSECURE_KEY_ID_LEN_IN_BYTES (128U) |
| Key id length in bytes. More... | |
| #define | XSECURE_KAT_HDR_LEN (1U) |
| < KAT macros More... | |
| #define | XSECURE_MAX_KAT_MASK_LEN (3U) |
| Maximum mask length. More... | |
| #define | XSECURE_MIN_KAT_MASK_LEN (1U) |
| Minimum mask length. More... | |
| #define | XSECURE_WORD_LEN (4U) |
| Word length. More... | |
| #define | XSECURE_ADDR_HIGH_SHIFT (32U) |
| Shift for getting higher address. More... | |
| #define | XSECURE_KEY_ID_LEN_IN_BYTES (128U) |
| Key id length in bytes. More... | |
| #define | XSECURE_SHARED_KEY_STORE_SIZE_OFFSET (8U) |
| Key size offset. More... | |
| #define | XSECURE_SHARED_KEY_SLOT_STATUS_START_OFFSET (12U) |
| Bitmap offset. More... | |
| #define | XSECURE_HMAC_MAJOR_VERSION 5 |
| Major version of HMAC. More... | |
| #define | XSECURE_HMAC_MINOR_VERSION 7 |
| Minor version of HMAC. More... | |
| #define | XSECURE_SHA2_MAJOR_VERSION 5 |
| Major version of SHA2. More... | |
| #define | XSECURE_SHA2_MINOR_VERSION 7 |
| Minor version of SHA2. More... | |
Functions | |
| int | XSecure_CfgSssAes (XPmcDma *DmaPtr, const XSecure_Sss *SssInstance) |
| This function configures SSS to AES engine. More... | |
AES_KEY_CLEAR register | |
| enum | XSecure_AesKeySrc { XSECURE_AES_BBRAM_KEY = 0, XSECURE_AES_BBRAM_RED_KEY, XSECURE_AES_BH_KEY, XSECURE_AES_BH_RED_KEY, XSECURE_AES_EFUSE_KEY, XSECURE_AES_EFUSE_RED_KEY, XSECURE_AES_EFUSE_USER_KEY_0, XSECURE_AES_EFUSE_USER_KEY_1, XSECURE_AES_EFUSE_USER_RED_KEY_0, XSECURE_AES_EFUSE_USER_RED_KEY_1, XSECURE_AES_KUP_KEY, XSECURE_AES_PUF_KEY, XSECURE_AES_USER_KEY_0, XSECURE_AES_USER_KEY_1, XSECURE_AES_USER_KEY_2, XSECURE_AES_USER_KEY_3, XSECURE_AES_USER_KEY_4, XSECURE_AES_USER_KEY_5, XSECURE_AES_USER_KEY_6, XSECURE_AES_USER_KEY_7, XSECURE_AES_EXPANDED_KEYS, XSECURE_AES_PUF_RED_EXPANDED_KEYS, XSECURE_AES_ALL_KEYS, XSECURE_AES_INVALID_KEY, XSECURE_AES_BH_KEY = 0, XSECURE_AES_BH_RED_KEY, XSECURE_AES_EFUSE_KEY, XSECURE_AES_EFUSE_RED_KEY, XSECURE_AES_KUP_KEY, XSECURE_AES_FAMILY_KEY, XSECURE_AES_PUF_KEY, XSECURE_AES_USER_KEY_0, XSECURE_AES_USER_KEY_1, XSECURE_AES_USER_KEY_2, XSECURE_AES_USER_KEY_3, XSECURE_AES_USER_KEY_4, XSECURE_AES_USER_KEY_5, XSECURE_AES_USER_KEY_6, XSECURE_AES_USER_KEY_7, XSECURE_AES_EXPANDED_KEYS, XSECURE_AES_PUF_RED_EXPANDED_KEYS, XSECURE_AES_ALL_KEYS, XSECURE_AES_INVALID_KEY } |
| Used for selecting the Key source of AES Core. More... | |
| #define | XSECURE_AES_KEY_CLEAR_OFFSET (0x00000014U) |
| < AES_KEY_CLEAR register offset and definitions More... | |
| #define | XSECURE_AES_KEY_CLEAR_PUF_KEY_MASK (0x00200000U) |
| #define | XSECURE_AES_KEY_CLEAR_BBRAM_RED_KEY_MASK (0x00100000U) |
| #define | XSECURE_AES_KEY_CLEAR_BH_RED_KEY_MASK (0x00080000U) |
| #define | XSECURE_AES_KEY_CLEAR_BH_KEY_MASK (0x00040000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_USER_RED_KEY_1_MASK (0x00020000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_USER_RED_KEY_0_MASK (0x00010000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_RED_KEY_MASK (0x00008000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_USER_KEY_1_MASK (0x00004000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_USER_KEY_0_MASK (0x00002000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_KEY_MASK (0x00001000U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_7_MASK (0x00000800U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_6_MASK (0x00000400U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_5_MASK (0x00000200U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_4_MASK (0x00000100U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_3_MASK (0x00000080U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_2_MASK (0x00000040U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_1_MASK (0x00000020U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_0_MASK (0x00000010U) |
| #define | XSECURE_AES_KEY_CLEAR_KUP_KEY_MASK (0x00000002U) |
| #define | XSECURE_AES_KEY_CLEAR_AES_KEY_ZEROIZE_MASK (0x00000001U) |
| #define | XSECURE_AES_KEY_CLR_REG_CLR_MASK (0x00000000U) |
| #define | XSECURE_AES_KEY_CLEAR_ALL_KEYS_MASK (0x003FFFF3U) |
| #define | XSECURE_AES_KEY_CLEAR_PUF_RED_EXPANDED_KEYS_MASK (0x003B8003U) |
| #define | XSECURE_AES_KEY_DEC_SEL_BBRAM_RED (0x0U) |
| #define | XSECURE_AES_KEY_DEC_SEL_BH_RED (0x1U) |
| #define | XSECURE_AES_KEY_DEC_SEL_EFUSE_RED (0x2U) |
| #define | XSECURE_AES_KEY_DEC_SEL_EFUSE_USR0_RED (0x3U) |
| #define | XSECURE_AES_KEY_DEC_SEL_EFUSE_USR1_RED (0x4U) |
| #define | XSECURE_AES_INVALID_CFG (0xFFFFFFFFU) |
| #define | XSECURE_MAX_KEY_SOURCES XSECURE_AES_EXPANDED_KEYS |
| Max key source value. More... | |
Debug related macros | |
| #define | XSECURE_DEBUG (0U) |
| < Enable client printfs by setting XSECURE_DEBUG to 1 More... | |
| #define | XSECURE_DEBUG_GENERAL (0U) |
| #define XILSECURE_MODULE_ID (0x05U) |
XilSecure Module Id.
| #define XSECURE_ADDR_HIGH_SHIFT (32U) |
Shift for getting higher address.
| #define XSECURE_ADDR_HIGH_SHIFT (32U) |
Shift for getting higher address.
| #define XSECURE_ADDR_HIGH_SHIFT (32U) |
Shift to get higher address.
Referenced by XSecure_AesPerformOperationAndZeroizeKey(), XSecure_AesPlatPmcDmaCfgAndXfer(), XSecure_GenSharedSecret(), and XSecure_Sha3Digest().
| #define XSECURE_AES_BASEADDR (0xF11E0000U) |
AES Base Address.
| #define XSECURE_AES_KEY_CLEAR_OFFSET (0x00000014U) |
< AES_KEY_CLEAR register offset and definitions
| #define XSECURE_API | ( | ApiId | ) | ((u32)ApiId) |
Macro to typecast XILSECURE API ID.
Referenced by XSecure_AesIpiHandler(), XSecure_EllipticIpiHandler(), XSecure_KatIpiHandler(), XSecure_KatPlatIpiHandler(), XSecure_PlatAesIpiHandler(), XSecure_PlatEllipticIpiHandler(), XSecure_PlatIpiHandler(), XSecure_RsaIpiHandler(), XSecure_Sha3IpiHandler(), XSecure_ShaIpiHandler(), XSecure_TrngIpiHandler(), and XSecure_UpdateKatStatusIpiHandler().
| #define XSECURE_API_ID_MASK (0xFFU) |
Mask for API ID in Secure IPI command.
Referenced by XSecure_AesIpiHandler(), XSecure_EllipticIpiHandler(), XSecure_KatIpiHandler(), XSecure_KatPlatIpiHandler(), XSecure_PlatAesIpiHandler(), XSecure_PlatEllipticIpiHandler(), XSecure_PlatIpiHandler(), XSecure_RsaIpiHandler(), XSecure_Sha3IpiHandler(), XSecure_ShaIpiHandler(), and XSecure_TrngIpiHandler().
| #define XSecure_DCacheFlushRange | ( | SrcAddr, | |
| Len | |||
| ) | Xil_DCacheFlushRange((INTPTR)SrcAddr, Len) |
Cache Invalidate function.
Referenced by XSecure_AesDecryptData(), XSecure_AesDecryptInit(), XSecure_AesDecryptUpdate(), XSecure_AesEncryptData(), XSecure_AesEncryptInit(), XSecure_AesEncryptUpdate(), XSecure_AesPerformOperation(), XSecure_AesPerformOperationAndZeroizeKey(), XSecure_EllipticGenerateSign(), XSecure_EllipticVerifySign(), XSecure_GenSharedSecret(), XSecure_RsaPrivateDecrypt(), XSecure_RsaPublicEncrypt(), and XSecure_RsaSignVerification().
| #define XSECURE_DEBUG (0U) |
< Enable client printfs by setting XSECURE_DEBUG to 1
| #define XSECURE_ECDSA_PRIME (XSECURE_ECC_PRIME) |
This macro is for backward compatibility.
For ECC Prime curves, use XSECURE_ECC_PRIME
Referenced by main().
| #define XSecure_EllipticCrvClass XSecure_EccCrvClass |
Alias for XSecure_EccCrvClass enum for backward compatibility.
| #define XSECURE_HMAC_MAJOR_VERSION 5 |
Major version of HMAC.
| #define XSECURE_HMAC_MINOR_VERSION 7 |
Minor version of HMAC.
| #define XSECURE_IPI_MASK_DEF_VAL (0U) |
Default IPI mask value.
Referenced by XSecure_IpiEventHandling(), XSecure_MakeResFree(), and XSecure_SetDataContextLost().
| #define XSECURE_KAT_API_ERR_ID (((u32)XILSECURE_MODULE_ID << 8U) | ((u32)XSECURE_API_KAT)) |
XilSecure KAT API error id.
| #define XSECURE_KAT_HDR_LEN (1U) |
| #define XSECURE_KAT_HDR_LEN (1U) |
< KAT macros
Header Length
| #define XSECURE_KAT_MAJOR_ERROR |
Xilsecure KAT major error for client APIs.
| #define XSECURE_KEY_ID_LEN_IN_BYTES (128U) |
Key id length in bytes.
| #define XSECURE_KEY_ID_LEN_IN_BYTES (128U) |
Key id length in bytes.
| #define XSECURE_MAX_KAT_MASK_LEN (3U) |
Maximum mask length.
Referenced by XSecure_UpdateKatStatusIpiHandler(), and XSecure_UpdatePkiKatStatus().
| #define XSECURE_MAX_KAT_MASK_LEN (3U) |
Maximum mask length.
| #define XSECURE_MAX_KEY_SOURCES XSECURE_AES_EXPANDED_KEYS |
Max key source value.
| #define XSECURE_MIN_KAT_MASK_LEN (1U) |
Minimum mask length.
Referenced by XSecure_UpdateCpm5NKatStatus(), XSecure_UpdateHnicKatStatus(), and XSecure_UpdatePcideKatStatus().
| #define XSECURE_MIN_KAT_MASK_LEN (1U) |
Minimum mask length.
| #define XSecure_Printf | ( | DebugType, | |
| ... | |||
| ) | if ((DebugType) == 1U) {xil_printf (__VA_ARGS__);} |
For prints in XilSecure library.
Referenced by XSecure_AddRsaKeyPairGenerationToScheduler(), XSecure_AesIpiHandler(), XSecure_EllipticIpiHandler(), XSecure_GetLmsHashAlgo(), XSecure_HssFinish(), XSecure_HssInit(), XSecure_InitiateASUKeyTransfer(), XSecure_KatIpiHandler(), XSecure_LmsSignatureVerification(), XSecure_PlatAesIpiHandler(), XSecure_PlatEllipticIpiHandler(), XSecure_PlatIpiHandler(), XSecure_RsaIpiHandler(), XSecure_Sha3Digest(), XSecure_Sha3Finish(), XSecure_Sha3Update(), XSecure_ShaIpiHandler(), and XSecure_UpdateKatStatusIpiHandler().
| #define XSECURE_SHA2_MAJOR_VERSION 5 |
Major version of SHA2.
| #define XSECURE_SHA2_MINOR_VERSION 7 |
Minor version of SHA2.
| #define XSECURE_SHARED_KEY_SLOT_STATUS_START_OFFSET (12U) |
Bitmap offset.
| #define XSECURE_SHARED_KEY_STORE_SIZE_OFFSET (8U) |
Key size offset.
| #define XSECURE_WORD_LEN (4U) |
Word length.
Referenced by XSecure_AesOperation(), XSecure_AuthenticationHeaders(), XSecure_PpkVerify(), XSecure_SecureImage(), and XSecure_SpkRevokeCheck().
| #define XSECURE_WORD_LEN (4U) |
Word length.
| enum XSecure_AesKeySrc |
Used for selecting the Key source of AES Core.
| enum XSecure_AesOp |
| enum XSecure_ApiId |
< XilSecure API ids
| enum XSecure_ApiId |
< XilSecure API ids
| enum XSecure_ApiId |
| enum XSecure_Cpm5nKatId |
| enum XSecure_DDRKatId |
| enum XSecure_EccCrvClass |
| enum XSecure_HnicKatId |
| enum XSecure_KatId |
| enum XSecure_KatId |
| enum XSecure_KatId |
| enum XSecure_KatOp |
| enum XSecure_KeyOp |
| enum XSecure_PciIdeKatId |
| enum XSecure_PkiKatId |
| int XSecure_CfgSssAes | ( | XPmcDma * | DmaPtr, |
| const XSecure_Sss * | SssInstance | ||
| ) |
This function configures SSS to AES engine.
| DmaPtr | Pointer to the DMA instance |
| SssInstance | Pointer to SSS instance |
References XSECURE_SSS_DMA0, and XSECURE_SSS_DMA1.
| static XSecure_KeyWrapData KeyWrapData __attribute__ |
This function returns the SHA2 crypto algorithm information.
Main function to call the XSecure_KeyUnwrap to unwrap the wrapped key.
| AlgInfo | Pointer to memory for holding the crypto algorithm information |
| const XSecure_AesKeyLookup AesKeyLookupTbl[XSECURE_MAX_KEY_SOURCES] |
This lookup table array defines properties of Key sources.
| u64 XSecure_ShaOpParams::DataAddr |
SHA2/3 data address.
| u32 XSecure_ShaOpParams::DataSize |
SHA2/3 data size.
| u64 XSecure_RsaKeyParam::DPAddr |
Private exponent 1.
| u64 XSecure_RsaKeyParam::DQAddr |
Private exponent 2.
| u64 XSecure_RsaKeyParam::ExpAddr |
Exponent address.
| u64 XSecure_ShaOpParams::HashAddr |
SHA2/3 hash address.
| u32 XSecure_ShaOpParams::HashBufSize |
SHA2/3 hash buffer size.
| u8 XSecure_ShaOpParams::IsLast |
Is last update.
| u32 XSecure_RsaKeyParam::IsPrimeAvail |
Prime number available.
| u32 XSecure_RsaKeyParam::IsPrivExpAvail |
Private exponent available i.e.
DP and DQ
| u32 XSecure_RsaKeyParam::IsPubExpAvail |
Public exponent available.
| u32 XSecure_RsaKeyParam::IsTotAvail |
Totient Available.
| u64 XSecure_RsaKeyParam::ModAddr |
Modulus address.
| u8 XSecure_ShaOpParams::OperationFlags |
SHA2/3 operation flags.
| XSecure_RsaOperationMode XSecure_RsaKeyParam::OpMode |
RSA operation mode.
| u64 XSecure_RsaKeyParam::PAddr |
First factor address.
| u32 XSecure_RsaKeyParam::PSize |
Size of first factor(P) in bytes.
| u32 XSecure_RsaKeyParam::PubExp |
Public exponent.
| u64 XSecure_RsaKeyParam::QAddr |
Second factor address.
| u64 XSecure_RsaKeyParam::QInvAddr |
Q inverse address.
| u32 XSecure_RsaKeyParam::QSize |
Size of first factor(Q) in bytes.
| u64 XSecure_RsaKeyParam::RNAddr |
R address.
| u64 XSecure_RsaKeyParam::RRNAddr |
RR address.
| u8 XSecure_ShaOpParams::ShaMode |
SHA2/3 mode.
| u64 XSecure_RsaKeyParam::TotAddr |
Totient address.