mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user