Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: time |
| Date | 2012-11-21 19:57 -0800 |
| Organization | None to speak of |
| Message-ID | <lnr4nmthkt.fsf@nuthaus.mib.org> (permalink) |
| References | (1 earlier) <pan.2012.11.20.03.07.29.506000@nowhere.com> <8dd71a20-5caa-4e4a-8c1f-5c7d84b56bd2@h9g2000yqd.googlegroups.com> <50AD0DC6.5090505@verizon.net> <gof.1353524440.12609@somewhere.invalid> <pan.2012.11.22.02.00.18.990000@nowhere.com> |
Nobody <nobody@nowhere.com> writes:
> On Wed, 21 Nov 2012 19:09:18 +0000, Adam Wysocki wrote:
[...]
> On Wed, 21 Nov 2012 12:01:46 -0800, Keith Thompson wrote:
>> If it's worth going to that much trouble, it's probably worth using a
>> better random number generator than rand() (one provided by the
>> implementation but not specified by the C standard).
>
> But that doesn't do anything about the lack of non-determinism (entropy).
> A better PRNG may give you better random numbers, but without something
> other than time(), they'll be exactly the same random numbers as any
> other invocation which gets the same value from time().
Some PRNGs are self-seeding. For example, if you can read
data from /dev/random, you'll get numbers that are pretty much
cryptographically secure (and /dev/urandom is nearly as good and
much faster).
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-19 19:11 -0500
Re: time Geoff <geoff@invalid.invalid> - 2012-11-19 16:26 -0800
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-19 16:51 -0800
Re: time Geoff <geoff@invalid.invalid> - 2012-11-19 17:01 -0800
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-19 20:07 -0500
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-19 23:54 -0800
Re: time pete <pfiland@mindspring.com> - 2012-11-20 07:31 -0500
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-20 17:09 -0500
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-19 16:30 -0800
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-19 20:04 -0500
Re: time Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-25 05:52 -0800
Re: time Nobody <nobody@nowhere.com> - 2012-11-20 03:07 +0000
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-19 23:58 -0800
Re: time Anand Hariharan <mailto.anand.hariharan@gmail.com> - 2012-11-21 08:30 -0800
Re: time "osmium" <r124c4u102@comcast.net> - 2012-11-21 11:11 -0600
Re: time James Kuyper <jameskuyper@verizon.net> - 2012-11-21 12:22 -0500
Re: time gof@somewhere.invalid (Adam Wysocki) - 2012-11-21 19:09 +0000
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-21 12:01 -0800
Re: time gof@somewhere.invalid (Adam Wysocki) - 2012-11-23 08:15 +0000
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-21 15:16 -0500
Re: time "osmium" <r124c4u102@comcast.net> - 2012-11-21 14:23 -0600
Re: time Rosario1903 <Rosario@invalid.invalid> - 2012-11-22 10:25 +0100
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-21 12:30 -0800
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-21 18:24 -0500
Re: time Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-25 05:56 -0800
Re: time Nobody <nobody@nowhere.com> - 2012-11-22 02:00 +0000
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-21 19:57 -0800
Re: time gof@somewhere.invalid (Adam Wysocki) - 2012-11-23 08:31 +0000
Re: time army1987 <army1987@ask-for-it.invalid> - 2012-11-24 13:58 +0000
Re: time Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-22 11:36 +0000
Re: time gof@somewhere.invalid (Adam Wysocki) - 2012-11-23 08:20 +0000
Re: time Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-23 14:31 +0000
Re: time Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-25 05:54 -0800
Re: time Mark Storkamp <mstorkamp@yahoo.com> - 2012-11-20 08:34 -0600
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-20 20:37 -0500
Re: time Keith Thompson <kst-u@mib.org> - 2012-11-20 20:25 -0800
Re: time "Bill Cunningham" <nospam@nspam.invalid> - 2012-11-21 15:11 -0500
csiph-web