Home
last modified time | relevance | path

Searched hist:ff1031691dc30399844e3ca7360b83e8e3963a7b (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/drivers/crypto/caam/
H A Dcaam_rng.cff1031691dc30399844e3ca7360b83e8e3963a7b Wed Jun 28 12:32:37 UTC 2023 Ahmad Fatoum <a.fatoum@pengutronix.de> drivers: caam: rng: enable prediction resistance if possible

OP-TEE sets the PR bit on shared descriptors since commit 4ff2ce818e56
("drivers: caam: instantiate RNG state handle with prediction resistance"),
but did not make use of it for random number generation with the reason
explained inside the commit message:

Note: current patch does not deal with RNG state handles that have
already been initialized, but without PR support (this could happen if
U-boot would run before OP-TEE etc.). In this case, RNG state handle
would have to be deinstantiated first, and then reinstantiated with
PR support.

There is a simpler workaround than deinstantiation however: Check if the
state handles have been initialized with prediction resistance (whether
from OP-TEE or outside) and if they were, just set the prediction
resistance bit.

Reviewed-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>