Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Delete the extraneous "return" statement at the end of a void function. | jca | 2014-05-31 | 1 | -2/+1 |
| | | | | From Fritjof Bornebusch. | ||||
* | missing NULL checks to see if init is needed. found hard way by deraadt. | tedu | 2014-05-06 | 1 | -3/+3 |
| | |||||
* | clear a stack buffer with explicit_bzero | tedu | 2014-05-06 | 1 | -2/+2 |
| | |||||
* | move chacha context and buffer out of bss and allow mmap to place them | tedu | 2014-05-06 | 1 | -6/+16 |
| | | | | wherever it decides it would like them. first step. ok deraadt dlg djm | ||||
* | delete useless test code | deraadt | 2014-05-04 | 1 | -23/+1 |
| | |||||
* | Remove arc4random_stir() and arc4random_addrandom(), which none should | deraadt | 2013-10-21 | 1 | -26/+1 |
| | | | | | | be using directly. Well, a few rare people cloned it upstream and it will take a bit of time for them to learn. ok various | ||||
* | replace rc4 with ChaCha20; inspired by Nick Mathewson's work on libottery; | markus | 2013-10-01 | 1 | -98/+106 |
| | | | | feedback and ok djm@ | ||||
* | spacing | deraadt | 2013-06-11 | 1 | -3/+2 |
| | |||||
* | Change arc4random_uniform() to calculate ``2**32 % upper_bound'' as | matthew | 2012-06-24 | 1 | -12/+3 |
| | | | | | | | | | | ``-upper_bound % upper_bound''. Simplifies the code and makes it the same on both ILP32 and LP64 architectures, and also slightly faster on LP64 architectures by using a 32-bit remainder instead of a 64-bit remainder. Pointed out by Jorden Verwer on tech@ ok deraadt; no objections from djm or otto | ||||
* | remove comment that hasn't been true for quite a while now; | otto | 2010-12-22 | 1 | -6/+1 |
| | | | | ok deraadt@ djm@ | ||||
* | No point in refreshing the pid from inside arc4_stir() when that | guenther | 2009-12-15 | 1 | -6/+15 |
| | | | | | | | | | doesn't test it, so factor out the two places that test it into a routine and do the refreshing there. With this, arch4random_buf() doesn't trigger superfluous calls to getpid() when filling large buffers. ok deraadt@, "looks nicer indeed" otto@ | ||||
* | zap __arc4_getbyte(), it was only used by the old malloc; ok millert@ | otto | 2008-10-03 | 1 | -14/+1 |
| | | | | kurt@ | ||||
* | fix math screwup that reintroduced a bias for upper_bounds in range | djm | 2008-06-04 | 1 | -2/+2 |
| | | | | | | | (2^30,2^31). Nothing in the tree yet requests random numbers bounded by this range. report jakob!deraadt; ok deraadt@ | ||||
* | diff from djm@ committed at his request: | otto | 2008-03-16 | 1 | -1/+63 |
| | | | | | | | | | | | | | | introduce two new APIs for requesting strong random numbers: arc4random_buf() - fill an arbitrary memory range with random numbers arc4random_uniform() - return a uniformly distributed random number below a specified upper bound, avoiding the bias that comes from a naive "arc4random() % upper_bound" construction. these mirror similarly-named functions in the kernel; lots of discussion deraadt@ mcbride@ | ||||
* | - make arc4random*() functions thread safe. Use a custom spinlock function | kurt | 2008-01-01 | 1 | -41/+56 |
| | | | | | | | | | | | instead of the generic pthread macros since free(3) uses __arc4_getbyte() when freeing small sized allocations and the generic pthread macros call malloc(3). - eliminate passing pointers to a static variable with global scope (rs) for additional code clarity and reduction. - shlib minor bumps for libc and libpthread due to new functions. From andreas@ with some bits from me. okay tedu@ marc@ w/some spot checking from millert@ | ||||
* | provide an libc internal interface to get random bytes, to be used by malloc | otto | 2007-02-12 | 1 | -3/+12 |
| | | | | to get random data without calling getpid(), ok millert@ deraadt@ | ||||
* | Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a time | otto | 2005-11-30 | 1 | -9/+2 |
| | | | | | | | and remove fallback code. If somebody is dumb enough to make the sysctl fail using systrace, he deserves what he gets. Saves 7 syscalls on process startup. looks good miod@ ok deraadt@ tedu@ | ||||
* | Change email address for author, at his request. | kjell | 2005-06-06 | 1 | -2/+2 |
| | |||||
* | Change license to standard OpenBSD boilerplate, with permission | kjell | 2005-06-06 | 1 | -6/+15 |
| | | | | from original author (David Mazieres) | ||||
* | use the new fat random sysctl to get initial state. (fallback to looping). | tedu | 2005-06-04 | 1 | -12/+14 |
| | | | | stir after eating 400000 words. ok + input deraadt | ||||
* | kill spaces | hshoexer | 2004-11-02 | 1 | -3/+3 |
| | | | | ok djm@ | ||||
* | Discard first 256 bytes of keystream, as per recommendation in | djm | 2003-11-26 | 1 | -1/+10 |
| | | | | | "Weaknesses in the Key Scheduling Algorithm of RC4", Fluhrer, Mantin and Shamir. ok itojun@ | ||||
* | just use sysctl for stirring. thread safe and can't fail. | tedu | 2003-08-16 | 1 | -23/+10 |
| | | | | ok deraadt and co. | ||||
* | ansification; checked by pval | deraadt | 2003-06-11 | 1 | -18/+9 |
| | |||||
* | re-stir if pid changes; markus & me | deraadt | 2003-02-14 | 1 | -3/+5 |
| | |||||
* | License clarification from David Mazieres, ok deraadt@ | pvalchev | 2001-06-05 | 1 | -3/+2 |
| | |||||
* | Set j = i after arc4random key schedule to be more like arc4 stream cipher; | deraadt | 1999-09-28 | 1 | -1/+2 |
| | | | | from conversations between various people | ||||
* | if /dev/arandom is not available for seeding, use data from sysctl | provos | 1999-06-29 | 1 | -5/+22 |
| | | | | kern.arandom. | ||||
* | $OpenBSD$ | niklas | 1998-03-22 | 1 | -1/+1 |
| | |||||
* | Clean up some -Wall flowers. | millert | 1997-07-09 | 1 | -2/+3 |
| | |||||
* | arc4random() number generator, for use with things like RPC xid's. | dm | 1996-12-28 | 1 | -0/+175 |