delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/12/00:25:31

From: Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
Newsgroups: comp.os.msdos.programmer,comp.os.msdos.djgpp
Subject: Re: Uptime and entropy in DOS
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <vml9askj6f5r0h7rt3v9t7vl5snr781b1v@4ax.com>
References: <lra6ascbh1fu2d4738d44h09kpooc8ecta AT 4ax DOT com> <38A420E4 DOT 27CA35B2 AT americasm01 DOT nt DOT com> <38A4450C DOT 31C58BC AT hns DOT com> <38A45BBF DOT 845CE314 AT americasm01 DOT nt DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 35
X-Trace: /bNDCy3F8vw92L6L2tJ5GF4gP9Ylh2SR9DYFjQbDpcH1Z1G8IbxUmyvopiBJbLxOL2qxoEsZi5kX!fpBweKbM7fL+mWGfpJgx7Cf7YOdm+q3TpaU0N/eO/rdEqaJ65HHvBT6+Q9w+1N+uiu1afGcb0Q6k!uU6nX6M=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Sat, 12 Feb 2000 03:50:09 GMT
Distribution: world
Date: Sat, 12 Feb 2000 03:50:09 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Fri, 11 Feb 2000 13:58:07 -0500, "Campbell, Rolf [SKY:1U32:EXCH]"
<moscoop AT americasm01 DOT nt DOT com> wrote:

>Link Hochnadel wrote:
>
>> "Campbell, Rolf [SKY:1U32:EXCH]" wrote:
>> >
>> > Damian Yerrick wrote:
>> >
>> > > Is it possible to get the uptime of a DOS system?  I need more entropy
>> > > than the 32 bits I get from time(NULL) to initialize a pseudorandom
>> > > number generator.  Is there a predictable way to get at least 64 bits
>> > > of entropy?
>> Flip the bits end-to-end, then multiply both values to get 64 bits.
>
>    That will only be 32-bit's of entropy in a 64-bit container.  It would be
>just as effective to assign the upper 32-bits some constant (like
>0xdeadbeef).

Which is a famous graphics library author's speedh AT ck password.

Anyway, how do I read these lower 32 bits of entropy? And what about
486s that lack the instruction? And what about portability? (I am
isolating and minimizing code that relies on a specific architecture.)

Are there other sources of entropy?
1. lower 16 bits of unix datetime
2. lower 32 bits of CPU uptime (Pentiums only)
3. __________________________________

-- 
Damian Yerrick  http://yerricde.tripod.com/
Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
View full sig: http://www.rose-hulman.edu/~yerricde/sig.html

- Raw text -


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