![]() |
xilsecure
Vitis Drivers API Documentation
|
Macros | |
| #define | XSECURE_AES_INVALID_PARAM (0x51U) |
| Invalid Argument for AES. More... | |
Enumerations | |
| enum | XSecure_AesKeySource { 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_ALL_KEYS } |
| For selecting the Key source to AES Core. More... | |
| enum | XSecure_AesKeySize { XSECURE_AES_KEY_SIZE_128 = 0, XSECURE_AES_KEY_SIZE_256 = 2, XSECURE_AES_KEY_SIZE_128 = 0, XSECURE_AES_KEY_SIZE_256 = 2 } |
| For selecting the Key size to AES Core. More... | |
Functions | |
| int | XSecure_AesInitialize (XSecure_ClientInstance *InstancePtr) |
| This function sends IPI request to initialize the AES engine. More... | |
| int | XSecure_AesEncryptInit (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 Size, u64 IvAddr) |
| This function sends IPI request to EncryptInit the AES engine. More... | |
| int | XSecure_AesDecryptInit (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 Size, u64 IvAddr) |
| This function sends IPI request to DecryptInit the AES engine. More... | |
| int | XSecure_AesUpdateAad (XSecure_ClientInstance *InstancePtr, u64 AadAddr, u32 AadSize) |
| This function sends IPI request to update AAD to AES engine. More... | |
| int | XSecure_AesGmacUpdateAad (XSecure_ClientInstance *InstancePtr, u64 AadAddr, u32 AadSize, u32 IsLastChunkSrc) |
| This function sends IPI request to update AAD data to AES engine. More... | |
| int | XSecure_AesEncryptUpdate (XSecure_ClientInstance *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u32 IsLast) |
| This function sends IPI request to update the input data to AES engine for encryption. More... | |
| int | XSecure_AesEncryptFinal (XSecure_ClientInstance *InstancePtr, u64 GcmTagAddr) |
| This function sends IPI request to update the GcmTag Addr to AES engine. More... | |
| int | XSecure_AesDecryptUpdate (XSecure_ClientInstance *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u32 IsLast) |
| This function sends IPI request to update the encrypted data to AES engine for decryption. More... | |
| int | XSecure_AesDecryptFinal (XSecure_ClientInstance *InstancePtr, u64 GcmTagAddr) |
| This function sends IPI request to verify the GcmTag provided for the data decrypted till the point. More... | |
| int | XSecure_AesKeyZero (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc) |
| This function sends IPI request to zeroize selected AES key storage register. More... | |
| int | XSecure_AesWriteKey (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 Size, u64 KeyAddr) |
| This function sends IPI request to write the key provided into the specified AES key registers. More... | |
| int | XSecure_AesKekDecrypt (XSecure_ClientInstance *InstancePtr, u64 IvAddr, XSecure_AesKeySource DstKeySrc, XSecure_AesKeySource DecKeySrc, XSecure_AesKeySize Size) |
| This function sends IPI request to decrypt the key in KEK key form. More... | |
| int | XSecure_AesSetDpaCm (XSecure_ClientInstance *InstancePtr, u8 DpaCmCfg) |
| This function sends IPI request to enable/disable DpaCm in AES. More... | |
| int | XSecure_AesEncryptData (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 KeySize, u64 IvAddr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr) |
| This function calls IPI request to encrypt a single block of data. More... | |
| int | XSecure_AesDecryptData (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 KeySize, u64 IvAddr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr) |
| This function calls IPI request to decrypt a single block of data. More... | |
| int | XSecure_AesPerformOperation (const XSecure_ClientInstance *InstancePtr, const XSecure_AesDataBlockParams *AesDataParams) |
| This function calls IPI request to encrypt/decrypt a single block of data along with update AAD/GMAC based on the user's choice. More... | |
| int | XSecure_AesPerformOperationAndZeroizeKey (XSecure_ClientInstance *InstancePtr, u64 KeyAddr, const XSecure_AesDataBlockParams *AesDataParams) |
| This function calls IPI request to perform below operation: More... | |
| #define XSECURE_AES_INVALID_PARAM (0x51U) |
Invalid Argument for AES.
Referenced by XSecure_AesCfgKupKeyNIv(), XSecure_AesDecryptData(), XSecure_AesEcbCfg(), XSecure_AesEncryptFinal(), XSecure_AesGetNxtBlkLen(), XSecure_AesGmacCfg(), XSecure_AesKekDecrypt(), XSecure_AesKeyWrite(), XSecure_AesKeyZero(), XSecure_AesKeyZeroize(), XSecure_AesPerformOperation(), XSecure_AesPlatPmcDmaCfgAndXfer(), XSecure_AesSetDpaCm(), XSecure_AesUpdateAad(), XSecure_AesUpdateAadAndValidate(), and XSecure_AesWriteKey().
| enum XSecure_AesKeySize |
| enum XSecure_AesKeySource |
For selecting the Key source to AES Core.
| int XSecure_AesDecryptData | ( | XSecure_ClientInstance * | InstancePtr, |
| XSecure_AesKeySource | KeySrc, | ||
| u32 | KeySize, | ||
| u64 | IvAddr, | ||
| u64 | InDataAddr, | ||
| u64 | OutDataAddr, | ||
| u32 | Size, | ||
| u64 | GcmTagAddr | ||
| ) |
This function calls IPI request to decrypt a single block of data.
| InstancePtr | Pointer to the client instance |
| KeySrc | Type of the key |
| KeySize | Size of the key |
| IvAddr | Address of the IV |
| InDataAddr | Address of the encrypted data which needs to be decrypted |
| OutDataAddr | Address of buffer where the decrypted data to be updated |
| Size | Size of input data to be decrypted |
| GcmTagAddr | Address to the buffer of GCM tag |
AES Decrypt Init operation
AES Decrypt Update
AES Decrypt Final
AES GMAC operation
Send an IPI request to the PLM by using the CDO command to call XSecure_AesDecryptData API and returns the status of the IPI response.
References XSECURE_API_AES_PERFORM_OPERATION, XSecure_DCacheFlushRange, XSECURE_DECRYPT, and XSecure_ProcessMailbox().
Referenced by XSecure_AesPerformOperation().
| int XSecure_AesDecryptFinal | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | GcmTagAddr | ||
| ) |
This function sends IPI request to verify the GcmTag provided for the data decrypted till the point.
| InstancePtr | Pointer to the client instance |
| GcmTagAddr | Address of a buffer which should holds GCM Tag |
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_AesDecFinal API and returns the status of the IPI response
References XSECURE_API_AES_DECRYPT_FINAL, and XSecure_ProcessMailbox().
Referenced by XSecure_AesDecryptKat(), and XSecure_AesPerformOperation().
| int XSecure_AesDecryptInit | ( | XSecure_ClientInstance * | InstancePtr, |
| XSecure_AesKeySource | KeySrc, | ||
| u32 | Size, | ||
| u64 | IvAddr | ||
| ) |
This function sends IPI request to DecryptInit the AES engine.
| InstancePtr | Pointer to the client instance |
| KeySrc | Type of the Key |
| Size | Size of the Key |
| IvAddr | Address of the IV |
Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid
Link shared memory of size AesParams to AesParams 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_AesOperationInit API and returns the status of the IPI response.
References XSECURE_API_AES_OP_INIT, XSecure_DCacheFlushRange, XSECURE_DECRYPT, and XSecure_ProcessMailbox().
Referenced by XSecure_AesDecryptData(), and XSecure_AesDecryptKat().
| int XSecure_AesDecryptUpdate | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | InDataAddr, | ||
| u64 | OutDataAddr, | ||
| u32 | Size, | ||
| u32 | IsLast | ||
| ) |
This function sends IPI request to update the encrypted data to AES engine for decryption.
| InstancePtr | Pointer to the client instance |
| InDataAddr | Address of the encryped data which needs to be decrypted |
| OutDataAddr | Address of the buffer where the decrypted data to be updated |
| Size | Size of the input data to be decrypted |
| IsLast | If this is the last update of data to be decrypted, this parameter should be set to TRUE otherwise FALSE |
Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid
Link shared memory of size DecInParams to DecInParams 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_AesDecUpdate API and returns the status of the IPI response.
References XSECURE_API_AES_DECRYPT_UPDATE, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().
Referenced by XSecure_AesDecryptData(), XSecure_AesDecryptKat(), XSecure_AesEcbDecrypt(), and XSecure_AesKeyUnwrap().
| int XSecure_AesEncryptData | ( | XSecure_ClientInstance * | InstancePtr, |
| XSecure_AesKeySource | KeySrc, | ||
| u32 | KeySize, | ||
| u64 | IvAddr, | ||
| u64 | InDataAddr, | ||
| u64 | OutDataAddr, | ||
| u32 | Size, | ||
| u64 | GcmTagAddr | ||
| ) |
This function calls IPI request to encrypt a single block of data.
| InstancePtr | Pointer to the client instance |
| KeySrc | Type of the key |
| KeySize | Size of the key |
| IvAddr | Address of the IV |
| InDataAddr | Address of the data which needs to be encrypted |
| OutDataAddr | Address of output buffer where the encrypted data to be updated |
| Size | Size of data to be encrypted in bytes where number of bytes provided should be multiples of 4 |
| GcmTagAddr | Address to the buffer of GCM tag |
AES Init operation
AES Encrypt Update
AES Encrypt Final
AES GMAC operation
Send an IPI request to the PLM by using the CDO command to call XSecure_AesEncryptData API and returns the status of the IPI response
References XSECURE_API_AES_PERFORM_OPERATION, XSecure_DCacheFlushRange, XSECURE_ENCRYPT, and XSecure_ProcessMailbox().
Referenced by XSecure_AesPerformOperation().
| int XSecure_AesEncryptFinal | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | GcmTagAddr | ||
| ) |
This function sends IPI request to update the GcmTag Addr to AES engine.
| InstancePtr | Pointer to the client instance |
| GcmTagAddr | Address to the buffer of GCM tag size, where the API updates GCM tag |
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_AesEncFinal API and returns the status of the IPI response
References XSECURE_API_AES_ENCRYPT_FINAL, and XSecure_ProcessMailbox().
Referenced by XSecure_AesEncryptKat(), and XSecure_AesPerformOperation().
| int XSecure_AesEncryptInit | ( | XSecure_ClientInstance * | InstancePtr, |
| XSecure_AesKeySource | KeySrc, | ||
| u32 | Size, | ||
| u64 | IvAddr | ||
| ) |
This function sends IPI request to EncryptInit the AES engine.
| InstancePtr | Pointer to the client instance |
| KeySrc | Type of the Key |
| Size | Size of the Key |
| IvAddr | Address of the IV |
Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid
Link shared memory of size AesParams to AesParams 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_AesOperationInit API and returns the status of the IPI response.
References XSECURE_API_AES_OP_INIT, XSecure_DCacheFlushRange, XSECURE_ENCRYPT, and XSecure_ProcessMailbox().
Referenced by XSecure_AesEncryptData(), and XSecure_AesEncryptKat().
| int XSecure_AesEncryptUpdate | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | InDataAddr, | ||
| u64 | OutDataAddr, | ||
| u32 | Size, | ||
| u32 | IsLast | ||
| ) |
This function sends IPI request to update the input data to AES engine for encryption.
| InstancePtr | Pointer to the client instance |
| InDataAddr | Address of the input data which needs to be encrypted |
| OutDataAddr | Address of the buffer where the encrypted data to be updated |
| Size | Size of the input data to be encrypted |
| IsLast | If this is the last update of data to be encrypted, this parameter should be set to TRUE otherwise FALSE |
Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid
Link shared memory of size EncInAddr to EncInAddr 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_AesEncUpdate API and returns the status of the IPI response.
References XSECURE_API_AES_ENCRYPT_UPDATE, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().
Referenced by XSecure_AesEncryptData(), and XSecure_AesEncryptKat().
| int XSecure_AesGmacUpdateAad | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | AadAddr, | ||
| u32 | AadSize, | ||
| u32 | IsLastChunkSrc | ||
| ) |
This function sends IPI request to update AAD data to AES engine.
| InstancePtr | Pointer to the client instance |
| AadAddr | Address of the Aad |
| AadSize | Size of the Aad data |
| IsLastChunkSrc | If this is the last update of data, this parameter should be set to TRUE otherwise FALSE |
Send an IPI request to the PLM by using the CDO command to call XSecure_AesUpdateAad API and returns the status of the IPI response
References XSECURE_API_AES_UPDATE_AAD, and XSecure_ProcessMailbox().
Referenced by XSecure_AesUpdateAad().
| int XSecure_AesInitialize | ( | XSecure_ClientInstance * | InstancePtr | ) |
This function sends IPI request to initialize the AES engine.
| InstancePtr | Pointer to the client instance |
Referenced by SecureAesExample(), XSecure_AesInit(), and XSecure_AesShaInit().
| int XSecure_AesKekDecrypt | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | IvAddr, | ||
| XSecure_AesKeySource | DstKeySrc, | ||
| XSecure_AesKeySource | DecKeySrc, | ||
| XSecure_AesKeySize | Size | ||
| ) |
This function sends IPI request to decrypt the key in KEK key form.
| InstancePtr | Pointer to the client instance |
| IvAddr | Address of IV holding buffer for decryption of the key |
| DecKeySrc | Select key source which holds KEK and needs to be decrypted |
| DstKeySrc | Select the key in which decrypted red key should be updated |
| Size | Size of the key |
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_AesDecryptKek API and returns the status of the IPI response
References XSECURE_AES_INVALID_PARAM, XSECURE_AES_KEY_SIZE_128, XSECURE_API_AES_KEK_DECRYPT, and XSecure_ProcessMailbox().
| int XSecure_AesKeyZero | ( | XSecure_ClientInstance * | InstancePtr, |
| XSecure_AesKeySource | KeySrc | ||
| ) |
This function sends IPI request to zeroize selected AES key storage register.
| InstancePtr | Pointer to the client instance |
| KeySrc | Select the key source which needs to be zeroized |
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_AesKeyZeroize API and returns the status of the IPI response.
References XSECURE_API_AES_KEY_ZERO, and XSecure_ProcessMailbox().
Referenced by XSecure_AesDecrypt(), XSecure_AesDecryptCmKat(), XSecure_AesDecryptInit(), XSecure_AesDecryptKat(), XSecure_AesDecryptUpdate(), XSecure_AesEcbDecrypt(), XSecure_AesEncryptInit(), XSecure_AesEncryptKat(), XSecure_AesEncryptUpdate(), XSecure_AesKeyUnwrap(), and XSecure_AesKeyZeroize().
| int XSecure_AesPerformOperation | ( | const XSecure_ClientInstance * | InstancePtr, |
| const XSecure_AesDataBlockParams * | AesDataParams | ||
| ) |
This function calls IPI request to encrypt/decrypt a single block of data along with update AAD/GMAC based on the user's choice.
| InstancePtr | Pointer to the client instance |
| KeySrc | Type of the key |
| AesDataParams | Pointer to the Aes parameters |
AES Encrypt/Decrypt Init operation
AES Aad Update
Set GMAC enable flag to TRUE for GMAC operation and FALSE for GCM operation
AES Encrypt/Decrypt Final
Send an IPI request to the PLM by using the CDO command to call XSecure_AesPerformOperation API and returns the status of the IPI response
References XSecure_AesDataBlockParams::AadAddr, XSecure_AesDataBlockParams::AadSize, XSecure_AesDataBlockParams::GcmTagAddr, XSecure_AesDataBlockParams::InDataAddr, XSecure_AesDataBlockParams::IsGmacEnable, XSecure_AesDataBlockParams::IsUpdateAadEn, XSecure_AesDataBlockParams::IvAddr, XSecure_AesDataBlockParams::KeySize, XSecure_AesDataBlockParams::KeySrc, XSecure_AesDataBlockParams::OperationId, XSecure_AesDataBlockParams::OutDataAddr, XSecure_AesDataBlockParams::Size, XSECURE_AES_INVALID_PARAM, XSECURE_API_AES_PERFORM_OPERATION, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().
Referenced by XSecure_AesIpiHandler().
| int XSecure_AesPerformOperationAndZeroizeKey | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | KeyAddr, | ||
| const XSecure_AesDataBlockParams * | AesDataParams | ||
| ) |
This function calls IPI request to perform below operation:
- Write key into the key source provided by the user
- Encrypt/decrypt a single block of data using the provided key
- Zeroize the key once the AES operation is done
| InstancePtr | Pointer to the XSecure_ClientInstance |
| KeyAddr | Address of the key to be used for AES operation |
| AesDataParams | Pointer to the XSecure_AesDataBlockParams structure variable |
Send an IPI request to the PLM by using the CDO command to call XSecure_AesOpNZeroizeKey API and returns the status of the IPI response.
References XSecure_AesDataBlockParams::AadAddr, XSecure_AesDataBlockParams::AadSize, XSecure_AesDataBlockParams::GcmTagAddr, XSecure_AesDataBlockParams::InDataAddr, XSecure_AesDataBlockParams::IsGmacEnable, XSecure_AesDataBlockParams::IsUpdateAadEn, XSecure_AesDataBlockParams::IvAddr, XSecure_AesDataBlockParams::KeySize, XSecure_AesDataBlockParams::KeySrc, XSecure_AesDataBlockParams::OperationId, XSecure_AesDataBlockParams::OutDataAddr, XSecure_AesDataBlockParams::Size, XSECURE_ADDR_HIGH_SHIFT, XSECURE_API_AES_PERFORM_OPERATION_AND_ZEROIZE_KEY, XSecure_DCacheFlushRange, and XSecure_ProcessMailbox().
Referenced by XSecure_PlatAesIpiHandler().
| int XSecure_AesSetDpaCm | ( | XSecure_ClientInstance * | InstancePtr, |
| u8 | DpaCmCfg | ||
| ) |
This function sends IPI request to enable/disable DpaCm in AES.
| InstancePtr | Pointer to the client instance |
| DpaCmCfg | User choice to enable/disable DPA CM |
Send an IPI request to the PLM by using the CDO command to call XSecure_AesSetDpaCm API and returns the status of the IPI response
References XSECURE_API_AES_SET_DPA_CM, and XSecure_ProcessMailbox().
| int XSecure_AesUpdateAad | ( | XSecure_ClientInstance * | InstancePtr, |
| u64 | AadAddr, | ||
| u32 | AadSize | ||
| ) |
This function sends IPI request to update AAD to AES engine.
| InstancePtr | Pointer to the client instance |
| AadAddr | Address of the Aad |
| AadSize | Size of the Aad data |
Send an IPI request to update AAD to AES engine with LastChunk as FALSE
References XSecure_AesGmacUpdateAad().
Referenced by XSecure_AesDecryptKat(), and XSecure_AesEncryptKat().
| int XSecure_AesWriteKey | ( | XSecure_ClientInstance * | InstancePtr, |
| XSecure_AesKeySource | KeySrc, | ||
| u32 | Size, | ||
| u64 | KeyAddr | ||
| ) |
This function sends IPI request to write the key provided into the specified AES key registers.
| InstancePtr | Pointer to the client instance |
| KeySrc | Key Source to be selected to which provided key should be updated |
| Size | Size of the input key to be written |
| KeyAddr | Address of a buffer which should contain the key to be written |
Send an IPI request to the PLM by using the CDO command to call XSecure_AesWriteKey API and returns the status of the IPI response
References XSECURE_API_AES_WRITE_KEY, and XSecure_ProcessMailbox().
Referenced by XSecure_AesDecryptKat(), XSecure_AesEcbDecrypt(), XSecure_AesEncryptKat(), XSecure_AesKeyUnwrap(), and XSecure_AesKeyWrite().