Generating borderline test samples for randomness testers via intelligent optimization and evolutionary algorithms
Ensuring information security heavily relies on high-quality random sequences for encryption keys. Physical entropy sources, despite their use in generating true random sequences, are susceptible to environmental disturbances, necessitating real-time randomness testing to maintain high entropy. However, existing methods for generating test data for real-time randomness testers face significant challenges, including producing sequences that fail to meet specific randomness criteria, constructing borderline sequences with slight non-randomness, and addressing the difficulty of simultaneously violating multiple randomness criteria. This paper introduces a dynamic test data generation framework designed to address these challenges. The framework leverages evolutionary algorithm (EA) to transform the generation of borderline sequences into a multi-constrained optimization problem, where a large language model (LLM) acts as a dynamic parameter adjuster. By analyzing evolutionary trends in population statistics and interacting with evolutionary dynamics through a game-theoretic mechanism, the LLM adaptively adjusts scaling factors and weight coefficients, mitigating the curse of dimensionality in multi-objective optimization and enabling real-time parameter tuning. The experimental results also highlight the high quality of the generated sequences: our approach can generate borderline test data that slightly fail to satisfy the target randomness criteria, yet exhibit statistical properties very similar to those of high-entropy sources under standard test suites. These borderline sequences are fault-detectable and provide challenging, realistic test inputs for classical statistical-test-based real-time randomness testers.
Authors
- Bin Zhang (ORCID: https://orcid.org/0000-0002-4879-0211)
- Zheng Wang (ORCID: https://orcid.org/0000-0003-4873-505X)
- Chenglong Li
- Peng Gao
Institutions
- PLA Information Engineering University (CN)
- King Center (US)
- Nanjing University of Posts and Telecommunications (CN)
- Tsinghua University (CN)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-02-04
- DOI
- https://doi.org/10.1038/s41598-026-38020-w
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China