I have learned that there are two main test suitcase for randomness (reference):

  1. AIS 31 - German Federal Office for Information Security (BSI)
  2. SP 800-90B - U.S. National Institute for Standards and Technology (NIST)

I was able to run NIST tests on my data. I was wondering if there is any software (and documentation) available for AIS31. I was only able to find general information about it.


3 Answers 3


See the page below


I looked at it with the Google translator.

There are quite a few useful links there. If you want full blown code for tests, you'd probably need to write your own.

Related question:


  • $\begingroup$ so there is no software, right? I looked at the website (it has English format too), I found some guidelines, not software. I am looking for a AIS31 setup similar to what NIST has. $\endgroup$
    – Shannon
    Commented Jul 16, 2019 at 21:30
  • 2
    $\begingroup$ yes, you need to write the code yourself, as far as I know $\endgroup$
    – kodlu
    Commented Jul 17, 2019 at 6:33

Yes, there is a java application you can download from the BSI website: https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Zertifizierung/Interpretationen/AIS_31_testsuit_zip.zip

  • $\begingroup$ I'm excited, but you have to supply more info please. I can fire it up, but can't perform any tests. A technical translation of the instructions would help. And the error messages. And where's the source for Tester.class? $\endgroup$
    – Paul Uszak
    Commented Apr 5, 2021 at 21:25
  • $\begingroup$ I can't comment on your answer so I put it here. You need to fill in "Breite in Bit". Unfortunately I'm not sure what the effect of that setting is, I only use '1' here. $\endgroup$ Commented Apr 6, 2021 at 15:16

An important point of AIS31 is §2.4.5, Additional Statistical Tests. They subsume all other randomness tests, specifically mentioning SP 800-90B. So you would have to implement the theoretical tests AIS31 mentions yourself. Although §2.4.5 implies that you can simply run with other standardised tests. For that reason I wouldn't bother with an implementation. But if you do bother, you can test your code against /dev/urandom output, or binary expansions of the irrational numbers like $\pi, e, \phi, \sqrt{2}$ etc.

It's worth mentioning that these are not really the two main test suites. Diehard and Dieharder are also very common, depending on the size of the sample you can generate. With hindsight, you find that AIS31 is very uncommon in the wild for not having been implemented in a standardised code base.

There appears to be an implementation:-


But I don't know how to use it on Java 11 :-(

The direct link to an English version of the PDF document with the name "A proposal for: Functionality classes for random number generators, Version 2.0, 18 September 2011" can be found here.


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.