Medical image encryption and hiding method and system based on fractional order memristive hopfield neural network

Through the chaotic sequence encryption and hiding method of fractional-order memristor Hopfield neural network, the complexity, security and efficiency problems of medical image encryption and hiding are solved, and efficient and secure encryption and hiding of medical images are achieved with strong robustness.

CN119904344BActive Publication Date: 2025-10-10ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411961636.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-10-10
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing medical image encryption and hiding algorithms cannot strike a balance between complexity, security, and efficiency. Traditional methods cannot meet the characteristics of high redundancy, large capacity, and high correlation between pixels of medical images. In addition, there is little research on the application of Hopfield neural networks in medical image encryption and hiding.

Method used

A fractional-order memristive Hopfield neural network is used to encrypt and hide medical images using the chaotic sequence it generates. By constructing an image encryption model and using the SHA-512 function to generate the key, an unrecognizable ciphertext image is generated by combining mirror scrambling and finite field bidirectional diffusion operations, and then randomly embedded into the carrier image.

Benefits of technology

It improves the complexity and security of the encryption system, realizes the visually indistinguishable embedding of the ciphertext image in the carrier image, has strong robustness, can still decrypt in the event of information loss or noise interference, and is suitable for practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904344B_ABST
    Figure CN119904344B_ABST
Patent Text Reader

Abstract

The application discloses a medical image encryption and hiding method and system based on a fractional order memristive Hopfield neural network, and the method comprises the following steps: collecting a medical image to be encrypted and hidden; constructing an image encryption model based on a Hopfield neural network; and completing the encryption and hiding of the medical image by using the constructed image encryption model. The application can effectively resist known plaintext attacks and selective plaintext attacks, and improve the security of data encryption of a chaotic system. Meanwhile, the increase of control parameters of the chaotic system also increases the number of keys in the encryption algorithm, greatly expanding the key space. The chaotic sequence of the fractional order memristive Hopfield neural network is used to randomly embed a ciphertext image into a carrier image in the application, so that the purpose of being visually indistinguishable from the carrier image is achieved, and a double protection effect is achieved. Even if there is a large degree of information loss or various noises, the ciphertext image can still be decrypted from the carrier image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image security, and in particular to a medical image encryption and hiding method and system based on a fractional-order memristor Hopfield neural network. Background Art

[0002] With the rapid development of network communication technology and digital medicine, information technology has been widely applied to telemedicine. As the most intuitive information carrier, digital images have become an important means of information dissemination and communication. In the Internet of Medical Things and mobile devices (such as smartphones and medical devices), medical images contain a large amount of private information. This information is easily stolen or lost during transmission and storage, resulting in serious privacy risks for medical images. Therefore, protecting the security of medical image information has received widespread attention.

[0003] Neural networks are composed of a rich variety of neurons and can exhibit complex and rich firing patterns and dynamic behaviors, similar to the brain. To better simulate and study biological neural networks, researchers have abstracted and simplified these networks and proposed a variety of artificial neural networks, such as the Hopfield neural network, the BAM neural network, and the Cellular neural network. Hopfield neural networks, among others, have been widely studied due to their similar network structure to real biological neural networks and their ability to produce complex and rich dynamic behaviors.

[0004] In 1971, Cai Shaotang first proposed the fourth electrical component, the memristor. Due to its unique characteristics and certain transmission and memory functions, memristors have important application prospects in chaotic circuits, secure communications, and neural networks. In neural networks, information is transmitted between neurons through synapses, so memristors can act as synapses or self-synapses, and can also serve as electromagnetic radiation signals to stimulate neurons. Furthermore, fractional-order calculus is a generalization of traditional integer-order calculus, introducing non-integer-order derivatives and integrals. It has extensive applications in fields such as control theory and biomedical engineering, providing a more flexible and precise modeling approach. Compared to integer-order systems, fractional-order nonlinear systems can more accurately describe behaviors with complex dynamics and memory characteristics, sharing the same memory characteristics as memristors. Therefore, to better describe the dynamic behavior of neural networks, fractional-order calculus was introduced into the memristor neural network model.

[0005] Currently, Hopfield neural networks have been widely studied in many application areas, such as information security, pattern recognition, and synchronous control. Because Hopfield neural networks possess complex dynamic characteristics that enhance their performance, many researchers have used them to study image information security. Image encryption and image hiding are two approaches to image security that are not contradictory but rather mutually reinforcing, providing dual protection for images. However, due to the high redundancy, large capacity, and high inter-pixel correlation of medical image data, traditional encryption methods cannot meet the requirements of medical image encryption. Therefore, chaotic systems that are highly sensitive to initial conditions can improve the security of encryption algorithms. Currently, there is little research on the application of Hopfield neural networks in medical image encryption, and even less on the combination of medical image encryption and hiding. Therefore, medical image encryption and hiding based on Hopfield neural networks is a highly worthy research topic. Summary of the Invention

[0006] In order to solve the problem that existing medical image encryption and hiding algorithms cannot achieve a balance in multiple performance aspects such as complexity, security and efficiency, the present invention provides a fractional-order memristor Hopfield neural network, which uses the chaotic sequence generated by the fractional-order memristor Hopfield neural network to realize medical image encryption, hiding and decryption.

[0007] To achieve the above objectives, the present invention provides a medical image encryption and hiding method based on a fractional-order memristor Hopfield neural network, comprising the following steps:

[0008] Collect medical images to be encrypted and hidden;

[0009] An image encryption model is constructed based on a Hopfield neural network. The construction method includes: using a memristor with a nonlinear function as a connecting synapse between the second and third neurons of the Hopfield neural network, and also as an external electromagnetic induction current of the second neuron of the Hopfield neural network; the mathematical model expression of the constructed image encryption model is as follows:

[0010]

[0011] Where x, y and z represent the state vectors of Hopfield neurons; and They represent the internal state of the memristor state function; a represents the neuron activation gradient; b1 and b2 represent the internal parameters of the memristor; k1 represents the coupling coefficient between the memristor and the neuron; k2 represents the feedback gain of the induced current; is a nonlinear periodic function; D represents integral derivative; q represents fractional product; k represents synaptic weight.

[0012] The constructed image encryption model is used to encrypt and hide medical images. The method includes: using the image encryption model as an encryption and hiding tool to generate a ciphertext image E with the same size as the original medical image Γ; hiding the ciphertext image E in the original carrier image Q to obtain a carrier image C containing the ciphertext image E, and the carrier image C is visually indistinguishable from the original carrier image Q.

[0013] Preferably, the method for encrypting the original medical image Γ includes: first inputting the medical image, then calculating the information entropy of the medical image to evaluate its randomness and complexity; then, using the SHA-512 function to generate a 512-bit hash value K, the hash value K is divided into 16 blocks, and used to obtain a key; then, inputting the key into the image encryption model, generating a chaotic sequence through iteration, and processing it into a pseudo-random sequence; using these pseudo-random sequences, performing mirror scrambling and finite field bidirectional diffusion operations on the medical image, and finally obtaining an unrecognizable ciphertext image E.

[0014] Preferably, the method for hiding the ciphertext image E in the original carrier image Q includes: first converting the ciphertext image E and the carrier image Q into a one-dimensional pixel matrix, then performing bit plane decomposition on the pixel values ​​of the ciphertext image E, extracting each bit in each pixel value, and forming a longer matrix; then, preprocessing the chaotic sequence generated by the image encryption model to obtain an index matrix, and embedding the pixel values ​​of the ciphertext image E into the least significant bits of the pixel values ​​of the original carrier image Q according to the index matrix; finally, obtaining a new carrier image C that is visually indistinguishable from the original carrier image Q but contains information of the ciphertext image E through bit reconstruction, thereby completing the image hiding.

[0015] The present invention also provides a medical image encryption and hiding system based on a fractional-order memristor Hopfield neural network, which is used to implement the above method and includes: an acquisition module, a construction module, and an encryption and hiding module;

[0016] The acquisition module is used to acquire medical images to be encrypted and hidden;

[0017] The building module is used to build an image encryption model based on the Hopfield neural network;

[0018] The encryption and hiding module is used to encrypt and hide medical images using the constructed image encryption model.

[0019] Preferably, the workflow of the construction module includes: using a memristor with a nonlinear function as a connecting synapse between the second neuron and the third neuron of the Hopfield neural network, and also as an external electromagnetic induction current of the second neuron of the Hopfield neural network; the mathematical model expression of the constructed image encryption model is as follows:

[0020]

[0021] Where x, y and z represent the state vector of the Hopfield neuron; and They represent the internal state of the memristor state function; a represents the neuron activation gradient; b1 and b2 represent the internal parameters of the memristor; k1 represents the coupling coefficient between the memristor and the neuron; k2 represents the feedback gain of the induced current; is a nonlinear periodic function; D represents integral derivative; q represents fractional product; k represents synaptic weight.

[0022] Preferably, the workflow of the encryption and hiding module includes: using the image encryption model as an encryption and hiding tool to generate a ciphertext image E with the same size as the original medical image Γ; hiding the ciphertext image E in the original carrier image Q to obtain a carrier image C containing the ciphertext image E, and the carrier image C is visually indistinguishable from the original carrier image Q.

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

[0024] This invention provides a medical image encryption method that utilizes a newly designed fractional-order memristor Hopfield neural network to improve the complexity and security of the encryption system. Because the initial parameters of the system generated using the SHA-512 function are very sensitive to the original image, this invention also provides a medical image hiding method that uses a chaotic sequence of a fractional-order memristor Hopfield neural network to randomly embed the ciphertext image into a carrier image, achieving a visually indistinguishable image from the carrier image, thus providing dual protection.

[0025] This method uses a chaotic sequence of a fractional-order memristor Hopfield neural network to randomly embed a ciphertext image into a carrier image, achieving a visually indistinguishable image from the carrier image, thus providing dual protection. Furthermore, even in the presence of significant information loss or various noises during communication, the generated image can still be decrypted from the carrier image, achieving high-definition image restoration. This method exhibits strong robustness and is suitable for practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. 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 any creative work.

[0027] Figure 1 Schematic diagram of a method flow in an embodiment of the present invention;

[0028] Figure 2 This is a structural diagram of the memristive Hopfield neural network used in the present invention;

[0029] Figure 3 This is a structural diagram of a medical image encryption and hiding system based on the medical Internet of Things provided in an embodiment of the present invention;

[0030] Figure 4 A flowchart of a method for encrypting and hiding an image provided in an embodiment of the present invention;

[0031] Figure 5 A diagram of the scrambling method used in an embodiment of the present invention;

[0032] Figure 6 A diagram of the diffusion method used in an embodiment of the present invention;

[0033] Figure 7 A bit plane decomposition diagram used in an embodiment of the present invention;

[0034] Figure 8 This is a diagram of the LSB algorithm used in the embodiment of the present invention;

[0035] Figure 9 The sample images and their encryption, hiding, and decryption results during the performance test of the embodiment of the present invention; wherein, (a) represents the original image of "Adenocarcinoma"; (b) represents the ciphertext image; (c) represents the carrier image of "Chest"; (d) represents the carrier image containing the ciphertext image; (e) represents the decrypted image; (f) represents the original image of "Large Cell Carcinoma"; (g) represents the ciphertext image; (h) represents the carrier image of "Man"; (i) represents the carrier image containing the ciphertext image; (j) represents the decrypted image; (k) represents the original image of "Squamous Cell Carcinoma"; (l) represents the ciphertext image; (m) represents the carrier image of "House"; (n) represents the carrier image containing the ciphertext image; (o) represents the decrypted image;

[0036] Figure 10The histograms of sample images and ciphertext images during the performance test of the embodiment of the present invention are shown in Figure 1. (a) represents three groups of original images; (b) represents three groups of histograms of original images; (c) represents three groups of ciphertext images; and (d) represents three groups of histograms of ciphertext images.

[0037] Figure 11 The histograms of the original image and the carrier image containing the ciphertext image during the performance test of the embodiment of the present invention are shown; wherein, (a) represents the original carrier image of "Chest"; (b) represents the histogram of the original carrier image; (c) represents the carrier image containing the ciphertext image; (d) represents the histogram of the carrier image containing the ciphertext image; (e) represents the original carrier image of "Man"; (f) represents the histogram of the original carrier image; (g) represents the carrier image containing the ciphertext image; (h) represents the histogram of the carrier image containing the ciphertext image; (i) represents the original carrier image of "House"; (j) represents the histogram of the original carrier image; (k) represents the carrier image containing the ciphertext image; (l) represents the histogram of the carrier image containing the ciphertext image;

[0038] Figure 12 The following is a distribution diagram of the correlation between adjacent pixels of sampled pixels in the plaintext image and the ciphertext image in the horizontal, vertical, and diagonal directions during the performance test of an embodiment of the present invention; wherein (a) represents the correlation between adjacent pixels of the original image "Adenocarcinoma"; (b) represents the correlation between adjacent pixels of the ciphertext image; (c) represents the correlation between adjacent pixels of the original image "Large Cell Carcinoma"; (d) represents the correlation between adjacent pixels of the ciphertext image; (e) represents the correlation between adjacent pixels of the original image "Squamous Cell Carcinoma"; and (f) represents the correlation between adjacent pixels of the ciphertext image.

[0039] Figure 13 The key generation process of the performance test of the embodiment of the present invention is 10 -16 Decrypted images after changes; (a) represents the image decrypted by the correct key key0; (b) represents the image decrypted by key key1; (c) represents the image decrypted by key key1; (d) represents the image decrypted by key key2; (e) represents the image decrypted by key key3; (f) represents the image decrypted by key key4;

[0040] Figure 14These are the decryption results of the carrier image containing the ciphertext image cropped to 1 / 16, 1 / 8, and 1 / 4 during the performance test of the embodiment of the present invention; (a) represents the carrier image containing the ciphertext image cropped to 1 / 16; (b) represents the carrier image containing the ciphertext image cropped to 1 / 8; (c) represents the carrier image containing the ciphertext image cropped to 1 / 4; (d) represents the decryption result of the 1 / 16 cropping attack; (e) represents the decryption result of the 1 / 8 cropping attack; and (f) represents the decryption result of the 1 / 4 cropping attack.

[0041] Figure 15 These are the decryption results of the carrier image containing the ciphertext image after adding 0.001%, 0.01% and 0.1% salt and pepper noise during the performance test of the embodiment of the present invention; wherein, (a) represents the carrier image containing the ciphertext image after adding 0.001% salt and pepper noise; (b) represents the carrier image containing the ciphertext image after adding 0.01% salt and pepper noise; (c) represents the carrier image containing the ciphertext image after adding 0.1% salt and pepper noise; (d) represents the decryption result after adding 0.001% salt and pepper noise; (e) represents the decryption result after adding 0.01% salt and pepper noise; (f) represents the decryption result after adding 0.1% salt and pepper noise;. DETAILED DESCRIPTION

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] Example 1

[0045] like Figure 1 FIG. 1 is a flow chart of a medical image encryption and hiding method based on a fractional-order memristor Hopfield neural network provided in this embodiment, and the steps include:

[0046] S1. First, collect the medical image to be encrypted and hidden.

[0047] S2. Build an image encryption model based on the Hopfield neural network.

[0048] A nonlinear function of a memristor is used as a connection synapse between the second neuron and the third neuron of a Hopfield neural network, and also as an external electromagnetic induction current of the second neuron of the Hopfield neural network; therefore, a fractional-order memristor Hopfield neural network model (an image encryption model) is constructed, and the mathematical model is as follows:

[0049]

[0050] In the formula, x, y and z all represent state vectors of the Hopfield neurons; And Respectively represent internal states of a state function of the memristor; a represents a neuron activation gradient; b1 and b2 both represent internal parameters of the memristor; k1 represents a coupling coefficient between the memristor and the neuron; k2 represents feedback gain of the induction current; Is a nonlinear periodic function; D represents integral derivation; q represents a fractional integral; and k represents a synapse weight.

[0051] Figure 2 The structure diagram of the memristor Hopfield neural network used in the application is shown in the figure. Since the complexity and randomness of the sequence generated by the chaotic system are higher, the difficulty of restoring the original sequence is higher, therefore, the SE spectrum entropy and the C0 complexity of the chaotic system of the embodiment are measured, and it is verified that the chaotic system of the embodiment has high complexity.

[0052] S3. The image encryption and hiding of the medical image are completed by using the constructed image encryption model.

[0053] The image encryption model constructed above is used as an encryption and hiding tool to generate a ciphertext image E with the same size as the original medical image Γ; the ciphertext image E is hidden in the original carrier image Q to obtain a carrier image C containing the ciphertext image E, and the carrier image C is visually indistinguishable from the original carrier image Q. Figure 3 The structure diagram of the medical image encryption and hiding based on the medical Internet of Things provided in the embodiment is shown in the figure.

[0054] The image encryption and hiding is completed in two steps, and the method for performing image encryption includes the following steps: firstly, a medical image is input; then, the information entropy of the medical image is calculated to evaluate the randomness and complexity thereof; subsequently, a 512-bit hash value K is generated by using a SHA-512 function, the hash value K is divided into 16 blocks, and the 16 blocks are used to initialize parameters of a chaotic system (a fractional-order memristor Hopfield neural network model) to obtain a key; then, the key is input into the chaotic system, and chaotic sequences are generated by iteration and processed into pseudo-random sequences; the pseudo-random sequences are used to perform mirror scrambling and finite field bidirectional diffusion operations on the medical image, and finally, a ciphertext image E that cannot be identified is obtained.

[0055] The specific steps of the above image encryption are as shown in the following Figure 4 :

[0056] S301: input a plaintext image (original medical image) Γ of size MxN, calculate the information entropy entropy(Γ) of the plaintext image Γ to evaluate its randomness and complexity. Wherein, M and N are the number of rows and columns of the plaintext image Γ respectively, and entropy() is a function for calculating the picture information entropy.

[0057] S302: generate a 512-bit hash value K using SHA-512 function, which is divided into 16 blocks in turn, used to initialize the parameters of the chaotic system (fractional order memristive Hopfield neural network model), and get the key. The initial value and parameters x0, y0, z0, of the chaotic system are generated by the following formula:

[0058] K = K1, K2,..., K 16

[0059]

[0060] Wherein, SHA-512 is very sensitive to the original image, which can effectively resist known and selective plaintext attacks, and each block K i (i = 1, 2,..., 32) consists of 16 bits, corresponding to the numbers between 0 and 255 in decimal, and represents the exclusive or operation, and bi2de(x) represents the conversion of binary number x to decimal.

[0061] S303: input the key into the chaotic system, iterate MxN+1000 times to get chaotic sequences X1, X2, X3, X4, X5, and discard the first 1000 values of chaotic sequences X1, X2, X3, X4, X5 to get pseudo-random sequences S1, S2, S3, S4, S5 with length MxN. Wherein, mod() is the remainder function, floor() is the integer function, and pow2() is the power operation and scaling of floating point number with base 2.

[0062]

[0063] S304: apply the processed pseudo-random sequence to the permutation and diffusion process, wherein the permutation process is mirror permutation, and the specific process is as follows:

[0064] S304-1: calculate according to the following formula to get the position index matrix A for permutation:

[0065] A = mod(floor((S1(1:M*N)+100)*10 10 ), M*N) + 1.

[0066] S304-2: Convert the input image Γ into a one-dimensional pixel matrix X, sort it in ascending order according to the index matrix A, and scramble X without repetition to obtain a one-dimensional matrix Y.

[0067] S304-3: Convert the one-dimensional matrix Y into a two-dimensional matrix Z to obtain the final scrambled image Γ1. The reshape function is a reconstruction function:

[0068] Z = reshape(Y,M,N),

[0069] Figure 5 This is a diagram of the scrambling method used in the present invention.

[0070] S305: Perform finite field bidirectional diffusion on the scrambled image Γ1 to obtain the ciphertext image E. Figure 6 This is a diagram of the diffusion method used in the present invention. The diffusion operation process is as follows:

[0071] S305-1: Create a 256×256 matrix T, take values ​​between (0 and 255), and define matrices B and π. Where a is a 256×1 column vector and b is a 1×256 row vector. Both vectors have values ​​between (0 and 255).

[0072] T=mod(ab,256),

[0073] B=zeros(1,M*N), ∏=zeros(1,M*N).

[0074] Among them, zeros means starting from 0.

[0075] S305-2: Perform positive diffusion on the image Γ1 using the pseudo-random sequence S2, with i cyclically increasing from 2 to M×N. The matrix B(i) is obtained as follows:

[0076] B(i)=T(T(B(i-1)+2,S2(i)+2))+1,Z(i)+2)-1.

[0077] S305-3: According to the pseudo-random sequence S3, the matrix B performs reverse diffusion, and i cycles from M×N-1 to 1, obtaining the matrix π:

[0078] ∏(i)=T(T(∏(i+1)+2, S3(i)+2))+1, B(i)+2)-1.

[0079] S306: Perform non-repeating permutations on the pixel matrix π according to the pseudo-random sequence S4 to obtain the final ciphertext image E.

[0080] After the image encryption is completed, the ciphertext image E is hidden in the carrier image Q to obtain the carrier image C containing the ciphertext image E:

[0081] C=reshape(C,M,N).

[0082] The hiding process includes: first, converting the ciphertext image E and the carrier image Q into a one-dimensional pixel matrix, then performing bit-plane decomposition on the pixel values ​​of the ciphertext image E, extracting each bit in each pixel value, and forming a longer matrix; then, using the chaotic sequence generated by the fractional-order memristor Hopfield neural network model (image encryption model) to preprocess the index matrix, and embedding the pixel values ​​of the ciphertext image E into the least significant bits of the pixel values ​​of the original carrier image Q according to the index matrix; finally, through bit reconstruction, a new carrier image C is obtained that is visually indistinguishable from the original carrier image Q but contains the information of the ciphertext image E, thus completing the image hiding. The specific steps are as follows:

[0083] S3301: Input the ciphertext image E and the carrier image Q, calculate the size of the ciphertext image E (M1×N1) and the size of the carrier image Q (M×N), and convert the pixel values ​​of the ciphertext image E and the carrier image Q into one-dimensional matrices H and P respectively:

[0084] [M,N]=size(Q),

[0085] [M1, N1] = size(E).

[0086] S3302: Perform bit-plane decomposition on the matrix H, looping i from 1 to M1×N1, extracting each bit in each pixel value to form a matrix A of length M1×N1×8:

[0087]

[0088] Wherein, bitget(Q,k) represents a bit function for obtaining a specified position of the original carrier image Q.

[0089] Figure 7 This is the bit plane decomposition diagram used in this embodiment. If the carrier image is color, the bit plane is decomposed into 24 planes.

[0090] S3303: Preprocess the chaotic sequence S5 to obtain the index matrix S. i circulates from 1 to M1×N1, indexes and decomposes the pixel values ​​of the matrix P, embeds the pixel values ​​of the ciphertext image E into the least significant bit (LSB) of the original carrier image Q, and then obtains the carrier image C containing the ciphertext image E through bit reconstruction:

[0091]

[0092] Figure 8This is a diagram of the LSB algorithm used in this embodiment.

[0093] Example 2

[0094] To restore the ciphertext image to the plaintext image, first extract the ciphertext image from the carrier image, then decrypt the ciphertext image, and finally get the plaintext image. The extraction process is as follows:

[0095] S1: According to the chaotic sequence S5, i cycles from 1 to M1×N1, performs bit plane decomposition on the carrier image C containing the ciphertext image, extracts the least significant bit and assigns it to the one-dimensional matrix F:

[0096]

[0097] S2: Reshape the one-dimensional matrix F into a two-dimensional matrix G, loop i from 1 to M1×N1, convert the binary to decimal and assign it to the one-dimensional matrix I, and then reconstruct it to obtain the ciphertext image E of the lowest bit plane:

[0098]

[0099] In the decryption process, inverse diffusion is performed first, and then inverse scrambling is performed to obtain the decrypted image. The decryption process is as follows:

[0100] S1: The steps of generating the pseudo-random sequence are the same as S2 and S3 in the encryption method and will not be described in detail.

[0101] S2: Perform finite field bidirectional inverse diffusion on the encrypted image E to obtain the matrix Ψ. The rules are as follows:

[0102] S2-1: Backward inverse diffusion, i cycles from M×N-1 to 1, and the matrix Ψ is obtained:

[0103] Ψ(i)=T(T(E(i+1)+2, S3(i)+2))+1, E(i)+2)-1.

[0104] S2-2: Forward reverse diffusion, i loops from 2 to M×N, and the matrix F is obtained:

[0105] F(i)=T(T(Ψ(i-1)+2, S2(i)+2))+1, Ψ(i)+2)-1.

[0106] S3: After the diffusion operation is completed, perform mirror inverse scrambling to convert the two-dimensional matrix F into a one-dimensional matrix E for inverse scrambling, and then reconstruct it into a two-dimensional matrix G to obtain the decrypted image:

[0107] G = reshape(E,M,N).

[0108] Example 3

[0109] In order to verify the performance of the image encryption, hiding and decryption method provided by the present invention, the following corresponding performance test experiments are designed, and the performance advantages of the image encryption, hiding and decryption method provided by the present invention are analyzed based on the experimental results.

[0110] 1. Simulation results analysis

[0111] Take the grayscale images “Adenocarcinoma”, “Large Cell Carcinoma”, and “Squamous CellCarcinoma” as sample images, and the grayscale images “Chest”, “Man”, and “House” as carrier images. The encrypted, hidden, and decrypted images are as follows: Figure 9 As shown in the figure, it can be seen that the encrypted image cannot extract the relevant information of the plaintext image. There is no visual change between the original carrier image and the carrier image containing the ciphertext image, and the plaintext image can be decrypted, which verifies the effectiveness and integrity of the method.

[0112] 2. Histogram analysis

[0113] Histogram is an intuitive indicator for evaluating image pixel information. For meaningful images, the distribution of histogram is usually uneven. A good encryption algorithm must be able to make the histogram distribution of the ciphertext image uniform, and a good hiding algorithm must be able to make the carrier image containing the ciphertext image slightly different from the original image, but not significantly different. The medical images "Adenocarcinoma", "Large Cell Carcinoma", and "Squamous Cell Carcinoma" are used as sample images, and the grayscale images "Chest", "Man", and "House" are used as carrier images for testing of the present invention. Figure 10 and Figure 11 As shown in Figure 2, it is clear that the histogram of the ciphertext image is evenly distributed, while the histogram of the carrier image containing the secret is very similar to that of the original carrier image.

[0114] 3. Correlation analysis between adjacent pixels

[0115] Correlation analysis between adjacent pixels is how adjacent pixels are related to each other in the horizontal, vertical, and diagonal directions. The correlation value of the original image is very close to 1, indicating that the pixels are highly correlated. The encrypted image has a very low correlation value, close to zero, indicating that the pixels of the encrypted image are unrelated to each other, so it is almost impossible to detect information from this image. The correlation distribution diagram of adjacent pixels in the horizontal, vertical, and diagonal directions of the original image and the ciphertext image is shown in the figure below. Figure 12As shown in the figure, the original image has strong correlation between adjacent pixels in horizontal, vertical and diagonal directions, which can be fitted into a straight line, and the linear distribution is close to the diagonal line in the image. The correlation between adjacent pixels in the ciphertext image is close to 0. Therefore, the image encryption method provided in the embodiment can effectively mask the features between adjacent pixels in the image, and can resist differential attacks.

[0116] 4. Sensitivity analysis of the key

[0117] If the key is slightly modified, the decryption algorithm will not be able to restore the normal image. Therefore, the key sensitivity of the algorithm is tested by slightly modifying the value of the initial key. The initial key key0: x0, y0, z0, u0, The values of x0, y0, z0and u0are increased by 10 -16 respectively, to obtain four new keys key1, key2, key3and key4. First, the grayscale image is encrypted using the original key key0to obtain the encrypted image. Then, the image encrypted by the key key0is decrypted using key1, key2, key3and key4, as shown in Figure 13 As shown in the figure, if the key is slightly modified, the algorithm will not be able to restore the original image. Therefore, the algorithm is very sensitive to the key.

[0118] 5. Robustness analysis

[0119] During the transmission of the ciphertext image, there are different degrees of noise interference or information loss, and even intentional attacks by attackers. Therefore, the provided scheme must have strong robustness, that is, it can still be decrypted successfully in the case of partial loss or change of the ciphertext image information. For this purpose, the scheme in embodiment 4 is used to decrypt the ciphertext image, and the following clipping attack and salt and pepper noise test are designed.

[0120] (1) Clipping attack

[0121] In the carrier image containing the ciphertext image, 1 / 16, 1 / 8 and 1 / 4 degrees of information are clipped, and then the image is extracted and decrypted to obtain three carrier images containing the ciphertext image with different clipping degrees and the corresponding decrypted images, as shown in Figure 14 Therefore, the algorithm can diffuse the impact of the clipped part to the entire image, thereby minimizing the impact of clipping on the local area, and obtaining the original image information. Therefore, the algorithm can effectively resist clipping attacks and has strong robustness.

[0122] (2) Salt and pepper noise attack

[0123] Add 0.001%, 0.01% and 0.1% salt and pepper noise to the carrier image containing the ciphertext image, and then extract and decrypt the image. Finally, the three carrier images containing the ciphertext image with different proportions of noise added and their corresponding decrypted images are shown as follows: Figure 15 As shown in the figure, the less noise an image contains, the clearer the decrypted image is. Therefore, this scheme has strong resistance to noise attacks and is more robust.

[0124] Example 4

[0125] This embodiment also provides a medical image encryption and hiding system based on a fractional-order memristor Hopfield neural network, including: an acquisition module, a construction module and an encryption and hiding module; the acquisition module is used to acquire medical images to be encrypted and hidden; the construction module is used to construct an image encryption model based on the Hopfield neural network; the encryption and hiding module is used to use the constructed image encryption model to complete the encryption and hiding of medical images.

[0126] The workflow of the construction module includes: using a memristor with a nonlinear function as the connecting synapse between the second and third neurons of the Hopfield neural network, and also as the external electromagnetic induction current of the second neuron of the Hopfield neural network; the mathematical model expression of the constructed image encryption model is as follows:

[0127]

[0128] Where x, y and z represent the state vectors of Hopfield neurons; and They represent the internal state of the memristor state function; a represents the neuron activation gradient; b1 and b2 represent the internal parameters of the memristor; k1 represents the coupling coefficient between the memristor and the neuron; k2 represents the feedback gain of the induced current; is a nonlinear periodic function; D represents integral derivative; q represents fractional product; k represents synaptic weight.

[0129] The constructed image encryption model is used to encrypt and hide medical images. The process includes: using the image encryption model as an encryption and hiding tool to generate a ciphertext image E with the same size as the original medical image Γ; hiding the ciphertext image E in the original carrier image Q to obtain a carrier image C containing the ciphertext image E. The carrier image C is visually indistinguishable from the original carrier image Q.

[0130] The workflow of the encryption and hiding module includes encryption and hiding of medical images.

[0131] The process of encrypting the original medical image Γ includes: firstly inputting the medical image, then calculating the information entropy of the medical image to evaluate its randomness and complexity; then, a 512-bit hash value K is generated by using the SHA-512 function, the hash value K is divided into 16 blocks to obtain the key; then, the key is input into the image encryption model, a chaotic sequence is generated by iteration, and is processed into a pseudo-random sequence; the medical image is processed by using the pseudo-random sequence to perform mirror scrambling and finite field bidirectional diffusion operation, and finally an unrecognizable ciphertext image E is obtained.

[0132] The process of hiding the ciphertext image E in the original carrier image Q includes: firstly converting the ciphertext image E and the carrier image Q into one-dimensional pixel matrixes, then performing bit plane decomposition on the pixel values of the ciphertext image E, extracting each bit in each pixel value to form a longer matrix; then, an index matrix is obtained by preprocessing the chaotic sequence generated by the image encryption model, and the pixel values of the ciphertext image E are embedded into the least significant bits of the pixel values of the original carrier image Q according to the index matrix; finally, a new carrier image C which is visually indistinguishable from the original carrier image Q but contains the information of the ciphertext image E is obtained by bit reconstruction, and the image hiding is completed.

[0133] The above-described embodiments are only descriptions of the preferred modes of the present application, and do not limit the scope of the present application, and various modifications and improvements to the technical solutions of the present application made by those skilled in the art without departing from the design spirit of the present application shall fall within the protection scope determined by the claims of the present application.

Claims

1. A medical image encryption and hiding method based on fractional-order memristor Hopfield neural network, characterized in that the steps include: Collect medical images to be encrypted and hidden; An image encryption model is constructed based on a Hopfield neural network. The construction method includes: using a memristor with a nonlinear function as a connecting synapse between the second and third neurons of the Hopfield neural network, and also as an external electromagnetic induction current of the second neuron of the Hopfield neural network; the mathematical model expression of the constructed image encryption model is as follows: Where x, y and z represent the state vectors of Hopfield neurons; and They represent the internal state of the memristor state function; a represents the neuron activation gradient; b1 and b2 represent the internal parameters of the memristor; k1 represents the coupling coefficient between the memristor and the neuron; k2 represents the feedback gain of the induced current; is a nonlinear periodic function; D represents integral derivative; q represents fractional product; k represents synaptic weight; The constructed image encryption model is used to encrypt and hide medical images. The method includes: using the image encryption model as an encryption and hiding tool to generate a ciphertext image E with the same size as the original medical image Γ; hiding the ciphertext image E in the original carrier image Q to obtain a carrier image C containing the ciphertext image E, and the carrier image C is visually indistinguishable from the original carrier image Q.

2. The medical image encryption and hiding method based on fractional-order memristor Hopfield neural network according to claim 1 is characterized in that: The method for encrypting the original medical image Γ includes: first inputting the medical image, then calculating the information entropy of the medical image to evaluate its randomness and complexity; then, using the SHA-512 function to generate a 512-bit hash value K, the hash value K is divided into 16 blocks to obtain the key; then, the key is input into the image encryption model, and a chaotic sequence is generated through iteration and processed into a pseudo-random sequence; using these pseudo-random sequences, the medical image is subjected to mirror scrambling and finite field bidirectional diffusion operations, and finally an unrecognizable ciphertext image E is obtained.

3. The medical image encryption and hiding method based on fractional-order memristor Hopfield neural network according to claim 2 is characterized in that: The method for hiding a ciphertext image E in an original carrier image Q includes: first, converting the ciphertext image E and the carrier image Q into a one-dimensional pixel matrix, then performing bit plane decomposition on the pixel values ​​of the ciphertext image E, extracting each bit in each pixel value, and forming a longer matrix; then, preprocessing the chaotic sequence generated by the image encryption model to obtain an index matrix, and embedding the pixel values ​​of the ciphertext image E into the least significant bits of the pixel values ​​of the original carrier image Q according to the index matrix; finally, through bit reconstruction, a new carrier image C is obtained that is visually indistinguishable from the original carrier image Q but contains information about the ciphertext image E, thereby completing the image hiding.

4. A medical image encryption and hiding system based on a fractional-order memristor Hopfield neural network, the system being used to implement the method according to any one of claims 1 to 3, characterized in that: include: Acquisition module, construction module and encryption and hiding module; The acquisition module is used to acquire medical images to be encrypted and hidden; The building module is used to build an image encryption model based on the Hopfield neural network; The encryption and hiding module is used to encrypt and hide medical images using the constructed image encryption model.

5. The medical image encryption and hiding system based on fractional-order memristor Hopfield neural network according to claim 4 is characterized in that: The workflow of the construction module includes: using a memristor with a nonlinear function as a connecting synapse between the second and third neurons of the Hopfield neural network, and also as an external electromagnetic induction current of the second neuron of the Hopfield neural network; the mathematical model expression of the constructed image encryption model is as follows: Where x, y and z represent the state vectors of Hopfield neurons; and They represent the internal state of the memristor state function; a represents the neuron activation gradient; b1 and b2 represent the internal parameters of the memristor; k1 represents the coupling coefficient between the memristor and the neuron; k2 represents the feedback gain of the induced current; is a nonlinear periodic function; D represents integral derivative; q represents fractional product; k represents synaptic weight.

6. The medical image encryption and hiding system based on fractional-order memristor Hopfield neural network according to claim 5, characterized in that: The workflow of the encryption and hiding module includes: using the image encryption model as an encryption and hiding tool to generate a ciphertext image E with the same size as the original medical image Γ; hiding the ciphertext image E in the original carrier image Q to obtain a carrier image C containing the ciphertext image E, and the carrier image C is visually indistinguishable from the original carrier image Q.