History log of /freebsd-14.2/lib/libc/stdlib/random.3 (Results 1 – 25 of 36)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# b2c76c41 16-Aug-2023 Warner Losh <[email protected]>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0
# 672e1225 01-Feb-2020 Conrad Meyer <[email protected]>

rand(3): Replace implementation with one backed by random(3) algorithm

rand(3)'s standard C API is extremely limiting, but we can do better
than the historical 32-bit state Park-Miller LCG we've shi

rand(3): Replace implementation with one backed by random(3) algorithm

rand(3)'s standard C API is extremely limiting, but we can do better
than the historical 32-bit state Park-Miller LCG we've shipped since
2001: r73156.

The justification provided at the time for not using random(3) was that
rand_r(3) could not be made to use the same algorithm. That is still
true. However, the irrelevance of rand_r(3) is increasingly obvious.
Since that time, POSIX has marked the interface obsolescent. rand_r(3)
never became part of the standard C library. If not for API
compatibility reasons, I would just remove rand_r(3) entirely.

So, I do not believe it is a problem for rand_r(3) and rand(3) to
diverge.

The 12 ABI is maintained with compatibility definitions, but this
revision does subtly change the API of rand(3). The sequences of
pseudorandom numbers produced in programs built against new versions of
libc will differ from programs built against prior versions of libc.

Reviewed by: kevans, markm
MFC after: no
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D23290

show more ...


# 825a73c3 20-Jan-2020 Conrad Meyer <[email protected]>

random.3: Some minor improvements to wording/clarity


Revision tags: release/12.1.0, release/11.3.0
# 680defa7 22-Apr-2019 Conrad Meyer <[email protected]>

random.3: Remove obsolete BUGS section

Relative performance to rand(3) is sort of irrelevant; they do different things
and a user with sensitivity to RNG performance won't use libc random(3) anyway.

random.3: Remove obsolete BUGS section

Relative performance to rand(3) is sort of irrelevant; they do different things
and a user with sensitivity to RNG performance won't use libc random(3) anyway.

The historical note about bad seeding is long obsolete, referring to a 1996 or
earlier version of FreeBSD.

Sponsored by: Dell EMC Isilon

show more ...


# 1631235a 15-Apr-2019 Conrad Meyer <[email protected]>

random.3: Clarify confusing summary

random.3 is only "better" in contrast to rand.3. Both are non-cryptographic
pseudo-random number generators. The opening blurbs of each's DESCRIPTION
section do

random.3: Clarify confusing summary

random.3 is only "better" in contrast to rand.3. Both are non-cryptographic
pseudo-random number generators. The opening blurbs of each's DESCRIPTION
section does emphasize this, and correctly directs unfamiliar developers to
arc4random(3). However, the summary (".Nd" or Name description) of random.3
conflicted in tone and message with that warning.

Resolve the conflict by clarifying in the Nd section that random(3) is
non-cryptographic and pseudo-random. Elide the "better" qualifier which
implied a comparison but did not provide a specific object to contrast.

Sponsored by: Dell EMC Isilon

show more ...


Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0
# 8de6c267 26-Jul-2016 Ed Schouten <[email protected]>

Fix typing of srandom() and initstate().

POSIX requires that these functions have an unsigned int for their first
argument; not an unsigned long.

My reasoning is that we can safely change these fun

Fix typing of srandom() and initstate().

POSIX requires that these functions have an unsigned int for their first
argument; not an unsigned long.

My reasoning is that we can safely change these functions without
breaking the ABI. As far as I know, our supported architectures either
use registers for passing function arguments that are at least as big as
long (e.g., amd64), or int and long are of the same size (e.g., i386).

Reviewed by: ache
Differential Revision: https://reviews.freebsd.org/D6644

show more ...


# 16bf528d 05-Jun-2016 Andrey A. Chernov <[email protected]>

Reflect error indication according to POSIX and what those functions
currently do.


Revision tags: release/10.3.0, release/10.2.0
# eb51316b 25-Feb-2015 Colin Percival <[email protected]>

Adjust wording slightly to emphasize that random(3) should not be used for
any applications which need unpredictable random numbers, not merely those
which are cryptographic in nature.

If you work f

Adjust wording slightly to emphasize that random(3) should not be used for
any applications which need unpredictable random numbers, not merely those
which are cryptographic in nature.

If you work for a lottery and you're using random(3) to select the winning
numbers, please let me know.

show more ...


Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0
# 580b4d18 13-Jun-2013 Ed Maste <[email protected]>

Renumber clauses to reduce diffs to other versions

NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.


Revision tags: release/8.4.0
# 12a68650 02-Apr-2013 Xin LI <[email protected]>

Replace access to /dev/random with the kernel pseudo-random number
source sysctl(KERN_ARND) and remove the fallback code.

Obtained from: OpenBSD
Reviewed by: secteam
MFC after: 1 month


Revision tags: release/9.1.0
# f7668359 11-Sep-2012 Dag-Erling Smørgrav <[email protected]>

Add the same warning to rand48(3) as to rand(3) and random(3).

MFC after: 3 days


# cf949d12 04-Sep-2012 Dag-Erling Smørgrav <[email protected]>

Bump dates.

Reminded by: bz@


# edab57e0 04-Sep-2012 Dag-Erling Smørgrav <[email protected]>

Add a prominent warning about these functions' unsuitability for
cryptographic purposes, and recommend using arc4random(3) instead.


Revision tags: release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# 866dcc94 06-Oct-2010 Konstantin Belousov <[email protected]>

Add cross-references to lrand48(3) and arc4random(3) from rand(3)
and random(3).

Submitted by: Valentin Nechayev <netch netch kiev ua>
MFC after: 1 week


Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0
# c879ae35 09-Jan-2007 Warner Losh <[email protected]>

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0
# 24a0682c 20-Jan-2005 Ruslan Ermilov <[email protected]>

Sort sections.


Revision tags: release/5.3.0_cvs, release/5.3.0
# 1a0a9345 02-Jul-2004 Ruslan Ermilov <[email protected]>

Mechanically kill hard sentence breaks.


Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0
# e02cc8e4 31-Jul-2003 David Schultz <[email protected]>

Cross-reference arc4random(3).


Revision tags: release/5.1.0_cvs, release/5.1.0
# f8f69700 31-May-2003 Jens Schweikhardt <[email protected]>

Fix grammar bogons.

MFC after: 3 days


Revision tags: release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs
# 8aefde06 07-Sep-2001 Jeroen Ruigrok van der Werven <[email protected]>

Move to using .In instead of .Fd #include <> for include mark-up.

Inspired by comment from: dd


# 7ebcc426 15-Jul-2001 Dima Dorfman <[email protected]>

Remove whitespace at EOL.


# a307d598 10-Jul-2001 Ruslan Ermilov <[email protected]>

mdoc(7) police: removed HISTORY info from the .Os call.


# 70d51341 09-Jul-2001 Dima Dorfman <[email protected]>

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


# df49b8e2 07-Jun-2001 Dima Dorfman <[email protected]>

urandom(4) -> random(4)

PR: 27858
Submitted by: Yoshihiro Koya <[email protected]>
Approved by: markm


Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs
# 25bb73e0 21-Apr-2000 Alexey Zelkin <[email protected]>

Introduce ".Lb" macro to libc manpages.

More libraries manpages updates following.


12