Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
/dev/random
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==BSD systems== The [[FreeBSD]] operating system provides a {{nowrap|{{mono|/dev/urandom}}}} link to {{nowrap|{{mono|/dev/random}}}}. Both block only until properly seeded. FreeBSD's PRNG ([[Fortuna (PRNG)|Fortuna]]) reseeds regularly, and does not attempt to estimate entropy. On a system with small amount of network and disk activity, reseeding is done after a fraction of a second.<ref>{{man|4|random|FreeBSD}}</ref> [[DragonFly BSD]] inherited FreeBSD's random device files when it was forked.<ref>{{Cite web |title=random(4) |url=https://man.dragonflybsd.org/?command=random§ion=4 |access-date=2024-06-15 |website=DragonFly On-Line Manual Pages}}</ref>{{Non-primary source needed|date=June 2024}}<ref>{{Cite web |title=A comparison of /dev/random speed on Linux and BSD |url=https://ianix.com/pub/comparing-dev-random-speed-linux-bsd.html |access-date=2024-06-15 |website=ianix.com}}</ref> Since [[OpenBSD]] 5.1 (May 1, 2012) {{nowrap|{{mono|/dev/random}}}} and {{mono|/dev/arandom}} uses [[arc4random]], a CSPRNG function based on [[RC4]]. The function was changed to use the stronger [[ChaCha20]] with OpenBSD 5.5 (May 1, 2014). The system automatically uses hardware random number generators (such as those provided on some Intel PCI hubs) if they are available, through the [[OpenBSD Cryptographic Framework]].<ref>{{man|4|random|OpenBSD}}</ref><ref>{{cite web |url=http://bxr.su/OpenBSD/lib/libc/crypt/arc4random.c |title=libc/crypt/arc4random.c |website=BSD Cross Reference, OpenBSD src/lib/ |editor=deraadt |editor-link=Theo de Raadt |date=2014-07-21 |access-date=2015-01-13 |quote=ChaCha based random number generator for OpenBSD.}}</ref> {{nowrap|{{mono|/dev/arandom}}}} was removed in OpenBSD 6.3 (April 15, 2018).<ref>{{cite web |url=https://github.com/openbsd/src/commit/0d60993c06101c0a9e6fb6c3a3302133f1b65f98 |title=src/etc/MAKEDEV.common |website=GitHub OpenBSD source code mirror src/etc/ |editor=naddy |date=2017-11-14 |access-date=2017-11-14 |quote=/dev/arandom removed from OpenBSD.}}</ref> [[NetBSD]]'s implementation of the legacy {{code|arc4random()}} API has been switched over to ChaCha20 as well.<ref>{{cite web |url=http://bxr.su/NetBSD/lib/libc/gen/arc4random.c |title=libc/gen/arc4random.c |website=BSD Cross Reference, NetBSD src/lib/ |editor=riastradh |date=2014-11-16 |access-date=2015-01-13 |quote=Legacy arc4random(3) API from OpenBSD reimplemented using the ChaCha20 PRF, with per-thread state.}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)