An image compression and encryption method combining fractals and chaos

By combining fractal coding and chaos theory in image compression and encryption methods, and utilizing ICMIC chaotic mapping and pseudo-random sequences, the balance between efficiency and security in image compression and encryption technologies is solved, achieving efficient image data transmission and storage.

CN114584670BActive Publication Date: 2026-06-30HARBIN INST OF TECH AT WEIHAI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH AT WEIHAI
Filing Date
2022-03-07
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing image compression and encryption technologies struggle to balance data security and storage costs while improving transmission efficiency.

Method used

Combining fractal coding and chaos theory, an image compression and encryption method is designed. It uses ICMIC chaotic mapping to generate pseudo-random sequences to encrypt the compressed data, including scrambling and diffusion operations. The method combines a fractal compression module, a pseudo-random sequence generation module, and a chaotic encryption module.

Benefits of technology

It achieves efficient image data encryption, improves data security and transmission efficiency, reduces storage costs, and ensures security and compression when transmitting image data over public networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114584670B_ABST
    Figure CN114584670B_ABST
Patent Text Reader

Abstract

This invention discloses an image compression and encryption method combining fractals and chaos, belonging to the field of multimedia information security technology. While fractal coding offers excellent image compression characteristics, it neglects security considerations. Therefore, this invention designs a secure image compression and encryption method combining fractals and chaos. The method utilizes ICMIC chaotic mapping to generate pseudo-random sequences. Based on the characteristics of fractal coding, a highly efficient encryption method based on chaos is designed to ensure both compression and security performance. Theoretical analysis and experimental results show that the proposed method has high security, does not affect the compression ratio, and simultaneously guarantees good reconstruction results for lossy compression, demonstrating broad application prospects and practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multimedia information security technology, specifically relating to an image compression and encryption method that combines fractals and chaos. Background Technology

[0002] With the rapid development of multimedia information and social networks, image data has become an important carrier of network information. The demand for secure transmission of image data in public networks has also increased dramatically, drawing attention to image compression and encryption. The aim is to improve transmission efficiency while protecting the security of multimedia content.

[0003] Fractal image coding is an effective image compression technique that utilizes the local self-similarity between image patches to eliminate redundancy in image data, achieving high compression ratios and high-quality reconstructed images. [1] Fractal parameters control the details of iterative transformations, and this method of simply storing or transmitting parameters can achieve a very high compression ratio.

[0004] Researchers are using a variety of different techniques to protect images, such as data hiding. [2] Watermark [3] and encryption [4,5] Among these, image encryption is the most direct method, converting a meaningful image into an unrecognizable, noise-like image. [6] A chaotic system is a mathematical model or equation describing chaotic behavior, possessing characteristics such as randomness, unpredictability, and nonlinearity, which can satisfy image encryption requirements. [7] Due to the requirements of this theory, chaos theory is one of the most closely watched technologies by researchers.

[0005] Based on fractal coding technology and chaos theory, this invention designs a novel image compression and encryption method to meet the current needs for image data security, transmission efficiency, and storage cost. This invention achieves good results in both security and compression aspects. Summary of the Invention

[0006] This invention leverages the superior compression properties of fractal compression and incorporates encryption methods based on chaos theory. This novel image processing method ensures data security while improving data storage and transmission efficiency, meeting the needs of digital image transmission over public networks and finding extremely wide applicability.

[0007] This invention addresses the characteristics of fractal coding by effectively encrypting the compressed data. It utilizes ICMIC chaotic mapping to generate pseudo-random sequences and designs a highly efficient encryption method based on these sequences, enabling rapid encryption and decryption. This effectively compensates for the time-consuming nature of fractal coding. This invention ensures good security, compressibility, and operability of fractal compression coding.

[0008] The technical solution adopted by this invention to solve the above-mentioned technical problems is: designing an image compression and encryption method that combines fractals and chaos.

[0009] This invention relates to three main modules: a fractal compression module, a pseudo-random sequence generation module, and a chaotic encryption module.

[0010] 1. ICMIC Chaotic Mapping and Pseudo-Random Sequence Generation

[0011] The ICMIC map (infinitely folding iterative chaotic map) is defined as shown in equation (2). [8] When the control parameter a∈(0,∞), the system is in a chaotic state.

[0012] x i+1 =sin(α / x) i (1)

[0013] The Lyapunov exponent (LE) is a widely accepted measure for evaluating chaos. For a dynamical system x... i+1 =F(x) i When F(x) is differentiable, it can be defined as shown in equation (2).

[0014]

[0015] LE describes how quickly two trajectories of a dynamical system diverge. When LE is greater than 0, it indicates that the two trajectories of the chaotic system diverge exponentially in each iteration. Therefore, if a dynamical system can obtain a positive LE, then it exhibits chaotic behavior. The larger the LE, the faster the trajectory diverges, indicating better chaotic performance. Figure 1 The LE exponent of the ICMIC chaos map was plotted, revealing its complex chaotic behavior.

[0016] Bifurcation diagrams are a visual plotting technique for observing chaotic behavior. They partially represent a trajectory for each sampled parameter, making it easy to determine whether a system is chaotic. An example of a bifurcation diagram from the ICMIC chaos map is shown below. Figure 2 As shown.

[0017] Given initial system values, two chaotic sequences {x} are obtained using ICMIC mapping. n}、{y n}(n=1,2,…). Normalize {x n The chaotic sequence {y} is sorted and its sorting index is saved for coordinate scrambling. n} is used to perform diffusion operations, change coordinate values, and change the statistical properties of coordinates.

[0018] 2. Compression and Encryption Design

[0019] 2.1 Fractal Compression Encoding

[0020] Fractal image coding achieves image compression by removing self-similar redundancy between different parts of an image. Fractal image coding is the process of finding a set of affine transformation parameters, which specify the transformation details rather than pixel values ​​[9]. The image is first divided into many blocks, and each block is encoded as its similarity to another block. Each block is reconstructed by applying an iterative shrinking transformation to another similar block in the same image. Therefore, the iterative function system is the basis of fractal image coding. So, as long as various fractal structures in the image are found and expressed through affine transformation, the image compression process can be achieved.

[0021] Suppose a digital image has a matrix space M,d, and a distortion metric. A compressed image transformation τ is constructed by solving the inverse problem of the iterative compression transformation. Through iteration, the image is eventually moved from the space (M,d) to an approximately fixed point, which is close to μ. orig .

[0022] When τ satisfies equation (3),

[0023]

[0024] In the formula, s is the contraction factor of τ. The storage space of τ will be less than μ. orig This reduces storage space, thereby achieving compression.

[0025] Smaller block sizes increase the probability of self-similarity. Therefore, in fractal compression coding, each image is divided into multiple W×H range blocks and 2W×2H domain blocks, where W and H are the width and height of the range block, respectively. For each range block, the best-matching domain block is found. Therefore, when the domain block shrinks during the transformation process, its size must be at least twice that of the range block, and the coding time is proportional to the number of domain blocks.

[0026] The iterative transformation of compression is obtained by equation (4). The block can be reconstructed by iterating through the equation (4) until τ reaches a fixed point.

[0027]

[0028] 2.1 Encryption Method Design

[0029] 1. Scrambling methods

[0030] To break the correlation between adjacent pixels in an image, the present invention first sorts the random matrix generated by the chaotic mapping in the encryption method design, randomly determines the pixels at different positions in the image according to the sorting index, and then arranges the selected pixels into a ring and scrambles their positions.

[0031] Assume the chaotic sequence is {x} n The original image is P, and the scrambled image is N. The specific pixel scrambling steps are as follows:

[0032] (1) The generated chaotic sequence {x n Form M×N random matrices S1 and S2, sort each column to obtain the sorted matrix S1';

[0033] (2) Save the sorted indices as matrix I;

[0034] (3) Randomly select pixels using each row of the index matrix I. For example, in the j-th iteration, the selected pixel is P(I). i,1 ,1) P(I i,2 ,2),...、P(I i,N (N), forming a ring;

[0035] (4) Shift adjacent pixels in the ring, N(i,1)=P(i i,2 ,2), N(i,2)=P(I i,3 ,3), ..., N(i,N)=P(I i,N ,N);

[0036] (5) Obtain the scrambled image matrix N.

[0037] 2. Diffusion methods

[0038] Pixel diffusion operations can alter the statistical properties of the original image, improving the security of image encryption. It propagates minute changes across the entire image, effectively creating an avalanche effect.

[0039] Two M×N random matrices S1 and S2 are obtained using two sets of keys. Two different pixel diffusions are defined based on the two random matrices, as shown in equations (5) and (6).

[0040]

[0041]

[0042] 3. Image encryption algorithm

[0043] Input: A plaintext image P of size M×N, and a key.

[0044] Output: Ciphertext image C

[0045] (1) Using the key Using these two sets of parameters and initial values ​​as the chaotic mapping, two sets of chaotic sequences are iteratively generated, forming two random matrices S1 and S2 of size M×N.

[0046] (2) Sort each column of S1, save the order index of the arrangement, and form an index matrix I of size M×N;

[0047] (3) Randomly select a pixel in P using the index matrix I and scramble it. At the same time, perform the diffusion operation of equation (5) on this pixel.

[0048] (4) Perform a second round of pixel-by-pixel diffusion according to equation (6) to obtain the ciphertext image C.

[0049] 4. Combination of encryption and compression

[0050] (5) Initialization: Read the size of the affine parameter matrix F, and convert F(1,:,:) and F(2,:,:) into one-dimensional arrays F1 and F2;

[0051] (6) Process the F1 data as shown in equation (7).

[0052]

[0053] (1) Process the F2 data as shown in equation (8).

[0054]

[0055] (2) Convert the processed matrix into an image matrix P of size M×((A×B×C) / M).

[0056] 5. Compression and Encryption Flowchart

[0057] The compression and encryption flowchart of this invention is as follows: Figure 3 As shown, the image is first fractally encoded to obtain an affine parameter matrix, which is then normalized and converted into an image matrix. Next, an image encryption algorithm is applied to obtain the compressed and encrypted data.

[0058] 6. Decryption and Reconstruction Process

[0059] Image decryption and reconstruction is the reverse process of the entire algorithm, and the specific steps are as follows:

[0060] (1) Substitute the two sets of keys into the chaotic mapping to obtain two chaotic sequences;

[0061] (2) Perform a second round of reverse diffusion on the ciphertext image, and then perform the reverse process of the first diffusion and scrambling;

[0062] (3) Perform a normalization inverse operation on the obtained plaintext image and restore it to the affine parameter matrix;

[0063] (4) The recovered affine parameter matrix is ​​reconstructed by iterating through the iterative function several times to reconstruct the original image.

[0064] 3. Performance Analysis

[0065] 1. Correlation between adjacent pixels

[0066] A key metric for evaluating image encryption algorithms is breaking this high degree of correlation, thereby resisting various statistical attacks. The correlation distribution of adjacent pixels in the horizontal, vertical, and diagonal directions of the original image and the compressed / encrypted image is shown below. Figure 4 As shown.

[0067] 2. Histogram

[0068] Histogram comparisons were performed on different encrypted images, and the results are as follows: Figure 5 As shown, the pixel distribution of the original image has statistical characteristics, while the pixel values ​​of the compressed and encrypted image are uniformly distributed, making it impossible for attackers to obtain relevant information from the histogram.

[0069] 3. Encryption / decryption speed

[0070] The encryption algorithm used in this paper performs scrambling and diffusion simultaneously. Through testing, the average encryption time of this invention is 0.0042s, and the average decryption time is 0.0062s. It is evident that this algorithm can achieve higher encryption speeds, thereby improving the overall efficiency of the compression and encryption algorithm.

[0071] 4. Information Entropy

[0072]

[0073] The formula for calculating information entropy is shown in formula (9). Information entropy reflects the randomness of pixels. If the entropy value of the encrypted image is close to 8, then the image encryption scheme can achieve higher security. The information entropy results of different encrypted images are shown in Table 1. The information entropy of the encrypted images is close to 8, indicating that the encryption algorithm has high security.

[0074] Table 1 Entropy of Ciphertext Information

[0075]

[0076] 5. PSNR

[0077] Experimental simulations were conducted on the compression and encryption algorithm proposed in this paper, and the compression effect was observed under different block sizes. Figure 6As shown in the figure. Peak signal-to-noise ratio (PSNR) is usually used to evaluate the quality of encrypted images under different compression ratios, as defined in equation (10).

[0078]

[0079] A higher PSNR indicates a smaller difference between the reconstructed image and the original image, as shown in Table 2.

[0080] 6. Compression ratio

[0081] In the fractal compression coding used in this paper, the compression ratio is related to the original image size and the coding block size, as shown in Table 2. When the block size is 8, the compression ratio is 12.8; when the block size is 4, the compression ratio is 3.2.

[0082] Table 2 PSNR and CR Tests

[0083]

[0084] In summary, this invention combines ICMIC chaotic mapping and fractal compression coding to propose an image compression and encryption method. Test results show that this invention achieves good results in both security and compression performance, and is of great significance for image storage, transmission, and information content security. Attached Figure Description

[0085] Figure 1 This is the Lyapunov exponent diagram of the ICMIC chaotic mapping used in this invention;

[0086] Figure 2 This is the bifurcation diagram of the ICMIC chaotic mapping used in this invention;

[0087] Figure 3 This is a flowchart of the compression and encryption process of this invention;

[0088] Figure 4 This is a comparison diagram of the correlation distribution of adjacent pixels between the original image and the encrypted image of this invention; where a) is the original image and b) is its corresponding encrypted image;

[0089] Figure 5 This is a histogram comparison of the original image and the encrypted image of this invention; where a) is the original image and b) is its corresponding encrypted image;

[0090] Figure 6 These are the encrypted images and reconstructed images in different blocks according to the present invention; where a) is the original image, b) is its corresponding compressed encrypted image, and c) is the decompressed and reconstructed image. Detailed Implementation

[0091] To better understand the technical solution of the present invention, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0092] The first step is to input an image, perform fractal compression encoding on the original image according to the block size, and continuously iterate through affine transformation to save the affine parameters.

[0093] The second step is to transform the data according to the characteristics of the affine parameters using equations (7) and (8), converting the affine parameter matrix into an image matrix between 0 and 255 for visualization.

[0094] The third step is to input the ICMIC chaotic equation parameters and initial values. As the initial key, generate a pseudo-random sequence {x} n}、{y n Then, normalize the matrix to a value between 0 and 255, resulting in two random matrices S1 and S2, which are used for subsequent scrambling and diffusion.

[0095] The fourth step is to read the normalized affine parameter matrix, sort each column of the first random matrix S1, and save the index of the sorting process.

[0096] Fifth, determine the position of the selected pixels according to the index, arrange the selected pixels in a circular pattern, and move them one position clockwise to achieve a scrambling effect. Perform the first round of diffusion operation of equation (5) directly on the pixels after each shift.

[0097] Step 6: Repeat step 5 in a loop until all pixels have been traversed, completing the first round of scrambling diffusion.

[0098] Step 7: Using the image obtained from the first round of scrambling and diffusion, the second round of diffusion operation of equation (6) is continued using the second random matrix S2.

[0099] Step 8: Obtain the compressed and encrypted image, as shown below. Figure 6 As shown, the obtained image data achieved good compression and encryption effects.

[0100] Step 9: Perform security tests on the compressed and encrypted ciphertext image, including information entropy, histogram, and correlation between adjacent pixels. The results are shown in Table 1. Figure 4 , Figure 5 As shown.

[0101] Step 10: Perform compression performance testing. The compression ratio and PSNR of the image after fractal compression reconstruction are shown in Table 2.

[0102] Following the steps above, the experimental test platform was MATLAB 2021R under the Windows 10 operating system. The hardware platform was an Intel Core i5, 2.90GHz, with 16GB of memory. The test image was a standard grayscale image from the USC-SIPI database.

[0103] References

[0104] [1]Zhao E, Liu D.Fractal image compression methods:A review[C] / / ThirdInternational Conference on Information Technology and Applications(ICITA'05).IEEE,2005,1:756-759.

[0105] [2]Lin YT,Wang CM,Chen WS,et al.A novel data hiding algorithm for high dynamic range images[J].IEEE Transactions on Multimedia,2016,19(1):196-211.

[0106] [3]Li D,Deng L,Gupta BB,et al.A novel CNN based security guaranteedimage watermarking generation scenario for smart city applications[J].Information Sciences,2019,479:432-447.

[0107] [4]Chai

[0108] [5]Li X,Xiao D,Wang Q H.Error-free holographic frames encryption withCA pixel-permutation encoding algorithm[J].Optics and Lasers in Engineering,2018,100:200-207.

[0109] [6]Chai X,Zhang J,Gan Z,et al.Medical image encryption algorithmbased on Latin square and memristive chaotic system[J].Multimedia Tools andApplications,2019,78(24):35419-35453.

[0110] [7]Habutsu T,Nishio Y,Sasase I,et al.A secret key cryptosystem byiterating a chaotic map[C] / / Workshop on the Theory and Application of ofCryptographic Techniques.Springer,Berlin,Heidelberg,1991:127-140

[0111] [8]He D,He C,Jiang L G,et al.Chaotic characteristics of a one-dimensional iterative map with infinite collapses[J].IEEE Transactions onCircuits and Systems I:Fundamental Theory and Applications,2001,48(7):900-906.

[0112] [9]Jacquin A E.Fractal image coding:A review[J].Proceedings of theIEEE,1993,81(10):1451-1465.

Claims

1. An image compression and encryption method combining fractals and chaos, which is implemented in the following eight steps: The first step is to input the parameters and initial values ​​according to the following ICMIC chaotic equation. As the initial key, a pseudo-random sequence is generated. Then, the matrix is ​​normalized, with the normalized value between 0 and 255, resulting in two random matrices. ; (1) The second step is to input an image, perform fractal compression encoding on the original image according to the block size, and continuously iterate through affine transformation to save the affine parameters. The third step is to transform the compressed data according to the characteristics of the affine parameters, converting the affine parameter matrix into an image matrix between 0 and 255 for visualization. The fourth step is to read the normalized affine parameter matrix and convert the random matrix... Sort each column of data and save the index of the sorting process; Step 5: Determine the position of the selected pixel based on the index, arrange the selected pixels in a circular pattern, and shift them one position clockwise to achieve a scrambling effect. Perform the first round of diffusion operation on the pixels after each shift. The specific operation is as follows: In the j-th loop, the selected pixel is... They form a ring, and adjacent pixels within the ring are shifted: (2) (3) Repeat step 5 until all pixels have been traversed, completing the first round of scrambling diffusion; Step 6: Using the image obtained from the first round of scrambling and diffusion, and a random matrix formed by the second pseudo-random sequence, a second round of diffusion is performed. The specific steps are as follows: (4) Step 7: The compressed and encrypted image has achieved good compression and encryption effects. Security tests are then performed on the compressed and encrypted ciphertext image, including information entropy, histogram, and correlation between adjacent pixels. The eighth step involves decryption and decompression to obtain the decrypted and reconstructed image. Compression performance is then tested, including the compression ratio and PSNR of the image after fractal compression and reconstruction.