![]() |
Synergy Software Package User's Manual
|
RTOS-integrated Crypto TRNG Framework Module. More...
Macros | |
| #define | SF_CRYPTO_TRNG_CODE_VERSION_MAJOR (2U) |
Functions | |
| ssp_err_t | SF_CRYPTO_TRNG_Open (sf_crypto_trng_ctrl_t *const p_api_ctrl, sf_crypto_trng_cfg_t const *const p_cfg) |
| SSP Crypto TRNG Framework Open operation. More... | |
| ssp_err_t | SF_CRYPTO_TRNG_Close (sf_crypto_trng_ctrl_t *const p_api_ctrl) |
| SSP Crypto TRNG Framework Close operation. More... | |
| ssp_err_t | SF_CRYPTO_TRNG_RandomNumberGenerate (sf_crypto_trng_ctrl_t *const p_api_ctrl, sf_crypto_data_handle_t *const p_random_number_buff) |
| SSP Crypto TRNG Framework True Random Generation operation. More... | |
| ssp_err_t | SF_CRYPTO_TRNG_VersionGet (ssp_version_t *const p_version) |
| Sets TRNG Framework Code and API version based on compile time macros. More... | |
Variables | |
| const sf_crypto_trng_api_t | g_sf_crypto_trng_api |
RTOS-integrated Crypto TRNG Framework Module.
| #define SF_CRYPTO_TRNG_CODE_VERSION_MAJOR (2U) |
The API version of SSP Crypto Framework
| ssp_err_t SF_CRYPTO_TRNG_Close | ( | sf_crypto_trng_ctrl_t *const | p_api_ctrl | ) |
SSP Crypto TRNG Framework Close operation.
| SSP_SUCCESS | The module was successfully closed |
| SSP_ERR_ASSERTION | One or more input parameters are NULL. |
| SSP_ERR_CRYPTO_COMMON_NOT_OPENED | Crypto Common module has not been opened. |
| SSP_ERR_NOT_OPEN | The module has not been opened before calling this API. |
Check if SF Crypto TRNG is opened before
Call HAL API to Close TRNG HAL Driver
Set TRNG status to Closed
Decrement Open counter to indicate a (this) module is closed
| ssp_err_t SF_CRYPTO_TRNG_Open | ( | sf_crypto_trng_ctrl_t *const | p_api_ctrl, |
| sf_crypto_trng_cfg_t const *const | p_cfg | ||
| ) |
SSP Crypto TRNG Framework Open operation.
| SSP_SUCCESS | The module was successfully opened |
| SSP_ERR_ASSERTION | One or more input parameters are NULL. |
| SSP_ERR_CRYPTO_COMMON_NOT_OPENED | Crypto framework common module has not been opened before calling this API. |
| SSP_ERR_ALREADY_OPEN | The module has already been opened. |
Check if Crypto Common module is opened before calling this API
Check if SF Crypto TRNG is already opened
Setup HAL API
Call HAL API to Open TRNG HAL Driver
Set TRNG status to Open
Increment Open counter to indicate a (this) module is open
| ssp_err_t SF_CRYPTO_TRNG_RandomNumberGenerate | ( | sf_crypto_trng_ctrl_t *const | p_api_ctrl, |
| sf_crypto_data_handle_t *const | p_random_number_buff | ||
| ) |
SSP Crypto TRNG Framework True Random Generation operation.
| SSP_SUCCESS | The module was successfully closed. |
| SSP_ERR_NOT_OPEN | The module has not been opened before calling this API. |
| SSP_ERR_ASSERTION | One or more input parameters are NULL. |
Check if SF Crypto TRNG is opened before
Acquire SF Crypto Common lock before accessing HAL
Call HAL API to generate true random number
Get 16-byte multiples of TRNs first and store/hold it in the user buffer
Release SF Crypto Common lock
| ssp_err_t SF_CRYPTO_TRNG_VersionGet | ( | ssp_version_t *const | p_version | ) |
Sets TRNG Framework Code and API version based on compile time macros.
| SSP_SUCCESS | Successful close |
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |
| const sf_crypto_trng_api_t g_sf_crypto_trng_api |
Filled in Interface API structure for this Instance.