Image scrambling method based on dynamic diamond transformation

Through the image scrambling method based on dynamic diamond transformation, the image is scrambling operation, which solves the problems of low encryption efficiency, weak security or decrypted image distortion in the prior art, and achieves an efficient and secure image encryption effect.

CN119653022APending Publication Date: 2025-03-18CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411784098.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing image encryption methods have problems such as low encryption efficiency, weak security, or distortion of decryption images.

Method used

The image scrambling method based on dynamic rhombus transformation is adopted, and the original image is scrambling operation is performed by selecting the scanning center point, calculating the number of rhombus, generating chaotic sequences, chaotic sequence sorting and dynamic rhombus transformation.

Benefits of technology

It achieves good encryption effect, high encryption efficiency, and can effectively protect the security of images in transmission and storage, avoiding image distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653022A_ABST
    Figure CN119653022A_ABST
Patent Text Reader

Abstract

With the rapid development of the network technology, the security problem of the image in the transmission process is increasingly prominent. The invention provides an image encryption method based on dynamic diamond transformation in order to solve the security problem of an image in a network transmission process. Firstly, a scanning center point is randomly selected; secondly, calculating the maximum value of Manhattan distances from a scanning center point to four corners of the image as the number of rhombuses; thirdly, determining the traversal sequence of different rhombuses by using a chaos sequence; and finally, according to the scanning center point and the traversal sequence, carrying out dynamic diamond transformation on the image to obtain a scrambled image. Experimental results show that the method is wide in application range, good in encryption effect, high in safety and capable of guaranteeing efficient and safe transmission of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an information encryption technology, in particular to an image encryption method. Background Art

[0002] With the continuous development of internet technology, people's lives, work, study, and communication are all closely connected to the internet. Because images offer a more intuitive way to express information than text, conveying information through images is becoming increasingly popular. However, these images often contain private information, making them vulnerable to unauthorized attacks during network transmission, leading to information leakage and tampering, posing a significant threat. Consequently, image encryption has become a hot topic in both academia and industry.

[0003] Digital images carry a large amount of information and are an important carrier of information transmission. However, due to the large amount of data, high redundancy, and strong correlation between pixels in image data, traditional encryption methods are often inefficient and ineffective when processing image data.

[0004] In order to protect image information from being stolen and improve the security and efficiency of the algorithm during network transmission, an image scrambling method based on dynamic diamond transformation is proposed. This method improves the security and efficiency of the method through dynamic diamond transformation. Summary of the Invention

[0005] The purpose of this invention is to address the problems of low encryption efficiency, weak security or decrypted image distortion in existing image encryption methods, and propose an image scrambling method based on dynamic diamond transformation.

[0006] Technical solution of the present invention: To achieve the above-mentioned purpose of the invention, the technical solution adopted is an image scrambling method based on dynamic diamond transformation. The scrambling steps are detailed as follows:

[0007] Step 1: Select the scanning center point: Let the original image be I, with a size of m×n, and randomly select integers c1∈{1,2,...,m} and c2∈{1,2,...,n} to form the scanning center point (c1,c2);

[0008] Step 2: Calculate the number of rhombuses: In I, count the pixels with the same Manhattan distance to (c1, c2) to form a series of rhombuses; use formulas (1)-(4) to calculate the Manhattan distances h1, h2, h3 and h4 from (c1, c2) to the upper left corner (1, 1), upper right corner (1, n), lower left corner (m, 1) and lower right corner (m, n) of I respectively. h1=abs(c1-1)+abs(c2-1), (1) h2=abs(c1-1)+abs(c2-n), (2) h3=abs(c1-m)+abs(c2-1), (3) h4=abs(c1-m)+abs(c2-n), (4) Where abs(·) is the absolute value function; the number of rhombuses h is calculated using formula (5), h=max(h1,h2,h3,h4), (5) Among them, max(·) is the maximum value function;

[0009] Step 3: Generate chaotic sequence: Logistic mapping is: x t+1 =rx t (1+x t ), (6) Among them, r∈[3.57,4) is the control parameter, x t ∈(0,1); randomly select r and initial value x0, iterate formula (6) 2000+h times and discard the first 2000 sequence values ​​to obtain a chaotic sequence K1 with a length of h;

[0010] Step 4: Chaotic sequence sorting: Use formula (7) to sort K1 and obtain an index value sequence P with a length of h. [K2,P]=sort(K1), (7) Among them, sort(·) is the ascending sorting function, and K2 is the new chaotic sequence after sorting;

[0011] Step 5: Dynamic diamond transformation: First, with (c1, c2) as the scanning center point, all pixel points on the p1∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S1; secondly, all pixel points on the p2∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S2; ...; thirdly, all pixel points on the p2∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S2; h All pixel points on the ∈P rhombuses are traversed in turn to form a one-dimensional sequence S h ; When traversing each pixel, it is necessary to determine whether the pixel is an element in I. If so, the pixel is placed in the corresponding one-dimensional sequence; otherwise, the pixel is no longer placed in the corresponding one-dimensional sequence; finally, S1, S2, ..., S h Connect them end to end in sequence to generate a one-dimensional sequence S, and then convert S into a two-dimensional image E of size m×n, which is the final scrambled image.

[0012] The image decryption process is the inverse process of image scrambling.

[0013] Beneficial effects: In order to solve the problems of low encryption efficiency, weak security or decrypted image distortion in existing image encryption algorithms, an image scrambling method based on dynamic diamond transformation is proposed. The main contributions are as follows: (1) In the original image, a dynamic diamond transformation is designed based on the characteristic that a set of pixel points with equal Manhattan distance to the scanning center point forms a diamond; (2) Using the dynamic diamond transformation, an image scrambling method based on dynamic diamond transformation is proposed to realize the scrambling operation of the original image; (3) Experimental results and method analysis show that the new method has good encryption effect and high encryption efficiency, and can effectively protect the security of images during transmission and storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 : Scrambling flow chart;

[0015] Figure 2 : original image;

[0016] Figure 3 : scramble the image;

[0017] Figure 4 : Schematic diagram of dynamic diamond transformation of 5×5 matrix. Implementation Method

[0018] The implementation process of the present invention is further described in detail below with reference to specific drawings and examples.

[0019] Figure 1 This is the scrambling flow chart of this method.

[0020] The programming software used was Matlab R2023a, and the public database USC-SIPI (URL: Http: / / sipi.usc.edu / database) was selected. Figure 2 The grayscale image of Bridge with a size of 512×512 is used as the experimental object. The detailed process of encrypting the original image using this method is described as follows.

[0021] Step 1: Select the scanning center point: Let the original image be I, the size be 512×512, randomly select c1=367, randomly select c2=172, then the scanning center point is (367,172).

[0022] Step 2: Calculate the number of rhombuses: Use formulas (1)-(5) to calculate the number of rhombuses h, which is 706.

[0023] Step 3: Randomly select the control parameter r = 3.8164 and the initial value x0 = 0.624, iterate formula (6) 2000 + 706 times and discard the first 2000 sequence values ​​to obtain a chaotic sequence K1 with a length of 706.

[0024] Step 4: Chaotic sequence sorting: Use formula (7) to sort K1 and obtain an index value sequence P with a length of 706.

[0025] Step 5: Dynamic diamond transformation: First, with (c1, c2) as the scanning center point, all pixel points on the p1∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S1; secondly, all pixel points on the p2∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S2; ...; thirdly, all pixel points on the p2∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S2; h All pixel points on the ∈P rhombuses are traversed in turn to form a one-dimensional sequence S h ; When traversing each pixel, it is necessary to determine whether the pixel is an element in I. If so, the pixel is placed in the corresponding one-dimensional sequence; otherwise, the pixel is no longer placed in the corresponding one-dimensional sequence; finally, S1, S2, ..., S h Connect them end to end to generate a one-dimensional sequence S, and then convert S into a two-dimensional image E of size 512×512, which is the final scrambled image

[0026] Taking a 5×5 matrix as an example, the scrambling process of the image scrambling method based on dynamic diamond transformation is as follows: Figure 4 shown.

[0027] The image decryption process is the inverse process of image scrambling.

Claims

1. The image scrambling method based on dynamic diamond transformation is characterized by: The scrambling process includes the following steps: Step 1: Select the scanning center point: Let the original image be I, with a size of m×n, and randomly select integers c1∈{1,2,...,m} and c2∈{1,2,...,n} to form the scanning center point (c1,c2); Step 2: Calculate the number of rhombuses: In I, count the pixels with the same Manhattan distance from (c1, c2) to form a series of rhombuses; use formulas (1)-(4) to calculate the Manhattan distances h1, h2, h3 and h4 from (c1, c2) to the upper left corner (1, 1), upper right corner (1, n), lower left corner (m, 1) and lower right corner (m, n) of I, respectively. h1=abs(c1-1)+abs(c2-1), (1) h2=abs(c1-1)+abs(c2-n), (2) h3=abs(c1-m)+abs(c2-1), (3) h4=abs(c1-m)+abs(c2-n), (4) Where abs(·) is the absolute value function; the number of rhombuses h is calculated using formula (5), h=max(h1,h2,h3,h4), (5) Among them, max(·) is the maximum value function; Step 3: Generate chaotic sequence: Logistic mapping is: x t+1 =rx t (1+x t ), (6) Among them, r∈[3.57,4) is the control parameter, x t ∈(0,1); randomly select r and initial value x0, iterate formula (6) 2000+h times and discard the first 2000 sequence values ​​to obtain a chaotic sequence K1 with a length of h; Step 4: Chaotic sequence sorting: Use formula (7) to sort K1 and obtain an index value sequence P with a length of h. [K2,P]=sort(K1), (7) Among them, sort(·) is the ascending sorting function, and K2 is the new chaotic sequence after sorting; Step 5: Dynamic diamond transformation: First, with (c1, c2) as the scanning center point, all pixel points on the p1∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S1; secondly, all pixel points on the p2∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S2; ...; thirdly, all pixel points on the p2∈Pth diamond extending outward from (c1, c2) are traversed in sequence to form a one-dimensional sequence S2; h All the pixels on the ∈P rhombuses are traversed in turn to form a one-dimensional sequence S h ; When traversing each pixel, it is necessary to determine whether the pixel is an element in I. If so, the pixel is placed in the corresponding one-dimensional sequence; otherwise, the pixel is no longer placed in the corresponding one-dimensional sequence; finally, S1, S2, ..., S h They are connected end to end in sequence to generate a one-dimensional sequence S, and then S is converted into a two-dimensional image E of size m×n, which is the final scrambled image.