CryptRndTest: An R Package for Testing the Cryptographic Randomness

Creative Commons License

DEMİRHAN H., Bitirim N.

R JOURNAL, vol.8, no.1, pp.233-247, 2016 (SCI-Expanded) identifier identifier

  • Publication Type: Article / Article
  • Volume: 8 Issue: 1
  • Publication Date: 2016
  • Doi Number: 10.32614/rj-2016-016
  • Journal Name: R JOURNAL
  • Journal Indexes: Science Citation Index Expanded (SCI-EXPANDED), Scopus
  • Page Numbers: pp.233-247
  • Hacettepe University Affiliated: Yes


In this article, we introduce the R package CryptRndTest that performs eight statistical randomness tests on cryptographic random number sequences. The purpose of the package is to provide software implementing recently proposed cryptographic randomness tests utilizing goodnessof- fit tests superior to the usual chi-square test in terms of statistical performance. Most of the tests included in package CryptRndTest are not available in other software packages such as the R package RDieHarder or the C library TestU01. Chi-square, Anderson-Darling, Kolmogorov-Smirnov, and Jarque-Bera goodness-of-fit procedures are provided along with cryptographic randomness tests. CryptRndTest utilizes multiple precision floating numbers for sequences longer than 64-bit based on the package Rmpfr. By this way, included tests are applied precisely for higher bit-lengths. In addition CryptRndTest provides a user friendly interface to these cryptographic randomness tests. As an illustrative application, CryptRndTest is used to test available random number generators in R.