svn commit: r247512 - in stable/9/lib/libc: gen stdlib
Dag-Erling Smørgrav
des at FreeBSD.org
Fri Mar 1 00:52:58 UTC 2013
Author: des
Date: Fri Mar 1 00:52:57 2013
New Revision: 247512
URL: http://svnweb.freebsd.org/changeset/base/247512
Log:
MFH (r240107,240111,240361): warn against using weak PRNGs
Modified:
stable/9/lib/libc/gen/rand48.3
stable/9/lib/libc/stdlib/random.3
Directory Properties:
stable/9/lib/libc/ (props changed)
Modified: stable/9/lib/libc/gen/rand48.3
==============================================================================
--- stable/9/lib/libc/gen/rand48.3 Fri Mar 1 00:46:41 2013 (r247511)
+++ stable/9/lib/libc/gen/rand48.3 Fri Mar 1 00:52:57 2013 (r247512)
@@ -12,7 +12,7 @@
.\" @(#)rand48.3 V1.0 MB 8 Oct 1993
.\" $FreeBSD$
.\"
-.Dd February 2, 2010
+.Dd September 4, 2012
.Dt RAND48 3
.Os
.Sh NAME
@@ -49,6 +49,14 @@
.Ft void
.Fn lcong48 "unsigned short p[7]"
.Sh DESCRIPTION
+.Bf -symbolic
+The functions described in this manual page are not cryptographically
+secure.
+Cryptographic applications should use
+.Xr arc4random 3
+instead.
+.Ef
+.Pp
The
.Fn rand48
family of functions generates pseudo-random numbers using a linear
@@ -174,10 +182,8 @@ It is thus not possible to use values gr
Note that all three methods of seeding the random number generator
always also set the multiplicand and addend for any of the six
generator calls.
-.Pp
-For a more powerful random number generator, see
-.Xr random 3 .
.Sh SEE ALSO
+.Xr arc4random 3 ,
.Xr rand 3 ,
.Xr random 3
.Sh AUTHORS
Modified: stable/9/lib/libc/stdlib/random.3
==============================================================================
--- stable/9/lib/libc/stdlib/random.3 Fri Mar 1 00:46:41 2013 (r247511)
+++ stable/9/lib/libc/stdlib/random.3 Fri Mar 1 00:52:57 2013 (r247512)
@@ -181,7 +181,6 @@ messages are printed on the standard err
.Xr arc4random 3 ,
.Xr lrand48 3 ,
.Xr rand 3 ,
-.Xr srand 3 ,
.Xr random 4
.Sh HISTORY
These
More information about the svn-src-stable
mailing list