2
$\begingroup$

I have a RNG producing sequences of binary numbers, ad I would like to run Dieharder test using them as an ascii txt input file. However I haven't been able to do it properly. Should I use a header like:

type: b

count: 2500000

numbit: 1

1

0

0 ...

Thanks.

$\endgroup$
1

1 Answer 1

3
$\begingroup$

You can generate an example of the ascii input by running:

dieharder -o -f example.input -t 10

It will basically be something like:

#==================================================================
# generator mt19937  seed = 3865342443
#==================================================================
type: d 
count: 10
numbit: 32

However note, that dieharder will expect that each line of ascii file is either integers in the range 0 to 2^31-1 or decimal with at least ten significant digits (details are here). So maybe in your case, it's easier to produce raw binary files.

Btw, you'll need about 20GB or even more (for raw file) for proper testing. Otherwise, it's hard to say if test failed due to PRNG or too many rewounds (last tests require lots of data and even with 20GB in the standard mode, dieharder will rewound file multiple times).

$\endgroup$
3
  • $\begingroup$ Do you have any official document saying "you'll need about 20GB or even more (for raw file) for proper testing"? Thanks $\endgroup$
    – Ender
    Commented Jul 24 at 4:49
  • $\begingroup$ @Ender Not really. You can estimate the total required data based on the number of reviews DieHarder does. If it helps, this paper estimates the sufficient data amount to be 228 GB (researchgate.net/publication/…), and this answer's estimations are 232 GB (crypto.stackexchange.com/questions/90076/…) $\endgroup$
    – pintor
    Commented Jul 29 at 8:01
  • $\begingroup$ As for 20 GB, it's just something I used as "not too small to cause too many rewounds and not too big to handle". $\endgroup$
    – pintor
    Commented Jul 29 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.