Hello
I am trying to build mbedTLS for SKS7G2 with Netx bsd. To build mbedTLS need to implement Synergy platform based entropy source strong random number generator (RNG)
SSP documentation has example
API header file description shows like below
/** Generate `nbytes` of random number bytes and store them in `p_rngbuf` buffer
* @param[in] p_ctrl pointer to trng control structure
* @param[out] p_rngbuf generated random numbers will be stored to the buffer `p_rngbuf`
* @param[in] nbytes number of random bytes to generate
*/
uint32_t (* read)(trng_ctrl_t * const p_ctrl, uint32_t * const p_rngbuf, uint32_t nwords);
My question is we should pass number of bytes OR number of 32bit words? Look at description and function call parameter naming convention.
if nword is answer then need to convert number of bytes into n_words i.e. numbytes / sizeof(uint32_).
not clear which one correct.
Thanks
Mariya