Functions | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Prng_Init (CRYPTO_Type *base, uint32_t lfsr32InitState, uint32_t lfsr31InitState, uint32_t lfsr29InitState) |
Initializes the PRND parameters. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Prng (CRYPTO_Type *base, uint32_t max, uint32_t *randomNum) |
Generates a Pseudo Random Number. More... | |
void | Cy_Crypto_Core_Trng_Init (CRYPTO_Type *base, cy_stc_crypto_trng_config_t *config) |
Initialize the TRNG hardware submodule. More... | |
void | Cy_Crypto_Core_Trng_DeInit (CRYPTO_Type *base) |
Clears all TRNG registers by setting it to hardware default values. More... | |
cy_en_crypto_status_t | Cy_Crypto_Core_Trng_Start (CRYPTO_Type *base, uint32_t dataSize) |
Starts a random number generation. More... | |
cy_en_crypto_status_t | Cy_Crypto_Core_Trng_ReadData (CRYPTO_Type *base, uint32_t *randomData) |
Reads in blocking mode a generated random number. More... | |
cy_en_crypto_status_t | Cy_Crypto_Core_Trng (CRYPTO_Type *base, uint32_t GAROPol, uint32_t FIROPol, uint32_t max, uint32_t *randomNum) |
Generates a True Random Number. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Trng_Ext (CRYPTO_Type *base, uint32_t max, uint32_t *randomNum) |
Generates a True Random Number. More... | |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Prng_Init | ( | CRYPTO_Type * | base, |
uint32_t | lfsr32InitState, | ||
uint32_t | lfsr31InitState, | ||
uint32_t | lfsr29InitState | ||
) |
Initializes the PRND parameters.
Invoking this function causes a restart of the pseudo-random sequence.
base | The pointer to the CRYPTO instance. |
lfsr32InitState | A non-zero seed value for the first LFSR. |
lfsr31InitState | A non-zero seed value for the second LFSR. |
lfsr29InitState | A non-zero seed value for the third LFSR. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Prng | ( | CRYPTO_Type * | base, |
uint32_t | max, | ||
uint32_t * | randomNum | ||
) |
Generates a Pseudo Random Number.
base | The pointer to the CRYPTO instance. |
max | The maximum value of a random number. |
randomNum | The pointer to a variable to store the generated pseudo random number. |
void Cy_Crypto_Core_Trng_Init | ( | CRYPTO_Type * | base, |
cy_stc_crypto_trng_config_t * | config | ||
) |
Initialize the TRNG hardware submodule.
base | The pointer to the CRYPTO instance. |
config | The pointer to the configuration structure. |
void Cy_Crypto_Core_Trng_DeInit | ( | CRYPTO_Type * | base | ) |
Clears all TRNG registers by setting it to hardware default values.
base | The pointer to the CRYPTO instance. |
Clears all TRNG registers by setting it to hardware default values.
base | The pointer to the CRYPTO instance. |
cy_en_crypto_status_t Cy_Crypto_Core_Trng_Start | ( | CRYPTO_Type * | base, |
uint32_t | dataSize | ||
) |
Starts a random number generation.
base | The pointer to the CRYPTO instance. |
dataSize | The maximum length of a random number, in the range [0, 32] bits. |
cy_en_crypto_status_t Cy_Crypto_Core_Trng_ReadData | ( | CRYPTO_Type * | base, |
uint32_t * | randomData | ||
) |
Reads in blocking mode a generated random number.
base | The pointer to the CRYPTO instance. |
randomData | The pointer to a generated true random number. Must be 4-byte aligned. |
cy_en_crypto_status_t Cy_Crypto_Core_Trng | ( | CRYPTO_Type * | base, |
uint32_t | GAROPol, | ||
uint32_t | FIROPol, | ||
uint32_t | max, | ||
uint32_t * | randomNum | ||
) |
Generates a True Random Number.
base | The pointer to the CRYPTO instance. |
GAROPol | The polynomial for the programmable Galois ring oscillator. |
FIROPol | The polynomial for the programmable Fibonacci ring oscillator. |
max | The maximum length of a random number, in the range of [0, 32] bits. |
randomNum | The pointer to a generated true random number. Must be 4-byte aligned. |
base | The pointer to the CRYPTO instance. |
GAROPol | The polynomial for the programmable Galois ring oscillator. |
FIROPol | The polynomial for the programmable Fibonacci ring oscillator. |
max | The maximum length of a random number, in the range of [0, 32] bits. |
randomNum | The pointer to a generated true random number. Must be 4-byte aligned. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Trng_Ext | ( | CRYPTO_Type * | base, |
uint32_t | max, | ||
uint32_t * | randomNum | ||
) |
Generates a True Random Number.
base | The pointer to the CRYPTO instance. |
max | The maximum length of a random number, in the range of [0, 32] bits. |
randomNum | The pointer to a generated true random number. Must be 4-byte aligned. |