| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
``-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
|
|
|
|
| |
ok deraadt@ djm@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
kurt@
|
|
|
|
|
|
|
| |
(2^30,2^31). Nothing in the tree yet requests random numbers bounded
by this range.
report jakob!deraadt; ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
to get random data without calling getpid(), ok millert@ deraadt@
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
| |
from original author (David Mazieres)
|
|
|
|
| |
stir after eating 400000 words. ok + input deraadt
|
|
|
|
| |
ok djm@
|
|
|
|
|
| |
"Weaknesses in the Key Scheduling Algorithm of RC4", Fluhrer, Mantin and
Shamir. ok itojun@
|
|
|
|
| |
ok deraadt and co.
|
| |
|
| |
|
| |
|
|
|
|
| |
from conversations between various people
|
|
|
|
| |
kern.arandom.
|
| |
|
| |
|
|
|