summaryrefslogtreecommitdiffstats
path: root/sys/dev/randomdev/randomdev.c
Commit message (Collapse)AuthorAgeFilesLines
* Large upgrade to the entropy device; mainly inspired by feedbackmarkm2000-09-101-6/+18
| | | | | | | | | | | | | | | | from many folk. o The reseed process is now a kthread. With SMPng, kthreads are pre-emptive, so the annoying jerkiness of the mouse is gone. o The data structures are protected by mutexes now, not splfoo()/splx(). o The cryptographic routines are broken out into their own subroutines. this facilitates review, and possible replacement if that is ever found necessary. Thanks to: kris, green, peter, jasone, grog, jhb Forgotten to thank: You know who you are; no offense intended.
* o Fix a horrible bug where small reads (< 8 bytes) would return themarkm2000-07-251-2/+12
| | | | | | | | wrong bytes. o Improve the public interface; use void* instead of char* or u_int64_t to pass arbitrary data around. Submitted by: kris ("horrible bug")
* Add randomness write functionality. This does absolutely nothing formarkm2000-07-171-1/+1
| | | | | | | | | | | | | entropy estimation, but causes an immediate reseed after the input (read in sizeof(u_int64_t) chunks) is "harvested". This will be used in the reboot "reseeder", coming in another commit. This can be used very effectively at any time you think your randomness is compromised; something like # (ps -gauxwww; netstat -an; dmesg; vmstat -c10 1) > /dev/random will give the attacker something to think about.
* Fix bug with a vraiable that needs to be per-process, not static;markm2000-07-091-8/+12
| | | | | | fix formatting of long macros. Pointed out by: bde
* Add entropy gathering code. This will work whether the module ismarkm2000-07-071-31/+31
| | | | compiled in or loaded.
* Staticize a variable.markm2000-06-281-1/+1
| | | | | | | This fixes the case where linking randomdev into the kernel statically can cause panics at shutdown time. Reported by: sos
* I am guilty of an act of ommission. There is no longer a /dev/urandommarkm2000-06-271-1/+6
| | | | | | | | | | device with Yarrow, and although I coded for that in dev/MAKEDEV, I forgot to _tell_ folks. This commit adds back the /dev/urandom device (as a duplicate) of /dev/random, until such time as it can be properly announced. This will help the openssl users quite a lot.
* style(9) fixes from BDE.markm2000-06-261-1/+1
| | | | We shouldn't use '#include ""', rather '#include<>'.
* Fix include for the non-module case.markm2000-06-251-1/+1
| | | | Thanks-to: SOS
* New machine-independant /dev/random driver.markm2000-06-251-0/+145
This is work-in-progress, and the entropy-gathering routines are not yet present. As such, this should be viewed as a pretty reasonable PRNG with _ABSOLUTELY_NO_ security!! Entropy gathering will be the subject of ongoing work. This is written as a module, and as such is unloadable, but there is no refcounting done. I would like to use something like device_busy(9) to achieve this (eventually). Lots of useful ideas from: bde, phk, Jeroen van Gelderen Reviewed by: dfr
OpenPOWER on IntegriCloud