A video encryption method suitable for edge computing devices

Through the maximized block transformation and exclusive or diffusion technology of the one-dimensional chaotic mapping algorithm, the problem of insufficient sensitivity to keys in traditional video encryption technology is solved, and efficient and secure video encryption is achieved, suitable for edge computing devices.

CN118400472BActive Publication Date: 2025-01-03GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410650633.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2025-01-03
Estimated Expiration
2044-05-24

AI Technical Summary

Technical Problem

Traditional video encryption technology is not sensitive to keys, is easy to be cracked, has periodicity, and is low encryption efficiency, making it difficult to meet the needs of edge computing devices.

Method used

The one-dimensional chaos mapping algorithm is used to encrypt the video by maximizing block transformation and exclusive or diffusion, and a random key sequence that is difficult to crack and extremely weak periodicity is generated.

Benefits of technology

The encryption efficiency and security are improved. The generated key sequence is highly sensitive to keys, difficult to crack, and extremely weak periodicity, which is suitable for video encryption of edge computing devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400472B_ABST
    Figure CN118400472B_ABST
Patent Text Reader

Abstract

The present invention discloses a video encryption method suitable for edge computing devices, including: setting a key; using the key to obtain the initial parameters required for a one-dimensional chaotic map; decomposing the video to be encrypted into a plurality of images; encrypting the decomposed images separately in combination with a one-dimensional chaotic map; and synthesizing the encrypted images into a video to obtain an encrypted video. The process of encrypting each image includes: scrambling each channel of the image using a maximum block transformation to obtain a scrambled image; performing XOR diffusion on the scrambled image to obtain a diffused image. The present invention has the advantages of being sufficiently sensitive to the key, being difficult to crack, having extremely weak periodicity, being able to generate sufficient randomness, having high encryption efficiency, strong robustness, and having strong encryption security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information security, and in particular to a video encryption method suitable for edge computing devices. Background Art

[0002] In the current digital age, with the widespread application of edge computing devices, drone remote sensing systems, medical monitoring equipment and smart home systems have emerged. Drone remote sensing systems are often used in fields such as environmental monitoring, disaster assessment and agricultural monitoring to collect high-resolution surface videos; medical monitoring equipment plays a key role in remote diagnosis and treatment and surgical process recording; and smart home systems are used for security monitoring and daily management. The video data collected by these systems not only has a huge capacity, but also contains a large amount of sensitive information, and has extremely high confidentiality requirements for personal privacy and national security. However, traditional video encryption technology has problems such as insufficient sensitivity to keys, easy to be cracked, periodicity, insufficient randomness of generated sequences, and low encryption efficiency, which makes it difficult to meet the needs of edge computing. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a video encryption method suitable for edge computing devices.

[0004] To achieve the above purpose, the technical solution provided by the present invention is:

[0005] A video encryption method applicable to an edge computing device, comprising:

[0006] Set the key;

[0007] The key is used to obtain the initial parameters required for the one-dimensional chaotic mapping;

[0008] Decompose the video to be encrypted into several images;

[0009] Combine one-dimensional chaotic mapping to encrypt several images respectively;

[0010] The encrypted images are synthesized into a video to obtain an encrypted video.

[0011] Furthermore, the process of encrypting each image includes:

[0012] A1. Each channel of the image is scrambled using the maximum block transformation to obtain the scrambled image;

[0013] A2. Perform XOR diffusion on the scrambled image to obtain a diffused image.

[0014] Furthermore, each channel of the image is scrambled using a maximized block transformation, including:

[0015] B1. Get the input image img and obtain the height h and width w of the image img;

[0016] B2, set h1 and w1 equal to The height h and width w, p and q are initialized to 1;

[0017] B3. Set blkx0=p; blky0=q;

[0018] B4. Iterative segmentation and transformation:

[0019] If both conditions h1>0 and w1>0 are met, continue to execute steps B4-1 to B4-4, otherwise jump to step B5;

[0020] B4-1. Determine the position of the next image block to be processed based on the size relationship between h1 and w1. The specific update algorithm depends on the remaining part after the block is cut. The judgment formula is as follows:

[0021] ;

[0022] B4-2. Extract the largest image block ;

[0023] Extract the current image block from the image img , where the extracted image blocks The position in img is determined by blkz0 and blky0, and the following formula is used for extraction:

[0024] =img[blkx0: blky0+ blksize-1, blky0: blky0 + blksize- 1];

[0025] B4-3. Transformed image blocks :

[0026] Get image blocks The length H of the function is defined as n, and the number of iterations is defined as n. A, is the image after n iterations, is the image after iteration n-1 times, Represents the pixel at position (x, y) in the image after n iterations. For the image block Each pixel value in , can be obtained by the following formula:

[0027] ;

[0028] B4-4, the scrambled image block Put the (p, q) - th block of the image img;

[0029] B5. Obtain the scrambled image img.

[0030] Furthermore, perform XOR diffusion on the scrambled image, including:

[0031] C1. Convert the image img into a one - dimensional vector P. Assume the length of the image img is m, the width is n, and the height is 3. Then the width of its one - dimensional vector is 1, and the length L = m×n×3; Subsequently, use the chaotic system to generate a one - dimensional chaotic sequence key_stream with a width of 1 and a length of L, where 1 < i < N0 + L and i is an int - type variable, and N0 is a set value;

[0032] C2. Perform bit - by - bit XOR on the one - dimensional vector P and the one - dimensional chaotic sequence key_stream to obtain the diffused sequence encrypted_img;

[0033] C3. Re - convert the encrypted one - dimensional vector encrypted_img into an image C with a size of m×n×3.

[0034] Furthermore, the process of generating the one - dimensional chaotic sequence key_stream includes:

[0035] D1. Initialize variables: , i = 1; is the initial value obtained using the key, specifically the starting point of chaos generation;

[0036] D2. Iteratively loop the one - dimensional chaotic map N0 + L times to obtain An array sequence x of size 1*(N0 + L) composed of - x(N0 + L), and each specific step is divided into a and b:

[0037] a. Update the value of using the following one - dimensional chaotic map formula:

[0038] ;

[0039] where b is the control parameter;

[0040] b. i = i + 1;

[0041] D3.截取x(N0 + 1)-x(N0 + L)作为新的数组序列x,舍弃x(1)-x(N0); Intercept x(N0 + 1)-x(N0 + L) as the new array sequence x, and discard x(1)-x(N0);

[0042] D4. Perform the following processing on the new array sequence x, convert it to the interval [0,255] to obtain a one-dimensional chaotic sequence key_stream with a length of L, where mod represents the remainder operation and floor represents the rounding down operation:

[0043] key_stream(i)=mod(floor(x(i)×10^12),256), i=1:L.

[0044] Compared with the prior art, the principles and advantages of this technical solution are as follows:

[0045] Traditional one-dimensional mapping has the problems of being not sensitive enough to the key, being easy to crack, having periodicity, and the generated sequence is not random enough. The chaotic mapping algorithm proposed in this technical solution has the advantages of being sensitive enough to the key, being difficult to crack, having extremely weak periodicity, and being able to generate sufficiently random sequences.

[0046] The encryption process is divided into a scrambling part and a diffusion part. The scrambling part is a maximum block algorithm, and the diffusion part is XOR diffusion. The plaintext sensitivity of the traditional encryption algorithm is extremely weak, and the diffusion effect is weak. However, the encryption efficiency of this technical solution is high, the robustness is strong, and the encryption security is strong. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the services required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 This is a principle flow chart of a video encryption method applicable to edge computing devices of the present invention;

[0049] Figure 2 This is a schematic diagram of the Lyapunov test;

[0050] Figure 3 Schematic diagram of the four images before encryption;

[0051] Figure 4 Schematic diagram of the four images after encryption;

[0052] Figure 5 This is a schematic diagram of the encrypted histogram test;

[0053] Figure 6 This is the video image restored in the algorithm robustness test. DETAILED DESCRIPTION

[0054] The present invention will be further described below in conjunction with specific embodiments:

[0055] like Figure 1 As shown, a video encryption method applicable to an edge computing device described in this embodiment includes the following steps:

[0056] S1. Set the key;

[0057] S2, using the key to obtain the initial parameters required for the one-dimensional chaotic mapping, including the initial value x0 and the control parameter b, where x0 is the starting point of the chaotic generation;

[0058] S3, decomposing the video to be encrypted into several images;

[0059] S4, encrypting the decomposed images respectively by combining one-dimensional chaotic mapping;

[0060] In this step, the process of encrypting each image includes:

[0061] A1. Each channel of the image is scrambled using the maximum block transformation to obtain the scrambled image;

[0062] Each channel of the image is scrambled using a maximized block transformation, including:

[0063] B1. Get the input image img and obtain the height h and width w of the image img;

[0064] B2, set h1 and w1 equal to The height h and width w, p and q are initialized to 1;

[0065] B3. Set blkx0=p; blky0=q;

[0066] B4. Iterative segmentation and transformation:

[0067] If both conditions h1>0 and w1>0 are met, continue to execute steps B4-1 to B4-4, otherwise jump to step B5;

[0068] B4-1. Determine the position of the next image block to be processed based on the size relationship between h1 and w1. The specific update algorithm depends on the remaining part after the block is cut. The judgment formula is as follows:

[0069] ;

[0070] B4-2. Extract the largest image block ;

[0071] Extract the current image block from the image img , Its position in img is determined by blkz0 and blky0, and the extraction operation is performed using the following formula:

[0072] = img[blkx0: blky0 + blksize - 1, blky0: blky0 + blksize - 1];

[0073] B4-3. Transformed image block :

[0074] Obtain the image block Get the length H of the image block, define the number of iterations as n, A, is the image after n iterations, is the image after n - 1 iterations, represents the pixel at position (x, y) in the image after n iterations. For each pixel value in the image block A , it is obtained by the following formula:

[0075] ;

[0076] B4-4. Put the scrambled image block into the (p, q) - th block of the image img;

[0077] B5. Obtain the scrambled image img.

[0078] A2. Perform XOR diffusion on the scrambled image to obtain the diffused image.

[0079] Performing XOR diffusion on the scrambled image includes:

[0080] C1. Convert the image img into a one - dimensional vector P. Assume the length of the image img is m, the width is n, and the height is 3. Then the width of its one - dimensional vector is 1, and the length L = m×n×3; Subsequently, use the chaotic system to generate a one - dimensional chaotic sequence key_stream with a width of 1 and a length of L, where 1 < i < N0 + L and i is an int - type variable, and N0 is a set value;

[0081] C2. Perform bit - by - bit XOR on the one - dimensional vector P and the one - dimensional chaotic sequence key_stream to obtain the diffused sequence encrypted_img;

[0082] C3. Convert the encrypted one - dimensional vector encrypted_img back into an image C with a size of m×n×3.

[0083] Among the above, the process of generating the one - dimensional chaotic sequence key_stream includes:

[0084] D1. Initialize variables: , i=1; is the initial value obtained using the key, specifically the starting point of chaos generation;

[0085] D2, one-dimensional chaotic mapping iterates N0+L times, and obtains -x(N0+L) is an array sequence x of size 1*(N0+L). The specific steps of each step are divided into a and b:

[0086] a,. Update using the following one-dimensional chaotic mapping formula Values:

[0087] ;

[0088] in To control the parameters;

[0089] bi=i+1;

[0090] D3, intercept x(N0+1)-x(N0+L) as the new array sequence x, and discard x(1)-x(N0);

[0091] D4. Perform the following processing on the new array sequence x, convert it to the interval [0,255] to obtain a one-dimensional chaotic sequence key_stream with a length of L, where mod represents the remainder operation and floor represents the rounding down operation:

[0092] key_stream(i)=mod(floor(x(i)×10^12),256), i=1:L.

[0093] S5. Synthesize the encrypted images into a video to obtain an encrypted video.

[0094] To prove the effectiveness and superiority of the method of the present invention, the following tests were performed:

[0095] Lyapunov test

[0096] Figure 2 This is the Lyapunov index image of the chaotic mapping proposed by the present invention and other chaotic mappings, where the higher the value, the weaker the periodicity and the harder it is to crack. The figure shows that the control parameter b of the present invention presents extremely high Lyapunov values ​​when it is 1-10000.

[0097] NIST Testing

[0098] ,

[0099] Table 1

[0100] Table 1 is a NIST test table of the chaotic mapping proposed in the present invention, in which each index exceeds 0.01, which means that the chaos test is passed (proving that the chaotic mapping of the present invention can generate a sufficiently random sequence). The value of each test in Table 1 exceeds 0.01, proving that the chaotic mapping of the present invention can generate a sufficiently random sequence.

[0101] 3. Encryption Visual Test

[0102] Figure 3 The video images obtained by the edge computing box in four different scenarios (before encryption) are shown. Figure 4 The video images (after encryption) obtained by the edge computing box in the corresponding different scenarios are shown. It can be seen that the original image cannot be recognized from the picture by the naked eye, so the encryption algorithm of the present invention is very effective.

[0103] 4. Encrypted histogram test

[0104] Figure 5 (a) is the encrypted video image. Figure 5 (b) is the histogram of the encrypted video image. It can be seen that the histogram after diffusion is evenly distributed, indicating that the encryption algorithm of the present invention is very effective and difficult to be cracked by brute force.

[0105] 5. Correlation test

[0106] ,

[0107] Table 2

[0108] Table 2 is a correlation test table. It can be seen from Table 2 that the values ​​of the correlation tests of the encrypted video image in the horizontal, vertical and diagonal directions are very low, which means that the correlation between adjacent pixels after the image encryption is very low and the statistical regularity is not easy to be detected. This shows that the algorithm of the present invention is generally very secure.

[0109] Encryption speed test

[0110] Experimental results show that the encryption speed of the encryption algorithm proposed in the present invention is relatively fast. It takes an average of 0.0077 seconds to process a 512*512 image, and 129 frames of video can be encrypted in one second. Therefore, the encryption efficiency is very high and suitable for edge computing boxes.

[0111] Algorithm robustness testing

[0112] The system conducted decryption experiments under a noise attack environment. The results showed that the system can stably and accurately restore video information in an environment of lossy video transmission.

[0113] The encrypted video images were added with 0.1 density salt and pepper noise and 0.3 density salt and pepper noise respectively. Figure 6 (a) and Figure 6 (b) It can be seen that even if the encrypted video is attacked or distorted during transmission, this application can still restore the original video.

[0114] Key sensitivity testing

[0115] ,

[0116] Table 3

[0117] Table 3 is a key sensitivity test table. By changing parameters (each parameter b is changed by 10^-15, the initial value x0 is changed by 10^-15, N0 is changed by 1, and n is changed by 1), key sensitivity analysis is performed on the images encrypted after the parameters are changed and the images encrypted without changing the parameters. It can be seen from Table 3 that the NPCR and UACI values ​​returned by the test are both very high, which shows that the encryption algorithm of the present application is highly sensitive to the key and has sufficiently strong key sensitivity.

[0118] The embodiments described above are only preferred embodiments of the present invention and are not intended to limit the scope of implementation of the present invention. Therefore, all changes made according to the shape and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A video encryption method suitable for edge computing devices, characterized in that: Including: Set a key; Use the key to obtain the initial parameters required for one-dimensional chaotic mapping; Decompose the video to be encrypted into several images; Encrypt each of the decomposed images in combination with one-dimensional chaotic mapping; Recombine the encrypted images into a video to obtain an encrypted video; The process of encrypting each image includes: A1. Perform scrambling on each channel of the image using maximized block transformation to obtain a scrambled image; A2. Perform XOR diffusion on the scrambled image to obtain a diffused image; Performing scrambling on each channel of the image using maximized block transformation includes: B1. Obtain the input image img and get the height h and width w of the image img; B2. Set h1 and w1 to be equal to the height h and width w of img respectively, and initialize p and q to 1; B3. Set blkx0 = p; blky0 = q; B4. Iterative segmentation and transformation: Continuously execute steps B4-1 to B4-4 while both conditions h1>0 and w1>0 are satisfied, otherwise jump to step B5; B4-1. Determine the position of the next image block to be processed according to the size relationship between h1 and w1; the specific update algorithm depends on the remaining part after block cutting, and the judgment formula is as follows: B4-2. Extract the largest image block A; Extract the current image block A from the image img, where the position of the extracted image block A in img is determined by blkx0 and blky0, and the extraction operation is specifically performed using the following formula: A = img[blkx0:blkx0+blksize-1, blky0:blky0+blksize-1]; B4-3. Transform the image block A: Get the length H of image block A, define the number of iterations as n, A (0) =A, A (n) is the image after n iterations, A (n-1) is the image after iteration n-1 times, Represents the pixel at position (x, y) in the image after n iterations. For image block A (n) Each pixel value in Can be obtained by the following formula: B4-4, the scrambled image block A (n) Put the (p,q)th block of image img; B5. Obtain the scrambled image img.

2. A video encryption method suitable for edge computing devices according to claim 1, characterized in that: Performing XOR diffusion on the scrambled image includes: C1. Convert the image img into a one-dimensional vector P. Assume the length of the image img is m, the width is n, and the height is 3, then the width of its one-dimensional vector is 1 and the length L = m×n×3; subsequently, use the chaotic system to generate a one-dimensional chaotic sequence key_stream with a width of 1 and a length of L, where 1 < i < N0 + L and i is an int-type variable, and N0 is a set value; C2. Perform bitwise XOR on the one-dimensional vector P and the one-dimensional chaotic sequence key_stream to obtain the diffused sequence encrypted_img; C3. Re-convert the encrypted one-dimensional vector encrypted_img into an image C with a size of m×n×3.

3. A video encryption method suitable for edge computing devices according to claim 2, characterized in that: The process of generating the one-dimensional chaotic sequence key_stream includes: D1. Initialize variables: x(0) = x0, i = 1; x0 is the initial value obtained using the key, specifically the starting point of chaos generation; D2. Iteratively loop the one-dimensional chaotic mapping N0 + L times to obtain an array sequence x composed of x(1)-x(N0 + L) with a size of 1*(N0 + L). Each specific step is divided into a and b: a. Update the value of x(i) using the following one-dimensional chaotic mapping formula: where b is the control parameter; b. i = i + 1; D3, intercept x(N0+1)-x(N0+L) as the new array sequence x, and discard x(1)-x(N0); D4. Perform the following processing on the new array sequence x, convert it to the interval [0,255] to obtain a one-dimensional chaotic sequence key_stream with a length of L, where mod represents the remainder operation and floor represents the rounding down operation: key_stream(i)=mod(floor(x(i)×10^12),256), i=1:L.