Switch random_get_pseudo_bytes() shim to arc4rand().
Our shim for Solaris random_get_bytes() uses read_random(), that looks reasonable, since it guaranties reliably seeded random data. On the other side Solaris random_get_pseudo_bytes() does not provide this guarantie, and its original Solaris implementation is equivalent to our arc4rand(), using software crypto without stressing slower hardware RNG.
This commit is contained in:
parent
2e4fd101fa
commit
20e45e033c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305679
@ -32,6 +32,6 @@
|
||||
#include_next <sys/random.h>
|
||||
|
||||
#define random_get_bytes(p, s) read_random((p), (int)(s))
|
||||
#define random_get_pseudo_bytes(p, s) read_random((p), (int)(s))
|
||||
#define random_get_pseudo_bytes(p, s) arc4rand((p), (int)(s), 0)
|
||||
|
||||
#endif /* !_OPENSOLARIS_SYS_RANDOM_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user