aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/random/randomdev.c
Commit message (Collapse)AuthorAgeFilesLines
...
* The "struct proc" argument to read_random was ill-conceived, and aMark Murray2000-09-121-1/+1
| | | | | | | | | | | hangover from previous experimentation. Remove it. This will clean up gratuitous needs for forward references and other namespace pollution. Moaned about by: bde Brought to my attention by: bp Notes: svn path=/head/; revision=65775
* Large upgrade to the entropy device; mainly inspired by feedbackMark Murray2000-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. Notes: svn path=/head/; revision=65686
* o Fix a horrible bug where small reads (< 8 bytes) would return theMark Murray2000-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") Notes: svn path=/head/; revision=63855
* Add randomness write functionality. This does absolutely nothing forMark Murray2000-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. Notes: svn path=/head/; revision=63306
* Fix bug with a vraiable that needs to be per-process, not static;Mark Murray2000-07-091-8/+12
| | | | | | | | | fix formatting of long macros. Pointed out by: bde Notes: svn path=/head/; revision=62840
* Add entropy gathering code. This will work whether the module isMark Murray2000-07-071-31/+31
| | | | | | | compiled in or loaded. Notes: svn path=/head/; revision=62765
* Staticize a variable.Mark Murray2000-06-281-1/+1
| | | | | | | | | | This fixes the case where linking randomdev into the kernel statically can cause panics at shutdown time. Reported by: sos Notes: svn path=/head/; revision=62217
* I am guilty of an act of ommission. There is no longer a /dev/urandomMark Murray2000-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. Notes: svn path=/head/; revision=62149
* style(9) fixes from BDE.Mark Murray2000-06-261-1/+1
| | | | | | | We shouldn't use '#include ""', rather '#include<>'. Notes: svn path=/head/; revision=62117
* Fix include for the non-module case.Mark Murray2000-06-251-1/+1
| | | | | | | Thanks-to: SOS Notes: svn path=/head/; revision=62087
* New machine-independant /dev/random driver.Mark Murray2000-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 Notes: svn path=/head/; revision=62053