A triple-preserving and diffusing-based thumbnail encryption method for big data resource cloud service
By employing a triple-scramble and diffusion-based encryption method, plaintext images are subjected to multiple scrambling and diffusion operations. This solves the problems of low encryption efficiency and high image expansion rate in existing technologies, achieving a balance between efficient image encryption and privacy and usability, and enhancing resistance to attacks.
Patent Information
- Application Number
- CN202510045854.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Existing thumbnail preservation encryption methods suffer from low encryption efficiency and excessive image expansion rate, failing to effectively balance image privacy and usability. Furthermore, multi-round encryption schemes negatively impact transmission efficiency and storage costs.
An encryption method based on triple guarantee and diffusion is adopted. The key is generated by the SHA-256 hash function. A scrambling algorithm is designed using chaotic system and Josephus sequence to perform multiple scrambling and diffusion operations on the plaintext image. The image is encrypted by combining Z-shaped scrambling and logical operations.
It achieves efficient image encryption, significantly improves resistance to attacks, saves time and costs, and maintains the availability and privacy of images after a single encryption, effectively resisting facial recognition attacks.
Smart Images

Figure CN119946200B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a triple-preserving and diffusion-based thumbnail encryption method for cloud service of big data resources. BACKGROUND
[0002] In 2021, the Data Security Law and the Personal Information Protection Law were successively issued; in 2022, data security and personal privacy were officially written into the government work report; in December 2023, the National Data Bureau and other 17 departments jointly issued the "Data Element X" Three-Year Action Plan (2024-2026); in February 2024, the Ministry of Industry and Information Technology issued the Implementation Plan for Enhancing Data Security Capabilities in the Industrial Field (2024-2026). This series of measures aims to enhance the security protection capabilities of data in various fields through the continuous improvement of laws and regulations, policy planning and action plans, and ensure the security and controllability of data resources and the effective protection of privacy information. Therefore, data security and information protection, as an important front of national strategy, have become increasingly important.
[0003] Image data has become an important way of information expression and a main carrier of network interaction due to its rich content, visual image and the ability to cross language barriers. However, due to the limitations of hardware device capacity and performance, local storage resources are still very limited. Therefore, using cloud storage services such as iCloud, Google, OneDrive and Dropbox to migrate image data from local devices to the cloud has become an important trend. Cloud storage not only provides economic and sufficient storage space for massive data, but also simplifies the process of browsing and downloading images across devices, effectively alleviating users' anxiety about data loss caused by local device failure. Cloud storage has become an important part of modern digital life due to its convenience, and is also promoting the healthy development of big data resource collaboration services. However, the image data that users need to store often contains a large amount of private information, which may be more sensitive than users imagine. Therefore, uploading such images to a big data cloud storage platform undoubtedly poses a risk of privacy leakage.
[0004] Traditional image encryption techniques can effectively protect the confidentiality of image data by converting the original clear visual content into seemingly chaotic noise form, but this also deprives the availability of image content. Users cannot preview, screen, organize or manage images stored in the cloud before downloading and decrypting all encrypted files. This situation not only greatly reduces the user experience, but also causes additional time and resource waste. In order to achieve a perfect balance between image privacy and availability in cloud applications, Wright creatively proposed the concept of thumbnail-preserving encryption (TPE). The core of this innovative method is that the encrypted image thumbnail is visually consistent or highly similar to the original image thumbnail. This mechanism allows the owner who knows the image background to identify the specific content of the image based on the preserved visual features, while unauthorized individuals cannot pry into its true appearance. In this way, the TPE technology not only ensures the availability needs of image owners, but also fully safeguards their privacy rights. However, existing thumbnail-preserving encryption methods still face challenges such as low encryption efficiency, high image expansion rate, and the need for multiple rounds of encryption to ensure that the encryption algorithm is sufficient to resist external attacks. Therefore, it is still necessary to continuously explore and optimize TPE methods to promote the healthy and rapid development of new-generation information technology industries such as next-generation Internet operation services, Internet resource collaboration services, and big data resource services. SUMMARY
[0005] Based on the problems existing in the current thumbnail-preserving encryption method, a thumbnail-preserving encryption method for big data resource cloud services based on triple preservation and diffusion is proposed, which specifically includes the following steps:
[0006] Step one: uniformly divide the plaintext image into multiple sub-blocks (insufficient zero processing), and generate a thumbnail of the plaintext image according to the average pixel value of each sub-block;
[0007] Step two: take the plaintext image and its thumbnail as input data of the SHA-256 hash function respectively, and calculate two hash values;
[0008] Step three: perform multiple cross- XOR operations on the obtained two hash values and the initial key respectively, to obtain the initial value keys Key1 and Key2 of the disturbed chaotic system;
[0009] Step four: take the initial value keys Key1 and Key2 as the initial values of the chaotic system respectively, to obtain random sequences S1, S2, S3 and S4;
[0010] Step five: use the random sequences S1 and S2 generated by Key1 to design a permutation algorithm based on Joseph sequence, and perform permutation operation on each sub-block of the plaintext image;
[0011] Step six: using Z-shaped scrambling as the selection sequence, grouping all elements in the scrambled image of each sub-block, each group containing two pixel values;
[0012] Step seven: using the random sequence S3 generated by Key1, performing forward constant-preserving diffusion operation on all pixel groups in the block;
[0013] Step eight: using the random sequence S4 generated by Key2, performing inverse constant-preserving diffusion operation on the result of step seven;
[0014] Step nine: using the random sequence S3 generated by Key1, performing forward constant-preserving diffusion operation on the result of step eight to obtain the final encrypted image.
[0015] As a further scheme of the application: the generation method of the key Key1 and the key Key2 is:
[0016] Step one: taking the plaintext image and the corresponding thumbnail as the input data of the SHA-256 hash function respectively, calculating two 64-bit hexadecimal numbers h(x) ∈ {0, 1, 2,...14, 15} and H(x) ∈ {0, 1, 2,...14, 15}, wherein x = [1, 2, 3...63, 64].
[0017] Step two: the four components in the initial value key Key1 are k 11 , k 12 , k 13 , k 14 , which are designed as follows:
[0018]
[0019] Wherein H = 15 is the initial value of the key.
[0020] The expression of the key Key1 is: Key1 = k 11 k 12 k 13 k 14
[0021] Step three: the four components in the initial value key Key2 are k 21 , k 22 , k 23 , k 24 , which are designed as follows:
[0022]
[0023] The expression of the key Key2 is: Key2 = k 21 k 22 k 23 k24 .
[0024] As a further scheme of the present application: the generation method of the random sequences S1, S2, S3 and S4 is as follows:
[0025] Step one: substitute the initial value key Key1 into the chaotic system equation to generate a random sequence S with a length of q+wh / 2+2(w+h), wherein q is the number of pixels in the image, T is the image identifier, w is the image width, and h is the image height. Split the sequence S into a random sequence S1 with a length of w+h, a random sequence S2 with a length of w+h, and a random sequence S3 with a length of wh / 2. k (·) the generated random number, T is the image identifier, w is the image width, and h is the image height. Split the sequence S into a random sequence S1 with a length of w+h, a random sequence S2 with a length of w+h, and a random sequence S3 with a length of wh / 2.
[0026] Step two: substitute the initial value key Key2 into the chaotic system equation to generate a sequence S with a length of q+wh / 2, and discard the first q values of S to obtain a random sequence S4 with a length of wh / 2.
[0027] As a further scheme of the present application: the specific design process of the scrambling algorithm is as follows:
[0028] Step one: use the dynamic Joseph scrambling method based on the random sequence S1 to process the row sequence of the plaintext image sub-block matrix to obtain a row scrambling sequence RC1.
[0029] Step two: use the dynamic Joseph scrambling method based on the random sequence S2 to process the column sequence of the plaintext image sub-block matrix to obtain a column scrambling sequence RC2.
[0030] Step three: use S2 to perform a cyclic shift operation on each row of the plaintext image sub-block matrix to obtain an image matrix T1.
[0031] Step four: use the row scrambling sequence RC1 to perform column exchange scrambling on the matrix T1 to obtain a row scrambling matrix T2.
[0032] Step five: use the column scrambling sequence RC2 to perform a cyclic shift operation on each column of the matrix T2 to obtain the final scrambling result T3.
[0033] As a further scheme of the present application: the specific steps of the dynamic Joseph scrambling method are as follows:
[0034] Step one: place the pixel sequence that needs to be subjected to row and column scrambling operations on the Joseph ring in sequence.
[0035] Step two: use the random sequence S1 to generate a dynamic step length m for row scrambling, and use the random sequence S2 to generate a dynamic step length m for column scrambling. The generation method of the dynamic step length is m=S 1,2modn, where mod is the remainder symbol and n is the number of remaining pixel sequence elements on the current ring.
[0036] Step three: starting from the first element on the Josephus ring, find the element to be removed from the ring using a set step m.
[0037] Step four: continue to find the next element and remove it from the Josephus ring, taking the removed element as the new starting point.
[0038] Step five: repeat step four until all elements are removed from the Josephus ring.
[0039] Step six: the elements removed from the Josephus ring one by one form a specific permutation order of the permutation sequence.
[0040] As a further scheme of the present application: the specific method of forward preserving and diffusing is:
[0041] Step one: calculate the sum s of the pixel pair g1=(a,b) composed of pixels a and b, s=a+b.
[0042] Step two: select the value of the i-th element in the random sequence S3, i being the i-th pixel group selected based on the zigzag permutation, to obtain a random number S3(i).
[0043] Step three: generate a random number x from x=S3(i)×10 5 +s, obtaining a random number pair G=(x,y), and x and y satisfy x+y=0.
[0044] Step four: take the pixel pair g1=(a,b) and the random number pair G=(x,y) as inputs of the encryption function SPE. The function SPE is defined as follows:
[0045]
[0046] Where the mod symbol represents the modulo operation, and the condition ConditionA is as follows:
[0047] ((a+xmod256) >=256 && (b+ymod256) <256) || ((a+xmod256) <256 && (b+ymod256) >=256), where && represents logical AND operation, and || represents logical OR operation.
[0048] Step five: combine the diffusion results of all pixel pairs based on the function SPE to obtain the forward preserving and diffusing result, denoted as T4.
[0049] As a further scheme of the present application: the specific method of reverse preserving and diffusing is:
[0050] Step one: calculate the sum s of the pixel pair g2=(c,d) composed of pixels c and d, s=c+d.
[0051] Step two: select the value of the i-th element in the random sequence S4, i being the i-th pixel group selected based on the zigzag scrambling, to obtain a random number S4(i).
[0052] Step three: generate a random number x from x=S4(i)×10 5 +s, to obtain a random number pair G=(x,y), and x and y satisfy x+y=0.
[0053] Step four: take the pixel pair g2=(c,d) and the random number pair G=(x,y) as inputs of the decryption function SPD.
[0054]
[0055] The condition ConditionB is as follows:
[0056] ((c+ymod256) >=256 && (d+xmod256) <256) || ((c+ymod256) <256 && (d+xmod256) >=256)
[0057] Step five: combine the diffusion results of all pixel pairs based on the function SPD to obtain the inverse constant-preserving diffusion result, denoted as T5.
[0058] Compared with the prior art, the application has the beneficial effects that: the encryption method is proposed for the thumbnail, the triple constant-preserving diffusion algorithm based on logical and operation and logical or operation is designed, the efficient diffusion of the scrambled image is realized, the adjacent two pixels in the scrambled image are grouped in the zigzag arrangement order, the efficient constant-preserving diffusion algorithm is designed, and thus the time cost is greatly saved; the triple constant-preserving diffusion mechanism indirectly increases the key length, and effectively prevents the intermediate meeting attack that the double constant-preserving diffusion may face, and thus the anti-attack ability of the encryption method is significantly improved. The plaintext image sub-block matrix is scrambled by designing the dynamic Josephus scrambling method, the cyclic shift operation, and the row-column exchange scrambling. The thumbnail preserving encryption method balancing privacy and usability is realized by designing the scrambling algorithm based on the Josephus sequence and the triple constant-preserving diffusion algorithm based on logical and operation and logical or operation.
[0059] Additional aspects and advantages of the application will be made apparent by the following description. BRIEF DESCRIPTION OF DRAWINGS
[0060] The drawings in the following description are only some embodiments of the present application, and other drawings can be obtained from these drawings without creative labor for those skilled in the art.
[0061] Figure 1 Results of dynamic Joseph permutation of plaintext images when the image block size t = 8, 16, 32: (a) t = 8; (b) t = 16; (c) t = 32.
[0062] Figure 2 Results of one forward preserving diffusion on the permuted image when the image block size t = 8, 16, 32: (a) t = 8; (b) t = 16; (c) t = 32.
[0063] Figure 3 Results of three preserving diffusion on the permuted image when the image block size t = 8, 16, 32: (a) t = 8; (b) t = 16; (c) t = 32.
[0064] Figure 4 Success rate of using face recognition to attack the ciphertext image when the image block size t = 8, 16, 32, 64.
[0065] Figure 5 Flowchart of the thumbnail keeping encryption process based on three preserving diffusion. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be described clearly and completely below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0067] Please refer to Figures 1 to 5 In the embodiments of the present application, a thumbnail keeping encryption method for big data resource cloud service based on three preserving diffusion includes the following steps:
[0068] Step one: divide the plaintext image into multiple sub-blocks (insufficient zero processing), and generate a thumbnail of the plaintext image according to the average pixel value of each sub-block;
[0069] Step two: take the plaintext image and its thumbnail as the input data of the SHA-256 hash function respectively, and calculate two hash values;
[0070] Step three: perform multiple cross XOR processing on the obtained two hash values and the initial key respectively, and obtain the initial value keys Key1 and Key2 of two disturbed chaotic systems;
[0071] Step four: the initial value key Key1 and Key2 are respectively taken as initial values of a chaotic system, and random sequences S1, S2, S3 and S4 are obtained;
[0072] Step five: the random sequences S1 and S2 generated by Key1 are used to design a scrambling algorithm based on Joseph sequence, and scrambling operation is performed on each sub-block of the plaintext image;
[0073] Step six: all elements in the scrambled image of each sub-block are grouped in Z-shaped scrambling as the selection sequence, and each group contains two pixel values;
[0074] Step seven: the random sequence S3 generated by Key1 is used to perform forward preserving and diffusion operation on all pixel groups in the block;
[0075] Step eight: the random sequence S4 generated by Key2 is used to perform inverse preserving and diffusion operation on the result of step seven;
[0076] Step nine: the random sequence S3 generated by Key1 is used to perform forward preserving and diffusion operation on the result of step eight, and the final encrypted image is obtained.
[0077] The purpose of the application is to realize efficient image encryption while ensuring high security after single encryption.
[0078] As a further scheme of the application: the generation method of the key Key1 and the key Key2 is:
[0079] Step one: the plaintext image and the corresponding thumbnail are respectively taken as input data of the SHA-256 hash function, and two 64-bit hexadecimal numbers h(x) ∈ {0, 1, 2,...14, 15} and H(x) ∈ {0, 1, 2,...14, 15} are calculated, wherein x = [1, 2, 3...63, 64].
[0080] Step two: the four components of the initial value key Key1 are k 11 , k 12 , k 13 , k 14 , which are respectively designed as:
[0081]
[0082] Wherein H=15 is the initial value of the key.
[0083] The expression of the key Key1 is: Key1=k 11 k 12 k 13 k 14 .
[0084] Step three: the four components in the initial value key Key2 are k 21 , k 22 , k 23 , k 24 , respectively, are designed as follows:
[0085]
[0086] The expression of the key Key2 is: Key2=k 21 k 22 k 23 k 24 .
[0087] As a further scheme of the application: the generation method of the random sequences S1, S2, S3 and S4 is as follows:
[0088] Step one: substitute the initial value key Key1 into the chaotic system equation to generate a random sequence S with a length of q+wh / 2+2(w+h), wherein q is a random number generated by a pseudo-random integer generator G k (·), T is an image identifier, w is the image width, and h is the image height. The sequence S is divided into a random sequence S1 with a length of w+h, a random sequence S2 with a length of w+h, and a random sequence S3 with a length of wh / 2, respectively.
[0089] Step two: substitute the initial value key Key2 into the chaotic system equation to generate a sequence S with a length of q+wh / 2, and discard the first q values in S to obtain a random sequence S4 with a length of wh / 2.
[0090] As a further scheme of the application: the specific design process of the scrambling algorithm is as follows:
[0091] Step one: use a dynamic Joseph's scrambling method based on the random sequence S1 to process the row sequence of the plaintext image sub-block matrix to obtain a row scrambling sequence RC1.
[0092] Step two: use a dynamic Joseph's scrambling method based on the random sequence S2 to process the column sequence of the plaintext image sub-block matrix to obtain a column scrambling sequence RC2.
[0093] Step three: use S2 to perform a cyclic shift operation on each row of the plaintext image sub-block matrix to obtain an image matrix T1.
[0094] Step four: use the row scrambling sequence RC1 to perform column exchange scrambling on the matrix T1 to obtain a row scrambling matrix T2.
[0095] Step five: use the column scrambling sequence RC2 to perform a cyclic shift operation on each column of the matrix T2 to obtain the final scrambling result T3.
[0096] As a further scheme of the present application: the specific steps of the dynamic Joseph permutation method are as follows:
[0097] Step one: sequentially place the pixel sequence that needs to be subjected to row and column permutation operation on the Joseph ring.
[0098] Step two: use a random sequence S1 to generate a dynamic step length m for row permutation, and use a random sequence S2 to generate a dynamic step length m for column permutation. The generation method of the dynamic step length is m=S 1,2 mod n, wherein mod is the remainder symbol, and n is the number of remaining pixel sequence elements on the current ring.
[0099] Step three: start from the first element on the Joseph ring and use the set step length m to find the element to be removed from the ring.
[0100] Step four: take the removed element from the Joseph ring as a new starting point, continue to find the next element and remove it.
[0101] Step five: repeat step four until all elements are removed from the Joseph ring.
[0102] Step six: the elements removed from the Joseph ring one by one form a permutation sequence of a specific arrangement order.
[0103] Figure 1 When the image block size t = 8, 16, 32, the results of the dynamic Joseph permutation of the plaintext image are shown in (a) t = 8; (b) t = 16; (c) t = 32. It can be seen that the permuted image presents good uniformity in vision and has no obvious regularity or pattern. Regardless of the block size, the visual information of the original image is effectively disturbed, so that the permuted image cannot effectively identify the original content.
[0104] As a further scheme of the present application: the specific method of forward preserving and diffusion is as follows:
[0105] Step one: calculate the sum s of the pixel pair g1 = (a, b) composed of pixels a and b, s = a + b.
[0106] Step two: select the value of the i-th element in the random sequence S3, i being the i-th pixel group selected based on the zigzag permutation, to obtain a random number S3(i).
[0107] Step three: generate a random number x from x = S3(i) x 10 5 + s to obtain a random number pair G = (x, y), and x and y satisfy x + y = 0.
[0108] Step four: take the pixel pair g1=(a, b) and the random number pair G=(x, y) as the input of the encryption function SPE. The definition of the function SPE is as follows:
[0109]
[0110] Wherein the mod symbol represents a modulo operation, and the condition ConditionA is as follows:
[0111] ((a+xmod256) >=256 && (b+ymod256) <256) || ((a+xmod256) <256 && (b+ymod256) >=256), wherein && represents a logical and operation, and || represents a logical or operation.
[0112] Step five: synthesize the diffusion results of all pixel pairs based on the function SPE to obtain a forward preserving diffusion result, denoted as T4.
[0113] Figure 2 When the image block size t=8, 16, 32, the results of performing one forward preserving diffusion on the scrambled image are as follows: (a) t=8; (b) t=16; (c) t=32. It can be seen that, compared with the original scrambled image, one forward preserving diffusion has produced obvious visual confusion effect, and the structure information of each sub-block in the image is greatly destroyed.
[0114] As a further scheme of the present application, the specific method of the reverse preserving diffusion is as follows:
[0115] Step one: calculate the sum s of the pixel pair g2=(c, d) composed of pixels c and d, s=c+d.
[0116] Step two: select the value of the i-th element in the random sequence S4, i being the i-th pixel group selected based on the zigzag scrambling, so as to obtain a random number S4(i).
[0117] Step three: generate a random number x from x=S4(i) x 10 5 +s, so as to obtain a random number pair G=(x, y), and x and y satisfy x+y=0.
[0118] Step four: take the pixel pair g2=(c, d) and the random number pair G=(x, y) as the input of the decryption function SPD. The definition of the function SPD is as follows:
[0119]
[0120] Wherein the condition ConditionB is as follows:
[0121] ((c+ymod256) >= 256 && (d+xmod256) < 256) || ((c+ymod256) < 256 && (d+xmod256) >= 256)
[0122] Step five: combine the diffusion results of all pixel pairs based on function SPD to obtain the reverse preserving diffusion result, denoted as T5.
[0123] Figure 3 For when the image block size t = 8, 16, 32, the results of performing triple preserving diffusion on the scrambled image are: (a) t = 8; (b) t = 16; (c) t = 32. It can be seen that: after triple diffusion, the image presents nearly perfect visual uniformity in each sub-block, and looks completely like random noise, and it is almost impossible to distinguish any structure or pattern. The privacy gradually becomes stronger and the usability gradually becomes weaker as the image sub-block size becomes larger. Therefore, the usability and privacy of the encrypted image can be effectively balanced by adjusting the block size.
[0124] Figure 4 For when the image block size t = 8, 16, 32, 64, the success rate of using face recognition to attack the ciphertext image. It can be seen that: as the image sub-block size increases, the security of the ciphertext image also improves. When the image sub-block size reaches 32, the encrypted image obtained by using the encryption algorithm proposed in this paper can effectively resist face recognition attacks.
[0125] As shown in Figure 5 The thumbnail preserving encryption method of the present application mainly includes the following steps: step one: uniformly divide the plaintext image into multiple sub-blocks, and generate a thumbnail image according to the average pixel value of each sub-block; step two: calculate two hash values by taking the plaintext image and its thumbnail as the input of the SHA-256 function, and use the two hash values to disturb the initial value of the chaotic system, thereby generating keys Key1 and Key2; step three: select the step length of Joseph permutation, the number of bit shifts, and the sequence of row-column exchange based on the chaotic sequence generated by Key1, to realize the permutation of each sub-block; step four: group the permuted sub-blocks in groups of two pixels based on the Z-permutation sequence; step five: design two-pixel forward preserving diffusion and reverse preserving diffusion algorithms based on logical AND operation and logical OR operation by using keys Key1 and Key2, respectively; step six: perform forward preserving diffusion, reverse preserving diffusion, and forward preserving diffusion on the permuted sub-block image by using Key1, Key2, and Key1, respectively, to obtain the final encrypted image.
[0126] It will be apparent to those skilled in the art that the application is not limited to the details of the above-exemplified embodiments and that the present application can be implemented in other particular forms without departing from the spirit or essential characteristics of the present application. The embodiments should therefore be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the above description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. No reference signs in the claims should be considered as limiting the scope of the claims with respect to the figures of the patent document.
Claims
1. A method for maintaining encryption of thumbnails in big data resource cloud services based on triple protection and diffusion, characterized in that, A thumbnail-preserving encryption method that balances privacy and usability is achieved by designing a scrambling algorithm based on Josephus sequences and a triple-preserving diffusion algorithm based on logical AND and logical OR operations. This method includes the following steps: Step 1.1: Divide the plaintext image into multiple sub-blocks evenly, padding with zeros if necessary, and generate a thumbnail of the plaintext image based on the average pixel value of each sub-block; Step 1.2: Use the plaintext image and its thumbnail as input data for the SHA-256 hash function to calculate two hash values; Step 1.3: Perform multiple cross-XOR operations with the initial key on the two obtained hash values to obtain two sets of initial value keys Key1 and Key2 for the disturbed chaotic system; Step 1.4: Use the initial value keys Key1 and Key2 as the initial values of the chaotic system to obtain random sequences S1, S2, S3 and S4; Step 1.5: Using the random sequences S1 and S2 generated by Key1, design a scrambling algorithm based on the Josephus sequence to scramble each sub-block of the plaintext image; Step 1.6: Using the Z-shaped scrambling as the selection order, group all elements in each sub-block scrambling image into groups, with each group containing two pixel values; Step 1.7: Use the random sequence S3 generated by Key1 to perform a forward summation and diffusion operation on all pixel groups in the block; Step 1.8: Use the random sequence S4 generated by Key2 to perform a reverse summation and diffusion operation on the result of Step 1.7; Step 1.9: Using the random sequence S3 generated by Key1, perform a forward conservation and diffusion operation on the result of Step 1.8 to obtain the final encrypted image; A triple sum-preserving diffusion algorithm based on logical AND and logical OR operations is designed to achieve efficient diffusion of scrambled images. In steps 1.7 and 1.9, taking the basic pixel pair g1=(a, b) in the sub-block scrambled image as an example, the specific method of forward sum-preserving diffusion is as follows: Step 1: Calculate the sum of pixel pairs g1 = (a, b) consisting of pixels a and b, where sum1 = a + b; Step 2: Select the value of the i-th element in the random sequence S3, where i is the i-th pixel group selected based on the Z-shaped scrambling, thus obtaining the random number S3(i); Step 3: From Generate a random number x, and obtain a random number pair G1=(x1,y1), where x1 and y1 satisfy x1+y1=0; Step 4: Use the pixel pair g1=(a,b) and the random number pair G1=(x1,y1) as input to the encryption function SPE; the function SPE is defined as follows: The mod symbol represents the modulo operation, and ConditionA is represented as follows: Where && represents the logical AND operation, and || represents the logical OR operation; Step 5: Combine the diffusion results of all pixel pairs based on the SPE function to obtain the forward summation diffusion result, denoted as T4.
2. The method for maintaining and encrypting thumbnails of big data resource cloud services based on triple protection and diffusion as described in claim 1, characterized in that, In step 1.3, the method for generating the initial key values Key1 and Key2 is as follows: Step 2.1: Use the plaintext image and its corresponding thumbnail as input data for the SHA-256 hash function to calculate two 64-bit hexadecimal numbers h(x)∈{0, 1, 2, ... 14, 15} and H(x)∈{0, 1, 2, ... 14, 15}, where x=[1, 2, 3 ... 63, 64]; Step 2.2: The four components of the initial key Key1 are k 11 k 12 k 13 k 14 They are designed as follows: Where H=15 is the initial value of the key; The expression for key1 is: ; Step 2.3: The four components of the initial key Key2 are k 21 k 22 k 23 k 24 They are designed as follows: The expression for key2 is: .
3. The method for maintaining and encrypting thumbnails of big data resource cloud services based on triple protection and diffusion as described in claim 1, characterized in that, In step 1.4, the random sequences S1, S2, S3, and S4 are generated as follows: Step 3.1: Substitute the initial key Key1 into the chaotic system equation to generate a random sequence S of length q+wh / 2+2(w+h), where q is a random number generated by the pseudo-random integer generator Gk(·), T is the image identifier, w is the image width, and h is the image height; split the sequence S into a random sequence S1 of length w+h, a random sequence S2 of length w+h, and a random sequence S3 of length wh / 2. Step 3.2: Substitute the initial value key Key2 into the chaotic system equation to generate a random sequence S of length q+wh / 2. Discard the first q values in S to obtain a random sequence S4 of length wh / 2.
4. The method for maintaining and encrypting thumbnails of big data resource cloud services based on triple protection and diffusion as described in claim 1, characterized in that, The specific design process of the scrambling algorithm based on the Josephus sequence in step 1.5 is as follows: Step 4.1: Process the row sequence of the plaintext image sub-block matrix using the dynamic Josephus scrambling method based on the random sequence S1 to obtain the row scrambling sequence RC1; Step 4.2: Use the dynamic Josephus scrambling method based on random sequence S2 to process the column sequence of the plaintext image sub-block matrix to obtain the column scrambling sequence RC2; Step 4.3: Use S2 to perform a cyclic shift operation on each row of the plaintext image sub-block matrix to obtain the image matrix T1; Step 4.4: Use the row scrambling sequence RC1 to perform column swapping scrambling on matrix T1 to obtain row scrambling matrix T2; Step 4.5: Use the column scrambling sequence RC2 to perform a cyclic shift operation on each column of matrix T2 to obtain the final scrambling result T3.
5. The scrambling algorithm based on Josephus sequences according to claim 4, characterized in that, The plaintext image sub-block matrix is scrambled using a dynamic Josephus scrambling method, cyclic shifting operations, and row-column swapping scrambling. The specific steps of the dynamic Josephus scrambling method in steps 4.1 and 4.2 are as follows: Step 5.1: Place the pixel sequence that needs to be scrambled in rows and columns onto the Josephus ring in sequence; Step 5.2: Use random sequence S1 to generate dynamic step size m1 for row scrambling, and use random sequence S2 to generate dynamic step size m2 for column scrambling; the dynamic step size is generated by m1=S1mod n, m2=S2mod n, where mod is the modulo operator, and n is the number of remaining pixel sequence elements on the current ring. Step 5.3: Starting from the first element on the Josephus ring, use the set step size m to find the element to be removed from the ring; Step 5.4: Starting with the element removed from the Josephus ring, continue searching for and removing the next element; Step 5.5: Repeat step 5.4 until all elements have been removed from the Josephus ring; Step 5.6: Arrange the elements that have been removed one by one from the Josephus ring into a scrambled sequence with a specific order.
6. The method for maintaining and encrypting thumbnails of big data resource cloud services based on triple protection and diffusion as described in claim 1, characterized in that, In step 1.8, taking the basic pixel pair g2=(c,d) in the sub-block scrambled image as an example, the specific method of reverse sum-preserving diffusion is as follows: Step 6.1: Calculate the sum of pixel pairs g2=(c,d) consisting of pixels c and d, sum2=c+d; Step 6.2: Select the value of the j-th element in the random sequence S4, where j is the j-th pixel group selected based on the Z-shaped scrambling, thus obtaining the random number S4(j); Step 6.3: From Generate a random number x, and obtain a random number pair G2=(x2, y2), where x2 and y2 satisfy x2+y2=0; Step 6.4: Use the pixel pair g2=(c, d) and the random number pair G2=(x2, y2) as input to the decryption function SPD; the function SPD is defined as follows: Condition B is represented as follows: Step 6.5: Combine the diffusion results of all pixel pairs based on the SPD function to obtain the reverse summation diffusion result, denoted as T5.
Citation Information
Patent Citations
Image encryption method based on Y-shaped filling curve and variable-step Josephh traversal
CN112202545A
Hyper-chaotic encryption method based on Josephf traversal and bit plane reconstruction
CN112422266A