Feature #5949
closedarc4random_addrandom() seems to be missing from arc4random(3C) suite
0%
Description
apparently libevent (v2) expects arc4random_addrandom() if arc4random()/arc4random_buf() are provided.
So it would be nice to have the this and, perhaps, arc4random_stir() as well to accompany 5830 want arc4random(3C) suite.
That is, looking at NetBSD, they provide the following:
ARC4RANDOM(3) Library Functions Manual ARC4RANDOM(3) NAME arc4random, arc4random_buf, arc4random_uniform, arc4random_stir, arc4random_addrandom -- arc4 random number generator LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <stdlib.h> uint32_t arc4random(void); void arc4random_buf(void *buffer, size_t length); uint32_t arc4random_uniform(uint32_t upper_bound); void arc4random_stir(void); void arc4random_addrandom(u_char *dat, int datlen);
in the meanwhile, I guess libevent needs to be hacked around.
Updated by Joshua M. Clulow about 7 years ago
- Status changed from New to Rejected
We have neither arc4random_stir()
, nor arc4random_addrandom()
, entirely on purpose. OpenBSD removed these interfaces some time ago; they don't actually do anything. As we only recently acquired an implementation of the arc4random(3C)
suite of functions, it did not make sense to incorporate interfaces which have already been removed from other platforms.
Updated by Richard PALO about 7 years ago
can you provide me with the references so that upstream libevent (and other dependent packages)
can take note...
Also, perhaps OpenBSD removed it, but apparently Apple, NetBSD and FreeBSD and company still seem to have it in current trunk.
Updated by Joshua M. Clulow about 7 years ago
You can see in the OpenBSD commit history for stdlib.h at revision 1.53
:
Revision 1.53 / Mon Oct 21 20:33:24 2013 UTC (19 months ago) by deraadt Branch: MAIN Changes since 1.52: +1 -4 lines Remove arc4random_stir() and arc4random_addrandom(), which none should 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