Next Article in Journal
Imperialist Competitive Algorithm with Three Empires for Energy-Efficient Parallel Batch Processing Machine Scheduling with Preventive Maintenance
Next Article in Special Issue
Reinforcement Learning-Guided Particle Swarm Optimization for Multi-Objective Unmanned Aerial Vehicle Path Planning
Previous Article in Journal
Modeling Based on Machine Learning and Synthetic Generated Dataset for the Needs of Multi-Criteria Decision-Making Forensics
Previous Article in Special Issue
An Image Encryption Method Based on a Two-Dimensional Cross-Coupled Chaotic System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Medical Image Encryption Algorithm Based on High-Dimensional Memristor Chaotic System with Extended Josephus-RNA Hybrid Mechanism

1
School of Glasgow, University of Electronic Science and Technology of China, Chengdu 611731, China
2
School of Information and Communication Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
*
Authors to whom correspondence should be addressed.
Symmetry 2025, 17(8), 1255; https://doi.org/10.3390/sym17081255
Submission received: 27 June 2025 / Revised: 26 July 2025 / Accepted: 1 August 2025 / Published: 6 August 2025
(This article belongs to the Special Issue Symmetry in Chaos Theory and Applications)

Abstract

Conventional image encryption schemes struggle to meet the high security demands of medical images due to their large data volume, strong pixel correlation, and structural redundancy. To address these challenges, we propose a grayscale medical image encryption algorithm based on a novel 5-D memristor chaotic system. The algorithm integrates a Symmetric L-type Josephus Spiral Scrambling (SLJSS) module and a Dynamic Codon-based Multi-RNA Diffusion (DCMRD) module to enhance spatial decorrelation and diffusion complexity. Simulation results demonstrate that the proposed method achieves near-ideal entropy (e.g., 7.9992), low correlation (e.g., 0.0043), and high robustness (e.g., NPCR: 99.62%, UACI: 33.45%) with time complexity of O ( 11 M N ) , confirming its effectiveness and efficiency for medical image protection.

1. Introduction

Modern healthcare systems increasingly rely on Electronic Health Records (EHRs), which integrate and transmit medical images as part of patient data management. These images often contain sensitive personal information, exhibit high inter-pixel correlations, and involve large data volumes—especially in grayscale formats. Unauthorized access or misuse can result in serious privacy breaches, highlighting the critical need for secure image transmission to ensure confidentiality, integrity, and privacy [1,2].
Conventional data encryption algorithms such as AES (Advanced Encryption Standard), DES (Data Encryption Standard), and IDEA (International Data Encryption Algorithm) are primarily designed for textual data. These methods encrypt binary representations of digital data streams, but they are often inefficient for medical images due to their high redundancy and large size [3]. To address image-specific security challenges, various alternatives—such as steganography [4], watermarking [5], and image encryption [6]—have been proposed. Among them, image encryption is particularly effective in converting images into noise-like ciphertext, thereby concealing their content during transmission.
Numerous image encryption techniques have been explored, including DNA-based encryption [7,8,9], cellular automata [10], compressive sensing [11], fractional Fourier transforms [12], S-boxes [13], fractal theory [14], neural networks [15], and chaotic systems [6,16,17]. Among these techniques, chaotic systems have shown particular promise due to their inherent features, such as sensitivity to initial conditions, topological transitivity, and unpredictability, which align well with cryptographic principles.
The complexity of a chaotic system directly influences the security of the encryption algorithm. However, when implemented on finite-precision platforms, chaotic systems may suffer from degradation, wherein chaotic behavior deteriorates into periodic or predictable patterns, thereby compromising encryption strength. To overcome this limitation, researchers have explored methods to improve the dynamic complexity and robustness of chaotic systems.
The concept of the memristor was first introduced by Professor Chua in 1971, who theoretically defined it as the fourth fundamental circuit element relating magnetic flux and electric charge [18]. In 2008, researchers at HP Labs fabricated the first physical memristor using titanium dioxide nanomaterials, reigniting global interest in this field [19]. Due to their non-volatility, nanoscale structure, and state-dependent behavior, memristors could be applied in various fields, including encryption algorithms [11,19], secure communications [20], neural networks [21], electrical engineering [22], and artificial intelligence [23].
Recent research has shown that integrating memristors into classical chaotic maps, such as sine maps, Hénon maps, and higher-order systems, can effectively improve the diversity of their dynamic behaviors [21]. By mitigating finite-precision degradation and enhancing system unpredictability, memristor-based chaotic systems provide a more secure foundation for cryptographic applications [19]. For instance, Yu et al. [24] proposed a 5-D memristor exponential hyperchaotic system based on a nonlinear flux-controlled model and demonstrated its feasibility for image encryption. Awais et al. [25] introduced a novel chaotic system constructed from two flux-controlled memristors, exhibiting symmetric bifurcation, multistability, and extreme sensitivity to initial conditions within a 4-D dynamical framework. These works validate the advantages of memristor-based systems in constructing robust chaotic models, though their application to medical image encryption remains underexplored [26].
Since Fridrich’s introduction of the scrambling–diffusion encryption framework using 2-D discrete chaotic maps, this structure has become foundational in image cryptography. In this model, scrambling alters pixel positions, while diffusion modifies pixel values. To enhance encryption performance, researchers have often combined such frameworks with novel chaotic systems [27].
Traditional image scrambling methods include row–column scrambling, Arnold transforms, curve transformations, scan-based traversal, and block scrambling. Despite their structural differences, these methods typically suffer from periodicity, limited randomness, and local effects, especially in some block-based algorithms that ignore inter-block correlation. Due to their non-periodic nature and ease of implementation, Josephus-based scrambling methods have gained attraction. Wang et al. [28] applied Josephus scrambling independently to image rows and columns in three iterative cycles, but the time complexity is relatively high. Guan et al. [29] enhanced the classical Josephus method by replacing removal operations with shift operations and introduced random step sizes from chaotic sequences, while there is still room for improvement in the robustness of the algorithm. Xie et al. [30] proposed block-wise Josephus scrambling based on traversal paths, improving global pixel scrambling, albeit at the cost of inter-block correlation. In addition, the above scrambling algorithms are mostly composed of a single Josephus algorithm, and there is still room for improving the complexity of pixel-point obfuscation.
On the diffusion side, DNA-inspired operations have shown promise due to their large storage capacity, low energy consumption, and fast computation [31,32]. Nevertheless, several limitations have emerged. Liu et al. [33] evaluated a DNA encryption algorithm from [34] and found it deficient in plaintext sensitivity and vulnerable to chosen-plaintext and known-plaintext attacks. Hermassi et al. [35] similarly identified irreversibility and poor resistance to statistical attacks in the DNA-based algorithm from [36]. In contrast to the double-helix structure of DNA, RNA operates as a single-stranded molecule, offering greater flexibility. RNA diffusion algorithms exploit base-pairing rules to form temporary helices and use codons—triplets of nucleotides that translate to amino acids—to enrich diffusion strategies [37]. For instance, Wang et al. [38] proposed a method involving modular RNA operations and random codon replacement. Zhou et al. [39] presented a 2-D hyperchaotic map-based RNA diffusion algorithm. However, current RNA-based methods still suffer from overly simplistic operations, redundant encoding rules, and limited variation in processing modes, reducing their resistance to plaintext attacks. Moreover, the potential of amino acid codon mappings remains underexplored in diffusion design.
Cryptography and cryptanalysis are two interrelated branches of cryptology. While encryption focuses on enhancing confusion, diffusion, and efficiency, cryptanalysis evaluates systems from an adversarial perspective, exposing structural vulnerabilities and key management flaws. Recent studies have identified several common weaknesses in chaos-based image encryption schemes, such as static key streams susceptible to chosen-plaintext attacks, over-reliance on external data, and redundant operations [40,41]. To address these issues, researchers suggest incorporating image-dependent features (e.g., hash values) into key generation, diversifying chaotic sequence usage, streamlining encryption steps, and applying more comprehensive security evaluations.
In summary, medical image encryption faces two fundamental challenges: (1) Due to the large data volume and high inter-pixel correlation inherent in medical images, conventional scrambling techniques often result in localized scrambling, which fails to sufficiently disrupt global structural dependencies—particularly along diagonal directions; and (2) DNA/RNA-based diffusion methods tend to be structurally simplistic, offering limited diffusion strength and involving redundant transformation rules with insufficient computational diversity. In light of these challenges, there is a growing imperative to develop encryption algorithms tailored to the protection of medical images—algorithms that are not only secure and efficient, but also lightweight, image-adaptive, and resource-conscious, with strong diffusion and high key sensitivity.
To address these gaps, this study proposes a novel grayscale medical image encryption algorithm. First, we construct a new high-dimensional memristor chaotic system based on the HP memristor model. Through bifurcation diagrams, Lyapunov exponent diagrams, complexity analysis, and histogram analysis, we demonstrate that the system exhibits broader chaotic ranges, superior ergodicity, and higher dynamic complexity. To enhance resistance against chosen-plaintext and equivalent-key attacks, the system’s initial conditions are derived from the plaintext image’s SHA-256 hash. The resulting chaotic sequences are further diversified and integrated into the following stages of encryption, avoiding static or repetitive use. The scrambling stage employs the SLJSS algorithm, which combines L-shaped decomposition, enhanced Josephus traversal, and spiral reconstruction to disrupt global pixel correlations efficiently with minimal redundancy. The diffusion process is implemented via the DCMRD algorithm, featuring dynamic RNA encoding, codon-level substitution, and multiple RNA operations before final reverse decoding. This structure aims to balance complexity and security while avoiding unnecessary computational overhead. Finally, we perform a comprehensive security evaluation beyond conventional statistical and randomness tests. The results collectively suggest that the proposed algorithm achieves strong key dependence, high diffusion strength, and structural robustness.
The main contributions of this work are as follows:
  • A novel 5-D memristor chaotic system based on the HP model is proposed, offering high complexity and randomness suitable for secure encryption.
  • In the scrambling phase, we introduce the SLJSS algorithm, which follows a symmetric design combining forward and reverse L-type decomposition, improved Josephus scrambling, and non-deterministic spiral reconstruction. This multi-layered strategy ensures low correlation across rows, columns, and diagonals. In the diffusion phase, the DCMRD algorithm is proposed to combine codon substitution and RNA base operations. In it, we optimize the operation rules to reduce the repetition and redundancy of the results and propose a multiple base operation model that contains addition, subtraction, XOR, multiplication, and custom base functions, which guarantees the diversity, randomness, and security of the whole encryption process.
  • Simulation results demonstrate that the proposed algorithm achieves high encryption and decryption quality, exhibits strong statistical and differential resistance, and outperforms comparable methods in reducing pixel correlation.
The remainder of this paper is organized as follows. Section 2 details the construction of the proposed memristor chaotic system. Section 3 presents the design principles and process of the encryption algorithm. Section 4 provides simulation results and theoretical analysis regarding security and performance. Section 5 shows the conclusion of this paper.

2. Chaotic System

We have improved the 5-D chaotic system based on HP memristor and constructed a new 5-D memristor chaotic system. This section explains the idea and method of system improvement in detail, and analyzes the chaos, traversal, and randomness of the new system by phase diagram, bifurcation diagram, maximum Lyapunov exponential diagram, and MPE diagram.

2.1. HP Memristor Model

The physical model of the HP memristor is illustrated in Figure 1. It consists of two layers: a high-resistance T i O 2 thin film and a positively charged, low-resistance T i O 2 x thin film, which lacks some oxygen atoms. When current flows counterclockwise through the device, the boundary between the two materials shifts, increasing the proportion of the T i O 2 x layer and reducing the overall resistance. Conversely, when current flows clockwise, the T i O 2 layer dominates, increasing the resistance. Notably, when the current ceases, the resistance remains unchanged. This memory characteristic underpins its frequent use in enhancing the dynamic behavior of chaotic systems [20].
A general magnetic flux-controlled HP memristor model is expressed as follows [20]:
M ( t ) = R OFF , φ ( t ) < c 1 2 k φ ( t ) + M 2 ( 0 ) , c 1 φ ( t ) < c 2 R ON . φ ( t ) c 2
where
k = ( R ON R OFF ) · μ v · R ON D 2 , c 1 = R OFF 2 M 2 2 k , c 2 = R ON 2 M 2 2 k , φ ( t ) = 0 t M ( t ) · i ( t ) d t
Here, M ( t ) denotes the memristance. w ( t ) is the time-varying thickness of the T i O 2 x film layer, and D is the total thickness of the P t - T i O 2 x - T i O 2 - P t semiconductor film of the memory resistor. The R O F F and R O N correspond to the resistance values when w ( t ) = 0 and w ( t ) = D , respectively. μ V represents the average mobility of oxygen vacancies, and φ ( t ) is the magnetic flux within the memristor.

2.2. 5-D Chaotic System Based on the HP Memristor

We adopt the 5-D chaotic system proposed by Eesa et al. [33] as the baseline model, defined as Equation (3). This system includes three cubic nonlinear product terms, eleven linear terms, and seven system parameters, offering flexibility in integrating the memristor model and a large key space suitable for secure encryption. The inherently complex dynamics of this system also provide a strong foundation for further optimization.
x ˙ = c 1 x + c 1 y , y ˙ = c 2 x + c 2 y + w x z u , z ˙ = c 3 y c 4 z c 5 u + x y u , u ˙ = c 6 u + x y z , w ˙ = c 7 x c 7 y .
Let c i ( 1 i 7 ) be the control parameters, and x ( 1 ) ,   y ( 1 ) ,   z ( 1 ) ,   u ( 1 ) ,   w ( 1 ) the initial conditions that define the phase space trajectories. When c i = [ 30 ,   10 ,   15.7 ,   5 ,   2.5 ,   4.45 ,   38.5 ] , the system exhibits chaotic behavior.
In this work, we construct a new 5-D chaotic system by replacing the y-variable in the fifth differential equation of the original system with the memristor’s magnetic flux φ , resulting in a memristor chaotic system. The state equations of the new system are shown in Equation (4):
x ˙ = c 1 x + c 1 y , y ˙ = c 2 x + c 2 y + w x z u , z ˙ = c 3 y c 4 z c 5 u + x y u , u ˙ = c 6 u + x y z , w ˙ = c 7 x c 7 f ( | y | ) .
Here, f ( · ) is the nonlinear term of the system which satisfies the relationship between magnetic flux and charge:
f ( y ) = y + ( R OFF M ( 0 ) ) 2 2 k R OFF , y < c 1 2 k y + M 2 ( 0 ) M ( 0 ) k , c 1 y < c 2 y + ( R ON M ( 0 ) ) 2 2 k R ON , y c 2
where the y variable in the second deferential equation is the input magnetic flux φ of the memristor. Specifically, its relational equation is deduced from the above Equation (1), with k , c 1 , c 2 , φ parameters satisfying Equation (2).

2.3. Dynamical Analysis of the Chaotic System

To validate the enhanced randomness and complexity of the proposed 5-D memristor chaotic system (Equation (4)), we conduct a comprehensive analysis from five perspectives: attractor phase diagrams, Largest Lyapunov Exponents (LLEs), bifurcation diagrams, sequence complexity, and histogram-based statistical analysis. Notably, the histogram analysis focuses solely on the memristor-based system—used later for image encryption—to evaluate its pseudo-randomness and statistical suitability for secure applications, without comparison to the original system.
It is worth noting that the memristor model adopted in our work is the generic continuous magnetron titanium dioxide model proposed in [20], which has been rigorously demonstrated to exhibit the three fingerprint characteristics of memristors: (i) pinched hysteresis loops, (ii) passivity, and (iii) non-volatility. In particular, the hysteresis loop lobe areas of this model have been shown to monotonically decrease with increasing sinusoidal signal frequency, eventually collapsing into a single-valued function as the frequency tends to infinity. Given that these dynamic properties have been thoroughly validated in the original work, we do not repeat the hysteresis loop plots in this paper.

2.3.1. Attractor Phase Diagrams

R O F F = 20   k Ω ,   R O N = 0.1   k Ω are the maximum and minimum values of the memristor resistance, respectively, M ( 0 ) = 1.6 × 10 4 k Ω denotes the initial state value of the memristor, μ V = 10 10 cm 2 s 1 V 1 denotes the average mobility of the oxygen vacancies, and D = 10 nm denotes the thickness of the film of the memristor device; the system’s initial values are x ( 1 ) = 0.8 , y ( 1 ) = 4.9 , z ( 1 ) = 7.6 , u ( 1 ) = 3.7 , w ( 1 ) = 6.5 , and the control parameter values of the system are c i = [ 30 , 10 , 15.7 , 5 , 2.5 , 4.45 , 38.5 ] . These parameters are used consistently in subsequent simulations.
The attractor phase diagrams of both systems, simulated using a fourth-order Runge–Kutta method, are presented in Figure 2. On the plane, both systems exhibit double-scroll attractor structures with similar spatial distributions—centered around the scroll cores and diffusing outward—indicating that our modified system retains the core attractor structure of the original system.

2.3.2. Bifurcation Diagrams

Bifurcation diagrams provide intuitive insights into how dynamical behavior changes with variations in control parameters [42,43]. As parameter c 1 varies over [20, 80], Figure 3a shows that the original system exhibits periodic behavior when c 1 < 23 or c 1 > 63 , and chaotic behavior when c 1 [ 23 , 63 ] . Figure 3b illustrates that the memristor system has a narrower periodic window and a significantly expanded chaotic range, suggesting improved complexity.

2.3.3. LLE and MPE

The Lyapunov exponent (LE) quantitatively characterizes how system trajectories diverge over time, with a positive maximum LE indicating chaos. Multi-scale Permutation Entropy (MPE), ranging between 0 and 1, assesses the complexity and nonlinearity of time series. Higher values of both LLE and MPE indicate greater system randomness and unpredictability [44].
As shown in Figure 4, when c 1 23 , the original system’s LLE1 is significantly lower than the memristor system’s LLE2. Furthermore, as c 1 [ 60 , 80 ] , LLE1 approaches zero in the original system, while LLE2 in the memristor system remains near 1, indicating continued chaotic behavior—consistent with the bifurcation results.
Similarly, MPE exhibits trends aligned with LLE. For c 1 [ 20 , 80 ] , the average MPE2 of the memristor system is 0.81, compared to 0.75 for MPE1 in the original system. Particularly in c 1 [ 20 , 23 ] [ 60 , 80 ] , MPE2 significantly exceeds MPE1. These results confirm that integrating the HP memristor enhances both the chaotic degree and the complexity of the original system.

2.3.4. Statistical Histogram Analysis

To further demonstrate the statistical complexity and pseudo-random behavior of the proposed 5-D memristor chaotic system, we performed both one-dimensional and two-dimensional histogram analyses based on the system’s state variable trajectories.
One-dimensional histograms: Figure 5 displays the PDFs (Probability Density Functions) of the five state variables ( x , y , z , u , w ) , computed from the last half of a simulated trajectory with a time step h = 0.0005 and a total duration of N = 100,000 points. The histograms exhibit broad, irregular, and non-Gaussian distributions, which reflect the system’s strong nonlinearity, high complexity, and ergodicity. Notably, the variable u exhibits a bimodal shape, while w displays multimodal behavior, attributed to the nonlinear memory dynamics of the memristor model. These statistical features support the system’s suitability for secure cryptographic applications.
Two-dimensional histogram: To further assess joint statistical properties and inter-variable independence, we computed a 2-D histogram for the variables ( x , u ) , as shown in Figure 6. The vertical axis (z-axis) indicates the number of samples (i.e., Counts) that fall into each bin defined by the ( x , u ) plane, representing the empirical joint probability density. The resulting distribution is dense, patternless, and well spread across the phase space, indicating strong statistical decorrelation between variables. This supports the system’s high-dimensional pseudo-randomness and good space-filling behavior—properties that are desirable for cryptographic key stream generation.

3. Proposed Encryption Algorithm

This section introduces a novel encryption algorithm for grayscale medical images of arbitrary size, based on the 5-D memristor chaotic system. The scrambling phase utilizes the SLJSS algorithm, while the diffusion phase employs the DCMRD algorithm. The algorithm achieves efficient encryption without requiring multiple iterative rounds and guarantees lossless recovery of the encrypted image.
Assume the plaintext image I has dimensions m × n . The overall encryption process is summarized as follows and each step would be described in details in sub-sections:
Step 1:
Input the plaintext image I and key. As described in Section 3.1, compute the initial value using the SHA-256 hash of image-derived values. Perform a series of operations to obtain the initial conditions and parameters for the chaotic system.
Step 2:
As detailed in Section 3.2, a series of operations are performed on the chaotic system to obtain pseudo-random sequences referred to as the Key Sequence.
Step 3:
According to Section 3.3, perform symmetric L-type decomposition, Josephus scrambling, and spiral sequence reconstruction on I, yielding the scrambled matrix P 2 .
Step 4:
As shown in Section 3.4, apply RNA dynamic encoding, codon substitution, multi-base operations, and RNA decoding to P 2 , producing the final ciphertext Encrypted Image.
A flowchart summarizing the full encryption process is provided in Figure 7.

3.1. Generation of the Initial Values of Chaotic System

In chaos-based encryption systems, the security and sensitivity of the algorithm are closely tied to the choice of the chaotic system’s initial values and control parameters. While the control parameters are defined by the secret key ( c i , 1 i 7 ), the initial values must be dynamically linked to the plaintext image to resist chosen-plaintext and known-plaintext attacks.
To achieve this coupling, the cryptographic SHA-256 hash function is employed. Thanks to its irreversibility and strong avalanche effect, even a single-bit change in the input leads to a completely different hash output. Compared with lighter hash functions such as MD5, SHA-256 provides higher resistance to collision and preimage attacks, making it a more suitable choice for high-security scenarios like medical image encryption. This design ensures that any variation in the plaintext image will result in a different chaotic trajectory, thereby significantly enhancing the encryption algorithm’s plaintext sensitivity and security strength [45].
The construction process is as follows: the input image is first processed to extract statistical features in three directions—row, column, and diagonal—yielding three summation vectors: SumRow, SumCol, and SumDiag. These are individually hashed and then combined to generate a decimal key vector K e y D e c = k 1 , k 2 , , k 32 as follows:
KeyDec = SHA 256 SHA 256 ( SumRow ) , SHA 256 ( SumCol ) , SHA 256 ( SumDiag ) , KeyFeature = j = 0 7 i = 1 4 k 4 j + i mod 256 .
To further enhance randomness, a key feature value K e y F e a t u r e is computed using modular sums of XOR combinations. This value is then used to perturb each initial state, ensuring their dependence on the plaintext.
The initial values of the chaotic system’s five state variables x ( 1 ) , y ( 1 ) , z ( 1 ) , u ( 1 ) , w ( 1 ) and the transient iteration count h are calculated as follows:
x ( 1 ) = k 1 k 2 k 3 k 4 k 5 k 6 KeyFeature 256 , y ( 1 ) = k 7 k 8 k 9 k 10 k 11 k 12 KeyFeature 256 , z ( 1 ) = k 13 k 14 k 15 k 16 k 17 k 18 KeyFeature 256 , u ( 1 ) = k 19 k 20 k 21 k 22 k 23 k 24 KeyFeature 256 , w ( 1 ) = k 25 k 26 k 27 k 28 k 29 k 30 KeyFeature 256 , h = k 31 + k 32 .
This approach ensures that the chaotic initial conditions are uniquely tied to the plaintext image, providing strong one-time randomness and enhancing the encryption system’s ability to withstand differential and statistical attacks. The complete process is illustrated in Algorithm 1.
Algorithm 1: Key Generation
Input: Plain Image I
Output: x ( 1 ) , y ( 1 ) , z ( 1 ) , u ( 1 ) , w ( 1 ) , h
1 
x 0
2 
K e y D e c =   S H A 256 ( S H A 256 ( SumRow ) , S H A 256 ( SumCol ) , S H A 256 ( SumDiag ) ) =   { k 1 , k 2 , , k 32 }   K e y F e a t u r e = m o d ( ( k 1 k 2 k 3 k 4 ) + + ( k 29 k 30 k 31 k 32 ) , 256 )
3 
x ( 1 ) = ( k 1 k 2 k 3 k 4 k 5 k 6 K e y F e a t u r e ) / 256
4 
y ( 1 ) = ( k 7 k 8 k 9 k 10 k 11 k 12 K e y F e a t u r e ) / 256
5 
z ( 1 ) = ( k 13 k 14 k 15 k 16 k 17 k 18 K e y F e a t u r e ) / 256
6 
u ( 1 ) = ( k 19 k 20 k 21 k 22 k 23 k 24 K e y F e a t u r e ) / 256
7 
w ( 1 ) = ( k 25 k 26 k 27 k 28 k 29 k 30 K e y F e a t u r e ) / 256
8 
h = k 31 + k 32

3.2. Generation of Key Sequences

In a chaos-based image encryption framework, the core cryptographic operations—such as scrambling and diffusion—require secure and image-dependent pseudo-random sequences to drive nonlinear transformations. Therefore, in this stage, we construct a series of key sequences from the initial conditions and control parameters of the 5-D memristor chaotic system generated in Section 3.1. Since these chaotic states are directly influenced by the plaintext image, the resulting sequences inherit strong plaintext sensitivity, ensuring that even the slightest change in the input image produces a completely different encryption trajectory.
To further enhance unpredictability and mitigate finite-precision degradation during numerical integration, a periodic perturbation mechanism is introduced to the chaotic system. Meanwhile, the generated sequences are mapped to different rule vectors, which are required in downstream modules such as codon transformation, scrambling, and DNA-level diffusion. For ease of control and modular reuse, we apply expansion, rounding, and modulo operations to generate distinct sub-sequences (e.g., C o d e R u l e , C o d o n R u l e , K e y I m a g e , o p R u l e , and O p e r a t i o n ), each serving a dedicated functional role.
The complete generation process is outlined below:
Step 1:
The 5-D memristor chaotic system is initialized with x ( 1 ) , y ( 1 ) , z ( 1 ) , u ( 1 ) , and w ( 1 ) and is numerically integrated using the fourth-order Runge–Kutta method. To eliminate transient behavior and enhance randomness, the first h iterations are discarded. Then, the system is iterated 4 m n times to generate five chaotic sequences: X, Y, Z, U, and W. To suppress dynamical degradation caused by finite-precision computation, a perturbation is added every 2000 iterations using the following equation:
x 0 = x 0 + h × sin ( y 0 ) .
Step 2:
These chaotic sequences are processed to derive the operational rule vectors as follows:
CodeRule = mod ( abs ( floor ( X · 10 12 ) ) , 8 ) + 1 , CodonRule = Y , KeyImage = mod ( abs ( floor ( Z · 10 12 ) ) , 4 ) , opRule = mod ( abs ( floor ( U · 10 12 ) ) , 4 ) + 1 , Operation = mod ( abs ( floor ( W · 10 12 ) ) , 5 ) + 1 .
Step 3:
The first m + n elements of U and the first 2 + 8 ( m + n ) / 2 elements of W are concatenated to form a sequence S.
Step 4:
The first half of S is used to compute scrambling control parameters A 1 , A 2 , A 3 , p 1 , and s o r t 1 :
layer = min ( m , n ) , A 1 = mod ( floor S ( n + m + 1 : n + m + layer ) · 10 12 , layer + 1 , A 2 = mod ( floor S ( n + m + layer + 1 : n + m + 2 · layer ) · 10 12 , 10 + 1 , A 3 = mod ( abs floor S ( n + m + 2 · layer + 1 : n + m + 3 · layer ) · 10 12 , 2 , p 1 = mod ( abs floor S ( n + m + 3 · layer + 1 ) · 10 12 , 4 + 1 , [ , sort 1 ] = sort S ( n + m + 3 · layer + 2 : n + m + 4 · layer + 1 ) .
Step 5:
The second half of S is processed similarly to obtain the parameters B1, B2, B3, p2, and sort2 for the second phase of scrambling.
These carefully constructed key sequences and control parameters serve as the backbone of subsequent encryption stages. Because they are generated from chaotic states that are image-dependent and perturbed periodically, they ensure high sensitivity, strong randomness, and resilience against cryptanalytic attacks. The full generation process is summarized in Algorithm 2.

3.3. Symmetric L-Type Josephus Spiral Scrambling

This section introduces the design rationale and implementation steps of the proposed symmetric L-type Josephus spiral scrambling (SLJSS) algorithm, which is responsible for the spatial permutation of pixel positions.

3.3.1. Design Background and Motivation

Traditional image scrambling methods often rely on row-wise, column-wise, or block-wise operations. While these methods disrupt local correlation, they frequently fail to sufficiently break long-range dependencies—especially diagonals and inter-block patterns—leading to potential cryptanalytic weaknesses. To address this limitation, we propose a multi-dimensional scrambling scheme that integrates the following:
  • L-type stratification, to enable interconnection between row, column, and block regions and avoid local confinement;
  • Extended Josephus permutation, to increase randomness through flexible control of direction, step size, and starting position;
  • Spiral reconstruction, to enhance global reorganization and increase scrambling diversity;
  • Symmetric bidirectional scrambling, to further reduce residual structural patterns.
Algorithm 2: Chaotic Sequence Generation
Input: x0: Initial values, N: sequence length, n: transient length
Output: CodeRule, CodonRule, KeyImage, opRule, Operation, t1, t2, A1–A3, B1–B3, sort1, sort2, p1, p2
      /* Step 1: Solve the chaotic system using RK45 integration*/
  1
[ X , Y , Z , U , W ] RK 45 Func ( x 0 , N , t ) ;
      /* Step 2: Generate primary sequences*/
  2
C o d e R u l e m o d ( a b s ( f l o o r ( X · 10 12 ) ) , 8 ) + 1 ;
  3
C o d o n R u l e Y ;
  4
K e y I m a g e m o d ( a b s ( f l o o r ( Z · 10 12 ) ) , 4 ) ;
  5
o p R u l e m o d ( a b s ( f l o o r ( U · 10 12 ) ) , 4 ) + 1 ;
  6
O p e r a t i o n m o d ( a b s ( f l o o r ( W · 10 12 ) ) , 5 ) ) + 1 ;
      /* Step 3: Construct S sequence*/
  7
t 1 m + n , t 2 2 + 8 · c e i l ( ( m + n ) / 2 x U ( 1 : t 1 ) ; h W ( 1 : t 2 ) ; S [ x , h ] ;
      /* Step 4: Derive scrambling parameters*/
  8
layer ( m , n ) ;
  9
A 1 m o d ( f l o o r ( S ( n + m + 1 : n + m + layer ) · 10 12 ) , layer ) + 1 ;
10 
A 2 m o d ( f l o o r ( S ( n + m + layer + 1 : n + m + 2 · layer ) · 10 12 ) , 10 ) + 1 ;
11 
A 3 m o d ( a b s ( f l o o r ( S ( n + m + 2 · layer + 1 : n + m + 3 · layer ) · 10 12 ) , 2 ) ;
12 
p 1 m o d ( a b s ( f l o o r ( S ( n + m + 3 · layer + 1 ) · 10 12 ) , 4 ) + 1 ;
13 
[ , sort 1 ] sort ( S ( n + m + 3 · layer + 2 : n + m + 4 · layer + 1 ) ) ;
      /* Step 5: Derive reverse parameters*/
14 
B 1 m o d ( f l o o r ( S ( n + m + 4 · layer + 2 : n + m + 5 · layer + 1 ) · 10 12 ) , layer ) + 1 ;
15 
B 2 m o d ( f l o o r ( S ( n + m + 5 · layer + 2 : n + m + 6 · layer + 1 ) · 10 12 ) , 10 ) + 1 ;
16 
B 3 m o d ( a b s ( f l o o r ( S ( n + m + 6 · layer + 2 : n + m + 7 · layer + 1 ) · 10 12 ) , 2 ) ;
17 
p 2 m o d ( a b s ( f l o o r ( S ( n + m + 7 · layer + 2 ) · 10 12 ) , 4 ) + 1 ;
18 
[ , sort 2 ] sort ( S ( n + m + 7 · layer + 3 : n + m + 8 · layer + 2 ) ) ;
Each of these components is carefully selected based on extensive experimental evaluation to maximize scrambling entropy and visual unrecognizability. The sequence and structure of each sub-step are determined through iterative testing and design reasoning, with the aim of avoiding insufficient or over-local scrambling.

3.3.2. Overview of the Josephus Scrambling Principle

The core permutation logic is based on an extended form of the Josephus scrambling algorithm, which originates from the classical Josephus problem. In the classical variant, elements in a circular array are eliminated in a fixed step-size and direction. However, such static behavior results in limited permutation diversity. To overcome this, we define an extended Josephus function:
P = J S ( I , w , v , d ) ,
where I is the original sequence, w + v 1 denotes the starting index, v is the step size, and d indicates the traversal direction (odd d: counterclockwise; even d: clockwise). By dynamically deriving ( w , v , d ) from chaotic sequences, each scrambling operation becomes data-dependent and unpredictable, thereby enhancing security.
As an illustrative example, consider J S ( [ 1 , 2 , 3 , 4 , 5 ] , 2 , 3 , 1 ) . Starting from index 2 + 3 1 = 4 in a clockwise circular array, we eliminate every 3rd element in counterclockwise order: 4 → 1 → 2 → 5 → 3, yielding the permutation [ 4 , 1 , 2 , 5 , 3 ] . A visual demonstration is shown in Figure 8.

3.3.3. Steps of Scrambling

The SLJSS algorithm integrates L-type decomposition, Josephus scrambling, and spiral reconstruction in a symmetric structure (forward and reverse). The following parameters derived from key sequences are used: t 1 , t 2 , A 1 , A 2 , A 3 , B 1 , B 2 , B 3 , s o r t 1 , s o r t 2 , p 1 , p 2 , as well as the plaintext image I. The design flow is as follows:
Step 1:
By means of Equation (12), the column scrambling of the plaintext image I is performed according to the t 1 sequence to achieve the initial randomization of the positions of the boundary and center pixel points to generate intermediate matrix R 1 .
R 1 ( : , i ) = I ( : , t 1 ( i ) ) , i = 1 , 2 , n ,
Step 2:
As illustrated in the upper right corner of Figure 9, the L-shaped stratification process starts from the top of the first column, traversing downward and then rightward to form the first L-shaped sequence (e.g., green region in L 1 ). The starting point then shifts one column to the right, and the process repeats to form the next L-shaped layer, until all elements are covered. This pattern resembles the shape of the letter “L”, hence the name L-shaped stratification.
The L 1 array consisting of k-segment subsequences is first obtained by L-stratification of the R 1 matrix. Then disarrangement is carried out for each subsequence L 1 [ i ] in L 1 , where A 1 [ i ] + A 2 [ i ] 1 determines the position of the beginning of each disarrangement, A 2 [ i ] determines the step size, and A 3 [ i ] determines the direction of each disarrangement, and finally, the R 2 array containing k-segment disarrangement sequences is obtained. The calculation is shown in Equation (13):
k = min ( m , n ) , L 1 = Lsplit ( R 1 , k ) , R 2 = JS ( L 1 , A 1 , A 2 , A 3 ) .
Step 3:
Concatenate the k scrambled sequences in R 2 using s o r t 1 , and reshape the resulting one-dimensional array into an m × n matrix R 3 using one of four spiral reconstruction paths determined by p 1 { 1 , 2 , 3 , 4 } . The four paths are defined as follows:
  • Pattern 1: Start from the top-left corner and traverse the matrix in a clockwise spiral.
  • Pattern 2: Start from the top-right corner and traverse the matrix in a counterclockwise spiral.
  • Pattern 3: Start from the bottom-left corner and traverse the matrix in a counterclockwise spiral.
  • Pattern 4: Start from the bottom-right corner and traverse the matrix in a clockwise spiral.
These diversified splicing patterns enhance the diffusion and randomness of pixel positions in the final matrix.
Step 4:
Through Equation (14), the R 3 matrix is row transformed according to the t 2 sequence, which further realizes the adjustment of the boundary and center pixel positions to obtain the R 4 matrix.
R 4 ( j , : ) = R 3 ( t 2 ( j ) , : ) , j = 1 , 2 , , m ,
Step 5:
Like step 2, apply reverse L-type decomposition to R 4 , yielding sub-sequences L 2 . Each sub-sequence L 2 [ i ] is scrambled using B 1 [ i ] , B 2 [ i ] , B 3 [ i ] , producing array P 5 .
Step 6:
Like step 3, assemble R 5 using s o r t 2 , and apply spiral reconstruction (determined by p 2 ) to form the final scrambled matrix P 2 .
The complete SLJSS scrambling pipeline is summarized in Algorithm 3. A visualization of each step is shown in Figure 9, using a 4 × 6 grayscale image. The resulting scrambled image demonstrates significant structural obfuscation across rows, columns, and diagonals.
Figure 9. Explanation of the scrambling principle.
Figure 9. Explanation of the scrambling principle.
Symmetry 17 01255 g009

3.4. Dynamic Codon-Based Multi-RNA Diffusion

To further enhance the sensitivity and complexity of encryption, this section introduces a lightweight yet highly effective diffusion mechanism based on RNA encoding, codon, and arithmetic. Unlike traditional methods that rely solely on numerical diffusion, the proposed strategy leverages bio-inspired structures to achieve high diffusion in a reversible manner.
Algorithm 3: Scrambling Process
Symmetry 17 01255 i001

3.4.1. Design Background and Motivation

The core idea stems from the intrinsic diversity and combinatorial complexity of RNA sequences. RNA bases—A, C, G, and U—allow for compact quaternary encoding of pixel values, while codon structures (triplets of bases) offer a naturally classified replacement framework. Compared with conventional byte-level arithmetic, the RNA-based approach enables flexible base-level diffusion with biologically inspired substitution logic.
From a design standpoint, the codon substitution step draws on the diversity of amino acid categories, allowing for local transformation within the same semantic group, thus ensuring both randomness and reversibility. After extensive testing, the chosen amino acid classification scheme showed superior diffusion performance compared to alternative groupings. In the subsequent RNA arithmetic phase, five types of operations—addition, subtraction, XOR, multiplication, and customized random operations—are employed. These operations are designed not only for reversibility but also for output diversity. Through careful experimentation, the final operation set and their sequences were optimized to achieve maximum encryption strength while minimizing computational overhead.

3.4.2. Overview of the RNA Encryption Principle

In our algorithm, grayscale pixel values are first converted from decimal to quaternary format and then encoded into RNA base sequences using one of eight encoding rules, as outlined in Table 1. For example, a pixel value of 220 in decimal corresponds to 3130 in quaternary. Assuming that the encryption rules are 0-A, 1-C, 2-G, and 3-U, the encryption result is UCUA.
Among the RNA types, mRNA (messenger RNA) is relevant here, as every three consecutive bases form a codon, which maps to specific amino acids during protein synthesis [37,38]. Theoretically, there are 4 3 = 64 combinations of three neighboring bases, i.e., corresponding to 64 codons. Meanwhile, according to [45], these 64 kinds of codons can correspond six kinds of amino acids, as shown in Table 2. In our codon substitution strategy, each codon in the sequence is first identified by category and then randomly replaced with another codon from the same category to enhance local diffusion.
To reinforce pixel diffusion, the substituted RNA sequences undergo base-level arithmetic. Five operations are defined: addition, subtraction, XOR, multiplication, and a custom randomized operation. These operate under quaternary arithmetic rules and depend on the selected encoding. For instance, when base A (encoded as 00) and C (10) are added, the result varies depending on the encoding rule—demonstrating rule-sensitive behavior and enhancing key sensitivity.
Due to overlap across rule outputs, four distinct rule sets were finalized for addition, subtraction, XOR, and one for multiplication. The custom operation was manually defined to improve base diversity and eliminate bias toward any single nucleotide. All operations are designed to be reversible to ensure lossless decryption.
Figure 10 shows the encryption and decryption implementations of custom randomized computation, in which under the encryption rule, base1 represents the base from the encrypted image, base2 represents the base with which the RNA operation is performed, and Result is the result of the operation; under the decryption rule, base1 represents the base from the ciphertext image, and base2 is the same as that used in the ciphertext rule, and Result represents base1 in the ciphertext rule, e.g., A encrypts with A to get C, and C decrypts with A to get A. A complete list of the five computation rules is in Figure 11.

3.4.3. Steps of Diffusion

Scrambling completes the rearrangement of pixel positions in the image; after that, we will apply diffusion operation to the disordered image to change the pixel values of different pixels to realize the effect of diffusing the small changes in the plaintext to the whole ciphertext. In this section, we will use the C o d e R u l e , C o d o n R u l e , K e y I m a g e , o p R u l e , O p e r a t i o n computed from the key sequence.
Step 1:
Flatten the scrambled matrix P 2 into a 1-D array, convert each pixel from decimal to quaternary, and encode it into a corresponding RNA base using C o d e R u l e . This yields a 1-D RNA base sequence P 3 of length 4 m n .
Step 2:
Divide P 3 into two parts: L P and H P , as shown in Equation (15). Codons are formed from every three bases in H P , which are then categorized using Table 2 and converted to the RNA genetic codon sequence consisting of codon category indexes. Based on C o d o n R u l e , a replacement codon is randomly selected within the same category using Equation (16). The updated sequence H P is then concatenated with L P to produce the full modified RNA base sequence P 4 . For example, one codon composed of three neighboring amino acids in H P is GAA; then it corresponds to negatively charged amino acids, and the genetic codon sequence corresponds to its index of 4. There are four kinds of codons (GAA, GAC, GAG, and GAU) under this kind of amino acids, and the new codon will be obtained by the CodonRule using the Equation (16), assuming that the select codon number obtained is 2, then GAC will be used to replace GAA.
L P = P 3 ( 1 : m n ) H P = P 3 ( m n + 1 : 4 m n )
SelectCodonNumber ( i ) = mod ( abs ( floor ( CodonRule ( i ) × 10 12 ) ) , 28 ) + 1 , if Codon ( i ) = 1 mod ( abs ( floor ( CodonRule ( i ) × 10 12 ) ) , 18 ) + 1 , if Codon ( i ) = 2 mod ( abs ( floor ( CodonRule ( i ) × 10 12 ) ) , 8 ) + 1 , if Codon ( i ) = 3 mod ( abs ( floor ( CodonRule ( i ) × 10 12 ) ) , 4 ) + 1 , if Codon ( i ) = 4 or 6 mod ( abs ( floor ( CodonRule ( i ) × 10 12 ) ) , 2 ) + 1 , if Codon ( i ) = 5
Step 3:
The RNA bases of P 4 will perform RNA operations by one-to-one correspondence with the RNA sequence K e y I m a g e generated by the chaotic system, and the O p e r a t i o n determines the type of operation (addition, subtraction, XOR, multiplication, or customized random operation). Since there are different results when A, C, G, and U represent different values in each operation, the values of A, C, G, and U are determined by the opRule sequence. In short, each base in P 4 is calculated with the corresponding base in the K e y I m a g e according to the set operation type and the value to get a new value, which results in the diffusion matrix P5, as shown in the following equation.
P 5 ( i ) = ADD ( P 4 ( i ) + 1 , KeyImage ( i ) + 1 , opRule ( i ) ) , if Operation ( i ) = 1 SUB ( P 4 ( i ) + 1 , KeyImage ( i ) + 1 , opRule ( i ) ) , if Operation ( i ) = 2 XOR ( P 4 ( i ) + 1 , KeyImage ( i ) + 1 , opRule ( i ) ) , if Operation ( i ) = 3 MUL ( P 4 ( i ) + 1 , KeyImage ( i ) + 1 ) , if Operation ( i ) = 4 RANDOM ( P 4 ( i ) + 1 , KeyImage ( i ) + 1 ) , if Operation ( i ) = 5
Step 4:
In order to simplify the arithmetic process, the diffusion matrix P 5 is decoded into the quadratic matrix P 6 according to A-0, C-1, G-2, and U-3, and finally the quadratic image P 6 is converted into decimal form to obtain the final encrypted image E n c r y p t e d I m a g e .
Algorithm 4 introduces the key steps in the diffusion. R N A e n c o d e ( ) , R N A d e c o d e ( ) can realize the interconversion of quadrature numbers and RNA sequences, D e c 2 Q u a ( ) , Q u a 2 D e c ( ) can realize the interconversion of decimal numbers and quadrature numbers, and the calculation results of A D D ( ) , S U B ( ) , X O R ( ) , M U L ( ) , R A N D O M ( ) are all in accordance with the arithmetic rules shown in Figure 11. Figure 12 visualizes the flow information of the diffusion module.
Algorithm 4: Diffusion Process Based on RNA Operations
Symmetry 17 01255 i002

3.5. Decryption

The proposed encryption algorithm is fully reversible, and the decryption process involves executing the inverse of each encryption step to recover the original plaintext image.
Step 1:
Input the encrypted image E n c r y p t e d I m a g e and key, and calculate the initial values for the chaotic system used in encryption.
Step 2:
Regenerate the chaotic sequences by performing the same iterations described in Section 3.2. This includes the generation of all key sequences used in scrambling and diffusion.
Step 3:
RNA encoding, inverse of multiple base operations, codon inverse substitution, and RNA dynamic decoding are performed sequentially on the E n c r y p t e d I m a g e to eliminate the effect of RNA-level diffusion and to obtain the image matrix P 2 without diffusion effect.
Step 4:
The same spiral sequence deconstruction, inverse Josephs scrambling, and L-type decomposition are sequentially performed on P 2 according to the symmetric structure, and the plaintext image I without scrambling effect can be obtained.
After completing the above steps, the original plaintext image is fully restored without any loss. This demonstrates the proposed algorithm’s reversibility and robustness.

4. Experimental Results and Security Analysis

4.1. Simulation Results

In this section, various types of medical images were used to test the security and effectiveness of the proposed encryption algorithm. The images were mainly sourced from two open-access and publicly available databases: MedPix and COVID-CT [42,46], encompassing CT, X-ray, ultrasound, and COVID-specific images with varying sizes and content. All experiments were conducted using MATLAB R2024a on a 64-bit MacBook Pro with an Apple M4 CPU, 16 GB RAM, 512 GB SSD, and macOS Sequoia 15.2.
As shown in Figure 13, the encrypted images reveal no perceptible visual information about the original plaintext images, while the decrypted images perfectly match the original inputs. This initial observation supports the visual effectiveness of the proposed algorithm.
We further evaluate the algorithm through key security, statistical analysis, information entropy, differential attack resistance, robustness, and time complexity.

4.2. Key Security Analysis

A robust encryption algorithm must offer a sufficiently large key space and exhibit high key sensitivity. When the key space exceeds 2 100 , the system can resist brute-force attacks [21]. In this work, the encrypted image could be decrypted with the secret key including c i ( 1 i 7 ) . Assuming a precision of 10 15 for double-precision values, the total key space is approximately 10 15 × 7 = 10 105 2 349 2 100 , satisfying the required threshold.
In addition, key sensitivity is another important indicator of key security, which means that a small change in the key will bring completely different encryption and decryption results. In order to visually verify the key sensitivity of the encryption algorithm, we apply the component-wise perturbation analysis to rigorously evaluate our algorithm [47]. In details, for each component, a minimal perturbation ( 10 12 ) causes a significant ciphertext difference and the ciphertext differences are calculated to be significant as well, which proves that our algorithm possesses excellent key sensitivity. The result is shown in Figure 14.

4.3. Statistical Analysis

4.3.1. Histogram Analysis

Image histograms visualize the distribution of pixel intensities. An ideal encrypted image should exhibit a uniform histogram that significantly differs from the original. This property helps resist statistical attacks. As shown in Figure 15, the histograms of the encrypted images are uniform and distinct from their plaintext counterparts [21].
To quantitatively assess histogram uniformity, we perform a chi-square ( χ 2 ) test using multiple encrypted outputs. The test enables the comparison of the difference between the actual encrypted image and the expected uniformly distributed histogram, if the chi-square statistic is large, it means that the observed histogram is significantly different from the expected result, and vice versa, it means that the actual result is in accordance with the expected requirements.
The calculation method is as follows:
χ 2 = i = 1 256 ( O i E V ) 2 E V .
where O i is the observed frequency for gray level i, and E V = O / 256 is the expected frequency. With a significance level α = 0.05 and freedom of degree d = 255 , the critical value is χ ( α , d ) 2 = 293.2478 . Table 3 shows the chi-square values of the encrypted image, which are all less than 293, proving that the histogram of the encrypted image meets the requirements [26].

4.3.2. Correlation Analysis

Correlation reflects the relationship between adjacent pixels in an image. In medical images, adjacent pixels tend to be highly similar, so their correlation is usually close to 1 [27]. Effective encryption should significantly reduce this correlation, making them resistant to statistical analysis attacks. We randomly select 5000 pairs of adjacent pixels in horizontal, vertical, and diagonal directions and calculate their correlation using the following equation:
r x y = cov ( x , y ) D ( x ) · D ( y ) , cov ( x , y ) = 1 N i = 1 N ( x i E ( x ) ) ( y i E ( y ) ) , D ( x ) = 1 N i = 1 N ( x i E ( x ) ) 2 , E ( x ) = 1 N i = 1 N x i ,
where N represents the number of pixel pairs selected, x and y are two neighboring pixel values, E ( x ) represents the mean, D ( x ) represents the variance, and c o v ( x , y ) represents the covariance.
Figure 16 illustrates the correlation distribution between adjacent pixels before and after encryption. In subplots (b), (c), (d), (f), (g), and (h), the x-axis denotes the pixel gray value at location ( x , y ) , while the y-axis represents the gray value of neighboring pixels: (b) and (f) correspond to horizontal correlation with ( x , y + 1 ) , (c) and (g) to vertical correlation with ( x + 1 , y ) , and (d) and (h) to diagonal correlation with ( x + 1 , y + 1 ) . As shown, the plaintext image exhibits a strong linear clustering along the diagonal, reflecting high correlation between adjacent pixels. In contrast, the encrypted image shows a nearly uniform and dispersed distribution, indicating the effectiveness of the proposed algorithm in eliminating pixel correlation. Meanwhile, Table 4 quantitatively analyzes the correlation data of the test images. The correlation of all the test images before encryption is close to 1; however, after encryption the correlation decreases to near 0.

4.3.3. Shannon Entropy Analysis

Shannon Entropy quantifies the uncertainty in an image. The closer the entropy is to 8 for 8-bit grayscale images, the better the encryption [27,48]. It is calculated as follows:
H ( m ) = i = 0 2 N 1 p ( m i ) log 2 1 p ( m i ) ,
where N denotes the gray level, and p ( m i ) represents the probability of a pixel having gray level m i .
In addition to global entropy, inspired by the method in [48], we also adopt Local Shannon Entropy (LSE) to further evaluate the randomness and information dispersion within local blocks of the encrypted images.
Table 5 provides both global and local entropy values for the test images. It can be observed that the Shannon entropy of the encrypted images is close to the theoretical maximum, which significantly mitigates the low uncertainty and information leakage issues in the original images.

4.4. Differential Attack Analysis

Differential attack is a common cryptanalysis method that exploits the sensitivity of ciphertext to slight changes in plaintext. A secure image encryption algorithm should ensure that even a 1-bit modification in the plaintext results in significant and unpredictable changes in the ciphertext. This resistance is typically evaluated using two widely accepted metrics: the Number of Pixels Change Rate (NPCR) and the Unified Average Changing Intensity (UACI), calculated as follows [47]:
NPCR = 1 M × N i = 1 M j = 1 N D ( i , j ) × 100 % , UACI = 1 M × N i = 1 M j = 1 N c 1 ( i , j ) c 2 ( i , j ) 255 × 100 % , D ( i , j ) = 0 , if c 1 ( i , j ) = c 2 ( i , j ) , 1 , if c 1 ( i , j ) c 2 ( i , j ) ,
Here, M × N is the image size, and c 1 ( i , j ) , c 2 ( i , j ) represent pixel values at the same location in two ciphertext images whose corresponding plaintexts differ by one bit. Ideally, for 8-bit images, NPCR and UACI are expected to be around 99.6094% and 33.4635%, respectively.
To improve statistical reliability, we repeat each test 50 times and report the averaged results. Table 5 presents the NPCR and UACI values across multiple real-world medical image datasets.
To further enhance the rigor of evaluation, we compare our algorithm’s NPCR and UACI scores with the theoretical critical values proposed in [48], as shown in Table 6. For instance, at the 0.05 significance level, the critical value of NPCR for a 256 × 256 image is 99.5693%, and the acceptable UACI range is [33.2824%, 33.6447%]. Our algorithm’s performance consistently meets or exceeds these thresholds, demonstrating statistically significant resistance to differential attacks.
In summary, both empirical evaluations and statistical significance tests confirm that the proposed algorithm exhibits strong robustness against differential attacks, with stable performance across different image types and resolutions.

4.5. Robustness Analysis

In the security analysis of image encryption algorithms, robustness analysis is an important part. When the attacker cannot decipher the target image, he will hinder the transmission of information by interfering with the image content. Robustness, on the other hand, refers to the ability of an encryption algorithm to maintain the security integrity of critical information in the face of various image cuts, distortions, scrambling, tampering, and other common problems in network transmission [21]. Here, we will verify whether the algorithm has good robustness by simulating noise interference as well as partial information loss on encrypted images and analyzing whether it can recover the key parts of the original image. Figure 17a–d show the test results when 10% and 30% pretzel noise is applied to the encrypted image, which illustrates that even with the noise up to 30%, the key information in the original data can still be restored. Figure 18a–d shows the simulation results with different degrees of image loss, and it can be observed that when the encrypted image is sliced by 25% or even 50%, the key information of the original image can still be recognized after decryption. The above analysis shows that the algorithm has good robustness and high resistance to cropping attacks and noise attacks.

4.6. Time Complexity Analysis

In addition to the evaluation of security performance, the time complexity of an encryption algorithm is likewise a key metric for considering the feasibility of the algorithm. It is worth mentioning that many researchers also choose encryption time and decryption time as a quantitative index to measure the time effectiveness of the algorithm [11]. However, considering the diversity of hardware and software platforms, the way of code writing and the selection of encrypted image content, etc., all of which affect the specific running time of the algorithms, it is difficult to ensure that we can compare the differences in time consumed from the strict consistency conditions. However, this thesis still calculates the encryption and decryption times for graphics of different sizes as a reference, and Table 7 shows the corresponding results.
Besides that, we will focus on analyzing the time efficiency by relying only on the time complexity of the algorithm itself. The main operations of this encryption algorithm include chaotic sequence generation, L-shaped hierarchical Josephus scrambling, and image diffusion based on RNA operations. First, we assume that the size of the test image is m × n ; in the chaotic sequence generation phase, the memristor chaotic system requires 4 m n iterations; in the scrambling phase, the main computational consumption occurs in the hierarchical scrambling and ranks replacement, respectively, with a time complexity of 2 m n + m + n ; and in the diffusion phase, the time complexity of the codon substitution and the RNA operation are m n and 4 m n , respectively. In summary, the algorithm’s total time complexity is 4 m n + 2 m n + m + n + m n + 4 m n 11 m n . Table 8 shows that our algorithm has low computational complexity by comparing with [3,46,49].

4.7. Comparative Performance Analysis

In this section, we will comprehensively compare the performance metrics of various advanced encryption algorithms. Considering the differences in the test images of different medical image encryption algorithms, we choose to use the most popular 512 × 512 Lena grayscale image as the test object for comparison and analysis. Table 9 lists the relevant data of different algorithms’ encryption performance metrics, including the correlation, the information entropy, the NPCR, the UACI, and the size of the key space used for the analysis of differential attacks. It can be observed that, compared with other algorithms, the ciphertext image generated by our algorithm exhibits lower correlation, which demonstrates a notable improvement in security. Furthermore, the NPCR value is close to the theoretical value (99.6094%), and the UACI value is also close to its theoretical ideal (33.4635%). Although the information entropy and key space are weakly different compared to other algorithms, their data can still be considered as reasonable values close to the ideal results. In summary, the superiority and feasibility of our proposed encryption algorithm are further verified.

5. Conclusions

This paper presents a secure and efficient grayscale medical image encryption algorithm tailored to the characteristics of medical images, such as large data volume, high inter-pixel correlation, and strong structural redundancy.
The proposed framework integrates a high-dimensional 5-D memristor chaotic system with two specialized modules: Symmetric L-type Josephus Spiral Scrambling (SLJSS) and Dynamic Codon-based Multi-RNA Diffusion (DCMRD). The chaotic system, based on the HP memristor model, generates highly sensitive and ergodic sequences, as confirmed by bifurcation diagrams, Lyapunov exponents, and histogram analysis. SLJSS ensures global and diagonal pixel decorrelation through hierarchical L-shaped partitioning and symmetric spiral scrambling, while DCMRD enhances diffusion through codon substitution and multi-rule RNA operations.
Simulation results demonstrate that the proposed method achieves near-ideal entropy (e.g., 7.9992), low pixel correlation (e.g., 0.0043), strong robustness (NPCR: 99.62%, UACI: 33.45%), and fast processing time (e.g., 0.0964 s encryption for 256 × 256 images). The algorithm exhibits strong resistance to statistical and differential attacks and shows stable performance across medical and natural image datasets, validating its general applicability.
In conclusion, the proposed method offers a lightweight, high-security solution for medical image protection, with potential applications in telemedicine, image archiving, and privacy-preserving diagnostics. Future work will explore hardware acceleration, adaptation to 3-D or multi-modal medical images, and integration with compression–encryption and federated learning frameworks.

Author Contributions

Conceptualization, X.X. and T.Z.; methodology, Y.W., Y.L. and T.Z.; software, Y.W., Y.L. and Z.Y.; validation, Y.W., Y.L. and Z.Y.; formal analysis, Y.W. and T.Z.; investigation, Y.W. and Z.Y.; resources, T.Z. and X.X.; data curation, Y.W. and Y.L.; writing—original draft preparation, Y.W.; writing—review and editing, T.Z. and X.X.; visualization, Y.W. and Z.Y.; supervision, T.Z. and X.X.; project administration, T.Z. and X.X.; funding acquisition, X.X. and T.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the Fundamental Research Funds of Central Universities (grant no. 2672018ZYGX2018J009), and the Qianyuan laboratory.

Data Availability Statement

Data will be available from the author and will be shared on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Wang, X.; Wang, Y. Multiple medical image encryption algorithm based on scrambling of region of interest and diffusion of odd-even interleaved points. Expert Syst. Appl. 2023, 213, 118924. [Google Scholar] [CrossRef]
  2. Lai, Q.; Hu, G.; Erkan, U.; Toktas, A. High-efficiency medical image encryption method based on 2D Logistic-Gaussian hyperchaotic map. Appl. Math. Comput. 2023, 442, 127738. [Google Scholar] [CrossRef]
  3. Li, M.; Wang, M.; Fan, H.; An, K.; Liu, G. A novel plaintext-related chaotic image encryption scheme with no additional plaintext information. Chaos Solitons Fractals 2022, 158, 111989. [Google Scholar] [CrossRef]
  4. Liao, X.; Yu, Y.; Li, B.; Li, Z.; Qin, Z. A new payload partition strategy in color image steganography. IEEE Trans. Circuits Syst. Video Technol. 2019, 30, 685–696. [Google Scholar] [CrossRef]
  5. Ye, G.; Wu, H.; Liu, M.; Shi, Y. Image encryption scheme based on blind signature and an improved Lorenz system. Expert Syst. Appl. 2022, 205, 117709. [Google Scholar] [CrossRef]
  6. Zhang, B.; Liu, L. Chaos-based image encryption: Review, application, and challenges. Mathematics 2023, 11, 2585. [Google Scholar] [CrossRef]
  7. Yang, C.; Taralova, I.; El Assad, S.; Loiseau, J.J. Image encryption based on fractional chaotic pseudo-random number generator and DNA encryption method. Nonlinear Dyn. 2022, 109, 2103–2127. [Google Scholar] [CrossRef]
  8. Ahmed, F.; Rehman, M.U.; Ahmad, J.; Khan, M.S.; Boulila, W.; Srivastava, G.; Lin, J.C.W.; Buchanan, W.J. A DNA based colour image encryption scheme using a convolutional autoencoder. Acm Trans. Multimed. Comput. Commun. Appl. 2023, 19, 1–21. [Google Scholar] [CrossRef]
  9. Zhao, L.; Zhao, L.; Cui, F.; Sun, T. Satellite image encryption based on RNA and 7D complex chaotic system. Vis. Comput. 2024, 40, 5659–5679. [Google Scholar] [CrossRef]
  10. Ping, P.; Wu, J.; Mao, Y.; Xu, F.; Fan, J. Design of image cipher using life-like cellular automata and chaotic map. Signal Process. 2018, 150, 233–247. [Google Scholar] [CrossRef]
  11. Zheng, H.; Li, G.; Xu, W.; Zhong, H.; Xu, X. A compressive sensing encryption scheme for dual color images based on discrete memristor map and Rubik’s cube scramble. Optik 2023, 286, 170991. [Google Scholar] [CrossRef]
  12. Wu, W.; Wang, Q. Block image encryption based on chaotic map and fractional fourier transformation. Multimed. Tools Appl. 2023, 82, 10367–10395. [Google Scholar] [CrossRef]
  13. Zhu, S.; Deng, X.; Zhang, W.; Zhu, C. Secure image encryption scheme based on a new robust chaotic map and strong S-box. Math. Comput. Simul. 2023, 207, 322–346. [Google Scholar] [CrossRef]
  14. Zhang, T.; Zhao, Y.; Xu, X.; Wu, S.; Gu, Y. Solution and dynamics analysis of fractal-fractional multi-scroll Chen chaotic system based on Adomain decomposition method. Chaos Solitons Fractals 2024, 178, 114268. [Google Scholar] [CrossRef]
  15. Feng, L.; Du, J.; Fu, C.; Song, W. Image encryption algorithm combining chaotic image encryption and convolutional neural network. Electronics 2023, 12, 3455. [Google Scholar] [CrossRef]
  16. Alexan, W.; Elkandoz, M.; Mashaly, M.; Azab, E.; Aboshousha, A. Color image encryption through chaos and kaa map. IEEE Access 2023, 11, 11541–11554. [Google Scholar] [CrossRef]
  17. Pankaj, S.; Dua, M. Chaos based Medical Image Encryption Techniques: A Comprehensive Review and Analysis. Inf. Secur. J. Glob. Perspect. 2024, 33, 332–358. [Google Scholar] [CrossRef]
  18. Li, C.; Zhang, Y.; Li, H.; Zhou, Y. Visual image encryption scheme based on inter-intra-block scrambling and weighted diffusion. Vis. Comput. 2024, 40, 731–746. [Google Scholar] [CrossRef]
  19. Dai, W.; Xu, X.; Song, X.; Li, G. Audio encryption algorithm based on chen memristor chaotic system. Symmetry 2021, 14, 17. [Google Scholar] [CrossRef]
  20. Xu, X.; Zhang, T.; Zhao, Y.; Dai, W.; Wu, S.; Li, G. Application of Two General Memristor Models in Chaotic Systems. In Memristors-The Fourth Fundamental Circuit Element-Theory, Device, and Applications; IntechOpen: London, UK, 2023. [Google Scholar]
  21. Qian, K.; Xiao, Y.; Wei, Y.; Liu, D.; Wang, Q.; Feng, W. A robust memristor-enhanced polynomial hyper-chaotic map and its multi-channel image encryption application. Micromachines 2023, 14, 2090. [Google Scholar] [CrossRef]
  22. Xiao, P.; Fang, J.; Wei, Z.; Dong, Y.; Du, S.; Wen, S.; Hong, Q. A Riccati Matrix Equation Solver Design Based Neurodynamics Method and Its Application. IEEE Trans. Autom. Sci. Eng. 2025, 22, 15163–15176. [Google Scholar] [CrossRef]
  23. Hong, Q.; Jiang, H.; Xiao, P.; Du, S.; Li, T. A parallel computing scheme utilizing memristor crossbars for fast corner detection and rotation invariance in the ORB algorithm. IEEE Trans. Comput. 2024, 74, 996–1010. [Google Scholar] [CrossRef]
  24. Yu, F.; Liu, L.; Qian, S.; Li, L.; Huang, Y.; Shi, C.; Cai, S.; Wu, X.; Du, S.; Wan, Q. Chaos-Based Application of a Novel Multistable 5D Memristive Hyperchaotic System with Coexisting Multiple Attractors. Complexity 2020, 2020, 8034196. [Google Scholar] [CrossRef]
  25. Khan, A.; Li, C.; Zhang, X.; Cen, X. A two-memristor-based chaotic system with symmetric bifurcation and multistability. Chaos Fractals 2025, 2, 1–7. [Google Scholar] [CrossRef]
  26. Hua, H.; Lai, Q.; Zhang, Y.; Banerjee, S.; Jafari, S. High robustness image encryption scheme utilizing memristive hyperchaotic map and Manhattan distance. Nonlinear Dyn. 2025, 113, 1857–1878. [Google Scholar] [CrossRef]
  27. Li, G.; Xu, X.; Zhong, H. A image encryption algorithm based on coexisting multi-attractors in a spherical chaotic system. Multimed. Tools Appl. 2022, 81, 32005–32031. [Google Scholar] [CrossRef]
  28. Wang, X.; Zhu, X.; Zhang, Y. An image encryption algorithm based on Josephus traversing and mixed chaotic map. IEEE Access 2018, 6, 23733–23746. [Google Scholar] [CrossRef]
  29. Guan, Z.; Li, J.; Huang, L.; Xiong, X.; Liu, Y.; Cai, S. A novel and fast encryption system based on improved Josephus scrambling and chaotic mapping. Entropy 2022, 24, 384. [Google Scholar] [CrossRef]
  30. Xie, H.W.; Gao, Y.J.; Zhang, H. An image encryption algorithm based on novel block scrambling scheme and Josephus sequence generator. Multimed. Tools Appl. 2023, 82, 16431–16453. [Google Scholar] [CrossRef]
  31. Zhu, S.; Deng, X.; Zhang, W.; Zhu, C. Image encryption scheme based on newly designed chaotic map and parallel DNA coding. Mathematics 2023, 11, 231. [Google Scholar] [CrossRef]
  32. Geng, S.; Li, J.; Zhang, X.; Wang, Y. An image encryption algorithm based on improved Hilbert curve scrambling and dynamic DNA coding. Entropy 2023, 25, 1178. [Google Scholar] [CrossRef]
  33. Liu, Y.; Tang, J.; Xie, T. Cryptanalyzing a RGB image encryption algorithm based on DNA encoding and chaos map. Opt. Laser Technol. 2014, 60, 111–115. [Google Scholar] [CrossRef]
  34. Liu, L.; Zhang, Q.; Wei, X. A RGB image encryption algorithm based on DNA encoding and chaos map. Comput. Electr. Eng. 2012, 38, 1240–1248. [Google Scholar] [CrossRef]
  35. Hermassi, H.; Belazi, A.; Rhouma, R.; Belghith, S.M. Security analysis of an image encryption algorithm based on a DNA addition combining with chaotic maps. Multimed. Tools Appl. 2014, 72, 2211–2224. [Google Scholar] [CrossRef]
  36. Zhang, Q.; Guo, L.; Wei, X. Image encryption using DNA addition combining with chaotic maps. Math. Comput. Model. 2010, 52, 2028–2035. [Google Scholar] [CrossRef]
  37. Mahmud, M.; Lee, M.; Choi, J.Y. Evolutionary-based image encryption using RNA codons truth table. Opt. Laser Technol. 2020, 121, 105818. [Google Scholar] [CrossRef]
  38. Wang, X.; Liu, L. Application of chaotic Josephus scrambling and RNA computing in image encryption. Multimed. Tools Appl. 2021, 80, 23337–23358. [Google Scholar] [CrossRef]
  39. Zhou, S.; Wei, Y.; Zhang, Y.; Iu, H.H.C.; Zhang, H. Image encryption algorithm based on the dynamic RNA computing and a new chaotic map. Integration 2025, 101, 102336. [Google Scholar] [CrossRef]
  40. Feng, W.; He, Y.; Li, H.; Li, C. Cryptanalysis and improvement of the image encryption scheme based on 2D logistic-adjusted-sine map. IEEE Access 2019, 7, 12584–12597. [Google Scholar] [CrossRef]
  41. Feng, W.; Qin, Z.; Zhang, J.; Ahmad, M. Cryptanalysis and improvement of the image encryption scheme based on Feistel network and dynamic DNA encoding. IEEE Access 2021, 9, 145459–145470. [Google Scholar] [CrossRef]
  42. Lai, Q.; Liu, Y. A cross-channel color image encryption algorithm using two-dimensional hyperchaotic map. Expert Syst. Appl. 2023, 223, 119923. [Google Scholar] [CrossRef]
  43. Xu, X.L.; Li, G.D.; Dai, W.Y.; Song, X.M. Multi-direction chain and grid chaotic system based on Julia fractal. Fractals 2021, 29, 2150245. [Google Scholar] [CrossRef]
  44. Zhong, H.; Li, G.; Xu, X. A generic voltage-controlled discrete memristor model and its application in chaotic map. Chaos Solitons Fractals 2022, 161, 112389. [Google Scholar] [CrossRef]
  45. Wang, X.; Guan, N. A novel chaotic image encryption algorithm based on extended Zigzag confusion and RNA operation. Opt. Laser Technol. 2020, 131, 106366. [Google Scholar] [CrossRef]
  46. Wang, X.; Guan, N.; Yang, J. Image encryption algorithm with random scrambling based on one-dimensional logistic self-embedding chaotic map. Chaos Solitons Fractals 2021, 150, 111117. [Google Scholar] [CrossRef]
  47. Feng, W.; Zhang, K.; Zhang, J.; Zhao, X.; Chen, Y.; Cai, B.; Zhu, Z.; Wen, H.; Ye, C. Integrating Fractional-Order Hopfield Neural Network with Differentiated Encryption: Achieving High-Performance Privacy Protection for Medical Images. Fractal Fract. 2025, 9, 426. [Google Scholar] [CrossRef]
  48. Wu, Y.; Zhou, Y.; Saveriades, G.; Agaian, S.; Noonan, J.P.; Natarajan, P. Local Shannon entropy measure with statistical tests for image randomness. Inf. Sci. 2013, 222, 323–342. [Google Scholar] [CrossRef]
  49. Liu, W.; Sun, K.; He, Y.; Yu, M. Color image encryption using three-dimensional sine ICMIC modulation map and DNA sequence operations. Int. J. Bifurc. Chaos 2017, 27, 1750171. [Google Scholar] [CrossRef]
  50. Gao, S.; Wu, R.; Wang, X.; Liu, J.; Li, Q.; Wang, C.; Tang, X. Asynchronous updating Boolean network encryption algorithm. IEEE Trans. Circuits Syst. Video Technol. 2023, 33, 4388–4400. [Google Scholar] [CrossRef]
  51. Cun, Q.; Tong, X.; Wang, Z.; Zhang, M. A new chaotic image encryption algorithm based on dynamic DNA coding and RNA computing. Vis. Comput. 2023, 39, 6589–6608. [Google Scholar] [CrossRef]
Figure 1. Schematic of HP memristor.
Figure 1. Schematic of HP memristor.
Symmetry 17 01255 g001
Figure 2. Chaotic attractors in the x-u plane: (a) 5-D chaotic system; (d) 5-D memristor chaotic system; chaotic attractors in the y-z plane: (b) 5-D chaotic system; (e) 5-D memristor chaotic system; chaotic attractors in the y-z-u plane: (c) 5-D chaotic system; (f) 5-D memristor chaotic system.
Figure 2. Chaotic attractors in the x-u plane: (a) 5-D chaotic system; (d) 5-D memristor chaotic system; chaotic attractors in the y-z plane: (b) 5-D chaotic system; (e) 5-D memristor chaotic system; chaotic attractors in the y-z-u plane: (c) 5-D chaotic system; (f) 5-D memristor chaotic system.
Symmetry 17 01255 g002
Figure 3. Bifurcation of the system with c 1 [ 20 , 80 ] : (a) 5-D chaotic system (Equation (3)); (b) 5-D memristor chaotic system (Equation (4)).
Figure 3. Bifurcation of the system with c 1 [ 20 , 80 ] : (a) 5-D chaotic system (Equation (3)); (b) 5-D memristor chaotic system (Equation (4)).
Symmetry 17 01255 g003
Figure 4. Comparison of LLE and MPE for the two systems: 5-D chaotic system (Equation (3)): MPE1, MPE1 mean, and LLE1; 5-D memristor chaotic system (Equation (4)): MPE2, MPE2 mean, and LLE2.
Figure 4. Comparison of LLE and MPE for the two systems: 5-D chaotic system (Equation (3)): MPE1, MPE1 mean, and LLE1; 5-D memristor chaotic system (Equation (4)): MPE2, MPE2 mean, and LLE2.
Symmetry 17 01255 g004
Figure 5. One-dimensional histograms of system state variables x , y , z , u , w , illustrating their statistical diversity and pseudo-randomness.
Figure 5. One-dimensional histograms of system state variables x , y , z , u , w , illustrating their statistical diversity and pseudo-randomness.
Symmetry 17 01255 g005
Figure 6. Two-dimensional histograms of chaotic variables: (a) x vs. u; (b) y vs. w.
Figure 6. Two-dimensional histograms of chaotic variables: (a) x vs. u; (b) y vs. w.
Symmetry 17 01255 g006
Figure 7. Flowchart of encryption.
Figure 7. Flowchart of encryption.
Symmetry 17 01255 g007
Figure 8. Josephus scrambling process.
Figure 8. Josephus scrambling process.
Symmetry 17 01255 g008
Figure 10. Rules for self-designed random computation.
Figure 10. Rules for self-designed random computation.
Symmetry 17 01255 g010
Figure 11. RNA operation rule.
Figure 11. RNA operation rule.
Symmetry 17 01255 g011
Figure 12. Flowchart of the diffusion process.
Figure 12. Flowchart of the diffusion process.
Symmetry 17 01255 g012
Figure 13. Encryption and decryption results. (a,d,g,j) are the plain image of CT-1, Xray-1, Ultrasound, and COVID-00001; (b,e,h,k) are the encrypted images of (a,d,g,j); (c,f,i,l) are the decrypted images of (b,e,h,k), respectively.
Figure 13. Encryption and decryption results. (a,d,g,j) are the plain image of CT-1, Xray-1, Ultrasound, and COVID-00001; (b,e,h,k) are the encrypted images of (a,d,g,j); (c,f,i,l) are the decrypted images of (b,e,h,k), respectively.
Symmetry 17 01255 g013
Figure 14. Component-wise perturbation analysis: (a) CT; (b) encrypted output of (a); (ci) encryption outputs when each key component ( c i ( 1 i 7 ) ) is incremented by 10 12 ; (jp) differences of (ci) between (b).
Figure 14. Component-wise perturbation analysis: (a) CT; (b) encrypted output of (a); (ci) encryption outputs when each key component ( c i ( 1 i 7 ) ) is incremented by 10 12 ; (jp) differences of (ci) between (b).
Symmetry 17 01255 g014
Figure 15. Histograms of images before and after encryption. (ad) CT-2, Xray-2, Ultrasound, and COVID images, respectively. (eh) Histograms of the original images in (ad). (il) Corresponding encrypted images of (ad). (mp) Histograms of the encrypted images in (il).
Figure 15. Histograms of images before and after encryption. (ad) CT-2, Xray-2, Ultrasound, and COVID images, respectively. (eh) Histograms of the original images in (ad). (il) Corresponding encrypted images of (ad). (mp) Histograms of the encrypted images in (il).
Symmetry 17 01255 g015
Figure 16. Correlation coefficients analysis: (a,e) are CT image and its cipher image, respectively. (b,f) are the horizontal correlation. (c,g) are the vertical correlation. (d,h) are the diagonal correlation.
Figure 16. Correlation coefficients analysis: (a,e) are CT image and its cipher image, respectively. (b,f) are the horizontal correlation. (c,g) are the vertical correlation. (d,h) are the diagonal correlation.
Symmetry 17 01255 g016
Figure 17. Salt and pepper noise interference testing: (a) noisy encrypted image with 10%; (b) decrypted image of (a); (c) noisy encrypted image with 30%; (d) decrypted image of (c).
Figure 17. Salt and pepper noise interference testing: (a) noisy encrypted image with 10%; (b) decrypted image of (a); (c) noisy encrypted image with 30%; (d) decrypted image of (c).
Symmetry 17 01255 g017
Figure 18. Data loss testing: (a) encrypted image with 25% data loss; (b) decrypted image of (a); (c): encrypted image with 50% data loss; (d) decrypted image of (c).
Figure 18. Data loss testing: (a) encrypted image with 25% data loss; (b) decrypted image of (a); (c): encrypted image with 50% data loss; (d) decrypted image of (c).
Symmetry 17 01255 g018
Table 1. Encoding and decoding rules of RNA.
Table 1. Encoding and decoding rules of RNA.
BinaryQuaternaryRule 1Rule 2Rule 3Rule 4Rule 5Rule 6Rule 7Rule 8
000-AAAUUCCGG
011-CCGCGAUAU
102-GGCGCUAUA
113-UUUAAGGCC
Note: The binary–quaternary conversion rules are indexed from Rule 1 to Rule 8, where each rule maps quaternary digits to RNA bases.
Table 2. Amino acid sequence generation in RNA.
Table 2. Amino acid sequence generation in RNA.
IndexAmino Acid CategoryRNA CodonsNumber
1Hydrophobic amino acidsUUU, UUA, UUC, UUG, CUA, CUC, CUG, CUU, CCA, CCC, CCG, CCU, GUA, GUC, GUG, GUU, GCA, GCC, GCG, GCU, GGA, GGC, GGG, GGU, AUA, AUC, AUU, UGG28
2Hydrophilic non-charged amino acidsUCA, UCC, UCG, UCU, CAA, CAC, CAG, CAU, ACA, ACC, ACG, ACU, UAU, UAC, AAU, AAC, AGU, AGC18
3Positively charged amino acidsCGA, CGC, CGG, CGU, AAA, AAG, AGA, AGG8
4Negatively charged amino acidsGAA, GAC, GAG, GAU4
5CysteineUGU, UGC2
6Start codon and Stop codonsUAA, UAG, UGA, AUG4
Table 3. Results of χ 2 test for different medical images.
Table 3. Results of χ 2 test for different medical images.
ImageCT-2X-Ray-2UltrasoundCOVID-00001
χ 2 value262.8449276.6258238.7735261.7332
Table 4. Correlation coefficients of original and encrypted images in horizontal, vertical, and diagonal directions.
Table 4. Correlation coefficients of original and encrypted images in horizontal, vertical, and diagonal directions.
ImageOriginal ImageEncrypted Image
HorizontalVerticalDiagonalHorizontalVerticalDiagonal
CT-10.97710.96720.95400.00070.0005−0.0007
CT-20.98710.99210.9821−0.00140.0001 3.96 × 10 5
Xray-10.99130.99240.98750.0006−0.0018 7.11 × 10 6
Xray-20.97390.99430.9724−0.00040.00010.0004
Ultrasound0.97680.97710.9620−0.0002−0.0002−0.0006
COVID-000010.97150.97300.9729−0.0001−0.00040.0001
Table 5. Shannon entropy and differential attack analysis of various medical images.
Table 5. Shannon entropy and differential attack analysis of various medical images.
Image (Size)Global Entropy (Plain)Global Entropy (Cipher)Local Entropy (Cipher)NPCR (%)UACI (%)
CT-1 (383 × 453)6.01827.99897.915299.607333.4634
CT-2 (980 × 980)3.93027.99987.907199.610333.4568
Xray-1 (659 × 1019)6.53177.99977.905099.610233.4832
Xray-2 (640 × 932)4.51167.99977.896799.614333.4785
Ultrasound (714 × 511)6.25577.99957.906999.605933.4746
COVID-00001 (1151 × 972)6.66407.99987.918299.607133.4785
Table 6. Comparison of NPCR and UACI values with theoretical critical thresholds at 0.05 level.
Table 6. Comparison of NPCR and UACI values with theoretical critical thresholds at 0.05 level.
Image SizeNPCR (Ours)NPCR Critical ValueUACI (Ours)UACI Acceptable Range
256 × 25699.6490% N 0.05 = 99.5693 % 33.5112% [ 33.2824 % , 33.6447 % ]
512 × 51299.6162% N 0.05 = 99.5893 % 33.4345% [ 33.3730 % , 33.5541 % ]
1024 × 102499.6121% N 0.05 = 99.5994 % 33.4717% [ 33.4183 % , 33.5088 % ]
Table 7. Speed analysis of encryption and decryption (unit: second).
Table 7. Speed analysis of encryption and decryption (unit: second).
Image SizeEncryption Time (s)Decryption Time (s)
180 × 1800.04660.0313
256 × 2560.09640.0644
512 × 5120.41210.2913
980 × 9801.72321.2596
Table 8. Computation complexity comparison of different image encryption algorithms.
Table 8. Computation complexity comparison of different image encryption algorithms.
AlgorithmRef. [3]Ref. [35]Ref. [37]Ours
Complexity O ( 16 M N ) O ( 22 M N ) O ( 39 M N ) O ( 11 M N )
Table 9. Comparative analysis of the proposed algorithm and existing methods.
Table 9. Comparative analysis of the proposed algorithm and existing methods.
SchemeHVDEntropyNPCR (%)UACI (%)Key Space
Proposed 0.0001 4.407 × 10 5 4.931 × 10 5 7.999399.609133.4765 2 349
Ref. [3] 0.0026 0.0033 0.0004 7.999499.616733.4589 2 318
Ref. [50] 0.0001 0.0006 0.0016 7.999299.610233.4465 2 256
Ref. [51] 0.0015 0.0003 0.0038 7.999499.612433.4474 2 212
Ref. [45] 0.0017 0.0004 0.0028 7.997699.600233.4592 10 140
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, Y.; Li, Y.; Yu, Z.; Zhang, T.; Xu, X. A Novel Medical Image Encryption Algorithm Based on High-Dimensional Memristor Chaotic System with Extended Josephus-RNA Hybrid Mechanism. Symmetry 2025, 17, 1255. https://doi.org/10.3390/sym17081255

AMA Style

Wang Y, Li Y, Yu Z, Zhang T, Xu X. A Novel Medical Image Encryption Algorithm Based on High-Dimensional Memristor Chaotic System with Extended Josephus-RNA Hybrid Mechanism. Symmetry. 2025; 17(8):1255. https://doi.org/10.3390/sym17081255

Chicago/Turabian Style

Wang, Yixiao, Yutong Li, Zhenghong Yu, Tianxian Zhang, and Xiangliang Xu. 2025. "A Novel Medical Image Encryption Algorithm Based on High-Dimensional Memristor Chaotic System with Extended Josephus-RNA Hybrid Mechanism" Symmetry 17, no. 8: 1255. https://doi.org/10.3390/sym17081255

APA Style

Wang, Y., Li, Y., Yu, Z., Zhang, T., & Xu, X. (2025). A Novel Medical Image Encryption Algorithm Based on High-Dimensional Memristor Chaotic System with Extended Josephus-RNA Hybrid Mechanism. Symmetry, 17(8), 1255. https://doi.org/10.3390/sym17081255

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop