An image encryption method and system based on Raspberry Pi and memristor neural network

By combining memristor neural network and chaotic sequences on the Raspberry Pi, the double-layer encryption processing of images is achieved, solving the problem of insufficient combination of memristors and image encryption in the prior art, and significantly improving the security and concealment of image encryption.

CN114598782BActive Publication Date: 2025-03-11ANHUI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210339644.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2025-03-11
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

The prior art fails to effectively combine memristors and image encryption, and cannot improve the encryption quality of images.

Method used

The image encryption method based on Raspberry Pi and memristor neural network is adopted. After the first encryption process of the original image, the chaotic sequence generated by the memristor neural network is used for the second encryption process to generate the final encrypted image.

Benefits of technology

It improves the security and concealment of image transmission, and significantly enhances the encryption effect through the dual-layer encryption mechanism, which has stronger anti-attack and confidentiality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114598782B_ABST
    Figure CN114598782B_ABST
Patent Text Reader

Abstract

The present invention discloses an image encryption method and system based on Raspberry Pi and memristor neural network, which are applied to the field of image encryption technology, wherein the method comprises: inputting an original image; performing a first encryption process on the original image; performing a second encryption process on the image obtained by the first encryption process using a memristor neural network to obtain a final encrypted image, and sending the final encrypted image to the second Raspberry Pi via the first Raspberry Pi; the present invention enhances the security and concealment of image transmission by encrypting the image before transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image encryption transmission, and more specifically to an image encryption method and system based on Raspberry Pi and memristor neural network. Background Art

[0002] At present, the importance of network security is increasing, among which the security of image and video information is particularly important. In the early days, images and videos were not encrypted, and only two-way identity authentication was used to ensure security, which made them easy to be stolen and spread. In the Internet era, how to quickly encrypt and ensure the authenticity and integrity of real-time images and videos during transmission has extremely high significance and value in practical applications, and has become one of the research hotspots. At the same time, memristors are the fourth basic element newly discovered in recent years in addition to capacitors, inductors, and resistors. They are nonlinear resistors with memory functions, which can remember the amount of charge flowing through them, and can also change their resistance by controlling the change of current. Moreover, this change can be maintained continuously when the power is off, which makes memristors a natural non-volatile storage device. In recent years, research on memristors has made continuous breakthroughs at home and abroad. The memristor chaotic sequence generated by the memristor neural network composed of memristors has higher randomness than the key generated by the general system, and is more suitable for image encryption.

[0003] However, the prior art does not involve combining memristors with image encryption, and thus cannot improve the encryption quality of images.

[0004] Therefore, how to provide an image encryption method that can solve the above problems is an urgent problem that those skilled in the art need to solve. Summary of the invention

[0005] In view of this, the present invention provides an image encryption method and system based on Raspberry Pi and memristor neural network, which enhances the security and concealment of image transmission by encrypting the image before transmission.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] An image encryption method based on a Raspberry Pi and a memristive neural network is implemented based on a first Raspberry Pi and a second Raspberry Pi, and includes the following steps:

[0008] Input original image;

[0009] Performing a first encryption process on the original image;

[0010] The image obtained through the first encryption process is encrypted for a second time using the memristor neural network to obtain a final encrypted image, and the final encrypted image is sent to the second Raspberry Pi through the first Raspberry Pi.

[0011] Preferably, it also includes:

[0012] The second Raspberry Pi receives the encrypted image and performs a first decryption process using the memristor neural network;

[0013] The image obtained through the first decryption process is subjected to a second decryption process to obtain the original image.

[0014] Preferably, the specific process of the first encryption process includes:

[0015] Get the RGB value corresponding to the pixel of the image;

[0016] Preset an initial XOR value, perform XOR processing on the pixel point and the previous pixel point respectively, and store the XOR result at the current pixel point position;

[0017] The image obtained by XOR processing is exchanged with the pixel positions through the Arnold transformation algorithm to complete the first encryption process.

[0018] Preferably, the specific process of the second encryption process includes:

[0019] Designing a memristor neural network, converting a chaotic equation corresponding to the memristor neural network into an iterative equation using the Rungeta method, and performing multiple iterative processes to generate a chaotic sequence;

[0020] The chaotic sequence is superimposed on the image obtained through the first encryption process by using a DNA encryption method to obtain a final encrypted image.

[0021] Preferably, it also includes: evaluating the encryption performance of the encrypted image using any one or several of the key sensitivity, key space size, histogram, correlation between adjacent pixels, information entropy, and algorithm complexity parameters.

[0022] Furthermore, the present invention also provides an image encryption system based on a Raspberry Pi and a memristive neural network, which is implemented based on a first Raspberry Pi and a second Raspberry Pi, and further includes:

[0023] A wireless communication module, through which the first Raspberry Pi is connected to the second Raspberry Pi for communication;

[0024] A first display module, wherein the first display module is electrically connected to the first Raspberry Pi;

[0025] A second display module, wherein the second display module is electrically connected to the second Raspberry Pi;

[0026] A first power supply module, wherein the first power supply module is connected to the first Raspberry Pi;

[0027] A second power supply module, wherein the second power supply module is connected to the second Raspberry Pi;

[0028] A first wireless communication module, the first wireless communication module is connected to the first Raspberry Pi for communication;

[0029] A second wireless communication module, wherein the second wireless communication module is connected to the second Raspberry Pi for communication.

[0030] Preferably, the method further comprises: a storage module, wherein the storage module is connected to the first Raspberry Pi.

[0031] Preferably, the system further comprises: a mobile terminal, wherein the mobile terminal is communicatively connected to the first Raspberry Pi and the second Raspberry Pi via the first wireless communication module and the second wireless communication module.

[0032] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses an image encryption method and system based on Raspberry Pi and memristor neural network, which has the following beneficial effects:

[0033] 1. The key generated by the chaotic system is used as a new cryptographic system to encrypt videos and images. By mounting it on a small Raspberry Pi, users can use it more conveniently. Compared with traditional communications, it is more convenient, safer, and more resistant to interference.

[0034] 2. The image encryption process performed by this method requires the original image to go through many image processing algorithms, and the color, shape, and position information of the original pixel points are greatly disrupted and hidden. At the same time, the chaotic sequence and the custom key double-layer encryption information are superimposed, which has high confidentiality, strong anti-attack ability, and good encryption effect.

[0035] 3. The system has complete functions and strong scalability

[0036] This device is convenient and practical, equipped with a variety of communication processing units, combining hardware devices with software mobile terminals. The system has complete functions and strong scalability, which is convenient for the overall upgrade and maintenance of the system in the later stage. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] Figure 1 A specific flow chart of an image encryption method based on Raspberry Pi and memristor neural network provided by the present invention;

[0039] Figure 2 A schematic diagram of a mathematical model of a memristor neural network provided by an embodiment of the present invention;

[0040] Figure 3 A phase diagram of a memristor neural network provided by an embodiment of the present invention;

[0041] Figure 4 A bifurcation diagram of a memristor neural network provided by an embodiment of the present invention;

[0042] Figure 5 A Lyapunov index diagram of a memristor neural network provided by an embodiment of the present invention;

[0043] Figure 6 A structural principle block diagram of an image encryption system based on Raspberry Pi and memristor neural network provided for the invention;

[0044] Figure 7 This is a color distribution diagram of an encrypted image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.

[0046] See attached Figure 1 As shown, an embodiment of the present invention discloses an image encryption method based on a Raspberry Pi and a memristor neural network, which is implemented based on a first Raspberry Pi and a second Raspberry Pi, and is characterized in that it includes the following steps:

[0047] Input original image;

[0048] Performing a first encryption process on the original image;

[0049] The image obtained through the first encryption process is encrypted for a second time using the memristor neural network to obtain a final encrypted image, and the final encrypted image is sent to the second Raspberry Pi through the first Raspberry Pi.

[0050] In a specific embodiment, the specific process of the first encryption process includes:

[0051] Get the RGB value corresponding to the pixel of the image;

[0052] Preset an initial XOR value, perform XOR processing on the pixel point and the previous pixel point respectively, and store the XOR result at the current pixel point position;

[0053] The image obtained by XOR processing is exchanged with the pixel positions through the Arnold transformation algorithm to complete the first encryption process.

[0054] In a specific embodiment, the specific process of the second encryption process includes:

[0055] The chaotic sequence is superimposed on the image obtained after the first encryption process through a chaotic encryption method to obtain the final encrypted image.

[0056] For details, please refer to the attached Figure 2 As shown, the HR neuron and the FHN neuron are connected through a coupled memristor. 11 is the synaptic weight of HR neuron, w 22 is the synaptic weight of the FHN neuron, w1 and w2 are the resistances of the coupled memristors, and k1 and k2 are the strength parameters of w1 and w2.

[0057] The mathematical equation of the HR neuron model is:

[0058]

[0059] Where x represents the membrane potential of the HR neuron, y represents the recovery potential of the HR neuron, and I represents the external circuit current.

[0060] The mathematical equation for the FHN neuron is:

[0061]

[0062] Where x represents the membrane potential of the FHN neuron, y represents the recovery potential of the FHN neuron, I represents the external circuit current, and m and n are control parameters.

[0063] The mathematical equation of the entire memristor neural network model is:

[0064]

[0065] Where x is the membrane potential of HR neurons, y is the recovery potential of HR neurons, z is the membrane potential of FHN neurons, v is the recovery potential of FHN neurons, and w is the recovery potential of FHN neurons. 11 is the synaptic weight of the HR neuron, w 22 is the synaptic weight of the FHN neuron, u and w are the state variables of the memristor, I is the external circuit current, m and n are control parameters, a1, a2, b1, b2, d1, d2 are constants, c1, c2, e1, e2 are the crosstalk strength of the memristor, w1 and w2 are the resistances of the coupled memristors, and k1 and k2 are the strength parameters of w1 and w2.

[0066] The memristor neural network composed of memristors and its corresponding chaotic equation can generate multiple chaotic attractors to enhance the randomness and confidentiality of image encryption.

[0067] Specifically, the embodiment of the present invention also needs to verify whether the above equation has the basic characteristics of chaos. The basic characteristics are mainly obtained by using the phase trajectory diagram (see Appendix Figure 3 ), bifurcation diagram (attached Figure 4 ) and Lyapunov index diagram (attached Figure 5 ) method to verify.

[0068] In a specific embodiment, it also includes: evaluating the encryption performance of the encrypted image using any one or several of the key sensitivity, key space size, histogram, correlation between adjacent pixels, information entropy, and algorithm complexity parameters.

[0069] Specifically, (1) the sensitivity of the key

[0070] The sensitivity of a key refers to the fact that a small change in the key of the same encryption algorithm will result in a result that is very different from the correct encryption result. A key with good sensitivity will not be able to obtain a correct encryption graph as long as there is a small difference in the key.

[0071] (2) Key space size

[0072] The size of the key space refers to the size of the space of all key parameter sets. The larger the key space, the more difficult it is to attack the password, and the higher the security, especially against brute force attacks, exhaustive tools have strong protection.

[0073] (3) Histogram

[0074] Histogram is an important statistical feature in image processing, which is used to describe the grayscale distribution of pixels in an image. The histogram of a grayscale image is a discrete function that represents the correspondence between each grayscale in the image and the number of occurrences of that grayscale.

[0075] (4) Correlation between adjacent pixels

[0076] The correlation of adjacent pixels reflects the correlation degree of adjacent pixels in an image. The grayscale values ​​of adjacent pixels in an image to be encrypted have a strong correlation. The correlation of adjacent pixels is mainly reflected in the correlation coefficients between adjacent pixels in the horizontal, vertical and diagonal directions, and its calculation form is:

[0077] (5) Information entropy

[0078] Information entropy reflects the uncertainty of information. When applied to image encryption algorithms, it mainly measures the information contained in the image, that is, the distribution of grayscale values ​​in the image.

[0079] (6) Algorithm complexity

[0080] The complexity of an algorithm mainly refers to its time complexity and space complexity, which is an important indicator to measure the performance of an algorithm. The space complexity of an encryption algorithm mainly refers to the space resources consumed by the algorithm during the encryption process. The less space consumed, the better the space complexity. A good encryption algorithm should achieve the best time complexity and space complexity.

[0081] In a specific embodiment, it also includes:

[0082] The second Raspberry Pi receives the encrypted image and performs the first decryption process using the memristor neural network.

[0083] The image obtained by the first decryption process is subjected to a second decryption process to obtain the original image.

[0084] Specifically, the first decryption process includes: using a chaotic sequence to perform decryption processing.

[0085] The second decryption process includes: performing a first inverse XOR process, a pixel anti-confusion process and a second inverse XOR process on the image that has undergone the first decryption process to obtain a corresponding original image.

[0086] See attached Figure 6 As shown, an embodiment of the present invention further provides an image encryption system based on a Raspberry Pi and a memristor neural network, which is implemented based on a first Raspberry Pi and a second Raspberry Pi, and further includes:

[0087] A wireless communication module, through which the first Raspberry Pi communicates with the second Raspberry Pi;

[0088] A first display module, the first display module is electrically connected to the first Raspberry Pi;

[0089] A second display module, the second display module is electrically connected to the second Raspberry Pi;

[0090] A first power module, the first power module is connected to the first Raspberry Pi;

[0091] A second power module, the second power module is connected to the second Raspberry Pi;

[0092] A first wireless communication module, the first wireless communication module is connected to the first Raspberry Pi for communication;

[0093] The second wireless communication module is connected to the second Raspberry Pi for communication.

[0094] In a specific embodiment, it also includes: a storage module, and the storage module is connected to the first Raspberry Pi.

[0095] In a specific embodiment, it also includes: a mobile terminal, which is connected to the first Raspberry Pi and the second Raspberry Pi through the first wireless communication module and the second wireless communication module.

[0096] Specifically. When the user clicks to enter the mobile terminal and enters the account to enter the main interface, if it is a new user, you need to register an account first. After entering the main interface, you can choose between two modes: encrypted transmission and bound device. The encrypted transmission mode means that the user directly uses the software client to encrypt and transmit data and images. The user sets the encryption sequence to ensure that the encryption protocols of both parties are consistent; at the same time, the user can also query the previous transmission history records on the mobile terminal. The bound device mode is usually used in some special occasions that require software and hardware joint debugging. The mobile terminal can be bound to the corresponding hardware device to control the hardware device for encrypted transmission and query the working status of the hardware device. In addition, users can also query the software version update information and feedback help information on the client.

[0097] For details, see the attached Figure 7 As shown, when the encryption method provided by the embodiment of the present invention is applied to encrypt an image, the encrypted image can change the original scattered color distribution into a uniform distribution, thereby enhancing the confidentiality of the image and increasing the difficulty of cracking.

[0098] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0099] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image encryption method based on Raspberry Pi and memristor neural network, implemented based on a first Raspberry Pi and a second Raspberry Pi, characterized in that: The following steps are involved: Input original image; The original image is encrypted for the first time, and the specific process of the first encryption process includes: Get the RGB value corresponding to the pixel of the image; Preset an initial XOR value, perform XOR processing on the pixel point and the previous pixel point respectively, and store the XOR result at the current pixel point position; The image obtained by XOR processing is subjected to the Arnold transformation algorithm to exchange the pixel positions, thus completing the first encryption process; The image obtained by the first encryption process is encrypted for the second time using the memristor neural network to obtain a final encrypted image, and the final encrypted image is sent to the second Raspberry Pi via the first Raspberry Pi. The specific process of the second encryption process includes: Designing a memristor neural network, converting a chaotic equation corresponding to the memristor neural network into an iterative equation using the Rungeta method, and performing multiple iterative processes to generate a chaotic sequence; The chaotic sequence is superimposed on the image obtained through the first encryption process by using a DNA encryption method to obtain a final encrypted image.

2. According to claim 1, the image encryption method based on Raspberry Pi and memristor neural network is characterized in that: Also includes: The second Raspberry Pi receives the encrypted image and performs a first decryption process using the memristor neural network; The image obtained through the first decryption process is subjected to a second decryption process to obtain the original image.

3. The image encryption method based on Raspberry Pi and memristor neural network according to claim 1, characterized in that: It also includes: evaluating the encryption performance of the encrypted image by using any one or several of the key sensitivity, key space size, histogram, correlation between adjacent pixels, information entropy, and algorithm complexity parameters.

4. An image encryption system based on Raspberry Pi and memristive neural network, implemented based on a first Raspberry Pi and a second Raspberry Pi, characterized in that: Also includes: The first Raspberry Pi is used to obtain and send a final encrypted image to the second Raspberry Pi, wherein the specific processing of obtaining the final encrypted image includes: Input original image; The original image is encrypted for the first time, and the specific process of the first encryption process includes: Get the RGB value corresponding to the pixel of the image; Preset an initial XOR value, perform XOR processing on the pixel point and the previous pixel point respectively, and store the XOR result at the current pixel point position; The image obtained by XOR processing is subjected to the Arnold transformation algorithm to exchange the pixel positions, thus completing the first encryption process; The image obtained by the first encryption process is subjected to a second encryption process using the memristor neural network to obtain a final encrypted image. The specific process of the second encryption process includes: Designing a memristor neural network, converting a chaotic equation corresponding to the memristor neural network into an iterative equation using the Rungeta method, and performing multiple iterative processes to generate a chaotic sequence; Using the chaotic sequence to superimpose on the image obtained after the first encryption process through a DNA encryption method, a final encrypted image is obtained; The second Raspberry Pi receives the encrypted image, and performs a first decryption process using the memristor neural network and then a second decryption process to obtain the original image; A wireless communication module, through which the first Raspberry Pi is connected to the second Raspberry Pi for communication; A first display module, wherein the first display module is electrically connected to the first Raspberry Pi; A second display module, wherein the second display module is electrically connected to the second Raspberry Pi; A first power supply module, wherein the first power supply module is connected to the first Raspberry Pi; A second power module, wherein the second power module is connected to the second Raspberry Pi; A first wireless communication module, the first wireless communication module is connected to the first Raspberry Pi for communication; A second wireless communication module, wherein the second wireless communication module is connected to the second Raspberry Pi for communication.

5. The image encryption system based on Raspberry Pi and memristor neural network according to claim 4, characterized in that: Also includes: A storage module, wherein the storage module is connected to the first Raspberry Pi.

6. The image encryption system based on Raspberry Pi and memristor neural network according to claim 4, characterized in that: Also includes: A mobile terminal is connected to the first Raspberry Pi and the second Raspberry Pi through the first wireless communication module and the second wireless communication module.

Citation Information

Patent Citations

  • Image transmission method and system based on memristor chaotic system finite time synchronization

    CN109412808A

  • Color image encryption method based on memristor hyper-chaotic system

    CN111756518A

  • One -way net data transmission platform of striding based on raspberry group

    CN205584313U