summaryrefslogtreecommitdiffstats
path: root/sys/dev/rndvar.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt2020-05-291-43/+0
| | | | | | conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
* Pass bootblock indicator RB_GOODRANDOM to random_start(). Future workderaadt2020-05-251-2/+2
| | | | | will frantically compensate. ok kettenis
* replace add_*_randomness with enqueue_randomness()jasper2018-04-281-21/+2
| | | | | | | | | this gets rid of the source annotation which doesn't really add anything other than adding complexitiy. randomess is generally good enough that the few extra bits that the source type would add are not worth it. ok mikeb@ deraadt@
* remove the sysctl kern.random counters, since none of the remainingderaadt2016-05-231-19/+1
| | | | | ones are capable of giving valuable works vs does-not-work evidence. ok tedu
* Change the random event buffer from a queue to an endless ring. This waytedu2016-05-171-2/+2
| | | | | | | | | we don't drop any events when the queue is full. They are instead mixed into previous events. The mixing function selected is addition instead of xor to reduce the possibility that new values effectively erase existing ones. Convert some types to u_int to ensure defined overflow. ok deraadt djm
* New framework that allows hibernate to pass in entropy from it's freshderaadt2015-02-071-2/+2
| | | | | boot. ok mlarkin
* Create a suspend/resume infrastructure for the RNG. At suspend time,deraadt2014-12-181-1/+3
| | | | | | | | process all queued entropy and create a brand new pool to prevent backtracking upon resume. At resume time, process the entropy queue (since other resume code paths which run earlier can enqueue entropy) and force all higher to reseed. ok reyk djm
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-4/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* Refactor rnd startup so arc4random/arc4random_buf can create a chacha statederaadt2014-01-191-2/+1
| | | | | | | on first call, very early on, from boot-supplied entropy, then feed from that. Later when we have more subsystems ready, the main() can properly initialize the entropy-driven model. Lots of discussion with mikeb. ok kettenis markus mikeb
* With the earlier initialization of the random subsystem, random_hostseed()deraadt2014-01-191-2/+1
| | | | | | is no longer providing significant value. The random subsystem is in pretty good state, and moments later userland will feed the dmesg. ok jsing
* remove some of the unused fields from rndstats and stop printing zeroes.tedu2013-03-291-6/+1
| | | | print labels before stats so people can tell what's what.
* reseed the random pool with 'dmesg' when more devices are attachedmarkus2013-03-251-1/+2
| | | | from hshoexer@; ok tedu@, "looks good" deraadt@
* split randomattach into random_init() and random_start(), so that wederaadt2011-01-081-1/+4
| | | | | can make attempts to load 'entropy' into the RC4. ok miod ariane
* some minor improvements to rnd.tedu2011-01-071-3/+1
| | | | | | | | | 1. only support pool words == 2048. 2. define the amount of key we use. 3. define the amount of rc4 we skip. 4. use arc4random_buf instead of reimplementing inline. 5. bzero some more "secrets". ok deraadt djm
* substantial rewrite. put a very thin mutex at the entropy-collectionderaadt2011-01-071-2/+2
| | | | | | | | | | | side so that entropy events can come in from any kernel context. place a 2nd very thin mutex at the call-down path as well, so that any context can request random data. in the middle, meet with a bcopy that has no mutex, but copying unlocked data is actually a benefit. move the pool->MD5->RC4init sequence into a workq driven from a timeout, so that we can do all the heavy work without any mutex held or IPL; only grab the 2nd mutex to swap to a new RC4 state. (this workq design from tedu) ok dlg tedu
* make all /dev/*random nodes respond; in fact, don't even worry aboutderaadt2011-01-061-7/+1
| | | | | | | the minor number at all. The chances of an application ignoring the error on /dev/random are *greater* than the risk of an application getting bad data from it. ok dlg tedu kjell
* mark unused fields in struct rndstatsderaadt2011-01-051-3/+3
|
* kill RND_ARND_OLD, and decrease RND_NODEV to account for it; ok djmderaadt2010-12-291-4/+3
|
* Remove the get_random_bytes() API.deraadt2010-12-291-2/+1
| | | | ok kjell djm
* minor 3 was /dev/prandom, which used random(). make that use thederaadt2008-10-101-3/+3
| | | | | arandom code, just like minor 4. in fact, make them act exactly the same.
* rename arc4random_bytes => arc4random_buf to match libc's nicer name;djm2008-06-091-3/+3
| | | | ok deraadt@
* Add a arc4random_uniform() that returns a uniformly distributed numberdjm2008-03-021-1/+2
| | | | | | | | | | in the range 0 <= x < upper_bound Please use this new API instead of "arc4random() % upper_bound", as it avoids the "modulo bias" that favours small results when upper_bound is not a power of two. feedback deraadt@ mcbride@; ok deraadt@
* add arc4random_bytes. input ok mickey@tedu2003-11-031-1/+2
|
* kill the caluses three and four on some of my codemickey2003-06-021-7/+1
|
* kill unused arc4random_8() APIderaadt2002-05-271-2/+1
|
* First round of __P removal in sysmillert2002-03-141-5/+5
|
* new type for video i/o entropymickey2001-09-221-1/+3
|
* better has when adding entropy to the pool.mickey2000-04-131-3/+3
| | | | bigger pool (4k).
* add support for more random sources.mickey2000-04-101-29/+38
| | | | | | make it easy to add more in the future. make extract_entropy() faster. more accurate stats.
* faster log2, more stats, lazy random stirring, more stats, less debug, help and ok from provos@mickey2000-03-191-17/+21
|
* fix the typesderaadt1997-06-281-17/+17
|
* more accounting!mickey1997-06-241-1/+4
|
* wasn't a race after all. properly initialize event_q pointers so theflipk1997-06-221-1/+21
| | | | last one doesn't point off the end.
* revert, there's a nasty race condition here.flipk1997-06-211-21/+1
|
* count slow queue low entropy dropsmickey1997-06-171-1/+2
| | | | | bigger queue use queue overflows for arc4_stir()
* split the treatment of the random eventsmickey1997-06-141-1/+20
| | | | | | | | event_q by flipk@ spl fix by deraadt@ gother statistics about whole processing use 'sysctl kern.random' to view what had happened also fix wrong vm.psstrings description
* Remove lots of timer_state structs as they just ate memory and only a few wasniklas1997-01-051-3/+3
| | | | | | | ever used. Now a single state is kept for net, tty and disk events resp. Also, call the randomness from disk_unbusy instead of biodone, as biodone gets a lot of virtual events (from virtual filesystems etc), and as a bonus: feed xfer time and size into the entropy pool too.
* cleanup and sync w/ latest Linux source.mickey1996-09-061-2/+2
| | | | | | remove keyboard randomness entry point. make Free ppl happy, remove suspicious piece. missed: SHA neede in libkern, why not to put aRC4 there too?
* Increased entropy through decreased typos.dm1996-08-111-1/+4
|
* Supply randomness source for the rnd device.mickey1996-04-241-2/+2
|
* The random data source driver itself.mickey1996-03-291-0/+58
Initial commit.