diff options
author | Gaurav Jain <gaurav.jain@nxp.com> | 2025-09-05 15:03:48 +0530 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2025-10-10 11:44:27 +0800 |
commit | 524d637bb933e51a85ba078eafc5e3fdc7616e50 (patch) | |
tree | 64be875dcdc14131dc31c1cdfc70de93707f139d | |
parent | ecdc3872a767fb045be3296d4317ae978a14b022 (diff) |
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>
-rw-r--r-- | drivers/crypto/fsl/jr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index 8f7a821ebf3..07d336c074a 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -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 |