Pseudo-random number prediction method based on deep learning technology
Through a deep learning-based method, using FCNN and CNN-LSTM hybrid models to predict pseudo-random number sequences, the problem of low security of existing PRNGs is solved, the prediction accuracy and efficiency are improved, and the potential weaknesses of PRNG are revealed to make it safe. Sexual improvement provides a basis.
Patent Information
- Application Number
- CN202411260956.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-10
AI Technical Summary
Due to the determinism of the algorithm, the existing pseudo-random number generator (PRNG) cannot provide true randomness and is vulnerable to prediction attacks, resulting in security threats. The existing research mainly focuses on the application of a single deep learning model, but has not been able to Make full use of the advantages of multiple models for comprehensive prediction.
Using a deep learning-based method, pseudo-random number sequences are generated through Xorshift algorithm and linear congruent generator, a hybrid model of fully connected neural network (FCNN) and convolutional neural network-long short-term memory network (CNN-LSTM) is constructed to make pseudo-random number sequences Random sequences of numbers are trained and predicted, revealing potential patterns and structures, evaluating their random properties and providing improved strategies.
It significantly improves the accuracy and efficiency of pseudo-random number prediction, reveals the potential weaknesses of PRNG, provides a basis for its security improvement, enhances the understanding of PRNG output behavior, and improves the solidity of information security technology.
Smart Images

Figure CN119292560A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the fields of computer science and information security technology, and in particular to a pseudo-random number prediction method based on deep learning. Background Art
[0002] In the fields of computer science and information security, the generation and application of random numbers play a vital role. Random numbers are widely used in key generation, random masks, initialization vectors, and one-time pads in encryption systems, and their quality is directly related to the security and reliability of the system. However, existing pseudo-random number generators (PRNGs) are limited by the determinism of the algorithm and cannot provide true randomness. They are vulnerable to prediction attacks, which pose a potential threat to security. For example, in cryptography and secure communications, if an attacker can predict the output of a random number generator, the encryption algorithm may be cracked, resulting in the leakage of sensitive information. Therefore, how to increase the difficulty of predicting pseudo-random numbers and enhance their security is a technical problem that needs to be solved urgently. The design and application of pseudo-random number generators are an important part of information security technology. The design of PRNGs is usually based on mathematical algorithms, such as the linear congruential method (LCG) and the Xorshift algorithm, which can quickly generate seemingly random number sequences. However, the random number sequences generated by these algorithms have certain regularities and can be predicted by specific analysis methods.
[0003] With the development of machine learning technology, especially the powerful ability of deep learning in pattern recognition and sequence prediction, new ideas are provided for the security assessment and improvement of PRNG. Deep learning technology has significant advantages in nonlinear data analysis and can identify and learn complex relationships and patterns in input data. Applying deep learning to pseudo-random number prediction can help reveal the hidden rules in the PRNG generation process, identify potential patterns or deviations, and thus make predictions. In addition, by evaluating the accuracy of deep learning model predictions, the randomness and security of PRNG can be evaluated in turn, providing guidance for the design and improvement of PRNG. Although existing studies have explored the application of machine learning in PRNG security assessment, they mainly focus on theoretical analysis and dependency testing, and lack systematic research on deep learning technology in predicting pseudo-random numbers. In addition, existing studies mostly focus on a single deep learning model, such as recurrent neural network (RNN) or long short-term memory network (LSTM), and fail to fully utilize the advantages of multiple deep learning models for comprehensive prediction. Therefore, developing a pseudo-random number prediction method based on deep learning that can effectively predict the random number sequence generated by PRNG, evaluate its random properties, and reveal potential regularities is of great significance for improving the security of PRNG. At the same time, exploring and building hybrid deep learning models, combining the advantages of different models to improve the accuracy and efficiency of predictions, is an important research direction in the current field of information security technology. This approach can not only enhance the understanding of PRNG output behavior, but also promote the application of deep learning technology in the field of sequence data analysis and prediction, providing more solid technical support for information security. Summary of the invention
[0004] In view of the above problems existing in the prior art, an embodiment of the present invention provides a pseudo-random number prediction method and device based on deep learning.
[0005] In a first aspect, an embodiment of the present invention provides a pseudo-random number prediction method based on deep learning, comprising: step 1, generating a large number of pseudo-random number sequences through a Xorshift algorithm and a linear congruential generator (LCG); step 2, constructing a deep learning model architecture, including but not limited to a fully connected neural network (FCNN) and an innovative convolutional neural network-long short-term memory network (CNN-LSTM) hybrid model; step 3, using the collected pseudo-random number sequences to train the constructed deep learning model, continuously adjusting the model structure and parameters to obtain the best pseudo-random number prediction performance; step 4, predicting the trained deep learning model on an independent unknown pseudo-random number sequence data set; step 5, identifying the patterns and structures that may exist in the random numbers generated by the algorithm through the deep learning model, and then evaluating its random properties, revealing the potential weaknesses of the pseudo-random number generator (PRNG), and providing improvement strategies to enhance the security of the PRNG.
[0006] Based on the content of the above method embodiment, the pseudo-random number prediction method based on deep learning provided in the embodiment of the present invention, step 2 specifically includes: a fully connected neural network (FCNN) is used to predict the pseudo-random number sequence generated by the Xorshift algorithm, and a CNN-LSTM hybrid model is used to predict the pseudo-random number sequence generated by the linear congruential generator (LCG) under different period parameters.
[0007] Based on the content of the above method embodiment, the pseudo-random number prediction method based on deep learning provided in the embodiment of the present invention, step 3 specifically includes: in the CNN-LSTM hybrid model, the convolutional neural network (CNN) is responsible for extracting the local features of the pseudo-random number sequence, and the long short-term memory network (LSTM) processes the temporal dependency of the sequence data. The combination of the two significantly improves the accuracy and efficiency of long-period sequence prediction.
[0008] Based on the content of the above method embodiment, the pseudo-random number prediction method based on deep learning provided in the embodiment of the present invention, step 4 specifically includes: using an independent unknown pseudo-random number sequence data set to evaluate the prediction ability of the trained model on new data, and then analyzing the prediction results of the model on the test set, and comprehensively evaluating the prediction performance of the model on the independent unknown pseudo-random number sequence data set.
[0009] Based on the contents of the above method embodiments, the pseudo-random number prediction method based on deep learning provided in the embodiments of the present invention, step 5 specifically includes: revealing the potential weaknesses of the pseudo-random number generator (PRNG) based on the prediction ability of the model on an independent unknown pseudo-random number sequence data set, providing a basis for further improving the security of the pseudo-random number generation algorithm.
[0010] In the second aspect, an embodiment of the present invention provides a pseudo-random number prediction device based on deep learning, including: a first main module, used to implement step 1, for collecting pseudo-random number sequence data generated by the Xorshift algorithm and the linear congruential generator (LCG); a second main module, used to implement step 2, for designing and constructing a fully connected neural network (FCNN) and a convolutional neural network-long short-term memory network (CNN-LSTM) hybrid model; a third main module, used to implement step 3, for training the model and optimizing model parameters to improve the prediction accuracy of the model; a fourth main module, used to implement step 5, for evaluating the prediction performance of the trained model for an unknown random number sequence.
[0011] In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the pseudo-random number prediction and discovery method based on deep learning provided by any one of the various implementation methods of the first aspect.
[0012] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute a pseudo-random number prediction method based on deep learning provided by any one of the various implementation methods of the first aspect.
[0013] The pseudo-random number prediction method and device based on deep learning provided by the embodiments of the present invention not only focus on the intrinsic pattern of the pseudo-random number sequence, but also incorporate the unique architecture of the deep neural network into the design of the prediction model, thereby achieving enhanced prediction accuracy and improved efficiency; they also focus on two common pseudo-random number generation algorithms, the Xorshift algorithm and the linear congruential generator (LCG), and construct special prediction models for them respectively: for the Xorshift algorithm, a model based on a fully connected neural network (FCNN) is designed to predict the pseudo-random number sequence generated by it; for the linear congruential generator (LCG), a CNN-LSTM hybrid model is developed, which combines the local feature extraction capability of the convolutional neural network (CNN) and the advantages of the long short-term memory network (LSTM) in processing time series data, effectively improving the ability to predict long-period sequences. Figure 1 A flowchart of a pseudo-random number prediction method based on deep learning provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a pseudo-random number prediction device based on deep learning provided by an embodiment of the present invention; Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention; Figure 4 A schematic diagram of a process for generating a pseudo-random number sequence data set provided by an embodiment of the present invention; Figure 5 A schematic diagram of the FCNN model structure provided by an embodiment of the present invention; Figure 6 A schematic diagram of the CNN-LSTM model structure provided in an embodiment of the present invention.
Claims
1. A pseudo-random number prediction method based on deep learning, characterized in that: include: Step 1: Generate a large number of pseudo-random number sequences through the Xorshift algorithm and the linear congruential generator (LCG); Step 2: Construct a deep learning model architecture, including but not limited to a fully connected neural network (FCNN) and an innovative convolutional neural network-long short-term memory network (CNN-LSTM) hybrid model; Step 3: Use the collected pseudo-random number sequences to train the constructed deep learning model, and continuously adjust the model structure and parameters to obtain the best pseudo-random number prediction performance; Step 4: Predict the trained deep learning model on an independent unknown pseudo-random number sequence data set; Step 5: Use the deep learning model to identify the possible patterns and structures in the random numbers generated by the algorithm, and then evaluate their random properties, reveal the potential weaknesses of the pseudo-random number generator (PRNG), and provide improvement strategies to enhance the security of the PRNG.
2. The pseudo-random number prediction method based on deep learning according to claim 1, characterized in that: Step 2 specifically includes: a fully connected neural network (FCNN) is used to predict the pseudo-random number sequence generated by the Xorshift algorithm, and a CNN-LSTM hybrid model is used to predict the pseudo-random number sequence generated by a linear congruential generator (LCG) under different period parameters.
3. The pseudo-random number prediction method based on deep learning according to claim 2, characterized in that: Step 3 specifically includes: In the CNN-LSTM hybrid model, the convolutional neural network (CNN) is responsible for extracting the local features of the pseudo-random number sequence, while the long short-term memory network (LSTM) processes the temporal dependency of the sequence data. The combination of the two significantly improves the accuracy and efficiency of long-period sequence prediction.
4. The pseudo-random number prediction method based on deep learning according to claim 3, characterized in that: Step 4 specifically includes: using an independent unknown pseudo-random number sequence data set to evaluate the predictive ability of the trained model on new data, and then analyzing the prediction results of the model on the test set to comprehensively evaluate the predictive performance of the model on the independent unknown pseudo-random number sequence data set.
5. The pseudo-random number prediction method based on deep learning according to claim 4, characterized in that: Step 5 specifically includes: based on the prediction ability of the model on an independent unknown pseudo-random number sequence data set, revealing the potential weaknesses of the pseudo-random number generator (PRNG), providing a basis for further improving the security of the pseudo-random number generation algorithm.
6. A pseudo-random number prediction device based on deep learning, characterized in that: include: The first main module is used to implement step 1, and is used to collect pseudo-random number sequence data generated by the Xorshift algorithm and the linear congruential generator (LCG); The second main module is used to implement step 2, which is used to design and build a fully connected neural network (FCNN) and convolutional neural network-long short-term memory network (CNN-LSTM) hybrid model; the third main module is used to implement step 3, which is used to train the model and optimize the model parameters to improve the prediction accuracy of the model; the fourth main module is used to implement step 5, which is used to evaluate the prediction performance of the trained model for unknown random number sequences.
7. An electronic device, characterized in that: include: At least one processor, at least one memory and a communication interface; wherein, The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method of any one of claims 1 to 5.