Cloud Medical Image Encryption Method Based on Neural Network and Semi-Tensor Product
By using neural network and semi-tenster product technology in cloud medical image encryption method, many-to-one mapping of external keys and chaotic initial values is achieved, which solves the problems of insufficient key space and low security in the existing technology, and significantly improves the security and attack resistance of the encryption algorithm.
Patent Information
- Application Number
- CN202211397973.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-11-09
AI Technical Summary
In the existing cloud image encryption methods, external key space is insufficient and randomness is insufficient, resulting in low security and ineffective resistance to select plaintext attacks.
The cloud-based medical image encryption method based on neural network and semi-tensor product is adopted to realize many-to-one mapping of external keys and chaotic initial values by improving neural network models, and a safe and reliable key distribution method is designed.
It improves the size and randomness of the key space, enhances the security of the encryption algorithm and its ability to resist select plaintext attacks, and ensures the security of cloud medical images.
Smart Images

Figure CN115834021B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cloud image encryption, and particularly relates to a cloud medical image encryption method based on neural network and semi-tensor product. Background Art
[0002] In recent years, cloud computing has become an important means for most data-intensive applications to store data in intermediate data sets. This effective cloud storage process helps to minimize storage and processing costs when performing repetitive calculations. Although cloud computing provides a large number of services, resource maintenance costs, protecting outsourced user data from unauthorized users, privacy of sensitive data, and computational complexity are still major issues. Building image encryption and decryption algorithms in a cloud environment to ensure data security. However, since the keys of image encryption algorithms mainly come from the control parameters and initial values of chaotic systems, considering factors such as chaotic performance and the efficiency of generating keys, the number of initial values and parameters of the chaotic systems used is limited, which results in a small external input key space and there is a security risk of being brute-forced. So far, various excellent security encryption algorithms have been designed and implemented based on the cloud, but their research on encryption keys is not deep enough. The generation of keys and control parameters is one of the decisive factors for the security and complexity of encryption methods.
[0003] Telemedicine and various telemedicine applications are the best solutions to solve the current medical crisis through their innovative diagnostic methods and faster emergency management. Digital medical images play an important role in these applications, ensuring better and faster healthcare. These digital images usually contain privacy and diagnostic information about patients, and they must manage this information carefully because there may be criminals stealing or tampering with this information. In this case, encryption technology is needed to ensure the security of medical information. Encryption technology is the process of re-encoding information using a cipher, and only authorized people can receive and decrypt the information. The security of medical images has gradually attracted the attention of researchers. Summary of the Invention
[0004] Aiming at the problems of insufficient external key space and lack of randomness in the existing cloud image encryption methods, as well as the security defects of low security of medical image encryption algorithms and inability to effectively resist chosen-plaintext attacks, the technical problem solved by the present invention is to provide a cloud medical image encryption method based on neural network and semi-tensor product, improve the existing neural network model, realize the many-to-one mapping of external keys and chaotic initial values, and design a set of secure and reliable key distribution methods.
[0005] The cloud medical image encryption method based on neural network and semi-tensor product, the cloud medical image encryption and decryption method using neural network and semi-tensor product, sets the same user encryption key and decryption key. The user encryption key or decryption key both include the initial values, parameters, iteration times of the 5-D hyperchaotic system, and user control parameters. The encryption process of this method is realized by the following steps:
[0006] Step 1: Set the neural network training set as random numbers composed of 0-t, with each group having e digits and a total of N groups of data. The labels are set as the initial values x0(1), x0(2), x0(3), x0(4), x0(5) of the 5-D hyperchaotic system;
[0007] Step 2: Through the training of the neural network model, obtain the many-to-one mapping relationship between each group of random numbers y and the chaotic initial values;
[0008]
[0009] Among them, X represents the key pool, k ∈ [1, e], i ∈ [1, N], j ∈ [1, j], indicating that there are N groups of sub-keys, each group of sub-keys includes e keys, Y represents the key of the encryption system (i.e., the initial value of the chaotic system), u ∈ [1, ∞], indicating the number of initial values of the chaotic system.
[0010] Step 3: Design a cloud-based key distribution framework. Taking the medical system as an example, a large amount of medical data will be stored in the cloud to relieve the pressure on the medical system. The steps to obtain medical images are as follows:
[0011] (1) When a medical worker needs the corresponding medical image, they only need to send their ID and request to the password center (the relevant department of the medical system);
[0012] (2) After receiving the ID and request, the password center randomly distributes a group of keys in the corresponding key pool;
[0013] (3) The medical worker receives an 8-bit key composed of numbers, letters, and special characters;
[0014] (4) The staff inputs the key into the cloud encryption and decryption system to obtain the corresponding medical image.
[0015] The same sub-key becomes invalid automatically after being used once. Even if you want to view the same medical image next time, you need to request a new key from the password center again. When the keys in the key pool are all distributed, the key pool and the keys in the encryption system are automatically updated to ensure the security of the cloud encryption system.
[0016] Step 4: Take four medical images with the size of M×N as the original images Med1, Med2, Med3, and Med4;
[0017] Step 5: Using x1(0), x2(0), x3(0), x4(0), x5(0) in the user encryption key as the initial values of the 5-D hyperchaotic system, iterate the 5-D hyperchaotic system d0 times to obtain five chaotic sequences X1, X2, X3, X4, X5 with a length of M×N + d 00 where x1, x2, x3, x4, x5 are the state variables of the chaotic system, and a, b, c, d, e, f, g, h are the system parameters. The non-linear terms in this system are x1x2, x2x3, and
[0018]
[0019]
[0020] Step 6: Discard the first d 00 iteration results of the chaotic sequences, and obtain pseudo-random sequences X11, X22, X33, X44, X55 with a length of M×N through matrix transformation;
[0021]
[0022] Step 7: According to the composition principle of medical images, most important information is concentrated in the middle area of the image, while there are some useless pixel points (all 0 pixel points or all 255 pixel points) in the surrounding area of the image. Therefore, before image encryption, these pixel points are replaced with random numbers. The operation steps are as follows:
[0023] (1) First, determine the number of random numbers to be inserted, and then select 4 pixel points in the upper left corner of the image as the initial base block (Base Block, BB). The size of the initial base block can be set by the user;
[0024] (2) If the mean value of the pixel points in the Base Block is equal to the threshold set by the user (in this experiment, the threshold of the medical image is set to 0), the Base Block expands along the horizontal / vertical direction respectively, moving one group of pixels each time. At this time, the base block expands to 6 pixel points;
[0025] (3) If the mean value of the pixel points in the Base Block is not equal to the threshold set by the user, the Base Block moves along the horizontal / vertical direction respectively. When the number of pixel points in the base block is greater than or equal to 16 pixels, the random numbers generated by the system are used to replace the pixel points in the base block, and so on. When the scanning of the edge pixels of the image is completed, image P is obtained.
[0026] Step 8: Perform dynamic index scrambling on the image P after inserting random numbers in Step 7 to obtain P Med The scrambling rule is as follows:
[0027]
[0028] Step Nine: Block the pseudo-random sequences X11, X22, X33 to obtain the product matrix block M-st required for semi-tensor product i :
[0029]
[0030] Step Ten: Perform the Schur decomposition of the matrix on the plaintext medical image to obtain the unitary matrix U related to the plaintext Med ;
[0031] U Med = Schur(Med(1, 2, 3, 4))
[0032] Step Eleven: After normalizing the unitary matrix U Med , further diffuse the scrambled image P Med to obtain Dif P , the method is as follows:
[0033]
[0034] Step Twelve: Perform the semi-tensor product operation on Dif P to obtain the final diffused image SDif Pi .
[0035]
[0036] where & is a parameter set by the user.
[0037] In this embodiment, a decryption step is further included, specifically:
[0038] Step Thirteen: Use the initial parameters x 11 (0), x 22 (0), x 33 (0), x 44 (0), x 55 (0), a, b, c, d, e, f, g, h of the chaotic system as the user decryption key, and obtain the decryption pseudo-random sequences X11′, X22′, X33′, X44′, X55′ by the method of Step Six.
[0039] Step Fourteen: Block X11′, X22′, X33′ in Step Thirteen to obtain the product matrix block DM-st required for semi-tensor product i :
[0040]
[0041] Step 15: Use the user parameter & to perform a semi-tensor product calculation on the diffusion image SDif obtained in Step 12 Pi so that the final ciphertext image is DDif P :
[0042] DDif P = SDif P1 ∝ DM-st1(9)
[0043] Step 16: After normalizing the unitary matrix U Med perform inverse diffusion on DDif in Step 15 P to obtain the final decrypted image P Med The method is as follows:
[0044]
[0045] The cloud medical image encryption method based on neural network and semi-tensor product of the present invention has the following
[0046] beneficial effects:
[0047] The cloud medical image encryption method based on neural network and semi-tensor product proposed by the present invention improves the existing neural network model, realizes the one-to-many mapping of external keys and chaotic initial values, designs a set of secure and reliable key distribution methods, and this method is applicable to various environments. The present invention also proposes an intelligent edge pixel replacement scheme and a plaintext-related M-semi-tensor product operation to improve the security of the encryption algorithm and the ability to resist chosen-plaintext attacks. The 5-D hyperchaotic system has better pseudo-random characteristics, a larger key space, stronger sensitivity, and stronger ability to resist various security attacks. Therefore, it has more stable chaotic characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments will be briefly introduced below.
[0049] Figure 1 Flowchart of the encryption process in the cloud medical image encryption and decryption method of the convolutional neural network and semi-tensor product of the present invention;
[0050] Figure 2 Flowchart of the decryption process in the cloud medical image encryption and decryption method of the convolutional neural network and semi-tensor product of the present invention;
[0051] Figure 3 Schematic diagram of the neural network model using the cloud medical image encryption and decryption method of the convolutional neural network and semi-tensor product of the present invention;
[0052] Figure 4It is a diagram of the cloud key distribution model in the cloud medical image encryption and decryption method using the convolutional neural network and semi-tensor product of the present invention;
[0053] Figure 5 It is a schematic diagram of inserting random numbers at the edge of a medical image in the cloud medical image encryption and decryption method using the convolutional neural network and semi-tensor product of the present invention;
[0054] Figure 6 It is a schematic diagram of dynamic index scrambling in the cloud medical image encryption and decryption method using the convolutional neural network and semi-tensor product of the present invention;
[0055] Figure 7 It is the effect diagram of encryption and decryption using the cloud medical image encryption and decryption method with the convolutional neural network and semi-tensor product of the present invention: Among them Figure 7 (a)-(d) are the original images; Among them Figure 7 (e)-(h) are the encrypted images; Among them Figure 7 (i)-(l) are the decrypted images;
[0056] Figure 8 It is the histogram of the cloud medical image encryption and decryption method using the convolutional neural network and semi-tensor product of the present invention: Among them Figure 8 (a)-(c) are Figure 7 The histogram of the plaintext, ciphertext and decrypted image of (a); Among them Figure 8 (d)-(f) are Figure 7 The histogram of the plaintext, ciphertext and decrypted image of (b); Among them Figure 8 (g)-(i) are Figure 7 The histogram of the plaintext, ciphertext and decrypted image of (c); Among them Figure 8 (j)-(l) are Figure 7 The histogram of the plaintext, ciphertext and decrypted image of (d). Detailed implementation manners
[0057] The following will describe in detail the specific implementation manners of the present invention with reference to the accompanying drawings. As a part of this specification, the principles of the present invention are illustrated through examples, and other aspects, features and advantages of the present invention will become clear through this detailed description. In the accompanying drawings referred to, the same or similar components in different drawings are denoted by the same reference numerals.
[0058] As Figures 1 to 8 shown, for the cloud medical image encryption method based on neural network and semi-tensor product of the present invention, the same user encryption key and decryption key are set. The user encryption key or decryption key both include the initial value, parameters, iteration times of the 5-D hyperchaotic system, and user control parameters. The encryption process of this method is realized by the following steps:
[0059] Step 1: Set the neural network training set as random numbers composed of 0 - t, with each group having e digits and a total of N groups of data. The labels are set as the initial values x0(1), x0(2), x0(3), x0(4), x0(5) of the 5 - D hyper - chaotic system. In this embodiment, t = 80, e = 8, N = 10000, x0(1)=1, x0(2)=1, x0(3)=1, x0(4)=1, x0(5)=1;
[0060] Step 2: Through the training of the neural network model, obtain the many - to - one mapping relationship between each group of random numbers y and the chaotic initial values. The neural network model is as attached Figure 3 ;
[0061]
[0062] Among them, X represents the key pool, k ∈ [1, 8], i ∈ [1, 10000], j ∈ [1, 8], indicating that there are 10000 groups of sub - keys, and each group of sub - keys includes 8 keys. Y represents the key of the encryption system (i.e., the initial value of the chaotic system), u ∈ [1, ∞], indicating the number of initial values of the chaotic system.
[0063] Step 3: Design a cloud - based key distribution framework. The key distribution framework is as attached Figure 4 , taking the medical system as an example. A large amount of medical data will be stored in the cloud to relieve the pressure on the medical system. The steps to obtain medical images are as follows:
[0064] (1) When a medical worker needs a corresponding medical image, they only need to send their ID and a request to the password center (the relevant department of the medical system);
[0065] (2) After receiving the ID and the request, the password center randomly distributes a group of keys in the corresponding key pool;
[0066] (3) The medical worker receives an 8 - digit key composed of numbers, letters, and special characters;
[0067] (4) The staff inputs the key into the cloud encryption - decryption system to obtain the corresponding medical image.
[0068] The same sub - key becomes invalid automatically after being used once. Even if you want to view the same medical image next time, you need to request a new key from the password center again. When all the keys in the key pool have been distributed, the key pool and the keys in the encryption system are automatically updated to ensure the security of the cloud encryption system.
[0069] Step 4: Use four medical images with a size of 256×256 as the original images Med1, Med2, Med3, and Med4;
[0070] Step 5: Use x1(0) = 1, x2(0) = 1, x3(0) = 1, x4(0) = 1, x5(0) = 1 in the user encryption key as the initial values of the 5-D hyperchaotic system, and iterate the 5-D hyperchaotic system d0 times to obtain five chaotic sequences X1, X2, X3, X4, X5 with a length of M×N + d 00 In this embodiment, d0 = 70000 and d 00 = 4464.
[0071]
[0072] Among them, x1, x2, x3, x4, x5 are the state variables of the chaotic system, and a, b, c, d, e, f, g, h are system parameters. In this embodiment, a = 10, b = 60, c = 20, d = 15, e = 40, f = 1, g = 50, h = 10. The non-linear terms in this system are x1x2, x2x3, and
[0073] Step 6: Discard the first 4464 iteration results of the chaotic sequence, and obtain pseudo-random sequences X11, X22, X33, X44, X55 with a length of 256×256 through matrix transformation;
[0074]
[0075] Step 7: According to the composition principle of medical images, most important information is concentrated in the middle area of the image, while there are some useless pixel points (all 0 pixel points or all 255 pixel points) in the surrounding area of the image. The principle of random pixel insertion is as shown in the appendix Figure 5 , so these pixel points are randomly replaced before image encryption. The operation steps are as follows:
[0076] (1) First, determine the number of random numbers to be inserted, and then select 4 pixel points in the upper left corner of the image as the initial base block (Base Block, BB). The size of the initial base block can be set by the user;
[0077] (2) If the average value of the pixel points in the Base Block is equal to the threshold set by the user (in this experiment, the medical image threshold is set to 0), the Base Block expands along the horizontal / vertical direction respectively, moving one group of pixels each time. At this time, the base block expands to 6 pixel points;
[0078] (3) If the average value of the pixels in the Base Block is not equal to the threshold set by the user, the Base Block moves along the horizontal / vertical coordinate directions respectively. When the number of pixels in the base block is greater than or equal to 16 pixels, the random number generated by the system is used to replace the pixels in the base block, and so on. When the scanning of the edge pixels of the image is completed, the image P is obtained.
[0079] Step Eight: Dynamically index and scramble the image P after inserting random numbers in Step Seven to obtain P Med , and the scrambling method is as shown in the appendix Figure 6 , and the scrambling rules are as follows:
[0080]
[0081] Step Nine: Divide the pseudo-random sequences X11, X22, X33 into blocks to obtain the product matrix block M-st required for semi-tensor product i :
[0082]
[0083] Step Ten: Perform the Schur decomposition of the matrix on the plaintext medical image to obtain the unitary matrix U related to the plaintext Med ;
[0084] U Med = Schur(Med(1,2,3,4))
[0085] Step Eleven: After normalizing the unitary matrix U Med , further diffuse the scrambled image P Med to obtain Dif P , and the method is as follows:
[0086]
[0087] Step Twelve: Perform the semi-tensor product operation on Dif P to obtain the final diffused image SDif Pi .
[0088]
[0089] where & is the parameter set by the user. In this embodiment.
[0090] In this embodiment, a decryption step is also included, and the decryption flow chart is as shown in the appendix Figure 2 , specifically & = 968:
[0091] Step Thirteen: Set the initial parameters x of the chaotic system 11 (0), x 22 (0), x 33 (0), x44 (0), x 55 (0), a, b, c, d, e, f, g, h are used as the user's decryption key. In this embodiment, x 11 (0) = 1, x 22 (0) = 1, x 33 (0) = 1, x 44 (0) = 1, x 55 (0) = 1, a = 10, b = 60, c = 20, d = 15, e = 40, f = 1, g = 50, h = 10. Using the method in step six, obtain the decryption pseudo-random sequences X11′, X22′, X33′, X44′, X55′.
[0092] Step Fourteen: Divide X11′, X22′, X33′ in step thirteen into blocks to obtain the product matrix block DM-st required for semi-tensor product i :
[0093]
[0094] Step Fifteen: Use the user parameter & to perform semi-tensor product calculation on the diffused image SDif obtained in step twelve Pi In this implementation, & = 968. Therefore, the final ciphertext image is DDif P :
[0095] DDif P = SDif P1 ∝ DM-st1(9)
[0096] Step Sixteen: After normalizing the unitary matrix U Med perform inverse diffusion on DDif in step fifteen P to obtain the final decrypted image P Med The method is as follows:
[0097]
[0098] The above is the preferred embodiment of the present invention. Of course, the scope of the rights of the present invention cannot be limited by this. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and changes can still be made, and these improvements and changes are also regarded as the protection scope of the present invention.
Claims
1. A cloud medical image encryption method based on neural network and semi-tensor product, characterized in that It includes the following steps: S1. Set the neural network training set as random numbers composed of 0 - t, with e digits in each group and a total of N groups of data; S2. Through the training of the neural network model, obtain the many - to - one mapping relationship between each group of random numbers y and the chaotic initial value; S3. Design a cloud - based key distribution framework; S4. Take four medical images of size M×N as the original images Med1, Med2, Med3, and Med4; S5. Take x1(0), x2(0), x3(0), x4(0), x5(0) in the user encryption key as the initial values of the 5-D hyperchaotic system, iterate the 5-D hyperchaotic system d0 times, and obtain five chaotic sequences X1, X2, X3, X4, X5 with a length of M×N + d 00 ; S6. Discard the first d 00 iteration results of the chaotic sequence, and obtain a pseudo-random sequence X11, X22, X33, X44, X55 of length M×N through matrix transformation; S7. Perform random number replacement on pixel points before image encryption; S8. Perform dynamic index scrambling on the image P after inserting random numbers in step S7; S9. Divide the pseudo - random sequences X11, X22, X33 into blocks to obtain the product matrix blocks required for semi - tensor product; S10. Perform the QR decomposition of the matrix on the plaintext medical image to obtain the unitary matrix related to the plaintext; S11. After normalizing the unitary matrix U Med and performing scrambling on the image P Med further diffusion is carried out to obtain Dif P ; S12. Perform semi-tensor product operation on Dif P to obtain the final diffusion image SDif Pi ; S13. Take the initial parameters x 11 (0), x 22 (0), x 33 (0), x 44 (0), x 55 (0), a, b, c, d, e, f, g, h as the user's decryption key, and obtain the decryption pseudo-random sequences X11′, X22′, X33′, X44′, X55′ by the method of step S6; S14. Divide X11′, X22′, X33′ in step S13 into blocks to obtain the product matrix blocks required for semi - tensor product; S15. Use the user parameter & to perform a semi-tensor product calculation on the diffusion image SDif obtained in step S12 Pi ; S16. After normalizing the unitary matrix U Med perform inverse diffusion on DDif in step S15 P 2. The cloud medical image encryption method based on neural network and semi-tensor product according to claim 1, characterized in that, In step S4, the steps to obtain medical images are as follows: S31. When a medical worker needs the corresponding medical image, send their ID and request to the password center; S32. After receiving the ID and request, the password center randomly distributes a group of keys from the corresponding key pool; S33. The medical worker receives an 8 - digit key composed of numbers, letters, and special characters; S34. The staff inputs the key into the cloud encryption - decryption system to obtain the corresponding medical image.
3. The cloud medical image encryption method based on neural network and semi-tensor product according to claim 1, characterized in that, In step S7, the operation steps for performing random number replacement on pixel points before image encryption are: S71. First, determine the number of random numbers to be inserted, and then select 4 pixel points in the upper - left corner of the image as the initial base block (Base Block), and the size of the initial base block can be set by the user; S72. If the average value of the pixel points in the Base block is equal to the threshold set by the user, the Base Block expands along the horizontal / vertical direction respectively, moving one group of pixels each time, and at this time the base block expands to 6 pixel points; S73. If the average value of the pixel points in the Base Block is not equal to the threshold set by the user, the Base Block moves along the horizontal / vertical direction respectively. When the number of pixel points in the base block is greater than or equal to 16 pixels, replace the pixel points in the base block with the random numbers generated by the system, and so on. When the scanning of the edge pixels of the image is completed, obtain the image P.
Citation Information
Patent Citations
Image transmission system, encryption method and decryption method based on scrambling block compressed sensing
CN112711766A
Double-image encryption method based on convolutional neural network dynamic adaptive diffusion
CN112788196A