Multi-image encryption method based on three-dimensional memristor chaotic mapping
Through the multi-image encryption method based on three-dimensional memristor chaotic mapping, the problem of inefficiency of a single image encryption method is solved, efficient and secure multi-image data transmission is achieved, and anti-attack ability and encryption performance are improved.
Patent Information
- Application Number
- CN202510484081.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-04
AI Technical Summary
In the process of large-scale data transmission and storage, the single image encryption method is inefficient, the key flow is huge, and it is easy to lead to chaotic degradation, making it difficult to effectively protect the security of multi-image data.
A multi-image encryption method based on three-dimensional memristor chaotic mapping is adopted. By establishing a discrete memristor model and three-dimensional nonlinear chaotic mapping, combining hash function and cyclic displacement and random chaos, a pseudo-random key stream is generated and bidirectional diffusion is performed to ensure the safe transmission of multi-image data.
Improves encryption speed and efficiency, enhances attack resistance, is suitable for fast encryption applications of large-scale data, and provides a solid line of defense to protect image data security.
Smart Images

Figure BDA0005363631340000021 
Figure BDA0005363631340000022 
Figure BDA0005363631340000023
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of communication, cryptography, and information technology, and particularly relates to a multi-image encryption method based on a three-dimensional memristive chaotic map. Background Art
[0002] With the rapid development of computer technology, the transmission of images on the Internet has become more convenient and efficient. However, this convenience is accompanied by security risks. Image encryption methods have emerged under this background, and their importance is reflected in the following aspects. First, there is a risk of being intercepted and illegally accessed by hackers during the traditional image transmission process. Image encryption technology can convert the original image data into an incomprehensible encrypted form, effectively preventing the leakage of sensitive information, ensuring that only authorized personnel or devices can access the image content, and thus protecting the security of personal privacy and enterprise confidential data. In image encryption methods, using chaotic theory to encrypt image data has become an innovative breakthrough. Chaotic systems are sensitive to initial conditions, and even a tiny change will cause a huge difference in the system state, which provides a theoretical basis for generating highly random and secure keys.
[0003] For multi-image encryption algorithms, their significance lies in solving the problem that traditional encryption methods can only encrypt a single image at a time. In the context of large-scale data transmission and storage, single-image encryption methods are not only inefficient but also require a huge amount of key traffic when dealing with massive image data, and it is easy to cause chaotic degradation due to excessive iteration times of the chaotic system. Therefore, the present invention proposes a three-dimensional memristive chaotic map to generate a key stream. The memristor itself has unique non-linear characteristics and internal state variables, making the chaotic map constructed by it have a high degree of randomness and complex dynamic behavior. The three-dimensional memristive chaotic map fully utilizes the advantages of the memristor in design, effectively avoids the common stability problems in continuous systems through discretization processing, and the phenomenon of infinite coexisting attractors under multiple initial values makes the generated pseudo-random key stream difficult to predict and greatly improves the security. It significantly enhances the anti-attack ability of the cryptographic system and provides a solid technical guarantee for information security. The acquisition methods of the plaintext images P1, P2, P3, and P4 in the present invention are as follows:
[0004] https: / / johnloomis.org / ece563 / notes / covar / covar.html;
[0005] https: / / community.wolfram.com / groups / - / m / t / 2159516;
[0006] https: / / edusoft.matf.bg.ac.rs / oop / julia / 6.%20Julia%20-%20Obrada%20slike%20-%20Histogram,%20ekvalizacija%20histograma.html;
[0007] https: / / imageprocessing-sankarsrin.blogspot.com / 2017 / 04 / digital-half-toning-error-diffusion.html。 Summary of the Invention
[0008] The object of the present invention is to solve the problems in the prior art that in the context of large-scale data transmission and storage, a single image encryption method is not only inefficient, but also requires a huge amount of key traffic when processing massive image data, and is prone to chaotic degradation due to excessive iteration times of the chaotic system.
[0009] To solve the above problems, the present invention provides a multi-image encryption method based on a three-dimensional memristive chaotic map, including:
[0010] S1: Based on the memristor, establish a discrete memristor model, and the formula is:
[0011]
[0012] where, v n and i n respectively represent the voltage and current at time n, q n and q n+1 respectively represent the internal charge amounts at times n and n + 1; σ1, σ2, ρ are the parameters of the discrete memristor;
[0013] Verify that the above equation conforms to the characteristics of the memristor. The method is: set the driving current in the memristor as i = Asin(ωt), where A and ω are the parameters of the driving current, and set the internal parameters σ1, σ2, ρ of the discrete memristor. Then, the relationship curve between the input current i n and the output voltage v n shows a smooth figure-eight compressed at the origin;
[0014] S2: On the basis of the discrete memristor model, construct a three-dimensional non-linear chaotic map including memristive characteristics. The mathematical equation of the three-dimensional memristive chaotic map is:
[0015]
[0016] where, z n represents the charge qn , x n and y n respectively represent the currents in two branches of the circuit, and z n , x n , y n take values in (-50, 50), and the parameters η (η ∈ (0, 10)), k (k ∈ (0, 10)), and ε (ε ∈ (0, 10)) represent the characteristic parameters of the memristor. σ1, σ2, and ρ are the control parameters of the three-dimensional memristive chaotic map. Set the internal parameters σ1, σ2, and ρ of the memristor;
[0017] S3: Combine multiple plaintext images to reconstruct the original plaintext image;
[0018] Input the plaintext images P1, P2, P3, and P4. Starting from the second input plaintext image, each new plaintext image is obtained by performing a bitwise XOR operation on the current plaintext image and the previous plaintext image; the new plaintext images are NP1, NP2, NP3, and NP4 respectively, and the calculation formulas are as follows:
[0019]
[0020] Connect the new plaintext images NP1, NP2, NP3, and NP4 in sequence to obtain the final plaintext image NP, and the arrangement method is as follows:
[0021]
[0022] S4: Generate the secret key of the cryptosystem using a hash function;
[0023] S4-1: Input the plaintext image NP as the input of the hash function;
[0024] S4-2: The hash function generates the initial key of the encryption system and converts it into 16 16-bit secret keys. The formula is:
[0025] H = HASH256(NP), H = reshape(H, 16, 16)
[0026] where HASH256 is the hash 256 function, and reshape means to transform H into a 16×16 matrix;
[0027] S4-3: Convert each part of the initial key H into a decimal number and initialize it to a decimal number between 0 and 1 as the parameter and initial value of the Logistic map. The formula is:
[0028] BB(i) = bin2dec(B(i, :)), i = 1 - 16
[0029]
[0030] Among them, bin2dec represents converting binary to decimal, mod represents the remainder function, BB represents converting binary B to decimal BB, and i represents the i-th element of BB;
[0031] S4-4: Set the initial values of the Logistic map, where K1(1) = BB1, K2(1) = BB2, K3(1) = BB3, K4(1) = BB4, and iterate 50 times to generate a new key. The formula is:
[0032]
[0033] Among them, K1, K2, K3, and K4 represent four arrays, which are generated by iterating through four formulas. r represents the iteration process. For example, K1(r) represents the r-th element in K1;
[0034] S4-5: Calculate the initial values (NK1, NK2, NK3) and parameters (NK2, NK3, NK4) of the three-dimensional memristive chaotic map:
[0035]
[0036] Among them, end represents the last element in K1, K2, K3, and K4;
[0037] S5: Based on the three-dimensional memristive chaotic map designed in step S2, use the key generated in step S5 as the initial value and parameters, and iterate the map to generate a pseudo-random sequence;
[0038] When encrypting a large amount of image information, a large amount of key streams need to be generated; therefore, a three-dimensional memristive chaotic map is used to generate the key stream. The formula is:
[0039]
[0040] Among them, x1 = NK1, y1 = NK2, z1 = NK3, η = NK4, k = NK3, ε = NK2;
[0041] Further generate the key streams PERA, PERB, PERC, and PERD for scrambling, and the key streams PERE and PERF for diffusion. The formula is:
[0042]
[0043] Among them, sort represents the sorting function, and the size of NP is npa×npb; in order to obtain a sufficiently random key stream, the results of the first 100 iterations are truncated;
[0044] S6: Use the key stream to scramble the plaintext and change the spatial distribution of the image;
[0045] S6-1: Input NP, PERA, PERB, PERC, and PERD;
[0046] S6-2: Traverse variable i from 1 to npb, and perform a rearrangement of NP according to the indices specified by PERD to generate matrix SNPA, with the formula:
[0047] SNPA(:, PERD(i)) ← NP(:, i)
[0048] S6-3: Traverse variable i from 1 to npb, and perform a circular shift (circshift) on the i-th column of SNPA, with the shift amount controlled by PERB(i), to generate matrix SNPB, with the formula:
[0049] SNPB(:, i) ← circshift(SNPA(:, i), PERB(i))
[0050] S6-4: Traverse variable i from 1 to npa, and perform a rearrangement of the rows of SNPB, with the indices determined by PERA, to generate matrix SNPC, with the formula:
[0051] SNPC(PERA(i), :) ← SNPB(i, :)
[0052] S6-5: Traverse variable i from 1 to npa, and perform a circular shift (circshift) on the i-th row of SNPC, with the shift amount controlled by PERC(i), to generate matrix SNPD, with the formula:
[0053] SNPD(i, :) ← circshift(SNPC(i, :), PERC(i))
[0054] S7: Diffuse the scrambled image using the key stream;
[0055] Adopt a two-way diffusion strategy to fully disrupt the confused image, and determine the starting positions of diffusion, namely NPL and NPC, with the formula:
[0056] NPL = mod(floor((NK1 + NK2 + NK3 + NK4) × 10 6 ), npa)
[0057] NPC = mod(floor((NK1 + NK2 + NK3 + NK4) × 10 5 ), npb)
[0058] The two-way diffusion strategy is as follows:
[0059] S7-1: When m = NPL and n = NPC:
[0060] CNPD(NPL, NPC) = mod(PERE(NPL, NPC) + PERF(NPL, NPC) + SNPD(NPL, NPC), 256)
[0061] S7-2: When m = NPL + 1 and n = NPC:
[0062] CNPD(m, NPC) = mod(CNPD(m - 1, NPC) + PERE(m, NPC) + SNPD(m, NPC), 256)
[0063] S7-3: When n = NPC:
[0064] CNPD(m, NPC) = (CNPD(m + 1, NPC) + PERF(m, NPC) + SNPD(m, NPC) + CNPD(m + 2, NPC), 256)
[0065] S7-4: When n = NPC + 1:
[0066] CNPD(:, n) = mod(CNPD(:, n - 1) + PERF(:, n) + PERE(:, n) + SNPD(:, n), 256)
[0067] S7-5: When n = NPC - 1: -1: 1:
[0068] CNPD(:, n) = mod(CNPD(:, n + 1) + PERF(:, n) + CNPD(:, n + 2) + SNPD(:, n), 256)
[0069] Output the encrypted image CNPD.
[0070] In the preferred mode, the parameters of the discrete memristor are set as ρ = 0.9, σ1 = 0.1, and σ2 = 0.2 as the optimal parameters in step S1.
[0071] In the preferred mode, the internal parameters of the memristor are set as ρ = 0.9, σ1 = 0.1, and σ2 = 0.2 as the optimal parameters in step S2.
[0072] The beneficial effects of the present invention are as follows: 1. By introducing a three-dimensional memristive chaotic map, combining the Sin function with discrete memristors, the system exhibits infinitely coexisting attractors and the evolution characteristics from periodicity to hyperchaos. The generated pseudo-random key stream has extremely high complexity and randomness, thus greatly enhancing the anti-attack ability of the encryption system. 2. The exclusive OR operation is used to generate a new plaintext image sequence, and then multiple encryption means such as hash functions, cyclic displacement, and random scrambling are combined to ensure the secure transmission of multi-image data during the scrambling and diffusion processes, which is suitable for the fast encryption application of large-scale data. 3. This encryption method not only has strong anti-attack ability and excellent encryption performance, but also can adapt to the requirements of various actual scenarios, providing a new and reliable technical solution for the secure transmission of image data. For the above reasons, the present invention can be widely promoted in the fields of communication, cryptography, information, etc.
[0073] The multi-image encryption method based on three-dimensional memristive chaotic mapping proposed by the present invention not only improves the encryption speed and efficiency, but also has strong differential attack resistance and statistical analysis resistance, so that the image data transmitted even in a public network environment can be fully protected. It not only provides a solid defense line for image data transmission, but also opens up new ideas and directions for information encryption in the future on a large scale and in multiple scenarios. Generally speaking, the multi-image encryption algorithm proposed by the present invention is of crucial importance in ensuring data privacy, enhancing security, and meeting the processing of massive data, and plays an irreplaceable role in promoting the development of modern network security technology. Brief Description of the Drawings
[0074] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0075] Figure 2 It is a schematic diagram of the compression hysteresis curve formed by the three-dimensional discrete memristor of the present invention under the periodic signal i = Asin(ωt);
[0076] Figure 3 It is a schematic diagram of the attractor analysis of the three-dimensional discrete memristor of the present invention;
[0077] Figure 4 It is a schematic diagram of the coexisting attractor analysis of the three-dimensional discrete memristor of the present invention;
[0078] Figure 5 It is a schematic diagram of the visual analysis of the encryption process of the present invention. Detailed Embodiments
[0079] Example 1:
[0080] A multi-image encryption method based on three-dimensional memristive chaotic mapping includes:
[0081] S1: Based on the non - linear characteristics of memristors, establish a discrete mathematical model. By selecting appropriate control parameters, make the memristor model have complex non - linear responses, laying a foundation for the construction of subsequent chaotic systems;
[0082] The established mathematical model of the discrete memristor has the formula:
[0083]
[0084] where, v n and i n respectively represent the voltage and current at time n, q n and q n+1 respectively represent the internal charge amounts at times n and n + 1; σ1, σ2, ρ are the parameters of the discrete memristor. To verify whether the above equation conforms to the characteristics of the memristor, assume that the driving current in the memristor is i = Asin(ωt), where A and ω are the parameters of the driving current. Set the internal parameters of the memristor as ρ = 0.9, σ1 = 0.1, and σ2 = 0.2. Then the relationship curve between the input current i n and the output voltage v n is as shown in Figure 2 The relationship curve between voltage and current in Figure 2 shows a smooth figure - eight compressed at the origin and has a hysteresis characteristic, which is consistent with the expected characteristics of the memristor;
[0085] S2: Based on the discrete memristor model, design a three - dimensional non - linear chaotic map containing memristive characteristics. The specific mathematical equation of the three - dimensional memristive chaotic map is:
[0086]
[0087] where, z n represents the charge q n , x n and y n respectively represent the currents in two branches of the circuit. The parameters η, k, and ε represent the characteristic parameters of the memristor, while σ1, σ2, ρ are the control parameters of the three - dimensional memristive chaotic map; The three - dimensional memristive chaotic map is designed based on the discrete memristor model. Therefore, the parameters of the discrete memristor model are also the parameters of the three - dimensional memristive chaotic map;
[0088] S3: Analyze the attractor of the three - dimensional memristive chaotic map and verify its chaotic behavior;
[0089] The three - dimensional attractor diagram of the three - dimensional memristive chaotic map is as shown in Figure 3As shown, the parameters are set as η = -0.9, k = 2, ε = -5 and η = -0.9, k = 2.1, ε = 4.8. The experimental results show that the attractor has a complex trajectory structure and the system is in a chaotic or hyperchaotic state.
[0090] The coexisting attractor diagram of the three-dimensional memristive chaotic map is as Figure 4 shown. The initial values are set as (x0,y0,z0) = (0.1,0.1,0.1), (x0,y0,z0) = (0.1,0.1,0.1 + π), (x0,y0,z0) = (0.1,0.1,0.1 + 3π), (x0,y0,z0) = (0.1,0.1,0.1 + 5π). The parameters are set as η = -0.9, k = 2, ε = 5 and η = -0.9, k = 2.5, ε = -4.
[0091] The coexisting attractor reflects that multiple different attractors may exist under the same system parameters but different initial conditions. The experimental results show that the system can exhibit different dynamic evolution trajectories under the same parameters, indicating its characteristic of coexisting attractors. This phenomenon is of great significance for fields such as storage, multi-stable system design, and complex signal modulation;
[0092] S4: Combine multiple plaintexts and reconstruct the original plaintext image;
[0093] Input the plaintext images P1, P2, P3, and P4. Starting from the second input plaintext, each new plaintext image is obtained by performing a bitwise exclusive OR (XOR) operation on the current plaintext and the previous plaintext; the new plaintext images are NP1, NP2, NP3, and NP4 respectively, and their calculation formulas are as follows:
[0094]
[0095] Connect the new plaintext images NP1, NP2, NP3, and NP4 in sequence to obtain the final plaintext NP, and its arrangement is as follows:
[0096]
[0097] S5: Generate the secret key of the cryptosystem using a hash function;
[0098] S5-1: Input the new plaintext image (NP) as the input of the hash function.
[0099] S5-2: The hash function generates the initial key of the encryption system and converts it into 16 16-bit secret keys. The formula is:
[0100] H = HASH256(NP), H = reshape(H,16,16)
[0101] Among them, HASH256 is the hash 256 function, and the role of reshape is to transform H into a 16×16 matrix;
[0102] S5-3: Convert each part of H into a decimal number and initialize it to a decimal number between 0 and 1 as the parameter and initial value of the Logistic map;
[0103] BB(i) = bin2dec(B(i,:)), i = 1 - 16
[0104]
[0105] Among them, bin2dec is to convert binary to decimal. mod is the remainder function. BB represents the binary B converted to decimal BB, and i represents the i-th element of BB.
[0106] S5-4: Set the initial value of the Logistic map, where K1(1) = BB1, K2(1) = BB2, K3(1) = BB3, K4(1) = BB4, and iterate 50 times to generate a new key:
[0107]
[0108]
[0109] Among them, K1, K2, K3, and K4 represent four arrays, which are generated by iterating through four formulas. r represents the iteration process. For example, K1(r) represents the r-th element in K1;
[0110] S5-5: Calculate the initial values (NK1, NK2, NK3) and parameters (NK2, NK3, NK4) of the three-dimensional memristive chaotic map:
[0111]
[0112] S6: Based on the three-dimensional memristive chaotic map designed in step S2, use the key generated in step S5 as the initial value and parameter, and iterate to run the map to generate a pseudo-random sequence;
[0113] When encrypting a large amount of image information, a large amount of key streams need to be generated; therefore, a three-dimensional memristive chaotic map is used to generate the key stream, and the formula is:
[0114]
[0115] Among them, x1 = NK1, y1 = NK2, z1 = NK3, η = NK4, k = NK3, ε = NK2;
[0116] Further generate the key streams PERA, PERB, PERC, and PERD for scrambling, and the key streams PERE and PERF for diffusion, and the calculations are as follows:
[0117]
[0118] where sort is the sorting function, and the size of NP is npa×npb; it should be noted that in order to obtain a sufficiently random key stream, the results of the first 100 iterations are truncated, and the subsequent iteration sequence is used as the key stream for the cryptosystem;
[0119] S7: Scramble the plaintext using the key stream to change the spatial distribution of the image
[0120] S7-1: Input NP, PERA, PERB, PERC, and PERD
[0121] S7-2: Traverse the variable i from 1 to npb, and execute: Rearrange NP according to the index specified by PERD to generate SNPA, and the formula is:
[0122] SNPA(:,PERD(i))←NP(:,i)
[0123] S7-3: Traverse the variable i from 1 to npb, and execute: Perform circshift (circular shift) on the i-th column of SNPA, and the shift amount is controlled by PERB(i) to generate SNPB, and the formula is:
[0124] SNPB(:,i)←circshift(SNPA(:,i),PERB(i))
[0125] S7-4: Traverse the variable i from 1 to npa, and execute: Rearrange the rows of SNPB, and the index is determined by PERA to generate SNPC, and the formula is:
[0126] SNPC(PERA(i),:)←SNPB(i,:)
[0127] S7-4: Traverse the variable i from 1 to npa, and execute: Perform circshift (circular shift) on the i-th row of SNPC, and the shift amount is controlled by PERC(i) to generate SNPD, and the formula is:
[0128] SNPD(i,:)←circshift(SNPC(i,:),PERC(i))
[0129] S8: Diffuse the scrambled image using the key stream to make the encrypted image have good uniformity;
[0130] Adopt a two-way diffusion strategy to fully disrupt the confused image. First, determine the starting positions of diffusion, namely NPL and NPC, with the formula:
[0131] NPL = mod(floor((NK1 + NK2 + NK3 + NK4) × 10 6 ), npa)
[0132] NPC = mod(floor((NK1 + NK2 + NK3 + NK4) × 10 5 ), npb)
[0133] The two-way diffusion strategy is as follows:
[0134] S8-1: When m = NPL and n = NPC:
[0135] CNPD(NPL, NPC) = mod(PERE(NPL, NPC) + PERF(NPL, NPC) + SNPD(NPL, NPC), 256)
[0136] S8-2: When m = NPL + 1 and n = NPC:
[0137] CNPD(m, NPC) = mod(CNPD(m - 1, NPC) + PERE(m, NPC) + SNPD(m, NPC), 256)
[0138] S8-3: When n = NPC:
[0139] CNPD(m, NPC) = (CNPD(m + 1, NPC) + PERF(m, NPC) + SNPD(m, NPC) + CNPD(m + 2, NPC), 256)
[0140] S8-4: When n = NPC + 1:
[0141] CNPD(:, n) = mod(CNPD(:, n - 1) + PERF(:, n) + PERE(:, n) + SNPD(:, n), 256)
[0142] S8-5: When n = NPC - 1: -1: 1:
[0143] CNPD(:, n) = mod(CNPD(:, n + 1) + PERF(:, n) + CNPD(:, n + 2) + SNPD(:, n), 256)
[0144] Finally, output the ciphertext image CNPD.
[0145] Figure 2China: (a) Frequency dependence characteristic, A = 0.5, q0 = 0.4; (b) Amplitude dependence characteristic, ω = 1.5, q0 = 0.4;
[0146] Figure 3 China: (a) Attractor analysis with parameters η = -0.9, k = 2, ε = -5; (b) Attractor analysis with parameters η = -0.9, k = 2.1, ε = 4.8;
[0147] Figure 4 China: (a) Coexisting attractor analysis with parameters set as η = -0.9, k = 2, ε = -5; (b) Coexisting attractor analysis with parameters set as η = -0.9, k = 2.5, ε = -4;
[0148] Figure 5 China: (a) Original plaintext image; (b) Reconstructed plaintext image; (c) Scrambled image; (d) Ciphertext image; (e) Decrypted image.
[0149] 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 by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A multi-image encryption method based on a three-dimensional memristive chaotic map, characterized in that, Including: S1: Based on the memristor, establish a discrete memristor model, the formula is: Among them, v n and i n respectively represent the voltage and current at time n, q n and q n+1 respectively represent the internal charge amounts at times n and n + 1; σ1, σ2, ρ are the parameters of the discrete memristor; Verify that the above equation conforms to the characteristics of the memristor by setting the drive current in the memristor as \(i = A\sin(\omega t)\), where \(A\) and \(\omega\) are the parameters of the drive current, and setting the internal parameters \(\sigma_1\), \(\sigma_2\), \(\rho\) of the discrete memristor. Then, the relationship curve between the input current \(i\) n and the output voltage \(v\) n shows a smooth figure-eight shape compressed at the origin; S2: On the basis of the discrete memristor model, construct a three-dimensional non-linear chaotic map including memristive characteristics. The mathematical equation of the three-dimensional memristive chaotic map is: Among them, z n represents the charge q n , x n and y n respectively represent the currents of two branches in the circuit. The value ranges of z n , x n , y n are (-50, 50). The parameters η (η ∈ (0, 10)), k (k ∈ (0, 10)) and ε (ε ∈ (0, 10)) represent the characteristic parameters of the memristor. σ1, σ2, ρ are the control parameters of the three-dimensional memristive chaotic map. Set the internal parameters σ1, σ2, ρ of the memristor; S3: Combine multiple plaintext images to reconstruct the original plaintext image; Input plaintext images P1, P2, P3, and P4. Starting from the second input plaintext image, each new plaintext image is obtained by performing a bitwise XOR operation on the current plaintext image and the previous plaintext image. The new plaintext images are NP1, NP2, NP3, and NP4 respectively, and the calculation formulas are as follows: Connect the new plaintext images NP1, NP2, NP3, and NP4 in sequence to obtain the final plaintext image NP, and the arrangement method is as follows: S4: Use a hash function to generate the secret key of the cryptosystem; S4-1: Input the plaintext image NP as the input of the hash function; S4-2: The hash function generates the initial key of the encryption system and converts it into 16 16-bit secret keys. The formula is: H = HASH256(NP), H = reshape(H, 16, 16) Among them, HASH256 is the hash 256 function, and reshape means to deform H into a 16×16 matrix; S4-3: Convert each part of the initial key H into a decimal number and initialize it to a decimal number between 0 and 1 as the parameter and initial value of the Logistic map. The formula is: BB(i) = bin2dec(B(i, :)), i = 1 - 16 Among them, bin2dec means converting binary to decimal, mod means the remainder function, BB means converting binary B to decimal BB, and i means the i-th element of BB; S4-4: Set the initial value of the Logistic map, where K1(1) = BB1, K2(1) = BB2, K3(1) = BB3, K4(1) = BB4, and iterate 50 times to generate a new key. The formula is: Among them, K1, K2, K3, and K4 represent four arrays, which are generated by iterating through four formulas. r represents the iteration process. For example, K1(r) represents the r-th element in K1; S4-5: Calculate the initial values (NK1, NK2, NK3) and parameters (NK2, NK3, NK4) of the three-dimensional memristive chaotic map: Among them, end represents the last element in K1, K2, K3, and K4; S5: Based on the three-dimensional memristive chaotic map designed in step S2, use the secret key generated in step S5 as the initial value and parameter, and iterate to run the map to generate a pseudo-random sequence; When encrypting a large amount of image information, a large amount of key streams need to be generated; therefore, a three-dimensional memristive chaotic map is used to generate the key stream. The formula is: Among them, x1 = NK1, y1 = NK2, z1 = NK3, η = NK4, k = NK3, ε = NK2; Further generate the key streams PERA, PERB, PERC, and PERD for scrambling, and the key streams PERE and PERF for diffusion. The formula is: Among them, sort represents the sorting function, and the size of NP is npa×npb; to obtain a sufficiently random key stream, the results of the first 100 iterations are truncated; S6: Scramble the plaintext using the key stream to change the spatial distribution of the image; S6-1: Input NP, PERA, PERB, PERC, and PERD; S6-2: Traverse the variable i from 1 to npb, and perform rearranging NP according to the index specified by PERD to generate the matrix SNPA. The formula is: SNPA(:,PERD(i))←NP(:,i) S6-3: Traverse the variable i from 1 to npb, and perform a circshift circular shift on the i-th column of SNPA, where the shift amount is controlled by PERB(i) to generate the matrix SNPB. The formula is: SNPB(:,i)←circshift(SNPA(:,i),PERB(i)) S6-4: Traverse the variable i from 1 to npa, and perform rearranging the rows of SNPB, where the index is determined by PERA to generate the matrix SNPC. The formula is: SNPC(PERA(i),:)←SNPB(i,:) S6-5: Traverse the variable i from 1 to npa, and perform a circshift circular shift on the i-th row of SNPC, where the shift amount is controlled by PERC(i) to generate the matrix SNPD. The formula is: SNPD(i,:)←circshift(SNPC(i,:),PERC(i)) S7: Diffuse the scrambled image using the key stream; Adopt a two-way diffusion strategy to fully disrupt the confused image, and determine the starting positions of diffusion, namely NPL and NPC. The formula is: NPL = mod(floor((NK1 + NK2 + NK3 + NK4) × 10 6 ), npa) NPC = mod(floor((NK1 + NK2 + NK3 + NK4) × 10 5 ), npb) The two-way diffusion strategy is as follows: S7-1: When m = NPL and n = NPC: CNPD(NPL,NPC)=mod(PERE(NPL,NPC)+PERF(NPL,NPC)+SNPD(NPL,NPC),256) S7-2: When m = NPL + 1 and n = NPC: CNPD(m,NPC)=mod(CNPD(m-1,NPC)+PERE(m,NPC)+SNPD(m,NPC),256) S7-3: When n = NPC: CNPD(m,NPC)=(CNPD(m+1,NPC)+PERF(m,NPC)+SNPD(m,NPC)+CNPD(m+2,NPC),256) S7-4: When n = NPC + 1: CNPD(:,n)=mod(CNPD(:,n-1)+PERF(:,n)+PERE(:,n)+SNPD(:,n),256) S7-5: When n = NPC - 1:-1:1: CNPD(:,n)=mod(CNPD(:,n+1)+PERF(:,n)+CNPD(:,n+2)+SNPD(:,n),256) Output the ciphertext image CNPD.
2. The multi-image encryption method based on a three-dimensional memristive chaotic map according to claim 1, characterized in that In step S1, the parameters of the discrete memristor are set as ρ = 0.9, σ1 = 0.1, and σ2 = 0.2 as the optimal parameters.
3. The multi-image encryption method based on a three-dimensional memristive chaotic map according to claim 1, characterized in that, In step S2, the internal parameters of the memristor are set as ρ = 0.9, σ1 = 0.1, and σ2 = 0.2 as the optimal parameters.