fchmod-tests, fchmodat tests, lchmod tests: Add more tests.
[gnulib.git] / doc / glibc-functions / getentropy.texi
blob9035d86762d83802ddd6bc578f34b9db6bc8ce17
1 @node getentropy
2 @subsection @code{getentropy}
3 @findex getentropy
5 Documentation:
6 @itemize
7 @item
8 @ifinfo
9 @ref{Unpredictable Bytes,,Generating Unpredictable Bytes,libc},
10 @end ifinfo
11 @ifnotinfo
12 @url{https://www.gnu.org/software/libc/manual/html_node/Unpredictable-Bytes.html},
13 @end ifnotinfo
14 @item
15 @uref{https://www.kernel.org/doc/man-pages/online/pages/man3/getentropy.3.html,,man getentropy}.
16 @end itemize
18 Gnulib module: getentropy
20 Portability problems fixed by Gnulib:
21 @itemize
22 @item
23 This function is missing on some platforms:
24 glibc 2.24, Mac OS X 10.11, FreeBSD 11.0, NetBSD 9.0, OpenBSD 5.5, Minix 3.3, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.0, Cygwin 1.7.x, mingw, MSVC 14, Android 9.0.
25 @item
26 This function is declared in @code{<sys/random.h>}, not in @code{<unistd.h>},
27 on some platforms:
28 Mac OS X 10.13, Solaris 11.4, Android 9.0.
29 @end itemize
31 Portability problems not fixed by Gnulib:
32 @itemize
33 @end itemize
35 @noindent
36 Although this function is intended to produce random data, the data's
37 security properties may not be appropriate for your application.
38 For example, identical ``random'' data streams might be produced by
39 rebooted virtual machines.  If this is of concern you may need to use
40 additional techniques such as hedging.@footnote{Ristenpart T, Yilek
41 S@. @url{http://pages.cs.wisc.edu/~rist/papers/sslhedge.pdf, When good
42 randomness goes bad: virtual machine vulnerabilities and hedging
43 deployed cryptography}. NDSS 2010.}
45 Related modules include @code{getrandom}, which has a more-flexible
46 but more-complex API, and @code{crypto/gc-random}, which is likely a
47 better match for code already using the other @code{crypto} APIs.