Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mcnc!duke!srt From: srt@duke.UUCP Newsgroups: sci.math,sci.physics,sci.crypt,sci.math.stat Subject: Re: Do you use RANDOM NUMBERS? Message-ID: <9376@duke.duke.UUCP> Date: Sat, 21-Mar-87 14:28:56 EST Article-I.D.: duke.9376 Posted: Sat Mar 21 14:28:56 1987 Date-Received: Sun, 22-Mar-87 17:47:01 EST References: <5712@reed.UUCP> <419@esl.UUCP> <2156@pur-phy.UUCP> Reply-To: srt@duke.UUCP (Stephen R. Tate) Organization: Duke University, Durham NC Lines: 36 Xref: utgpu sci.math:731 sci.physics:934 sci.crypt:251 sci.math.stat:76 In article <2156@pur-phy.UUCP> piner@pur-phy.UUCP (Richard Piner) writes: >Just a point of information. It is possible to get a real random >number from a computer. On Z-80 machines (like the TRS-80) it is >possible to read the memory refresh register. The register can >have any value between 0 and 64k. The "RANDOMIZE" function in >BASIC uses this register to start a psuedo-random number sequence. First let me say that I haven't worked on a Z-80 in a while, but back when I was using them extensively in hardware work, the refresh register was only 7 bits long. Why 7? Well, that's all they needed for the "new-fangled" (at the time) 16k dynamic RAM chips. Anyway, I have heard that they extended it to 8 bits for 64k RAMs, but I doubt that it's the 16 bits that you imply. You must be very careful with small range random seeds. I remember reading a tech. report at Bell Labs about the different attempts they made at a crypt function. One of the first attempts (the first maybe, I don't remember) used a 16 bit random seed to shake up the crypt function a bit. They used some function to extend this to more precision (32 bits maybe?) because they figured that trying all 32 bit keys would be computationally infeasable. The method of attack seems obvious now, but didn't surface until Dennis Ritchie broke the crypt function by simply trying the 64k possible initial seeds. So even though they used 32 bits to shake up the crypt function, there were only 64k possible ways to do it. Sorry that last paragraph sounds a bit sketchy, but my memory is fading fast, and as I think the paper was marked "proprietary" it was left behind when I left Bell Labs. Anyway, the warning is clear: A 16 bit random seed only produces 64k possible random sequences out of 64k! possible sequences. This is clearly not very random, and should not be used as the basis for any cryptographic system that is supposed to be "secure." -- Steve Tate UUCP: ..!{ihnp4,decvax}!duke!srt CSNET: srt@duke ARPA: srt@cs.duke.edu "There ain't nothin' in the world that a T-Bone Shuffle won't cure."