Computer Science ›› 2025, Vol. 52 ›› Issue (5): 322-329.doi: 10.11896/jsjkx.240700006

• Information Security • Previous Articles     Next Articles

Error Analysis and Parameter Recommendations for Randomness Test Under Large Sample Conditions

SUN Yueyue1, FAN Limin2   

  1. 1 School of Mathematics and Statistics,Beijing Institute of Technology,Beijing 100081,China
    2 Trusted Computing and Information Assurance Laboratory,Institute of Software,Chinese Academy of Sciences,Beijing 100190,China
  • Received:2024-07-01 Revised:2024-10-01 Online:2025-05-15 Published:2025-05-12
  • About author:SUN Yueyue,born in 1999,postgra-duate.Her main research interests include statistical test of randomness and so on.
    FAN Limin,born in 1978,Ph.D,senior engineer.Her main research interests include side channel analysis and protection,and password detection.
  • Supported by:
    National Cryptography Science Foundation of China(2025NCSF02057).

Abstract: In the field of information security,randomness tests play a crucial role in ensuring the security of cryptographic systems.The stability and reliability of these tests directly impact the overall security of cryptographic systems,making error issues during the testing process a focal point for both academia and industry.Particularly when handling large-scale samples,the accumulation of errors can more readily lead to reliability issues in randomness testing.Consequently,studying methods to enhance the accuracy and reliability of randomness testing is of significant importance.The GM/T 0005-2021 standard outlines 9 tests with variable parameters designed for randomness testing of large binary data samples.This study categorizes these tests according to their characteristics and conducts a quantitative error analysis.Specifically,when the bit length of the binary sequence under test is 1×108,the parameters recommended by the GM/T 0005-2021 standard are generally reasonable.For the Maurer universal statistical test,a subsequence length of 6 results in upper bound p-value error of 0.001 492 8,demonstrating higher accuracy compared to the parameters suggested in the GM/T 0005-2021 standard.Similarly,for the linear complexity test,using smaller subsequence lengths results in smaller errors. With the increase in sample length,this study extends the analysis to parameter selection for a sample length of 1×109.It systematically examines the errors associated with different sample lengths and parameter configurations,providing refined parameter recommendations for randomness testing when the sample length reaches 1×109.

Key words: Randomness test, Large sample, Error analysis, Test parameters, GM/T 0005-2021

CLC Number: 

  • TN918.1
[1]BASSHAM L E,RUKHIN A L,SOTO J,et al.A Statistical Test Suite for Randomand Pseudorandom Number Generators for Cryptographic Applications:Technical Report [EB/OL].https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=906762.
[2]ILLMANN W,SCHINDLER W.A Proposal for:Functionality Classes for Random Number Generators[EB/OL].https://www.bsi.bund.de/EN/Home/home_node.htm.
[3]MARSAGLIA G.The Marsaglia Random Number Cdrom Including the Diehard Battery of Tests of Randomness[EB/OL].https://ani.stat.fsu.edu/diehard/.
[4]L′ECUYER P,SIMARD R.Testu01:Ac Library for Empirical Testing of Random Number Generators[J].ACM Transactions on Mathematical Software(TOMS),2007,33(4):1-40.
[5]随机性检测规范:GM/T 0005-2021 [S].北京:国家密码管理局,2021.
[6]MAO C,SONG Y,CHEN J.A Lightweight Adaptive Random Testing Method for Deep Learning Systems[J].Software:Practice and Experience,2023,53(11):2271-2295.
[7]DEMIRHAN H,BITIRIM N.Statistical Testing of Crypto-graphic Randomness[J].İstatistikçiler Dergisi:İstatistik ve Aktüerya,2016,9(1):1-11.
[8]ZHU S,MA Y,LIN J,et al.More Powerful and Reliable Se-cond-Level Statistical Randomness Tests for NIST SP 800-22[C]//Advances in Cryptology-ASIACRYPT 2016:22nd International Conference on the Theory and Application of Cryptology and Information Security,Hanoi,Vietnam,December 4-8,2016,Proceedings,Part I 22.Berlin Heidelberg:Springer,2016:307-329.
[9]CHEN D,CHEN H,FAN L,et al.Error Analysis of NIST SP 800-22 Test Suite[J].IEEE Transactions on Information Forensics and Security,2023,18:3745-3759.
[10]PARESCHI F,ROVATTI R,SETTI G.OnStatistical Tests for Randomness Included in the NIST SP 800-22 Test Suite and Based on the Binomial Distribution[J].IEEE Transactions on Information Forensics and Security,2012,7(2):491-505.
[11]CHEN L H Y,GOLDSTEIN L,SHAO Q M.Normal Approximation by Stein's Method[M].Berlin Heidelberg:Springer,2010.
[12]LUENGO E A,OLIVARES B A,VILLALBA L J G,et al.Further Analysis of the Statistical Independence of the NIST SP 800-22 Randomness Tests[J].Applied Mathematics and Computation,2023,459:128222.
[13]RUKHIN A L.Approximate Entropyfor Testing Randomness[J].Journal of Applied Probability,2000,37(1):88-100.
[14]IWASAKI A,UMENO K.Randomness Test to Solve Discrete Fourier Transform Test Problems[J].IEICE Transactions on Fundamentals of Electronics,Communications and Computer Sciences,2018,101(8):1204-1214.
[15]IWASAKI A.Deriving the Variance of the Discrete FourierTransform Test Using Parseval's Theorem[J].IEEE Transactions on Information Theory,2019,66(2):1164-1170.
[16]HARAMOTO H.Study on Upper Limit of Sample Size for a Two-Level Test in NIST SP800-22[J].Japan Journal of Industrial and Applied Mathematics,2021,38(1):193-209.
[17]AKCENGIZ Z.A New Lightweight Statistical Randomness Test Suite and Its Evaluationby Comparison with Other Test Suites[D].Ankara:Middle East Technical University,2021.
[18]AKCENGIZ Z,ASLAN M,DOǦANAKSOY A,et al.LS-14Test Suite for Long Sequences[J].Hacettepe Journal of Mathematics and Statistics,2024,53(1):230-250.
[19]CHEN M,CHEN H,FAN L,et al.A New Discrete FourierTransform Randomness Test[J].Science China Information Sciences,2019,62:1-16.
[20]HIKIMA Y,IWASAKI A,UMENO K.The Reference Distributions of Maurer's Universal Statistical Test and Its Improved Tests[J].IEEE Transactions on Information Theory,2021,68(4):2674-2683.
[21]MENG C,CAI M,YANG Y,et al.Generation of True Quantum Random Numbers with on-Demand Probability Distributions via Single-Photon Quantum Walks[J].Optics Express,2024,32(11):20207-20217.
[22]IL′YA S T.Refinement of the Upper Bounds of the Constants in Lyapunov's Theorem[J].Russian Mathematical Surveys,2010,65(3):586.
[23]PEARSON K X.On the Criterion That a Given System of Deviations from the Probable in the Case of a Correlated System of Variables is Such That it Can Be Reasonably Supposed to Have Arisen from Random Sampling[J].The London,Edinburgh,and Dublin Philosophical Magazine and Journal of Science,1900,50(302):157-175.
[24]CORON J S,NACCACHE D.An Accurate Evaluation of Mau-rer's Universal Test[C]//International Workshop on Selected Areas in Cryptography.Berlin,Heidelberg:Springer Berlin Heidelberg,1998:57-71.
[1] LIAO Qiucheng, ZHOU Yang, LIN Xinhua. Metrics and Tools for Evaluating the Deviation in Parallel Timing [J]. Computer Science, 2025, 52(5): 41-49.
[2] GUO Cong-rui, WANG Jun and FENG Yi-ming. Research on Method of Credibility Evaluation of System Simulation [J]. Computer Science, 2020, 47(6A): 567-571.
[3] CHEN Yan-jun and ZHANG Xue-dian. Research on Error Analysis of Angle Measurement Based on Matlab Image Processing [J]. Computer Science, 2015, 42(Z6): 203-204.
[4] LIU Jian, TANG Min, ZENG Xia and ZENG Zhen-bing. Validated Evaluation and Error Analysis of Elementary Functions [J]. Computer Science, 2015, 42(4): 25-30.
[5] . Post-processing Method in Truly Random Number Generator [J]. Computer Science, 2012, 39(Z6): 9-11.
[6] . Research Advances and Prospect of DNA Computing by Self-assembly [J]. Computer Science, 2012, 39(5): 14-18.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!