]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
random: Add PowerPC 'darn' instruction entropy source
authorJustin Hibbits <jhibbits@FreeBSD.org>
Fri, 17 Aug 2018 03:49:07 +0000 (03:49 +0000)
committerJustin Hibbits <jhibbits@FreeBSD.org>
Fri, 17 Aug 2018 03:49:07 +0000 (03:49 +0000)
commitb14959dacc796b287f2b8fc1da0bf975797ecf6f
treecc35989b551449deacfca414b26ce2127254a3b4
parent45625675e7838b65f323b4611bc9f5d6af5b8678
random: Add PowerPC 'darn' instruction entropy source

Summary:
PowerISA 3.0 adds a 'darn' instruction to "deliver a random number".  This
driver was modeled after (rather, copied and gutted of) the Ivy Bridge
rdrand driver.

This uses the "Conditional Random Number" behavior to remove input bias.

From the ISA reference the 'darn' instruction, and the random number
generator backing it, conforms to the NIST SP800-90B and SP800-90C
standards, compliant to the extent possible at the time the hardware was
designed, and guarantees a minimum 0.5 bits of entropy per bit returned.

Reviewed By: markm, secteam (delphij)
Approved by: secteam (delphij)
Differential Revision: https://reviews.freebsd.org/D16552
sys/conf/files.powerpc
sys/dev/random/darn.c [new file with mode: 0644]
sys/dev/random/random_harvestq.c
sys/sys/random.h