Reconfigurable encryption circuit based on reconfigurable unit and image encryption method
By using a combination of reconstructible memristor and N-type transistor in the encryption circuit, the integration of XOR logic and TRNG is achieved, solving the problem that memristors in the prior art cannot meet different performance requirements at the same time, and simplifying the circuit design , improves the security and utilization of the system.
Patent Information
- Application Number
- CN202411022438.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-29
AI Technical Summary
In the prior art, memristors cannot meet the different performance requirements of XOR operation and true random number generator at the same time, resulting in the need to design two different memristor modules, which increases the circuit complexity and cost and limits the memristors in the Potential in multifunctional integrated systems.
Using an encryption circuit based on reconstructible memristor, the reconstructible unit combines N-type transistors to realize volatile and nonvolatile storage, integrate XOR logic and TRNG circuits, and utilize the multi-functional reconstructible memristor Sex as a random source, generating keys are used for image encryption.
Simplifies circuit design, reduces costs, improves system utilization, realizes the integration of XOR logic operation and TRNG, enhances the application potential of memristors in multi-function integrated systems, and provides higher security and resistance. Attack ability.
Smart Images

Figure CN119004557A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of integrated circuit design, and in particular relates to an encryption circuit and an image encryption method based on a reconfigurable memristor. Background Art
[0002] Hardware encryption, that is, encrypting data through a dedicated hardware module, is a more secure means of information protection. Compared with software encryption, hardware encryption has significant advantages. First, hardware encryption can effectively resist physical and logical attacks, such as tampering, reverse engineering, and side-channel attacks, thereby ensuring the security of the encryption process. Secondly, hardware encryption uses dedicated hardware resources to achieve faster encryption processing and improve the efficiency of encryption and decryption. In addition, hardware encryption can also solve the security risks and efficiency problems inherent in software encryption, providing a more reliable solution to key encryption problems. Therefore, hardware encryption plays a vital role in protecting important data and ensuring information security.
[0003] Memristors, with their low power consumption, high durability, fast switching performance, simple structure, and compatibility with CMOS processes, have become the preferred alternative to traditional CMOS technology to implement hardware encryption circuits. This significantly improves the energy efficiency and robustness of hardware encryption circuits and expands their applicability in various application scenarios, especially for mobile devices and IoT devices that require high security and high performance. In addition, these advantages brought by memristors inject greater flexibility and scalability into circuit design, ensuring that hardware encryption solutions can more flexibly respond to evolving security challenges and performance standards.
[0004] In hardware encryption technology, traditional encryption algorithms such as AES (Advanced Encryption Standard) and RSA are widely used, but they usually require complex hardware design and a large amount of computing resources. In contrast, the exclusive OR (XOR) operation, as a simple logical operation, has been widely used in the encryption field due to its efficient performance and easy implementation. The XOR operation can be used for fast encryption and decryption of data while maintaining good security performance. However, the XOR operation itself does not provide sufficient security because if an attacker can obtain the encryption key, the data can be easily decrypted. In order to enhance security, a high-quality random number generator (TRNG) is required to generate encryption keys. A true random number generator (TRNG) can generate unpredictable random numbers based on physical phenomena, thereby providing higher security and anti-attack capabilities. Therefore, a hardware encryptable circuit combining XOR operation and TRNG becomes an ideal solution. Since XOR logic circuits often use the non-volatile storage characteristics of memristors, while TRNG circuits often use the random characteristics of volatile storage associated with memristors, a memristor has not yet been discovered or developed that can simultaneously meet the different requirements of these two circuits for memristor performance. This means that in practical applications, two different memristor modules need to be designed, one for the XOR operation and the other for the TRNG function. This not only increases the complexity and cost of the circuit, but also limits the potential of memristors in multifunctional integrated systems. Summary of the invention
[0005] In view of the deficiencies in the prior art, the purpose of the present invention is to provide an encryption circuit and an image encryption method based on a reconfigurable memristor, which solve the problems in the prior art.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] A reconfigurable memristor-based encryption circuit comprises a reconfigurable unit and a true random number generation circuit; the reconfigurable unit comprises a first reconfigurable memristor, a second reconfigurable memristor and an N-type transistor; the first reconfigurable memristor and the second memristor are reconfigurably connected in reverse parallel and then connected in series with the N-type transistor; the negative end of the first reconfigurable memristor is connected to the drain of the N-type transistor, the positive end of the first reconfigurable memristor is connected to an input voltage, the positive end of the second reconfigurable memristor is connected to the drain of the N-type transistor, the negative end of the second reconfigurable memristor is connected to the input voltage, and the gate of the N-type transistor is connected to a control voltage;
[0008] The true random number generation circuit adopts a reconfigurable unit as a random source, including: a comparator and a 1-bit counter connected in series; the source of the N-type transistor is connected to the positive end of the comparator and then connected to the CLK end of the 1-bit counter, and the negative end of the comparator is connected to a reference voltage.
[0009] Further, when the reconfigurable memristor is in a volatile storage state, the positive end of the first reconfigurable memristor and the negative end of the second reconfigurable memristor in the reconfigurable unit are used as input ends, and the source of the N-type transistor is used as an output end;
[0010] When the source voltage of the N-type transistor exceeds the reference voltage, the comparator outputs a logic high level, a CLR signal with a pulse width and amplitude is selected, and the value output by the comparator is sent to a 1-bit counter. At the end of each input pulse, the output of the 1-bit counter represents the key used for image encryption;
[0011] The generated key is input into the positive end of the first reconfigurable memristor and the negative end of the second reconfigurable memristor in the reconfigurable unit, the image to be encrypted is input into the source of the N-type transistor, and the total resistance of the first reconfigurable memristor and the second reconfigurable memristor in parallel is taken as the output value after image encryption.
[0012] An image encryption method, using the above-mentioned reconfigurable encryption circuit based on a reconfigurable unit, comprises the following steps:
[0013] S1, convert the image into a binary image;
[0014] S2, using a true random number generation circuit to generate a key to encrypt the image;
[0015] S3, input the converted binary image into the positive end of the first reconfigurable memristor and the negative end of the second reconfigurable memristor in the reconfigurable unit, input the generated key into the source of the N-type transistor, and take the total resistance of the first reconfigurable memristor and the second reconfigurable memristor in parallel as the output value after image encryption.
[0016] The above-mentioned reconfigurable encryption circuit based on reconfigurable unit is applied in image, number and letter encryption.
[0017] The above-mentioned reconfigurable encryption circuit based on reconfigurable unit is applied in image, number and letter decryption.
[0018] An image encryption system comprises the above-mentioned reconfigurable encryption circuit based on a reconfigurable unit.
[0019] A reconfigurable unit comprises: a first reconfigurable memristor, a second reconfigurable memristor and an N-type transistor; the first reconfigurable memristor and the second memristor are reconfigurably connected in reverse parallel and then connected in series with the N-type transistor; the negative end of the first reconfigurable memristor is connected to the drain of the N-type transistor, the positive end of the first reconfigurable memristor is connected to an input voltage, the positive end of the second reconfigurable memristor is connected to the drain of the N-type transistor, the negative end of the second reconfigurable memristor is connected to the input voltage, and the gate of the N-type transistor is connected to a control voltage.
[0020] Beneficial effects of the present invention:
[0021] 1. The reconfigurable memristor used in the present invention can realize not only volatile storage but also non-volatile storage by applying a large current or a small current to the memristor.
[0022] 2. The reconfigurable unit proposed in the present invention can realize XOR logic operation through the non-volatile storage of the reconfigurable memristor, and can also use the random characteristics of the volatile storage of the reconfigurable memristor as a random source for the TRNG circuit, thereby improving the application potential of memristors in multifunctional integrated systems.
[0023] 3. The encryption circuit of the present invention integrates two different memristor modules required by the XOR circuit and the TRNG circuit into a multifunctional memristor module (reconfigurable unit), which simplifies the circuit design, reduces the cost, reduces the occupied space, and improves the utilization rate of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 is a schematic structural diagram of a reconfigurable unit of the present invention;
[0026] Figure 2 It is a schematic diagram of the structure of the reconfigurable unit XOR logic circuit of the present invention;
[0027] Figure 3 is a reconfigurable unit XOR logic analysis table of the present invention;
[0028] Figure 4 It is a schematic diagram of the overall structure of the encryption circuit of the present invention;
[0029] Figure 5 It is a schematic diagram of the encryption and decryption process of the encryption circuit of the present invention. DETAILED DESCRIPTION
[0030] 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.
[0031] Example 1
[0032] like Figure 1 As shown, the reconfigurable unit includes a first reconfigurable memristor, a second reconfigurable memristor and an N-type transistor. The first reconfigurable memristor and the second reconfigurable memristor are connected in reverse parallel and then in series with the N-type transistor. The negative end of the first reconfigurable memristor is connected to the drain of the N-type transistor, the positive end of the first memristor is connected to the input voltage V1, the positive end of the second reconfigurable memristor is connected to the drain of the N-type transistor, the negative end of the second reconfigurable memristor is connected to the input voltage V2, and the gate of the N-type transistor is connected to the control voltage V c , the source is connected to the input voltage V3;
[0033] like Figure 1 As shown in ac in FIG, since the reconfigurable memristor used exhibits a volatile working mode under low current state and a non-volatile working mode under high current state, it can be operated by applying a gate control voltage V c =V ch (high voltage) or V c =V cl (low voltage) to precisely control the working state of the reconfigurable memristor, such as Figure 1 As shown in d.
[0034] The reconfigurable unit performs exclusive OR (XOR) logic, such as Figure 2 As shown, the operation process of XOR is as follows:
[0035] First, apply V to the gate voltage of the transistor ch The current is controlled to be relatively large, so that the reconfigurable memristor is in a non-volatile programmable state, and the RRAM is reset to adjust the RRAM device to a high-resistance state; the total resistance of the first reconfigurable memristor and the second reconfigurable memristor in parallel is read as the output logic value, the high-resistance state is logic '0', and the low-resistance state is logic '1'. Due to the difference in the applied voltage V1 = V2, V3, the total resistance of the two reconfigurable memristors in parallel changes. The specific XOR logic is as follows: Figure 3 As shown, the operation is as follows:
[0036] When V1=V2=0V, V3=0V, this corresponds to the situation of '0', '0'. Since the voltage drop of the first and second reconfigurable memristors is 0, the total resistance of the two reconfigurable memristors in parallel remains in a high impedance state, corresponding to the output "0".
[0037] When V1=V2=1V, V3=0V, this corresponds to the situation of '1' and '0'. Since the voltage drop of the first reconfigurable memristor is -1V and the voltage drop of the second reconfigurable memristor is 1V, the first reconfigurable memristor is in a low resistance state and the second reconfigurable memristor is in a high resistance state. The total resistance of the two reconfigurable memristors in parallel is a low resistance state, corresponding to the output "1".
[0038] When V1=V2=0V, V3=1V, this corresponds to the cases of '0' and '1'. Since the voltage drop of the first reconfigurable memristor is 1V and the voltage drop of the second reconfigurable memristor is -1V, the first reconfigurable memristor is in a high-resistance state and the second reconfigurable memristor is in a low-resistance state. The total resistance of the two reconfigurable memristors in parallel is a low-resistance state, corresponding to the output "1".
[0039] When V1=V2=1V, V3=1V, this corresponds to the situation of '1', '1'. Since the voltage drop of the first and second reconfigurable memristors is 0, the total resistance of the two reconfigurable memristors in parallel remains in a high impedance state, corresponding to the output "0".
[0040] like Figure 4 As shown, an encryption circuit based on a reconfigurable memristor includes a reconfigurable unit and a true random number generator (TRNG); wherein the TRNG circuit includes a comparator and a 1-bit counter connected in series, and the reconfigurable unit is used as a random source of the TRNG. The source of the NMOS transistor in the reconfigurable unit is connected to the positive terminal of the comparator, and the negative terminal of the comparator is input with a comparison voltage V ref The output of the comparator is connected to the clock terminal CLK of the 1-bit counter, the re-made signal is input from the CLR terminal, and the QA terminal is taken as the output signal.
[0041] The operation process of the true random number generator (TRNG) is as follows:
[0042] First, a voltage V is applied to the gate of the N-type transistor. cl When the current is controlled to be small (V cl ) makes the memristor work in a random state of volatile conductive filaments forming a break, takes the positive end (V1) of the first reconfigurable memristor and the negative end (V2) of the second reconfigurable memristor in the reconfigurable unit as input, and the source (V3) of the N-type transistor as output; due to the volatility of the reconfigurable memristor, when voltage is applied to the memristor, the resistance value of the memristor will change, but this change is not instantaneous, but there is a delay time. This delay time is uncertain due to the complex physical and chemical processes inside the memristor and can be regarded as a random source. Connect the source voltage of the N-type transistor in the reconfigurable unit (i.e., V3 voltage) to the positive end of the comparator in the TRNG and then to the CLK end of the 1-bit counter, and input the reference voltage V at the negative end of the comparator. ref ; If the source voltage of the N-type transistor in the reconfigurable unit (i.e., V3 voltage) exceeds V ref , the comparator will output a logic high level, select the appropriate pulse width and amplitude of the CLR signal, and finally send the random value output by the comparator to the 1-bit counter. At the end of each input pulse, the output of the counter is the key for image encryption.
[0043] The operation process of the encryption circuit is as follows:
[0044] First, apply a voltage V to the gate of the N-type transistor. cl When the current is controlled to be small, the memristor works in a random state of volatile conductive filaments. In the reconfigurable unit, the positive terminal (V1) of the first reconfigurable memristor and the negative terminal (V2) of the second reconfigurable memristor are input with a signal, and the output of the 1-bit counter is taken as the key for image encryption.
[0045] Then apply voltage V to the gate of the N-type transistor. cl When the current is controlled to be large, the reconfigurable memristor is in a non-volatile programmable state. The image and the key are used as two input terminals, respectively, and input to the positive terminal (V1=V2) of the first reconfigurable memristor and the source terminal (N3) of the N-type transistor, and the total resistance (R parallel ) as the output value after image encryption (i.e. the encrypted image). Using the same key, perform an XOR operation on the above process again to get the original image information (i.e. the decrypted image).
[0046] Example 2
[0047] In this embodiment, the process of encrypting and decrypting an image using the reconfigurable encryption circuit disclosed in Embodiment 1 is introduced;
[0048] The steps of image encryption include:
[0049] S1, first use software to convert the image into a binary image, which corresponds to a binary matrix (m×n array);
[0050] S3, input the converted binary image into the positive end (V1) of the first memristor and the negative end (V2) of the second memristor in the reconfigurable unit (V1 = V2), input the generated key into the source (V3) of the N-type transistor, and take the total resistance (R parallel ) as the output value after image encryption.
[0051] S2, uses TRNG to generate a key (m×n array) to encrypt the image.
[0052] In addition, the decryption process of the image only requires performing an XOR operation on the matrix generated after encryption and the matrix used during encryption, which is similar to the encryption process, to obtain the decrypted image.
[0053] The reconfigurable encryption circuit can also encrypt and decrypt letters; Figure 5As shown, the letter sequence "U" is used as an example. Here, the dark grid represents logical "1" and the white grid represents logical "0". Therefore, the logical matrix representing the original letter "U" is [1001; 1001; 1001; 1111]. In addition, the key [1010; 0101; 1100; 1010] is generated using TRNG. The encryption mechanism of the array is simplified to the XOR of the above two matrices, input from V1=V2 and V3 respectively, and the output result is only S=[0011; 1100; 0101; 0101]. This completes the encryption process.
[0054] The decryption process of the image only requires performing an XOR operation on the matrix generated after encryption and the matrix used during encryption, which is similar to the encryption process, to obtain the decrypted image.
[0055] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0056] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. An encryption circuit based on a reconfigurable memristor, characterized in that: It includes a reconfigurable unit and a true random number generation circuit; the reconfigurable unit includes a first reconfigurable memristor, a second reconfigurable memristor and an N-type transistor; the first reconfigurable memristor and the second memristor are reconfigurable to be connected in reverse parallel and then connected in series with the N-type transistor; the negative end of the first reconfigurable memristor is connected to the drain of the N-type transistor, the positive end of the first reconfigurable memristor is connected to the input voltage, the positive end of the second reconfigurable memristor is connected to the drain of the N-type transistor, the negative end of the second reconfigurable memristor is connected to the input voltage, and the gate of the N-type transistor is connected to the control voltage; The true random number generation circuit adopts a reconfigurable unit as a random source, including: a comparator and a 1-bit counter connected in series; the source of the N-type transistor is connected to the positive end of the comparator and then connected to the CLK end of the 1-bit counter, and the negative end of the comparator is connected to a reference voltage.
2. The encryption circuit based on reconfigurable memristor according to claim 1, characterized in that: When the reconfigurable memristor is in a volatile storage state, the positive end of the first reconfigurable memristor and the negative end of the second reconfigurable memristor in the reconfigurable unit are used as input ends, and the source of the N-type transistor is used as an output end; When the source voltage of the N-type transistor exceeds the reference voltage, the comparator outputs a logic high level, a CLR signal with a pulse width and amplitude is selected, and the value output by the comparator is sent to a 1-bit counter. At the end of each input pulse, the output of the 1-bit counter represents the key used for image encryption; The generated key is input into the positive end of the first reconfigurable memristor and the negative end of the second reconfigurable memristor in the reconfigurable unit, the image to be encrypted is input into the source of the N-type transistor, and the total resistance of the first reconfigurable memristor and the second reconfigurable memristor in parallel is taken as the output value after image encryption.
3. An image encryption method, using a reconfigurable encryption circuit based on a reconfigurable unit according to any one of claims 1 to 2, characterized in that: The following steps are involved: S1, convert the image into a binary image; S2, using a true random number generation circuit to generate a key to encrypt the image; S3, input the converted binary image into the positive end of the first reconfigurable memristor and the negative end of the second reconfigurable memristor in the reconfigurable unit, input the generated key into the source of the N-type transistor, and take the total resistance of the first reconfigurable memristor and the second reconfigurable memristor in parallel as the output value after image encryption.
4. Application of a reconfigurable encryption circuit based on a reconfigurable unit as described in any one of claims 1-2 in image, number and letter encryption.
5. Application of a reconfigurable encryption circuit based on a reconfigurable unit as described in any one of claims 1-2 in image, number and letter decryption.
6. An image encryption system, characterized in that: A reconfigurable encryption circuit based on a reconfigurable unit comprising any one of claims 1-2.
7. A reconfigurable unit, characterized in that: include: A first reconfigurable memristor, a second reconfigurable memristor, and an N-type transistor; The first reconfigurable memristor and the second reconfigurable memristor are connected in reverse parallel and then in series with the N-type transistor; the negative end of the first reconfigurable memristor is connected to the drain of the N-type transistor, the positive end of the first reconfigurable memristor is connected to the input voltage, the positive end of the second reconfigurable memristor is connected to the drain of the N-type transistor, the negative end of the second reconfigurable memristor is connected to the input voltage, and the gate of the N-type transistor is connected to the control voltage.
Citation Information
Patent Citations
Logic operation circuit and operation method
CN106374912A
Digital comparison circuit and operation method thereof
CN110445489A
Bit stream generator and bit stream generation method for random computation
CN111338602A
Cited By
Reserve pool calculation system based on reconfigurable memristor and reserve pool calculation control method
CN120469961A
True random number generator based on volatile memristor and memristor preparation method
CN120973340A
True random number generator based on volatile memristor and method for preparing memristor
CN120973340B
