Age | Commit message (Collapse) | Author | |
---|---|---|---|
2008-12-15 | remove i386-only inline assembler roll() function; gcc optimises the | Damien Miller | |
equivalent C code into a rol instruction anyway (confirmed with objdump -d); "nuke it" weingart@ | |||
2008-11-24 | extra decl not needed; spotted by djm | Theo de Raadt | |
2008-11-24 | allow entropy to be queued before randomattach() is called | Theo de Raadt | |
worked on with djm | |||
2008-11-24 | Seed the random pool with the dmesg buffer at randomattach(). | Marco Pfatschbacher | |
This lets early arc4random() calls to return at least non-uniqe values on different machines. The dmesg will have different MAC addresses, etc. Also ignore the entropy count in arc4_stir, and just take what's there. sizeof(struct timeval) should be sizof(struct timespec) This was forgotten when we switched to nanotime. With help from mickey. OK djm@, deraadt@ | |||
2008-10-15 | kernel/5592: yield() between copying out large chunks of random data to | Damien Miller | |
userspace - mitigates an effective DoS since generating these can hog the CPU at splhigh() feedback & ok tedu@ deraadt@ | |||
2008-10-10 | minor 3 was /dev/prandom, which used random(). make that use the | Theo de Raadt | |
arandom code, just like minor 4. in fact, make them act exactly the same. | |||
2008-09-10 | Convert timeout_add() calls using multiples of hz to timeout_add_sec() | Bret Lambert | |
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@ | |||
2008-06-11 | correct long since bitrotted comments | Damien Miller | |
POOL_TAP5 is always 1 so unifdef it no binary change | |||
2008-06-10 | reorder functions and variables in rnd.c so they are more logically | Damien Miller | |
arranged. They are now layed out in four sections: 1. Master entropy pool maintenance (add_entropy_words & extract entropy) 2. Entropy crediting (add_*_randomness backend) 3. Exported kernel API: arc4random() and friends 4. /dev/*random char devices | |||
2008-06-09 | simplify math for arc4random_uniform() suggested by | Damien Miller | |
Jinmei_Tatuya AT isc.org via jakob@ empirically verified for entire domain of upper_bound | |||
2008-06-09 | rename arc4random_bytes => arc4random_buf to match libc's nicer name; | Damien Miller | |
ok deraadt@ | |||
2008-06-04 | fix math screwup that reintroduced a bias for upper_bounds in range | Damien Miller | |
(2^30,2^31). Nothing in the tree yet requests random numbers bounded by this range. report jakob!deraadt; ok deraadt@ | |||
2008-03-02 | Add a arc4random_uniform() that returns a uniformly distributed number | Damien Miller | |
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@ | |||
2007-12-29 | switch from spls to mutexes for protecting the random state. | David Gwynne | |
ok tedu@ djm@ | |||
2007-10-15 | zero the right object, not some hunk of stack; ok henric@ | Damien Miller | |
2007-10-15 | Switch arc4random to using routines from crypto/arc4.[ch], and rework | Damien Miller | |
spl swizzling so we go to splhigh and back once per request instead of once per byte. Service large requests for arc4random_bytes using an independently keyed generator rather than hogging the main one (at splhigh). feedback from henric@; ok deraadt@ | |||
2007-10-09 | MALLOC -> malloc | Gilles Chehade | |
ok krw@ | |||
2007-06-17 | ansify/de-register | Jasper Lievisse Adriaanse | |
ok miod@ | |||
2007-04-10 | ``it's'' -> ``its'' when the grammar gods require this change. | Miod Vallat | |
2006-04-11 | make this use nanotime, not microtime; ok mickey@ | Damien Miller | |
2005-07-31 | use monotonic time for repeat event detections; feedback and ok deraadt@ | Damien Miller | |
2005-07-07 | fix accounting bug on extraction - we were incorrectly subtracting many times | Damien Miller | |
the amount requested from the pool's entropy estimate; ok mickey@ deraadt@ | |||
2005-05-27 | De-inline a couple of long functions, which also makes them ↵ | Hakan Olsson | |
debugger-visible. 'makes sense' mickey@ | |||
2005-03-04 | Fix a variable name in a comment; from Clint <cruoho@gmail.com>; ok tdeval@ | Robert Nagy | |
2005-01-27 | poll can ever deny reads for srandom only; millert@ ok | Michael Shalayeff | |
2005-01-27 | In randompoll() the write check was overriding the results of the read check. | Todd C. Miller | |
OK mickey@ | |||
2004-07-21 | remove a few inlines from funcs that are used more than once and make code ↵ | Michael Shalayeff | |
bigger; asked by art@ | |||
2004-07-06 | use MALLOC/FREE for fixed size buffer allocations | Michael Shalayeff | |
2004-07-05 | Allocate buffers in randomread and randomwrite via malloc instead | Todd C. Miller | |
of from the stack. Keeps us from running out of kernel stack during stack-heavy networking load. The bug manifests as a panic during bootup with an fpu-related assertion failure on i386. Fix from Christopher Pascoe; commit requested by deraadt@ | |||
2004-05-07 | Replace RSA-derived md5 code with code derived from Colin Plumb's PD version. | Todd C. Miller | |
This moves md5.c out of libkern and into sys/crypto where it belongs (as requested by markus@). Note that md5.c is still mandatory (dev/rnd.c uses it). Verified with IPsec + hmac-md5 and tcp md5sig. OK henning@ and hshoexer@ | |||
2004-04-02 | repair linuxisms tested on hppa, sparc, vax and i386; from Sven Dehmlow ↵ | Michael Shalayeff | |
<sven_dehmlow@gmx.de> | |||
2004-04-02 | kill _8 api completely | Michael Shalayeff | |
2004-03-15 | per popular demand panic on premature arc4 initializations (would have ↵ | Michael Shalayeff | |
paniced anyway elsewhere) | |||
2003-11-03 | add arc4random_bytes. input ok mickey@ | Ted Unangst | |
2003-10-21 | typos from Tom Cosgrove; | Jason McIntyre | |
2003-09-23 | Replace select backends with poll backends. selscan() and pollscan() | Todd C. Miller | |
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK | |||
2003-08-15 | change arguments to suser. suser now takes the process, and a flags | Ted Unangst | |
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@ | |||
2002-11-25 | protect the arc4_getbyte() w/ an splhigh since | Michael Shalayeff | |
there by multiple pathways, where it worked until read from userland in big buffers and some luck. does not cause a memory trashing, but rather may mess up the arc4 state such that it will not generate one particular value until a stir. sigh. was reported by multiple people over some time. | |||
2002-11-11 | grammar fixens from Andrey Smagin | Michael Shalayeff | |
2002-06-19 | add kqfilter for random, regress is coming | Michael Shalayeff | |
2002-06-14 | from freebsd: | Michael Shalayeff | |
Throw away the first N words of output, as suggested in the paper "Weaknesses in the Key Scheduling Algorithm of RC4" by Fluher, Mantin, and Shamir. (N = 256 in our case.) | |||
2002-05-27 | kill unused arc4random_8() API | Theo de Raadt | |
2002-04-01 | a few typos from pechkin | Michael Shalayeff | |
2002-03-21 | on extract: better spl granularity, make sure pool is updated between runs; ↵ | Michael Shalayeff | |
later pt out by camield@ | |||
2002-03-14 | First round of __P removal in sys | Todd C. Miller | |
2002-01-31 | drop the low drop bits number to 10 drop | Michael Shalayeff | |
2002-01-10 | return ENOTTY not EINVAL in default: in *ioctl() | Michael Shalayeff | |
2002-01-03 | Restore entropy_count calculation. mickey@ ok | Thomas Nordin | |
2001-12-29 | finer spl granularity, allowing ints to happen; pointed out and tested on ↵ | Michael Shalayeff | |
vax by hugh@ | |||
2001-09-24 | there was a possible overrun in prev folding length fix. | Michael Shalayeff | |
however i was lucky enough so it worked. anyway, this fixes the problem and seems to run very much alright on sparc at least. |