1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00
Files
gnulib/doc/glibc-functions/getrandom.texi
Paul Eggert dd091da172 doc: improve randomness discussion
Inspired by comments from Jeffrey Walton in:
https://lists.gnu.org/r/bug-gnulib/2020-06/msg00002.html
* doc/glibc-functions/getentropy.texi (getentropy):
* doc/glibc-functions/getrandom.texi (getrandom):
Improve discussion of problems with "random" data,
and cite Ristenpart & Yilek.  Also, mention GRND_INSECURE.
2020-06-01 11:18:06 -07:00

52 lines
1.6 KiB
Plaintext

@node getrandom
@subsection @code{getrandom}
@findex getrandom
Documentation:
@itemize
@item
@ifinfo
@ref{Unpredictable Bytes,,Generating Unpredictable Bytes,libc},
@end ifinfo
@ifnotinfo
@url{https://www.gnu.org/software/libc/manual/html_node/Unpredictable-Bytes.html},
@end ifnotinfo
@item
@uref{https://www.kernel.org/doc/man-pages/online/pages/man2/getrandom.2.html,,man getrandom}.
@end itemize
Gnulib module: getrandom
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
glibc 2.24, Mac OS X 10.5, FreeBSD 11.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.0, Cygwin, mingw, MSVC 14, Android 9.0.
@item
This function has a different return type on some platforms:
Solaris 11.4.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
The @code{GRND_INSECURE} flag is missing on some platforms:
glibc 2.31, macOS 10.15, GNU/kFreeBSD, FreeBSD 12.0, OpenBSD 6.5,
Minix 3.3, Haiku.
@item
The @code{GRND_RANDOM} flag has different effects on different platforms.
Some platforms ignore the flag, or yield data that can fail to be
random in some cases.
@end itemize
@noindent
Although this function is intended to produce random data, the data's
security properties may not be appropriate for your application.
For example, identical ``random'' data streams might be produced by
rebooted virtual machines. If this is of concern you may need to use
additional techniques such as hedging.@footnote{Ristenpart T, Yilek
S@. @url{http://pages.cs.wisc.edu/~rist/papers/sslhedge.pdf, When good
randomness goes bad: virtual machine vulnerabilities and hedging
deployed cryptography}. NDSS 2010.}