delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/23/22:14:08

Date: Mon, 23 Mar 1998 19:13:16 -0800 (PST)
Message-Id: <199803240313.TAA27293@adit.ap.net>
Mime-Version: 1.0
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>,
G DOT DegliEsposti AT ads DOT it, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: real random numbers

At 01:38  3/23/1998 +0000, Salvador Eduardo Tropea (SET) wrote:
>G DOT DegliEsposti AT ads DOT it wrote:
>> 
>> >If anyone could tell me how to get REAL random generated numbers under
>> >djgpp ... and/or explain me how it works ! I wonder for a long time how
>> >a computer can generate random numbers
>> 
>> I would like to know it too! ;-)
>> 
>> Computers cannot generate real random numbers, what they can do is run some
>> program in a deterministic way. (at least PCs do :-)
>
>Hmmm... That isn't true, you can easilly create a random number generator
using 
>a diode and an A/D, or just sampling the enviroment sound ;-). There are a lot 
>of cases like that, not all involves an A/D converter, some signals (not 
>properlly grounded, etc) have random patterns. You can do it, but you need
some 
>hard.

Linux has a /dev/random device that gives a random bytestream seeded from
interrupt occurences, sound card noise, etc. Another popular method (I think
PGP does this) is to have the user bang on some keys and time the interval.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019