CN-121984656-A - Image encryption method, system and product based on controllable multi-scroll neural network
Abstract
The invention relates to the technical field of digital image encryption, in particular to an image encryption method, an image encryption system and an image encryption product based on a controllable multi-scroll neural network. According to the invention, on one hand, a color image is converted into a gray level image through three-channel fusion processing, so that color hiding is realized to reduce redundancy and pixel relevance, and the image specification is changed through rearrangement to improve safety, on the other hand, memristors with fractional order characteristics are constructed and introduced into a three-neuron Hopfield neural network to serve as adjustable synaptic connection, so that the dynamic complexity and safety of a system are improved, the controllable generation of double-scroll group numbers is realized, a hash value is utilized to generate a key strongly related to the image, and a chaotic sequence with high randomness, high complexity and high sensitivity is further constructed, so that the flexibility of image encryption is effectively improved, and the high safety, strong robustness and good interference resistance of image encryption are ensured.
Inventors
- DING DAWEI
- LIU CHUAN
- YANG ZONGLI
- CHENG HONG
- DONG KUN
- ZHANG HONGWEI
- ZHANG FEN
- WANG XIAOYUAN
Assignees
- 安徽大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260122
Claims (10)
- 1. The image encryption method based on the controllable multi-scroll neural network is characterized by comprising the following steps of: The fractional order memristor is used as an adjustable synaptic connection to be introduced into a three-neuron Hopfield neural network to obtain a controllable multi-scroll neural network, and double-scroll group number adjustment is carried out on the controllable multi-scroll neural network to obtain a chaotic sequence generator; Performing three-channel fusion processing on the color image P color to obtain a gray image P gary ; generating a key according to the hash value of P gary , and substituting the key into a chaotic sequence generator to obtain a chaotic sequence s and a chaotic sequence q; p gary uses s for pixel scrambling and q for pixel diffusion to obtain ciphertext image C encrypted .
- 2. The image encryption method based on the controllable multi-scroll neural network according to claim 1, wherein the mathematical expression of the controllable multi-scroll neural network is: ; Wherein, the Represents fractional order differential operator, q is fractional order, x, y and z represent state vector of Hopfield neuron, Represents magnetic flux, x, y, z, K represents a coupling strength weight coefficient, a and b represent internal state parameters of the memristor; W 12 、W 21 、W 13 、W 31 、W 23 、W 32 represents the electrical coupling coefficient between Hopfield neurons, W 11 、W 22 、W 33 represents the electrical coupling coefficient of the Hopfield neurons themselves; the mathematical expression of (2) is: ; In the formula, Representing a nonlinear function one; G, M is an adjustable parameter for controlling the specific group number of the double scroll; wherein, when g=0, the double scroll has only 1 group; When G=1, = When the double scroll has 2M+3 groups; When G=1, = When the double scroll has 2M+2 groups.
- 3. The method of claim 2, wherein introducing fractional memristors as adjustable synapses into a three-neuron Hopfield neural network to obtain the controllable multi-scroll neural network comprises: replacing the self electric coupling coefficient W 22 of the 2 nd Hopfield neuron in the three-neuron Hopfield neural network with a fractional order memristor to form a controllable multi-scroll neural network; the mathematical expression of the fractional order memristor is as follows: ; wherein I represents an output current; Representing a memristive function; representing magnetic flux; The method comprises the following steps of representing a nonlinear periodic function, v representing input voltage, a and b representing internal state parameters of the memristor; representing a fractional order differential operator, q being the fractional order; Representing an internal state function.
- 4. The image encryption method based on the controllable multi-scroll neural network according to claim 1, wherein the three-channel fusion processing method comprises: Carrying out R, G, B three-channel separation on the P color to obtain a corresponding red channel pixel matrix P R , a green channel pixel matrix P G and a blue channel pixel matrix P B ; Alternately extracting pixels of P R 、P G 、P B by rows and rearranging to obtain P gary ; If qmod 3=1, the q-th row of pixels of P R , the q-th row of pixels of P G , and the q-th row of pixels of P B are sequentially arranged to form a q-th row of P gary ; if qmod 3=2, the q-th row of pixels of P B , the q-th row of pixels of P R , and the q-th row of pixels of P G are sequentially arranged to form the q-th row of P gary ; If qmod 3=0, the q-th row of pixels of P G , the q-th row of pixels of P B , and the q-th row of pixels of P R are sequentially arranged to form the q-th row of P gary , q e [1, N ]; N represents the width of P color , and mod represents the remainder function.
- 5. The image encryption method based on the controllable multi-scroll neural network according to claim 2, wherein the key generation method comprises: Processing P gary by adopting a hash function to obtain a hash value H, performing block division on the hash value H, and performing numerical conversion to generate a secret key; Wherein the key is four-dimensional variables x, y and z, An initial value of x 0 、y 0 、z 0 , 。
- 6. The image encryption method based on the controllable multi-scroll neural network according to claim 5, wherein the hash function is SHA-512 function, and H is divided into 8 blocks H 1 ~H 8 in sequence; Using only H 1 ~H 3 、H 6 ~H 8 to generate x 0 、y 0 、z 0 , ; Wherein, the ; Where # -represents an exclusive-or operation and hex2dec (.) represents converting a binary number to decimal.
- 7. The image encryption method based on the controllable multi-scroll neural network according to claim 5 or 6, wherein the acquisition method of s, q comprises; Substituting the secret key into a chaotic sequence generator for iteration to obtain a chaotic data set containing four-dimensional variable iteration sequences, discarding the previous T d rounds of iteration data in the chaotic data set, intercepting M multiplied by 3N lengths from the iteration sequences corresponding to x to obtain s, and intercepting M multiplied by 3N lengths from the iteration sequences corresponding to z to obtain q.
- 8. The method of claim 1, wherein performing pixel scrambling on P gary using s and then performing pixel diffusion on q to obtain the ciphertext image C encrypted comprises: flattening P gary into a one-dimensional vector A; Generating an index sequence I based on s, wherein the expression of the I is as follows: ; Wherein, I i represents the ith index in I, s i represents the ith chaos value in s; the representation takes absolute value; Representing a downward rounding function; arranging the I in ascending order to obtain a scrambling index G; moving the element of A to a corresponding position according to G to obtain a scrambled one-dimensional vector B; Mapping q to 0-255 to obtain a diffusion sequence Z, wherein the expression of Z is as follows: ; Wherein Z i represents the ith diffusion value in Z, q i represents the ith chaos value in q; the representation takes absolute value; Representing a downward rounding function; processing B based on Z by adopting chained diffusion to obtain an encryption sequence C; The method comprises the steps of carrying out exclusive OR on the 1 st element of B, the 1 st element of Z and the Mx3N element of B, and taking the exclusive OR as the 1 st element of C, carrying out exclusive OR on the 2 nd element of B, the 2 nd element of Z and the Mx3N-1 element of B, and taking the exclusive OR as the 2 nd element of C, and the like until the traversal B, Z is carried out; The inverse of C was flattened to C encrypted .
- 9. An image encryption system based on a controllable multi-scroll neural network, characterized in that it uses the image encryption method based on a controllable multi-scroll neural network as claimed in any one of claims 1 to 8; The image encryption system based on the controllable multi-scroll neural network comprises: the network model module is used for connecting the fractional order memristor as an adjustable synapse to be introduced into a three-neuron Hopfield neural network to obtain a controllable multi-scroll neural network, and adjusting the number of double-scroll groups to obtain a chaotic sequence generator; the image preprocessing module is used for carrying out three-channel fusion processing on the color image P color to obtain a gray image P gary ; The chaotic sequence generating module is used for generating a secret key according to the hash value of P gary and substituting the secret key into the chaotic sequence generator to obtain a chaotic sequence s and a chaotic sequence q, and The image encryption module is used for carrying out pixel scrambling on P gary by using s and then carrying out pixel diffusion by using q to obtain a ciphertext image C encrypted .
- 10. A computer program product comprising a computer program, characterized in that the computer program when executed by a processor implements the steps of the controllable multi-scroll neural network based image encryption method of any one of claims 1-8.
Description
Image encryption method, system and product based on controllable multi-scroll neural network Technical Field The invention relates to the technical field of digital image encryption, in particular to an image encryption method based on a controllable multi-scroll neural network, an image encryption system based on the controllable multi-scroll neural network and a computer program product. Background With the wide application of digital images in the fields of internet, medical treatment, military and the like, the secure transmission and storage of image data is a key problem to be solved urgently. The image data, especially the color image, has the characteristics of high redundancy, strong pixel relevance and the like. If a conventional encryption algorithm (such as AES algorithm, DES algorithm, etc.) is used, there are problems of low efficiency, insufficient security, etc. The chaotic system is applied to the encryption of color images to improve the anti-attack capability because of initial value sensitivity, pseudo-randomness and ergodic property. However, on one hand, the encryption effect is not as expected due to the characteristics of the color image, and on the other hand, the traditional chaotic system is easy to chaos, has a single attractor structure and a fixed number, so that the application flexibility of the chaotic system is limited, and the modern statistical analysis attack is difficult to resist. Disclosure of Invention Based on the above, it is necessary to provide an image encryption method, system and product based on a controllable multi-scroll neural network, aiming at the problems of poor encryption effect and low flexibility in encrypting a color image by using a traditional chaotic system. The invention is realized by adopting the following technical scheme: In a first aspect, the invention discloses an image encryption method based on a controllable multi-scroll neural network, which comprises the following steps: The fractional order memristor is used as an adjustable synaptic connection to be introduced into a three-neuron Hopfield neural network to obtain a controllable multi-scroll neural network, and double-scroll group number adjustment is carried out on the controllable multi-scroll neural network to obtain a chaotic sequence generator; Performing three-channel fusion processing on the color image P color to obtain a gray image P gary; generating a key according to the hash value of P gary, and substituting the key into a chaotic sequence generator to obtain a chaotic sequence s and a chaotic sequence q; p gary uses s for pixel scrambling and q for pixel diffusion to obtain ciphertext image C encrypted. Implementation of such a controllable multi-scroll neural network-based image encryption method is in accordance with methods or processes of embodiments of the present disclosure. In a second aspect, the present invention discloses an image encryption system based on a controllable multi-scroll neural network, which uses the image encryption method based on the controllable multi-scroll neural network as disclosed in the first aspect. The image encryption system based on the controllable multi-scroll neural network comprises a network model module, an image preprocessing module, a chaotic sequence generating module and an image encryption module. The network model module is used for connecting the fractional order memristors as adjustable synapses to be introduced into a three-neuron Hopfield neural network to obtain a controllable multi-scroll neural network, and adjusting the number of double-scroll groups to obtain the chaotic sequence generator. The image preprocessing module is used for carrying out three-channel fusion processing on the color image P color to obtain a gray image P gary. The chaotic sequence generating module is used for generating a secret key according to the hash value of P gary and substituting the secret key into the chaotic sequence generator to obtain a chaotic sequence s and a chaotic sequence q. The image encryption module is used for carrying out pixel scrambling on P gary by using s and then carrying out pixel diffusion by using q to obtain a ciphertext image C encrypted. Implementation of such an image encryption system is in accordance with a method or process of an embodiment of the present disclosure. In a third aspect, the present invention discloses a computer program product, comprising a computer program. The computer program when executed by a processor implements the steps of the controllable multi-scroll neural network-based image encryption method disclosed in the first aspect. Compared with the prior art, the invention has the following beneficial effects: According to the invention, on one hand, a color image is converted into a gray level image through three-channel fusion processing, so that color hiding is realized to reduce redundancy and pixel relevance, and the image specification is changed through rearrangement to