Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/amd64/stand/prekern



Module Name:    src
Committed By:   maxv
Date:           Sun Nov 26 11:01:09 UTC 2017

Modified Files:
        src/sys/arch/amd64/stand/prekern: Makefile mm.c prekern.c prekern.h
Added Files:
        src/sys/arch/amd64/stand/prekern: prng.c

Log Message:
Add a PRNG for the prekern, based on SHA512. The formula is basically:

        Y0   = SHA512(entropy-file, 256bit rdseed, 64bit rdtsc)
        Yn+1 = SHA512(256bit lowerhalf(Yn), 256bit rdseed, 64bit rdtsc)

On each round, random values are taken from the higher half of Yn. If
rdseed is not available, rdrand is used.

The SHA1 checksum of entropy-file is verified. However, the rndsave_t::data
field is not updated by the prekern, because the area is accessed via the
read-only view we created in locore. I like this design, so it will have
to be updated differently.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/Makefile
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/amd64/stand/prekern/mm.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/prekern.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/stand/prekern/prekern.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/stand/prekern/prng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index