A RSA digital signature forgery method based on convolutional neural network
Through a triple model based on convolutional neural network, iterative training is used to generate pseudo-private keys and forge signatures and plaintexts, the problem that the existing RSA digital signature forgery method cannot effectively bypass large integer decomposition is solved, and efficient RSA digital signature forgery is achieved.
Patent Information
- Application Number
- CN202211150105.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-09-21
AI Technical Summary
The existing RSA digital signature forgery methods cannot effectively bypass the difficulty of large integer decomposition, and the deciphering ability of RSA encryption algorithms is limited.
A triple model based on convolutional neural network is adopted, and iterative training is performed through plaintext and signature text, and a pseudo-private key is generated and signature and plaintext is forged, to bypass the difficulty of obtaining private keys of the RSA algorithm.
Efficient forgery of RSA digital signatures are achieved. The accuracy rate of forgery signatures is 51 times that of blind guesses, and the accuracy rate of plain text forgery is 73 times that of blind guesses, which significantly improves RSA's ability to resist artificial intelligence attacks.
Smart Images

Figure CN115514496B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of applied cryptography, and in particular to an RSA digital signature forgery method based on a convolutional neural network. Background Art
[0002] Information is a valuable resource in the era of big data. How to transmit information without forgery has become a hot topic of concern. Digital signatures can be used to prevent information from being forged as an effective proof of the sender's message, and can provide more security than handwritten signatures. A valid digital signature can ensure that the signature is completed by the recognized signer, that is, the authenticity of the signer's identity. The signed digital content has not changed after signing, that is, the integrity of the signature data. Once the recipient obtains the signer's valid signature, the signer cannot deny his or her signing behavior, that is, non-repudiation.
[0003] RSA public key cryptography is a signature scheme that is widely used at present. Its security is based on the difficulty of factoring large integers. In RSA, the key is divided into a private key and a public key. The private key is used to encrypt and generate a signature, and the public key is used to decrypt and verify the signature. The private key is only held by the signer himself, and the public key can be held by anyone. It is precisely because the act of encryption with a private key can only be completed by the person who holds the private key that the ciphertext encrypted with the private key can be treated as a signature.
[0004] RSA can be cracked through channel-by-channel attack, mathematical attack, and deep learning. Channel-by-channel attack is a cryptographic attack method that can obtain secret information from cryptographic devices. Unlike other attack methods, this attack uses the energy consumption characteristics of cryptographic devices. Although channel-by-channel attack technology has cost advantages over traditional cryptanalysis technology, the attack method is not omnipotent. At present, the attack is still centered on a type of cryptographic integrated circuit with resource limitations represented by smart cards. The improvement of integrated circuit technology has gradually increased the difficulty of attack. Cracking the RSA algorithm through mathematical methods is also a widely used method. The most fundamental problem of cracking RSA is to solve the decomposition of large integers. At present, the main methods for decomposing large integers are quadratic screening, elliptic curve algorithm, and general number field sieving method. However, the time cost of these methods is very high, and the general number field sieving method with good results also takes sub-exponential time.
[0005] With the successful application of neural networks in various fields, the field of cryptography has also begun to pay attention to the use of neural networks, so the combination of cryptography and neural networks has formed many new cryptographic research ideas. However, the current technology is only applicable to simple encryption methods and has no ability to decipher the RSA encryption algorithm. Summary of the invention
[0006] The purpose of the present invention is to provide a RSA digital signature forgery method based on a convolutional neural network, which can bypass the difficulty of large integer decomposition, use existing plaintext and signature text to train a pseudo private key, and finally forge the plaintext and signature text through a model. The innovation of the present invention lies in the combination of convolutional neural networks and cryptography. A non-mechanical attack model for RSA digital signature forgery is proposed, namely a triple convolutional neural network model. The advantage of the present invention is that it is not necessary to understand the specific process of the RSA algorithm, only the plaintext and the corresponding signature text and the public key are needed, and the private key, digital signature and authentication signature process can be simulated through three network modules. Finally, the forgery of the signature text and the corresponding plaintext is completed by iteratively training the network model. The experimental results show that the accuracy of the forged signature of the present invention is 51 times that of the blind guess, and the accuracy of the corresponding plaintext forgery is 73 times that of the blind guess.
[0007] To achieve the above object, the present invention provides the following technical solution: a RSA digital signature forgery method based on convolutional neural network, comprising the following steps:
[0008] Step 1: Select digital signature sample: First, select the plaintext sample to be signed, and sign it through RSA to generate a signature sample;
[0009] Step 2, data preprocessing: perform data preprocessing on the plaintext samples and signature samples generated in step 1 to generate data samples that meet the model training requirements;
[0010] Step 3, build a triple convolutional neural network model: select the convolutional neural network as the backbone of the network model, and build three modules to simulate the process of RSA private key solution, RSA signing with private key, and authentication signature with public key. The only thing that cannot be obtained in the entire RSA signing process is the private key. Therefore, a pseudo private key is trained through the model, and the signature is forged with the pseudo private key. Finally, the pseudo plaintext corresponding to the pseudo signature is forged with the public key;
[0011] Step 4, set network parameters: set corresponding network parameters according to the digital signature sample, and implement training after the setting is completed.
[0012] Preferably, in step 1, the brown corpus and the gutenberg corpus are selected as sample data sets of plain text, and the plain text is signed using the RSA algorithm to generate signature samples. Finally, the plain text samples and the corresponding signature samples are paired.
[0013] Preferably, the specific steps of step 2 are as follows:
[0014] Step 2.1, construct a unique word list: The core of the RSA encryption algorithm is to take the modulus after the exponentiation operation. Therefore, in order to better analyze the mapping relationship between the RSA digital signature and the plaintext, the present invention maps the plaintext and the signature text to integers. And construct a unique word list, that is, each plaintext character and signature character corresponds to an integer in the unique word list;
[0015] Step 2.2, convert samples: convert the paired plaintext and signature text into integers according to the unique word list to construct a new sample data set;
[0016] Step 2.3, normalizing samples: In order to eliminate the dimensional influence between different evaluation indicators, the present invention performs a normalization operation on the converted samples so that the sample data are at the same order of magnitude.
[0017] Preferably, the triple convolutional network model in step 3 is composed of three convolutional neural networks, each with different parameters, and the specific steps are as follows:
[0018] Step 3.1, build a private key solution module: use the constructed convolutional neural network model, take the plaintext and signature as the input of the module, and perform iterative training to solve the pseudo private key through convolution;
[0019] Step 3.2, build the signature encoder module: take the pseudo private key and plain text as the input of the module, and perform iterative training to generate the pseudo signature;
[0020] Step 3.3, build the signature decoder module: take the pseudo signature and public key as the input of the module, and perform iterative training to generate pseudo plaintext.
[0021] Preferably, in step 4, the parameters are optimized by iterative training of training samples and back propagation algorithm, and the network model will continue to learn the mapping relationship between RSA signature and plaintext, so that the generated pseudo plaintext and the corresponding pseudo signature are closer and closer to the real plaintext and signature.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] The present invention discloses a RSA digital signature forgery method based on a convolutional neural network. The convolutional neural network is continuously trained to learn the mapping relationship between the RSA digital signature and the plaintext, and finally the signature text and the corresponding plaintext are forged. The experimental results show that the accuracy of the forged signature of the present invention is 51 times that of the blind guess, and the accuracy of the corresponding plaintext forgery is 73 times that of the blind guess. The model of the present invention bypasses the difficulty of RSA large integer decomposition to a certain extent, and provides a certain reference significance for RSA to resist the attack of artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1It is a flow chart of a RSA digital signature forgery method based on a convolutional neural network of the present invention;
[0025] Figure 2 This is the overall architecture diagram of the counterfeit model based on convolutional neural network of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings of the present invention in the embodiments of the present invention to clearly and completely describe the technical solutions of the present invention in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Example
[0028] The present invention provides a RSA digital signature forgery method based on convolutional neural network, such as Figure 1 As shown, the specific implementation steps are as follows:
[0029] In step 1, a plaintext data set is selected and encrypted using RSA to generate a signature sample.
[0030] Step 2 is as follows:
[0031] Step 2.1, construct a unique word list. The core of the RSA encryption algorithm is to take the modulus after the exponentiation operation. Therefore, in order to better analyze the mapping relationship between the RSA digital signature and the plaintext, the present invention maps the plaintext and the signature text to integers. And construct a unique word list, that is, each plaintext character and signature character corresponds to an integer in the unique word list.
[0032] Step 2.2, convert samples. According to the unique word list, integer conversion is performed on the paired plaintext and signature samples to construct a new sample data set.
[0033] Step 2.3, normalize the samples. In order to eliminate the dimensional influence between different evaluation indicators, the present invention performs a normalization operation on the converted samples so that the samples are at the same order of magnitude. The normalization formula is as follows:
[0034]
[0035] In the formula, X represents the normalized data, x represents the value of a single data point, min represents the minimum value of the data column, and max represents the maximum value of the data column.
[0036] The details of step 3 are as follows:
[0037] Step 3.1, build a private key solution module. Using the constructed convolutional neural network model, take the plaintext and signature as the input of the module, and perform iterative training to solve the pseudo private key through convolution.
[0038] Step 3.2: Build the signature encoder module. Take the pseudo private key and plaintext as the input of the module, and perform iterative training to generate the pseudo signature.
[0039] Step 3.3, build the signature decoder module. Take the pseudo signature and public key as the input of the module, and perform iterative training to generate pseudo plaintext.
[0040] Step 3.4, model details, there are two padding methods for the convolution layer, namely same and valid padding. Sigmoid is the activation function used in the model, and its specific definition is given below. The three convolutional neural network modules have similar structures, all of which are composed of a fully connected layer and six convolutional layers. The first layer of the three networks is a fully connected layer. The function of the fully connected layer is to combine features and map the combined features to the sample's label space. The features are weighted and summed through the fully connected layer and input to the subsequent convolutional layer. In order to ensure that the combined features do not lose edge information, the second layer of the three networks uses the same padding convolution layer. For each convolutional layer, different sizes of convolution kernels and different step sizes are set. The convolution layers with valid padding are used in the middle layers to adjust the size of the output feature map. Finally, each module obtains an output that meets the dimension after passing the last convolutional layer. The final output of each module will enter the next module. The three modules connected in this way will optimize their parameters through the back propagation algorithm and finally reach the optimal balance. Through iterative training, more and more mapping relationships between RSA signature text and plaintext will be learned, thereby improving the accuracy of pseudo-signature pairs.
[0041] In the whole signing process of RSA algorithm, the only thing that cannot be obtained is the private key. Therefore, the present invention constructs a private key solver module through convolutional neural network. A pseudo private key is trained through this module, and the trained pseudo private key and the existing plaintext are used as the input of the signature encoder, and finally a pseudo signature is output. In order to make the network continuously reduce the spatial distance between the pseudo signature and the real signature after iterative training. The MSE loss function is introduced in the network to shorten the Euclidean distance between the pseudo signature and the real signature. The MSE formula is as follows:
[0042]
[0043] The RSA encryption algorithm is a nonlinear mapping. In order for the neural network to handle this complex task, an activation function needs to be used to perform nonlinear changes on the input. Therefore, the present invention uses the sigmoid function as the activation function in the network. The sigmoid function is defined as follows:
[0044]
[0045] Finally, the pseudo-signature output by the signature encoder and the existing public key are input into the signature decoder, and the signature decoder outputs the pseudo-plaintext after iterative training. In order to shorten the spatial distance between the pseudo-plaintext and the true plaintext, the signature decoder uses MSE as the loss function.
[0046] Overall goal: First, through the proposed triple convolutional neural network model, plaintext, signature and public key are used as samples. Then a pseudo private key is solved by the private key solving module, and a pseudo signature is encoded by the signature encoding module. Finally, the signature decoding module decodes the pseudo plaintext corresponding to the pseudo signature. The present invention introduces the Adam optimization algorithm with quadratic gradient correction into the model to find the global optimal point. Forge a pseudo plaintext signature pair that is as close to the plaintext and signature as possible.
[0047] Step 4 is as follows:
[0048] The triple convolutional network model is composed of three convolutional neural networks, each with different parameters. Through iterative training of training samples and back-propagation algorithm to optimize parameters, the network model will continue to learn the mapping relationship between RSA signatures and plaintexts, and eventually make the generated pseudo-plaintext and the corresponding pseudo-signature closer and closer to the real plaintext and signature.
[0049] As the number of training rounds increases, the accuracy of the signature text forged by the signature encoding module and the signature decoding module and the corresponding plaintext eventually tends to be stable. The accuracy of the plaintext and signature text forged by the present invention is much higher than that of random guessing. For plaintext, the length of the word list is 85. That is, in the data set, there are a total of 85 different characters. If it is a random guess, the probability of guessing each character correctly is 1 / 85, which is about 1.176%, while the accuracy of the forged model of the present invention in pseudo-plaintext is 86%, which is about 73 times that of random guessing. For the signature text, it is displayed as a bytes sequence after encryption in Python. One byte represents a byte, and there are a total of 256 situations. If it is a random guess, the probability of guessing each byte correctly is 1 / 256, which is about 0.39%, while the accuracy of the forged signature of the forged model of the present invention is 20%, which is about 51 times that of random guessing. Experiments show that the present invention has a certain effect in forging RSA digital signatures, and the purpose of forging RSA digital signatures can be achieved through continuous training.
[0050] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A RSA digital signature forgery method based on convolutional neural network, characterized in that: The following steps are involved: Step 1: Select digital signature sample: First, select the plaintext sample to be signed, and sign it through RSA to generate a signature sample; Step 2, data preprocessing: perform data preprocessing on the plaintext samples and signature samples generated in step 1 to generate data samples that meet the model training requirements; The specific steps of step 2 are as follows: Step 2.1, build a unique word list: The core of the RSA encryption algorithm is to take the modulus after the exponentiation operation; so in order to better analyze the mapping relationship between the RSA digital signature and the plaintext, the plaintext and the signature text are mapped to integers; And build a unique word list, that is, each plain text character and signature character corresponds to an integer in the unique word list; Step 2.2, convert samples: convert the paired plaintext and signature text into integers according to the unique word list to construct a new sample data set; Step 2.3, normalize samples: In order to eliminate the dimensional influence between different evaluation indicators, the converted samples are normalized so that the sample data are in the same order of magnitude; Step 3, build a triple convolutional neural network model: select the convolutional neural network as the backbone of the network model, and build three modules to simulate the process of RSA private key solution, RSA signing with private key, and authentication signature with public key. The only thing that cannot be obtained in the entire RSA signing process is the private key. Therefore, a pseudo private key is trained through the model, and the signature is forged with the pseudo private key. Finally, the pseudo plaintext corresponding to the pseudo signature is forged with the public key; The triple convolutional network model in step 3 is composed of three convolutional neural networks, each with different parameters. The specific steps are as follows: Step 3.1, build a private key solution module: use the constructed convolutional neural network model, take the plaintext and signature as the input of the module, and perform iterative training to solve the pseudo private key through convolution; Step 3.2, build the signature encoder module: take the pseudo private key and plaintext as the input of the module, and perform iterative training to generate the pseudo signature; Step 3.3, build the signature decoder module: take the pseudo signature and public key as the input of the module, and perform iterative training to generate pseudo plaintext; Step 4, set network parameters: set corresponding network parameters according to the digital signature sample, and implement training after the setting is completed.
2. According to claim 1, a convolutional neural network-based RSA digital signature forgery method is characterized by: In the step 1, the brown corpus and the gutenberg corpus are selected as sample data sets of plaintext, and the RSA algorithm is used to sign the plaintext to generate a signature sample; Finally, the plaintext sample and the corresponding signature sample are paired.
3. The RSA digital signature forgery method based on convolutional neural network according to claim 1, characterized in that: In step 4, the parameters are optimized through iterative training of training samples and back-propagation algorithm, and the network model will continue to learn the mapping relationship between RSA signature and plaintext; ultimately, the generated pseudo-plaintext and the corresponding pseudo-signature are closer and closer to the real plaintext and signature.
Citation Information
Patent Citations
Lightweight digital signature method facing wireless sensing network
CN105025474A
Data privacy protection method and device in data fusion process and storage medium
CN114785494A