Age | Commit message (Collapse) | Author | |
---|---|---|---|
2008-06-09 | rename arc4random_bytes => arc4random_buf to match libc's nicer name; | Damien Miller | |
ok deraadt@ | |||
2008-03-15 | revert - I'm a dumbfuck who doesn't know his own API | Damien Miller | |
2008-03-15 | off by one at end of array | Damien Miller | |
2008-03-15 | Because the ip_id code initialisation is a specific case of shuffling | Damien Miller | |
a set of incrementing integers (and not an arbitrary set of values) it is possible to populate the array as we shuffle it in a single forward pass. Clever optimisation from didickman AT gmail.com; ok deraadt@ mcbride@ | |||
2008-03-02 | because arc4random_uniform is being used, the modulo bias is taken care of | Theo de Raadt | |
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@ | |||
2008-02-29 | replacement algorithm. initialize a 64K-short buffer using Durstenfeld | Theo de Raadt | |
shuffle. Upon allocation, swap-permute the new value to a random slot in the 0..32K-1 th entry of the buffer as we move forward, ensuring randomness but also satisfying the non-repeating property we need. Also avoid the value of 0, since IP ID's of 0 are special. Inspired by Dillon's implementation. We believe this is easier to read though, initializes with less bias, handles the ID of 0 properly, and wins speed tests. Thanks a lot to mcbride and djm for doing a bunch of statistical and speed analysis, and comments from nordin ok mcbride djm | |||
2007-11-26 | typos; ok jmc@ | Martynas Venckus | |
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@ sys/dev/pci/bktr/* ok jakemsr@ | |||
2007-05-27 | remove more static to avoid confusing the profiler (and maybe ddb too) | David Gwynne | |
prodded by art@ ja ja claudio@ | |||
2004-06-21 | First step towards more sane time handling in the kernel -- this changes | Thorsten Lockert | |
things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@ | |||
2004-03-22 | spelling; jjy2+@pitt.edu | Theo de Raadt | |
2003-12-12 | niels kindly dropped clause 3/4 from the license. tnx! | Jun-ichiro itojun Hagino | |
2003-12-12 | previous commit included bad hunk. sorry | Jun-ichiro itojun Hagino | |
2003-12-12 | no need to call arc4random() if we don't skip numbers in ip_randomid(). | Jun-ichiro itojun Hagino | |
from markus | |||
2003-12-10 | correct non-repetitive ID code, based on comments from niels provos. | Jun-ichiro itojun Hagino | |
- seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x". - skipping number is not needed, so disable it for 16bit generator (makes the repetition period to 30000) | |||
2003-09-21 | "exp" is a reserved symbol under gcc3/posix. mcbride ok | Jun-ichiro itojun Hagino | |
2002-03-15 | Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things | Todd C. Miller | |
the ANSI way. | |||
2002-03-14 | First round of __P removal in sys | Todd C. Miller | |
2001-06-08 | Cut down on include files. | Angelos D. Keromytis | |
2001-06-04 | use faster arc4random() for small amounts fo data, some spaces; niels ok | Michael Shalayeff | |
1999-08-26 | add an inner xor to make prediction attacks against the ids harder, due | Niels Provos | |
to an attack pointed out by David Wagner. | |||
1998-12-26 | make ip_id random but ensure that ids dont repeat for some period. | Niels Provos | |