]> git.baikalelectronics.ru Git - kernel.git/commit
s390/crypto: use TRNG for seeding/reseeding
authorHarald Freudenberger <freude@linux.ibm.com>
Tue, 16 Apr 2019 11:41:26 +0000 (13:41 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Apr 2019 13:34:09 +0000 (15:34 +0200)
commit5c067911639e0c0bcf2d1b7f6c14f8c24b337c3a
treeef30000786f61ce3e0fc434d3ffa82a6ac7769b8
parenta822592a91b7a91e8399a0eac6703305a4e36422
s390/crypto: use TRNG for seeding/reseeding

With the z14 machine there came also a CPACF hardware extension
which provides a True Random Number Generator. This TRNG can
be accessed with a new subfunction code within the CPACF prno
instruction and provides random data with very high entropy.

So if there is a TRNG available, let's use it for initial seeding
and reseeding instead of the current implementation which tries
to generate entropy based on stckf (store clock fast) jitters.

For details about the amount of data needed and pulled for
seeding and reseeding there can be explaining comments in the
code found.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/crypto/prng.c