An image encryption method based on SVIR propagation model

The key generation through the SVIR propagation model and Chen chaotic system, rearrange and change the image pixel value, solve the problems of slow image encryption speed and insufficient anti-interference ability in the prior art, and realize an efficient and secure image encryption method.

CN116418920BActive Publication Date: 2025-08-12NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310378447.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2025-08-12
Estimated Expiration
2043-04-11

AI Technical Summary

Technical Problem

When the existing image encryption method faces images with strong correlation between large data volumes and adjacent pixels, the speed and security cannot meet the requirements, and the anti-interference ability is insufficient, so it cannot complete the decryption operation when there is data loss or noise in the ciphertext image.

Method used

The SVIR propagation model is adopted, and the pixels of the plaintext image are marked as susceptible state S, and the natural immune pixel and the initial infection pixel are selected using a pseudo-random number generator. The pixels of the infection state I and the inoculation state V are determined through social networks and family propagation mechanisms, and the keys are generated in combination with the Chen chaotic system, and the pixel values are rearranged and changed to generate the ciphertext image.

Benefits of technology

Improves encryption speed, enhances the robustness of ciphertext images, and can restore plaintext image content as much as possible in the presence of data loss or noise, and resists differential and statistical attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418920B_ABST
    Figure CN116418920B_ABST
Patent Text Reader

Abstract

The present invention provides an image encryption method based on the SVIR propagation model, which relates to the field of image encryption technology. The method first marks all pixels of the plaintext image as susceptible and uses a pseudo-random number generator to generate pseudo-random numbers. Then, based on the pseudo-random numbers, naturally immune pixels and initially infected pixels are selected. Then, based on the positions of the infected pixels, "disease" is propagated in the rows and columns where the infected pixels are located, as well as within the eight-neighborhood range, ultimately determining the infected pixels and the susceptible and vaccinated pixels. Finally, based on the order in which the infected pixels are infected and the order in which the susceptible and vaccinated pixels are located, the positions of the ciphertext image pixels are rearranged, and the pixel values of the pixels are changed to obtain the ciphertext image. This method improves encryption speed and makes the ciphertext image highly robust. It can restore the content of the plaintext image as much as possible when there is data loss or noise in the ciphertext image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image encryption technology, and in particular to an image encryption method based on an SVIR propagation model. Background Art

[0002] As society develops, more and more digital media, such as text and images, are uploaded to the internet. Therefore, communication security has become a key concern. Due to its unique characteristics, personal biometric information is widely used in various security verification scenarios. Digital media images may contain personal biometric information, such as fingerprints and irises. Leakage of this information could potentially compromise personal property security. Therefore, encrypting digital images is essential.

[0003] "A study of encryption algorithms AES, DES, and RSA for security" encrypts images using the traditional AES, DES, and RSA algorithms and compares their encryption performance. The experimental results show that of the three algorithms, AES has the shortest encryption and decryption time, while RSA has the longest encryption time.

[0004] In order to meet the needs of real-time secure encryption in modern communications, relevant practitioners have designed many encryption methods specifically for image encryption. Chaotic systems are widely used in the field of image encryption because of their non-periodicity and sensitivity to initial conditions.

[0005] "An Efficient Image Encryption Scheme Based on the LSS Chaotic Mapand Single S-Box" proposes a secure and efficient image encryption method based on chaotic system and S-box. This method uses the newly proposed discrete composite chaotic system Logistics-Sine system to construct a new S-box, and the key stream generated by the chaotic system is closely related to the plaintext image. Therefore, the ciphertext image processed by the S-box and key stream can effectively resist various plaintext attacks.

[0006] Traditional encryption methods, such as DES and AES, cannot meet the speed and security requirements when dealing with images, which have large amounts of data and strong correlation between adjacent pixels, due to their processing flow and key length.

[0007] Although the algorithm in "An Efficient Image Encryption Scheme Based on the LSS Chaotic Mapand Single S-Box" can effectively resist various plaintext attacks, because the generation of the S-box and key stream completely rely on the newly proposed Logistics-Sine system, the encryption efficiency of the entire algorithm is completely dependent on the chaotic system. In addition, because the encryption effect of the current area is affected by the previous area during the encryption process, the algorithm is not anti-interference. If the ciphertext image produces data loss or is mixed with noise, the decryption operation of the ciphertext image will not be completed. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide an image encryption method based on the SVIR propagation model to achieve image encryption in view of the above-mentioned deficiencies in the prior art.

[0009] To solve the above technical problems, the technical solution adopted by the present invention is: an image encryption method based on the SVIR propagation model, firstly, all pixels of the plaintext image are marked as susceptible state S, and a pseudo-random number generator is used to generate pseudo-random numbers; then, according to the pseudo-random numbers generated by the pseudo-random number generator, natural immune pixels and initial infected pixels are selected; according to the positions of the pixels in the infected state, the "disease" is propagated in the rows and columns where the infected pixels are located, as well as within the eight-neighborhood range, and finally the pixels in the infected state I and the pixels in the susceptible state S and vaccinated state V are determined; finally, the positions of the ciphertext image pixels are rearranged according to the order in which the pixels in the infected state I are infected and the order in which the positions of the pixels in the susceptible state S and vaccinated state V are infected, and the pixel values of the pixels are changed at the same time, so as to finally obtain the ciphertext image.

[0010] The specific steps include:

[0011] Step 1: Traverse the plaintext image, mark all plaintext pixels as susceptible state S, and obtain the cumulative sum of the pixel values of the plaintext image C pixel ;

[0012] Step 2: Use the Chen chaotic system as a pseudo-random number generator and use the plaintext image pixel value accumulation and C pixel The key Key′1 required by the Chen chaotic system is processed to obtain the key Key1, so that when the same key is used to encrypt plaintext images with only slight differences, completely different ciphertext images are obtained, thus effectively resisting differential attacks;

[0013] The process of obtaining key Key1 is as follows:

[0014]

[0015] Step 3: Iterate the pseudo-random number generator to calculate N pre times, so that the chaotic system reaches a chaotic state, and the pseudo-random number output by the pseudo-random number generator in each iteration is recorded as N pseudo , the pseudo-random number output by the pseudo-random number generator is uniformly distributed between (0,1), and the number of iterative calculations is N pre Used as one of the keys to control the output of the entire pseudo-random number generator;

[0016] Step 4: According to the natural immunity rate R n and pseudo-random number N pseudo In plain text image selection natural immune pixels as natural immune individuals, and these pixels are marked as vaccination status V, where width and height are the length and width of the plaintext image respectively;

[0017] Step 5: According to the pseudo-random number N pseudo A pixel is randomly selected in the plaintext image as the initial infected pixel, and its state is marked as infected state I, i.e. the initial infected person;

[0018] Step 6: The row and column of the initial infected pixel are used as the social network it participates in, completing the social network infection of the initial infected pixel. The infection strategy at this time is: each pixel in the social network has a 50% probability of being infected, and the order in which the pixels are infected determines their position in the ciphertext image.

[0019] Step 7: After the initial infected pixel's social network infection is complete, the entire plaintext image is divided into four "communities" based on the location of the initial infected pixel. All infected pixels in the social network, except the initial infected pixel, will return to their corresponding locations in the corresponding "community". The coordinate value calculation process of the infected pixel in the social network in the corresponding community is as follows:

[0020]

[0021] Among them, (i, j) is the coordinate value of the infected pixel in the corresponding community, (p i ,p j ) is the coordinate of the upper left corner of the community where the coordinate value (i, j) is located, w ′ ,h ′ is the width and height of the current community, f[i][j] is a marker array used to record the status of the pixels at the corresponding position;

[0022] Step 8: In order to further break the correlation between the pixels of the ciphertext image, a round of vaccination is performed on the susceptible pixels in the plaintext image; that is, according to Pseudo-random number N pseudo, randomly select 5% of the pixels in the susceptible pixels of the plaintext image and transform their states into the inoculated state V;

[0023] Step 9: After the infected pixels return to their corresponding community locations, social transmission and family transmission are performed separately. The rules of social network transmission are exactly the same as those of the initial infected pixel. The family transmission strategy is: the infected pixel will infect the susceptible pixels within its 8-neighborhood range. The probability of infection for each susceptible pixel increases with the number of infected pixels within its 8-neighborhood range. The infection probability is calculated as follows:

[0024] γ′=γ×(1+N t ×0.1)

[0025] Among them, γ = 0.5 is the basic infection probability, γ′ is the current infection probability, N t is the number of infected pixels within the 8-neighborhood range of the current position of the t-th pixel;

[0026] Step 10: During steps 5-9, record the remaining number of susceptible pixels, then find the susceptible pixel at the center of the plaintext image and start propagating alternately to both sides of it;

[0027] Step 11: For infected pixels at different stages of infection, different recovery rates are used to process them; for pixels infected by the initial infected pixel, the recovery rate is set to 80%, and for subsequent infected pixels, the recovery rate is 60%: For each pixel in the infected state, a pseudo-random number generator is used to obtain a pseudo-random number N pseudo , if the pseudo-random number N pseudo If the pixel is less than or equal to the recovery rate, the current pixel state is changed to the recovered state V, which further improves the algorithm's ability to resist differential attacks;

[0028] Step 12: Store the infected pixels, susceptible pixels, and vaccinated pixels in the plaintext image into the ciphertext image in order of position, and change the grayscale value of each pixel;

[0029] First, the infected pixels in the plaintext image are stored in the ciphertext image in the order of their infection. Then, the pixels in the susceptible state and the vaccinated state in the plaintext image are stored in the ciphertext image in the order of their positions. In the process of storing each pixel in the ciphertext image, a pseudo-random number generator is used to obtain a pseudo-random number N. pseudo Change the grayscale value to gain the ability to resist statistical attacks.

[0030] The calculation process of the grayscale value of the ciphertext image pixel is as follows:

[0031]

[0032] Among them, P cipher , P plain Represent the pixel grayscale values of the ciphertext and plaintext images respectively.

[0033] The beneficial effects of the above technical solution are as follows: The present invention provides an image encryption method based on the SVIR propagation model, using a chaotic system as a pseudo-random number generator and applying it throughout the encryption process. Secondly, an encryption scheme based on the SVIR propagation model is proposed, which divides the status of the entire population into four categories: susceptible (S), immune (V), infected (I), and recovered (R). Therefore, throughout the disease transmission process, whether each pixel has immunity and the order of infection are completely pseudo-random, making the entire propagation process more complex and further breaking the correlation between the pixels in the ciphertext image. This improves encryption speed and makes the ciphertext image highly robust, allowing the content of the plaintext image to be restored as much as possible even when the ciphertext image contains data loss or noise. Finally, by introducing the pixel sum of the plaintext image during the encryption process, the key sequence used for scrambling and diffusion is correlated with the plaintext, ensuring that the encryption scheme is resistant to chosen-plaintext attacks. Simulation results show that the present method has good robustness against noise, differential, and statistical attacks, and has faster encryption speed than existing algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flowchart of an image encryption method based on the SVIR propagation model provided by an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of a social network of the first infected pixel provided by an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of corresponding rules of communities where infection points are located in a social network provided by an embodiment of the present invention;

[0037] Figure 4 A schematic diagram of the current infection range provided by an embodiment of the present invention;

[0038] Figure 5 A schematic diagram of the infection range after the execution center spreads according to an embodiment of the present invention;

[0039] Figure 6The histogram analysis results of four images and their ciphertext images selected from the USC-SIPI database provided in the embodiment of the present invention; wherein, (a) is the first image selected from the USC-SIPI database; (b) is the second image selected from the USC-SIPI database; (c) is the third image selected from the USC-SIPI database; (d) is the fourth image selected from the USC-SIPI database; (e) is the histogram of the first image; (f) is the histogram of the second image; (g) is the histogram of the third image; (h) is the histogram of the fourth image; (i) is the ciphertext image of the first image; (j) is the ciphertext image of the second image; (k) is the ciphertext image of the third image; (l) is the ciphertext image of the fourth image; (m) is the histogram of the ciphertext image of the first image; (n) is the histogram of the ciphertext image of the second image; (o) is the histogram of the ciphertext image of the third image; (p) is the histogram of the ciphertext image of the fourth image;

[0040] Figure 7 Correlation analysis diagram of the third image (Couple) selected from the USC-SIPI database provided by an embodiment of the present invention; (a), (b), and (c) respectively represent the pixel value distribution of 3000 pairs of adjacent pixels in the horizontal, vertical, and diagonal directions of the plaintext image of the third image selected from the USC-SIPI database; (d), (e), and (f) respectively represent the pixel value distribution of 3000 pairs of adjacent pixels in the horizontal, vertical, and diagonal directions of the ciphertext image of the third image selected from the USC-SIPI database;

[0041] Figure 8 The key sensitivity analysis results provided by the embodiment of the present invention; wherein, (a) is the plaintext image, (b) is the ciphertext image obtained by encrypting (a) using K as the key, and (c) is the ciphertext image obtained by encrypting (a) using K as the key. ′ The ciphertext image obtained by encrypting image (a) as the key, (d) is the difference image obtained by using |(c)–(d)|, (e) is the decrypted image (b) using the key K, and (f) is the decrypted image using K ′ as the key to decrypt the image (b);

[0042] Figure 9 Robustness analysis results provided for an embodiment of the present invention; wherein, (a), (b), (c), and (d) represent ciphertext images with 20% salt and pepper noise added, 20% simulated data loss, 30% simulated data loss, and 60% simulated data loss, respectively; (e), (f), (g), and (h) represent the decrypted images corresponding to the ciphertext images (a), (b), (c), and (d), respectively. DETAILED DESCRIPTION

[0043] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.

[0044] In this embodiment, an image encryption method based on the SVIR propagation model first marks all pixels of the plaintext image as susceptible state S, and uses a pseudo-random number generator to generate pseudo-random numbers; then, according to the pseudo-random numbers generated by the pseudo-random number generator, naturally immune pixels and initially infected pixels are selected; according to the positions of the pixels in the infected state, "disease" is propagated in the rows and columns where the infected pixels are located, as well as within the eight-neighborhood range, and finally the pixels in the infected state I and the pixels in the susceptible state S and vaccinated state V are determined; finally, the positions of the ciphertext image pixels are rearranged according to the order in which the pixels in the infected state I are infected and the order in which the positions of the pixels in the susceptible state S and vaccinated state V are infected, and the pixel values of the pixels are changed, thereby finally obtaining the ciphertext image.

[0045] like Figure 1 As shown, the specific steps include:

[0046] Step 1: Traverse the plaintext image, mark all plaintext pixels as susceptible state S, and obtain the cumulative sum of the pixel values of the plaintext image C pixel ;

[0047] Step 2: Use Chen's chaotic system as a pseudo-random number generator. Chen's chaotic system requires three keys: Key1 ′ ,Key2,Key3, here we use the plaintext image pixel value accumulation and C pixel The key Key′1 required by the Chen chaotic system is processed to obtain the key Key1, so that when the same key is used to encrypt plaintext images with only slight differences, completely different ciphertext images are obtained, thus effectively resisting differential attacks;

[0048] The process of obtaining key Key1 is as follows:

[0049]

[0050] In this formula, the type of Key′1 is long double, the type of Cpixel is longlong, and the brackets after the minus sign indicate rounding down. Using this formula will result in a Key1 of long double type less than 1.

[0051] Step 3: Iterate the pseudo-random number generator to calculate N pre times, so that the chaotic system reaches a chaotic state, and the pseudo-random number output by the pseudo-random number generator in each iteration is recorded as N pseudo, the pseudo-random number output by the pseudo-random number generator is uniformly distributed between (0,1), and the number of iterative calculations is N pre Used as one of the keys to control the output of the entire pseudo-random number generator;

[0052] Iterate the pseudo-random number generator to calculate N pre The second is to make the chaotic system reach a chaotic state, so that the output value obtained by the chaotic system, that is, the pseudo-random number, will be uniformly distributed within a certain range (the range of output values varies with different chaotic systems, and the output value of the pseudo-random number generator each time is recorded as N pseudo , here by using Ensure that the output value of the pseudo-random number generator is uniformly distributed between (0,1), where N pseudo The type is long double); secondly, if the number of iterations is customized, it can be used as one of the keys of the encryption algorithm to increase security;

[0053] Step 4: According to the natural immunity rate R n and pseudo-random number N pseudo In plain text image selection Natural immune pixels are regarded as natural immune individuals, and these pixels are marked as vaccination status V, where width and height are the length and width of the plaintext image respectively; in this embodiment, according to the experimental results of the Tuskegee syphilis experiment, the natural immunity rate R n is set at 10%;

[0054] Step 5: According to the pseudo-random number N pseudo A pixel is randomly selected in the plaintext image as the initial infected pixel, and its state is marked as infected state I, i.e. the initial infected person;

[0055] According to the pseudo-random number N pseudo A coordinate value can be obtained, and a pixel in the plaintext image can be selected as the initial infected pixel according to the coordinate value;

[0056] Step 6: The row and column where the initial infected pixel is located are used as the social network it participates in (that is, the framework of virus propagation, such as Figure 2 As shown in the figure), the social network infection of the initial infected pixel is completed; the infection strategy at this time is: each pixel in the social network has a 50% probability of being infected, and the order of the pixels being infected determines their position in the ciphertext image; the specific implementation method is: because the output value of the pseudo-random number generator is uniformly distributed in (0,1), assuming that the social network of the initial infected pixel contains M pixels in the susceptible state S, the pseudo-random number generator is iterated M times at this time to obtain a pixel consisting of M N pixels. pseudo The pseudo-random number sequence is composed ofx , if the xth N pseudo Less than or equal to 0.5, then M x The state is marked as infected state I; otherwise M x The state remains unchanged. In subsequent steps, this method is used to determine whether a pixel is infected. The only difference is the infection probability. The infection probability in social networks is 50%, while the infection probability in family transmission changes dynamically. See step 9 for details.

[0057] Step 7: After the initial infected pixel’s social network infection is completed, the entire plaintext image is divided into four “communities” according to the position of the initial infected pixel. All infected pixels in the social network except the initial infected pixel will return to the corresponding position in the corresponding “community”, such as Figure 3 As shown in the figure, the coordinate calculation process of the infected pixel in the corresponding community in the social network is as follows:

[0058]

[0059] Among them, (i, j) is the coordinate value of the infected pixel in the corresponding community, (p i ,p j ) is the coordinate of the upper left corner of the community where the coordinate value (i, j) is located, w ′ ,h ′ is the width and height of the current community, f[i][j] is a marker array used to record the status of the pixels at the corresponding position;

[0060] Step 8: In order to further break the correlation between the pixels of the ciphertext image, a round of vaccination is carried out on the susceptible pixels in the plaintext image. Since the virus is still in its early stages of transmission, the vaccination rate is only 5%. Pseudo-random number N pseudo , randomly select 5% of the pixels in the susceptible pixels of the plaintext image and transform their states into the inoculated state V;

[0061] Step 9: After the infected pixels return to their corresponding community locations, social transmission and family transmission are performed separately. The rules of social network transmission are exactly the same as those of the initial infected pixel. The family transmission strategy is: the infected pixel will infect the susceptible pixels within its 8-neighborhood range. The probability of infection for each susceptible pixel increases with the number of infected pixels within its 8-neighborhood range. The infection probability is calculated as follows:

[0062] γ′=γ×(1+N t ×0.1)

[0063] Among them, γ = 0.5 is the basic infection probability, γ′ is the current infection probability, N tis the number of infected pixels within the 8-neighborhood range of the current position of the t-th pixel. The infected range at this time is as follows: Figure 4 As shown;

[0064] Step 10: Under normal circumstances, the main object of the image is generally located in the center of the image. For this reason, we propose a "center diffusion" method: in the process of executing steps 5-9, record the remaining number of susceptible pixels, and then find the susceptible pixel at the center of the plaintext image and start to spread alternately to both sides. The method of judging whether the pixel will be infected is detailed in step 6. At this time, the infection probability is 50%. Experimental results show that this operation can achieve a good diffusion effect while significantly reducing the processing time. The infection range at this time is as follows: Figure 5 shown.

[0065] Step 11: For infected pixels at different stages of infection, different recovery rates are used to process them; for pixels infected by the initial infected pixel, the recovery rate is set to 80%, and for subsequent infected pixels, the recovery rate is 60%: For each pixel in the infected state, a pseudo-random number generator is used to obtain a pseudo-random number N pseudo , if the pseudo-random number N pseudo If the pixel is less than or equal to the recovery rate, the current pixel state is changed to the recovered state V, which further improves the algorithm's ability to resist differential attacks;

[0066] Step 12: Store the infected pixels, susceptible pixels, and vaccinated pixels in the plaintext image into the ciphertext image in order of position, and change the grayscale value of each pixel;

[0067] First, the infected pixels in the plaintext image are stored in the ciphertext image in the order of their infection (the ciphertext image is initially a blank container). Then, the pixels in the susceptible and vaccinated states in the plaintext image are stored in the ciphertext image in the order of their positions. In the process of storing each pixel in the ciphertext image, a pseudo-random number generator is used to obtain a pseudo-random number N. pseudo Change the grayscale value to gain the ability to resist statistical attacks.

[0068] The calculation process of the grayscale value of the ciphertext image pixel is as follows:

[0069]

[0070] Among them, P cipher , P plain Represent the pixel grayscale values of the ciphertext and plaintext images respectively.

[0071] In order to evaluate the effectiveness of the method of the present invention, this embodiment uses several images from the USC-SIPI database to conduct the following test; the pseudo-random number generator used is the Chen system, with initial values of Key1 = 0.123687176893, Key2 = 0.896876889082, Key3 = 0.676145256343, and the number of preheating times before use N pre The test was conducted on an AMD Ryzen 5 3600 CPU, 16GB RAM, an NVIDIA RTX 2070 8GB graphics card, and Visual Studio 2019.

[0072] (1) Statistical attack detection

[0073] The histogram can reflect the distribution of pixel values in an image. Generally speaking, the histogram of a visually meaningful image should be regularly distributed, while the histogram of a ciphertext image should be uniformly distributed in any case to avoid statistical attacks. The histograms of the four images and their ciphertext images in the USC-SIPI database are shown in the figure below. Figure 6 As shown in Figure 3, after encryption, the histograms of all ciphertext images are evenly distributed and visually consistent, making it difficult for attackers to obtain useful information from them through statistical attacks.

[0074] In order to more intuitively verify the uniform distribution of grayscale values in the ciphertext image, this embodiment applies the chi-square test to the ciphertext image:

[0075]

[0076] in, f i It indicates the number of pixels with gray value i in the image. When the significance value is set to 0.05, the test results of multiple images of different sizes are shown in Table 1. It can be found that the values of all ciphertext images obtained by the method of the present invention are less than And it performs better than other algorithms.

[0077] Table 1 Chi-square test

[0078]

[0079]

[0080] (2) Differential attack detection

[0081] A differential attack is a type of chosen plaintext attack. To crack the key, the attacker typically makes subtle changes to the plaintext image and then compares the ciphertext images before and after the changes to obtain the key information. Therefore, a secure encryption algorithm should produce completely different images after a slight change in the plaintext. To measure the ability of the method of the present invention to resist differential attacks, this embodiment selects several images from the SIPI database, generates new images by changing the value of a pixel at a random position in the image, and encrypts them. Then, the difference between the corresponding ciphertext images is measured using NPCR (Pixel Change Rate) and UACI (Uniform Average Change Intensity), and the calculation formula is as follows:

[0082]

[0083] Where M and N are the width and height of the image, respectively. c1 and c2 are the ciphertext images corresponding to two plaintext images with a one-pixel difference.

[0084] In 2011, researchers proposed critical values for NPCR and UACI at different significance levels, which can more accurately measure an algorithm's resistance to differential attacks. Table 2 shows the NPCR critical values at different significance levels for grayscale images of different sizes, and Table 3 shows the UACI critical values at different significance levels for grayscale images of different sizes. As shown in Table 4, the proposed method passes both the UACI and NPCR tests for all images. These results demonstrate its excellent resistance to differential attacks.

[0085] Table 2 Theoretical critical values of NPCR at different image sizes and significance levels

[0086] Image size <![CDATA[N * 0.05 ]]> <![CDATA[N * 0.01 ]]> <![CDATA[N * 0.001 ]]> 256*256 99.5693% 99.5527% 99.5341% 512*512 99.5893% 99.5810% 99.5717% 1024*1024 99.5994% 99.5994% 99.5906%

[0087] Table 3 Theoretical critical values of UACI at different image sizes and saliency levels

[0088]

[0089]

[0090] Table 4 NPCR and UACI detection scores of the present invention

[0091] Test image Image size NPCR score NPCR test UACI score UACI test 4.1.04 256*256 99.6292 Pass 33.6310 Pass 4.1.05 256*256 99.5941 Pass 33.4498 Pass 4.1.06 256*256 99.6246 Pass 33.4227 Pass 5.1.09 256*256 99.5834 Pass 33.4848 Pass 5.1.10 256*256 99.6017 Pass 33.2992 Pass 5.1.11 256*256 99.6017 Pass 33.3886 Pass 5.2.08 512*512 99.6139 Pass 33.5141 Pass 5.2.09 512*512 99.6025 Pass 33.5387 Pass 5.2.10 512*512 99.6204 Pass 33.5026 Pass 7.1.08 512*512 99.6120 Pass 33.4629 Pass 7.1.09 512*512 99.6356 Pass 33.5319 Pass 7.1.10 512*512 99.6009 Pass 33.4521 Pass 5.3.01 1024*1024 99.6007 Pass 33.4597 Pass 5.3.02 1024*1024 99.6182 Pass 33.4626 Pass 7.2.01 1024*1024 99.6001 Pass 33.4672 Pass

[0092] (3) Entropy attack detection

[0093] Information entropy can reflect the uncertainty of image information. The larger the information entropy, the higher the uncertainty. It can be defined as:

[0094]

[0095] Among them, x i is the grayscale value of the i-th pixel, p(x i ) is the grayscale value x i The theoretical value of information entropy, H(I), can be obtained as 8. The closer the image's information entropy is to the theoretical value, the higher the encryption algorithm's security against entropy attacks. Table 5 shows the information entropy of different images using different encryption methods. As can be seen from the table, the information entropy values of the encrypted images obtained by the present method are very close to the theoretical value of 8, indicating that the encrypted images have excellent randomness. Therefore, the present method can ensure the security of images when subjected to entropy attacks.

[0096] Table 5 Information entropy test

[0097]

[0098]

[0099] (4) Correlation detection

[0100] There is a strong correlation between adjacent pixels in an image, but for a ciphertext image where the pixels are fully scrambled, the correlation between the pixels is very weak. In order to evaluate the correlation between the pixels of the image encrypted by the method of the present invention, 3000 pairs of adjacent pixels are randomly selected from the third image (Couple) selected from the USC-SIPI database. The adjacent relationships of these pixel pairs are horizontal, vertical and diagonal, as shown in Figure 2. Figure 7 shown.

[0101] In addition, this embodiment also calculates the correlation coefficient between adjacent pixels, and the calculation formula is as follows:

[0102]

[0103] Where u and v represent two adjacent grayscale values, E(u) and D(u) are the mean and variance, and cov(u, v) represents the covariance. As can be seen in Table 6, the correlation between adjacent pixels in the encrypted image using the present method is extremely low, further demonstrating the excellent diffusion effect of the present method.

[0104] Table 6 Correlation coefficient analysis

[0105]

[0106] (5) Key space detection

[0107] The key space is the set of all possible keys and grows exponentially with the key length. Generally speaking, the key space must be greater than 2 112The key of the method of the present invention is composed of the initial value of the chaotic system (Key1, Key2, Key3, which are double-precision numbers with a calculation accuracy of 10 16 ), the sum of the pixels of the plaintext image (C pixel is a long integer variable) and the number of chaotic system preprocessing (N pre is an integer variable). Therefore, the key space is approximately C pixel ×N pre ×Key1×Key2×Key3=C pixel ×N pre ×10 48 ≈C pixel ×N pre ×2 160 Obviously, the invention has enough key space to resist brute force attacks.

[0108] (6) Key sensitivity detection

[0109] A secure encryption algorithm should be very sensitive to the key, which means that any slight change in the key will produce completely different encryption and decryption results. The key sensitivity of the method of the present invention is as follows: Figure 8 As shown in Table 7. After the ciphertext image is generated, if the random bits in the random key are changed while the rest of the table remains unchanged, the ciphertext image cannot be decrypted. The experimental results show that the method of the present invention has good key sensitivity.

[0110] Table 7 Key sensitivity analysis ('-' means the key has not changed)

[0111] Key K <![CDATA[K / ]]> <![CDATA[Key1]]> 0.123687176893 - <![CDATA[Key2]]> 0.896876889082 - <![CDATA[Key3]]> 0.676145256343 0.676245256342 <![CDATA[C pixel ]]> 32290163 - <![CDATA[N pre ]]> 1000 -

[0112] (7) Robustness detection

[0113] During the transmission and storage of digital images, data loss or tampering is very likely to occur. These inaccurate data will affect the quality of image decryption. A good encryption algorithm should be robust to pixel changes. In order to evaluate the performance of the method of the present invention against noise interference and data loss, this embodiment uses 20% salt and pepper noise, 20%, 30%, and 60% black pixels to simulate lost data. The corresponding decrypted image is as follows: Figure 9 As shown in the figure, it can be seen that although the quality of the decrypted image gradually decreases with the increase of noise and data loss ratio, it can still be recognized from the visual perception. Therefore, the method of the present invention has good anti-interference ability.

[0114] (8) Encryption time detection

[0115] In practical applications, the efficiency of encryption algorithms is crucial. Under identical hardware and software conditions, this example analyzes and compares the encryption time of the proposed method with that of image encryption methods from four recently cited papers: Paper 1 (Ancient image encryption scheme based on the 1sschaotic map and single s-box), Paper 2 (Afast chaotic image encryption scheme with simultaneous permutation-diusion operation), Paper 3 (Image encryption algorithm based on 2D hyperchaotic map), and Paper 4 (2D logistic-sine-coupling map for image encryption). Tests were conducted on images of varying sizes, and the average encryption time is shown in Table 8. The comparison results demonstrate that the proposed algorithm achieves similar or even superior encryption performance in a shorter time.

[0116] Table 8 Encryption time analysis (unit: seconds)

[0117] Image size 256*256 512*512 1024*1024 Method of the present invention 0.024 0.080 0.318 Paper 1 0.030 0.102 0.403 Paper 2 0.097 0.253 0.762 Paper 3 0.21 0.689 2.875 Paper 4 0.1275 0.5316 2.4613

[0118] 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 or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. An image encryption method based on the SVIR propagation model, characterized by: Mark all pixels of the plaintext image as susceptible state S, and use a pseudo-random number generator to generate pseudo-random numbers; Selecting natural immune pixels and initial infection pixels according to pseudo-random numbers generated by a pseudo-random number generator; According to the position of the pixel in the infected state, the "disease" is spread in the row and column where the infected pixel is located, as well as within the eight-neighborhood range, and finally the pixels in the infected state I and the pixels in the susceptible state S and vaccinated state V are determined; The positions of the ciphertext image pixels are rearranged according to the order in which the pixels in the infected state I are infected, and the order in which the pixels in the susceptible state S and the vaccinated state V are located, and the pixel values of the pixels are changed at the same time, so as to finally obtain the ciphertext image; The following steps are involved: Step 1: Traverse the plaintext image, mark all plaintext pixels as susceptible state S, and obtain the cumulative sum of the pixel values of the plaintext image C pixel ; Step 2: Use the Chen chaotic system as a pseudo-random number generator and use the plaintext image pixel value accumulation and C pixel The key Key′1 required by the Chen chaotic system is processed to obtain the key Key1, so that when the same key is used to encrypt plaintext images with only slight differences, completely different ciphertext images are obtained, thus effectively resisting differential attacks; Step 3: Iterate the pseudo-random number generator to calculate N pre times, so that the chaotic system reaches a chaotic state, and the pseudo-random number output by the pseudo-random number generator in each iteration is recorded as N pseudo , the pseudo-random number output by the pseudo-random number generator is uniformly distributed between (0,1), and the number of iterative calculations is N pre Used as one of the keys to control the output of the entire pseudo-random number generator; Step 4: According to the natural immunity rate R n and pseudo-random number N pseudo In plain text image selection natural immune pixels as natural immune individuals, and these pixels are marked as vaccination status V, where width and height are the length and width of the plaintext image respectively; Step 5: According to the pseudo-random number N pseudo A pixel is randomly selected in the plaintext image as the initial infected pixel, and its state is marked as infected state I, i.e. the initial infected person; Step 6: The row and column of the initial infected pixel are used as the social network it participates in, completing the social network infection of the initial infected pixel. The infection strategy at this time is: each pixel in the social network has a 50% probability of being infected, and the order in which the pixels are infected determines their position in the ciphertext image. Step 7: After the initial infected pixel's social network infection is completed, the entire plaintext image is divided into four "communities" based on the location of the initial infected pixel. All infected pixels in the social network except the initial infected pixel will return to the corresponding position in the corresponding "community"; Step 8: In order to further break the correlation between the pixels of the ciphertext image, a round of vaccination is performed on the susceptible pixels in the plaintext image; that is, according to Pseudo-random number N pseudo , randomly select 5% of the pixels in the susceptible pixels of the plaintext image and transform their states into the inoculated state V; Step 9: After returning to the corresponding community location, the infected pixels are analyzed for social transmission and family transmission respectively; Step 10: During steps 5-9, record the remaining number of susceptible pixels, then find the susceptible pixel at the center of the plaintext image and start propagating alternately to both sides of it; Step 11: For infected pixels at different stages of infection, different recovery rates are used to process them; for pixels infected by the initial infected pixel, the recovery rate is set to 80%, and for subsequent infected pixels, the recovery rate is 60%: For each pixel in the infected state, a pseudo-random number generator is used to obtain a pseudo-random number N pseudo , if the pseudo-random number N pseudo If the pixel is less than or equal to the recovery rate, the current pixel state is changed to the recovered state V, which further improves the algorithm's ability to resist differential attacks; Step 12: The infected pixels, susceptible pixels, and vaccinated pixels in the plaintext image are stored in the ciphertext image in order of position, and the grayscale value of each pixel is changed.

2. The image encryption method based on the SVIR propagation model according to claim 1, characterized in that: The key Key1 is obtained as shown in the following formula:

3. The image encryption method based on the SVIR propagation model according to claim 1, characterized in that: The coordinate values of infected pixels in the corresponding community in the social network are calculated as follows: Among them, (i, j) is the coordinate value of the infected pixel in the corresponding community, (p i ,p j ) is the coordinate of the upper left corner of the community where the coordinate value (i, j) is located, w ′ ,h ′ is the width and height of the current community, and f[i][j] is a marker array used to record the status of the pixels at the corresponding position.

4. The image encryption method based on the SVIR propagation model according to claim 1, characterized in that: The social transmission rules described in step 9 are exactly the same as the social network transmission rules of the initial infected pixel. The family transmission strategy is: the infected pixel will infect the susceptible pixels within its 8-neighborhood range, and the probability of infection of each susceptible pixel increases with the increase of the number of infected pixels within its 8-neighborhood range.

5. The image encryption method based on the SVIR propagation model according to claim 4, characterized in that: The infection probability is calculated as follows: c ′ =γ×(1+N t ×0.1) Among them, γ=0.5 is the basic infection probability, γ ′ is the current infection probability, N t is the number of infected pixels within the 8-neighborhood range of the current position of the t-th pixel.

6. The image encryption method based on the SVIR propagation model according to claim 1, characterized in that: The specific method of step 12 is: First, the infected pixels in the plaintext image are stored in the ciphertext image in the order of their infection. Then, the pixels in the susceptible state and the vaccinated state in the plaintext image are stored in the ciphertext image in the order of their positions. In the process of storing each pixel in the ciphertext image, a pseudo-random number generator is used to obtain a pseudo-random number N. pseudo Change the grayscale value to gain the ability to resist statistical attacks.

7. The image encryption method based on the SVIR propagation model according to claim 6, characterized in that: The grayscale value of the ciphertext image pixel is calculated as follows: Among them, P cipher , P plain Represent the pixel grayscale values of the ciphertext and plaintext images respectively.

Citation Information

Patent Citations

  • Josepher traversal and hyper-chaotic system image encryption method based on pixel value association

    CN110086601A

  • Image encryption method based on multilayer complex network and SIR model

    CN112541855A