Hidden ciphertext algorithm identification method based on deep learning ResNet algorithm

By combining a method based on the deep learning ResNet algorithm with information hiding and encryption technologies, we extract image and ciphertext features, and identify in stages whether an image is a secret image and its cryptographic algorithm type. This solves the problems of low recognition accuracy and feature redundancy in existing technologies, and achieves efficient recognition of hidden ciphertext algorithms in images.

CN116310505BActive Publication Date: 2025-09-26HENAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310089228.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-03
Publication Date
2025-09-26
Estimated Expiration
2043-02-03

AI Technical Summary

Technical Problem

Existing cryptographic algorithm recognition methods mainly revolve around block cipher algorithms, and the recognition accuracy needs to be improved in application scenarios where images contain hidden ciphertext. Traditional machine learning models are easily affected by data redundancy and noise when dealing with classification problems, and do not fully utilize the capabilities of deep learning models.

Method used

A method based on the deep learning ResNet algorithm is adopted. By collecting image sets and training classification models, combined with information hiding technology and encryption technology, image and ciphertext features are extracted. In two stages, whether the image is a secret image and the type of cryptographic algorithm it belongs to are identified. Feature screening method is used to deal with ciphertext feature redundancy.

Benefits of technology

It improves the accuracy of cryptographic algorithm recognition and expands the application scenarios, solves the problem of feature redundancy, and realizes the efficient recognition of hidden ciphertext algorithms in images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310505B_ABST
    Figure CN116310505B_ABST
Patent Text Reader

Abstract

The present invention provides a method for identifying hidden ciphertext algorithms based on a deep learning ResNet algorithm. The method comprises: collecting a set of images, each image in the set carrying a type label indicating whether the image is a secret image and the type of cryptographic algorithm to which the ciphertext in the secret image belongs; using the image set as training data, and using the deep learning ResNet algorithm to train a classification model 1 for distinguishing whether an input image is a secret image; using all secret images as training data, and using the deep learning ResNet algorithm to train a classification model 2 for identifying the type of cryptographic algorithm to which the ciphertext in the secret image belongs; inputting the image to be identified into the trained classification model 1; if the classification result indicates that the image to be identified is a secret image, the recognition continues; otherwise, the recognition ends; and inputting the image to be identified into the trained classification model 2 to obtain the cryptographic algorithm type of the ciphertext therein.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cryptographic algorithm recognition, and in particular to a hidden ciphertext algorithm recognition method based on a deep learning ResNet algorithm. Background Art

[0002] In recent years, with the rapid development of computer network technology and multimedia information processing technology, information hiding technology has been widely applied to copyright protection, covert communication, and other aspects. Information hiding involves embedding secret information into a carrier (such as text, images, audio, video, etc.) using a key and a specific algorithm. The secret information is then extracted by the recipient using a key and an extraction algorithm. Images are the most frequently used hiding carriers due to their accessibility and diversity. The most classic image steganography algorithm is the least significant bit (LSB) embedding algorithm, which embeds secret messages by replacing the least significant bit. This method can hide a large amount of secret information by making only small, imperceptible changes to the carrier file.

[0003] Currently, most cryptanalysis techniques analyze various cryptographic algorithms based on the knowledge of the underlying encryption algorithm. However, in practice, researchers often study how to identify cryptographic algorithms without disclosing the encryption method, a process known as cryptanalysis. Therefore, identifying the encryption algorithm used by encrypted ciphertext is a prerequisite for practical cryptanalysis.

[0004] In 2006, Dileep and Sekhar (MANJULA R, ANITHA R. Identification of encryption algorithm using decision tree [C]. In: Advanced Computing—CCSIT 2011. Springer Berlin Heidelberg, 2011: 237–246. [DOI: 10.1007 / 978-3-642-17881-8-23) proposed a block cipher algorithm recognition based on support vector machines for five cryptographic algorithms: AES, DES, 3DES, RC5, and Blowfish. The results showed that the support vector machine model using Gaussian kernel function had the best performance, and the ECB mode had higher recognition accuracy than the CBC mode. In 2012, Chou Junwei et al. (Jung Weichou, Shou Delin, Chen Moucheng. On the effectiveness of using state-of-the-art machine learning techniques to launch cryptographic distinguishing attacks [P]. Security and artificial intelligence, 2012: 105-110) proposed using support vector machines (SVMs) to identify cryptographic algorithms. This method extracted 12 ciphertext features and conducted experiments on pairwise classification and identification of block cipher algorithms in ECB and CBC modes. In 2015, Wu Yang et al. (Wu Yang, Wang Tao, Xing Meng et al., Block cipher algorithm identification method based on ciphertext randomness metric distribution characteristics [J], Journal of Communications, 2015, 36(4):146-155) proposed a two-layer identification method based on the ciphertext randomness metric distribution characteristics for five block cipher algorithms: AES, Camellia, DES, 3DES, and SMS4. The upper layer uses the K-means clustering algorithm to cluster the cipher algorithms, and the lower layer effectively identifies representative block ciphers based on the clustering results. In 2021, Wang Xu et al. (Wang Xu, Chen Yongle, Wang Qingsheng, Chen Junjie. Cryptographic system identification method combining feature selection and ensemble learning [J]. Computer Engineering, 2021, 47(01):139-145+153) proposed a dynamic feature recognition method that can adapt to multiple cryptographic algorithm recognition scenarios. This method extracts 12 ciphertext features from ciphertext generated by 36 cryptographic algorithms based on entropy, maximum entropy, probability, and randomness tests. It then combines the Relief feature selection algorithm with heterogeneous ensemble learning to classify cryptographic algorithms. Compared with existing methods, this method achieves significantly improved recognition accuracy.

[0005] In summary, current cryptographic algorithm identification methods have the following three characteristics: First, they primarily focus on block ciphers. Block ciphers are easy to standardize, have fast computational speeds, and are widely applicable, making their security a key concern. Second, most identification methods utilize machine learning classification models. When classifying problems, machine learning-based classifiers often suffer from redundancy or noise in the dataset, which can lead to poor performance of trained models in the test set. Third, most identification scenarios directly focus on ciphertext classification, failing to consider scenarios where images contain hidden ciphertext. With the increasing variety of cryptographic algorithms, application scenarios, and datasets to be processed, the accuracy of cryptographic algorithm identification methods needs to be improved. Neural networks can process information that is difficult for human intuition to process, possess a stronger ability to understand abstract knowledge, and possess strong representational learning capabilities. They can effectively mine spatial relationships between data and are therefore suitable for processing multidimensional data. Currently, the use of deep learning models in cryptographic algorithm identification methods is relatively limited and remains in the preliminary research stage. Summary of the Invention

[0006] In order to further expand the application scenarios of cryptanalysis and improve the accuracy of cryptographic algorithm recognition, the present invention provides a hidden ciphertext algorithm recognition method based on the deep learning ResNet algorithm.

[0007] The present invention provides a hidden ciphertext algorithm identification method based on the deep learning ResNet algorithm, comprising:

[0008] Step 1: Collect a set of images PIC = {PY1, PY2, ..., PY N ,PN1,PN2,...,PN N}, where PY represents a secret image, PN represents a plain image without ciphertext, and the subscript N represents the number of images; each image in the image set carries a type tag, which indicates whether the image is a secret image and the type of cryptographic algorithm to which the ciphertext in the secret image belongs;

[0009] Step 2: Using the image set as training data, a deep learning ResNet algorithm is used to train a classification model 1 for distinguishing whether an input image is a classified image;

[0010] Step 3: Using all the encrypted images in the image set as training data, a deep learning ResNet algorithm is used to train a classification model 2 for identifying the type of cryptographic algorithm to which the ciphertext in the encrypted image belongs;

[0011] Step 4: Input the image to be identified into the trained classification model 1. If the classification result indicates that the image to be identified is a classified image, proceed to step 5; otherwise, terminate the identification.

[0012] Step 5: Input the image to be identified into the trained classification model 2 to obtain the cryptographic algorithm type described in the ciphertext.

[0013] Furthermore, step 2 specifically includes:

[0014] extracting steganographic feature information of each image in the image set according to the image steganography method used by the secret images; wherein all the secret images use the same image steganography method;

[0015] The steganographic feature information of each image and its type label of whether it is a secret image are used as a training sample, thus forming a training dataset with 2N training samples;

[0016] The training data set is used to train the classification model 1 using the deep learning ResNet algorithm.

[0017] Furthermore, the image steganography method is an LSB steganography method; correspondingly, the steganographic feature information is the lowest bitmap of the image; the lowest bitmap refers to a map obtained by converting the least significant bit information of each pixel extracted from the image at a certain fixed length.

[0018] Furthermore, step 3 specifically includes:

[0019] Extracting the ciphertext file contained in each ciphertext image, extracting the ciphertext feature information of the ciphertext file, and forming an initial ciphertext feature set of the ciphertext file;

[0020] Performing feature screening on the initial ciphertext feature set;

[0021] The ciphertext feature information after feature screening and the type label of the cryptographic algorithm type to which the ciphertext belongs are used as a training sample, thereby forming a training data set with N training samples;

[0022] The training data set is used to train the classification model 2 using the deep learning ResNet algorithm.

[0023] Furthermore, the cryptographic algorithm type to which the ciphertext in the encrypted image belongs includes at least one of AES, 3DES, CAST and RC2.

[0024] Beneficial effects of the present invention:

[0025] Compared with the cryptographic algorithm identification method based on machine learning, the present invention introduces a deep learning model to construct an image hidden ciphertext algorithm identification method; at the same time, it combines information hiding technology and encryption technology, expands the application scenarios in the field of password analysis, and uses feature screening methods to process ciphertext features to obtain relevant important features, thereby solving the problem of feature redundancy and improving the cryptographic algorithm identification method. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 One of the flow charts of the hidden ciphertext algorithm identification method based on the deep learning ResNet algorithm provided in an embodiment of the present invention;

[0027] Figure 2 The second flowchart of the hidden ciphertext algorithm identification method based on the deep learning ResNet algorithm provided by the embodiment of the present invention;

[0028] Figure 3 Schematic diagram of the LSB steganography process provided by an embodiment of the present invention;

[0029] Figure 4 A schematic diagram of the process of screening a ciphertext feature set based on the three algorithms XGBoost, GBDT, and RF provided in an embodiment of the present invention;

[0030] Figure 5 A feature importance histogram of the 15 most important features selected from 40 ciphertext feature sets under five ciphertext sizes provided in an embodiment of the present invention (where the horizontal axis is the sequence number of the selected features and the vertical axis is the importance of each feature). DETAILED DESCRIPTION

[0031] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0032] Example 1

[0033] like Figure 1 As shown, an embodiment of the present invention provides a hidden ciphertext algorithm identification method based on a deep learning ResNet algorithm, comprising the following steps:

[0034] S101: Collect a set of images PIC = {PY1, PY2, ..., PY N ,PN1,PN2,...,PN N}, where PY represents a secret image, PN represents a plain image without ciphertext, and the subscript N represents the number of images; each image in the image set carries a type tag, which indicates whether the image is a secret image and the type of cryptographic algorithm to which the ciphertext in the secret image belongs;

[0035] S102: Using the image set as training data, a deep learning ResNet algorithm is used to train a classification model 1 for distinguishing whether an input image is a classified image;

[0036] S103: using all the encrypted images in the image set as training data, and using a deep learning ResNet algorithm to train a classification model 2 for identifying the type of cryptographic algorithm to which the ciphertext in the encrypted image belongs;

[0037] S104: Input the image to be identified into the trained classification model 1. If the classification result indicates that the image to be identified is a classified image, proceed to step S105; otherwise, terminate the identification process.

[0038] S105: Input the image to be identified into the trained classification model 2 to obtain the cryptographic algorithm type described in the ciphertext.

[0039] Compared with the existing cryptographic algorithm recognition method based on machine learning, this paper introduces the deep learning ResNet model to construct an image hidden ciphertext algorithm recognition method; at the same time, it combines information hiding technology and encryption technology to expand the application scenarios in the field of cryptographic analysis.

[0040] Example 2

[0041] On the basis of the above embodiment, this embodiment takes the LSB steganography method used in the encrypted image as an example, and the embodiment of the present invention provides a hidden ciphertext algorithm recognition method based on the deep learning ResNet algorithm, such as Figure 2 As shown, the following steps are included:

[0042] S201: Collect a set of image sets PIC = {PY1, PY2, ..., PY N ,PN1,PN2,...,PN N};

[0043] Specifically, this step includes the following sub-steps:

[0044] S2011: Random data generated by the Random method of the Python Crypto encryption module is used as the plaintext data set, including five plaintext data sizes of 1KB, 8KB, 64KB, 256KB, and 512KB;

[0045] S2012: Use the four block cipher algorithms AES, 3DES, CAST, and RC2 in ECB mode to encrypt the plaintext data in the plaintext data set to obtain the ciphertext data set;

[0046] S2013: Use the LSB steganography method to hide each ciphertext data in the ciphertext data set into a common image to obtain a corresponding ciphertext image. In this embodiment, one ciphertext image contains one ciphertext data. The LSB steganography process is as follows: Figure 3 shown.

[0047] S202: Using the image set as training data, a deep learning ResNet algorithm is used to train a classification model 1 for distinguishing whether an input image is a classified image;

[0048] Specifically, this step includes the following sub-steps:

[0049] S2021: Extracting steganographic feature information of each image in the image set according to the image steganography method used by the secret images; wherein all the secret images use the same image steganography method.

[0050] Since all the scrambled images in this embodiment are obtained by using the LSB steganographic method, the least significant bit information of each pixel under a certain fixed length is extracted from each image and converted into a graph, which is recorded as the lowest bitmap of the image. The lowest bitmap is used as the steganographic feature information of the image; finally, the lowest bitmap set DIC = {DY1, DY2, ..., DY N ,DN1,DN2,...,DN N};

[0051] S2022: The steganographic feature information of each image and its type label indicating whether it is a secret image are used as a training sample, thereby forming a training data set with 2N training samples.

[0052] In this embodiment, the labels of the encrypted image and the common image contained in the lowest bitmap set are formed into a 2N-dimensional vector Lab = (lab1, lab2, ..., lab 2N ), the binary set (DIC, Lab) consisting of the lowest bitmap set and the label set is recorded as the training data set T.

[0053] S2023: Build a neural network model based on deep learning ResNet, use the training dataset T, continuously modify the neural network model parameters, and compare the performance of the neural network model under different parameters in the task of identifying whether an image is a classified image;

[0054] S2024: Select the model with the highest average accuracy as classification model 1.

[0055] S203: using all the encrypted images in the image set as training data, and using a deep learning ResNet algorithm to train a classification model 2 for identifying the type of cryptographic algorithm to which the ciphertext in the encrypted image belongs;

[0056] Specifically, this step includes the following sub-steps:

[0057] S2031: Extract the ciphertext files contained in each ciphertext image, extract the ciphertext feature information of all ciphertext files, and form an initial ciphertext feature set, recorded as

[0058] In this embodiment, the ciphertext feature fea is expressed as a triple as shown in formula (1):

[0059] fea=(R,Extr,d)(1)

[0060] Among them, R is the representation of ciphertext data; Extr represents the processing function that maps the ciphertext F into ciphertext features; d is the dimension of the ciphertext features.

[0061] As an implementable method, the embodiment of the present invention uses hypothesis testing as the theoretical basis for randomness testing. Referring to existing ciphertext feature extraction methods based on randomness testing, the present invention combines the NIST randomness detection method and the entropy test method to redesign and collect 40 ciphertext features (as shown in Table 1).

[0062] Table 1 List of 40 ciphertext features

[0063]

[0064]

[0065]

[0066] S2032: Perform feature screening on the initial ciphertext feature set, and the screened ciphertext feature set is recorded as in represents the pth feature of the jth ciphertext file. The feature selection process is as follows Figure 4 shown.

[0067] In this embodiment, the initial ciphertext feature set is manually screened first, and the features that are all 1 (or 0) (or close to 1 or 0) are deleted, that is, the irrelevant features that are completely random or completely non-random detected by the randomness test; then, the initial ciphertext feature set is divided into feature importance based on the three algorithms of XGBoost, GBDT, and RF, and the weighted average of the three feature importances obtained by the three algorithms is screened again, and finally the top N optimal feature sets Fea are obtained. Y .

[0068] S2033: Using the ciphertext feature information after feature screening and the type label of the cryptographic algorithm type to which the ciphertext belongs as a training sample, thereby forming a training data set having N training samples;

[0069] In this embodiment, the filtered ciphertext feature information is converted into a ciphertext feature graph Fea P ={Fea P (i)1,Fea P (i)2,...,Fea P (i) N}, where Fea P (i) N Indicates the use of encryption algorithm a i The Nth ciphertext feature graph corresponding to the encrypted ciphertext file after feature extraction and feature screening.

[0070] The cryptographic algorithm labels in the N ciphertext feature graph datasets are formed into an N-dimensional vector PLab=(plab1,plab2,…,plab N ), record the binary consisting of the ciphertext feature graph set label set (Fea P ,PLab), as the training dataset T′;

[0071] S2034: Build a neural network model based on deep learning ResNet. Using the training dataset T′, continuously modify the neural network model parameters and compare the performance of the neural network model with different parameters in the task of identifying the cryptographic algorithm type of hidden ciphertext in a cryptanalyzed image.

[0072] S2035: Select the model with the highest average accuracy as classification model 2.

[0073] S204: Input the image to be identified into the trained classification model 1. If the classification result indicates that the image to be identified is a classified image, proceed to step S205; otherwise, terminate the identification process.

[0074] In this embodiment, the image set to be tested P={P1, P2, ..., P x}, use classification model 1 to perform the first stage of classification recognition on the image to be recognized, and distinguish the image as a confidential image or a common image. If it is a confidential image, continue to step S206; otherwise, end the recognition;

[0075] S205: Input the image to be identified into the trained classification model 2 to obtain the cryptographic algorithm type described in the ciphertext.

[0076] In this embodiment, the ciphertext file hidden in the encrypted image is extracted, and feature extraction and feature processing are performed to obtain the corresponding ciphertext feature map PFea={PFea1, PFea2, ..., PFea x}, input into classification model 2 to identify the encryption algorithm type to which the hidden ciphertext belongs.

[0077] This embodiment of the present invention uses a deep learning algorithm to construct a classification model for identifying cryptographic algorithms, further expanding its application in the field of cryptanalysis. It uses a two-stage approach to identify whether ciphertext is hidden in an image and the specific encryption algorithm to which it belongs. Through training and testing the classification model, the task of identifying the hidden ciphertext algorithm is ultimately completed. A feature screening method is used to process ciphertext features to obtain relevant key features, thereby resolving the issue of feature redundancy and improving the cryptographic algorithm identification method.

[0078] Example 3

[0079] In order to verify the effectiveness of the hidden ciphertext algorithm recognition method based on deep learning ResNet provided by the present invention, the following verification experiment is provided.

[0080] (1) Data preparation

[0081] The present invention chose to use Python's Crypto library for encryption. The plaintext used in the experiment was random data generated by Python's Crypto module using the Random method. The plaintext used in the experiment included five different files of 1KB, 8KB, 64KB, 256KB, and 512KB sizes, with 1000 files of each. The encryption key and initialization vector were generated using Crypto's Cipher module. The ciphertext used four block cipher algorithms: AES, 3DES, CAST, and RC2, in ECB mode with a fixed 16-bit string key. The specific parameters are shown in Table 2.

[0082] The experiment of the present invention is carried out on ciphertext files of five sizes. For example, under the condition of 1KB ciphertext files, 1000 ciphertext files of each algorithm are hidden in ordinary images respectively, and a total of 4000 hidden ciphertext images are obtained. Similarly, for 512KB ciphertext, the four cryptographic algorithms generate a total of 20,000 secret images, which together with the original ordinary images constitute the overall data set of the first classification. In the second classification, the four block cipher algorithms with ciphertext sizes of 1KB to 512KB are identified, with 1000 copies of each cryptographic algorithm. Under the condition of secret images, the ciphertext hidden in the image is extracted, and the NIST randomness detection and entropy test methods are used to extract features from 4000 ciphertext files of a certain ciphertext size. The ciphertext feature set is processed to screen out the top 15 features with high importance ( Figure 5The importance histogram of 15 features after screening for ciphertext sizes of 1kb, 8kb, 64kb, 256kb, and 512kb is converted into a ciphertext feature map, which serves as the input for classification model 2 in the recognition method. This ultimately identifies the specific encryption algorithm to which the hidden ciphertext belongs. Repeated random sub-sampling validation was performed on the experimental data, randomly selecting 80% of the samples as the training set and the remaining 20% ​​as the test set. The average accuracy of the ten-fold repeated random sub-sampling validation test set was used as the recognition performance metric. Higher accuracy indicates better classifier recognition performance.

[0083] Table 2 Specific parameters of four block cipher algorithms

[0084] mark structure Key Working Mode Parameter scale Implementation AES SP Selected ECB Fixed parameters Crypto 3DES Feistel Selected ECB Fixed parameters Crypto CAST Feistel Selected ECB Fixed parameters Crypto RC2 Feistel Selected ECB Fixed parameters Crypto

[0085] (2) Experimental results

[0086] In the hidden ciphertext algorithm recognition method studied in the present invention, emphasis is placed on the recognition performance of the classification model in two stages. The present invention uses the average accuracy of the classification model as an evaluation criterion.

[0087] (1) Identify whether the image has hidden ciphertext

[0088] The first stage of this invention is to identify whether there is hidden ciphertext in the image. The experimental results are shown in Table 3. As can be seen from the table, for images with hidden ciphertext files of different sizes, the ResNet model's recognition accuracy reaches 100%, compared to the 50% recognition result of random classification, demonstrating the effectiveness of this method.

[0089] Table 3 Binary classification results of encrypted images and ordinary images

[0090]

[0091] (2) Identify the specific encryption algorithm to which the hidden ciphertext belongs

[0092] Based on ten-fold repeated random subsampling verification, the test results of four-class classification of ciphertext files encrypted with the specific encryption algorithms AES, 3DES, CAST and RC2 to which the hidden ciphertext in the ciphertext image belongs are shown in Table 4 using logistic regression (LR), decision tree (DT), k-nearest neighbor (KNN), AdaBoost, Gaussian Naive Bayes (GNB), support vector machine (SVM) and the method of the present invention (HCARDL).

[0093] Table 4 Four-category recognition results of seven classification models

[0094]

[0095] Accuracy represents the average recognition accuracy of the validation test set using ten-fold repeated random subsampling. Table 4 shows that the ResNet model achieves the best improvement compared to random classification. The average recognition accuracy of LR, DT, KNN, ADA, GNB, and SVM for ciphertext file sizes of 1KB, 8KB, 64KB, 256KB, and 512KB is 0.4948, 0.7007, 0.4615, 0.6965, and 0.4786, respectively. Compared to the other six machine learning classification models, the ResNet model's classification accuracy improves the least when the ciphertext file size is 1KB, increasing by 13%. It achieves the best improvement when the ciphertext file size is 512KB, with a 26% improvement. It can be seen that, for ciphertext of the same size, the ResNet model's classification results are significantly higher than the average recognition accuracy of the other six traditional machine learning models.

[0096] The average recognition accuracy of the classic machine learning classification models LR, DT, KNN, ADA, GNB, and SVM for four categories on ciphertext files ranging in size from 1 KB to 512 KB was 0.5363, 0.672, 0.556, 0.5198, 0.5653, and 0.549, respectively. The average recognition accuracy of the ResNet model was 0.7431, representing improvements of 20.5%, 6.9%, 18.5%, 22.2%, 17.6%, and 19.2%, respectively, compared to the above six classification models. It can be seen that the ResNet model's classification results are superior to those of the other six traditional machine learning classification models across different ciphertext file sizes.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A hidden ciphertext algorithm identification method based on deep learning ResNet algorithm, characterized by: include: Step 1: Collect a set of images PIC = {PY1, PY2, ..., PY N ,PN1,PN2,...,PN N }, where PY represents a secret image, PN represents a plain image without ciphertext, and the subscript N represents the number of images; each image in the image set carries a type tag, which indicates whether the image is a secret image and the type of cryptographic algorithm to which the ciphertext in the secret image belongs; Step 2: Using the image set as training data, a deep learning ResNet algorithm is used to train a classification model 1 for distinguishing whether an input image is a classified image; Step 3: Using all the encrypted images in the image set as training data, a deep learning ResNet algorithm is used to train a classification model 2 for identifying the type of cryptographic algorithm to which the ciphertext in the encrypted image belongs; Step 4: Input the image to be identified into the trained classification model 1. If the classification result indicates that the image to be identified is a classified image, proceed to step 5; otherwise, terminate the identification. Step 5: Input the image to be identified into the trained classification model 2 to obtain the cryptographic algorithm type described in the ciphertext.

2. The method for identifying hidden ciphertext algorithms based on the deep learning ResNet algorithm according to claim 1, characterized in that: Step 2 specifically includes: extracting steganographic feature information of each image in the image set according to the image steganography method used by the secret images; wherein all the secret images use the same image steganography method; The steganographic feature information of each image and its type label of whether it is a secret image are used as a training sample, thus forming a training dataset with 2N training samples; The training data set is used to train the classification model 1 using the deep learning ResNet algorithm.

3. The hidden ciphertext algorithm identification method based on deep learning ResNet algorithm according to claim 2 is characterized in that: The image steganography method is the LSB steganography method; correspondingly, the steganographic feature information is the lowest bitmap of the image; the lowest bitmap refers to a map obtained by converting the least significant bit information of each pixel extracted from the image at a certain fixed length.

4. The method for identifying hidden ciphertext algorithms based on the deep learning ResNet algorithm according to claim 1, characterized in that: Step 3 specifically includes: Extracting the ciphertext file contained in each ciphertext image, extracting the ciphertext feature information of the ciphertext file, and forming an initial ciphertext feature set of the ciphertext file; Performing feature screening on the initial ciphertext feature set; The ciphertext feature information after feature screening and the type label of the cryptographic algorithm type to which the ciphertext belongs are used as a training sample, thereby forming a training data set with N training samples; The training data set is used to train the classification model 2 using the deep learning ResNet algorithm.

5. The method for identifying hidden ciphertext algorithms based on deep learning ResNet algorithm according to claim 1, characterized in that: The cryptographic algorithm type to which the ciphertext in the encrypted image belongs includes at least one of AES, 3DES, CAST and RC2.

Citation Information

Patent Citations

  • Block cipher system identification method based on improved random forest algorithm

    CN112702157A

  • Ciphertext domain image classification method based on deep learning

    CN114338944A