Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WyRand64 (bit reversed) fails PractRand at 32TB #135

Closed
vigna opened this issue Apr 9, 2023 · 3 comments
Closed

WyRand64 (bit reversed) fails PractRand at 32TB #135

vigna opened this issue Apr 9, 2023 · 3 comments

Comments

@vigna
Copy link

vigna commented Apr 9, 2023

rng=WyRand64-rev, seed=0x7cb0345e
length= 32 terabytes (2^45 bytes), time= 2032274 seconds
  Test Name                         Raw       Processed     Evaluation
  [Low1/8]BCFN(0+0,13-0,T)          R= +12.9  p =  1.9e-6   mildly suspicious
  [Low8/32]Gap-16:B                 R=  +5.8  p =  6.6e-5   unusual
  [Low8/64]BCFN(0+9,13-0,T)         R= +12.3  p =  4.1e-6   unusual
  [Low8/64]BCFN(0+10,13-0,T)        R= +20.6  p =  1.5e-10  very suspicious
  [Low8/64]BCFN(0+11,13-0,T)        R= +14.7  p =  2.2e-7   mildly suspicious
  [Low8/64]Gap-16:A                 R= +10.7  p =  2.1e-7   very suspicious
  [Low8/64]Gap-16:B                 R= +16.2  p =  8.3e-14    FAIL
  ...and 2410 test result(s) without anomalies

This test examines the bits produced by Wyrand64 after reversing them. PractRand examines in more detail the lower bits, so testing after a bit reversal is essential to discover weaknesses in the upper bits. The options used were -tf 2 -te 1 -tlmaxonly -tlmax 128TB

The normal (without bit inversion) test starts to give problem at 32TB but still does not fail:

rng=WyRand64, seed=0xdc6a32fb
length= 32 terabytes (2^45 bytes), time= 2032770 seconds
  Test Name                         Raw       Processed     Evaluation
  [Low4/64]Gap-16:B                 R=  +5.7  p =  8.2e-5   unusual
  [Low8/64]DC6-9x1Bytes-1           R=  -6.8  p =1-6.7e-4   unusual
  ...and 2415 test result(s) without anomalies

I expect to to fail at 64TB. Will report later the output.

@wangyi-fudan
Copy link
Owner

do{
torture;
}while(!fail)
return fail;

Yes, the hero failed, but he is still my hero.

@vigna
Copy link
Author

vigna commented Apr 10, 2023

Frankly, if you think that running one of the most popular test suites for PRNG is "torture" you should revise your research methods. Running PractRand is one of the first thing I do with any generator.

@wangyi-fudan
Copy link
Owner

Thanks man! I updated the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants