Skip to contentSkip to conversation

New: Clarify /dev/urandom utility and volume

Bug 71211 bugzilla-daemon-590EEB7GvNiWaY/[email protected] 1 participant 3 messages Feb 27, 2014 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=71211

Bug ID: 71211
Summary: Clarify /dev/urandom utility and volume
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: man-pages
Assignee: documentation_man-pages-ztI5WcYan/[email protected]
Reporter: bugtrackers-w/PKm97gIPRWk0Htik3J/[email protected]
Regression: No

First, an assumption: /dev/random and /dev/urandom are good CPRNGs, and the definition of a "good CPRNG" includes the ability to generate a theoretically unlimited amount of random data for daily uses.

The manpage for random(4) states, in part:

Quoted 8 lines

The kernel random-number generator is designed to produce a small amount of high-quality seed material to seed a cryptographic pseudo- random number generator (CPRNG). It is designed for security, not speed, and is poorly suited to generating large amounts of random data. Users should be very economical in the amount of seed material that they read from /dev/urandom (and /dev/random); unnecessarily reading large quantities of data from this device will have a negative impact on other users of the device.

A lot developers take this paragraph as gospel, and I believe the way it is phrased "spooks" them into not trusting /dev/urandom as much as they should for daily tasks. The consequence is that they instead use OpenSSL or another user-space CPRNG instead of their kernel, or roll their own (ugh).

We should clarify what "a large amount of random data" is, what being "economical" means, and what a "negative impact on other users of the device" means, and provide more specific examples of where /dev/urandom is useful.

As a sounding board, is /dev/urandom acceptable for providing random bytes to assist with the following tasks? Assume I'm drawing 16 bytes on average, multiple times per second.

(1) Generating numbers/nonces, etc for secure network connections
(2) Generating signed cookies or session keys for a web application
(3) Generating random numbers for use in games of chance

References/how I ended up here:
http://man7.org/linux/man-pages/man4/random.4.html
http://blog.cr.yp.to/20140205-entropy.html
http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/
https://bugs.ruby-lang.org/issues/9569

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): bug-71211-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/

#2 lore raw

[Bug 71211] Clarify /dev/urandom utility and volume

https://bugzilla.kernel.org/show_bug.cgi?id=71211

Corey Csuhta <bugtrackers-w/PKm97gIPRWk0Htik3J/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                URL|                            |http://man7.org/linux/man-p
                   |                            |ages/man4/random.4.html
                 CC|                            |bugtrackers-w/PKm97gIPRWk0Htik3J/[email protected]
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

[Bug 71211] random(4): clarify utility and volume

In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=71211

Corey Csuhta <bugtrackers-w/PKm97gIPRWk0Htik3J/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|Clarify /dev/urandom        |random(4): clarify utility
                   |utility and volume          |and volume
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html