Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

GnuPG 1.4.23 for DOS (Announce)

posted by bencollver Homepage, 31.05.2024, 00:17

I wanted to spot check the quality of the random numbers generated by NOISE.SYS

I read that:

> Statistically testing a PRNG requires quite a lot (10 or even 100 GB)...

> All tests of RNGs are based on a "null hypothesis", meaning if they
> fail, they show the RNG may be flawed. But if they pass, it does
> not mean it is good.

Keeping these in mind, i decided that ENT was good enough for me.

ENT home page
https://www.fourmilab.ch/random/

ENT DJGPP build
gopher://tilde.pink/9/~bencollver/files/dos386/util/gnupg/ent14.zip

Comparing the resulting Chi-square percentages:

* Linux has 93.44% (almost suspect) and
* NOISE.SYS has 97.88% (suspect).

This seems to indicate a problem in NOISE.SYS.
I'm a hacker not a cryptographer, so i don't know how to fix it.

Linux
=====
$ dd if=/dev/random of=linux.dat bs=1024 count=1024
$ ent <linux.dat
    Entropy = 7.999848 bits per byte.
   
    Optimum compression would reduce the size
    of this 1048576 byte file by 0 percent.
   
    Chi square distribution for 1048576 samples is 221.79, and randomly
    would exceed this value 93.44 percent of the times.
   
    Arithmetic mean value of data bytes is 127.4089 (127.5 = random).
    Monte Carlo value for Pi is 3.143658232 (error 0.07 percent).
    Serial correlation coefficient is 0.001572 (totally uncorrelated = 0.0).


FreeDOS
=======
C:\NOISE>busy.bat
C:\NOISE>sample.exe noise.dat 1048576 -ar

Repeat this hundreds of times until noise.dat reaches the desired size.

C:\ENT>ent <C:\NOISE\NOISE.DAT
    Entropy = 7.999855 bits per byte.
   
    Optimum compression would reduce the size
    of this 1048576 byte file by 0 percent.
   
    Chi square distribution for 1048576 samples is 211.27, and randomly
    would exceed this value 97.88 percent of the times.
   
    Arithmetic mean value of data bytes is 127.5550 (127.5 = random).
    Monte Carlo value for Pi is 3.146267495 (error 0.15 percent).
    Serial correlation coefficient is 0.000964 (totally uncorrelated = 0.0).

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 255 users online (1 registered, 254 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum