Image encryption method realized based on combination of ZUC algorithm and improved Arnold algorithm

By combining the ZUC algorithm and the improved Arnold algorithm, image filling, RC scrambling and image splitting are performed, and sub-images are Arnold scrambling, the problems of poor anti-cropping attack capabilities and complex calculations in the prior art are solved, and efficient and secure image encryption is achieved.

CN120201132AActive Publication Date: 2025-06-24XINCHAO RUISHI INFORMATION TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510667685.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-06-24
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

The prior art has poor anti-cropping attack capabilities in image encryption, complex calculations and slow speeds, and the ZUC algorithm lacks diffusion link design, and the Arnold algorithm has a large amount of calculation when processing super-large images and is limited by image size.

Method used

Combining the ZUC algorithm and the improved Arnold algorithm, the image is decomposed into sub-images through image filling, RC scrambling and image splitting, the sub-image is Arnold scrambling, and the scrambling parameters are judged and reassigned.

Benefits of technology

It improves the anti-cropping attack capability of image encryption, has a faster encryption speed and high security, and solves the problem that the Arnold algorithm is limited by image size.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201132A_ABST
    Figure CN120201132A_ABST
Patent Text Reader

Abstract

The invention discloses an image encryption method based on the combination of a ZUC algorithm and an improved Arnold algorithm, relates to the technical field of image encryption, and is characterized in that an image is decomposed into sub-images through image filling, RC scrambling and image splitting, and Arnold scrambling is carried out on the sub-images. In order to solve the problem that Arnold scrambling may cause scrambling failure due to image scrambling parameter errors, whether image scrambling parameters are available or not is judged and re-assigned. The image encryption requirement can be met, the encryption speed is high, the security is high, and the problem that the Arnold algorithm is limited by the image size is solved.
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 particularly relates to an image encryption method implemented by combining the ZUC algorithm and an improved Arnold algorithm. Background Art

[0002] The ZUC algorithm, also known as the Zu Chongzhi algorithm, is a word-oriented integrity sequence algorithm independently developed in China. In September 2011, the encryption algorithm 128-EEA3 with the ZUC-128 algorithm as the core and the integrity algorithm 128-EIA3 independently designed in China officially became the LTE international communication encryption standard.

[0003] The Arnold algorithm achieves the purpose of masking important information in an image by changing the positions of pixel points in the image matrix. Compared with algorithms specifically used for image encryption such as chaotic sequences, image scrambling has simple calculation and relatively small computational complexity, and is suitable as a preprocessing process for image encryption. The significance of image scrambling lies in preprocessing the image before encryption through scrambling transformation technology, so that a meaningful image becomes a meaningless and disorderly image after scrambling transformation.

[0004] Traditional encryption algorithms have the problem of poor anti-cropping attack ability in image encryption; the calculations used in image encryption schemes based on chaotic sequences are relatively complex and slow in actual applications; as a stream cipher, the ZUC algorithm does not have the design of the diffusion link in symmetric ciphers and performs poorly in the face of attacks on image encryption such as cropping attacks; for the Arnold image scrambling algorithm, when the modulo operation is used and the image size is a prime number, there are problems of large computational complexity and slow computational speed when processing super-large images, and it can only scramble square images, being greatly limited by the image size. Summary of the Invention

[0005] In order to overcome the above deficiencies in technology, the present invention provides a method for image encryption by combining an improved Arnold algorithm and the ZUC algorithm.

[0006] The technical solution adopted by the present invention to overcome its technical problems is: An image encryption method implemented by combining the ZUC algorithm and an improved Arnold algorithm, comprising: a) Input the original image, the size of the original image is , and the element value of each pixel point in the original image is within the range of [0, 255], where is the height of the original image, and is the width of the original image; b) Determine whether the original image is a grayscale image. If it is not a grayscale image, convert it to a grayscale image image_gray; c) Obtain the filled image based on the grayscale image image_gray, and the size of the filled image is , is the height of the filled image, is the width of the filled image; d) Calculate the offset of the RC scrambling after assignment , the number of scrambling rounds of the Arnold scrambling algorithm after assignment , the scrambling parameter of the Arnold scrambling algorithm after assignment and the scrambling parameter ; e) Perform RC scrambling on the filled image according to the offset to obtain the image after RC scrambling ; f) Split the offset image to obtain sub-images; g) Obtain the scrambled image image_scrambling according to sub-images; h) Execute the ZUC-256 algorithm, and save the 32-bit key words output by the ZUC-256 algorithm each time as the key stream ZUC_Key_stream, and the length of the key stream ZUC_Key_stream is ; i) Use the key stream ZUC_Key_stream with a length of to perform bitwise XOR on the scrambled image image_scrambling to obtain the ciphertext image image_encryption.

[0007] Furthermore, in step b), the original image is converted into the grayscale image image_gray through the rgb2gray() function in MATLAB.

[0008] Furthermore, step c) includes the following steps: c-1) Calculate the height of the filled image through the formula , where is the segmentation parameter, takes a value that is an integer multiple of 4, is the ceiling operation, and calculate the width of the filled image through the formula ; c-2) Fill the pixel points of each row of the grayscale image image_gray on the right side of each row with Character 0, fill the pixels of each column of the grayscale image image_gray at the bottom of each column characters 0, the size is The padded image, , .

[0009] Further, step d) comprises the following steps: d-1) Through the formula Calculate the offset of the RC scrambling after the first assignment , the number of scrambling rounds of the Arnold scrambling algorithm after the first assignment , the scrambling parameters of the Arnold scrambling algorithm after the first assignment And scrambling parameters , where For the size The calculation is performed in a finite field of For modular operation, is the initial RC scrambling offset, is the scrambling parameter of the initial Arnold scrambling algorithm, is the scrambling parameter of the initial Arnold scrambling algorithm, is the number of scrambling rounds of the initial Arnold scrambling algorithm, is the reassignment matrix, .

[0010] d-2) Through the formula Calculate the offset of the RC scrambling after assignment , the number of scrambling rounds of the Arnold scrambling algorithm after assignment , the scrambling parameters of the Arnold scrambling algorithm after assignment And scrambling parameters .

[0011] Further, step e) comprises the following steps: e-1) Perform scrambling operation on the image after RC scrambling by row, and the first row of the padded image Behavior , , the scrambling method is: when hour, ; when hour, ; when hour, ; when hour, ; e-2) Perform a scrambling operation on the filled image column by column to obtain the scrambled image . The th column of the filled image is , . The scrambling method is as follows: When , ; When , ; When , ; When , ; e-3) Perform an offset operation on the scrambled image column by column to obtain the offset image . The offset method is as follows: , where is the th column of the scrambled image , ; e-4) Perform an offset operation on the offset image row by row to obtain the offset image . The offset method is as follows: , where is the th row of the RC-scrambled image , .

[0012] Furthermore, in step f), the number of sub-images is calculated through the formula , and the offset image is split into square sub-images.

[0013] Furthermore, in step g), according to the scrambling round number of the assigned Arnold scrambling algorithm, the scrambling parameter of the assigned Arnold scrambling algorithm, and the scrambling parameter , the Arnold scrambling algorithm is used to perform Arnold scrambling on square sub-images respectively. The square sub-images after scrambling are spliced according to the positions before splitting to obtain the scrambled image image_scrambling.

[0014] Further, in step h), the length of the key stream ZUC_Key_stream is calculated through the formula .

[0015] The beneficial effects of the present invention are as follows: By performing image padding, RC scrambling, and image splitting, the image is decomposed into sub-images, and the Arnold scrambling is performed on the sub-images. To solve the problem that the Arnold scrambling may fail due to incorrect image scrambling parameters, the availability of the image scrambling parameters is determined and re-assigned. It can meet the image encryption requirements, has a relatively fast encryption speed and high security, and solves the problem limited by the image size in the Arnold algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] The following further describes the present invention in conjunction with the attached Figure 1 drawings.

[0018] An image encryption method implemented by combining the ZUC algorithm and the improved Arnold algorithm includes: a) Input the original image, the size of the original image is , and the element value of each pixel point in the original image is in the range of [0, 255], where is the height of the original image, and is the width of the original image.

[0019] b) Determine whether the original image is a grayscale image. If it is not a grayscale image, convert it to a grayscale image image_gray.

[0020] c) Obtain the padded image according to the grayscale image image_gray. The size of the padded image is , is the height of the padded image, is the width of the padded image.

[0021] d) Calculate the offset after the RC scrambling is assigned, the scrambling rounds of the Arnold scrambling algorithm after the assignment, the scrambling parameter of the Arnold scrambling algorithm after the assignment, and the scrambling parameter .

[0022] e) Perform RC scrambling on the padded image according to the offset to obtain the RC-scrambled image .​

[0023] f) For the offset image perform splitting to obtain sub-images.

[0024] g) Based on the sub-images, obtain the scrambled image image_scrambling.

[0025] h) Execute the ZUC-256 algorithm, and save the 32-bit key words output by the ZUC-256 algorithm each time as the key stream ZUC_Key_stream, and the length of the key stream ZUC_Key_stream is .

[0026] i) Use the key stream ZUC_Key_stream with a length of to perform bitwise exclusive OR on the scrambled image image_scrambling to obtain the ciphertext image image_encryption.

[0027] In an embodiment of the present invention, in step b), the original image is converted into a grayscale image image_gray through the rgb2gray() function in MATLAB.

[0028] By filling the image, performing RC scrambling, and splitting the image, the image is decomposed into sub-images, and the Arnold scrambling is performed on the sub-images. To solve the problem that the Arnold scrambling may fail due to incorrect image scrambling parameters, the availability of the image scrambling parameters is determined and re-assigned. It can meet the image encryption requirements, has a relatively fast encryption speed and high security, and solves the problem restricted by the image size in the Arnold algorithm.

[0029] In an embodiment of the present invention, step c) includes the following steps: c-1) Calculate the height of the filled image through the formula , where is the segmentation parameter, takes values that are integer multiples of 4, is the ceiling operation, and calculate the width of the filled image through the formula .

[0030] c-2) Fill each pixel point in each row of the grayscale image image_gray with characters '0' on the right side of each row, and fill each pixel point in each column of the grayscale image image_gray with characters '0' below each column to obtain a size of The filled image, , .

[0031] In an embodiment of the present invention, step d) includes the following steps: d-1) By the formula Calculate the offset of the RC scrambling after the first assignment , the number of scrambling rounds of the Arnold scrambling algorithm after the first assignment , the scrambling parameter of the Arnold scrambling algorithm after the first assignment and the scrambling parameter , where is calculated within the finite field of size , is the modulo operation, is the initial offset of the RC scrambling, is the initial scrambling parameter of the Arnold scrambling algorithm, is the initial scrambling parameter of the Arnold scrambling algorithm, is the initial number of scrambling rounds of the Arnold scrambling algorithm, is the re-assignment matrix, .

[0032] d-2) By the formula Calculate the offset of the RC scrambling after the assignment , the number of scrambling rounds of the Arnold scrambling algorithm after the assignment , the scrambling parameter of the Arnold scrambling algorithm after the assignment and the scrambling parameter .

[0033] In an embodiment of the present invention, step e) includes the following steps: e-1) Perform a row-wise scrambling operation on the image after RC scrambling. The th row of the filled image is , , and the scrambling method is: When , ; When , ; When , ; When , .

[0034] e-2) Perform a scrambling operation on the filled image column by column to obtain the scrambled image. , and the th column of the filled image is , , and the scrambling method is: When , ; When , ; When , ; When , .

[0035] e-3) Perform an offset operation on the scrambled image column by column to obtain the offset image , and the offset method is: , where is the th column of the scrambled image , .

[0036] e-4) Perform an offset operation on the offset image row by row to obtain the offset image , and the offset method is: , where is the th row of the RC-scrambled image , .

[0037] In an embodiment of the present invention, in step f), the number of sub-images is calculated through the formula , and the offset image is split into square sub-images.

[0038] In an embodiment of the present invention, in step g), according to the scrambling round number of the assigned Arnold scrambling algorithm, the scrambling parameter of the assigned Arnold scrambling algorithm, and the scrambling parameter , the Arnold scrambling algorithm is used to perform Arnold scrambling on square sub-images respectively, and the The sub-images of the square are spliced according to their positions before splitting to obtain the scrambled image image_scrambling.

[0039] In an embodiment of the present invention, in step h), through the formula the length of the key stream ZUC_Key_stream is calculated .

[0040] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm, characterized in that Including: a) Input the original image, and the size of the original image is , and the element value of each pixel point in the original image is within the range of [0, 255], where is the height of the original image, and is the width of the original image; b) Determine whether the original image is a grayscale image. If it is not a grayscale image, convert it to a grayscale image image_gray; c) Obtain the filled image based on the grayscale image image_gray, and the size of the filled image is , is the height of the filled image, is the width of the filled image; d) Calculate the offset of the RC scrambling after assignment , the number of scrambling rounds of the Arnold scrambling algorithm after assignment , the scrambling parameters of the Arnold scrambling algorithm after assignment and the scrambling parameters ; e) According to the offset Perform RC scrambling on the filled image to obtain the RC-scrambled image ; f) Split the offset image to obtain sub-images; g) According to sub-images, the scrambled image image_scrambling is obtained; h) Execute the ZUC-256 algorithm, and save the 32-bit key words output by the ZUC-256 algorithm each time as the key stream ZUC_Key_stream, and the length of the key stream ZUC_Key_stream is ; i) Use the key stream ZUC_Key_stream with a length of to perform a bitwise exclusive OR on the scrambled image image_scrambling to obtain the encrypted image image_encryption.

2. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 1, wherein: In step b), the original image is converted to the grayscale image image_gray through the rgb2gray() function in MATLAB.

3. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 1, wherein Step c) includes the following steps: c-1) Calculate the height of the filled image through the formula , where is the segmentation parameter, takes values that are integer multiples of 4, is the ceiling operation, and calculate the width of the filled image through the formula ; c-2) Fill the pixels of each row of the grayscale image image_gray with character 0s on the right side of each row, and fill the pixels of each column of the grayscale image image_gray with character 0s below each column to obtain a padded image with a size of , , characters 0, and for each column of pixels in the grayscale image image_gray, fill characters 0 below each column to obtain a padded image with a size of , , .

4. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 3, characterized in that, Step d) includes the following steps: d-1) Through the formula Calculate the offset of the RC scrambling after the first assignment , the number of scrambling rounds of the Arnold scrambling algorithm after the first assignment , the scrambling parameter of the Arnold scrambling algorithm after the first assignment and the scrambling parameter , where is for calculation within a finite field of size , is the modulo operation is the initial offset of the RC scrambling is the initial scrambling parameter of the Arnold scrambling algorithm is the initial scrambling parameter of the Arnold scrambling algorithm is the initial number of scrambling rounds of the Arnold scrambling algorithm is the re-assignment matrix ; d-2) Obtained through the formula The offset of the RC scrambling after assignment , the number of scrambling rounds of the Arnold scrambling algorithm after assignment , the scrambling parameters of the Arnold scrambling algorithm after assignment and the scrambling parameter .

5. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 1, characterized in that Step e) includes the following steps: e-1) Perform a scrambling operation on the RC-scrambled image row by row. The row of the filled image is , , and the scrambling method is as follows: When , ; When then ; When then ; When then ; e-2) Perform a scrambling operation on the filled image column by column to obtain the scrambled image , the th column of the filled image is , , and the scrambling method is as follows: When then ; When then ; When then ; When then ; e-3) Opposed scrambled image Perform an offset operation column by column to obtain the offset image , and the offset method is as follows: , where is the scrambled image of the th column, ; e-4) For the offset image Perform an offset operation row by row to obtain the offset image , and the offset method is as follows: , where is the image after RC scrambling of the th row, .

6. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 3, characterized in that: In step f), the number of sub-images is calculated through the formula , and the offset image is split into square sub-images. ​ 7. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 1, characterized in that: In step g), according to the number of scrambling rounds of the Arnold scrambling algorithm after assignment , the scrambling parameters of the Arnold scrambling algorithm after assignment and the scrambling parameters Use the Arnold scrambling algorithm to respectively scramble the sub-images of the squares, and splice the scrambled sub-images of the squares according to the positions before splitting to obtain the scrambled image image_scrambling.

8. The image encryption method based on the combination of the ZUC algorithm and the improved Arnold algorithm according to claim 3, characterized in that: In step h), the length of the key stream ZUC_Key_stream is calculated through the formula .​

Citation Information

Patent Citations

  • Fractional domain image encryption method based on Arnold transformation and compound chaos

    CN105447396A

  • H.264 entropy coding video encryption method based on ZUC algorithm

    CN108174207A

  • Delay chaotic image encryption method based on Arnold mapping and multi-shift mapping function

    CN115499557A

  • Parallel image encryption method based on chaotic system and stream cipher

    CN117155537A

  • Anti-counterfeiting and encryption method based on random image scrambling technique

    WO2021104344A1