Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (9): 2893-2901.DOI: 10.11772/j.issn.1001-9081.2024091345
• Cyber security • Previous Articles
Received:
2024-09-23
Revised:
2024-11-19
Accepted:
2024-11-22
Online:
2024-12-03
Published:
2025-09-10
Contact:
Fajiang YU
About author:
DENG Yilin, born in 2001, M. S. candidate. Her research interests include pseudo random number generation, deep learning, information security.
Supported by:
通讯作者:
余发江
作者简介:
邓伊琳(2001—),女,江西峡江人,硕士研究生,主要研究方向:伪随机数生成、深度学习、信息安全
基金资助:
CLC Number:
Yilin DENG, Fajiang YU. Pseudo random number generator based on LSTM and separable self-attention mechanism[J]. Journal of Computer Applications, 2025, 45(9): 2893-2901.
邓伊琳, 余发江. 基于LSTM和可分离自注意力机制的伪随机数生成器[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 2893-2901.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2024091345
测试项目 | LSA-WGAN-GP | WGAN-GP | GAN | ||||||
---|---|---|---|---|---|---|---|---|---|
通过率/% | 通过率/% | 通过率/% | |||||||
频率 | 0.880 | 98.8 | 0.160 | 98.3 | 0.730 | 98.7 | |||
块内频率 | 0.793 | 99.0 | 0.023 | 99.7 | 0.277 | 99.1 | |||
游程 | 0.264 | 99.2 | 0.902 | 98.7 | 0.679 | 99.0 | |||
块内最长游程 | 0.053 | 98.5 | 0.347 | 98.8 | 0.062 | 98.9 | |||
二元矩阵秩 | 0.454 | 99.2 | 0.143 | 98.5 | 0.589 | 98.9 | |||
离散傅里叶变换 | 0.090 | 99.1 | 0.053 | 98.9 | 0.387 | 98.1 | |||
非重叠模板匹配 | 0.377 | 98.3 | 0.434 | 98.2 | 0.190 | 98.2 | |||
重叠模板匹配 | 0.736 | 98.3 | 0.656 | 98.9 | 0.822 | 98.8 | |||
全局通用 | 0.787 | 99.3 | 0.262 | 98.9 | 0.746 | 99.0 | |||
线性复杂度 | 0.504 | 99.1 | 0.730 | 98.9 | 0.428 | 99.0 | |||
串行 | 0.764 | 98.9 | 0.158 | 99.1 | 0.062 | 99.0 | |||
近似熵 | 0.929 | 99.3 | 0.398 | 98.9 | 0.298 | 99.4 | |||
累积和 | 0.103 | 98.3 | 0.150 | 98.2 | 0.080 | 98.7 | |||
随机偏移 | 0.440 | 97.9 | 0.418 | 98.1 | 0.215 | 98.0 | |||
随机偏移变量 | 0.431 | 98.4 | 0.029 | 98.3 | 0.017 | 98.9 | |||
15项测试通过率 | 15/15 | 15/15 | 15/15 | ||||||
通过/不通过 | 通过 | 通过 | 通过 |
Tab. 1 NIST test results in comparison experiments
测试项目 | LSA-WGAN-GP | WGAN-GP | GAN | ||||||
---|---|---|---|---|---|---|---|---|---|
通过率/% | 通过率/% | 通过率/% | |||||||
频率 | 0.880 | 98.8 | 0.160 | 98.3 | 0.730 | 98.7 | |||
块内频率 | 0.793 | 99.0 | 0.023 | 99.7 | 0.277 | 99.1 | |||
游程 | 0.264 | 99.2 | 0.902 | 98.7 | 0.679 | 99.0 | |||
块内最长游程 | 0.053 | 98.5 | 0.347 | 98.8 | 0.062 | 98.9 | |||
二元矩阵秩 | 0.454 | 99.2 | 0.143 | 98.5 | 0.589 | 98.9 | |||
离散傅里叶变换 | 0.090 | 99.1 | 0.053 | 98.9 | 0.387 | 98.1 | |||
非重叠模板匹配 | 0.377 | 98.3 | 0.434 | 98.2 | 0.190 | 98.2 | |||
重叠模板匹配 | 0.736 | 98.3 | 0.656 | 98.9 | 0.822 | 98.8 | |||
全局通用 | 0.787 | 99.3 | 0.262 | 98.9 | 0.746 | 99.0 | |||
线性复杂度 | 0.504 | 99.1 | 0.730 | 98.9 | 0.428 | 99.0 | |||
串行 | 0.764 | 98.9 | 0.158 | 99.1 | 0.062 | 99.0 | |||
近似熵 | 0.929 | 99.3 | 0.398 | 98.9 | 0.298 | 99.4 | |||
累积和 | 0.103 | 98.3 | 0.150 | 98.2 | 0.080 | 98.7 | |||
随机偏移 | 0.440 | 97.9 | 0.418 | 98.1 | 0.215 | 98.0 | |||
随机偏移变量 | 0.431 | 98.4 | 0.029 | 98.3 | 0.017 | 98.9 | |||
15项测试通过率 | 15/15 | 15/15 | 15/15 | ||||||
通过/不通过 | 通过 | 通过 | 通过 |
模型 | 网络结构 | 参数 | 参数量 | 总参数量 | 生成速度/(Mb·s-1) |
---|---|---|---|---|---|
LSA-WGAN-GP | LSA模块 | (3,3) | 112 | 396 | 14.306 |
Conv1d_1 | (3,4) | 40 | |||
Conv1d_2 | (4,8) | 104 | |||
Conv1d_3 | (8,4) | 100 | |||
Conv1d_4 | (4,3) | 40 | |||
WGAN-GP | Linear_1 | (36,256) | 9 472 | 1 331 748 | 5.423 |
Linear_2 | (256,512) | 131 584 | |||
Linear_3 | (512,1 024) | 525 312 | |||
Linear_4 | (1 024,512) | 524 800 | |||
Linear_5 | (512,256) | 131 328 | |||
Linear_6 | (256,36) | 9 252 | |||
GAN | Linear_1 | (32,100) | 3 300 | 206 556 | 1.330 |
Linear_2 | (100,200) | 20 200 | |||
Linear_3 | (200,400) | 80 400 | |||
Linear_4 | (400,256) | 102 656 |
Tab. 2 Generation speeds and parameters of different models in comparison experiments
模型 | 网络结构 | 参数 | 参数量 | 总参数量 | 生成速度/(Mb·s-1) |
---|---|---|---|---|---|
LSA-WGAN-GP | LSA模块 | (3,3) | 112 | 396 | 14.306 |
Conv1d_1 | (3,4) | 40 | |||
Conv1d_2 | (4,8) | 104 | |||
Conv1d_3 | (8,4) | 100 | |||
Conv1d_4 | (4,3) | 40 | |||
WGAN-GP | Linear_1 | (36,256) | 9 472 | 1 331 748 | 5.423 |
Linear_2 | (256,512) | 131 584 | |||
Linear_3 | (512,1 024) | 525 312 | |||
Linear_4 | (1 024,512) | 524 800 | |||
Linear_5 | (512,256) | 131 328 | |||
Linear_6 | (256,36) | 9 252 | |||
GAN | Linear_1 | (32,100) | 3 300 | 206 556 | 1.330 |
Linear_2 | (100,200) | 20 200 | |||
Linear_3 | (200,400) | 80 400 | |||
Linear_4 | (400,256) | 102 656 |
测试项目 | Base | Base+L | Base+SA | Base+LSA | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
通过率/% | 通过率/% | 通过率/% | 通过率/% | |||||||||
频率 | 0.000 | 88.5 | 0.000 | 97.6 | 0.000 | 95.5 | 0.880 | 98.8 | ||||
块内频率 | 0.000 | 96.4 | 0.055 | 99.3 | 0.000 | 98.4 | 0.793 | 99.0 | ||||
游程 | 0.000 | 91.4 | 0.943 | 99.5 | 0.479 | 98.2 | 0.264 | 99.2 | ||||
块内最长游程 | 0.975 | 99.0 | 0.155 | 98.6 | 0.677 | 98.6 | 0.053 | 98.5 | ||||
二元矩阵秩 | 0.728 | 99.3 | 0.538 | 98.8 | 0.689 | 98.8 | 0.454 | 99.2 | ||||
离散傅里叶变换 | 0.117 | 98.9 | 0.062 | 99.1 | 0.544 | 99.1 | 0.090 | 99.1 | ||||
非重叠模板匹配 | 0.000 | 95.9 | 0.242 | 98.4 | 0.508 | 98.2 | 0.377 | 98.3 | ||||
重叠模板匹配 | 0.000 | 96.6 | 0.658 | 99.0 | 0.483 | 98.9 | 0.736 | 98.3 | ||||
全局通用 | 0.097 | 99.2 | 0.620 | 98.7 | 0.195 | 98.1 | 0.787 | 99.3 | ||||
线性复杂度 | 0.623 | 99.1 | 0.003 | 98.8 | 0.720 | 98.4 | 0.504 | 99.1 | ||||
串行 | 0.561 | 98.5 | 0.108 | 98.8 | 0.526 | 98.8 | 0.764 | 98.9 | ||||
近似熵 | 0.131 | 98.3 | 0.748 | 99.0 | 0.766 | 99.1 | 0.929 | 99.3 | ||||
累积和 | 0.000 | 88.4 | 0.000 | 97.6 | 0.000 | 95.8 | 0.103 | 98.3 | ||||
随机偏移 | 0.936 | 98.2 | 0.271 | 98.3 | 0.032 | 98.4 | 0.440 | 97.9 | ||||
随机偏移变量 | 0.566 | 98.4 | 0.118 | 97.8 | 0.464 | 98.8 | 0.431 | 98.4 | ||||
15项测试通过率 | 9/15 | 13/15 | 12/15 | 15/15 | ||||||||
通过/不通过 | 不通过 | 不通过 | 不通过 | 通过 | ||||||||
总参数量 | 284 | 356 | 324 | 396 | ||||||||
生成速度/(Mb·s-1) | 19.166 | 16.887 | 18.422 | 14.306 |
Tab. 3 Comparison of NIST test results and generation speeds in ablation experiments
测试项目 | Base | Base+L | Base+SA | Base+LSA | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
通过率/% | 通过率/% | 通过率/% | 通过率/% | |||||||||
频率 | 0.000 | 88.5 | 0.000 | 97.6 | 0.000 | 95.5 | 0.880 | 98.8 | ||||
块内频率 | 0.000 | 96.4 | 0.055 | 99.3 | 0.000 | 98.4 | 0.793 | 99.0 | ||||
游程 | 0.000 | 91.4 | 0.943 | 99.5 | 0.479 | 98.2 | 0.264 | 99.2 | ||||
块内最长游程 | 0.975 | 99.0 | 0.155 | 98.6 | 0.677 | 98.6 | 0.053 | 98.5 | ||||
二元矩阵秩 | 0.728 | 99.3 | 0.538 | 98.8 | 0.689 | 98.8 | 0.454 | 99.2 | ||||
离散傅里叶变换 | 0.117 | 98.9 | 0.062 | 99.1 | 0.544 | 99.1 | 0.090 | 99.1 | ||||
非重叠模板匹配 | 0.000 | 95.9 | 0.242 | 98.4 | 0.508 | 98.2 | 0.377 | 98.3 | ||||
重叠模板匹配 | 0.000 | 96.6 | 0.658 | 99.0 | 0.483 | 98.9 | 0.736 | 98.3 | ||||
全局通用 | 0.097 | 99.2 | 0.620 | 98.7 | 0.195 | 98.1 | 0.787 | 99.3 | ||||
线性复杂度 | 0.623 | 99.1 | 0.003 | 98.8 | 0.720 | 98.4 | 0.504 | 99.1 | ||||
串行 | 0.561 | 98.5 | 0.108 | 98.8 | 0.526 | 98.8 | 0.764 | 98.9 | ||||
近似熵 | 0.131 | 98.3 | 0.748 | 99.0 | 0.766 | 99.1 | 0.929 | 99.3 | ||||
累积和 | 0.000 | 88.4 | 0.000 | 97.6 | 0.000 | 95.8 | 0.103 | 98.3 | ||||
随机偏移 | 0.936 | 98.2 | 0.271 | 98.3 | 0.032 | 98.4 | 0.440 | 97.9 | ||||
随机偏移变量 | 0.566 | 98.4 | 0.118 | 97.8 | 0.464 | 98.8 | 0.431 | 98.4 | ||||
15项测试通过率 | 9/15 | 13/15 | 12/15 | 15/15 | ||||||||
通过/不通过 | 不通过 | 不通过 | 不通过 | 通过 | ||||||||
总参数量 | 284 | 356 | 324 | 396 | ||||||||
生成速度/(Mb·s-1) | 19.166 | 16.887 | 18.422 | 14.306 |
[1] | SANGEETHA Y, MAJJI S, SRINAGESH A, et al. Authentication of symmetric cryptosystem using anti-aging controller-based true random number generator [J]. Applied Nanoscience, 2023, 13(2): 1055-1064. |
[2] | ALEXAN W, ALEXAN N, GABR M. Multiple-layer image encryption utilizing fractional-order chen hyperchaotic map and cryptographically secure PRNGs [J]. Fractal and Fractional, 2023, 7(4): No.287. |
[3] | 刁进,谢飞龙,胡汉平. 基于改进混沌系统的伪随机数发生器[J]. 计算机应用, 2021, 41(S2):151-158. |
DIAO J, XIE F L, HU H P. Pseudo random number generator based on improved chaotic system [J]. Journal of Computer Applications, 2021, 41(S2): 151-158. | |
[4] | 陈东昱,陈华,范丽敏,等. 基于深度学习的随机性检验策略研究[J]. 通信学报, 2023, 44(6):23-33. |
CHEN D Y, CHEN H, FAN L M, et al. Research on test strategy for randomness based on deep learning [J]. Journal on Communications, 2023, 44(6): 23-33. | |
[5] | JEONG Y S, OH K J, CHO C K, et al. Pseudo-random number generation using LSTMs [J]. The Journal of Supercomputing, 2020, 76(10): 8324-8342. |
[6] | PASQUALINI L, PARTON M. Pseudo random number generation: a reinforcement learning approach [J]. Procedia Computer Science, 2020, 170: 1122-1127. |
[7] | PASQUALINI L, PARTON M. Pseudo random number generation through reinforcement learning and recurrent neural networks [J]. Algorithms, 2020, 13(11): No.307. |
[8] | GOODFELLOW I, POUGET-ABADIE J, MIRZA M, et al. Generative adversarial networks [J]. Communications of the ACM, 2020, 63(11): 139-144. |
[9] | DE BERNARDI M, KHOUZANI M H R, MALACARIA P. Pseudo-random number generation using generative adversarial networks[C]// Proceedings of the 2018 Joint European Conference on Machine Learning and Knowledge Discovery in Databases Workshops, LNCS 11329. Cham: Springer, 2019: 191-200. |
[10] | OAK R, RAHALKAR C, GUJAR D. Poster: using generative adversarial networks for secure pseudorandom number generation[C]// Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security. New York: ACM, 2019: 2597-2599. |
[11] | KIM H, KWON Y, SIM M, et al. Generative adversarial networks-based pseudo-random number generator for embedded processors [C]// Proceedings of the 2020 Information Security and Cryptology, LNCS 12593. Cham: Springer, 2021: 215-234. |
[12] | MAN Z, LI J, DI X, et al. A novel image encryption algorithm based on least squares generative adversarial network random number generator [J]. Multimedia Tools and Applications, 2021, 80(18): 27445-27469. |
[13] | 李锦青,刘泽飞,满振龙. 基于生成对抗网络的密钥生成方法及其在微光图像加密中的应用[J]. 兵工学报, 2022, 43(2):337-344. |
LI J Q, LIU Z F, MAN Z L. Key generation method based on generative adversarial network and its application in low-light-level image encryption [J]. Acta Armamentarii, 2022, 43(2): 337-344. | |
[14] | OKADA K, ENDO K, YASUOKA K, et al. Learned pseudo-random number generator: WGAN-GP for generating statistically robust random numbers [J]. PLoS ONE, 2023, 18(6): No.e0287025. |
[15] | WU X, HAN Y, ZHU S, et al. Learned pseudo-random number generator based on generative adversarial networks [C]// Proceedings of the 2023 International Conference on Frontiers in Cyber Security, CCIS 1992. Singapore: Springer, 2024: 517-530. |
[16] | GULRAJANI I, AHMED F, ARJOVSKY M, et al. Improved training of Wasserstein GANs [C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2017: 5769-5779. |
[17] | BROPHY E, WANG Z, SHE Q, et al. Generative adversarial networks in time series: a systematic literature review [J]. ACM Computing Surveys, 2023, 55(10): No.199. |
[18] | HOCHREITER S, SCHMIDHUBER J. Long short-term memory[J]. Neural Computation, 1997, 9(8): 1735-1780. |
[19] | MEHTA S, RASTEGARI M. Separable self-attention for mobile vision Transformers [R/OL]. [2024-04-05]. . |
[20] | KONG F, LI J, JIANG B, et al. Integrated generative model for industrial anomaly detection via bidirectional LSTM and attention mechanism [J]. IEEE Transactions on Industrial Informatics, 2023, 19(1): 541-550. |
[21] | LU X Q, TIAN J, LIAO Q, et al. CNN-LSTM based incremental attention mechanism enabled phase-space reconstruction for chaotic time series prediction [J]. Journal of Electronic Science and Technology, 2024, 22(2): No.100256. |
[22] | KOU Y, CHEN Z, GU Q. Implicit bias of gradient descent for two-layer ReLU and Leaky ReLU networks on nearly-orthogonal data[C]// Proceedings of the 37th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2023: 30167-30221. |
[23] | HUANG L, QIN J, ZHOU Y, et al. Normalization techniques in training DNNs: methodology, analysis and application [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023, 45(8): 10173-10196. |
[24] | BARKER E, KELSEY J. Recommendation for random number generation using deterministic random bit generators: NIST SP 800-90RevA.1 [R/OL]. [2024-07-24]. . |
[25] | RUKHIN A, SOTO J, NECHVATAL J, et al. A statistical test suite for random and pseudorandom number generators for cryptographic applications: NIST SP 800-22 Rev 1a [R/OL]. [2024-07-28].. |
[1] | Jin ZHOU, Yuzhi LI, Xu ZHANG, Shuo GAO, Li ZHANG, Jiachuan SHENG. Modulation recognition network for complex electromagnetic environments [J]. Journal of Computer Applications, 2025, 45(8): 2672-2682. |
[2] | Ying HUANG, Shengmei GAO, Guang CHEN, Su LIU. Low-light image enhancement network combining signal-to-noise ratio guided dual-branch structure and histogram equalization [J]. Journal of Computer Applications, 2025, 45(6): 1971-1979. |
[3] | Hui LI, Bingzhi JIA, Chenxi WANG, Ziyu DONG, Jilong LI, Zhaoman ZHONG, Yanyan CHEN. Generative adversarial network underwater image enhancement model based on Swin Transformer [J]. Journal of Computer Applications, 2025, 45(5): 1439-1446. |
[4] | Lihu PAN, Shouxin PENG, Rui ZHANG, Zhiyang XUE, Xuzhen MAO. Video anomaly detection for moving foreground regions [J]. Journal of Computer Applications, 2025, 45(4): 1300-1309. |
[5] | Hong SHANGGUAN, Huiying REN, Xiong ZHANG, Xinglong HAN, Zhiguo GUI, Yanling WANG. Low-dose CT denoising model based on dual encoder-decoder generative adversarial network [J]. Journal of Computer Applications, 2025, 45(2): 624-632. |
[6] | Li LIU, Haijin HOU, Anhong WANG, Tao ZHANG. Generative data hiding algorithm based on multi-scale attention [J]. Journal of Computer Applications, 2024, 44(7): 2102-2109. |
[7] | Haoran WANG, Dan YU, Yuli YANG, Yao MA, Yongle CHEN. Domain transfer intrusion detection method for unknown attacks on industrial control systems [J]. Journal of Computer Applications, 2024, 44(4): 1158-1165. |
[8] | Sunjie YU, Hui ZENG, Shiyu XIONG, Hongzhou SHI. Incentive mechanism for federated learning based on generative adversarial network [J]. Journal of Computer Applications, 2024, 44(2): 344-352. |
[9] | Xiaoyu HUA, Dongfen LI, You FU, Kejun BI, Shi YING, Ruijin WANG. Industrial chain risk assessment and early warning model combining hierarchical graph neural network and long short-term memory [J]. Journal of Computer Applications, 2024, 44(10): 3223-3231. |
[10] | Li’an CHEN, Yi GUO. Text sentiment analysis model based on individual bias information [J]. Journal of Computer Applications, 2024, 44(1): 145-151. |
[11] | Zhiping ZHU, Yan YANG, Jie WANG. Scene graph-aware cross-modal image captioning model [J]. Journal of Computer Applications, 2024, 44(1): 58-64. |
[12] | Hui ZHOU, Yuling CHEN, Xuewei WANG, Yangwen ZHANG, Jianjiang HE. Deep shadow defense scheme of federated learning based on generative adversarial network [J]. Journal of Computer Applications, 2024, 44(1): 223-232. |
[13] | Hanxiao SHI, Leichun WANG. Short-term power load forecasting by graph convolutional network combining LSTM and self-attention mechanism [J]. Journal of Computer Applications, 2024, 44(1): 311-317. |
[14] | Anyang LIU, Huaici ZHAO, Wenlong CAI, Zechao XU, Ruideng XIE. Adaptive image deblurring generative adversarial network algorithm based on active discrimination mechanism [J]. Journal of Computer Applications, 2023, 43(7): 2288-2294. |
[15] | Shaoquan CHEN, Jianping CAI, Lan SUN. Differential privacy generative adversarial network algorithm with dynamic gradient threshold clipping [J]. Journal of Computer Applications, 2023, 43(7): 2065-2072. |
Viewed | ||||||
Full text |
|
|||||
Abstract |
|
|||||