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-10-10 11:44:27 +08:00
committed by Peng Fan
parent ecdc3872a7
commit 524d637bb9
+1 -1
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