A better entropy estimation method for random.c/noise.sys?

Deranged Mutant WlkngOwl at UNiX.asb.com
Sun Apr 21 23:06:01 PDT 1996



I've been hacking with the hashing method used in noise.sys and 
decided to throw it away, since it did more to overestimate the 
entropy.

Until I find something better an xor-checksum of the ast N samples 
seems to do fine. Alternating samples generate no entropy and samples 
with periods <= N seem to generate less than 1 bit per sample.

The method (in pseudo-code) is as follows:

  delta = abs( LastSample - sample )
  LastSample = sample

  hash ^= delta  /* until I can think of a better hashing algorithm */
  swap delta, lastNtable[ indexNtable ]
  indexNtable = (indexNtable+1) mod N
  hash ^= delta

  t = counter /* counts the number of samples so far */
  counter++
  swap t, lastseen[ hash & (TABLESIZE-1) ]
  diff = lastseen[ hash & (TABLESIZE-1) ] - t

  if diff<=N, assume no entropy (or fractional entropy?)
  otherwise return log2(diff)


Comments?
Rob. 

---
Send a blank message with the subject "send pgp-key"
to <WlkngOwl at unix.asb.com> for a copy of my PGP key.






More information about the cypherpunks-legacy mailing list