[Midnightbsd-cvs] src [8863] trunk/lib/libc: warn against weak PRNGs
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 26 09:06:56 EDT 2016
Revision: 8863
http://svnweb.midnightbsd.org/src/?rev=8863
Author: laffer1
Date: 2016-09-26 09:06:56 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
warn against weak PRNGs
Modified Paths:
--------------
trunk/lib/libc/gen/rand48.3
trunk/lib/libc/stdlib/random.3
Modified: trunk/lib/libc/gen/rand48.3
===================================================================
--- trunk/lib/libc/gen/rand48.3 2016-09-26 13:06:28 UTC (rev 8862)
+++ trunk/lib/libc/gen/rand48.3 2016-09-26 13:06:56 UTC (rev 8863)
@@ -12,7 +12,7 @@
.\" @(#)rand48.3 V1.0 MB 8 Oct 1993
.\" $MidnightBSD$
.\"
-.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 @@
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: trunk/lib/libc/stdlib/random.3
===================================================================
--- trunk/lib/libc/stdlib/random.3 2016-09-26 13:06:28 UTC (rev 8862)
+++ trunk/lib/libc/stdlib/random.3 2016-09-26 13:06:56 UTC (rev 8863)
@@ -181,7 +181,6 @@
.Xr arc4random 3 ,
.Xr lrand48 3 ,
.Xr rand 3 ,
-.Xr srand 3 ,
.Xr random 4
.Sh HISTORY
These
More information about the Midnightbsd-cvs
mailing list