crypto/rng: double the entropy delay interval for retry

During entropy evaluation, if the generated samples fail any statistical test,
then, all of the bits will be discarded, and a second set of samples will be
generated and tested.

Double the ent_delay to give more chance to pass before performing retry.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Gaurav Jain
2025-09-05 15:03:48 +05:30
committed by Peng Fan
parent ecdc3872a7
commit 524d637bb9

View File

@@ -642,7 +642,7 @@ static int rng_init(uint8_t sec_idx, ccsr_sec_t *sec)
*/
if (!inst_handles) {
kick_trng(ent_delay, sec);
ent_delay += 400;
ent_delay = ent_delay * 2;
}
/*
* if instantiate_rng(...) fails, the loop will rerun