Color face image encryption method based on Zaslavsky chaotic mapping

By adopting a color face image encryption method based on Zaslavsky chaotic mapping in airport face security check, combined with Haar cascade classifier and Arnold mapping, the problem of uneven chaotic mapping generation and no correlation between color image channels in the existing technology is solved, and an efficient and secure image encryption and decryption process is achieved.

CN119653021AActive Publication Date: 2025-03-18GUANGZHOU UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411528353.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-18
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

The existing image encryption algorithm based on chaotic mapping has uneven chaotic mapping generation, small generation range, and no correlation between color image channels is considered in the airport face security check, resulting in security and timeliness problems.

Method used

The color face image encryption method based on Zaslavsky chaotic mapping is adopted. Face images are captured in real time through the Haar cascade classifier, the most significant bits and least significant bits are extracted to form a sequence, and the key sequence is generated using Zaslavsky chaotic mapping, and pixel obfuscation and inter-channel obfuscation are combined with Arnold mapping to generate the final encrypted image.

Benefits of technology

It improves the security and efficiency of image encryption, ensures the timeliness and security of face images in airport security checks, and resists crackers' inter-channel statistical attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653021A_ABST
    Figure CN119653021A_ABST
Patent Text Reader

Abstract

The invention discloses a color face image encryption method based on Zaslavsky chaotic mapping, and the color face image encryption method based on Zaslavsky chaotic mapping takes two-dimensional Zaslavsky chaotic mapping as a sequence to generate mapping, and designs an encryption and decryption method which takes part of control parameters as secret keys under the chaotic characteristics of specific control parameters and initial values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and more specifically, to a color face image encryption method based on Zaslavsky chaotic mapping. Background Art

[0002] During airport security checks, human images need to be recognized in real time and processed as data, requiring the use of a timely and highly secure facial image recognition and encryption and decryption solution.

[0003] When designing the image encryption algorithm at the beginning, we referred to the relatively mature traditional text information encryption algorithms, such as DES, AES, 3DES and IDEA. However, when processing image data, due to the large amount of data, different structures, correlation between adjacent pixels and the existence of information redundancy, these traditional algorithms are difficult to achieve the expected results, and the encryption efficiency is low. Given that traditional encryption algorithms are difficult to meet the needs of image encryption, the chaotic mapping system brings new ideas to image encryption with its unique properties. The encryption algorithm designed based on chaotic mapping has many advantages that traditional algorithms do not have. Because it is highly sensitive and stable to initial conditions, it can effectively resist threats that traditional algorithms are difficult to deal with. For example: image encryption algorithms based on Tent one-dimensional mapping and Logistic one-dimensional mapping, to encryption algorithms under high-dimensional chaotic mapping. Their characteristics can be summarized as follows: multi-dimensional mapping encryption algorithms have high security, low-dimensional mapping algorithms have high efficiency, and provide more options for algorithm design with different needs.

[0004] However, the selection of chaotic mapping not only involves the trade-off between security and efficiency, but also requires the sequence generated by the chaotic mapping: first, the sequence generated by the chaotic mapping is required to be evenly distributed, and there is no direct correlation or easily recognizable regularity in the values ​​in the sequence, otherwise the attacker can directly infer the generation law of the algorithm from the generated sequence, thereby cracking the algorithm. Secondly, the generated length of the sequence must reach a certain order of magnitude, otherwise the time required for the attacker to crack the sequence is short, and the cracking possibility will be greatly increased. The fundamental reason is the limitation of parameter setting or calculation method in the chaotic mapping generation process, which makes the sequence unable to evenly cover the value range. At the same time, some algorithms ignore the correlation of color image channels, which makes the encrypted color image vulnerable, and some algorithms are not complex enough and are easy to be cracked.

[0005] As an important feature for identifying personal identity, face information needs to be encrypted securely not only during security checks, but also in many other scenarios, such as traffic security checks, information collection, and mobile phone unlocking. Therefore, the security requirements for facial images are relatively high. However, some existing encryption schemes have problems, such as directly encrypting the entire image after recognizing the face, resulting in low encryption efficiency and waste of computing resources.

[0006] Therefore, in order to solve the security problems caused by the uneven generation of chaotic maps and small generation range in the algorithm of general chaotic map-based image encryption algorithms in the process of airport face security inspection, or the correlation between color image channels is not considered during the design process, as well as the timeliness problems caused by encrypting the entire face image, it is necessary to design a face image encryption and decryption algorithm that meets the requirements of the usage scenario. Summary of the invention

[0007] In order to solve the above technical problems, this application is proposed. The embodiment of this application provides a color face image encryption method based on Zaslavsky chaotic mapping, using two-dimensional Zaslavsky chaotic mapping as a sequence to generate mapping, and using the chaotic characteristics under specific control parameters and initial values, and designing an encryption and decryption method using part of its control parameters as a key.

[0008] According to one aspect of the present application, a color face image encryption method based on Zaslavsky chaotic mapping is provided, which comprises: S1. using a Haar cascade classifier to capture the face of an input image, and using a CascadeClassifier to obtain the coordinates of a face area box, and then cropping to obtain a face image img; S2. extracting the most significant bits (MSBs) and the least significant bits (LSBs) of the face image to form sequences A1 and A2, using a key Key1 and an iteration number N0, and generating key sequences b1 and b2 through a Zaslavsky chaotic mapping; S3. cyclically right-shifting the sequence A1, Then, an XOR operation is performed with the key sequences b1 and b2 to generate sequences B1 and B2; S4. The key Key2 and Zaslavsky mapping are used to generate a confusion sequence S, and the sequence S is used to perform position confusion on B1 and B2, and the confused B1 and B2 are merged into an 8-bit pixel matrix C. The matrix C is confused using Arnold mapping to obtain a confusion matrix E, and E is confused between channels to obtain the final encrypted image res; S5. The decryption process corresponds to the inverse process of the encryption process, with the input being the encrypted image res, the keys Key1 (y1, r1) and Key2 (y2, r2) and the number of iterations N0, and the output being the decrypted face image img.

[0009] Preferably, step S1 is used to: use a sliding window to scan the input image at different scales and positions, use a cascade classifier to detect each window area in turn, if a classifier at a certain level determines that the window area does not contain a face, then stop the detection directly and move to the next window, and finally use non-maximum suppression for multiple overlapping windows to merge these overlapping windows to output the face position window of the final image.

[0010] Preferably, the step S2 is used to: input the facial image img, the key Key1(y1, r1) and the number of iterations N0 of the chaotic mapping, output a one-dimensional sequence A1 of MSBs containing most of the information of the facial image img and a one-dimensional sequence A2 of LSBs containing a small part of the facial image img and detail information, and obtain one-dimensional key sequences b1 and b2 generated by the key Key1(y1, r1) and N0 iterations through the Zaslavsky chaotic mapping.

[0011] Preferably, step S3 includes: inputting sequences A1, A2, b1, b2, setting sum1 to the sum of the elements of sequence b2, and cyclically shifting sequence A1 right by sum1 units to obtain sequence A 11 , then the three sequences A 11 Perform an XOR operation on each element in b1, b2 to obtain sequence B1, and perform an XOR operation on sequences A2 and b1 to obtain sequence B2.

[0012] Preferably, step S4 comprises: S41. inputting sequences B1 and B2, and key Key2(y2, r2), and recording the sum of elements in b1 as sum2; S42. using Zaslavsky mapping to obtain a confusion sequence S under input y2, r2 and a generation length sum2+4×M×N and controlling the element generation range; S43. using B1[i], B2[S[i]]=B2[S[i]], B1[i] to confuse all element positions in B1 and B2; S44. merging the confused B1 and B2 sequences into an 8-bit pixel matrix C; S45. inputting Arnold mapping to confuse and obtaining a confusion matrix E; S46. performing an inter-channel confusion process on E to obtain a final output res, i.e., a final encrypted image.

[0013] Preferably, in step S42, the function expression of the Zaslavsky chaotic map is:

[0014] Y n+1 =mod(y n +v(1+μz n )+εvμcos(2πy n ),1)

[0015] Z n+1 =e -r (z n +cos(2πy n ))

[0016]

[0017] Where Y0 and Z0 are the initial values ​​of the mapping function, Y0∈(0,1), Z0∈R, Z0=-0.28432144902, and the corresponding y n and z n is the value of n iterations, Y n+1 and Z n+1 is the n+1th value obtained after the nth iteration, the parameters v=133.33, ε=0.3, and the parameter r is in the range of (0,3). The mapping is in a chaotic state, and Y0 and r that make the mapping in a chaotic state are used as the key input to generate the chaotic sequence. mod(a,1) means that a is divided by 1, and the remainder range is (0,1). ε, v, μ, and r are all control parameters of the mapping.

[0018] Preferably, in step S46, during the process of encrypting the color image, an inter-channel confusion strategy is designed to exchange pixels at the same position among the three channels by cyclically shifting the order among the three channels.

[0019] Preferably, the method of exchanging pixels at the same position among the three channels by cyclically shifting the order among the three channels comprises: S461. generating a sequence E of length M×N by using Key2; S462. performing a normalization operation on all elements of E, i.e. increasing the value by 10. 14 The power is then divided by 3 to ensure that all elements are 0, 1, and 2; S463. Convert the sequence E into a 2D matrix, which is the shift matrix E. x ; S464. Specify a shift rule; S465. Perform channel confusion on the image to be processed according to the rule in step S464.

[0020] Preferably, in step S464, the shift rule includes: for the element E in the shift matrix x [i][j]==0, then the channel is not shifted; if E x [i][j]==1, then the channel is circularly shifted left by one bit, that is, [R,G,B]->[G,B,R]; if E x If [i][j] == 2, the channel is circularly shifted right by one bit, i.e. [R, G, B]->[B, R, G].

[0021] According to one aspect of the present application, a color face image encryption system based on Zaslavsky chaotic mapping is also provided, which includes: a Haar cascade classifier module, which is used to capture the face in the original image in real time by applying the Haar cascade classifier, output the corresponding face position coordinates, and intercept them as the input of the image encryption algorithm; a Zaslavsky mapping module, which is used for the encryption and decryption system of the chaotic characteristics of the Zaslavsky mapping under specific control parameters and initial values ​​and using some of its control parameters as the key; an Arnold cat mapping module, which is used to use the Arnold cat mapping to confuse image pixels; a color channel confusion module, which is used to resist the statistical attack between channels by crackers through the confusion scheme between color image channels.

[0022] In view of the security issues of facial images during airport security checks, this solution designs a facial image algorithm that meets the scenario, taking into account the timeliness required during the security check and the necessary security of facial images. Specifically, the beneficial technical effects brought about by the present invention are:

[0023] The chaotic characteristics of Zaslavsky mapping under specific control parameters and initial values ​​are used to design an encryption and decryption system with some of its control parameters as the key. Arnold cat mapping is used to confuse image pixels, and the periodic algorithm of Arnold cat mapping under specific parameters is used to optimize the iterative repetition phenomenon of Arnold cat mapping. By applying the Haar cascade classifier, the face in the original image can be captured in real time, and on this basis, the corresponding face position coordinates are output and intercepted as the input of the image encryption algorithm, thereby improving the timeliness of the overall algorithm. Considering that the color image is encrypted in the specific security inspection scenario, an obfuscation scheme between color image channels is designed to resist the statistical attack between channels by crackers. And it is not only used in the encryption algorithm, but also can be reversed during the decryption process to ensure that the entire scheme can effectively carry out the encryption and decryption process. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0025] Figure 1 The flowchart is a method for encrypting a color face image based on Zaslavsky chaotic mapping according to an embodiment of the present application.

[0026] Figure 2This is a comparison diagram of the distribution diagram of Zaslavsky under specific parameters in the color face image encryption method based on Zaslavsky chaotic mapping according to an embodiment of the present application compared with the traditional Tent mapping.

[0027] Figure 3 This is a principle diagram of exchanging pixels at the same position among three channels by cyclically shifting the order among three channels in a color face image encryption method based on Zaslavsky chaotic mapping according to an embodiment of the present application.

[0028] Figure 4 The flowchart of the Haar cascade classifier in the color face image encryption method based on Zaslavsky chaotic mapping according to an embodiment of the present application.

[0029] Figure 5 The original image, the annotated image and the final cropped image in the color face image encryption method based on Zaslavsky chaotic mapping according to an embodiment of the present application.

[0030] Figure 6 This is a rendering of the encryption and decryption process of a color face image based on Zaslavsky chaotic mapping according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0032] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0033] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0034] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0035] When the image encryption algorithm based on chaotic mapping is applied in the airport face security inspection process, the chaotic mapping in the algorithm is generated unevenly, the generation range is small, or the correlation between color image channels is not considered during the design process, which leads to security issues and timeliness issues caused by encrypting the entire face image.

[0036] Therefore, in the technical solution of the present application, a color face image encryption method based on Zaslavsky chaotic mapping is proposed. Aiming at the security problems existing in general encryption algorithms based on chaotic mapping, a two-dimensional Zaslavsky chaotic mapping is used as a sequence to generate mapping, and the chaotic characteristics under specific control parameters and initial values ​​are used to design an encryption and decryption system with some of its control parameters as keys. The Arnoldcat mapping is combined to perform image pixel confusion, and the periodic algorithm of the Arnoldcat mapping under specific parameters is applied to optimize the iterative repetition phenomenon of the Arnoldcat mapping.

[0037] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods:

[0038] Figure 1 FIG. 1 is a flow chart of a color face image encryption method based on Zaslavsky chaotic mapping according to an embodiment of the present application. Figure 1 As shown, according to the embodiment of the present application, the color face image encryption method based on Zaslavsky chaotic mapping includes the following steps: S1. Use Haar cascade classifier to capture the face of the input image, and use CascadeClassifier to obtain the coordinates of the face area box, and then crop to obtain the face image img; S2. Extract the most significant bits (MSBs) and the least significant bits (LSBs) of the face image to form sequences A1 and A2, use the key Key1 and the number of iterations N0, and generate key sequences b1 and b2 through Zaslavsky chaotic mapping; S3. Circularly right-shift the sequence A1, and then Then perform an XOR operation with the key sequence b1 and b2 to generate sequences B1 and β2; S4. Use the key Key2 and Zaslavsky mapping to generate a confusion sequence S, use the sequence S to confuse B1 and B2, merge the confused B1 and B2 into an 8-bit pixel matrix C, use the Arnold mapping to confuse the matrix C to obtain the confusion matrix E, perform inter-channel confusion on E to obtain the final encrypted image res; S5. The decryption process corresponds to the inverse process of the encryption process, with the input being the encrypted image res, the keys Key1(y1,r1) and Key2(y2,r2) and the number of iterations N0, and the output being the decrypted face image img.

[0039] In the embodiment of the present application, the step S1 uses the Haar cascade classifier to capture the face of the input image, and uses the CascadeClassifier to obtain the box coordinates of the face area, and then crops to obtain the face image img. Specifically, since the general encryption algorithm encrypts the entire image, and only the face image needs to be encrypted during the security inspection process, rather than the entire image, this solution is designed to recognize and intercept the face image of the input original image before encrypting the image, so that the face part can be efficiently encrypted without wasting computing power resources and time resources on other redundant information.

[0040] This solution uses Haar Cascade Classifier to quickly capture face images and input the corresponding face image coordinates to extract the required face image. The principle is: convert the input image into a grayscale image, then use a sliding window to scan the input image at different scales and positions, and use the cascade classifier to detect each window area in turn. If a classifier at a certain level determines that the window area does not contain a face, it will stop detecting and move to the next window. Finally, for multiple overlapping windows, non-maximum suppression can be used to merge these overlapping windows to output the face position window of the final image. For a detailed overview of the process, see Figure 2 .

[0041] The face images use 8 randomly selected face images from the open source dataset IMDB-WIKI. The face position detection test is performed on the selected 8 face images and then captured. The original image, the annotated image, and the final cropped image are shown in the figure. Figure 3 As shown, the whole process captures and saves the face image in the original image as the input of the subsequent image encryption algorithm.

[0042] Specifically, in one embodiment of the present application, step S1 is used to: use a sliding window to scan the input image at different scales and positions, use a cascade classifier to detect each window area in turn, if a classifier at a certain level determines that the window area does not contain a face, then stop the detection directly and move to the next window, and finally use non-maximum suppression for multiple overlapping windows to merge these overlapping windows to output the face position window of the final image.

[0043] In an embodiment of the present application, the step S2 extracts the most significant bit (MSBs) and the least significant bit (LSBs) of the face image to form sequences A1 and A2, and uses the key Key1 and the number of iterations N0 to generate key sequences b1 and b2 through the Zaslavsky chaotic map. It should be understood that by only processing the MSBs and LSBs, rather than the entire image data, the amount of data that the encryption algorithm needs to process can be reduced, thereby improving encryption efficiency. This is particularly important for application scenarios (such as airport security) that require rapid processing of large amounts of image data. Introduce randomness and unpredictability into the encryption process. The sensitivity of the chaotic map to the initial condition makes even a slight change in the key result in a completely different sequence, thereby increasing the difficulty of cracking.

[0044] Specifically, in one embodiment of the present application, the step S2 is used to: input the facial image img, the key Key1(y1, r1) and the number of iterations of the chaotic map N0, output a one-dimensional sequence A1 of MSBs containing most of the information of the facial image img and a one-dimensional sequence A2 of LSBs containing a small part of the facial image img and detail information, and obtain one-dimensional key sequences b1 and b2 generated by the key Key1(y1, r1) and N0 iterations through the Zaslavsky chaotic map.

[0045] In the embodiment of the present application, the step S3 performs a circular right shift on the sequence A1, and then performs an XOR operation with the key sequences b1 and b2 to generate sequences B1 and B2. It should be understood that the circular right shift is a simple data obfuscation technique that changes the bit order of the data so that the pattern and structure of the original data are no longer obvious. This rearrangement of the bits increases the uncertainty of the data, thereby improving the security of encryption. By performing an XOR operation with the key sequences b1 and b2, each bit in the sequence A1 is affected by the key. The XOR operation is a basic bit operation that can directly diffuse the key information into the data to achieve key-controlled data transformation. The XOR operation can introduce the randomness in the key sequence into the data sequence to achieve data diffusion and confusion. This diffusion makes the statistical characteristics of the encrypted data more uniform, and it is difficult to infer the characteristics of the original data from the encrypted data. The generated sequences B1 and B2 will be used for subsequent obfuscation and encryption steps. In this way, the original data has been preliminarily encrypted and is ready for more complex encryption processing, such as position obfuscation and channel-to-channel obfuscation.

[0046] Specifically, in one embodiment of the present application, step S3 includes: inputting sequences A1, A2, b1, and b2, setting sum1 to the sum of the elements of sequence b2, and cyclically shifting sequence A1 right by sum1 units to obtain sequence A 11 , then the three sequences A 11Perform an XOR operation on each element in b1, b2 to obtain sequence B1, and perform an XOR operation on sequences A2 and b1 to obtain sequence B2.

[0047] In the embodiment of the present application, the step S4 uses the key Key2 and the Zaslavsky map to generate a confusion sequence S, uses the sequence S to confuse the positions of B1 and B2, merges the confused B1 and B2 into an 8-bit pixel matrix C, uses the Arnold map to confuse the matrix C, obtains the confusion matrix E, and performs inter-channel confusion on E to obtain the final encrypted image res. It should be understood that the use of the key Key2 and the Zaslavsky chaotic map to generate the confusion sequence S is to introduce the control of the key to make the encryption process safer. The Zaslavsky chaotic map has good chaotic properties and can produce complex and unpredictable sequences, thereby increasing the randomness and unpredictability of encryption. The Arnold map is a classic chaotic map with periodicity and sensitivity. Using the Arnold map to confuse the matrix C can further disrupt the position of the pixels and increase the complexity of the encrypted image. The inter-channel confusion of E is to process the different color channels in the color image to ensure that the data of each channel is fully encrypted. This method can prevent attackers from obtaining image information by analyzing a single channel.

[0048] Specifically, in one embodiment of the present application, the step S4 includes: S41. Input sequences V1 and B2, and key Key2(y2, r2), and record the sum of elements in b1 as sum2; S42. Use Zaslavsky mapping to input y2, r2 and generate length sum2+4×M×N and control the element generation range to obtain a confusion sequence S; S43. Use B1[i], B2[S[i]]=B2[S[i]], B1[i] to confuse all element positions in B1 and B2; S44. Then merge the confused B1 and B2 sequences into an 8-bit pixel matrix C; S45. Input Arnold mapping for confusion to obtain a confusion matrix E; S46. Perform inter-channel confusion on E to obtain the final output res, that is, the final encrypted image.

[0049] Further, in step S42, the function expression of Zaslavsky chaotic mapping is:

[0050] Y n+1 =mod(y n +v(1+μz n )+εvμcos(2πy n ),1)

[0051] z n+1 =e -r (zn +cos(2πy n ))

[0052]

[0053] Where Y0 and Z0 are the initial values ​​of the mapping function, Y0∈(0,1), Z0∈R, Z0=-0.28432144902, and the corresponding y n and z n Y0 and Z0 are the values ​​of n iterations, Y n+1 and Z n+1 is the n+1th value obtained after the nth iteration, the parameters v=133.33, ε=0.3, and the parameter r is in a chaotic state when the value range is (0,3). Y0 and r that make the mapping in a chaotic state are used as the key input for generating the chaotic sequence. mod(a,b) is the remainder operation, and mod(a,1) means dividing a by 1, and the remainder range is (0,1). ε, v, μ, and r are all control parameters of the mapping.

[0054] In order to more intuitively illustrate the uniform distribution of the sequence generated by Zaslavsky mapping, the Zaslavsky mapping is compared with the traditional one-dimensional Tent mapping distribution diagram, as shown in Figure 4 As shown in the figure, the results show that the distribution diagram of Zaslavsky under specific parameters is very uniform in the value range (0,3) compared with the traditional Tent mapping, while the distribution range of the control parameters of the Tent mapping is very uneven. For the Zaslavsky two-dimensional chaotic mapping, not only is its control parameter uniformly distributed compared with the general traditional one-dimensional mapping, but it also has a simpler calculation process compared with the high-dimensional mapping, thus taking into account both security and timeliness, and is very suitable for image encryption algorithms that need to take into account both security and timeliness.

[0055] Secondly, in the security inspection process, color images are required to be processed in real time, so in the process of encrypting color images, the mutual correlation between RGB channels needs to be considered, otherwise, through statistical attacks, attackers have the opportunity to find patterns in the encrypted images between channels and crack the encryption process. To this end, this scheme designs an inter-channel obfuscation strategy to ensure that there is no large correlation between the encrypted images between channels. In order to confuse the three channels of the color image R, G, and B to enhance the complexity of the algorithm, this scheme designs a method to exchange pixels at the same position between the three channels by cyclically shifting the order between the three channels, including:

[0056] S461. Generate a sequence E of length M×N using Key2;

[0057] S462. Perform normalization operation on all E elements, i.e. increase the value by 10 14 The remainder after division by 3 ensures that all elements are 0, 1, and 2.

[0058] S463. Convert the sequence E into a 2D matrix, which is the shift matrix E x ;

[0059] S464. Specify a shift rule:

[0060] ①For the element E in the shift matrix x [i][j] == 0 means no shifting of channels;

[0061] ②If E x [i][j]==1, then the channel is circularly shifted left by one bit, i.e. [R,G,B]->[G,B,R];

[0062] ③If E x If [i][j] == 2, the channel is circularly shifted right by one bit, i.e. [R, G, B]->[B, R, G].

[0063] S465. Perform channel confusion on the image to be processed according to the rules in step S464.

[0064] Assumption E x [0][0] == 1, that is, according to the shift rule, the three channels of the pixel at position [0][0] in the image should be shifted from [R, G, B] to [G, B, R]. See the specific principle diagram for details. Figure 5 .

[0065] In the embodiment of the present application, the step S5, the decryption process corresponds to the inverse process of the encryption process, the input is the encrypted image res, the keys Key1 (y1, r1) and Key2 (y2, r2) and the number of iterations N0, and the decrypted face image img is output. It should be understood that the encryption algorithm needs to be reversible to ensure that the original data can be restored through the decryption process. This means that each step in the encryption process must have a clear inverse operation. The keys (Key1 and Key2) used in the encryption process must also be used during decryption because they control the chaotic mapping and confusion steps in the encryption process. Without these keys, the inverse operation cannot be performed correctly. The decryption process needs to correspond to the encryption process to ensure that only those with the correct keys and parameters can decrypt the image. If the decryption process does not correspond to the encryption process, the encryption system will not be able to provide effective security.

[0066] In summary, the results of the entire encryption and decryption process are shown in Figure 6, the present application can effectively intercept the face image in the original image, and encrypt and decrypt the face part. Based on the color face image encryption method based on Zaslavsky chaotic mapping in the embodiment of the present application, in view of the security problem of face images in the airport security inspection process, the present application designs a face image algorithm that meets the scene, comprehensively considering the timeliness required in the security inspection process and the necessary security of face images. Specifically, the chaotic characteristics of Zaslavsky mapping under specific control parameters and initial values ​​are discussed, and an encryption and decryption system using some of its control parameters as keys is designed. Arnold cat mapping is used to confuse image pixels, and the periodic algorithm of Arnold cat mapping under specific parameters is applied to optimize the iterative repetition phenomenon of Arnold cat mapping. By applying the Haar cascade classifier, the face in the original image can be captured in real time, and on this basis, the corresponding face position coordinates are output, and the coordinates are intercepted as the input of the image encryption algorithm, thereby improving the timeliness of the overall algorithm. Considering that the color image is encrypted in the specific security inspection scene, a confusion scheme between color image channels is designed to resist the statistical attack between channels by crackers. And it is not only used in encryption algorithms, but can also be reversed during the decryption process to ensure that the entire solution can effectively carry out the encryption and decryption process.

[0067] Furthermore, according to the embodiment of the present application, the color face image encryption system based on Zaslavsky chaotic mapping includes: a Haar cascade classifier module, which is used to capture the face in the original image in real time by applying the Haar cascade classifier, output the corresponding face position coordinates, and intercept them as the input of the image encryption algorithm; a Zaslavsky mapping module, which is used for the encryption and decryption system of the chaotic characteristics of the Zaslavsky mapping under specific control parameters and initial values ​​and using its part of the control parameters as the key; an Arnold cat mapping module, which is used to use the Arnold cat mapping to confuse image pixels; a color channel confusion module, which is used to resist the statistical attack between channels by crackers through the confusion scheme between color image channels.

[0068] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A color face image encryption method based on Zaslavsky chaotic mapping, characterized in that: include: S1. Use Haar cascade classifier to capture the face of the input image, and use CascadeClassifier to obtain the face area box coordinates, and then crop it to obtain the face image img; S2. extract the most significant bits (MSBs) and the least significant bits (LSBs) of the face image to form sequences A1 and A2, and use the key Key1 and the number of iterations N0 to generate key sequences b1 and b2 through Zaslavsky chaotic mapping; S3. Circularly right-shift the sequence A1, and then perform an XOR operation with the key sequences b1 and b2 to generate sequences B1 and B2; S4. Generate a confusion sequence S using the key Key2 and Zaslavsky mapping, use the sequence S to perform positional confusion on B1 and B2, merge the confused B1 and B2 into an 8-bit pixel matrix C, use the Arnold mapping to confuse the matrix C to obtain a confusion matrix E, perform inter-channel confusion on E, and obtain the final encrypted image res; S5. The decryption process corresponds to the reverse process of the encryption process. The input is the encrypted image res, the keys Key1 (y1, r1) and Key2 (y2, r2) and the number of iterations N0, and the output is the decrypted face image img.

2. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 1 is characterized in that: The step S1 is used to: use a sliding window to scan the input image at different scales and positions, use a cascade classifier to detect each window area in turn, if a classifier at a certain level determines that the window area does not contain a face, then stop the detection and move to the next window, and finally use non-maximum suppression for multiple overlapping windows to merge these overlapping windows to output the face position window of the final image.

3. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 2 is characterized in that: The step S2 is used to: input the facial image img, the key Key1 (y1, r1) and the number of iterations N0 of the chaotic mapping, output a one-dimensional sequence A1 of MSBs containing most of the information of the facial image img and a one-dimensional sequence A2 of LSBs containing a small part of the facial image img and detail information, and obtain one-dimensional key sequences b1 and b2 generated by the key Key1 (y1, r1) and N0 iterations through the Zaslavsky chaotic mapping.

4. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 3 is characterized in that: The step S3 includes: inputting sequences A1, A2, b1, and b2, setting sum1 to the sum of the elements of sequence b2, and cyclically shifting sequence A1 right by sum1 units to obtain sequence A 11 , then the three sequences A 11 Perform an XOR operation on each element in b1, b2 to obtain sequence B1, and perform an XOR operation on sequences A2 and b1 to obtain sequence B2.

5. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 4 is characterized in that: The step S4 comprises: S41. Input sequences B1 and B2, and key Key2 (y2, r2), and record the sum of the elements in b1 as sum2; S42. Obfuscated sequence S is obtained by using Zaslavsky mapping under input y2, r2 and generation length sum2+4×M×N and controlling the element generation range; S43. Use B1[i], B2[S[i]] = B2[S[i]], B1[i] to confuse the positions of all elements in B1 and B2; S44. The obfuscated B1 and B2 sequences are then merged into an 8-bit pixel matrix C; S45. Input the Arnold mapping to perform confusion, and obtain a confusion matrix E; S46. Perform an inter-channel obfuscation process on E to obtain the final output res, that is, the final encrypted image.

6. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 5 is characterized in that: In step S42, the function expression of Zaslavsky chaotic mapping is: Y n+1 =mod(y n +v(1+μz n )+εvμcos(2πy n ),1) WITH n+1 =e -r (With n +cos(2πy n )) Where Y0 and Z0 are the initial values ​​of the mapping function, Y0∈(0,1), Z0∈R, Z0=-0.28432144902, and the corresponding y n and z n is the value of n iterations, Y n+1 and Z n+1 is the n+1th value obtained after the nth iteration, the parameters v=133.33, ε=0.3, and the parameter r is in a chaotic state when the value range is (0, 3). Y0 and r that make the mapping in a chaotic state are used as the key input for generating the chaotic sequence. mod(a, 1) means dividing a by 1, and the remainder range is (0, 1). ε, v, μ, and r are all control parameters of the mapping.

7. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 6 is characterized in that: In the step S46, during the process of encrypting the color image, an inter-channel obfuscation strategy is designed to exchange pixels at the same position among the three channels by cyclically shifting the order among the three channels.

8. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 7 is characterized in that: The step of exchanging pixels at the same position among the three channels by cyclically shifting the order among the three channels comprises: S461. Generate a sequence E of length M×N using Key2; S462. Perform normalization operation on all E elements, i.e. increase the value by 10 14 The remainder after division by 3 ensures that all elements are 0, 1, and 2. S463. Convert the sequence E into a 2D matrix, which is the shift matrix E x ; S464. Specify a shift rule; S465. Perform channel confusion on the image to be processed according to the rules in step S464.

9. The color face image encryption method based on Zaslavsky chaotic mapping according to claim 8, characterized in that: In step S464, the shift rule includes: For the element E in the shift matrix x [i][j] == 0 means no shifting of channels; If E x [i][j]==1, then the channel is circularly shifted left by one bit, i.e. [R, G, B]->[G, B, R]; If E x [i][j]==2 means circular right shift by one channel, i.e. [R, G, B]->[B, R, G].

10. A color face image encryption system based on Zaslavsky chaotic mapping, characterized in that: include: The Haar cascade classifier module is used to capture the face in the original image in real time by applying the Haar cascade classifier, output the corresponding face position coordinates, and intercept them as the input of the image encryption algorithm; Zaslavsky mapping module, which is used for the chaotic characteristics of Zaslavsky mapping under specific control parameters and initial values ​​and uses part of its control parameters as encryption and decryption system keys; Arnold cat mapping module, used to perform image pixel obfuscation using Arnold cat mapping; The color channel obfuscation module is used to resist the statistical attack between channels by crackers through the obfuscation scheme between color image channels.

Citation Information

Patent Citations

  • Color image encryption method based on three-dimensional Logistic mapping and generalized Cat mapping

    CN110120079A

  • Image encryption technology based on chaos theory

    CN115408665A

  • Image encryption communication algorithm based on two-dimensional lag-complex logistic mapping, and image decryption communication algorithm based on two-dimensional lag-complex logistic mapping

    WO2022077793A1