Hi,
I am working on a embedded platform, that does not has any entropy source except system ticks. To improve the randomness, I am trying to utilize NV_SEED operations.
Configuration file I have enabled:
#define MBEDTLS_ENTROPY_NV_SEED
#define MBEDTLS_PLATFORM_NV_SEED_ALT
After initializing and before seeding random number generator, I assign functions of nv seed read and write to platform seeding function as below.
if( r = mbedtls_platform_set_nv_seed(FN_NV_SEED_RD, FN_NV_SEED_WR) )
{
return( r );
}
if( r = mbedtls_ctr_drbg_seed( &CtrDrbg, mbedtls_entropy_func, &Entropy,
(const unsigned char *) u8SeedingString, (size_t)Length ) )
{
return ( r );
}
Later functions to generate random and free context.
While running, I could see only the FN_NV_SEED_RD function is getting called. And,
FN_NV_SEED_WR function is not getting called.
Could anyone suggest how to trace the issue. I do not have debugger on for my platform. I could debug only with print statements.
Thanks,
Gopi Krishnan