A Security Protection Method, Device and Computer Program Product for Privacy Data

By scrambling pixels of the red, blue and green component matrix of the image, and encrypting with chaotic key sequences and DNA encoding rules, the problem of low encryption security in the prior art is solved, and higher encryption security is achieved.

CN119031080BActive Publication Date: 2025-05-27GOLDEN NETWORK (BEIJING) E-COMMERCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410983466.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2025-05-27
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

In the prior art, the security of image encryption algorithms is low, and the traditional symmetric encryption method fails to effectively consider the correlation between adjacent pixels in the image, resulting in further reduction of encryption security.

Method used

By obtaining the target privacy image, build red, blue, and green component matrices and pixel-scramble these matrices. Then, the generated chaotic key sequence and DNA encoding rules are used to encrypt the chaotic matrix to generate the encrypted target privacy image.

Benefits of technology

The correlation between adjacent pixels is reduced by pixel scrambling, and the complexity of the encryption algorithm is increased through chaotic key sequences and DNA encoding rules, thereby significantly improving the security of encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031080B_ABST
    Figure CN119031080B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of privacy data protection. In order to solve the problem of low encryption security existing in the prior art, a security protection method, device, electronic device and computer program product for privacy data are disclosed. The present invention first constructs the R, G, B component matrices of an image, and then performs pixel scrambling processing on the R, G, B component matrices; then, using a chaotic key sequence and DNA coding rules, encrypts the scrambled component matrices. Finally, using the encrypted R, G, B component matrices, an encrypted image can be generated; in this way, through pixel scrambling processing, the correlation between adjacent pixels can be reduced, thereby improving the encryption security; at the same time, on the basis of the chaotic key sequence, the DNA coding rules are introduced, and on this basis, the two are combined to perform image encryption. Thus, the complexity of the encryption algorithm can be increased, thereby further improving the encryption security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of privacy data protection, and specifically relates to a privacy data security protection method, device and computer program product. Background Art

[0002] With the development of communication technology and mobile Internet, people have become accustomed to transmitting and sharing information on the Internet, and digital images, as important data carriers, have been widely used in enterprises, personal information, medical and military fields; among them, how to ensure the secure transmission and storage of information and prevent hackers from stealing is an urgent and pressing challenge. Therefore, people have gradually studied various security mechanisms to encrypt images, thereby protecting image information and ensuring the privacy of images.

[0003] At present, traditional encryption methods usually use symmetric encryption algorithms, which have the following shortcomings: the encryption algorithm is simple and its encryption security is low. In addition, due to the different processing methods of images and texts, there is a serious correlation between adjacent pixels. The use of traditional symmetric encryption methods does not take the aforementioned problems into consideration, which further reduces the security of encryption. At the same time, although there is a method of using a separate chaotic map to encrypt images, the existing chaotic map encryption still has the problems of simple encryption algorithm and poor anti-attack ability. Based on this, how to provide a security protection method for privacy data with high encryption security has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device and computer program product for protecting privacy data, so as to solve the problem of low encryption security in the prior art.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] In a first aspect, a method for protecting privacy data is provided, comprising:

[0007] Obtain the target's private image and DNA coding rules;

[0008] Based on the target private image, generating a chaotic key sequence;

[0009] Using the red component value, blue component value and green component value of each pixel in the target privacy image, construct a red component matrix, a blue component matrix and a green component matrix of the target privacy image;

[0010] Performing pixel scrambling processing on the red component matrix, the green component matrix, and the blue component matrix to obtain a scrambled red component matrix, a scrambled green component matrix, and a scrambled blue component matrix after the pixel scrambling processing;

[0011] Using the chaotic key sequence and the DNA coding rule, the scrambled red component matrix, the scrambled green component matrix and the scrambled blue component matrix are encrypted in sequence, so as to obtain an encrypted red component matrix, an encrypted green component matrix and an encrypted blue component matrix after the encryption process;

[0012] An encrypted target privacy image is generated according to the encrypted red component matrix, the encrypted blue component matrix, and the encrypted green component matrix.

[0013] Based on the above disclosed content, before encryption, the present invention first uses the red, blue and green component values ​​of each pixel in the target privacy image to construct a red component matrix, a blue component matrix and a green component matrix of the target privacy image; then, the above three matrices are subjected to pixel scrambling processing to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix; in this way, pixel scrambling of the R, G, B components of each pixel can reduce the correlation between adjacent pixels; at the same time, after completing the pixel scrambling of the above three matrices, encryption processing can be performed; wherein, the present invention introduces DNA coding rules on the basis of the generated chaotic key sequence, and uses the two to jointly encrypt the above three scrambled matrices, thereby obtaining three encrypted matrices; finally, the encrypted target privacy image can be generated using the three encrypted matrices; thus, combining the chaotic key with the DNA coding rule can increase the complexity of the encryption algorithm, thereby further improving the security of encryption.

[0014] Through the above design, the security protection method provided by the present invention first constructs a red component matrix, a blue component matrix and a green component matrix in the image; then, the above three component matrices are subjected to pixel scrambling processing to obtain three scrambled matrices; then, the generated chaotic key sequence and DNA coding rules are used to encrypt each scrambled matrix; finally, each encrypted matrix can be used to generate an encrypted image; based on this, by performing pixel scrambling on the R, G, and B components of each pixel point, the correlation between adjacent pixels can be reduced, thereby improving the security of encryption; at the same time, on the basis of the chaotic key sequence, the DNA coding rule is introduced, and on this basis, the two are combined to perform image encryption, so that the complexity of the encryption algorithm can be increased, thereby further improving the security of encryption, and thus, the present invention is very suitable for large-scale application and promotion in the field of data protection.

[0015] In a possible design, generating a chaotic key sequence based on the target privacy image includes:

[0016] Acquire a three-dimensional chaotic system, and generate an iterative initial value of the three-dimensional chaotic system according to the target privacy image;

[0017] Based on the iteration initial value, the three-dimensional chaotic system is iteratively processed to obtain three initial chaotic key sequences after the iterative processing, wherein the number of iterations of the three-dimensional chaotic system is m+M×N times, m is the minimum number of iterations, and M×N is the image size of the target privacy image;

[0018] Extracting the initial chaotic key from the m+1th position to the M×Nth position from each initial chaotic key sequence, so as to obtain three intercepted chaotic key sequences after the interception is completed;

[0019] Key adjustment processing is performed on each intercepted chaotic key sequence, so that after the key adjustment processing, the chaotic key sequence is obtained by using three adjusted intercepted chaotic key sequences.

[0020] In a possible design, generating an iterative initial value of the three-dimensional chaotic system according to the target privacy image includes:

[0021] Obtaining a red component value, a blue component value, and a green component value of each pixel in the target privacy image;

[0022] Sum the red component value of each pixel, the blue component value of each pixel, and the green component value of each pixel to obtain the sum of the red component value, the sum of the green component value, and the sum of the blue component value respectively;

[0023] Using the sum of the red component values, the sum of the green component values ​​and the sum of the blue component values, and according to the following formula (1), an iterative initial value of the three-dimensional chaotic system is calculated;

[0024]

[0025] In the above formula (1), x 0 ,y 0 ,z 0 All represent the iterative initial values ​​of the three-dimensional chaotic system, R′ represents the sum of the red component values, G′ represents the sum of the green component values, and B′ represents the sum of the blue component values.

[0026] In one possible design, the three intercepted chaotic key sequences are respectively a first intercepted chaotic key sequence, a second intercepted chaotic key sequence and a third intercepted chaotic key sequence, and the key adjustment process of the second intercepted chaotic key sequence is the same as the key adjustment process of the third intercepted chaotic key sequence;

[0027] The key adjustment process is performed on each intercepted chaotic key sequence, including:

[0028] Using the following formula (2), key adjustment processing is performed on each first key value in the first intercepted chaotic key sequence, and after adjustment, each adjusted first key value is used to form an adjusted first intercepted chaotic key sequence;

[0029] x i ′=mod(f((x i |-f(x i )))×10 14 ,N) (2)

[0030] In the above formula (2), x i represents the i-th first key value in the first intercepted chaotic key sequence, x i ′ represents the adjusted i-th first key value, f() represents a floor function, and mod represents a modulo operation, wherein i=1, 2, ..., M×N;

[0031] Using the following formula (3), key adjustment processing is performed on each second key value in the second intercepted chaotic key sequence, and after adjustment, each adjusted second key value is used to form an adjusted second intercepted chaotic key sequence;

[0032] y i ′=mod(f((y i |-f(y i |)))×10 14 ,256) (3)

[0033] In the above formula (3), y i represents the i-th second key value in the second intercepted chaotic key sequence, y i ′ represents the adjusted i-th second key value.

[0034] In one possible design, pixel scrambling processing is performed on the red component matrix, the green component matrix, and the blue component matrix to obtain a scrambled red component matrix, a scrambled green component matrix, and a scrambled blue component matrix after the pixel scrambling processing, including:

[0035] Performing Arnold mapping processing on the red component matrix, the green component matrix, and the blue component matrix to obtain a first mapping matrix, a second mapping matrix, and a third mapping matrix, respectively;

[0036] According to a preset scanning order, the first mapping matrix, the second mapping matrix and the third mapping matrix are scanned in sequence to obtain a first scanning sequence, a second scanning sequence and a third scanning sequence after the scanning process, wherein the first scanning sequence includes all elements in the first mapping matrix, and the arrangement order of each element in the first scanning sequence is the scanning order;

[0037] performing matrix conversion processing on the first scanning sequence, the second scanning sequence and the third scanning sequence in sequence, so as to obtain a first scanning matrix, a second scanning matrix and a third scanning matrix after the matrix conversion processing;

[0038] Scrambling processing is performed on each row in the first scanning matrix, the second scanning matrix, and the third scanning matrix to obtain a scrambled red component matrix, a scrambled green component matrix, and a scrambled blue component matrix after the scrambling processing.

[0039] In one possible design, the chaotic key sequence includes: a first chaotic key sequence, a second chaotic key sequence and a third chaotic key sequence;

[0040] Wherein, the chaotic key sequence and the DNA coding rule are used to sequentially encrypt the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after encryption, including:

[0041] Converting the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix into one-dimensional vectors in sequence to obtain a first vector, a second vector, and a third vector, respectively;

[0042] Performing initial encryption processing on the first vector using the first chaotic key sequence, performing initial encryption processing on the second vector using the second chaotic key sequence, and performing initial encryption processing on the third vector using the third chaotic key sequence, so as to obtain a first initial encryption vector, a second initial encryption vector, and a third initial encryption vector respectively;

[0043] According to the DNA encoding rule, the first chaotic key sequence, the second chaotic key sequence, the third chaotic key sequence, the first initial encryption vector, the second initial encryption vector and the third initial encryption vector are sequentially subjected to DNA encoding processing, so as to obtain a first encoding key sequence, a second encoding key sequence, a third encoding key sequence, a first encoding vector, a second encoding vector and a third encoding vector after the DNA encoding processing;

[0044] performing a secondary encryption process on the first encoding vector using the first encoding key sequence, performing a secondary encryption process on the second encoding vector using the second encoding key sequence, and performing a secondary encryption process on the third encoding vector using the third encoding key sequence, so as to obtain a first encryption vector, a second encryption vector, and a third encryption vector respectively;

[0045] A matrix restoration process is performed on the first encrypted vector, the second encrypted vector, and the third encrypted vector, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after the matrix restoration process.

[0046] In one possible design, performing initial encryption processing on the first vector using the first chaotic key sequence includes:

[0047] For the ath element in the first vector, using the ath first chaotic key value in the first chaotic key sequence, and according to the following formula (4), the ath element is initially encrypted to obtain the encrypted ath element;

[0048]

[0049] In the above formula (4), J′(a) represents the ath element after encryption. represents the value of the bth bit in the binary string corresponding to the ath element, represents the value of the bth bit in the binary string corresponding to the ath first chaotic key value, represents the value of the b+λth bit in the binary string corresponding to the ath first chaotic key value, λ represents an encryption parameter, ⊕ represents an XOR operation, and not() represents a logical NOT operation, wherein when a is equal to 1, λ is 1, when a is greater than 1, λ=mod(J(a-1),3)+1, J(a-1) represents the a-1th element in the first vector, and when b+λ is greater than 8, b+λ takes a value of 1;

[0050] Add 1 to a and reuse the a-th first chaotic key value in the first chaotic key sequence to perform initial encryption processing on the a-th element until a is equal to P, then obtain all encrypted elements in the first vector, and use all encrypted elements to form the first initial encryption vector, where the initial value of a is 1, and P is the total number of elements in the first vector.

[0051] In a second aspect, a privacy data security protection device is provided, comprising:

[0052] An acquisition unit, used for acquiring a target private image and a DNA encoding rule;

[0053] A key generation unit, used for generating a chaotic key sequence based on the target private image;

[0054] an image processing unit, configured to construct a red component matrix, a blue component matrix, and a green component matrix of the target privacy image by using the red component value, the blue component value, and the green component value of each pixel in the target privacy image;

[0055] An encryption unit, used for performing pixel scrambling processing on the red component matrix, the green component matrix and the blue component matrix, so as to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix after the pixel scrambling processing;

[0056] An encryption unit, used to use the chaotic key sequence and the DNA coding rule to sequentially encrypt the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after the encryption process;

[0057] The encryption unit is further used to generate an encrypted target privacy image according to the encrypted red component matrix, the encrypted blue component matrix and the encrypted green component matrix.

[0058] According to a third aspect, another device for protecting privacy data is provided. Taking the device as an electronic device as an example, the device includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the privacy data security protection method as described in the first aspect or any one of the possible designs in the first aspect.

[0059] In a fourth aspect, a storage medium is provided, on which instructions are stored. When the instructions are executed on a computer, the method for protecting the privacy data in the first aspect or any possible design of the first aspect is executed.

[0060] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for securely protecting privacy data as described in the first aspect or any possible design of the first aspect.

[0061] Beneficial effects:

[0062] (1) The security protection method provided by the present invention first constructs a red component matrix, a blue component matrix and a green component matrix in an image; then, the above three component matrices are subjected to pixel scrambling processing to obtain three scrambled matrices; then, the generated chaotic key sequence and DNA coding rules are used to encrypt each scrambled matrix; finally, each encrypted matrix can be used to generate an encrypted image; based on this, by performing pixel scrambling on the R, G, and B components of each pixel point, the correlation between adjacent pixels can be reduced, thereby improving the security of encryption; at the same time, on the basis of the chaotic key sequence, the DNA coding rule is introduced, and on this basis, the two are combined to perform image encryption, so that the complexity of the encryption algorithm can be increased, thereby further improving the security of encryption. Therefore, the present invention is very suitable for large-scale application and promotion in the field of data protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram of the steps of the method for protecting privacy data provided by an embodiment of the present invention;

[0064] Figure 2 A diagram showing the DNA coding rules provided by an embodiment of the present invention;

[0065] Figure 3 A schematic diagram of the structure of a security protection device for privacy data provided by an embodiment of the present invention;

[0066] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0068] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present invention.

[0069] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0070] Example:

[0071] See also Figure 1 As shown, the privacy data security protection method provided by this embodiment separates the R, G, B components of each pixel in the image to construct a corresponding R, G, B component matrix; then, the R, G, B component matrix is ​​pixel-scrambled to obtain the corresponding scrambled matrix; then, the chaotic key sequence and DNA coding rule are used to encrypt each scrambled matrix to obtain the encrypted R, G, B component matrix; finally, the encrypted image can be generated using each encrypted R, G, B component matrix; thus, on the one hand, the method can reduce the correlation between adjacent pixels by pixel-scrambling the R, G, B components of each pixel, thereby improving the security of encryption; on the other hand, on the basis of the chaotic key sequence, the DNA coding rule is introduced, and the two are combined to perform image encryption, thus, the complexity of the encryption algorithm can be increased, thereby further improving the security of encryption, and thus, the method is very suitable for large-scale application and promotion in the field of data protection; wherein, for example, the method can be, but not limited to, run on the image encryption end side, and optionally, the image encryption end can be, but not limited to, a personal computer (personal computer, PC), tablet computer, smart phone or server. It can be understood that the aforementioned execution entities do not constitute a limitation on the embodiments of the present application. Accordingly, the operation steps of the method can be but are not limited to the following steps S1 to S6.

[0072] S1. Obtain the target privacy image and DNA coding rules; in specific applications, the target privacy image can be an image stored in the user device terminal (i.e., the image encryption end is the user device terminal), which can be locally encrypted and then uploaded to the cloud storage space; of course, it can also be an image stored in the cloud storage space, which can be encrypted and stored by the server after uploading; in this embodiment, it is preferred to upload after encryption by the user device terminal, so that the security of the image during transmission and when stored in the cloud can be guaranteed.

[0073] In specific implementation, the DNA encoding rule can be pre-set in the image encryption end. There are 4 bases in the DNA sequence, namely A, C, G and T. A and T are complementary, C and G are complementary, and similarly, the binary numbers 00 and 11 are complementary, and 01 and 10 are complementary. Therefore, 00, 01, 10 and 11 are used to replace the above 4 bases respectively, and then there are 8 types that meet the complementary rule, which can be but not limited to the following: Figure 2 As shown; that is, if a binary string is 00011011, then when it is encoded using DNA encoding rule 1, it can be encoded as ACGT; of course, the principles of the other encoding rules are the same, so I will not go into details here.

[0074] After acquiring the target private image, it is necessary to first generate a corresponding chaotic key sequence based on the image, so as to subsequently encrypt the image based on the chaotic key sequence and the aforementioned DNA encoding; optionally, the chaotic key sequence generation process can be but is not limited to as shown in the following step S2.

[0075] S2. Generate a chaotic key sequence based on the target privacy image; in specific applications, this embodiment generates a chaotic key sequence by means of a three-dimensional chaotic system; wherein, the target privacy image is first used to generate an initial value of the three-dimensional chaotic system, and then, iteration is performed to generate a corresponding chaotic key sequence; optionally, the generation process of the aforementioned chaotic key sequence may be, but is not limited to, as shown in the following steps S21 to S24,

[0076] S21. Obtain a three-dimensional chaotic system, and generate an iterative initial value of the three-dimensional chaotic system according to the target privacy image; in this embodiment, the three-dimensional chaotic system can be, but is not limited to, a Chen chaotic system, a Logistic chaotic system, or a Lorenz hyperchaotic system, etc.; at the same time, this embodiment also provides an improved three-dimensional chaotic system, which has better chaotic dynamics performance and a larger key space, so that the security of the key can be further improved.

[0077] The improved three-dimensional chaotic system can be, but is not limited to, as shown in the following formula (5).

[0078]

[0079] The above formula (5) represents the improved three-dimensional chaotic system, where x, y, and z all represent state parameters. is the iterative value of the corresponding state parameter (i.e., the chaotic key value), and σ, τ represent the control parameters; in the present embodiment, for example, σ, τ can be, but not limited to, set to 2.215 and 0.25 respectively; in this way, as long as the iterative initial values ​​of the above three state parameters are given, the entire system can generate the iterative values ​​of each state parameter during the iteration process, and in this way, by recording the iterative value of each state parameter, the following initial chaotic key sequence can be obtained.

[0080] In the specific implementation, the following discloses two schemes for using the target privacy image to generate the iterative initial value of the three-dimensional chaotic system, wherein the first scheme is to use the R, G, B components of each pixel in the target privacy image to determine, and the other scheme is to obtain the hash value of the target privacy image to determine; optionally, they are explained below respectively.

[0081] In specific applications, the first method for determining the initial value of the iteration may be, but is not limited to, the following steps S21a to S21c.

[0082] S21 a. Obtain the red component value, blue component value, and green component value of each pixel in the target privacy image.

[0083] S21 b. Sum the red component value of each pixel point, the blue component value of each pixel point, and the green component value of each pixel point to obtain the sum of the red component value, the sum of the green component value, and the sum of the blue component value, respectively.

[0084] Thus, after obtaining the sum of the red component values, the green component values, and the blue component values ​​in the target privacy image through the aforementioned steps S21a and S21b, the iterative initial value of the three-dimensional chaotic system can be obtained based on this, and the process can be but not limited to as shown in the following step S21c.

[0085] S21c. Using the sum of the red component values, the sum of the green component values ​​and the sum of the blue component values, and according to the following formula (1), calculate the iterative initial value of the three-dimensional chaotic system.

[0086]

[0087] In the above formula (1), x 0 ,y 0 ,z 0All represent the iterative initial values ​​of the three-dimensional chaotic system, R′ represents the sum of the red component values, G′ represents the sum of the green component values, and B′ represents the sum of the blue component values.

[0088] Therefore, through the aforementioned steps S21a to S21c, the R, G, B components of each pixel in the target privacy image can be used to obtain the iterative initial value of the three-dimensional chaotic system.

[0089] Furthermore, the second solution for generating the iterative initial value disclosed below may be, but is not limited to, as shown in the following steps S21d to S21f.

[0090] S21d. Perform a hash operation on the target private image to obtain a hash string of the target private image, wherein the length of the hash string is 256. In this embodiment, the SHA-256 hash algorithm may be used, but is not limited to, to perform a hash operation on the target private image. Of course, the aforementioned SHA-256 hash algorithm is a commonly used hash algorithm, and its principle will not be repeated here.

[0091] After the hash string is obtained, the iterative initial value of the three-dimensional chaotic system can be determined based on the hash string, and the determination process can be but is not limited to the following steps S21e and S21f.

[0092] S21e. Divide the hash string into a number of hash blocks according to a preset length; in this embodiment, the preset length is 8 for example, and the hash string is divided from the beginning to the end, so that 32 hash blocks can be obtained; and after obtaining 32 hash blocks, the 32 hash blocks can be used to determine the iteration initial value, and the process can be but not limited to as shown in the following step S21 f.

[0093] S21 f, using several hash blocks, and according to the following formula (6), calculate the iteration initial value.

[0094]

[0095] In the above formula (6), x 0 ,y 0 ,z 0 Both represent the iterative initial values ​​of the three-dimensional chaotic system, h 1 ,h 32 ,h 2 ,h 31 ,h 3 ,h 30 represents the first hash block, the 32nd hash block, the 2nd hash block, the 31st hash block, the 3rd hash block, and the 30th hash block in sequence. 2q+1Indicates the 2q+1th hash block among several hash blocks, h 2q represents the 2qth hash block among several hash blocks, and ξ represents a constant.

[0096] Therefore, through the aforementioned steps S21d~S21f, the iterative initial value of the three-dimensional chaotic system can also be obtained; of course, this embodiment can select one of the aforementioned schemes; after obtaining the iterative initial value of the three-dimensional chaotic system, iterative processing can be performed based on this to obtain three initial chaotic key sequences; wherein, the iterative process can be but is not limited to as shown in the following step S22.

[0097] S22. Based on the iterative initial value, the three-dimensional chaotic system is iteratively processed to obtain three initial chaotic key sequences after the iterative processing, wherein the number of iterations of the three-dimensional chaotic system is m+M×N times, m is the minimum number of iterations, and M×N is the image size of the target privacy image (M×N is the length and width of the image); in this embodiment, m can be pre-set and is not specifically limited here; at the same time, after three initial chaotic key sequences are obtained based on the aforementioned step S22, a chaotic key sequence can be generated based on this, and the process can be but is not limited to as shown in the following steps S23 and S24.

[0098] S23. The initial chaotic keys from the m+1th to the M×Nth positions are intercepted from each initial chaotic key sequence, so as to obtain three intercepted chaotic key sequences after the interception is completed; in the present embodiment, the reason for retaining only the initial chaotic keys from the m+1th to the M×Nth positions in each initial chaotic key sequence is to eliminate the transient effect of the three-dimensional chaotic system; thus, the length of each intercepted chaotic key sequence is M×N, which can match the total number of pixels in the target privacy image, so as to facilitate the subsequent encryption processing; and after the interception of the initial chaotic key sequence is completed, the key adjustment can be performed, so as to obtain three chaotic key sequences after the key adjustment; wherein, the key adjustment process can be but is not limited to as shown in the following step S24.

[0099] S24. Perform key adjustment processing on each intercepted chaotic key sequence, so that after the key adjustment processing, the chaotic key sequence is obtained by using three adjusted intercepted chaotic key sequences; in this embodiment, the three intercepted chaotic key sequences can be named as, but not limited to, the first intercepted chaotic key sequence, the second intercepted chaotic key sequence and the third intercepted chaotic key sequence, and the key adjustment process of the second intercepted chaotic key sequence is the same as the key adjustment process of the third intercepted chaotic key sequence; in this way, this embodiment takes the first intercepted chaotic key sequence and the second intercepted chaotic key sequence as examples to illustrate the key adjustment process.

[0100] Among them, by way of example but not limited to the following formula (2), each first key value in the first intercepted chaotic key sequence is key adjusted, and after adjustment, each adjusted first key value is used to form an adjusted first intercepted chaotic key sequence.

[0101] x i ′=mod(f((x i |-f(x i |)))×10 14 ,N) (2)

[0102] In the above formula (2), x i represents the i-th first key value in the first intercepted chaotic key sequence, x i ′ represents the adjusted i-th first key value, f() represents a floor function, mod represents a modulo operation, wherein i=1, 2, ..., M×N.

[0103] Thus, based on the aforementioned formula (2), the adjustment of each first key value in the first intercepted chaotic key sequence can be adjusted to obtain the adjusted first intercepted chaotic key sequence.

[0104] Similarly, the following formula (3) can be used as an example but is not limited to adjust the second key values ​​in the second intercepted chaotic key sequence, and after the adjustment, the adjusted second key values ​​are used to form an adjusted second intercepted chaotic key sequence.

[0105] y i ′=mod(f((y i |-f(y i |)))×10 14 ,256) (3)

[0106] In the above formula (3), y i represents the i-th second key value in the second intercepted chaotic key sequence, y i ′ represents the adjusted i-th second key value.

[0107] Therefore, through the above formula (2) and formula (3), the adjustment of the first intercepted chaotic key sequence, the second and the third intercepted chaotic key sequence can be completed, thereby obtaining three chaotic key sequences.

[0108] At the same time, this embodiment also provides another key adjustment method, in which, in this scheme, the adjustment process of each intercepted chaotic key sequence is the same, and the following takes the first intercepted chaotic key sequence as an example to illustrate; specifically, the following formula (7) can be used but is not limited to adjust each first key value in the first intercepted chaotic key sequence, so that after the adjustment, the adjusted first intercepted chaotic key sequence is obtained.

[0109] x i ′=mod(f(x i ×10 15 ),3) (7)

[0110] x i represents the i-th first key value in the first intercepted chaotic key sequence, x i ′ represents the adjusted i-th first key value.

[0111] In this way, by adopting any of the aforementioned key adjustment methods, the adjustment of three intercepted chaotic key sequences can be completed, thereby obtaining three adjusted intercepted chaotic key sequences; then, the three adjusted intercepted chaotic key sequences can be used as chaotic key sequences; that is, the number of chaotic key sequences is three, and for the purpose of distinguishing, they can be named the first chaotic key sequence, the second chaotic key sequence and the third chaotic key sequence respectively.

[0112] Therefore, through the aforementioned steps S21 to S24, the target privacy image can be used to generate the chaotic key sequence used for this encryption; then, the encryption process can be entered; wherein, this embodiment first performs pixel scrambling processing to reduce the correlation between adjacent pixels; then, the aforementioned chaotic key sequence and DNA coding rules are used to perform encryption processing to complete the encryption of the image; optionally, the pixel scrambling processing can be but is not limited to the following steps S3 and S4.

[0113] S3. Using the red component value, blue component value and green component value of each pixel in the target privacy image, a red component matrix, a blue component matrix and a green component matrix of the target privacy image are constructed. In this embodiment, the red component value of each pixel is used to construct the red component matrix; the blue component value of each pixel is used to construct the blue component matrix; and the green component value of each pixel is used to construct the green component matrix. Then, the above three component matrices may be subjected to pixel scrambling processing, and the process may be but is not limited to the following step S4.

[0114] S4. Perform pixel scrambling processing on the red component matrix, the green component matrix and the blue component matrix to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix after the pixel scrambling processing; in the specific implementation, for example, but not limited to, the following steps S41 to S44 can be used to complete the scrambling processing of each component matrix.

[0115] S41. Perform Arnold mapping processing on the red component matrix, the green component matrix and the blue component matrix to obtain a first mapping matrix, a second mapping matrix and a third mapping matrix respectively; in this embodiment, the Arnold mapping processing is also called cat face transformation, which is a commonly used technology in the field of image encryption, and its principle will not be repeated.

[0116] After completing the Arnold mapping process of each component matrix, matrix scanning may be performed, and the process may be but is not limited to the process shown in the following step S42.

[0117] S42. According to a preset scanning order, the first mapping matrix, the second mapping matrix and the third mapping matrix are scanned in turn to obtain a first scanning sequence, a second scanning sequence and a third scanning sequence after the scanning process, wherein the first scanning sequence includes all the elements in the first mapping matrix, and the arrangement order of each element in the first scanning sequence is the scanning order; in a specific implementation, the preset scanning order may be, but is not limited to, a zigzag scan (i.e., Zigzag transformation), wherein the scanning method is to scan in a zigzag shape starting from the first point of the matrix (i.e., the element in the first row and the first column), and finally rearrange into a one-dimensional sequence, wherein the zigzag scan is a commonly used technology for matrix scanning, and its principle will not be repeated.

[0118] After the scanning of the matrix is ​​completed, the sequence obtained by scanning can be used to restore the matrix, and the process can be but not limited to the following step S43.

[0119] S43. Perform matrix conversion processing on the first scanning sequence, the second scanning sequence and the third scanning sequence in sequence, so as to obtain a first scanning matrix, a second scanning matrix and a third scanning matrix after the matrix conversion processing; in specific applications, for example, each scanning sequence can be converted into a scanning matrix in the order of rows or columns, but is not limited to; for example, assuming that the first scanning sequence is {1,5,3,9,7,3,9,5,4,7,3,6,6,4,1,3}, and the matrix conversion is performed in rows, then the first row of the first scanning matrix is ​​1,5,3,9, the second row is 7,3,9,5; the third row is 4,7,3,6, and the fourth row is 6,4,1,3; of course, the principle of performing matrix conversion in columns is the same as the above example, except that the columns are sorted first, and the principle will not be repeated.

[0120] After the scanning matrices corresponding to the three component matrices are obtained, a scrambling process may be performed, and the process may be but is not limited to the process shown in the following step S44.

[0121] S44. Perform scrambling processing on each row in the first scanning matrix, the second scanning matrix and the third scanning matrix to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix after the scrambling processing; in this embodiment, for example, but not limited to, the Joseph ring scrambling method can be used to perform scrambling processing on each row in the aforementioned scanning matrices to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix; of course, the Joseph ring scrambling method is a commonly used technology for pixel scrambling, and its principle will not be repeated.

[0122] Therefore, through the aforementioned steps S41 to S44, this embodiment combines Arno ld mapping processing, zigzag scanning and Joseph ring scrambling in the pixel scrambling process. In this way, the pixel scrambling effect can be improved by combining the three transformation methods, thereby significantly reducing the correlation between adjacent pixels.

[0123] After the scrambling process of the three component matrices is completed, the aforementioned chaotic key sequence and DNA encoding rule can be used to perform encryption processing on the three scrambled component matrices, and the process can be but is not limited to the following step S5.

[0124] S5. Utilize the chaotic key sequence and the DNA coding rule to sequentially encrypt the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after encryption. In specific applications, this embodiment first uses a chaotic key sequence for initial encryption, and then uses DNA coding for secondary encryption, thereby increasing the complexity of the encryption algorithm on the basis of the original chaotic key encryption, thereby achieving the purpose of improving encryption security.

[0125] Optionally, the aforementioned two encryption processes may be but are not limited to the following steps S51 to S55.

[0126] S51. Convert the scrambled red component matrix, the scrambled green component matrix and the scrambled blue component matrix into one-dimensional vectors in sequence to obtain a first vector, a second vector and a third vector respectively; in the present embodiment, taking the scrambled red component matrix as an example, it is possible but not limited to extracting each element in the matrix from the first row until the last row is extracted, and then a one-dimensional vector can be obtained. At the same time, it is also possible to extract each element in the matrix from the first column; in this way, after selecting any of the aforementioned methods and extracting the elements in the scrambled red component matrix, a one-dimensional vector can be obtained; of course, the process of obtaining the second vector and the third vector is the same as the aforementioned example, and will not be repeated here.

[0127] After obtaining the first vector, the second vector and the third vector, the chaotic key sequence may be used to perform initial encryption processing on each vector, and the process may be, but is not limited to, as shown in the following step S52.

[0128] S52. Perform initial encryption processing on the first vector using the first chaotic key sequence, perform initial encryption processing on the second vector using the second chaotic key sequence, and perform initial encryption processing on the third vector using the third chaotic key sequence to obtain a first initial encryption vector, a second initial encryption vector, and a third initial encryption vector, respectively. In specific implementation, since the initial encryption process of each vector is the same, the first vector is taken as an example for explanation, and the process can be but is not limited to the following steps S52a and S52b.

[0129] S52a. For the ath element in the first vector, use the ath first chaotic key value in the first chaotic key sequence and perform initial encryption processing on the ath element according to the following formula (4) to obtain the encrypted ath element.

[0130]

[0131] In the above formula (4), J′(a) represents the ath element after encryption. represents the value of the bth bit in the binary string corresponding to the ath element, represents the value of the bth bit in the binary string corresponding to the ath first chaotic key value, It represents the value of the b+λth bit in the binary string corresponding to the ath first chaotic key value, λ represents the encryption parameter, ⊕ represents the XOR operation, and not() represents the logical NOT operation, wherein when a is equal to 1, λ is 1, when a is greater than 1, λ=mod(J(a-1),3)+1, J(a-1) represents the a-1th element in the first vector, and when b+λ is greater than 8, b+λ takes the value of 1.

[0132] After the initial encryption of the ath element in the first vector is completed based on the above formula (4), the encryption of the next element can be performed, and the process can be but not limited to the following step S52b.

[0133] S52b. Add 1 to a and reuse the a-th first chaotic key value in the first chaotic key sequence to perform initial encryption processing on the a-th element until a is equal to P, then obtain all encrypted elements in the first vector, and use all encrypted elements to form the first initial encryption vector, where the initial value of a is 1, and P is the total number of elements in the first vector.

[0134] In this way, through the aforementioned steps S52a and S52b, the first key values ​​in the first chaotic key sequence can be used, and the aforementioned formula (4) can be used to encrypt the elements at the corresponding positions in the first vector, so that after the encryption process, the first initial encrypted vector is obtained; of course, the initial encryption process of the second vector and the third vector is the same as the initial encryption process of the first vector, and will not be repeated here.

[0135] After completing the initial encryption processing of the three vectors based on the chaotic key sequence, the DNA coding rules can be used to perform secondary encryption to increase the complexity of the encryption algorithm, thereby enhancing the security of the encryption; wherein the secondary encryption process can be but is not limited to as shown in the following steps S53 and S54.

[0136] S53. According to the DNA coding rule, the first chaotic key sequence, the second chaotic key sequence, the third chaotic key sequence, the first initial encryption vector, the second initial encryption vector and the third initial encryption vector are sequentially subjected to DNA coding processing, so as to obtain the first coding key sequence, the second coding key sequence, the third coding key sequence, the first coding vector, the second coding vector and the third coding vector after the DNA coding processing; in the specific implementation, since the coding process of the aforementioned chaotic key sequences and the initial encryption vectors is the same, the first chaotic key sequence is taken as an example for explanation; wherein, the example may be but is not limited to first converting each key value in the first chaotic key sequence into a binary string, and then, using the DNA coding rule, converting the binary string of each key value into a DNA code, so that after the conversion is completed, the first coding key sequence can be obtained (that is, the first coding key sequence contains M×N DNA codes, that is, each key value in the original first chaotic key sequence corresponds to a DNA code); of course, the DNA coding rule can be selected Figure 2 Any one of the rules in the above can be used to convert the binary string into corresponding bases according to the selected rule to obtain the DNA code corresponding to the binary string; in this way, the DNA coding processing of the remaining chaotic key sequences and the initial encryption vectors can be completed by the aforementioned method; then, the encoded chaotic key sequences can be used to encrypt the corresponding initial encryption vectors, and the process can be but not limited to the following step S54.

[0137] S54. Perform secondary encryption processing on the first coding vector using the first coding key sequence, perform secondary encryption processing on the second coding vector using the second coding key sequence, and perform secondary encryption processing on the third coding vector using the third coding key sequence, so as to obtain a first encryption vector, a second encryption vector and a third encryption vector respectively; in specific applications, since the secondary encryption process of each coding vector is the same, the following takes the first coding vector as an example for explanation, and the process is: obtain a genetic crossover position, and based on the genetic crossover position, perform a genetic crossover operation on the first coding vector using the first coding key sequence, so as to obtain a first encryption vector after the genetic crossover operation.

[0138] Optionally, it has been explained above that the first coding key sequence and the first coding vector contain M×N DNA codes, which is equivalent to performing a genetic crossover operation on each DNA code in the two; wherein the genetic crossover position can be but is not limited to being pre-set, such as the crossover point is the second bit in the DNA code. Of course, it can be specifically set according to actual use and is not limited to the above examples.

[0139] Furthermore, the genetic crossover operation is described below using an example:

[0140] Assume that the first DNA code in the first coding key sequence is: ACGT, the first DNA code in the first coding vector is CGTT, and the genetic crossover position is the second position, then it is equivalent to exchanging the values ​​of the two individuals before and after the crossover point. Therefore, the first DNA code in the first coding key sequence becomes: ACTT after the genetic crossover operation; then, according to this principle, each DNA code in the first coding key sequence is genetically crossovered with the DNA code at the corresponding position in the first coding vector to obtain the first encrypted vector; of course, the secondary encryption process of the second coding vector and the third coding vector is the same as the above example, and will not be repeated here.

[0141] In this way, based on the aforementioned step S54, the DNA coding rule is used to perform secondary encryption on each initial encryption vector, which not only increases the complexity of the encryption algorithm, but also makes the randomness of each obtained encryption vector better, based on which the security of encryption can be further improved.

[0142] After completing the secondary encryption, each encrypted vector can be restored to a matrix, thereby obtaining each encrypted component matrix; wherein the vector restoration process can be but is not limited to the following step S55.

[0143] S55. Perform matrix restoration processing on the first encrypted vector, the second encrypted vector and the third encrypted vector to obtain an encrypted red component matrix, an encrypted green component matrix and an encrypted blue component matrix after the matrix restoration processing; in this embodiment, each encrypted vector is first subjected to DNA decoding processing to obtain a first decoding vector, a second decoding vector and a third decoding vector (specifically, the DNA code in each encrypted vector is restored to a binary string according to the DNA coding rule); then, each decoding vector is restored to a decimal vector; finally, each decimal vector is restored to a matrix (i.e., restored to a matrix according to the conversion sequence of step S51; if elements are extracted and converted into vectors in units of rows, then, during the restoration, the restoration is still performed in rows), and the encrypted red component matrix, the encrypted green component matrix and the encrypted blue component matrix can be obtained.

[0144] Based on the aforementioned steps S51 to S55, the encryption processing of each scrambled component matrix can be completed; at the same time, this embodiment also provides another encryption method, which can be but not limited to as shown below.

[0145] The first step: using the first chaotic key sequence to perform initial encryption processing on the first vector, using the second chaotic key sequence to perform initial encryption processing on the second vector, and using the third chaotic key sequence to perform initial encryption processing on the third vector, so as to obtain a first initial encryption vector, a second initial encryption vector and a third initial encryption vector respectively.

[0146] Here, the first chaotic key sequence is taken as an example to illustrate an initial encryption method different from step S52, wherein the first initial encryption vector can be obtained by using, but not limited to, the following formula (8).

[0147] J′=(J+X)mod256 (8)

[0148] In the above formula (8), J′ represents the first initial encryption vector, J represents the first vector, and X represents the first chaotic key sequence.

[0149] In this way, based on the aforementioned formula (8), the initial encryption of the first vector can be achieved; of course, the initial encryption process of the second vector and the third vector is the same as the initial encryption process of the aforementioned first vector, which will not be repeated here.

[0150] After the initial encryption of the first vector, the second vector and the third vector is completed, the DNA encoding rule can be used to perform secondary encryption, and the process is shown in the second step of the following steps.

[0151] Step 2: Using DNA coding rules, DNA coding is performed on the first vector, the second vector and the third vector to obtain a first coding vector, a second coding vector and a third coding vector.

[0152] Step 3: Perform DNA complement operation on the first coding vector, the second coding vector and the third coding vector. After the complement operation, the first encrypted vector, the second encrypted vector and the third encrypted vector can be obtained. In this embodiment, it is assumed that a DNA code in the first coding vector is: ACGT, and the complement operation is: TGCA (i.e., A and T are complementary, G and C are complementary). In this way, the complement operation of the first coding vector, the second coding vector and the third coding vector can be completed by this method to obtain the corresponding encrypted vector. Of course, after obtaining the encrypted vector, matrix restoration is still required to obtain the corresponding encrypted component matrix.

[0153] Therefore, through the encryption method disclosed in the aforementioned steps S51 to S55 or the aforementioned first to third steps, the encryption processing of each scrambled component matrix can be completed; then, the three encrypted component matrices can be used to generate an encrypted target privacy image, and the process can be but not limited to as shown in the following step S6.

[0154] S6. Generate an encrypted target privacy image based on the encrypted red component matrix, the encrypted blue component matrix, and the encrypted green component matrix. In this embodiment, it is equivalent to using the encrypted three-primary color matrix to generate the encrypted target privacy image. Then, it can be transmitted to the cloud storage space for storage. In this way, the encryption of the target privacy image can be completed, thereby protecting the privacy information in the image.

[0155] Therefore, through the security protection method for privacy data described in detail in the aforementioned steps S1 to S6, the present invention can reduce the correlation between adjacent pixels by scrambling the R, G, and B components of each pixel, thereby improving the security of encryption; on the other hand, based on the chaotic key sequence, the DNA coding rule is introduced, and the two are combined to perform image encryption, so that the complexity of the encryption algorithm can be increased, thereby further improving the security of encryption. Therefore, the present invention is very suitable for large-scale application and promotion in the field of data protection.

[0156] like Figure 3 As shown, the second aspect of this embodiment provides a hardware device for implementing the privacy data security protection method described in the first aspect of the embodiment, including:

[0157] The acquisition unit is used to acquire the target private image and the DNA encoding rule.

[0158] The key generation unit is used to generate a chaotic key sequence based on the target privacy image.

[0159] The image processing unit is used to construct a red component matrix, a blue component matrix and a green component matrix of the target privacy image by using the red component value, the blue component value and the green component value of each pixel in the target privacy image.

[0160] The encryption unit is used to perform pixel scrambling processing on the red component matrix, the green component matrix and the blue component matrix to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix after the pixel scrambling processing.

[0161] An encryption unit is used to use the chaotic key sequence and the DNA coding rule to encrypt the scrambled red component matrix, the scrambled green component matrix and the scrambled blue component matrix in sequence, so as to obtain an encrypted red component matrix, an encrypted green component matrix and an encrypted blue component matrix after the encryption process.

[0162] The encryption unit is further used to generate an encrypted target privacy image according to the encrypted red component matrix, the encrypted blue component matrix and the encrypted green component matrix.

[0163] The working process, working details and technical effects of the device provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.

[0164] like Figure 4 As shown, the third aspect of this embodiment provides another device for securely protecting privacy data. Taking the device as an electronic device as an example, the device includes: a memory, a processor and a transceiver that are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for securely protecting privacy data as described in the first aspect of the embodiment.

[0165] For example, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out memory (FIFO) and / or first-in-last-out memory (FILO), etc. Specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). At the same time, the processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.

[0166] In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. For example, the processor may not be limited to a microprocessor of the STM32F105 series, a reduced instruction set computer (RISC) microprocessor, an X86 or other architecture processor, or a processor with an integrated embedded neural network processor (NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a Bluetooth wireless transceiver, a general packet radio service technology (Genera l Packet Rad ioService, GPRS) wireless transceiver, a ZigBee protocol (a low-power LAN protocol based on the IEEE 802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver and / or a 5G transceiver, etc. In addition, the device may also include, but is not limited to, a power module, a display screen and other necessary components.

[0167] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.

[0168] The fourth aspect of this embodiment provides a storage medium that stores instructions including the method for securely protecting privacy data described in the first aspect of the embodiment, that is, the storage medium stores instructions, and when the instructions are run on a computer, the method for securely protecting privacy data described in the first aspect of the embodiment is executed.

[0169] The storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, a CD, a hard disk, a flash memory, a USB flash drive and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0170] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.

[0171] The fifth aspect of this embodiment provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the privacy data security protection method as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0172] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for protecting privacy data, characterized in that: include: Obtain the target's private image and DNA coding rules; Based on the target private image, generating a chaotic key sequence; Using the red component value, blue component value and green component value of each pixel in the target privacy image, construct a red component matrix, a blue component matrix and a green component matrix of the target privacy image; Performing pixel scrambling processing on the red component matrix, the green component matrix, and the blue component matrix to obtain a scrambled red component matrix, a scrambled green component matrix, and a scrambled blue component matrix after the pixel scrambling processing; Using the chaotic key sequence and the DNA coding rule, the scrambled red component matrix, the scrambled green component matrix and the scrambled blue component matrix are encrypted in sequence, so as to obtain an encrypted red component matrix, an encrypted green component matrix and an encrypted blue component matrix after the encryption process; Generate an encrypted target privacy image according to the encrypted red component matrix, the encrypted blue component matrix and the encrypted green component matrix; The chaotic key sequence includes: a first chaotic key sequence, a second chaotic key sequence and a third chaotic key sequence; Wherein, the chaotic key sequence and the DNA coding rule are used to sequentially encrypt the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after encryption, including: Converting the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix into one-dimensional vectors in sequence to obtain a first vector, a second vector, and a third vector, respectively; Performing initial encryption processing on the first vector using the first chaotic key sequence, performing initial encryption processing on the second vector using the second chaotic key sequence, and performing initial encryption processing on the third vector using the third chaotic key sequence, so as to obtain a first initial encryption vector, a second initial encryption vector, and a third initial encryption vector respectively; According to the DNA encoding rule, the first chaotic key sequence, the second chaotic key sequence, the third chaotic key sequence, the first initial encryption vector, the second initial encryption vector and the third initial encryption vector are sequentially subjected to DNA encoding processing, so as to obtain a first encoding key sequence, a second encoding key sequence, a third encoding key sequence, a first encoding vector, a second encoding vector and a third encoding vector after the DNA encoding processing; performing a secondary encryption process on the first encoding vector using the first encoding key sequence, performing a secondary encryption process on the second encoding vector using the second encoding key sequence, and performing a secondary encryption process on the third encoding vector using the third encoding key sequence, so as to obtain a first encryption vector, a second encryption vector, and a third encryption vector respectively; Performing matrix restoration processing on the first encrypted vector, the second encrypted vector, and the third encrypted vector, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after the matrix restoration processing; Performing initial encryption processing on the first vector using the first chaotic key sequence includes: For the first element, using the first chaotic key sequence The first chaotic key value is obtained by using the following formula (4): The first element is encrypted and the encrypted elements; (4) In the above formula (4), Indicates the encrypted elements, Indicates the The first element in the binary string corresponding to The value of the bit, Indicates the The first chaotic key value in the binary string The value of the bit, Indicates the The first chaotic key value in the binary string The value of the bit, Indicates encryption parameters, represents the exclusive OR operation, Represents a logical NOT operation, where When it is equal to 1, is 1, when When greater than 1, , represents the first vector elements, and when When it is greater than 8, The value is 1; Will Add 1 to itself and reuse the first chaotic key sequence a first chaotic key value, for the first Elements are initially encrypted until equal , all encrypted elements in the first vector are obtained, and all encrypted elements are used to form the first initial encrypted vector, where The initial value of is 1, and is the total number of elements in the first vector.

2. The method according to claim 1, characterized in that Based on the target privacy image, a chaotic key sequence is generated, including: Acquire a three-dimensional chaotic system, and generate an iterative initial value of the three-dimensional chaotic system according to the target privacy image; Based on the iteration initial value, the three-dimensional chaotic system is iteratively processed to obtain three initial chaotic key sequences after the iterative processing, wherein the number of iterations of the three-dimensional chaotic system is m+M×N times, m is the minimum number of iterations, and M×N is the image size of the target privacy image; Extracting the initial chaotic key from the m+1th position to the M×Nth position from each initial chaotic key sequence, so as to obtain three intercepted chaotic key sequences after the interception is completed; Key adjustment processing is performed on each intercepted chaotic key sequence, so that after the key adjustment processing, the chaotic key sequence is obtained by using three adjusted intercepted chaotic key sequences.

3. The method according to claim 2, characterized in that Generating an iterative initial value of the three-dimensional chaotic system according to the target privacy image, including: Obtaining a red component value, a blue component value, and a green component value of each pixel in the target privacy image; Sum the red component value of each pixel, the blue component value of each pixel, and the green component value of each pixel to obtain the sum of the red component value, the sum of the green component value, and the sum of the blue component value respectively; Using the sum of the red component values, the sum of the green component values ​​and the sum of the blue component values, and according to the following formula (1), an iterative initial value of the three-dimensional chaotic system is calculated; (1) In the above formula (1), Both represent the iterative initial values ​​of the three-dimensional chaotic system. represents the sum of the red component values, represents the sum of the green component values, Represents the sum of the blue component values.

4. The method according to claim 2, characterized in that: The three intercepted chaotic key sequences are respectively a first intercepted chaotic key sequence, a second intercepted chaotic key sequence and a third intercepted chaotic key sequence, and the key adjustment process of the second intercepted chaotic key sequence is the same as the key adjustment process of the third intercepted chaotic key sequence; The key adjustment process is performed on each intercepted chaotic key sequence, including: The following formula (2) is used to perform key adjustment processing on each first key value in the first intercepted chaotic key sequence, and after the adjustment, each adjusted first key value is used to form an adjusted first intercepted chaotic key sequence; (2) In the above formula (2), Indicates the first intercepted chaotic key sequence The first key value, Indicates the adjusted The first key value, represents the floor function, represents the remainder operation, where ; The following formula (3) is used to perform key adjustment processing on each second key value in the second intercepted chaotic key sequence, and after the adjustment, each adjusted second key value is used to form an adjusted second intercepted chaotic key sequence; (3) In the above formula (3), Indicates the first A second key value, Indicates the adjusted A second key value.

5. The method according to claim 1, characterized in that Performing pixel scrambling processing on the red component matrix, the green component matrix, and the blue component matrix to obtain a scrambled red component matrix, a scrambled green component matrix, and a scrambled blue component matrix after the pixel scrambling processing, including: Performing Arnold mapping processing on the red component matrix, the green component matrix, and the blue component matrix to obtain a first mapping matrix, a second mapping matrix, and a third mapping matrix, respectively; According to a preset scanning order, the first mapping matrix, the second mapping matrix and the third mapping matrix are scanned in sequence to obtain a first scanning sequence, a second scanning sequence and a third scanning sequence after the scanning process, wherein the first scanning sequence includes all elements in the first mapping matrix, and the arrangement order of each element in the first scanning sequence is the scanning order; performing matrix conversion processing on the first scanning sequence, the second scanning sequence and the third scanning sequence in sequence, so as to obtain a first scanning matrix, a second scanning matrix and a third scanning matrix after the matrix conversion processing; Scrambling processing is performed on each row in the first scanning matrix, the second scanning matrix, and the third scanning matrix to obtain a scrambled red component matrix, a scrambled green component matrix, and a scrambled blue component matrix after the scrambling processing.

6. A security protection device for privacy data, characterized in that: include: An acquisition unit, used for acquiring a target private image and a DNA encoding rule; A key generation unit, used for generating a chaotic key sequence based on the target private image; an image processing unit, configured to construct a red component matrix, a blue component matrix, and a green component matrix of the target privacy image by using the red component value, the blue component value, and the green component value of each pixel in the target privacy image; An encryption unit, used for performing pixel scrambling processing on the red component matrix, the green component matrix and the blue component matrix, so as to obtain a scrambled red component matrix, a scrambled green component matrix and a scrambled blue component matrix after the pixel scrambling processing; An encryption unit, used to use the chaotic key sequence and the DNA coding rule to sequentially encrypt the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after the encryption process; The encryption unit is further used to generate an encrypted target privacy image according to the encrypted red component matrix, the encrypted blue component matrix and the encrypted green component matrix; The chaotic key sequence includes: a first chaotic key sequence, a second chaotic key sequence and a third chaotic key sequence; Wherein, the chaotic key sequence and the DNA coding rule are used to sequentially encrypt the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after encryption, including: Converting the scrambled red component matrix, the scrambled green component matrix, and the scrambled blue component matrix into one-dimensional vectors in sequence to obtain a first vector, a second vector, and a third vector, respectively; Performing initial encryption processing on the first vector using the first chaotic key sequence, performing initial encryption processing on the second vector using the second chaotic key sequence, and performing initial encryption processing on the third vector using the third chaotic key sequence, so as to obtain a first initial encryption vector, a second initial encryption vector, and a third initial encryption vector respectively; According to the DNA encoding rule, the first chaotic key sequence, the second chaotic key sequence, the third chaotic key sequence, the first initial encryption vector, the second initial encryption vector and the third initial encryption vector are sequentially subjected to DNA encoding processing, so as to obtain a first encoding key sequence, a second encoding key sequence, a third encoding key sequence, a first encoding vector, a second encoding vector and a third encoding vector after the DNA encoding processing; performing a secondary encryption process on the first encoding vector using the first encoding key sequence, performing a secondary encryption process on the second encoding vector using the second encoding key sequence, and performing a secondary encryption process on the third encoding vector using the third encoding key sequence, so as to obtain a first encryption vector, a second encryption vector, and a third encryption vector respectively; Performing matrix restoration processing on the first encrypted vector, the second encrypted vector, and the third encrypted vector, so as to obtain an encrypted red component matrix, an encrypted green component matrix, and an encrypted blue component matrix after the matrix restoration processing; Performing initial encryption processing on the first vector using the first chaotic key sequence includes: For the first element, using the first chaotic key sequence The first chaotic key value is obtained by using the following formula (4): The first element is encrypted and the encrypted elements; (4) In the above formula (4), Indicates the encrypted elements, Indicates the The first element in the binary string corresponding to The value of the bit, Indicates the The first chaotic key value in the binary string The value of the bit, Indicates the The first chaotic key value in the binary string The value of the bit, Indicates encryption parameters, represents the exclusive OR operation, Represents a logical NOT operation, where When it is equal to 1, is 1, when When greater than 1, , represents the first vector elements, and when When it is greater than 8, The value is 1; Will Add 1 to itself and reuse the first chaotic key sequence a first chaotic key value, for the first Elements are initially encrypted until equal , all encrypted elements in the first vector are obtained, and all encrypted elements are used to form the first initial encrypted vector, where The initial value of is 1, and is the total number of elements in the first vector.

7. A security protection device for privacy data, characterized in that: include: A memory, a processor and a transceiver that are sequentially connected in communication, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read computer programs to execute the privacy data security protection method as described in any one of claims 1 to 5.

8. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to execute the privacy data security protection method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • A multi-channel color image chaotic encryption method based on DNA coding

    CN109918923A