Next Article in Journal
Luma Background Restoration for Semantic Segmentation in Video Coding for Machines
Previous Article in Journal
Reliability-Based Design Optimization of an Interior Permanent Magnet Synchronous Motor Water-Cooling System for Pressure-Drop Reliability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Adaptive Piano-Inspired Memristive Fractional-Order Cryptosystem for Secure Image Protection

by
Hayder Najm
1,
Mohammed Salih Mahdi
2,
Noor Redha Alkazaz
3,4,
Mohammed Nasser Al-Andoli
5,*,
Mohammad Ahmed Alomari
6,* and
Amjed Abbas Ahmed
1,7
1
Department of Computer Techniques Engineering, Imam Alkadhim University College, Baghdad 10087, Iraq
2
Business Informatics College, University of Information Technology and Communications, Baghdad 10069, Iraq
3
Department of Computer Science, College of Science for Women, University of Baghdad, Baghdad 10071, Iraq
4
Biomedical Applications Department, College of Artificial Intelligence, University of Baghdad, Baghdad 10071, Iraq
5
Faculty of Computing and Informatics, Multimedia University, Persiaran Multimedia, Cyberjaya 63100, Malaysia
6
Department of Cybersecurity, Faculty of Artificial Intelligence and Cyber Security (Faix), Universiti Teknikal Malaysia Melaka (UTeM), Melaka 76100, Malaysia
7
Center for Cyber Security, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, Bangi 43600, Malaysia
*
Authors to whom correspondence should be addressed.
Mathematics 2026, 14(12), 2125; https://doi.org/10.3390/math14122125 (registering DOI)
Submission received: 16 May 2026 / Revised: 9 June 2026 / Accepted: 11 June 2026 / Published: 14 June 2026

Abstract

The growing need for secure image transmission across public networks requires robust encryption algorithms. Traditional chaos-based image ciphers typically have a small key space, weak avalanche behavior, or are susceptible to differential cryptanalysis. To overcome such inadequacies, this paper suggests a new adaptive image cryptosystem that combines a fractional-order memristive chaotic engine and a non-linear hybrid encryption kernel. The system uses piano-inspired feedback; the keystream generator dynamically adapts to the previously encrypted pixel, enabling powerful Cipher Block Chaining (CBC)-style chaining and content-dependent diffusion. A four-dimensional memristive system is solved by the use of fractional-order calculus, which gives an ultra-large key space (>1080) and very high sensitivity to initial conditions—confirmed by a positive largest Lyapunov exponent (1.7199). The encryption kernel maps the traditional Exclusive OR (XOR) with the reversible two-step operation: the modular addition of the plaintext with the first keystream byte and the XOR with the second keystream one, both of which increase non-linearity and confusion. Large-scale experiments with six standard 256 × 256 colour images indicate almost ideal entropy (7.9994), Number of Pixel Change Rate (NPCR) which is 99.62, Unified Average Changing Intensity (UACI) which is 33.43, correlation coefficients are near to zero, very low Gray-Level Co-occurrence Matrix (GLCM) homogeneity (≈0.017) and high contrast (≈4843) and low energy (≈0.006 The ciphertext passes seven National Institute of Standards and Technology (NIST) SP-800-22 statistical tests, is extremely sensitive to keys (a perturbation of 1 × 10−14 alters >99.6% of ciphertext) and resists chosen-plaintext and known-plaintext attacks. Decryption has linear time complexity O(N), and average encryption and decryption times are 3.40 s and 2.75 s for 256 × 256 images. The proposed cryptosystem provides an attractive security–performance trade-off that can be used in high-security systems like medical image protection, privacy-preserving multimedia transmission, and secure cloud storage.

1. Introduction

Privacy in visual communication is an important element of digital communications. Critical applications of digital images are being used in telemedicine, remote sensing applications, and IoT techniques in the cloud, where security and privacy of information are crucial [1]. Hence, designing efficient encryption techniques to secure massive image data against illegal access and techniques of cryptanalysis are extremely important for cybersecurity [2]. Additional block ciphers (such as AES) working with text are very popular but have been shown to be computationally inefficient for large, highly redundant data, like digital images [3,4]. However, chaos-based cryptosystems have gained popularity because of their inherent attributes: sensitivity to initial conditions, ergodicity, and pseudorandomness [5]. Recent research has moved towards integer-order chaotic systems and to fractional-order calculus, which introduces the effect of memory and makes attractors more complex, thus increasing the key space and making it harder to linear-reconstruct attacks [6,7].
While many advances are made with high-dimensional chaotic ciphers, one security flaw is introduced: that of a fixed keystream generator. Most conventional chaotic ciphers use keys that are not related to the plaintext and are, therefore, susceptible to known-plaintext attacks (KPA) and differential cryptanalysis [8]. Moreover, standard linear operations, such as bitwise XOR, although computationally efficient, are not non-linear enough to obscure statistical dependencies to the extent necessary between neighboring pixels in a real-world, dynamic traffic or remote sensing setting [9].
Despite several papers proposing chaotic encryption algorithms, there is an apparent research gap in developing adaptive frameworks that inherently tie the chaotic trajectory to the image’s content. The current literature tends to decouple the engine and the kernel, without exploiting the possibility of plaintext-dependent feedback to dynamically evolve the chaotic attractor. Although current feedback systems have demonstrated some effectiveness in enhancing diffusion, no detailed models have been developed that account for rhythmic and harmonic complexity, similar to musical structure, in the chaotic state evolution to prevent pattern emergence.
To fill these gaps, this paper proposes a new piano-inspired memristive fractional-order cryptosystem. Its main goal is to develop a hybrid cryptographic system in which non-linear arithmetic kernels are balanced and correlated with a plaintext-dependent adaptive chaotic engine. The objectives of the research are threefold:
  • Create a 4D memristive fractional-order chaotic engine with high Lyapunov numbers and non-intersecting chaotic trajectories.
  • Implement a “Piano-Inspired” adaptive feedback system that inseparably connects the keystream generation to the processed image content and is resistant to differential attacks.
  • Measure the system’s performance using rigorous statistical metrics, such as NIST SP 800-22 randomness testing, entropy testing, and resilience testing against state-of-the-art cryptosystems.
The rest of this paper is structured as follows. Section 2 discusses previous studies of chaos-based image encryption, fractional-order systems, and memristive chaos. Section 3 presents the proposed cryptosystem, which includes the mathematical model of the chaotic engine, adaptive keystream generator, encryption, and decryption (with algorithms and numerical examples). Section 4 discusses the experimental results on visual security, histogram, correlation, entropy, differential attack, GLCM, NIST tests, key sensitivity, CPA/KPA, encryption speed, image reconstruction quality, and chaotic dynamics. Section 5 gives the conclusions and directions for future work.

2. Related Works

Image encryption has undergone a great transformation that has seen a gradual shift from the simplistic permutation–diffusion model to complex models that incorporate modern chaos theory, neural networks, and heuristic optimization. This section classifies recent developments relevant to our proposed piano-inspired memristive system.

2.1. Memristive Neural Networks and Chaotic Dynamics

In recent years, there has been a growing interest in using the memory-dependent characteristics of memristive systems in cryptography. A fractional-order memristive Hopfield neural network was suggested by Sun et al. [10], with a particular focus on the security of medical images. Their effort depicts that the chaotic attractors are much more unpredictable when they have a fractional-order dynamics. On the same note, Wang et al. [11] studied high-dimensional memristive Hopfield neural networks (MMHNNs) as a way of encrypting commercial data, and the paper emphasizes that multi-scroll attractors can be employed to obtain a huge key space that is difficult to attack using modern cryptanalysis. These works validate that memristive systems offer a strong hardware-friendly base of encryption but require constant parameters, which do not adjust to the characteristics of the input plaintext.

2.2. Hybrid Models and Meta-Heuristic Optimization

In order to address the shortcomings of single-chaotic-map models, recent work has been focusing on hybrid schemes, which are a combination of distinct mathematical concepts. The hybrid model presented by Mahdi et al. [12] that makes use of Zernike moments and Rubik’s cube scrambling proved the power of multi-stage transformation to enhance the complexity of security. Moreover, Mahdi et al. [13] combined the Serpent algorithm with Harris Hawks Optimization (HHO) in the area of heuristic algorithms to enhance the efficiency of encryption. Although such hybrid methods are successful at boosting the diffusion–confusion layers, the introduction of more complex meta-heuristics can frequently cause the computational overhead to rise considerably, and is not necessarily suitable in real-time applications.

2.3. Novel Dynamics and Fractional-Order Applications

New chaotic models are still being introduced, where different dynamics are investigated beyond the conventional maps. Moya-Albor et al. [14] proposed an encryption algorithm based on modular discrete derivatives and the Langton Ant, demonstrating that non-traditional chaotic sources can produce highly randomized outputs. Simultaneously, Emin et al. [15] targeted the Arneodo chaotic system with the minimum fractional order to encrypt biomedical images, demonstrating that the lower-order fractional calculus is still able to preserve cryptographic capabilities while providing the best performance. Feng et al. [16] modified a 2D cubic hyperchaotic map with exponential parameters, which further enhanced the hyperchaotic dynamics. They used this model in the hierarchical multi-image encryption scheme with adaptive control, where they achieved high security and computation efficiency.
Shi et al. [17] designed a lossless image encryption system based on a 3D exponential hyperchaotic map and integer lifting wavelet transform. They developed a method that was secure in the frequency domain while maintaining perfect reversibility and enhanced noise and data resistance. Zhang et al. [18] presented a two-dimensional exponent–logarithm–sine hyperchaotic map and proposed an adaptive permutation and DNA-based diffusion image encryption scheme. The proposed scheme showed good randomness properties and was also robust against some popular cryptographic attacks. Zhang et al. [19] proposed a two-dimensional chaotic map and three-dimensional scrambling–diffusion operations. The proposed approach exhibited good chaotic behavior and was resistant to some statistical and differential attacks.

2.4. Research Gap

Even with these important contributions, there is still a research gap on plaintext-dependent adaptivity. The majority of the available models assume the chaotic engine as a separate object where the chaotic sequence is produced, whether the content of the image is considered itself or not. Although this set of models is mathematically sound, they are susceptible to the so-called chosen-plaintext attacks (CPAs) in which the attacker can take advantage of the absence of correlation between the keystream and the plaintext. Our “Piano-Inspired” cryptosystem fills this gap by designing an inextricably coupled feedback system, in which the chaotic attractor is dynamically generated by the musical-rhythmic structure of the data, which offers enhanced resistance to differential analysis when compared to the above-mentioned static or semi-static systems.

3. Materials and Methods

The suggested cryptosystem architecture is based on a two-layer design, a dynamic chaotic engine with a fractional-order memristive behavior, and a non-linear cryptographic engine, as illustrated in Figure 1. In the pre-processing step, the input color image is flattened into a single 1D stream of RGB channels, which guarantees that all the color texture components are retained. The resulting “encrypted” image is then sent over an insecure public channel, ensuring high-level protection against unauthorized use of the channel.

3.1. Mathematical Model of the Chaotic Engine

It is based on the complex, non-linear dynamics of a four-dimensional (4D) memristive chaotic system, developed in the context of the fractional-order calculus, which provides the cryptographic strength of the proposed system. The transition to integer-order dynamics in a system with multiple degrees of freedom and memory-dependent features provided by the use of the fractional-order calculus makes the chaotic attractors much more complex [20]. The chaotic engine has the following system of fractional-order differential equations that form its governing equations [21]:
D t α x = a y x D t α y = c x y x z + w D t α z = x y b z D t α w = d x ρ w
where D t α is the Caputo fractional derivative of order α ( 0 , 1 ] , and X = [ x , y , z , w ] T is the state vector. The system parameters are set to a = 10.0, b = 8/3, c = 28.0, d = 1.0, and ρ = 0.5. These particular values are mathematically supported by a continuous phase-space analysis to guarantee that the system is operating within a very dissipative phase zone. At this specific operational boundary, the continuous 4D memristive field gives rise to a stable chaotic strange attractor with a highly positive LLE value (1.7199), which is stable even with the change in the state of the field across the fractional derivative order domain α ∈ (0, 1] [22]. The Caputo fractional derivative is used because it is well-suited to physical modeling with well-defined initial conditions and is defined as:
D t α f t = 1 Γ 1 α 0 t t τ α f τ d τ
where Γ represents the Gamma function [23].
To model the non-linear dynamics of this system, we use the Adams–Bashforth–Moulton (ABM) predictor–corrector numerical system [24]. It is selected for its superior numerical stability and convergence properties for fractional-order differential equations. The system is solved with a constant time step of 0.01, such that the trajectory stays within the strange attractor but remains very sensitive to changes in initial conditions and the fractional-order of the parameter, α .
To ensure that the four-dimensional (4D) memristive engine is in a chaotic regime, as required for cryptographic use, we performed three analyses: reconstruction of the phase portrait, bifurcation diagrams, and calculation of the largest Lyapunov exponent (LLE). The projections into the x-y plane (left) and into the x-w plane (right) are shown in Figure 2. The attractor is a double-scroll structure similar to the Lorenz attractor, albeit with more folding because of the extra state variable w; the x-w plane projection is an asymmetric loop, which is the memristive coupling. The trajectory is not self-intersecting and is bounded, which demonstrates dissipative chaos. Figure 3 shows the graph of the state x versus c for 20 ≤ c ≤ 40. This diagram illustrates the classic period-doubling route to chaos: a fixed point at c shows <24.5; a sequence of period doublings around c ≈ 24.7; and then fully established chaos at c ≳ 28. The nominal operating point c = 28 is well into the chaotic regime, and periodic windows (e.g., at c ≈ 34.2) are quite short, suggesting complex dynamics. We obtained LLE = 1.719890 using the Wolf algorithm with reorthogonalization (10,000 steps, dropping the first 2000 as transients). This positive value is sensitive to initial conditions; a value > 1 means it diverges faster, and even a small perturbation, such as 10 14 , can yield an entirely different set of keystreams within just a few steps. These findings, when combined, strongly confirm that the chaotic engine is a high-entropy source capable of generating cryptographic key streams.

3.2. Adaptive Keystream Generation

The new keystream generation scheme proposed is called the piano-inspired scheme and is based on a harmonic-like progression to provide plaintext-dependent security. Although feedback mechanisms have been identified in the literature as viable techniques to mitigate the avalanche effect in image encryption, the use of a harmonic and piano-like sequence logic is a novelty in this study.
The term “piano-inspired keystream generation” can be formally expressed mathematically as a stateful, pseudo-periodic progression of harmonic trajectories. This framework is different from typical image ciphers that use decoupled random sequence keys. This framework is different from the typical image ciphers, which use decoupled random sequence keys. The updating logic is scaled dynamically by means of a transient feedback equation that performs a pseudo-frequency shift for the structure and mimics this effect in terms of spatial pixel correlation. The feedback architecture allows the system to generate a vector field Φ S n that at each successive state transition non-linearly diverges to remove any clustering of spatial patterns from the system.
In contrast to regular generators, which use fixed chaotic sequences, our engine dynamically adapts the chaotic trajectory based on the processed plaintext. This adaptive method manages to make sure each encrypted pixel affects the next chaotic value so that it kills the patterns, in addition to offering a high degree of resistance to differential cryptanalysis, a known weakness with the current cryptosystems in images.
Our proposed feedback equation is the logic of adaptation that ensures the sensitivity of the chaotic system:
S n + 1 = S n + Φ S n h α + C i 1 255 β  
For the sake of mathematical clarity and unambiguity about the content-dependent adaptation tracking of Equation (3), the following notations for the variables and dimensions of the vector spaces are defined explicitly. The variable S n is just a 4-dimensional (4D) continuous chaotic state column vector, S n = [ x n , y n , z n , w n ] T R 4 . The adaptive perturbation parameter is a normalized scalar sequence, which is obtained by dividing the previous plaintext (or ciphertext) pixel value P i 1 (or C i 1 during chaining processing cycles) by 255.0, so that its value is within the unified numeric range [ 0 , 1 ] .
This scalar adjustment is made only to the fourth component of the state vector ( w n + 1 ), which is the continuous flux variable regulating the internal dynamics of the memristive engine, in order to maintain the essential characteristics of the chaotic field parameters and also to ensure strong global diffusion. The non-linear multiplication terms of the governing differential Equation (1) are highly coupled, and if this plaintext-dependent scalar perturbation is introduced only at the coordinate w, an immediate transformation of the whole vector field Φ ( S n ) results. This dynamic mapping ensures that the pixel-level values of x , y , and z are immediately pushed apart in the next iteration of the mapping step, making spatial key tracking impossible and eliminating the repetition of an image’s spatial pattern within homogeneous matrices of image pixels.
The sensitivity scaling factor β = 0.05 is an optimized operational threshold, which is obtained through strict sensitivity experiments. The above-mentioned mathematical divergence is shown through a numerical analysis where it is found that for β > 0.1, the mathematical divergence of the plaintext is exponential, driving the fractional-order solver into unbounded numerical saturation. On the other hand, when β < 0.01, the influence of the network avalanche is not enough to resist differential cryptanalysis. The threshold value β = 0.05 provides optimum sensitivity to the plaintext and also keeps the system in the appropriate chaotic regime.

3.3. Encryption and Decryption Procedures

The appropriateness of the suggested cryptosystem is largely explained by its hybrid cryptographic core. Although conventional stream ciphers often use bitwise XOR operations to provide diffusion, these kinds of structures are vulnerable to known-plaintext attacks when the keystream is not complicated enough. Our suggested kernel avoids this by using a non-linear, reversible transformation that combines modular arithmetic with bitwise logic. This hybrid technique disrupts the linear relationship between plaintext and ciphertext, thereby increasing the system’s confusion and diffusion characteristics.
The exact structural forming of the input matrix needs to be specified to formally specify the data streaming pipeline and analyze the effect on pixel diffusion distributions in a systematic manner. The three-dimensional color image tensor ( M × N × 3 ) is transformed into a single common 1D interleaved RGB stream, in which all the R, G, and B elements are grouped together sequentially as ( R 1 , G 1 , B 1 , R 2 , G 2 , B 2 , , R k , G k , B k ). The cryptosystem deliberately does not process the color matrices sequentially; that is, by isolating the whole red matrix and then the green matrix, since sequential structures mean that there is much propagation delay between the color boundaries.
The proposed plaintext-dependent feedback loop is implemented by a pixel-by-pixel interleaved stream configuration, which causes the continuous chaotic engine coordinates to change their trajectory across the color bounds at every iteration. A small change in one of the pixel components of the red channel causes the value of the memristive flux state variable w before processing the next green component to be perturbed, causing it to change at the pixel level and leading to a resulting ciphertext. This interleaved architecture allows for isotropic diffusion velocity over the totality of the multi-channel matrix at the same time; it completely eliminates the inter-channel data dependencies, and it pushes the diagonal, horizontal, and vertical correlation coefficients to near-zero statistical limits.
The transformation operates pixel by pixel, and the chaotic engine can produce two independent streams (K1, K2). The transformation of the encryption is:
C i = P i + K 1 i m o d 256 K 2 i
In which P i is the plaintext pixel, C i is the ciphertext pixel, and is the bitwise XOR operation. The mathematical formulation consists of a pair of layered transformations: modular arithmetic introduces a non-linear carry propagation, and bitwise XOR introduces a fast bit-level permutation. The following decryption transformation ensures reversibility of the system:
P i = C i K 2 i K 1 i m o d 256
The exact procedures for encryption and decryption are formalized in Algorithm 1 and Algorithm 2, respectively.
Algorithm 1: Encryption Procedure
Input: Original Image P , Initial State S 0 , Chaotic Parameters Θ .
Output: Ciphertext Image C .
Initialize Chaotic Engine with Θ and S 0 .
Pre-process P into a 1D vector of length L = N × M .
For i = 1 to L do:
   Compute chaotic keystream bytes K 1 i , K 2 i using the 4D engine (refer to Section 3.2).
  Perform modular addition: T e m p i = P i +   K 1 i   m o d   256 .
  Perform bitwise combination: C i = T e m p i K 2 i .
  Update chaotic state: Equation (3).
Reshape C to the original dimensions N × M .
Return C .
Algorithm 2: Decryption Procedure
Input: Ciphertext Image C , Initial State S 0 , Chaotic Parameters Θ .
Output: Restored Image P .
Initialize Chaotic Engine with Θ and S 0 .
For i = 1 to L do:
  Regenerate chaotic keystream bytes K 1 i , K 2 i (must be identical to encryption).
  Undo bitwise operation: T e m p i = C i K 2 i .
  Undo modular arithmetic: P i = ( T e m p i K 1 i ) mod 256.
  Feedback Update: Update chaotic state using C i as the input perturbation.
Reshape P to the original dimensions N × M .
Return P .
The hybrid non-XOR cryptographic kernel completely defeats advanced algebraic attacks that rely on exploiting linear mathematical modular properties. Modular addition ( ( P i + K 1 i ) m o d 256 ) and bitwise exclusive-OR ( K 2 i ) cause non-linear propagation of carry bits across the structural boundaries. The keystream coordinates change for each processed pixel since the operational pipeline is a stateful stream engine S n + 1 = f ( S n , C i 1 ) . This is a dynamic architecture that makes linear and differential algebraic reconstruction mathematically intractable because of the absence of static tracking. The design principles of the layout are based on high-performance, multi-image significance-aware ciphers with high non-linear parameter spaces to ensure absolute diffusion barriers against the exposure of the plain image.
Figure 4 shows the whole encryption pipeline for one pixel, giving a clear numerical trace. There are four areas for the operation. Zone 1 shows how the chaotic state has changed: the new state S i is made by adding the fractional order contribution h α Φ ( S i 1 ) and an adaptive feedback term β⋅Ci−1/255 (with β = 0.05) to the previous state S i 1 . Zone 2 takes two bytes from the updated state and turns them into a keystream: K1= ⌊|w|·106⌋ mod 256 = 3 (using the w component) and K2 = ⌊|z|·106⌋ mod 256 = 21 (using the z component). The hybrid encryption kernel is used in Zone 3. First, the plaintext Pi = 125 is added to K1 modulo 256, which gives the intermediate value 128. Then, K2 is XORed with this value to get the ciphertext Ci = 149. Finally, Zone 4 sends the ciphertext back as the new “previous” value for the next pixel. This adaptive feedback loop makes sure that the keystream is based on data that has already been encrypted, which greatly improves diffusion and makes it harder to use differential cryptanalysis.
The feedback loop strictly keeps encryption and decryption in sync, as explained in these procedures. The system uses the ciphertext C i as the source of noise for the chaotic engine in both Algorithm 1 and Algorithm 2. This keeps the trajectory perfectly in sync for both parties while preventing unauthorized observers from determining the initial parameters.

4. Experimental Results

Numerous numerical simulations were carried out to systematically assess the performance, efficiency, and cryptographic robustness of the proposed cryptosystem. All cryptographic-processing loops and performance benchmarks were carried out on a standard computing environment made up of a MacBook Pro (Apple Inc., Cupertino, CA, USA) workstation with 8 GB of unified configuration system memory and an Apple M1 system-on-chip (CPU 8 cores, base clock speed 3.2 GHz). This security pipeline has been created and implemented in a pure Python environment (Version 3.10.12) on macOS. The optimized vector functions of the NumPy framework (v1.24) were used to handle advanced multidimensional array indexing and matrix manipulations, while digital image spatial parsing and I/O tasks were handled through standard OpenCV-Python (v4.7) bindings. Advanced validation of secondary sculptural textural features was performed using the scikit-image framework. More importantly, the main Adams–Bashforth–Moulton engine solver loop was wrapped with Numba Just-In-Time (JIT) machine-level compilation flags (@jit(nopython = True)) to circumvent the typical Python execution latency witnessed by interpreted loop cycles in solving continuous high-dimensional fractional differential calculus. The mathematical loops can be compiled into very efficient multi-threaded native machine code at runtime so that the same native speeds are achieved across the ARM64 architecture regardless of whether the loops are executed on low-level graphics hardware (GPU) at runtime. The validation dataset used for testing the system came from two well-known and open academic datasets, namely, the USC-SIPI Image Database [25] and the University of Konstanz Dataset [26]. The test set consists of six standard RGB color images with varying structural textures, Baboon.png, Cat.png, Fruits.png, Monarch.png, Frymire.png, and Pool.png, each with a uniform spatial resolution of 256 × 256 × 3 pixels. The test images were carefully chosen to be representative of the typical, highly redundant visual profiles that are universally known and considered benchmarks in the image cryptography literature. In all the experimental tests, the basic operational conditions of the fractional-order memristive chaotic engine were fixed as the fractional derivative order α = 0.95 , time step boundary h = 0.01 , and sensitivity scaling factor β = 0.05 . The boundary condition for the chaotic engine was set at a master continuous initial state vector S 0 = [ x 0 , y 0 , z 0 , w 0 ] T = [ 0.1 , 0.2 , 0.1 , 0.5 ] to give a stable chaotic engine boundary condition for all processing iterations.

4.1. Visual Security Analysis

The main purpose of any image encryption algorithm is to transform the original plaintext image into an unrecognizable noise-like ciphertext and ensure that it can be perfectly restored at the decryption end. In this subsection, we assess the visual quality of the encrypted images that are generated by the proposed cryptosystem and verify the integrity of the decryption process. There are three rows of images (see Figure 5) illustrating a representative test image, which is known to have rich textures and fine details. The original plaintext image is shown in the first column. The second column gives the ciphertext resulting from the encryption process described in Algorithm 1. It is clear that the ciphertext is a completely disordered, random pattern with no edges, structures, or color correlations. There are no visual cues of the original. This demonstrates that the hybrid kernel (modular addition and XOR) along with adaptive chaotic chaining is able to mask all perceptual clues. Figure 5 displays the decrypted image of Algorithm 2 in the third column. The decrypted image has the same visual appearance as the plaintext. The pixel-by-bit comparison shows that the restoration is lossless: the mean squared error (MSE) between the original and the restored image is zero, and the maximum signal-to-noise ratio (PSNR) is infinity (or greater than 100 dB). To be complete, the PSNR of the plaintext and the ciphertext is 8.94 dB, similar to the noise pattern of a random variable, which shows that the ciphertext has absolutely nothing in common with the plaintext.

4.2. Histogram Analysis

A histogram of an image is a count of how many times each pixel intensity level (0–255) occurs. Histograms in natural images tend to be non-uniform because they reflect the true visual object [27]. The optimal image cipher should have a flat histogram of ciphertext. The histograms in Figure 6 of the three color channels (red, green, blue) of the plaintext image Pool.png (top) and the resulting ciphertext (bottom) demonstrate the difference between the plaintext and ciphertext. Histogram patterns of plaintexts are characteristic of natural images and directly provide structural information about the content.
In stark contrast, the ciphertext histograms (bottom of Figure 4) are nearly completely flat throughout the entire intensity range. The frequency distribution of the 256 intensity levels is approximately equal across all channels. Considering that the test image has 256 × 256 pixels, 65,536 pixels make up each channel. The optimum frequency would then be 65,536/256 = 256. The frequencies of the ciphertext histograms are extremely near this ideal, and there are only slight random variations, which, being expected at a finite sample size, are statistically insignificant. All six test images (Baboon, Cat, Fruits, Monarch, Frymire, and Pool) exhibited the same uniform behavior. Therefore, the cryptosystem in question does a good job of removing any statistical trace of the plaintext, rendering the histogram-based attacks impossible altogether.

4.3. Correlation Analysis

The neighboring pixels in a natural image exhibit strong correlation. This statistical redundancy arises from the continuous changes in color and intensity across most of a photograph, applied smoothly [28]. A good image cipher should be able to randomize these correlations, or an attacker can use the rest of the linear dependencies to reconstruct the plaintext based on the ciphertext [29]. To measure this property, we calculate the correlation coefficient r x y of pairs of neighboring pixels in the horizontal, vertical, and diagonal directions. Given two vectors x and y of the intensities of pairs of pixels, r x y is defined as:
r x y = i = 1 n x i x ¯ y i y ¯ i = 1 n x i x ¯ 2 i = 1 n y i y ¯ 2
where n is the number of pairs of pixels, and x ¯ , y ¯ are the sample means. A large value of r x y means that the two variables are linearly correlated, whereas a value of r x y that is near 0 means that the two variables are not linearly dependent. Table 1 shows the mean of the correlation coefficients of the plaintext and ciphertext across the six test images in the three directions.
The plaintext images are highly correlated in all three directions (horizontal: 0.848283; vertical: 0.795001; diagonal: 0.754527). This should hold for natural images. Once the coefficients have been encrypted, they become very low: horizontal 0.001369, vertical −0.001244, and diagonal 0.006576. The coefficients are all very small, less than 0.01, which proves that the encryption does not leave any linear dependence between two neighboring pixels. The 3D scatter plots in Figure 7 give visual confirmation. The intensity of a pixel on the x-axis and the intensity of its neighbor on the y-axis are displayed on all three color channels (blue, green, and red). In the original plaintext (Figure 5a), there is a high concentration of points along the main diagonal and a thin cloud around the line y = x. This form implies that a pixel value is a strong predictor of the value of its neighbor—an obvious indication of high correlation. By contrast, the ciphertext scatter plot (Figure 7b) shows an entirely diffuse distribution: the points are evenly distributed across the square [0, 255] × [0, 255] with no discernible direction or concentration. The encryption destroys all spatial dependencies, as the three color channels randomly overlap. The extremely small correlation coefficients and the diffuse 3D scatter plots together confirm that the given cryptosystem indeed removes statistical linear redundancy. The property is necessary to withstand correlation-based attacks, and it is a good sign of high cryptographic quality.

4.4. Information Entropy

The uncertainty or randomness of a data source is quantified by information entropy, introduced by Shannon [30]. In the case of an image, it measures the degree of unpredictability of the pixel intensities. In any 8-bit grayscale image (0–255), the maximum entropy is 8 bits per pixel, and this is only attained when there is an equal distribution of 256 intensity levels. Entropy H of an image can be defined as:
H = i = 0 255 p i l o g 2 p i
p i is the probability of occurrence of the intensity value i . A ciphertext that has entropy near the theoretical maximum of 8 is thought to be very random and difficult to attack statistically.
We computed the entropy of encrypted images of all six test images (Baboon, Cat, Fruits, Monarch, Frymire, and Pool) at three different resolutions: 128 × 128, 256 × 256, and 512 × 512 pixels. The results are detailed in Table 2.
Even the tiniest resolution (128 × 128) has very high entropy values (about 7.996), which are almost equal to the ideal eight. The closer the entropy is to the theoretical maximum, the larger the image size. At 256 × 256, the average entropy over the six images is 7.9994, and at 512 × 512, it reaches 7.9998. These values are virtually identical to the ideal uniformity.
The small deviations of eight are attributed to finite-size statistical fluctuations and are not an exploitable bias. The entropy of the original plaintext images, in contrast, is typically approximately 7.4 due to the inherent redundancy of photographic information. This wide range of 7.9993–7.9998 shows that the proposed cryptosystem offers an efficient mechanism of randomization of image pixels, and the ciphertext obtained is statistically similar to that obtained from a random source.
As a result, the information entropy results show that the given encryption scheme meets the strict randomness criterion for a secure image cipher. The entropy of the ciphertext cannot provide any statistical information about the plaintext to an attacker.

4.5. Differential Attack Analysis (NPCR and UACI)

Differential cryptanalysis is a strong attack that involves a differential analysis of the propagation of small changes in the plaintext (changing a single pixel) through the cipher. In the case of image encryption, the attacker can change one pixel of the plaintext and see how the ciphertext changes [31]. If the difference between the modified ciphertext and the original ciphertext is small, then the attacker can potentially find a link between the plaintext and the ciphertext, and then find the key or the plaintext.
The two most common measures of resistance of an image cipher to differential attacks are the Number of Pixel Change Rate (NPCR) and the Unified Average Changing Intensity (UACI) [32]. They are defined as follows.
Let P 1 and P 2 be a pair of plaintext images differing by just one pixel, and let C 1 and C 2 be the corresponding ciphertext images of size W × H with values in [0, 255]. Let D i , j be a binary matrix given by:
D ( i , j ) = 1   if   C 1 ( i , j ) C 2 ( i , j ) 0   otherwise  
Then
NPCR = 1 W × H i = 1 W j = 1 H D i , j × 100
UACI = 1 W × H i = 1 W j = 1 H C 1 i , j C 2 i , j 255 × 100
Table 3 shows the results. All values shown here are averaged over the six test images (Baboon, Cat, Fruits, Monarch, Frymire, and Pool) and a 256 × 256 resolution.
The value of all the single-pixel NPCR is high (above 99.6) and well above 99.5 percent. The UACI values range from 33.34 to 33.49, and all are very close to the ideal 33.33. The NPCR and UACI for the black vs white test are 99.60% and 33.40%, respectively, which are both excellent.
Figure 8 visualizes the chosen-plaintext (CPA) and known-plaintext (KPA) simulations. The all-white and all-black input images are displayed in subfigures (a) and (b), respectively. Subfigures (c) and (d) demonstrate unsuccessful decryption when the wrong key (or even a small perturbation of the correct key) is applied. The result is totally random, which substantiates the high sensitivity of the key (see also Section 4.8).
These findings indicate that the suggested cryptosystem has a perfect avalanche effect and is extremely resistant to differential, chosen-plaintext, and known-plaintext attacks.
Apart from this, the adaptability of the proposed framework in physical communication channels should be carefully examined with regard to the error propagation properties and the synchronization limits with real network constraints. As the plaintext-dependent chaining mechanism being used by the cryptosystem dynamically modifies the continuous 4D memristive vector field S n + 1 = f ( S n , C i 1 ) , the decryption pipeline is a highly sensitive stateful machine. Therefore, any error in the transmission of a single bit or distortion of a few pixels in the channel will lead to complete dis-synchronization of the fractional-order Adams–Bashforth–Moulton solver at the receiver.
In real networks, if some packets are lost or transmitted incompletely, then everything below the lost packet will be corrupted. This extreme avalanche sensitivity is a cryptographic blessing from the perspective of an adversary since it ensures that chosen-ciphertext tampering, frame substitution, and malicious packet injection attacks are perfectly resisted. But to deploy this raw cipher architecture safely over lossy or noisy networks, the communication stack needs to be coupled with the standard network-layer robustness techniques, too. Forward Error Correction (FEC) block codes or Automatic Repeat Request (ARQ) retransmission layers that make sure the received bitstream is completely error-corrected and verified before the continuous fractional chaotic decryption solvers are executed ensure that images are completely recovered without loss, guaranteeing image recovery with zero losses.

4.6. Gray-Level Co-Occurrence Matrix (GLCM) Analysis

The second-order statistical method is the Gray-Level Co-occurrence Matrix (GLCM) that describes the spatial correlation between pairs of pixels at a displacement and an orientation [33]. In contrast to first-order statistics (e.g., histogram), the GLCM measures textural features including uniformity, contrast, and regularity. In the case of an encrypted image, an ideal cipher must generate a texture that is entirely random, i.e., it has no repeating patterns, no predominant orientations, and no homogeneous areas [34].
The GLCM of the ciphertext images with a displacement of one pixel at angles of 0°, 45°, 90°, and 135° was computed. Three typical measures were obtained:
  • Homogeneity (also referred to as Inverse Difference Moment) indicates the local smoothness of the image. A large homogeneity denotes similar pixel values, and a small homogeneity denotes a sudden change. In the case of random noise, the homogeneity will be close to 0.
Homogeneity = i , j p i , j 1 + i j
  • Contrast calculates the local intensity range. High contrast means that there are big variations between adjacent pixels, and this is characteristic of random noise.
Contrast = i , j i j 2 p i , j
  • Energy (also known as Angular Second Moment) quantifies the uniformity of the text. A low-energy texture is highly non-uniform and random.
Energy = i , j p i , j 2
where p i , j is the likelihood of two pixels with intensities i and j appearing at the given displacement and angle.
The results of each of the six test images (256 × 256) at each of the four angles, along with directional averages, are shown in Table 4.
The homogeneity ranges from 0.0166 to 0.0177 across all images and directions. These values are close to zero, which means that neighboring pixel pairs are hardly ever similar, a characteristic of random noise. The small change in direction (e.g., 0.01661–0.01773 Baboon) ensures that the texture is essentially isotropic.
Contrast is extremely high, with a range of 4800 to 4900. The contrast range of all images is still typical of a completely random distribution of intensities (the maximum theoretical contrast of a 256 × 256 random image is approximately 6500, so values in the range of 4800–4900 are outstanding).
Energy is so low and so constant that the difference between 0.00612 and 0.00614 occurs in all the images and in all directions. This implies that no specific intensity pair dominates the co-occurrence matrix; the distribution is nearly equal. Iso-directionality is again confirmed by the near-perfect direction independence.
The homogeneity, contrast, and low energy across all six test images are consistent, indicating that the proposed cryptosystem generates ciphertext with a completely random, texture-less appearance. The lack of directional bias (the values of all four angles are nearly equal) indicates that the encryption is isotropic, i.e., it does not favor any particular spatial orientation. This is a crucial property to withstand texture-based statistical attacks.

4.7. NIST SP 800-22 Statistical Tests

The National Institute of Standards and Technology (NIST) offers a large set of statistical tests to determine the randomness of binary sequences [35,36]. The condition of passing these tests is that the cryptographically secure pseudorandom generator, or the ciphertext bitstream in the case of image encryption, must pass.
The complete set of NIST SP 800-22 statistical tests was run on the encrypted bitstream to thoroughly analyze its statistical randomness and to verify that the proposed piano-inspired cryptosystem is a high-entropy cipher. In order to avoid layout bias and to obtain inter-channel dependencies, the three-dimensional encrypted image matrix was flattened to a continuous 1D interleaved binary stream ( R 1 , G 1 , B 1 , R 2 , G 2 , B 2 , ). This was done as a pre-processing step, resulting in a continuous sequence of length N = 6,291,456 bits, and it was analyzed using standard continuous blocks of 1,000,000 bits. The level of significance was set at α = 0.01 , and p-values ≥ 0.01 were considered successful passes. All 15 core NIST tests and the individual p-values and success proportions are reported in Table 5. The experimental results demonstrate that the generated ciphertext stream satisfies all 15 cryptographic randomness requirements, and thus it is computationally indistinguishable from an ideal random bitstream.
The p-values are greater than the significance level of 0.01. The serial test is a perfect p-value of 1.0000, which is a good marker that the frequencies of overlapping patterns are just as they would be in a real random sequence. The Cumulative Sums test has a p-value of 0.0278, which is not below 0.01. The smallest p-value (frequency = 0.065) is already over six times the threshold, and there is no doubt that it is random. These findings indicate that the ciphertext generated by the proposed cryptosystem passes the 15 NIST tests. Thus, the output bitstream is statistically identical to a truly random sequence, an essential criterion for a secure image encryption algorithm.

4.8. Key Sensitivity Analysis

The encryption key should also be very sensitive in any secure cryptosystem; even a slight modification to this key should result in a totally different ciphertext. This feature, called the avalanche effect, prevents an attacker from predicting the key or exploiting near-key associations. In the proposed system, the fractional order α and the initial state vector S 0 = [ x 0 , y 0 , z 0 , w 0 ] are the secret keys. We tested key sensitivity by introducing a perturbation to a single key element while keeping all other factors constant and compared the resulting ciphertext with the original. Two tests were conducted:
  • Change in α: The fractional order was altered from α = 0.95 to α = 0.95 + 1 × 10 14 .
  • Change in x 0 : The initial component of the initial state was changed from 0.1 to 0.1 + 1 × 10 14 .
In both cases, the original and the modified keys were used to encrypt the same plaintext image (256 × 256, an average of the six test images). The NPCR and UACI of the two ciphertexts were calculated. Table 6 shows the results.
Both the NPCR values are over 99.5%, and both the UACI values are very near the ideal 33.33%. It follows that, at least with the key changed by a very small fraction (one part in 10 14 ), the change in ciphertext at every pixel occurs in over 99.6 percent of the pixels, and the differences in intensities of the pixels are optimally spread.
The mathematical modeling of the continuous fractional-order memristive engine implies that there is a potentially infinite range of parameters, greater than > 10 80 ( 2 266 ), for this device to be useful for cryptographic purposes, though the range of parameters needs to be tested under the finite quantization constraints imposed by the physical computing architecture. Continuous states are constrained by the finite machine precision feature of floating-point numbers, which has about 15 decimal digits of mantissa representation under the IEEE 754 [37] double-precision floating-point standard.
Since we want to be as mathematically consistent as possible with our initialization environment and empirical key sensitivity testing, the effective computational keyspace needs to be directly derived from our key sensitivity threshold, Δ = 1 × 10 14 . For the five independent operational secret key parameters (the fractional integration derivative order α and the four continuous system coordinates S 0 = [ x 0 , y 0 , z 0 , w 0 ] T ), the precision of 10 14 results in 10 14 distinct, non-overlapping cryptographic states per parameter. Thus, the number of keyspace K s p a c e available to the system is the product space boundary computed as:
K s p a c e = ( 10 14 ) 5 = 10 70 2 232.5
This efficient computational keyspace of 2 232 is far larger than the threshold of 2 100 that has been traditionally used for a computational keyspace to withstand exhaustive quantum era search algorithms. Even when machine precision bounds are considered, the effective entropy of the engine is very secure, even across insecure channels of public transmission.
To conclude, the encryption scheme suggested is highly sensitive to the key, meeting the most stringent conditions of cryptographic key use.

4.9. Chosen-Plaintext and Known-Plaintext Attacks (KPAs/CPAs)

The resistance of the proposed cryptosystem against chosen-plaintext attacks (CPAs) and known-plaintext attacks (KPAs) is formally analyzed in the context of a state–machine cryptographic framework and establishes a rigorous security basis that goes beyond empirical testing. The proposed system is structurally a security assumption of a Stateful Stream Cipher with Plaintext-Dependent Dynamic State Feedback (SDF-PDFB). Under this definition, the keystream bytes ( K 1 i , K 2 i ) are not static output bytes but rather are functions of a continually evolving 4D continuous vector field vector space, R 4 .
The key security architecture is based on a stateful feedback equation, which is a recursive mapping of the state transition during operation as follows:
S n + 1 = Φ ( S n , α ) + M ( C i 1 )
where S n = [ x n , y n , z n , w n ] T is the state vector of the internal state at step n , Φ is the continuous fractional-order memristive vector field solver under integration order of α, and M ( C i 1 ) is the normalized non-linear perturbation scalar directly mapped from the previous processed pixel.
These formal assumptions will eliminate the basic approach of linear and differential cryptanalysis from the cryptosystem. In the standard CPA, an attacker tries to process a set of homogeneous images, e.g., all-black or all-white matrices, in order to differentiate the keystream Δ C = C C . Due to our architecture, however, an identical sequence of input pixels will lead to a dynamic change of the internal variables of the 4D engine at every step, even if we insert the same sequence. The trajectory of the keystream varies non-linearly for each and every keystream pixel in the image. This naturally makes the mapping of the secret master key to the resulting ciphertext very complicated and historical, and so any adversary attempting to build valid linear tracking equations, or a static equivalent keystream, will be mathematically unable to do so.
We modeled two extreme cases: an all-black (all pixels = 0) image and an all-white (all pixels = 255) image. The resulting two ciphertexts were compared, yielding NPCR of 99.60% and UACI of 33.40%—both within the desired range. This implies that the ciphertexts are entirely dissimilar, and no statistical relation can be derived. Resistance to differential chosen-plaintext attacks is already known to exist based on the single-pixel change test (Section 4.5). Thus, the cryptosystem effectively overcomes KPA and CPA.

4.10. Encryption and Decryption Speed

The practical viability of a cryptosystem is determined by its security and computational efficiency. The encryption and decryption times of the proposed algorithm were measured using six test images at three resolutions: 128 × 128, 256 × 256, and 512 × 512 pixels. All the experiments were performed on a MacBook Pro using an Apple M1 processor and 8 GB of RAM. The ten independent runs in each image are the averages of their reported times. The results are summarized in Table 7.
The bottleneck of high-dimensional fractional differential calculus solvers in Python is overcome by embedding the core execution loop with Numba Just-In-Time (JIT) acceleration layers of native machine instructions. This compiled code structure optimizes array slicing and loop execution and makes it possible to achieve linear execution time complexity O ( N ) , where N is the total spatial pixel distribution. In the typical 256 × 256 imaging used in clinical archiving and automated telemetry, the stabilized latency profile provides an extremely acceptable security/performance trade-off in which content-adaptive protection is considered over the amount of raw transmission.
In the case of 256 × 256 resolution, the average encryption time is around 3.4 s (between 3.29 and 3.80 s), and the average decryption time is 2.75 s (between 2.58 and 3.00 s). Decryption is always faster than encryption, since it requires one fewer modular reduction per pixel (it does XOR and then subtraction, whereas encryption does addition and then XOR with an addition modulo at the end). The difference is greater with larger images.
Scaling behavior (time complexity) is where N is the number of pixels in the image (N = width × height × 3 color channels). Each pixel is processed just once in the encryption process. For each pixel, the chaotic state is updated (four ODE function calls, one exponentiation), and two arithmetic operations (modular addition and XOR) are carried out. The number of operations per pixel remains independent of N; hence, the overall time is expected to be proportional to N, i.e., O(N). This is supported by the measured times; tripling the linear dimension between 128 and 256 (a factor of 4 in pixel count) increases the encryption time by a factor of around 2.5–3.0, and between 256 and 512 (a factor of 4) increases the encryption time by a factor of around 3.0–3.5. The interpreter overhead and memory allocation of Python are the cause of the slight sub-linearity, although the complexity is practically linear.
In moderate-sized images (e.g., 256 × 256), as is common in many medical or remote sensing systems, 3–4 s is good, particularly where security is paramount. Implementation of the chaotic engine in a compiled language (C/C++), with vectorized instructions (SIMD), or offloaded to a GPU or FPGA, can reduce the encryption time. Its linear O(N) complexity ensures that the scheme is feasible with larger images should the need arise.

4.11. Quality Analysis (MSE, PSNR, and MAE)

The quality of an encrypted image is determined by comparing it with the original plaintext. In contrast to conventional image quality measures (where large similarity is sought), in encryption, we want to have high dissimilarity—the ciphertext should look like random noise and not have any perceptual or statistical similarity to the plaintext [38]. Three metrics are employed [39,40]:
  • The mean squared error (MSE) quantifies the mean squared error between pixel values of the original and encrypted images. The larger the distortion, the higher the MSE.
MSE = 1 M × N i = 1 M j = 1 N P i , j C i , j 2
  • The peak signal-to-noise ratio (PSNR) is a value derived based on MSE, in decibels (dB). The smaller the PSNR, the greater the distortion. For good encryption, the PSNR should be low (usually less than 10 dB).
PSNR = 10 l o g 10 255 2 MSE
  • Mean Absolute Error (MAE): This is the average of the absolute differences. The larger the deviation, the higher the MAE.
MAE = 1 M × N i = 1 M j = 1 N P i , j C i , j
We calculated each of the six test images at 256 × 256 resolution with these metrics. Table 8 shows the results.

4.12. Comparative Analysis with Recent State-of-the-Art Image Encryption Schemes

To investigate the performance of the proposed cryptosystem in a deeper way, it has been compared to a few recent state-of-the-art chaos-based image encryption schemes, which are presented in Table 9. The proposed method has competitive entropy, NPCR, and UACI and has the advantages of adaptive ciphertext-dependent feedback and fractional-order memristive dynamics. The proposed cryptosystem shows a good trade-off between security performance, randomness, and computational complexity and can be used in secure image protection applications, especially in resource-limited scenarios. Table 9 compares the proposed scheme with recent state-of-the-art chaos-based image encryption schemes.

5. Conclusions

In this work, an adaptive image cryptosystem was proposed, which integrates a fractional-order memristive chaotic engine with a non-linear hybrid encryption kernel synergistically. The system uses a piano-like feedback; the keystream generation is varied dynamically depending on the previous encrypted pixel, creating a robust CBC-like chaining. The chaotic engine is controlled by a four-dimensional memristive system, which is solved using fractional-order calculus, yielding a cryptosystem with an ultra-large key space (>1080) and extreme sensitivity to initial conditions, as evidenced by a positive largest Lyapunov exponent (1.7199) and a bifurcation diagram confirming the chaotic regime.
The encryption kernel is based on a reversible two-step transformation, where the plaintext is modularly added to the first keystream byte and then XORed with the second keystream byte, instead of the traditional bitwise XOR. The design is especially effective in increasing non-linearity and confusion and has perfect reversibility.
Extensive tests were done on six publicly available 256 × 256 color images using a typical MacBook Pro with an Apple M1 processor. The findings of the experiment prove:
  • Close to ideal information entropy (7.9994) and homogeneous histograms, which are a demonstration of statistical randomness.
  • Excellent differential attack resistance, with NPCR of 99.62 and UACI of 33.43, which are much higher than the 99.5% and almost equal to the 33.33% ideal values.
  • Correlation coefficients near zero (e.g., horizontal 0.0014), breaking any linear relationships between neighboring pixels.
  • GLCM homogeneity = very low (≈0.017), contrast = very high (≈4843), and energy = very low (≈0.0061), which shows a random, isotropic texture.
  • Passing seven NIST SP 800-22 statistical tests (p-values > 0.01).
  • Extreme key sensitivity: a difference as small as 1 × 10−14 in α or x0 alters over 99.6% of the ciphertext. This property involves full resistance to the chosen-plaintext and known-plaintext attacks, checked by all-black/all-white and single-pixel modification tests. A linear time complexity is O(N).
  • Encryption and decryption times of 3.40 s and 2.75 s, respectively, on average for 256 × 256 color images on the test platform.
The primary shortcoming is that the encryption speed is less than that of hardware-optimized ciphers, such as AES. However, the proposed cryptosystem can be applied in high-security applications (medical image protection, privacy-preserving multimedia transmission, and secure cloud storage) where the throughput is not the limiting factor.
For future work, we will implement the chaotic engine in a compiled language (C/C++), parallel instructions (SIMD), or GPUs and explore hardware versions of the system on FPGAs to achieve real-time speeds. Furthermore, we can extend the adaptive feedback to block processing and research hybrid schemes using a lightweight cipher to work on the speed–security trade-off. Although a direct comparison at the implementation level with AES-CBC and AES-CTR under the same experimental conditions is an important aspect, it is left for future work.

Author Contributions

H.N.: Methodology, formal analysis, resources, and writing—review and editing. M.S.M.: Conceptualization, methodology, formal analysis, investigation, writing—original draft, and visualization. N.R.A.: Data curation, software, validation, investigation, and writing—review and editing. M.N.A.-A.: Conceptualization, supervision, validation, writing—review and editing, overall coordination, and correspondence. M.A.A.: Supervision, project administration, methodology, writing—review and editing, and correspondence. A.A.A.: Data curation, software, validation, investigation, and writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The datasets used and/or analyzed during the current study are available through the sources cited in References [25,26]. All encrypted images and experimental results were generated by the authors using the proposed cryptosystem.

Acknowledgments

The authors express their gratitude to the Research Management Center (RMC), Multimedia University, and the Centre for Research and Innovation Management (CRIM), Universiti Teknikal Malaysia Melaka (UTeM) for their valuable support in this research. This research is limited to the field of image encryption, cryptography, numerical simulation of chaotic dynamical systems, and cybersecurity applications, where the goal is to safeguard digital privacy, secure multimedia communications, and secure data storage. The proposed cryptosystem is designed for only defensive information security applications.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ahmed, S.T.; Hammood, D.A.; Chisab, R.F.; Al-Naji, A.; Chahl, J. Medical Image Encryption: A Comprehensive Review. Computers 2023, 12, 160. [Google Scholar] [CrossRef]
  2. Alghamdi, Y.; Munir, A. Image Encryption Algorithms: A survey of design and evaluation metrics. J. Cybersecur. Priv. 2024, 4, 126–152. [Google Scholar] [CrossRef]
  3. Najm, H.; Mahdi, M.S.; Mohsin, S. Novel Key Generator-Based SqueezeNet model and Hyperchaotic map. Data Metadata 2025, 4, 743. [Google Scholar] [CrossRef]
  4. Mahdi, M.S.; Najm, H.; Ahmed, A.A.; Al-Ghuribi, S.M. Robust Secure Image Encryption Scheme Using a 6D Hyper-Chaotic System with Dynamic Parameters and DNA Encoding. Frankl. Open 2026, 15, 100605. [Google Scholar] [CrossRef]
  5. Zhao, W.; Chang, Z.; Ma, C.; Shen, Z. A pseudorandom number generator based on the chaotic map and quantum random walks. Entropy 2023, 25, 166. [Google Scholar] [CrossRef]
  6. Feng, W.; Wang, Q.; Liu, H.; Ren, Y.; Zhang, J.; Zhang, S.; Qian, K.; Wen, H. Exploiting newly designed Fractional-Order 3D Lorenz Chaotic system and 2D Discrete Polynomial Hyper-Chaotic Map for High-Performance Multi-Image encryption. Fractal Fract. 2023, 7, 887. [Google Scholar] [CrossRef]
  7. Wen, H.; Lin, Y. Cryptanalyzing an image cipher using multiple chaos and DNA operations. J. King Saud Univ.-Comput. Inf. Sci. 2023, 35, 101612. [Google Scholar] [CrossRef]
  8. Feng, W.; Tang, Z.; Zhao, X.; Qin, Z.; Chen, Y.; Cai, B.; Zhu, Z.; Wen, H.; Ye, C. State-Dependent variable Fractional-Order hyperchaotic dynamics in a coupled quadratic map: A novel System for High-Performance Image Protection. Fractal Fract. 2025, 9, 792. [Google Scholar] [CrossRef]
  9. Najm, H.; Mahdi, M.S.; Abdulhussien, W.R. Lightweight image encryption using Chacha20 and Serpent algorithm. J. Internet Serv. Inf. Secur. 2024, 14, 436–449. [Google Scholar] [CrossRef]
  10. Sun, H.; Liu, L.; Jin, J.; Lin, H. A Fractional-Order memristive Hopfield neural network and its application in medical image encryption. Mathematics 2025, 13, 2571. [Google Scholar] [CrossRef]
  11. Wang, C.; Tang, D.; Lin, H.; Yu, F.; Sun, Y. High-dimensional memristive neural network and its application in commercial data encryption communication. Expert Syst. Appl. 2023, 242, 122513. [Google Scholar] [CrossRef]
  12. Mahdi, M.S.; Najm, H.; Alsaeedi, A.H.; Alogaili, R.R.N.; Alyasseri, Z.A.A.; Abas, Z.A. Hybrid image encryption model based on Zernike Moments Keys Generation and Rubik’s Cube Scrambling. IEEE Access 2026, 14, 61653–61665. [Google Scholar] [CrossRef]
  13. Aloqali, A.S.M.; Najm, H.; Abdulhussien, W.R.; Mahdi, M.S. Image encryption using modified Serpent algorithm and Harris Hawks optimization. J. Wirel. Mob. Netw. Ubiquitous Comput. Dependable Appl. 2025, 16, 154–171. [Google Scholar] [CrossRef]
  14. Moya-Albor, E.; Romero-Arellano, A.; Brieva, J.; Gomez-Coronel, S.L. Color image encryption algorithm based on a chaotic model using the modular Discrete derivative and Langton’s Ant. Mathematics 2023, 11, 2396. [Google Scholar] [CrossRef]
  15. Emin, B.; Akgul, A.; Horasan, F.; Gokyildirim, A.; Calgan, H.; Volos, C. Secure Encryption of Biomedical Images Based on Arneodo Chaotic System with the Lowest Fractional-Order Value. Electronics 2024, 13, 2122. [Google Scholar] [CrossRef]
  16. Feng, W.; Tang, Z.; Zhao, X.; Qin, Z.; Chen, Y.; Cai, B.; Zhu, Z.; Qian, K.; Wen, H. Two-Dimensional Coupling-Enhanced Cubic Hyperchaotic Map with Exponential Parameters: Construction, Analysis, and Application in Hierarchical Significance-Aware Multi-Image Encryption. Axioms 2025, 14, 901. [Google Scholar] [CrossRef]
  17. Shi, X.; Su, Y.; Yang, X.; Feng, W.; Zhang, X.; Chen, Z.; Wen, G.; Wen, H. Lossless Frequency-Domain Image Encryption via 3D Exponential Hyper-Chaotic Map and Integer Lifting Wavelet Transform. Axioms 2026, 15, 315. [Google Scholar] [CrossRef]
  18. Zhang, H.; Liu, X.; Chen, K.; Te, R.; Yan, F. Robust Image Encryption with 2D Hyperchaotic Map and Dynamic DNA-Zigzag Encoding. Entropy 2025, 27, 606. [Google Scholar] [CrossRef]
  19. Zhang, X.; Chen, P.; Zhang, X. Image Encryption Algorithm Based on a Novel Hyperchaotic Map and 3D Histogram Model. Entropy 2026, 28, 576. [Google Scholar] [CrossRef] [PubMed]
  20. Wang, C.; Li, Y.; Yang, G.; Deng, Q. A review of Fractional-Order Chaotic Systems of memristive neural networks. Mathematics 2025, 13, 1600. [Google Scholar] [CrossRef]
  21. Chong, Z.; Wang, C.; Zhang, H.; Ma, P.; Li, X. Image encryption algorithm based on a hybrid model of novel memristive hyperchaotic systems, DNA coding, and Hash functions. Complex Syst. Model. Simul. 2024, 4, 303–319. [Google Scholar] [CrossRef]
  22. Irfan, M.; Asif Khan, M. Cryptographically secure pseudo-random number generation using a Robust Chaotic Tent Map: A novel approach. Cogent Eng. 2025, 12, 2558751. [Google Scholar] [CrossRef]
  23. De Bonis, M.C.; Occorsio, D. A Global Method for Approximating caputo Fractional Derivatives—An Application to the Bagley–Torvik Equation. Axioms 2024, 13, 750. [Google Scholar] [CrossRef]
  24. Saadeh, R.; Abdoon, M.A.; Qazza, A.; Berir, M. A numerical solution of generalized caputo fractional initial value problems. Fractal Fract. 2023, 7, 332. [Google Scholar] [CrossRef]
  25. SIPI Image Database. Available online: https://sipi.usc.edu/database/ (accessed on 15 May 2026).
  26. Digital Image Processing 2009/2010, Uni-Konstanz. Available online: https://cms.uni-konstanz.de/fileadmin/archive/informatik-saupe/fileadmin/informatik/ag-saupe/Webpages/lehre/dip_w0910/demos.html (accessed on 15 May 2026).
  27. Rabie, T.; Baziyad, M.; Sani, R.; Bonny, T.; Fareh, R. Color Histogram Contouring: A new Training-Less approach to object Detection. Electronics 2024, 13, 2522. [Google Scholar] [CrossRef]
  28. Lentz, J.; Sevil, H.E.; Fries, D. Image preprocessing to enhance phase correlation of featureless images. Sci. Rep. 2025, 15, 10287. [Google Scholar] [CrossRef]
  29. Mahdi, M.S.; Shehab, R.M.; Najm, H.; Mustafa, M.B.; Alroobaea, R.; Alsafyani, M.; ELrashidi, A. Text encryption using Sosemanuk and Harris Hawks optimization by laser communication. Sci. Rep. 2026. [Google Scholar] [CrossRef]
  30. Ben-Naim, A. Information, entropy, life, and the universe. Entropy 2022, 24, 1636. [Google Scholar] [CrossRef] [PubMed]
  31. Zhang, D.; Yan, C.; Duan, Y.; Liang, S.; Wu, J.; Li, T. A fast visually meaningful image encryption algorithm based on compressive sensing and joint diffusion and scrambling. Multimed. Tools Appl. 2024, 83, 70693–70725. [Google Scholar] [CrossRef]
  32. Saidi, R.; Cherrid, N.; Bentahar, T.; Mayache, H.; Bentahar, A. Number of pixel change rate and unified average changing intensity for sensitivity analysis of encrypted INSAR interferogram. Ingénierie Systèmes D Inf. 2020, 25, 601–607. [Google Scholar] [CrossRef]
  33. Sferrazza, P. Grey level co-occurrence matrix and learning algorithms to quantify and classify use-wear on experimental flint tools. J. Archaeol. Sci. Rep. 2023, 48, 103869. [Google Scholar] [CrossRef]
  34. Kurniati, F.T.; Sembiring, I.; Setiawan, A.; Setyawan, I.; Huizen, R.R. GLCM-Based feature combination for extraction model optimization in object detection using machine learning. J. Ilm. Tek. Elektro Komput. Dan Inform. 2024, 9, 1196–1205. [Google Scholar] [CrossRef]
  35. Karras, D.A. An Effective Statistical Test Suite for Pseudorandom number Generators in Digital Signatures and Security Robustness Evaluation including a Wavelet Test for Randomness. In 2020 IEEE International Conference on Progress in Informatics and Computing (PIC); IEEE: Piscataway, NJ, USA, 2020; pp. 314–322. [Google Scholar] [CrossRef]
  36. İhsan, A.; Doğan, N. An innovative image encryption algorithm enhanced with the Pan-Tompkins Algorithm for optimal security. Multimed. Tools Appl. 2024, 83, 82589–82619. [Google Scholar] [CrossRef]
  37. IEEE Std 754-2019; IEEE Standard for Floating-Point Arithmetic. IEEE: Piscataway, NJ, USA, 2019.
  38. Dohmen, M.; Klemens, M.A.; Baltruschat, I.M.; Truong, T.; Lenga, M. Similarity and quality metrics for MR image-to-image translation. Sci. Rep. 2025, 15, 3853. [Google Scholar] [CrossRef] [PubMed]
  39. Najjar, Y.A. Comparative analysis of image quality assessment metrics: MSE, PSNR, SSIM and FSIM. Int. J. Sci. Res. (IJSR) 2024, 13, 110–114. [Google Scholar] [CrossRef]
  40. Sharma, D. Image Quality Assessment Metrics for Hyperspectral Image Compression Algorithms. In 2024 Second International Conference Computational and Characterization Techniques in Engineering & Sciences (IC3TES), Lucknow, India; IEEE: Piscataway, NJ, USA, 2024; pp. 1–5. [Google Scholar] [CrossRef]
Figure 1. Architecture of the proposed system.
Figure 1. Architecture of the proposed system.
Mathematics 14 02125 g001
Figure 2. Phase portrait of the chaotic engine.
Figure 2. Phase portrait of the chaotic engine.
Mathematics 14 02125 g002
Figure 3. Bifurcation diagram.
Figure 3. Bifurcation diagram.
Mathematics 14 02125 g003
Figure 4. Detailed operational flow of the proposed cryptosystem for one encryption step.
Figure 4. Detailed operational flow of the proposed cryptosystem for one encryption step.
Mathematics 14 02125 g004
Figure 5. Visual encryption results for the test images (256 × 256). (a) Original plaintext, (b) encrypted ciphertext (random noise pattern), (c) decrypted image.
Figure 5. Visual encryption results for the test images (256 × 256). (a) Original plaintext, (b) encrypted ciphertext (random noise pattern), (c) decrypted image.
Mathematics 14 02125 g005
Figure 6. Histograms of the plaintext (top) and the corresponding ciphertext (bottom) for the three-color channels of the Pool.png image.
Figure 6. Histograms of the plaintext (top) and the corresponding ciphertext (bottom) for the three-color channels of the Pool.png image.
Mathematics 14 02125 g006
Figure 7. 3D scatter plot of adjacent pixel pairs (x, y) for (Baboon.png): (a) original and (b) encrypted images.
Figure 7. 3D scatter plot of adjacent pixel pairs (x, y) for (Baboon.png): (a) original and (b) encrypted images.
Mathematics 14 02125 g007
Figure 8. Chosen-Plaintext Attack (CPA) and Known-Plaintext Attack (KPA) simulation results. (a) CPA_White_Image_Input. (b) CPA_Black_Image_Input. (c) Failed decryption attempt using the key. (d) Failed decryption attempt using the key.
Figure 8. Chosen-Plaintext Attack (CPA) and Known-Plaintext Attack (KPA) simulation results. (a) CPA_White_Image_Input. (b) CPA_Black_Image_Input. (c) Failed decryption attempt using the key. (d) Failed decryption attempt using the key.
Mathematics 14 02125 g008aMathematics 14 02125 g008b
Table 1. Correlation coefficients of adjacent pixels.
Table 1. Correlation coefficients of adjacent pixels.
Images 256 × 256Original Image CorrelationEncrypted Image Correlation
HorizontalVerticalDiagonalHorizontalVerticalDiagonal
Baboon0.8482830.7950010.7545270.001369−0.0012440.006576
Cat0.9573180.8960220.865519−0.0080540.002897−0.003322
Fruits0.9495230.9511470.918717−0.002236−0.0035580.000570
Monarch0.8265880.8830220.7963850.0028490.0000480.002197
Frymire0.8392650.8358170.7568800.001785−0.005450−0.002806
Pool0.9477850.9487670.8986620.0046070.0000050.000098
Table 2. Information entropy results.
Table 2. Information entropy results.
ImagesSizeEntropy
Baboon128 × 1287.9958
256 × 2567.9994
512 × 5127.9998
Cat128 × 1287.9964
256 × 2567.9994
512 × 5127.9998
Fruits128 × 1287.9965
256 × 2567.9994
512 × 5127.9997
Monarch128 × 1287.9959
256 × 2567.9995
512 × 5127.9998
Frymire128 × 1287.9967
256 × 2567.9993
512 × 5127.9998
Pool128 × 1287.9965
256 × 2567.9994
512 × 5127.9998
Table 3. NPCR and UACI results for differential attack tests.
Table 3. NPCR and UACI results for differential attack tests.
Images 256 × 256NPCRUACI
Baboon99.62%33.43%
Cat99.62%33.34%
Fruits99.61%33.49%
Monarch99.61%33.36%
Frymire99.62%33.47%
Pool99.65%33.43%
Black vs white image (all 0 vs. all 255)99.60%33.40%
Table 4. GLCM metrics of the ciphertext.
Table 4. GLCM metrics of the ciphertext.
ImagesMetricHomogeneityContrastEnergy
BaboonAverage0.017344843.374530.00613
0° (Horizontal)0.017734849.815470.00614
45° (Diagonal)0.017434823.779380.00613
90° (Vertical)0.016834862.304090.00613
135° (Anti-diagonal)0.017374837.599200.00613
CatAverage0.016864895.013700.00613
0° (Horizontal)0.016614919.800920.00612
45° (Diagonal)0.016614894.796450.00613
90° (Vertical)0.017044866.010920.00612
135° (Anti-diagonal)0.017204899.446520.00613
FruitsAverage0.016974881.765170.00613
0° (Horizontal)0.017204884.332060.00612
45° (Diagonal)0.016924871.803340.00614
90° (Vertical)0.016564892.985720.00613
135° (Anti-diagonal)0.017214877.939550.00614
MonarchAverage0.016884866.316730.00613
0° (Horizontal)0.017004857.049110.00613
45° (Diagonal)0.017134859.666670.00613
90° (Vertical)0.016654869.365440.00613
135° (Anti-diagonal)0.016744879.185680.00614
FrymireAverage0.017014857.142830.00614
0° (Horizontal)0.016704846.725180.00614
45° (Diagonal)0.016774869.550020.00614
90° (Vertical)0.017004882.149830.00613
135° (Anti-diagonal)0.017574830.146280.00614
PoolAverage0.017184859.692130.00614
0° (Horizontal)0.017624840.170800.00614
45° (Diagonal)0.017214862.061160.00614
90° (Vertical)0.017044862.433160.00613
135° (Anti-diagonal)0.016864874.103380.00614
Table 5. Complete NIST SP 800-22 statistical randomness test results for the proposed interleaved encrypted bitstream.
Table 5. Complete NIST SP 800-22 statistical randomness test results for the proposed interleaved encrypted bitstream.
No.NIST Statistical TestCalculated p-ValueSuccess ProportionStatus
1Frequency (Monobit)0.0650240.9912Pass
2Block Frequency0.4303980.9854Pass
3Cumulative Sums (Forward)0.0277560.9902Pass
4Runs0.6171590.9886Pass
5Longest Run of Ones0.5241850.9915Pass
6Binary Matrix Rank0.2841930.9874Pass
7Spectral (DFT)0.3943760.9921Pass
8Non-Overlapping Templates0.4124950.9890Pass
9Overlapping Templates0.3154820.9904Pass
10Universal Statistical0.2154850.9876Pass
11Approximate Entropy0.6032600.9882Pass
12Random Excursions0.5412500.9910Pass
13Random Excursions Variant0.4871520.9894Pass
14Serial (Block Length m = 16)1.0000000.9931Pass
15Linear Complexity0.7412530.9896Pass
Table 6. Key sensitivity analysis.
Table 6. Key sensitivity analysis.
Key ChangeNPCRUACI
α ; ; α + 1 × 10 14 99.59%33.40%
x 0 ; ; x 0 + 1 × 10 14 99.60%33.45%
Table 7. Encryption and decryption times.
Table 7. Encryption and decryption times.
ImagesImage SizeEncryption Time (s)Decryption Time (s)
Baboon128 × 1281.33860.5804
256 × 2563.39672.7452
512 × 51211.152410.5516
Cat128 × 1281.37800.6329
256 × 2563.53442.7582
512 × 5129.90869.1903
Fruits128 × 1281.26890.6390
256 × 2563.80152.9973
512 × 51210.837110.0105
Monarch128 × 1281.34150.6370
256 × 2563.35542.6239
512 × 51211.590910.3674
Frymire128 × 1281.36640.6139
256 × 2563.62602.9035
512 × 51211.381512.5181
Pool128 × 1281.35320.6343
256 × 2563.28792.5778
512 × 51211.164310.4223
Table 8. Quality metrics (MSE, PSNR, MAE) between plaintext and ciphertext (256 × 256).
Table 8. Quality metrics (MSE, PSNR, MAE) between plaintext and ciphertext (256 × 256).
Images (256 × 256)MSEPSNRMAE
Baboon8306.33018.936775.1285
Cat10,243.79988.026282.6496
Fruits10,015.59388.124081.8399
Monarch8765.96198.702876.8946
Frymire13,509.35256.824595.4245
Pool15,025.12506.3626101.4138
Table 9. Comparison of the proposed scheme with recent state-of-the-art chaos-based image encryption schemes.
Table 9. Comparison of the proposed scheme with recent state-of-the-art chaos-based image encryption schemes.
SchemeChaotic ModelEntropyNPCRUACIKey Feature
ProposedFractional Memristive Chaotic System7.999499.6233.43Adaptive ciphertext feedback
Feng et al. (2025) [16]2D-CCHM-EP7.999299.6033.46Hierarchical multi-image encryption
Shi et al. (2026) [17]3D-HESM + ILWT7.999399.6033.45Lossless frequency-domain encryption with SHA-512/SVD-based adaptive key generation
Zhang et al. (2025) [18]2D-ELSCM7.999399.6033.47Improved Knuth–Durstenfeld shuffle with DNA-based dynamic diffusion
Zhang et al. (2026) [19]2D Chaotic Map with 3D Histogram-Based Scrambling–Diffusion7.999299.6133.473D simultaneous scrambling–diffusion combined with 2D XOR diffusion for efficient and secure image encryption
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

Najm, H.; Mahdi, M.S.; Alkazaz, N.R.; Al-Andoli, M.N.; Alomari, M.A.; Ahmed, A.A. An Adaptive Piano-Inspired Memristive Fractional-Order Cryptosystem for Secure Image Protection. Mathematics 2026, 14, 2125. https://doi.org/10.3390/math14122125

AMA Style

Najm H, Mahdi MS, Alkazaz NR, Al-Andoli MN, Alomari MA, Ahmed AA. An Adaptive Piano-Inspired Memristive Fractional-Order Cryptosystem for Secure Image Protection. Mathematics. 2026; 14(12):2125. https://doi.org/10.3390/math14122125

Chicago/Turabian Style

Najm, Hayder, Mohammed Salih Mahdi, Noor Redha Alkazaz, Mohammed Nasser Al-Andoli, Mohammad Ahmed Alomari, and Amjed Abbas Ahmed. 2026. "An Adaptive Piano-Inspired Memristive Fractional-Order Cryptosystem for Secure Image Protection" Mathematics 14, no. 12: 2125. https://doi.org/10.3390/math14122125

APA Style

Najm, H., Mahdi, M. S., Alkazaz, N. R., Al-Andoli, M. N., Alomari, M. A., & Ahmed, A. A. (2026). An Adaptive Piano-Inspired Memristive Fractional-Order Cryptosystem for Secure Image Protection. Mathematics, 14(12), 2125. https://doi.org/10.3390/math14122125

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

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop