Functions#

This section provides a reference to the TRNG Crypto API functions.

Functions#

sl_status_t
sl_si91x_trng_init(sl_si91x_trng_config_t *config, uint32_t *output)

This API Initializes the TRNG hardware engine.

sl_status_t

This API checks the Entropy of TRNG and verifies TRNG functioning.

sl_status_t
sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length)

This API initializes and programs the key required for TRNG hardware engine.

sl_status_t
sl_si91x_trng_get_random_num(uint32_t *random_number, uint16_t length)

This API generates random number of desired length.

sl_status_t
sl_si91x_duplicate_element(uint32_t *dword, uint32_t length_in_dwords)

This API checks 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)

This API Initializes the TRNG hardware engine.

Parameters
[in]config

Configuration object of type sl_si91x_trng_config_t

[out]output

Buffer to store the output.

Returns


Definition at line 67 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 )

This API checks the Entropy of TRNG and verifies TRNG functioning.

Parameters
N/A

Returns


Definition at line 75 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)

This API initializes and programs the key required for TRNG hardware engine.

Parameters
[in]trng_key

- Pointer to trng_key

[in]key_length

- key_length - key length in Dwords (uint32_t)

Returns


Definition at line 85 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)

This API generates random number of desired length.

Parameters
[in]random_number

- Address for Random number

[in]length

- length of random number in bytes

Returns


Definition at line 94 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, index)

This API checks if there are any repeating elements in the Array.

Parameters
[inout]dword

Pointer to the array of elements.

[in]length_in_dwords

Length of the array in dwords.

[in]index

Index of the element to be duplicated.

Returns


Definition at line 106 of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h