bdad8b2721
Three ways to call: getrandom(p, n, 0) Blocks at boot until full entropy. Returns up to n bytes at p; guarantees up to 256 bytes even if interrupted after blocking. getrandom(0,0,0) serves as an entropy barrier: return only after system has full entropy. getrandom(p, n, GRND_INSECURE) Never blocks. Guarantees up to 256 bytes even if interrupted. Equivalent to /dev/urandom. Safe only after successful getrandom(...,0), getrandom(...,GRND_RANDOM), or read from /dev/random. getrandom(p, n, GRND_RANDOM) May block at any time. Returns up to n bytes at p, but no guarantees about how many -- may return as short as 1 byte. Equivalent to /dev/random. Legacy. Provided only for source compatibility with Linux. Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN without producing any output instead of blocking. - The combination GRND_INSECURE|GRND_NONBLOCK is the same as GRND_INSECURE, since GRND_INSECURE never blocks anyway. - The combinations GRND_INSECURE|GRND_RANDOM and GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail with EINVAL. As proposed on tech-userlevel, tech-crypto, tech-security, and tech-kern, and subsequently adopted by core (minus the getentropy part of the proposal, because other operating systems and participants in the discussion couldn't come to an agreement about getentropy and blocking semantics): https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html |
||
---|---|---|
.. | ||
csu | ||
i18n_module | ||
libarch | ||
libbluetooth | ||
libbpfjit | ||
libbsdmalloc | ||
libbz2 | ||
libc | ||
libc_fp | ||
libc_vfp | ||
libcompat | ||
libcrypt | ||
libcurses | ||
libdm | ||
libedit | ||
libexecinfo | ||
libform | ||
libintl | ||
libipsec | ||
libisns | ||
libkern | ||
libkvm | ||
liblwres | ||
libm | ||
libmenu | ||
libnpf | ||
libnvmm | ||
libossaudio | ||
libp2k | ||
libpam | ||
libpanel | ||
libpci | ||
libperfuse | ||
libposix | ||
libppath | ||
libprop | ||
libpthread | ||
libpuffs | ||
libquota | ||
libradius | ||
librefuse | ||
libresolv | ||
librmt | ||
librpcsvc | ||
librt | ||
librump | ||
librumpclient | ||
librumpdev | ||
librumphijack | ||
librumpnet | ||
librumpres | ||
librumpuser | ||
librumpvfs | ||
libskey | ||
libss | ||
libtelnet | ||
libterminfo | ||
libukfs | ||
libusbhid | ||
libutil | ||
libwrap | ||
liby | ||
libz | ||
lua | ||
npf | ||
bumpversion | ||
checkoldver | ||
checkver | ||
checkvers | ||
Makefile | ||
Makefile.inc |