Functions#
This section provides a reference to the TRNG Crypto API functions.
Functions#
To initialize the TRNG hardware engine.
To check the entropy of TRNG and verify its functioning.
To initialize and program the key required for the TRNG hardware engine.
To generate a random number of the desired length.
To check if there are any repeating elements in the array.
Function Documentation#
sl_si91x_trng_init#
sl_status_t sl_si91x_trng_init (sl_si91x_trng_config_t * config, uint32_t * output)
To initialize the TRNG hardware engine.
[in] | config | Configuration object of type sl_si91x_trng_config_t |
[out] | output | Buffer to store the output. |
Returns
sl_status_t. For more information on status codes, see SL STATUS DOCUMENTATION.
76
of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h
sl_si91x_trng_entropy#
sl_status_t sl_si91x_trng_entropy (void )
To check the entropy of TRNG and verify its functioning.
N/A |
Returns
sl_status_t. For more information on status codes, see SL STATUS DOCUMENTATION.
87
of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h
sl_si91x_trng_program_key#
sl_status_t sl_si91x_trng_program_key (uint32_t * trng_key, uint16_t key_length)
To initialize and program the key required for the TRNG hardware engine.
[in] | trng_key | Pointer to the TRNG key. |
[in] | key_length | Length of the key in Dwords (uint32_t). |
Returns
sl_status_t. For more information on status codes, see SL STATUS DOCUMENTATION.
102
of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h
sl_si91x_trng_get_random_num#
sl_status_t sl_si91x_trng_get_random_num (uint32_t * random_number, uint16_t length)
To generate a random number of the desired length.
[in] | random_number | Address for the random number. |
[in] | length | Length of the random number in bytes. |
Returns
sl_status_t. For more information on status codes, see SL STATUS DOCUMENTATION.
117
of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h
sl_si91x_duplicate_element#
sl_status_t sl_si91x_duplicate_element (uint32_t * dword, uint32_t length_in_dwords)
To check if there are any repeating elements in the array.
[inout] | dword | Pointer to the array of elements. |
[in] | length_in_dwords | Length of the array in dwords. |
Returns
sl_status_t. For more information on status codes, see SL STATUS DOCUMENTATION.
133
of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h