A chaos-based encryption method for the image of the Yellow River dam bank danger

By using a chaos-based encryption method to scramble and diffuse the pixel matrix of the Yellow River dam bank danger image, a ciphertext image is generated, and the original image is decrypted and restored on the server side, which solves the risk of the image being stolen when transmitted on the public network and ensures The lives and property of the people along the Yellow River are safe.

CN114579935BActive Publication Date: 2024-09-17HENAN UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210207778.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2024-09-17
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

There is a risk of being stolen when images of dangers along the banks of the Yellow River are transmitted on public networks, threatening the lives and property of people along the Yellow River.

Method used

A chaos-based encryption method is adopted, using Arnold transform, Logistic chaos system and Chen hyperchaos system to generate chaotic sequences, perform pixel matrix scrambling and diffusion, generate ciphertext images, and decrypt on the server side to restore the original images.

Benefits of technology

It effectively protects the security of images of dangerous situations on the banks of the Yellow River when they are transmitted on the public network, prevents images from being stolen, and ensures the security of image transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579935B
    Figure CN114579935B
Patent Text Reader

Abstract

The present invention discloses a method for encrypting dangerous images of Yellow River dam banks based on chaos. The method encrypts the dangerous images of Yellow River dam banks taken by a camera, transmits them to a server through a public network, and then decrypts them, so that the information is more securely transmitted from the public network. The method comprises the following steps: scrambling the dangerous images of Yellow River dam banks taken by the camera using Arnold transformation; giving the initial values ​​and control parameters of Logistic chaotic system and Chen hyperchaotic system, iterating and quantizing the sorting into the required chaotic sequence; performing specific rule operations on the pixel values ​​of the scrambled image, and performing secondary scrambling on the pixel matrix after the operation to obtain the encrypted image; transmitting the encrypted image to the server through the network, and performing decryption operation to obtain the original dangerous images of Yellow River dam banks. The present invention greatly improves the security of information transmission in the public network, and avoids the problem of information leakage caused by malicious attacks on information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of watershed danger monitoring, and in particular relates to a chaos-based encryption method for a Yellow River dam bank danger image. Background Art

[0002] River disasters have been one of the major disasters in my country since ancient times, and the dangers of the Yellow River occur more frequently. Every time the flood season comes, accidents in the Yellow River always occur frequently. This is mainly due to sedimentation and frequent rainfall. Therefore, if the dangers of the Yellow River can be discovered early, the safety of life and property of the people on the banks of the Yellow River can be greatly protected.

[0003] The current Yellow River danger detection technologies mainly include satellite remote sensing technology, camera real-time monitoring technology and manual inspection. However, satellite remote sensing technology is too expensive, and the detection results may be biased in bad weather conditions; camera real-time monitoring technology requires manual real-time monitoring, which requires a high level of tension 24 hours a day, and consumes too much human resources; manual inspections, like camera detection technology, cannot monitor the Yellow River in real time.

[0004] In order to solve the problems of high cost and shortage of personnel, the Yellow River dam bank danger warning system was born. The system deploys monitoring points on the dam bank, each of which monitors the dam bank situation in real time 24 hours a day. If the detection point alarms, it means that a dangerous situation has occurred. The deployed camera will turn to the point where the dangerous situation occurs to take pictures and transmit the captured images to the server.

[0005] The transmission of dangerous images of the Yellow River dam banks is mainly through the public network, which makes the images likely to be stolen. Criminals are likely to find the weak points of the dam through this information and attack the dam banks, causing the dam to collapse. In serious cases, it may even threaten the lives and property of people along the Yellow River. Summary of the invention

[0006] Aiming at the problem that the image of the Yellow River dam bank danger situation may be stolen when it is transmitted on the public network, which may lead to the attack on the dam bank and threaten the life and property safety of people along the Yellow River, the present invention proposes a method for encrypting the image of the Yellow River dam bank danger situation based on chaos. Chaos refers to the irregular motion existing in a deterministic system. With a slight change in the initial value, the value of the chaotic system after iteration will change greatly, and the anti-attack ability is strong. Therefore, using chaos for image encryption can ensure image security.

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

[0008] On the one hand, the present invention proposes a chaos-based Yellow River dam bank danger image encryption method, comprising:

[0009] Step 1: Generate the initial value of Arnold transform according to the hash key and initial key generated by the plaintext Yellow River dam bank danger image P, and use the Logistic chaotic system and Chen hyperchaotic system to generate chaotic sequences respectively, where the Logistic system is used to generate the chaotic sequence Lx, and the Chen hyperchaotic system is used to generate the chaotic sequence Cx, Cy, Cz, Cw. The size of the original image P is M×N;

[0010] Step 2: Divide the original image P into three pixel matrices PicR, PicG and PicB of length M×N;

[0011] Step 3: Use Arnold transformation to scramble the pixel matrices PicR, PicG and PicB respectively to obtain scrambled images ScramMR, ScramMG and ScramMB;

[0012] Step 4: Quantize the chaotic sequences Lx, Cy, Cz and Cw to obtain the quantized chaotic sequences Lx`, Cy`, Cz` and Cw`; sort the chaotic sequence Cx to obtain the sorted sequence Cx` and the index sequence IndexCx; encode Lx` to obtain the encoding sequence Lx`` corresponding to each value of Lx`;

[0013] Step 5: Take three values ​​of ScramMR, ScramMB and ScramMB each time to form the pixel input layer ScramM, and take the values ​​of the corresponding positions in Cy`, Cz` and Cw` to form the chaotic layer Ckernel;

[0014] Step 6: Use the chaotic layer Ckernel to diffuse the pixels of the input layer ScramM according to the coding order Lx`` to obtain the matrix SecritM after diffusion;

[0015] Step 7: Perform secondary scrambling on the diffused matrix SecritM according to IndexCx, and compose the scrambled values ​​into three pixel matrices CipherR, CipherG and CipherB;

[0016] Step 8: Combine the matrices CipherR, CipherG and CipherB to obtain the ciphertext image C.

[0017] Furthermore, the step 1 comprises:

[0018] Step 1.1: Based on the hash key and initial key generated from the plaintext Yellow River dam bank danger image P, generate the initial values ​​x1, x2, x3, x4, x5, x6, x7, x8, x9 of the Arnold transform according to formula (1):

[0019]

[0020] Among them, t1, t2, ..., t9 represent the initial key; k i represents the hash key, i=1,2,…,27; represents XOR operation; mod represents modulo operation; floor represents rounding down;

[0021] Step 1.2: Generate the initial values ​​Lx0, Cx0, Cy0, Cz0 and Cw0 of the Logistic system and Chen hyperchaotic system according to the hash key and initial key generated by the plaintext image P according to formula (2):

[0022]

[0023] Among them, ep, y1, y2, y3, y4 represent the initial key; g1, g2, h1, h2, ..., h8 represent the hash key; mod represents the modulus operation;

[0024] Step 1.3: Substitute the initial value Lx0 into the Logistic chaotic system and iterate 200+lp times, where lp is the total number of pixels of the image R matrix component, discard the first 200 values, and obtain a chaotic sequence Lx with a length of lp; Substitute the initial values ​​Cx0, Cy0, Cz0, Cw0 into the Chen hyperchaotic system and iterate 200+lp times, discard the first 200 values, and obtain a chaotic sequence Cx, Cy, Cz, Cw with a length of lp.

[0025] Furthermore, the step 2 comprises:

[0026] The original image P is divided into three image matrices PicR, PicG and PicB of length lp according to the three color components R, G, and B.

[0027] Furthermore, the step 3 comprises:

[0028] The initial value of the Arnold transformation and the image matrices PicR, PicG and PicB are respectively subjected to Arnold transformation to obtain the image matrices ScramMR, ScramMG and ScramMB after Arnold transformation. The Arnold transformation is shown in formula (5):

[0029]

[0030] Among them, a, b, N are given positive integers; x n ,y n is the x position and y position of the pixel matrix; mod is the modulo function.

[0031] Furthermore, the step 4 comprises:

[0032] Step 4.1: Quantize the chaotic queue Lx to obtain an integer sequence Lx` with a length of M×N and between [1,6]. The quantization rule of Lx is shown in formula (6):

[0033] Lx i `=(floor(Lx i ×10 12 )mod 6+1 (6)

[0034] Step 4.2: Sort the chaotic sequence Cx from small to large to obtain the sorted chaotic sequence Cx` and index sequence IndexCx;

[0035] Step 4.3: Perform regular coding on Lx` to obtain the coding sequence Lx`` corresponding to each value of Lx`; the regular coding of Lx` is as follows:

[0036] 1: R, G, B;

[0037] 2: R, B, G;

[0038] 3: G, R, B;

[0039] 4: G, B, R;

[0040] 5: B, R, G;

[0041] 6: B, G, R.

[0042] Furthermore, the step 5 comprises:

[0043] Step 5.1: Take i = 1, 2, ..., lp, and transform the three pixels in ScramMR, ScramMG, and ScramMB according to Lx` i The encoding rules are put into the input layer ScramM;

[0044] Step 5.2: Take the three values ​​corresponding to Cy`, Cz`, and Cw` to form the chaotic layer Ckernel.

[0045] Further, the step 6 comprises:

[0046] Step 6.1: Take the pixel at the first position of ScramM, XOR it with the pixel at the 9th position of Ckernel and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the first position of SecritM as the pixel value of the first position of SecritM;

[0047] Step 6.2: Take the pixels at the 1st, 2nd, and 3rd positions of ScramM, perform XOR operations with the 7th, 8th, and 9th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them at the 2nd position of SecritM as the pixel value at the 2nd position of SecritM;

[0048] Step 6.3: Take the pixel at the third position of ScramM, XOR it with the pixel at the seventh position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the third position of SecritM as the pixel value at the third position of SecritM;

[0049] Step 6.4: Take the pixels at the 1st, 4th, and 7th positions of ScramM, perform XOR operations with the 3rd, 6th, and 9th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them at the 4th position of SecritM as the pixel value at the 4th position of SecritM;

[0050] Step 6.5: XOR all pixels in ScramM with pixels in Ckernel bit by bit, add the obtained values, round down to 256, and put them in the 5th position of SecritM as the pixel value of the 5th position of SecritM;

[0051] Step 6.6: Take the pixels at the 3rd, 6th, and 9th positions of ScramM, perform XOR operations with the 1st, 4th, and 7th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them into the 6th position of SecritM as the pixel value of the 6th position of SecritM;

[0052] Step 6.7: Take the pixel at the 7th position of ScramM, XOR it with the pixel at the 3rd position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the 7th position of SecritM as the pixel value at the 7th position of SecritM;

[0053] Step 6.8: Take the pixels at the 7th, 8th, and 9th positions of ScramM, perform XOR operations with the 1st, 2nd, and 3rd pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them into the 8th position of SecritM as the pixel value of the 8th position of SecritM;

[0054] Step 6.9: Take the pixel at the 9th position of ScramM, XOR it with the pixel at the 1st position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the 9th position of SecritM as the pixel value at the 9th position of SecritM;

[0055] Step 6.10: Repeat steps 6.1 to 6.9 until all pixels in the original image are encrypted, and obtain the diffused matrices CipherR, CipherG and CipherB.

[0056] Furthermore, the step 7 comprises:

[0057] According to IndexCx, the pixel positions of CipherR, CipherG and CipherB are scrambled respectively to obtain three encrypted pixel matrices CipherR`, CipherG`, CipherB`.

[0058] Furthermore, the step 8 comprises:

[0059] Consider CipherR` as the R component matrix of the image, CipherG` as the G component matrix of the image, and CipherB` as the B component matrix of the image, and combine the three component matrices to obtain the encrypted final matrix C.

[0060] Furthermore, after step 8, the method further includes:

[0061] Step 9: Use the chaotic index sequence IndexCx to inversely scramble the three R, G, and B components of the ciphertext image C to obtain the diffused pixel matrices CipherR`, CipherG`, and CipherB`;

[0062] Step 10: Use the chaotic sequence Cy`, Cz`, Cw` to perform inverse diffusion on CipherR`, CipherG`, CipherB`, and aggregate the obtained pixel values ​​into ScramMR, ScramMG and ScramMB according to the encoding rule of the chaotic sequence Lx`;

[0063] Step 11: Use Arnold scrambling to inversely scramble ScramMR, ScramMG, and ScramMB to obtain PicR, PicG, and PicB components of the original image;

[0064] Step 12: Combine PicR, PicG, and PicB to obtain the original image of the Yellow River dam bank danger situation.

[0065] Another aspect of the present invention provides a chaos-based Yellow River dam bank danger image encryption device, comprising:

[0066] The chaotic sequence generation module is used to generate the initial value of the Arnold transform according to the hash key and the initial key generated by the plaintext Yellow River dam bank danger image P, and to generate the chaotic sequence using the Logistic chaotic system and the Chen hyperchaotic system respectively, wherein the Logistic system is used to generate the chaotic sequence Lx, and the Chen hyperchaotic system is used to generate the chaotic sequence Cx, Cy, Cz, Cw, and the size of the original image P is M×N;

[0067] A pixel matrix obtaining module is used to divide the original image P into three pixel matrices PicR, PicG and PicB of length M×N;

[0068] A scrambling module, used to scramble the pixel matrices PicR, PicG and PicB respectively using Arnold transformation to obtain scrambled images ScramMR, ScramMG and ScramMB;

[0069] The encoding module is used to quantize the chaotic sequences Lx, Cy, Cz and Cw to obtain the quantized chaotic sequences Lx`, Cy`, Cz` and Cw`; sort the chaotic sequence Cx to obtain the sorted sequence Cx` and the index sequence IndexCx; encode Lx` to obtain the encoding sequence Lx`` corresponding to each value of Lx`;

[0070] The chaotic layer generation module is used to take three values ​​of ScramMR, ScramMB and ScramMB each time to form the pixel input layer ScramM, and take the values ​​of the corresponding positions in Cy`, Cz` and Cw` to form the chaotic layer Ckernel;

[0071] The pixel diffusion module is used to use the chaotic layer Ckernel to diffuse the pixels of the input layer ScramM according to the coding order Lx`` to obtain the matrix SecritM after diffusion;

[0072] A secondary scrambling module is used to perform secondary scrambling on the diffused matrix SecritM according to IndexCx, and compose the scrambled values ​​into three pixel matrices CipherR, CipherG and CipherB;

[0073] The ciphertext image obtaining module is used to combine the matrices CipherR, CipherG and CipherB to obtain the ciphertext image C.

[0074] Another aspect of the present invention is to provide a chaos-based Yellow River dam bank danger image decryption device, comprising:

[0075] The first inverse scrambling module is used to inversely scramble the three R, G, and B components of the ciphertext image C using the chaotic index sequence IndexCx on the server to obtain diffused pixel matrices CipherR`, CipherG`, and CipherB`;

[0076] The reverse diffusion module is used to reversely diffuse CipherR`, CipherG`, CipherB` using the chaotic sequences Cy`, Cz`, Cw` on the server, and aggregate the obtained pixel values ​​into ScramMR, ScramMG and ScramMB according to the encoding rule of the chaotic sequence Lx`;

[0077] The second inverse scrambling module is used to inversely scramble ScramMR, ScramMG, and ScramMB using Arnold scrambling on the server to obtain PicR, PicG, and PicB components of the original image;

[0078] The original Yellow River dam bank danger image obtaining module is used to combine PicR, PicG, and PicB on the server to obtain the original Yellow River dam bank danger image.

[0079] Compared with the prior art, the present invention has the following beneficial effects:

[0080] The present invention adopts Arnold transformation to perform the transposition operation of the original image pixels, and adopts Logistic chaos and Chen hyperchaotic system to construct a chaotic sequence, and uses a specific pixel diffusion algorithm to change the pixel value of the image pixel matrix after transposition, and then transmits it to the server through the network. The server performs decryption according to the corresponding rules to obtain the original image sent by the camera. The problem that the dangerous images of the Yellow River dam bank may be stolen when transmitted on the public network, which may lead to the attack on the dam bank and threaten the life and property safety of the people along the Yellow River, can be ensured. The safety of the dangerous images of the Yellow River dam bank when transmitted on the public network can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 This is a basic flow chart of a chaos-based Yellow River dam bank danger image encryption method according to an embodiment of the present invention;

[0082] Figure 2 This is an example diagram of the pixel composition rule of the input layer ScramM according to an embodiment of the present invention;

[0083] Figure 3 This is an example diagram of the chaotic layer pixel composition rule according to an embodiment of the present invention;

[0084] Figure 4 This is a diagram showing the encryption and decryption effects of an embodiment of the present invention. DETAILED DESCRIPTION

[0085] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0086] like Figure 1 As shown, a chaos-based Yellow River dam bank danger image encryption method includes the following steps:

[0087] Step 1: Generate the initial value of Arnold transform based on the hash key and initial key generated by the plaintext (camera-photographed) image P of the Yellow River dam bank danger, and use the Logistic chaotic system and Chen hyperchaotic system to generate chaotic sequences, where the Logistic system is used to generate the chaotic sequence Lx, and the Chen hyperchaotic system is used to generate the chaotic sequence Cx, Cy, Cz, Cw. The size of the original image P is M×N;

[0088] Step 2: Divide the original image P into three pixel matrices PicR, PicG and PicB of length M×N;

[0089] Step 3: Use Arnold transformation to scramble the pixel matrices PicR, PicG and PicB respectively to obtain scrambled images ScramMR, ScramMG and ScramMB;

[0090] Step 4: Quantize the chaotic sequences Lx, Cy, Cz and Cw to obtain the quantized chaotic sequences Lx`, Cy`, Cz` and Cw`; sort the chaotic sequence Cx to obtain the sorted sequence Cx` and the index sequence IndexCx; encode Lx` to obtain the encoding sequence Lx`` corresponding to each value of Lx`;

[0091] Step 5: Take three values ​​of ScramMR, ScramMB and ScramMB each time to form the pixel input layer ScramM, and take the values ​​of the corresponding positions in Cy`, Cz` and Cw` to form the chaotic layer Ckernel;

[0092] Step 6: Use the chaotic layer Ckernel to diffuse the pixels of the input layer ScramM according to the coding order Lx`` to obtain the matrix SecritM after diffusion;

[0093] Step 7: Perform secondary scrambling on the diffused matrix SecritM according to IndexCx, and compose the scrambled values ​​into three pixel matrices CipherR, CipherG and CipherB;

[0094] Step 8: Combine the matrices CipherR, CipherG and CipherB to obtain the ciphertext image C.

[0095] Furthermore, the step 1 specifically includes:

[0096] Step 1.1: Generate the initial values ​​x1, x2, x3, x4, x5, x6, x7, x8, x9 of the Arnold transform according to the hash key and initial key generated from the plaintext image P according to formula (1):

[0097]

[0098] Among them, t1, t2, ..., t9 represent the initial key; k i represents the hash key, i=1,2,…,27; represents XOR operation; mod represents modulo operation; floor represents rounding down;

[0099] Step 1.2: Generate the initial values ​​Lx0, Cx0, Cy0, Cz0 and Cw0 of the Logistic system and Chen hyperchaotic system according to the hash key and initial key generated by the plaintext image P according to formula (2):

[0100]

[0101] Among them, ep, y1, y2, y3, y4 represent the initial key; g1, g2, h1, h2, ..., h8 represent the hash key; mod represents the modulus operation;

[0102] Step 1.3: Substitute the initial value Lx0 into the Logistic chaotic system and iterate 200+lp times, where lp is the total number of pixels in the image R matrix component. Discard the first 200 values ​​to obtain a chaotic sequence Lx with a length of lp; Substitute the initial values ​​Cx0, Cy0, Cz0, Cw0 into the Chen hyperchaotic system and iterate 200+lp times, discard the first 200 values, and obtain a chaotic sequence Cx, Cy, Cz, Cw with a length of lp. The Logistic chaotic system is shown in formula (3):

[0103] x n+1 =μx(1-x n ) (3)

[0104] Among them, μ is the control parameter of the chaotic system Logistic. When μ∈[3.56995,4], Logistic is in a chaotic state.

[0105] Chen hyperchaotic system is shown in formula (4):

[0106]

[0107] Among them, a, b, c, d are given integers, r is the control parameter of Chen hyperchaotic system, when r∈[0.1085,0.1798], Chen hyperchaotic system is in a chaotic state. is the fractional form of x,y,z,w.

[0108] Furthermore, the step 2 comprises:

[0109] The original image P is divided into three image matrices PicR, PicG and PicB of length lp according to the three color components R, G, and B.

[0110] Furthermore, the step 3 comprises:

[0111] The Arnold initial value and the image matrices PicR, PicG and PicB are subjected to Arnold transformation respectively to obtain the image matrices ScramMR, ScramMG and ScramMB after Arnold transformation. The Arnold transformation is shown in formula (5):

[0112]

[0113] Among them, a, b, N are given positive integers; x n ,y n is the x position and y position of the pixel matrix; mod is the modulo function.

[0114] Furthermore, the step 4 comprises:

[0115] Step 4.1: Quantize the chaotic queue Lx to obtain an integer sequence Lx` with a length of M×N and between [1,6]. The quantization rule of Lx is shown in formula (6):

[0116] Lx i `=(floor(Lx i ×10 12 )mod 6+1 (6)

[0117] Step 4.2: Sort the chaotic sequence Cx from small to large to obtain the sorted chaotic sequence Cx` and index sequence IndexCx;

[0118] Step 4.3: Perform regular coding on Lx` to obtain the coding sequence Lx`` corresponding to each value of Lx`. The regular coding of Lx` is as follows:

[0119] 1: R, G, B;

[0120] 2: R, B, G;

[0121] 3: G, R, B;

[0122] 4: G, B, R;

[0123] 5: B, R, G;

[0124] 6: B, G, R.

[0125] Further, the step 5 comprises:

[0126] Step 5.1: Take i = 1, 2, ..., lp, and transform the three pixels in ScramMR, ScramMG, and ScramMB according to Lx` i The encoding rules are put into the input layer ScramM. Assuming Lx`1=1, Lx`2=4, Lx`3=2, the first input layer is composed as follows Figure 2 As shown;

[0127] Step 5.2: Take the three values ​​corresponding to Cy`, Cz`, and Cw` to form the chaotic layer Ckernel. The composition rules are as follows: Figure 3 shown.

[0128] Furthermore, in step 6, Ckernel is used to perform pixel diffusion on ScramM according to a specific operation rule to obtain a matrix SecritM after diffusion. The pixel diffusion rule is as follows:

[0129] Step 6.1: Take the pixel at the first position of ScramM, XOR it with the pixel at the 9th position of Ckernel and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the first position of SecritM as the pixel value of the first position of SecritM;

[0130] Step 6.2: Take the pixels at the 1st, 2nd, and 3rd positions of ScramM, perform XOR operations with the 7th, 8th, and 9th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them at the 2nd position of SecritM as the pixel value at the 2nd position of SecritM;

[0131] Step 6.3: Take the pixel at the third position of ScramM, XOR it with the pixel at the seventh position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the third position of SecritM as the pixel value at the third position of SecritM;

[0132] Step 6.4: Take the pixels at the 1st, 4th, and 7th positions of ScramM, perform XOR operations with the 3rd, 6th, and 9th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them at the 4th position of SecritM as the pixel value at the 4th position of SecritM;

[0133] Step 6.5: XOR all pixels in ScramM with pixels in Ckernel bit by bit, add the obtained values, round down to 256, and put them in the 5th position of SecritM as the pixel value of the 5th position of SecritM;

[0134] Step 6.6: Take the pixels at the 3rd, 6th, and 9th positions of ScramM, perform XOR operations with the 1st, 4th, and 7th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them into the 6th position of SecritM as the pixel value of the 6th position of SecritM;

[0135] Step 6.7: Take the pixel at the 7th position of ScramM, XOR it with the pixel at the 3rd position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the 7th position of SecritM as the pixel value at the 7th position of SecritM;

[0136] Step 6.8: Take the pixels at the 7th, 8th, and 9th positions of ScramM, perform XOR operations with the 1st, 2nd, and 3rd pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them into the 8th position of SecritM as the pixel value of the 8th position of SecritM;

[0137] Step 6.9: Take the pixel at the 9th position of ScramM, XOR it with the pixel at the 1st position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the 9th position of SecritM as the pixel value at the 9th position of SecritM.

[0138] Repeat steps 6.1 to 6.9 until all pixels in the original image are encrypted, and obtain the diffused matrices CipherR, CipherG, and CipherB.

[0139] Further, the step 7 comprises:

[0140] According to IndexCx, the pixel positions of CipherR, CipherG and CipherB are scrambled respectively to obtain three encrypted pixel matrices CipherR`, CipherG`, CipherB`.

[0141] Further, the step 8 comprises:

[0142] Consider CipherR` as the R component matrix of the image, CipherG` as the G component matrix of the image, and CipherB` as the B component matrix of the image, and combine the three component matrices to obtain the encrypted final matrix C.

[0143] On the basis of the above embodiments, the present invention further provides a chaos-based Yellow River dam bank danger image decryption method, comprising:

[0144] Step A: On the server, the three R, G, and B components of the ciphertext image C are inversely scrambled using the chaotic index sequence IndexCx to obtain the diffused pixel matrix CipherR`, CipherG`, CipherB`;

[0145] Step B: On the server, the chaotic sequences Cy`, Cz`, Cw` are used to perform inverse diffusion on CipherR`, CipherG`, CipherB`, and the obtained pixel values ​​are aggregated into ScramMR, ScramMG and ScramMB according to the encoding rule of the chaotic sequence Lx`;

[0146] Step C: On the server, ScramMR, ScramMG, and ScramMB are inversely scrambled using Arnold scrambling to obtain PicR, PicG, and PicB components of the original image;

[0147] Step D: On the server, combine PicR, PicG, and PicB to obtain the original image of the Yellow River dam bank danger situation.

[0148] On the basis of the above-mentioned embodiment, the present invention further provides a chaos-based Yellow River dam bank danger image encryption device, characterized in that it comprises:

[0149] The chaotic sequence generation module is used to generate the initial value of the Arnold transform according to the hash key and the initial key generated by the plaintext Yellow River dam bank danger image P, and to generate the chaotic sequence using the Logistic chaotic system and the Chen hyperchaotic system respectively, wherein the Logistic system is used to generate the chaotic sequence Lx, and the Chen hyperchaotic system is used to generate the chaotic sequence Cx, Cy, Cz, Cw, and the size of the original image P is M×N;

[0150] A pixel matrix obtaining module is used to divide the original image P into three pixel matrices PicR, PicG and PicB of length M×N;

[0151] A scrambling module, used to scramble the pixel matrices PicR, PicG and PicB respectively using Arnold transformation to obtain scrambled images ScramMR, ScramMG and ScramMB;

[0152] The encoding module is used to quantize the chaotic sequences Lx, Cy, Cz and Cw to obtain the quantized chaotic sequences Lx`, Cy`, Cz` and Cw`; sort the chaotic sequence Cx to obtain the sorted sequence Cx` and the index sequence IndexCx; encode Lx` to obtain the encoding sequence Lx`` corresponding to each value of Lx`;

[0153] The chaotic layer generation module is used to take three values ​​of ScramMR, ScramMB and ScramMB each time to form the pixel input layer ScramM, and take the values ​​of the corresponding positions in Cy`, Cz` and Cw` to form the chaotic layer Ckernel;

[0154] The pixel diffusion module is used to use the chaotic layer Ckernel to diffuse the pixels of the input layer ScramM according to the coding order Lx`` to obtain the matrix SecritM after diffusion;

[0155] A secondary scrambling module is used to perform secondary scrambling on the diffused matrix SecritM according to IndexCx, and compose the scrambled values ​​into three pixel matrices CipherR, CipherG and CipherB;

[0156] The ciphertext image obtaining module is used to combine the matrices CipherR, CipherG and CipherB to obtain the ciphertext image C.

[0157] On the basis of the above-mentioned embodiment, the present invention further provides a chaos-based Yellow River dam bank danger image decryption device, comprising:

[0158] The first inverse scrambling module is used to inversely scramble the three R, G, and B components of the ciphertext image C using the chaotic index sequence IndexCx on the server to obtain diffused pixel matrices CipherR`, CipherG`, and CipherB`;

[0159] The reverse diffusion module is used to reversely diffuse CipherR`, CipherG`, CipherB` using the chaotic sequences Cy`, Cz`, Cw` on the server, and aggregate the obtained pixel values ​​into ScramMR, ScramMG and ScramMB according to the encoding rule of the chaotic sequence Lx`;

[0160] The second inverse scrambling module is used to inversely scramble ScramMR, ScramMG, and ScramMB using Arnold scrambling on the server to obtain PicR, PicG, and PicB components of the original image;

[0161] The original Yellow River dam bank danger image obtaining module is used to combine PicR, PicG, and PicB on the server to obtain the original Yellow River dam bank danger image.

[0162] To verify the effect of the present invention, the following experiment was performed:

[0163] Experimental simulation platform: CPU:Inter(R)Core(TM)i5-7500 CPU@3.40GHz; Memory:16GB; Operating system:Windows10; Experimental parameters: Logistic initial value Lx0=0.2248, control parameter μ=3.68; Chen hyperchaotic system initial value Cx0=0.3533, Cy0=0.4147, Cz0=0.3641, Cw0=0.0223, control parameters a=35, b=3, c=12, d=7, r=0.136; Anrold transform R component initial parameter a R =10,b R =11,N R =13; G component initial parameter a G =8,b G =10,N G =7; initial parameter a of component B B =7,b B =12,N B =14; test image such as Figure 4 As shown: the left picture is the image before encryption, the middle picture is the image after encryption, and the right picture is the image after decryption.

[0164] In summary, the present invention uses Arnold transformation to perform the transposition operation of the original image pixels, and uses Logistic chaos and Chen hyperchaotic system to construct a chaotic sequence, and uses a specific pixel diffusion algorithm to change the pixel value of the image pixel matrix after transposition, and then transmits it to the server through the network. The server performs decryption according to the corresponding rules to obtain the original image sent by the camera. The problem that the dangerous images of the Yellow River dam bank may be stolen when transmitted on the public network, which may lead to attacks on the dam bank and threaten the safety of life and property of people along the Yellow River, can be ensured. The safety of the dangerous images of the Yellow River dam bank when transmitted on the public network can be guaranteed.

[0165] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A chaos-based encryption method for the image of the Yellow River dam bank danger, characterized in that: include: Step 1: Generate the initial value of Arnold transform according to the hash key and initial key generated by the plaintext Yellow River dam bank danger image P, and use the Logistic chaotic system and Chen hyperchaotic system to generate chaotic sequences respectively, where the Logistic system is used to generate the chaotic sequence Lx, and the Chen hyperchaotic system is used to generate the chaotic sequence Cx, Cy, Cz, Cw. The size of the original image P is M×N; Step 2: Divide the original image P into three pixel matrices PicR, PicG and PicB of length M×N; Step 3: Use Arnold transformation to scramble the pixel matrices PicR, PicG and PicB respectively to obtain scrambled images ScramMR, ScramMG and ScramMB; Step 4: Quantize the chaotic sequences Lx, Cy, Cz and Cw to obtain the quantized chaotic sequences Lx`, Cy`, Cz` and Cw`; sort the chaotic sequence Cx to obtain the sorted sequence Cx` and the index sequence IndexCx; encode Lx` to obtain the encoding sequence Lx`` corresponding to each value of Lx`; Step 5: Take three values ​​of ScramMR, ScramMB and ScramMB each time to form the pixel input layer ScramM, and take the values ​​of the corresponding positions in Cy`, Cz` and Cw` to form the chaotic layer Ckernel; Step 6: Use the chaotic layer Ckernel to diffuse the pixels of the input layer ScramM according to the coding order Lx`` to obtain the matrix SecritM after diffusion; Step 7: Perform secondary scrambling on the diffused matrix SecritM according to IndexCx, and compose the scrambled values ​​into three pixel matrices CipherR, CipherG and CipherB; Step 8: Combine the matrices CipherR, CipherG and CipherB to obtain the ciphertext image C; The step 1 comprises: Step 1.1: Based on the hash key and initial key generated from the plaintext Yellow River dam bank danger image P, generate the initial values ​​x1, x2, x3, x4, x5, x6, x7, x8, x9 of the Arnold transform according to formula (1): Among them, t1, t2, ..., t9 represent the initial key; k i represents the hash key, i=1,2,…,27; represents XOR operation; mod represents modulo operation; floor represents rounding down; Step 1.2: Generate the initial values ​​Lx0, Cx0, Cy0, Cz0 and Cw0 of the Logistic system and Chen hyperchaotic system according to the hash key and initial key generated by the plaintext image P according to formula (2): Among them, ep, y1, y2, y3, y4 represent the initial key; g1, g2, h1, h2, ..., h8 represent the hash key; mod represents the modulus operation; Step 1.3: Substitute the initial value Lx0 into the Logistic chaotic system and iterate 200+lp times, where lp is the total number of pixels in the image R matrix component, discard the first 200 values, and obtain a chaotic sequence Lx with a length of lp; Substitute the initial values ​​Cx0, Cy0, Cz0, Cw0 into the Chen hyperchaotic system and iterate 200+lp times, discard the first 200 values, and obtain a chaotic sequence Cx, Cy, Cz, Cw with a length of lp; The step 6 comprises: Step 6.1: Take the pixel at the first position of ScramM, XOR it with the pixel at the 9th position of Ckernel and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the first position of SecritM as the pixel value of the first position of SecritM; Step 6.2: Take the pixels at the 1st, 2nd, and 3rd positions of ScramM, perform XOR operations with the 7th, 8th, and 9th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them at the 2nd position of SecritM as the pixel value at the 2nd position of SecritM; Step 6.3: Take the pixel at the third position of ScramM, XOR it with the pixel at the seventh position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the third position of SecritM as the pixel value at the third position of SecritM; Step 6.4: Take the pixels at the 1st, 4th, and 7th positions of ScramM, perform XOR operations with the 3rd, 6th, and 9th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them at the 4th position of SecritM as the pixel value at the 4th position of SecritM; Step 6.5: XOR all pixels in ScramM with pixels in Ckernel bit by bit, add the obtained values, round down to 256, and put them in the 5th position of SecritM as the pixel value of the 5th position of SecritM; Step 6.6: Take the pixels at the 3rd, 6th, and 9th positions of ScramM, perform XOR operations with the 1st, 4th, and 7th pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them into the 6th position of SecritM as the pixel value of the 6th position of SecritM; Step 6.7: Take the pixel at the 7th position of ScramM, XOR it with the pixel at the 3rd position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the 7th position of SecritM as the pixel value at the 7th position of SecritM; Step 6.8: Take the pixels at the 7th, 8th, and 9th positions of ScramM, perform XOR operations with the 1st, 2nd, and 3rd pixel values ​​of Ckernel respectively, add the obtained values, round down to 256, and put them into the 8th position of SecritM as the pixel value of the 8th position of SecritM; Step 6.9: Take the pixel at the 9th position of ScramM, XOR it with the pixel at the 1st position of Ckernel, and round it down modulo 256 to become an integer matrix between 0 and 255, and put it into the 9th position of SecritM as the pixel value at the 9th position of SecritM; Step 6.10: Repeat steps 6.1 to 6.9 until all pixels in the original image are encrypted, and obtain the diffused matrices CipherR, CipherG and CipherB.

2. The method for encrypting the image of the Yellow River dam bank danger based on chaos according to claim 1 is characterized in that: The step 2 comprises: The original image P is divided into three image matrices PicR, PicG and PicB of length lp according to the three color components R, G, and B.

3. The method for encrypting the image of the Yellow River dam bank danger based on chaos according to claim 1 is characterized in that: The step 3 comprises: The initial value of the Arnold transformation and the image matrices PicR, PicG and PicB are respectively subjected to Arnold transformation to obtain the image matrices ScramMR, ScramMG and ScramMB after Arnold transformation. The Arnold transformation is shown in formula (5): Among them, a, b, N are given positive integers; x n ,y n is the x position and y position of the pixel matrix; mod is the modulo function.

4. The method for encrypting the image of the Yellow River dam bank danger based on chaos according to claim 1 is characterized in that: The step 4 comprises: Step 4.1: Quantize the chaotic queue Lx to obtain an integer sequence Lx` with a length of M×N and between [1,6]. The quantization rule of Lx is shown in formula (6): Lx i `=(floor(Lx i ×10 12 )mod 6+1 (6) Step 4.2: Sort the chaotic sequence Cx from small to large to obtain the sorted chaotic sequence Cx` and index sequence IndexCx; Step 4.3: Perform regular coding on Lx` to obtain the coding sequence Lx`` corresponding to each value of Lx`; the regular coding of Lx` is as follows: 1: R, G, B; 2: R, B, G; 3: G, R, B; 4: G, B, R; 5: B, R, G; 6: B, G, R.

5. The method for encrypting the image of the Yellow River dam bank danger based on chaos according to claim 2 is characterized in that: The step 5 comprises: Step 5.1: Take i = 1, 2, ..., lp, and transform the three pixels in ScramMR, ScramMG, and ScramMB according to Lx` i The encoding rules are put into the input layer ScramM; Step 5.2: Take the three values ​​corresponding to Cy`, Cz`, and Cw` to form the chaotic layer Ckernel.

6. The method for encrypting the image of the Yellow River dam bank danger based on chaos according to claim 1 is characterized in that: The step 7 comprises: According to IndexCx, the pixel positions of CipherR, CipherG and CipherB are scrambled respectively to obtain three encrypted pixel matrices CipherR`, CipherG`, CipherB`.

7. The method for encrypting the image of the Yellow River dam bank danger based on chaos according to claim 6 is characterized in that: The step 8 comprises: Consider CipherR` as the R component matrix of the image, CipherG` as the G component matrix of the image, and CipherB` as the B component matrix of the image, and combine the three component matrices to obtain the encrypted final matrix C.

8. A chaos-based Yellow River dam bank danger image encryption method according to any one of claims 1 to 7, characterized in that: After step 8, the method further includes: Step 9: Use the chaotic index sequence IndexCx to inversely scramble the three R, G, and B components of the ciphertext image C to obtain the diffused pixel matrices CipherR`, CipherG`, and CipherB`; Step 10: Use the chaotic sequence Cy`, Cz`, Cw` to perform inverse diffusion on CipherR`, CipherG`, CipherB`, and aggregate the obtained pixel values ​​into ScramMR, ScramMG and ScramMB according to the encoding rule of the chaotic sequence Lx`; Step 11: Use Arnold scrambling to inversely scramble ScramMR, ScramMG, and ScramMB to obtain PicR, PicG, and PicB components of the original image; Step 12: Combine PicR, PicG, and PicB to obtain the original image of the Yellow River dam bank danger situation.