Skip to content
Commit 20e73ece authored by Ahmad Fatoum's avatar Ahmad Fatoum Committed by Greg Kroah-Hartman
Browse files

KEYS: trusted: allow use of kernel RNG for key material



[ Upstream commit fcd7c269 ]

The two existing trusted key sources don't make use of the kernel RNG,
but instead let the hardware doing the sealing/unsealing also
generate the random key material. However, both users and future
backends may want to place less trust into the quality of the trust
source's random number generator and instead reuse the kernel entropy
pool, which can be seeded from multiple entropy sources.

Make this possible by adding a new trusted.rng parameter,
that will force use of the kernel RNG. In its absence, it's up
to the trust source to decide, which random numbers to use,
maintaining the existing behavior.

Suggested-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Acked-by: default avatarSumit Garg <sumit.garg@linaro.org>
Acked-by: default avatarPankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: default avatarDavid Gstir <david@sigma-star.at>
Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Tested-by: default avatarPankaj Gupta <pankaj.gupta@nxp.com>
Tested-by: Michael Walle <michael@walle.cc> # on ls1028a (non-E and E)
Tested-by: John Ernberg <john.ernberg@actia.se> # iMX8QXP
Signed-off-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Stable-dep-of: 01bbafc6 ("KEYS: trusted: Remove redundant static calls usage")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a01d68b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment