![]() |
xilsecure
Vitis Drivers API Documentation
|
Macros | |
| #define | XSECURE_MAX_KEY_STORE_CAPACTIY (32U) |
| Maximum key store capacity. More... | |
| #define | XSECURE_SHARED_KEY_STORE_SIZE_OFFSET (8U) |
| Key size offset. More... | |
| #define | XSECURE_KEY_STORE_KEY_OFFSET (4U) |
| Key offset from key slot status. More... | |
| #define | XSECURE_AES_256BIT_KEY_BLOCK_SIZE (40U) |
| AES 256-bit key block size. More... | |
| #define | XSECURE_AES_128BIT_KEY_BLOCK_SIZE (24U) |
| AES 128-bit key block size. More... | |
| #define | XSECURE_AES_KEY_SLOT_STATUS_FULL (0x973AFB51U) |
| AES key status is full. More... | |
| #define | XSECURE_KEY_STORE_ADDR (0x00000000U) |
| Key store address. More... | |
Functions | |
| int | XSecure_KeyUnwrap (XSecure_KeyWrapData *KeyWrapData) |
| This function unwraps the given wrapped key and stores it along with metadata in Shared address between PMC and secure shell. More... | |
| #define XSECURE_AES_128BIT_KEY_BLOCK_SIZE (24U) |
AES 128-bit key block size.
Referenced by XSecure_KeyUnwrap().
| #define XSECURE_AES_256BIT_KEY_BLOCK_SIZE (40U) |
AES 256-bit key block size.
Referenced by XSecure_KeyUnwrap().
| #define XSECURE_AES_KEY_SLOT_STATUS_FULL (0x973AFB51U) |
AES key status is full.
| #define XSECURE_KEY_STORE_ADDR (0x00000000U) |
Key store address.
| #define XSECURE_KEY_STORE_KEY_OFFSET (4U) |
Key offset from key slot status.
Referenced by XSecure_KeyUnwrap().
| #define XSECURE_MAX_KEY_STORE_CAPACTIY (32U) |
Maximum key store capacity.
| #define XSECURE_SHARED_KEY_STORE_SIZE_OFFSET (8U) |
Key size offset.
| int XSecure_KeyUnwrap | ( | XSecure_KeyWrapData * | KeyWrapData | ) |
This function unwraps the given wrapped key and stores it along with metadata in Shared address between PMC and secure shell.
| KeyWrapData | is pointer to the XSecure_KeyWrapData instance. |
| DmaPtr | is pointer to DMA instance which is used for AES and SHA |
Check for free key slot and update Key slot status address
Update the key slot with metadata
Clear the ephemeral AES key after the usage
References XSecure_RsaOaepParam::InputDataAddr, XSecure_KeyWrapData::KeyMetaData, XSecure_KeyWrapData::KeyWrapAddr, XSecure_RsaOaepParam::OutputDataAddr, XSecure_RsaOaepParam::OutputDataSize, XSecure_RsaOaepParam::ShaInstancePtr, XSecure_RsaOaepParam::ShaType, XSecure_KeyWrapData::TotalWrappedKeySize, XSECURE_AES_128BIT_KEY_BLOCK_SIZE, XSECURE_AES_256BIT_KEY_BLOCK_SIZE, XSECURE_AES_64BIT_BLOCK_SIZE, XSECURE_AES_KEY_SIZE_128, XSecure_AesKeyUnwrap(), XSECURE_ERR_AES_KEY_SIZE_NOT_SUPPORTED, XSECURE_ERR_KEY_WRAP_SIZE_MISMATCH, XSecure_GetAesInstance(), XSecure_GetRsaKeyInUseIdx(), XSecure_GetRsaPrivateKey(), XSECURE_KEY_STORE_KEY_OFFSET, XSecure_MemCpy64, XSecure_MemCpyAndChangeEndianness(), XSECURE_RSA_KEY_GEN_SIZE_IN_BYTES, and XSecure_RsaOaepDecrypt().