A batch image encryption method based on chaos-based thread pool and GPU combination optimization

By combining thread pool, GPU technology and chaotic encryption algorithms, fast encryption of large-scale digital images is achieved, and the problem of slow encryption speed in the existing technology is solved, and efficient and real-time image encryption and security guarantee are achieved.

CN115001654BActive Publication Date: 2024-11-15GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210643312.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2024-11-15
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

Existing digital image encryption technology is difficult to meet the real-time requirements when processing large batches of images, and traditional methods ignore image characteristics, resulting in slow encryption speed and unable to effectively cope with the fast transmission needs in the era of big data.

Method used

Using a batch image encryption method based on chaotic thread pool and GPU combination optimization, the thread pool asynchronous reading and preprocessing, computing block packaging, and parallel high-performance chaotic encryption of GPU, combined with performance optimization algorithms and visual interaction systems, realize large-scale images fast encryption.

Benefits of technology

While ensuring encryption quality, it significantly improves encryption efficiency. It can complete large-scale digital image encryption in a short time, resist various attack methods, and meet real-time encryption needs. The average encryption speed reaches 7.543 milliseconds per picture and 1.783 seconds per GB of data. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115001654B_ABST
    Figure CN115001654B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for optimizing batch image encryption based on a chaotic thread pool and a GPU combination. The method first performs asynchronous preprocessing on a large number of digital images input by a user; then extracts the batch images after the automated preprocessing and divides them into calculation blocks, and uses GPU high-performance calculation to obtain Vector <List >, using the chaotic sequence generated by the Lorenz chaotic system for encryption; using the existing performance optimization algorithm combined with the visual interactive system to form batch image encryption software, and performing histogram analysis, correlation analysis, and information entropy analysis on batch images. The experimental test results show that it can not only achieve batch image encryption, but also effectively resist common attack methods such as brute force attack, differential attack, statistical attack, and noise attack. For non-extreme color digital images, the average encryption speed reaches 7.543 milliseconds per image and 1.783 seconds per GB of data. After performance optimization, the batch digital image encryption has significantly improved the encryption efficiency while ensuring the encryption quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of big data processing and information security, and in particular to a method for optimizing batch image encryption based on a chaos-based thread pool and a GPU combination. Background Art

[0002] With the rapid development of science and technology, information digitization has become the main theme of people's daily life. Almost all the information we see and hear every day is obtained from various multimedia devices. As one of the most important information carriers in multimedia forms, digital images are the most important source of information for people. The problems regarding digital image information security are also increasing with the development of multimedia technology. In many fields such as business, medicine, and military, the information security of digital images is particularly important. Therefore, digital image encryption technology is also one of the key areas of information security research.

[0003] Digital image encryption technology is the study of how to effectively encrypt and hide digital images. The most important key is whether the digital image can be restored without loss. However, in most actual communication scenarios, the transmission of digital image data will inevitably be distorted. This is because the characteristics of digital images as information carriers are different from other information. Compared with general information carriers such as text, digital images have a larger amount of data and extremely high redundancy.

[0004] Digital images are intuitively two-dimensional information, but they can also be hashed and regarded as one-dimensional information. Traditional digital image encryption regards digital images as one-dimensional information and encrypts them through encryption algorithms, but this ignores the characteristics of the image itself. Since the digital image itself has a large amount of data and high redundancy, there are complex correlations between pixels, which makes it very time-consuming to encrypt it intuitively as one-dimensional data, and it cannot meet the real-time requirements. Therefore, a good image encryption algorithm must ensure encryption quality while ensuring encryption speed, and even in some special scenarios, it would rather sacrifice encryption quality to ensure encryption real-time performance.

[0005] Chaotic state is a complex stable state that is extremely sensitive to initial conditions and has no regularity in its state trajectory. Since chaotic systems are sensitive to initial parameter values, have strong randomness, and can be infinitely traversed, they are particularly suitable for image encryption technology. Therefore, image encryption technology based on chaotic systems has become an emerging technology in the field of digital image encryption. Image algorithms based on chaotic systems can meet people's needs for digital image information security, that is, they can meet the needs of fast encryption while ensuring encryption quality, and can even achieve real-time encryption of video streams.

[0006] At present, with the iteration and update of acquisition equipment, the development of big data and increasingly complex needs, a large amount of digital image information is transmitted on the communication network, and it is necessary to encrypt and transmit a large number of images at a guaranteed speed. Therefore, a low-cost batch image encryption system is needed to achieve a low-time cost and high-security encryption system. Summary of the invention

[0007] The present invention is a batch image encryption software that is optimized by combining a chaotic thread pool and a GPU and is implemented in the context of high performance requirements for image encryption. According to subsequent performance tests, the present invention can complete large-scale digital image encryption tasks in a relatively short period of time and can meet real-time encryption requirements.

[0008] The technical solution for achieving the purpose of the present invention is:

[0009] A method for optimizing batch image encryption based on a chaotic thread pool and GPU combination includes the following steps:

[0010] 1) Asynchronous reading and preprocessing based on thread pool: Asynchronous preprocessing is performed on large batches of digital images input by users. The preprocessing includes asynchronous IO based on thread pool and horizontal mirroring of the batch images. First, the batch images are automatically divided into c = n / t1, where c represents the number of images in each batch, n is the total number of batch images, and t1 is the number of idle threads in the thread pool. Then, a round-robin mechanism is used to asynchronously read one image at a time for each batch of images. After the reading task is completed, the image is immediately horizontally mirrored. The transformation process is shown in formula (1):

[0011]

[0012] In the formula, x and y are the pixel coordinates after transformation, and w is the width of the image;

[0013] 2) Automatic calculation block packaging based on thread pool: Extract step 1) After the batch of images M (m1, m2, m3...) that have been automatically preprocessed, they are divided into calculation blocks. For each image m, if it satisfies wh>T0, it needs to be divided into blocks, where T0 is the threshold set by the system; for the images that need to be divided into blocks, they are divided into four independent images, and the width and height of each image are w0=[w / 2], h0=[h / 2], and the block detection is continued until the pixel size threshold is less than T0; for each image m, the pixel matrix m (u0, u1, u2...) after division is obtained, and finally the calculation blocks are packaged. For each image m, Vector <List >Data structure, where List It is a linked list composed of image matrices, which is a minimum unit calculation package;

[0014] 3) High-performance chaotic encryption based on GPU parallelism: Use GPU high-performance computing to calculate the Vector obtained in step 2) <List > Encryption is performed using a chaotic sequence generated by a Lorenz chaotic system; the chaotic sequence is generated based on formula (2):

[0015]

[0016] Among them, x ′ ,y ′ ,z ′ are the three variables of the system, a, b, c are any positive numbers, representing the parameters of the Lorenz system; when a=10, b=8 / 3, c is used as a variable and when c>24.74, the Lorenz system enters a chaotic state; when c=28, the Lorenz system enters the theoretical optimal chaotic state; at this time, as long as an initial value is set for the three variables x, y, z of the system, and t is iterated with a specified step length, the Lorenz system can continuously generate the chaotic state about x ′ ,y ′ ,z ′ The chaotic sequence L is now generated. Then, several kernel functions fun_k(u,L) are constructed, where u represents the minimum calculation block in step 2) and L is the generated chaotic sequence. After the construction is completed, GPU programming technology is used to execute F(fun_k(u0,L0), fun_k(u1,L1), fun_k(u2,L2)...) for high-performance parallel batch chaotic encryption. The encryption formula is shown in formula (3):

[0017]

[0018] Where P ′ represents the value of the ciphertext pixel, and P represents the value of the plaintext pixel;

[0019] 4) Use the existing performance optimization algorithm combined with the visual interactive system to form batch image encryption software, and evaluate the batch images including histogram analysis, correlation analysis, and information entropy analysis.

[0020] After multiple experimental tests, the results show that it can not only achieve batch image encryption, but also effectively resist common attack methods such as brute force attack, differential attack, statistical attack, noise attack, etc. For non-extreme color digital images, the average encryption speed reaches 7.543 milliseconds per image and 1.783 seconds per GB of data. After performance optimization, the batch digital image encryption has significantly improved the encryption efficiency while ensuring the encryption quality.

[0021] This technical solution combines thread pool, GPU technology and chaotic encryption algorithm to perform asynchronous reading and mirror transformation preprocessing on large quantities of images, package the calculation data of batch images based on thread pool technology, and use GPU technology to perform large-scale parallel high-performance computing to perform chaotic encryption on the images. At the same time, it is combined with the software platform with a good visual interface, which can meet the needs of fast encryption of large quantities of images in the big data era. The encryption speed can meet the real-time requirements and its security is also guaranteed to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of the process flow of the embodiment method;

[0023] Figure 2 It is a schematic diagram of the performance test of the embodiment method; DETAILED DESCRIPTION

[0024] The content of the present invention is further described below in conjunction with the drawings and embodiments, but the present invention is not limited thereto.

[0025] Example:

[0026] Reference Figure 1 , a method for optimizing batch image encryption based on a chaotic thread pool and GPU combination, comprising the following steps:

[0027] 1) Asynchronous reading and preprocessing based on thread pool: Asynchronous preprocessing of large batches of digital images input by users. The preprocessing includes asynchronous IO based on thread pool and horizontal mirroring of images. First, the batch images are automatically divided into c = n / t1, where c represents the number of images in each batch, n is the total number of batch images, and t1 is the number of idle threads in the thread pool. Then, for each batch of images, a round-robin mechanism is used to asynchronously read one image at a time. After the reading task is completed, the image is immediately horizontally mirrored. The transformation process is shown in formula (1):

[0028]

[0029] Among them, x and y are the pixel coordinates after transformation, and w is the width of the image;

[0030] 2) Automatic calculation block packaging based on thread pool: Extract the batch images M (m1, m2, m3...) after automatic preprocessing in step 1 for calculation block division. For each image m, if it satisfies wh>T0, it needs to be divided into blocks, where T0 is the threshold set by the system. For images that need to be divided into blocks, they are split into four independent images. The width and height of each image are w0=[w / 2], h0=[h / 2]. Continue to perform block detection until the pixel size threshold is less than T0. For each image m, we get the split pixel matrix m (u0, u1, u2...), and finally pack the calculation blocks. For each image m, use Vector <List >Data structure, where List It is a linked list composed of image matrices, which is used as a minimum unit calculation package;

[0031] 3) High-performance chaotic encryption based on GPU parallelism: Use GPU high-performance computing to calculate the Vector obtained in step 2) <List >Encryption is performed using a chaotic sequence generated by a Lorenz chaotic system.

[0032] Chaotic sequence generation is based on formula (2)

[0033]

[0034] Where x ′ ,y ′ ,z ′ are the three variables of the system, a, b, c are any positive numbers, representing the parameters of the Lorenz system; in particular, when a=10, b=8 / 3, c is used as a variable and when c>24.74, the Lorenz system enters a chaotic state. When c=28, the Lorenz system enters the theoretical optimal chaotic state. At this time, as long as the system's x ′ ,y ′ ,z ′ Set an initial value for the three variables and iterate t with a specified step length to continuously generate the equation about x. ′ ,y ′ ,z ′ The chaotic sequence is now generated. Then, several kernel functions fun_k(u,L) are constructed, where u represents the minimum calculation block in step 2) and L is the generated chaotic sequence. After the construction is completed, GPU programming technology is used to execute F(fun_k(u0,L0), fun_k(u1,L1), fun_k(u2,L2)...) for high-performance parallel batch chaotic encryption. The encryption formula is shown in (3):

[0035]

[0036] Where P ′ represents the value of the ciphertext pixel, and P represents the value of the plaintext pixel;

[0037] 4) Combined with software platform: Use the existing performance optimization algorithm combined with the visual interactive system to form batch image encryption software. The software provides user login and registration functions, batch key management functions, batch image encryption and decryption functions, and batch image evaluation (including histogram analysis, correlation analysis, information entropy analysis functions). After many experimental tests, the batch image encryption implemented in this software can effectively resist common attack methods such as brute force attack, differential attack, statistical attack, noise attack, etc.

[0038] like Figure 2 As shown in the figure, for non-extreme color digital images, the average encryption speed reaches 7.543 milliseconds per image and 1.783 seconds per GB of data. After performance optimization, batch digital image encryption has significantly improved encryption efficiency while ensuring encryption quality.

Claims

1. A method for optimizing batch image encryption based on chaos thread pool and GPU combination. Its characteristics are: The steps include: 1) Asynchronous reading and preprocessing based on thread pool: Asynchronous preprocessing is performed on large batches of digital images input by users. The preprocessing includes asynchronous IO based on thread pool and horizontal mirroring of the batch images. First, the batch images are automatically divided into c = n / t1, where c represents the number of images in each batch, n is the total number of batch images, and t1 is the number of idle threads in the thread pool. Then, a round-robin mechanism is used to asynchronously read one image at a time for each batch of images. After the reading task is completed, the image is immediately horizontally mirrored. The transformation process is shown in formula (1): In the formula, x and y are the pixel coordinates after transformation, and w is the width of the image; 2) Automatic computational block packaging based on thread pool: Extract the batch images M after automatic preprocessing in step 1 and divide them into computational blocks. The batch images M are m1, m2, m3... For each image m, if it satisfies wh>T 0 Then we need to divide it into blocks, where T 0 is the block threshold set by the system; for images that need to be divided into blocks, they are split into four independent images, and the width and height of each image are w 0 =[w / 2],h 0 = [h / 2], continue block detection until the pixel size threshold is less than T 0 ; For each image m, get the split pixel matrix u0, u1, u2..., and finally pack the calculation blocks. For each image m, use Vector <List >Data structure, List It is a linked list composed of image matrices, which is a minimum unit calculation package; 3) High-performance chaotic encryption based on GPU parallelism: Use GPU high-performance computing to calculate the Vector obtained in step 2) <List > Encryption is performed using a chaotic sequence generated by a Lorenz chaotic system; the chaotic sequence is generated based on formula (2): Where x′, y′, z′ are three variables of the system, a, b, c are any positive numbers, representing the parameters of the Lorenz system; when a=10, b=8 / 3, c is used as a variable and when c>24.74, the Lorenz system enters a chaotic state; when c=28, the Lorenz system enters a theoretically optimal chaotic state; at this time, as long as an initial value is set for the three variables x′, y′, z′ of the system, t is iterated with a specified step length to continuously generate chaotic sequences about x′, y′, z′, and the chaotic sequence L is generated; then, several kernel functions fun_k(u,L) are constructed, where u represents the minimum calculation block in step 2) and L is the generated chaotic sequence; after the construction is completed, GPU programming technology is used to execute F(fun_k(u0,L0), fun_k(u1,L1), fun_k(u2,L2)...) for high-performance parallel batch chaotic encryption, and the encryption formula is shown in formula (3): Where P ′ represents the value of the ciphertext pixel, and P represents the value of the plaintext pixel. 4) Use the existing performance optimization algorithm combined with the visual interactive system to form batch image encryption software, and perform histogram analysis, correlation analysis, and information entropy analysis on batch images.

Citation Information

Patent Citations

  • Hyperchaos-based parallel encryption method for images in network office official document

    CN114465706A

  • Image encryption algorithm based on quantum walk and Lorenz chaotic system

    CN114513584A