Introduction

In recent years, the rapid growth of digital communication has led to extensive sharing of information in the form of digital images. Many of these images contain sensitive data, especially in domains such as healthcare, defence, satellite imaging, and intelligent transportation systems. Protecting such information has become a high priority, as the increased transmission of digital images over communication channels raises the risk of unauthorized access. To address this concern, image encryption has emerged as a crucial solution for safeguarding image data. With the rising demand for secure communication, research in the field of image cryptography has become increasingly important. Recently, researchers have shown keen interest in the field of image cryptography by exploring a wide range of techniques, such as image hiding1, image steganography2, wavelet transforms3,4, DNA and RNA based methods5,6,7,8, image compression approaches9, neural networks10, and chaos theory11,12,13. Among the various approaches, chaotic based image encryption14 has gained significant attention due to the natural characteristics of chaotic maps, such as ergodicity, randomness, and high sensitivity to initial conditions. These properties make chaotic maps ideal for designing and implementing cryptographic algorithms for digital images. Chaotic systems are generally classified into one-dimensional and multi-dimensional categories. One-dimensional chaotic maps are simple to implement and require less computation however, they often suffer from drawbacks such as a limited key space and periodicity. In contrast, multi-dimensional chaotic systems provide a larger key space and exhibit higher randomness, but they are more complex to implement and demand greater computational resources.

Two-dimensional (2D) chaotic maps have emerged as efficient tools for image encryption due to their simplicity, strong ergodicity, and large key spaces. Early models such as the classical 2D Logistic Map15, 2D-SLMM16, 2D-LASM17, and 2D-SIMM18 improved dynamical complexity while maintaining low cost. Later variants including 2D-LSCM19, and 2D-LSMCL20 enhanced randomness and robustness, while cross 2D Hyperchaotic21 and 2D-CLSS22 further strengthened ergodicity and resistance to attacks. Recent contributions such as 2D-SPCM23, 2D Cosine-Sine24, 2D-CSIM25, 2D-TFCDM26, and 2D-ILM27 emphasize lightweight computation with high security, while Li et al.28 introduced the 2D-ECSLM to expand chaotic intervals and strengthen unpredictability. Collectively, these advancements reflect a consistent trend toward richer dynamics, expanded key space, and tighter integration with permutation diffusion frameworks for robust image encryption.

Chaotic map based image encryption has evolved significantly over the past few years, with researchers progressively addressing weaknesses in randomness, key space, and computational cost. Zheng et al.29 proposed the 2D logistic–sine chaotic map (2D-LSMM) combined with DNA coding, which improved randomness, complexity, and key space compared to traditional 1D maps. However, its parameters were constrained to [0,4], limiting flexibility. Teng et al.22 overcame this limitation by developing the 2D cross-logistic sine sine chaotic map (2D-CLSS), which offered higher structural complexity and improved chaotic performance. While effective, it still relied heavily on conventional scrambling and diffusion, leaving scope for innovation in adaptive mechanisms. Demla et al.30 designed a medical image encryption scheme using an improved cosine fractional chaotic map with DNA operations, demonstrating strong robustness through NPCR, UACI, and entropy metrics. The main drawback lies in its higher computational overhead due to DNA encoding. Similarly,  Dua et al.31 combined wavelet transform with Lorenz and logistic maps for key generation, achieving high security, low complexity, and resilience against cropping attacks, though its reliance on standard chaotic maps may restrict novelty. Huang et al.27 proposed a 2D ICMIC logistic modulation with Latin square permutation, reducing sequence length requirements and improving efficiency, but the method lacked extensive cryptanalytic validation. Gao et al.32 integrated a 2D discrete hyperchaotic system with parallel compressive sensing, index scrambling, and diffusion under SHA-512-based key generation. While it enhanced efficiency, compressive sensing introduces reconstruction sensitivity that may affect robustness. Yang et al.33 introduced a double image encryption method using a fractional order chaotic system with 2D compressive sensing, Zigzag confusion, and discrete wavelet transform. The scheme improved robustness and security but incurred higher computational cost due to fractional-order dynamics.

Gao et al.34 presented a parallel encryption approach using the 2D logistic Rulkov neuron map (2D-LRNM) with cross channel interaction and block wise parallelism, which enhanced efficiency and task load balancing but required large memory resources for parallel processing. Xu et al.35 developed a 2D cubic–tent map (2D-CTM) with strong chaotic behaviour, employing bit-level scrambling, chaotic flipping, and 3D Hilbert diffusion, thereby enhancing security and reducing pixel correlation. However, the increased complexity might limit real-time deployment. Zheng et al.36 proposed the 2D iterative Gaussian sine chaotic map (2D-IGSCM) combined with a 3D Hill cipher, addressing weaknesses of the classical Hill cipher and achieving high security and efficiency, though cipher dependency on key scheduling could be a potential vulnerability. Wang et al.37 designed the 2D log logistic sine chaotic map (2D-LLSCM) with a non-linear log function, achieving an enlarged chaotic range and dynamic complexity. Its joint scrambling diffusion scheme improved resistance against attacks, though its non-linear design may complicate hardware implementation. Li et al.38 proposed the 2D exponential tangent cosine system (2D-ETCS), exhibiting hyperchaos, and introduced a cross permutation based color encryption method with multiple rounds of permutation, rotation, and masking. This significantly improved security but required multiple iterations, adding to computational load. Li et al.39 introduced the 2D cross Gaussian hyper chaotic map (2D-CGHM) with dynamic polyhedra permutation and arnold diffusion (DPPAD-IE), enabling encryption of arbitrary-sized images with strong pseudo randomness. Its main limitation lies in the added algorithmic complexity compared to lightweight schemes. Based on the literature survey, to overcome the shortcomings and drawbacks of previous algorithms, we proposed a new image encryption framework. The main contributions of this research article are summarized as follows

  • A new two-dimensional chaotic map, termed the 2D-Cosine Power Sine Coupled Map, is proposed. This map exhibits strong randomness and unpredictability, supported by high statistical values such as Lyapunov exponent, permutation entropy, and sample entropy.

  • A novel recursive scrambling method is introduced, which leverages chaotic sequences to enhance the randomness and unpredictability of image encryption.

  • A new diffusion process is developed by using a Fractal Fibonacci based approach, where the fractal structure is derived from the Hilbert curve. This mechanism effectively modifies the statistical relationship between adjacent pixels in the image.

The remaining sections of this paper describe the proposed chaotic map and its performance evaluation, the fundamental building blocks of the suggested encryption scheme, followed by a detailed analysis of its performance and security.

Table 1 Mathematical comparison of different chaotic maps.

Proposed chaotic map

Talhaiui et.al proposes an one dimensional iterative chaotic map40 which delivers maximum lyapunov exponent and randomness as in Eq. (1).

$$\begin{aligned} x_{n+1}= \cos (\frac{\alpha }{x_{n}^\beta }) \end{aligned}$$
(1)

The chaotic map has its limitation wherein, for small values of \(x_{n}\) and large values of the exponent \(\beta\), the term \({x_{n}^\beta }\) approaches zero, resulting in the argument of the cosine function becoming unbounded. This leads to severe numerical instability and chaotic behaviour that is difficult to control, especially in finite precision systems. To increase randomness and chaotic area a one dimensional improved discrete cosine fractional chaotic map (1D-IDCF)41 is proposed as defined in Eq. (2).

$$\begin{aligned} x_{n+1}= \mod ((\alpha -3). \cos (\frac{\alpha }{x_{n}^\beta })*(2^{14}),1) \end{aligned}$$
(2)

Though it increases chaotic area and delivers high Lyapunov exponent it has certain limitations are, when \(\alpha =3\)  the chaotic system has a value zero , it kills chaos leading to fixed point and lost all sensitivity to initial conditions. If x(n) nearer to zero the trigonometric cosine power can become extremely large which causes undefined behaviour in floating point computation.

To avoid such scenarios we are proposing a two dimensional Cosine Power Sine Coupled Map (CPSCM) Eq. (3) to increase randomness and unpredictability by adding a sinusoidal chaotic function which erases the situation of \(\alpha =3\) and \(\eta\) to fraction of cosine power to eliminate the denominator to zero

$$\begin{aligned} \begin{aligned} x_{n+1}=\mod (f(x_n)+(\frac{\alpha }{\alpha +1}) (\sin (\pi y_n))),1) \\ y_{n+1}=\mod (f(y_n)+(\frac{\alpha }{\alpha +1}) (\sin (\pi x_{n+1}))),1) \end{aligned} \end{aligned}$$
(3)

where

$$f(x_n)=(\alpha ) \cos (\frac{\alpha }{x_{n}^{\beta }+\eta })$$

The term \(\frac{\alpha }{\alpha + 1}\) is incorporated as a coupling coefficient to ensure that the additive sinusoidal interaction remains within a bounded range, satisfying \(\left| \frac{\alpha }{\alpha + 1} \cdot \sin (\pi x) \right| < 1\) for all \(x \in [0,1]\) and \(\alpha > 0\), thereby preserving the invariant domain of the map under modular arithmetic and enabling controlled modulation of chaotic intensity with respect to \(\alpha\). To avoid singularities and ensure numerical stability in the non-linear mapping, a small positive constant \(\eta > 0\) is added to the denominator in the expression \(f(x_n) = \alpha \cos \left( \frac{\alpha }{x_n^\beta + \eta } \right)\). This guarantees that the argument of the cosine function remains finite for all \(x_n \in (0,1]\), especially when \(x_n \rightarrow 0\) and \(\beta > 1\), thereby preserving the continuity and boundedness of the chaotic system.

The proposed two dimensional chaotic system parameters are within \(\alpha\), \(\beta\) and \(\eta \in [10^{-12},10^{-4}]\) to ensure bounded dynamics and maintain numerical stability.

Fig. 1
figure 1

Bifurcation Plots generated from proposed 2D-CPSCM (a) \(\alpha \in (0,4)\), \(\beta =20\) and \(\eta ={10^{-8}}\) (b) \(\beta \in (10,50)\), \(\alpha =2.5\) and \(\eta ={10^{-8}}\).

Fig. 2
figure 2

Bifurcation diagrams of different two dimensional chaotic maps considering \(\alpha\) as control parameter. Row 1: Chaotic sequence x and Row 2: Chaotic sequence y of 2D-TFCDM, 2D-CSM, 2D-CSIM and Proposed 2D-CPSCM, (Left to Right side).

Fig. 3
figure 3

Phase Attractor Plots: (ac) for \(\alpha =0.8,1.5,3.2\) with \(\beta =20\); (df) for \(\beta =10,20,30\) with \(\alpha =2.5\).

Fig. 4
figure 4

Initial sensitivity analysis.

Performance analysis of proposed chaotic map

This section describes about proposed chaotic system and its performance analysis by considering the characteristics of chaotic map like Lyapunov exponent (LE), Bifurcation diagram, Trajectory plots, key sensitivity, Sample Entropy (SE), Permutation Entropy (PE), Correlation Dimension (CD), Kolmogorov entropy (KE), Correlation analysis, 0-1 test , NIST randomness test.

Dynamic behaviour analysis

The dynamical behaviour of the proposed two-dimensional chaotic map was thoroughly examined to characterize its chaotic properties and evaluate its suitability for cryptographic applications. The bifurcation plot, shown in Fig. 1, illustrates how the system responds to variations in the control parameters \(\alpha\) and \(\beta\), revealing a wide chaotic range and rich unpredictable behaviour across the parameter space. Figure 2 presents the comparison of bifurcation diagrams of the proposed chaotic map with other existing chaotic maps presented in Table 1, where it exhibits a wider chaotic region compared to the others. Complementing this, trajectory plots Fig. 3 were used to visualize the evolution of the systems state sequences under fixed parameters. In the chaotic regime, the trajectories do not converge to periodic cycles but instead explore the entire phase space, forming an aperiodic attractor and highlighting the inherent randomness of the system. A key characteristic of chaos, the sensitivity to initial conditions, was analysed by generating sequences with slightly perturbed initial values, \((x_0, y_0) = (0.6, 0.6)\) and \((x_0, y_0) = (0.6 + 10^{-15}, 0.6 + 10^{-15})\), with \(\alpha = 2.5\) and \(\beta = 20\) over 50 iterations. As depicted in Fig. 4, even such a minimal variation leads to rapid divergence of trajectories, demonstrating high sensitivity, unpredictability, and strong chaotic characteristics.

To quantitatively measure this divergence, the Lyapunov exponents (LEs) of the system were computed. LEs quantify how fast two initially close trajectories diverge, and a positive LE indicates chaos. For an n-dimensional system, the i-th Lyapunov exponent is calculated as Eq. (4)

$$\begin{aligned} LE_i = \lim _{n \rightarrow \infty } \frac{1}{n} \sum _{k=1}^{n} \ln \big |\lambda _i(J_k)\big | \end{aligned}$$
(4)

where \(\lambda _i(J_k)\) is Jacobian matrix \(J_k\) eigenvalues at iteration k. The Jacobian matrix of the system is defined in Eq. (5)

$$\begin{aligned} J_n = \begin{bmatrix} \dfrac{\partial \phi _1}{\partial x_n} & \dfrac{\partial \phi _1}{\partial y_n} \\ \dfrac{\partial \phi _2}{\partial x_n} & \dfrac{\partial \phi _2}{\partial y_n} \end{bmatrix} \end{aligned}$$
(5)

and the eigenvalues satisfy the characteristic equation in Eq. (6)

$$\begin{aligned} \det (\lambda I - J_k) = 0 \end{aligned}$$
(6)
Fig. 5
figure 5

LE analysis.

For hyperchaotic systems, having more than two positive Lyapunov exponents further confirms strong chaotic behaviour.

Lyapunov exponent numerical calculation

The partial derivative calculations of the proposed 2D-CPSCM are

$$\begin{aligned} \dfrac{\partial \phi _1}{\partial x_n}&= \dfrac{\partial }{\partial x_n}\left[ \operatorname {mod}\left( f(x_n) + \frac{\alpha }{\alpha +1}\sin (\pi y_n), 1\right) \right] = \dfrac{\partial f(x_n)}{\partial x_n}. \end{aligned}$$
(7)
$$\begin{aligned} \dfrac{\partial \phi _1}{\partial y_n}&= \dfrac{\partial }{\partial y_n}\left[ \operatorname {mod}\left( f(x_n) + \frac{\alpha }{\alpha +1}\sin (\pi y_n), 1\right) \right] = \frac{\alpha }{\alpha +1}\pi \cos (\pi y_n). \end{aligned}$$
(8)
$$\begin{aligned} \dfrac{\partial \phi _2}{\partial x_n}&= \dfrac{\partial }{\partial x_n}\left[ \operatorname {mod}\left( f(y_n) + \frac{\alpha }{\alpha +1}\sin (\pi x_{n+1}), 1\right) \right] = \frac{\alpha }{\alpha +1}\pi \cos (\pi x_{n+1}) \dfrac{\partial x_{n+1}}{\partial x_n}. \end{aligned}$$
(9)
$$\begin{aligned} \dfrac{\partial \phi _2}{\partial y_n}&= \dfrac{\partial }{\partial y_n}\left[ \operatorname {mod}\left( f(y_n) + \frac{\alpha }{\alpha +1}\sin (\pi x_{n+1}), 1\right) \right] =\dfrac{\partial f(y_n)}{\partial y_n}+ \frac{\alpha }{\alpha +1}\pi \cos (\pi x_{n+1}) \dfrac{\partial x_{n+1}}{\partial y_n}. \end{aligned}$$
(10)

considering

$$f(x_n) = \alpha \cos \left( \frac{\alpha }{x_n^{\beta } + \eta }\right) ,$$
$$\begin{aligned} \dfrac{\partial f(x_n)}{\partial x_n}&= \alpha \dfrac{\partial }{\partial x_n} \left[ \cos \left( \frac{\alpha }{x_n^{\beta } + \eta }\right) \right] = \frac{\alpha ^2 \beta x_n^{\beta - 1}}{(x_n^{\beta } + \eta )^2} \sin \left( \frac{\alpha }{x_n^{\beta } + \eta }\right) . \end{aligned}$$
(11)

Similarly,

$$\begin{aligned} \dfrac{\partial f(y_n)}{\partial y_n} = \frac{\alpha ^2 \beta y_n^{\beta - 1}}{(y_n^{\beta } + \eta )^2} \sin \left( \frac{\alpha }{y_n^{\beta } + \eta }\right) . \end{aligned}$$
(12)

Hence the Jacobian is simplified to

$$\begin{aligned} J_n = \begin{bmatrix} \dfrac{\alpha ^2 \beta x_n^{\beta - 1}}{(x_n^{\beta } + \eta )^2} \sin \!\left( \dfrac{\alpha }{x_n^{\beta } + \eta }\right) & \dfrac{\alpha }{\alpha + 1} \pi \cos (\pi y_n) \\ \dfrac{\alpha }{\alpha + 1} \pi \cos (\pi x_{n+1}) \dfrac{\partial x_{n+1}}{\partial x_n} & \dfrac{\alpha ^2 \beta y_n^{\beta - 1}}{(y_n^{\beta } + \eta )^2} \sin \!\left( \dfrac{\alpha }{y_n^{\beta } + \eta }\right) + \dfrac{\alpha }{\alpha + 1} \pi \cos (\pi x_{n+1}) \dfrac{\partial x_{n+1}}{\partial y_n} \end{bmatrix}. \end{aligned}$$
(13)

Evaluating at the representative point \((x_n, y_n) = (0.131, 0.124)\) with parameters \(\alpha = 3\), \(\beta = 2\), and \(\eta = 0.0001\):

$$x_n^{\beta } + \eta = 0.131^{2} + 0.0001 \approx 0.017261, \quad \dfrac{\alpha }{x_n^{\beta } + \eta }=\dfrac{3}{0.017261} \approx 173.8022.$$

Thus,

$$\begin{aligned} J \approx \begin{bmatrix} 854.434 & 2.356133\\ 1.872 & 850.621 \end{bmatrix}. \end{aligned}$$
(14)

To find the the eigenvalues , the characteristic equation

$$\det (\lambda I - J) = 0.$$
$$\begin{aligned} \begin{vmatrix} 854.434 - \lambda&2.356133 \\ 1.872&850.621 - \lambda \end{vmatrix} = 0. \end{aligned}$$
(15)

the characteristic equation now as

$$\begin{aligned} \lambda ^2 - 1705.055\,\lambda + 727518.39 = 0. \end{aligned}$$
(16)

The corresponding eigenvalues are \(\lambda _1 \approx 879.28,\; \lambda _2 \approx 825.77.\).

The local Lyapunov exponents (LE) for the proposed chaotic map is given by

$$\begin{aligned} LE_i = \ln |\lambda _i|, \quad i = 1,2. \end{aligned}$$
(17)

Thus, \(LE_1 = \ln (879.28) = 6.779,\; LE_2 = \ln (825.77) = 6.716.\)

As both \(LE_1\) and \(LE_2\) are positive, at \((x_n, y_n) = (0.131, 0.124)\) confirms the hyper chaotic nature of the proposed chaotic map.

The calculated LEs of the proposed map Fig. 5a, b are positive, which confirms the high divergence and unpredictability observed in the phase trajectories and initial sensitivity analysis. Together, these analyses confirm that the proposed chaotic map exhibits robust, aperiodic, and highly unpredictable behaviour, making it suitable for secure cryptographic applications where both randomness and sensitivity are critical. Furthermore, Fig. 5c, d present a comparative analysis between the proposed chaotic map and several existing two-dimensional maps, namely the 2D Cosine–Sine Map (CSM) 24, 2D-CSIM 25, 2D-TFCDM 26, 2D-ILM 27, and 2D-CTM 35. The evaluation is carried out for both x and y sequences under variations in the control parameters of each chaotic system while maintaining the same initial conditions \((x_0, y_0) = (0.131, 0.124)\). The results clearly indicate that the proposed two-dimensional chaotic map achieves higher Lyapunov exponent values compared to the other benchmark maps, thereby confirming its superior chaotic behaviour.

Fig. 6
figure 6

Phase portraits for fixed system parameters: (a) \((\alpha , \beta , \eta ) = (1.5, 40, 10^{-8})\), (b) \((\alpha , \beta , \eta ) = (2.5, 20, 10^{-8})\), where red filled circles represent unstable fixed points, and dense tiny coloured dots indicate chaotic trajectories around them.

Fixed point stability analysis

For a dynamical system a fixed point42 is a point where the next state output is equal to the current output i,e \(x_{n+1}=x_n\). If a point \(x^*\) is said to be equilibrium point of a chaotic map then \(x^*=f(x^*)\). For the proposed two dimensional chaotic map assume \(S(x^*,y^*)\) be fixed point then it satisfies \(x_{n+1}=x*\) and \(y_{n+1}=y*\), from Eq.3

$$\begin{aligned} \begin{aligned} x_{n+1}=\phi _1(x_n,y_n)&= f(x_n) + \frac{\alpha }{\alpha +1}\sin (\pi y_n), \\ y_{n+1}=\phi _2(x_n,y_n)&= f(y_n) + \frac{\alpha }{\alpha +1}\sin \big (\pi x_{n+1}), \end{aligned} \end{aligned}$$
(18)

where

$$f(x_n) = \alpha \cos \!\Big (\frac{\alpha }{(x_n)^\beta +\eta }\Big ), \qquad \alpha ,\beta ,\eta >0.$$

A fixed point \((x^*,y^*)\) satisfies the nonlinear system

$$\begin{aligned} {\left\{ \begin{array}{ll} x^* = \phi _1(x^*,y^*) = f(x^*) + \frac{\alpha }{\alpha +1}\sin (\pi y^*),\\ y^* = \phi _2(x^*,y^*) = f(y^*) + \frac{\alpha }{\alpha +1}\sin (\pi x^*). \end{array}\right. } \end{aligned}$$
(19)

The stability analysis of each fixed point like S(X,Y) of the proposed chaotic system is determined by by deriving Jacobian matrix Eq. (20)

$$\begin{aligned} J_n = \begin{bmatrix} \dfrac{\alpha ^2 \beta x_n^{\beta - 1}}{(x_n^{\beta } + \eta )^2} \sin \!\left( \dfrac{\alpha }{x_n^{\beta } + \eta }\right) & \dfrac{\alpha }{\alpha + 1} \pi \cos (\pi y_n) \\ \dfrac{\alpha }{\alpha + 1} \pi \cos (\pi x_{n+1}) \dfrac{\partial x_{n+1}}{\partial x_n} & \dfrac{\alpha ^2 \beta y_n^{\beta - 1}}{(y_n^{\beta } + \eta )^2} \sin \!\left( \dfrac{\alpha }{y_n^{\beta } + \eta }\right) + \dfrac{\alpha }{\alpha + 1} \pi \cos (\pi x_{n+1}) \dfrac{\partial x_{n+1}}{\partial y_n} \end{bmatrix}. \end{aligned}$$
(20)

The corresponding characteristic polynomial of \(J\) is

$$\begin{aligned} \lambda ^2 - (\operatorname {Trace}(J))\lambda + \det (J) = 0, \end{aligned}$$
(21)

The corresponding eigenvalues are determined by finding the roots for equation

$$\begin{aligned} \lambda _{1,2} = \dfrac{\operatorname {Trace}(J) \pm \sqrt{(\operatorname {Trace}J)^2 - 4\det (J)}}{2}, \end{aligned}$$
(22)

where \(\operatorname {Trace}(J)=J_{11}+J_{22}\) and \(\det (J)=J_{11}J_{22}-J_{12}J_{21}\).

The stability classification the proposed map of infinite fixed points is depends on the magnitude of eigenvalues \(\lambda _1\) and \(\lambda _2\) of Eq. (22) as

  1. 1.

    If both eigenvalues are\(|\lambda _1|<1\) and \(|\lambda _2|<1\) then S(X,Y) is stable fixed point ,

  2. 2.

    The eigenvalues\(|\lambda _1|>1\) or \(|\lambda _2|>1\), then S(X,Y) unstable fixed point ,

  3. 3.

    If \(|\lambda _1|<1\) and \(\lambda _2=-1\) (or vice versa) then the fixed point S(X,Y) is called as period-doubling bifurcation point (PBP),

  4. 4.

    If \(|\lambda _{1,2}|=1\) with \(\operatorname {Re}(\lambda _{1,2})<1\) then the fixed point S(X,Y) is Neimark–Sacker bifurcation point (NBP).

To analyse the fixed point behaviour of the proposed chaotic map in the \(x\text {-}y\) phase plane, the system parameters are set as \((\alpha , \beta , \eta ) = (1.5, 40, 10^{-8})\) and \((2.5, 20, 10^{-8})\). The corresponding phase attractors are shown in the Fig. 6, where red filled circles denote unstable fixed points with eigenvalues \(|\lambda | > 1\), and dense tiny coloured dots represent chaotic trajectories around them. To determine the attractor type, trajectories are generated with slight perturbation in the unstable fixed points, all converging to the same chaotic region without specific initial conditions. The existence of multiple unstable fixed points with bounded chaotic trajectories confirms that the system exhibits self excited chaotic attractors, as the trajectories originate directly from the neighbourhood of the unstable fixed points.

Fig. 7
figure 7

SE analysis.

Fig. 8
figure 8

PE analysis.

Complexity and randomness measures

The complexity and randomness of the proposed two-dimensional chaotic map were evaluated using Sample Entropy (SE), Permutation Entropy (PE), and Kolmogorov Entropy (KE) to assess the unpredictability and information richness of the generated sequences. Sample Entropy measures the irregularity and intricacy of time series sequences by counting the number of identical patterns within a acceptable threshold. For a time series \(\{y_1, y_2, \ldots , y_n\}\), the SE is defined as Eq. (23)

$$\begin{aligned} \text {Sample Entropy}(r,d,n)=-\log \frac{E}{F} \end{aligned}$$
(23)

where E and F are the counts of vector pairs satisfying the inequalities \(G[Y_{r+1}(i),Y_{r+1}(j)] < d\) and \(G[Y_r(i),Y_r(j)] < d\), respectively, with \(G[\cdot ]\) representing the Chebyshev distance between vectors \(Y_r(i) = \{y_i, y_{i+1}, \ldots , y_{i+r-1}\}\). For the proposed system, the embedding dimension \(r=2\) and threshold \(d=0.2 \times \text {STD}\), where STD is the standard deviation of the series. Figure 7 demonstrates that the SE values of the proposed map for x and y sequences are significantly higher than those of benchmark chaotic maps, indicating strong aperiodicity and pseudo-randomness.

Permutation Entropy (PE) further quantifies the unpredictability of the system by evaluating the probability distribution of ordinal patterns in the sequences. The normalized PE is computed as Eq. (24)

$$\begin{aligned} PE_{\text {norm}} = \frac{PE}{\log (n!)}, \quad PE = -\sum _{i=1}^{n!} p(x_i) \log (p(x_i)) \end{aligned}$$
(24)

where \(p(x_i)\) denotes the probability of each ordinal pattern. The proposed map achieves an average PE of 0.852, near to the theoretical maximum of 1, which is higher and more stable than other contemporary two-dimensional chaotic systems Fig. 8. This indicates enhanced randomness and unpredictability, reinforcing its suitability for secure encryption.

Kolmogorov Entropy (KE) complements SE and PE by quantifying the rate of information generation within the system. Mathematically, KE is expressed as Eq. (25)

$$\begin{aligned} KE = - \lim _{n \rightarrow \infty } \lim _{\varepsilon \rightarrow 0} \lim _{\tau \rightarrow 0} \frac{1}{n \tau } \sum _{i_0, i_1, \ldots , i_n} p(i_1, \ldots , i_n) \ln \big [ p(i_1, \ldots , i_n) \big ] \end{aligned}$$
(25)

where the n-dimensional phase space is partitioned into boxes \((i_0, i_1, \ldots , i_n)\) of size \(\varepsilon\), \(\tau\) is the temporal delay, and \(p(i_1, \ldots , i_n)\) is the joint probability of the trajectory occupying the corresponding boxes. A positive KE reflects high unpredictability, and Fig. 9 illustrates KE variations with \(\alpha\) and \(\beta\). The proposed chaotic map achieves an average KE of 7.3159, confirming both high unpredictability and stable chaotic behaviour. Collectively, SE, PE, and KE analyses demonstrate that the proposed system generates complex, highly unpredictable sequences suitable for robust cryptographic applications.

Fig. 9
figure 9

KE analysis for \(\alpha\) and \(\beta\).

Fig. 10
figure 10

Correlation analysis.

Fig. 11
figure 11

CD analysis for \(\alpha\) and \(\beta\).

Correlation and statistical analysis

To further evaluate the statistical properties and complexity of the proposed two-dimensional chaotic map, autocorrelation, cross-correlation, and correlation dimension analyses were performed. Autocorrelation quantifies the similarity of a time series with itself at different lags, while cross-correlation measures the similarity between two distinct sequences as a function of displacement \(\tau\). Mathematically, these are defined as Eq. (26)

$$\begin{aligned} \begin{aligned} r_{xy}(\tau ) = \frac{1}{N - \tau } \sum _{t=1}^{N - \tau } \left( x(t) - \mu _x \right) \left( y(t + \tau ) - \mu _y \right) , \quad \\ r_{xx}(\tau ) = \frac{1}{N - \tau } \sum _{t=1}^{N - \tau } \left( x(t) - \mu _x \right) \left( x(t + \tau ) - \mu _x \right) \end{aligned} \end{aligned}$$
(26)

where \(r_{xx}\) and \(r_{xy}\) denote the autocorrelation and cross-correlation, respectively, N is the number of points in each series, and \(\mu _x\) and \(\mu _y\) are the mean values of x(t) and y(t). Figure 10a and b illustrate the autocorrelation of the x and y sequences, showing a prominent spike at lag 0 and near-zero values at other lags, confirming the absence of significant self-similarity and the generation of aperiodic sequences. The cross-correlation between the two sequences, depicted in Fig. 10c, exhibits a near-zero zigzag pattern, indicating that x and y are highly uncorrelated and statistically independent.

The correlation dimension (CD) provides a quantitative measure of the attractor’s fractal complexity in the phase space. It is calculated through the integral of correlation \(C_e(r)\) as Eq. (27)

$$\begin{aligned} CD = \lim _{r \rightarrow 0}\lim _{M \rightarrow \infty } \frac{C_e(r)}{\log (r)} \end{aligned}$$
(27)

Higher CD values correspond to more complex and irregular behavior, indicating that the time series spans a higher-dimensional phase space. The three-dimensional visualization of CD, shown in Fig. 11, confirms that the proposed chaotic map exhibits rich and diverse dynamics. Collectively, autocorrelation, cross-correlation, and correlation dimension analyses validate that the sequences generated by the proposed system are statistically independent, aperiodic, and highly complex, reinforcing their suitability for cryptographic applications.

Fig. 12
figure 12

0-1 test analysis.

Table 2 NIST test results \(\text {average} \,\pm \, \text {standard deviation}\) for 10 independent runs.

Chaos validation and randomness testing

To further validate the chaotic nature and cryptographic suitability of the proposed two-dimensional map, both the 0-1 test and NIST statistical test suite were employed. The 0-1 test provides a sensitive measure of chaos directly from time series data, without requiring phase space reconstruction. For a sequence u(n), the auxiliary variables p(n) and q(n) are defined as Eq. (28)

$$\begin{aligned} \begin{aligned} p(n+1)&= p(n) + u(n) \cos c(n), \\ q(n+1)&= q(n) + u(n) \sin c(n) \end{aligned} \end{aligned}$$
(28)

where c is a constant in the interval \((0, 2\pi )\). This leads to Eq. (29)

$$\begin{aligned} \begin{aligned} p_c(n)&= \sum _{j=1}^{n} u(j) \cos (jc), \\ q_c(n)&= \sum _{j=1}^{n} u(j) \sin (jc) \quad n = 1,2,\ldots ,N \end{aligned} \end{aligned}$$
(29)

and the mean square displacement is calculated as Eq. (30)

$$\begin{aligned} M(n) = \lim _{N \rightarrow \infty } \frac{1}{N} \sum _{j=1}^{N} \left[ \big (p(j+n) - p(j)\big )^2 + \big (q(j+n) - q(j)\big )^2 \right] \end{aligned}$$
(30)

The asymptotic growth rate is Eq. (31)

$$\begin{aligned} K = \lim _{n \rightarrow \infty } \frac{\log M(n)}{\log n} \end{aligned}$$
(31)

indicates chaos when K approaches 1, and regular dynamics when K is close to 0. For the proposed map, with \(\alpha = 2.5\), \(\beta = 20\), and initial values \((x_0, y_0) = (0.131, 0.124)\), the 0-1 test results Fig. 12 show (pq) trajectories resembling Brownian motion, and the K values for x and y sequences are 0.9077 and 0.9081, respectively, confirming hyperchaotic behaviour.

In addition, the NIST statistical test suite was employed to rigorously evaluate the randomness and unpredictability of the generated sequences. This suite consists of 15 subtests examining different aspects of statistical randomness, with outcomes expressed as p-values. Sequences are considered random if the p-values exceed 0.01. As summarized in Table 2, all p-values for the proposed chaotic map sequences surpass this threshold, confirming strong randomness, unpredictability, and suitability for cryptographic applications. Collectively, the 0-1 test and NIST results validate that the proposed map exhibits robust chaotic dynamics and produces highly unpredictable sequences.

Furthermore, the comparative analysis of the proposed chaotic map with other systems, in terms of statistical measures reported in Table 3, indicates that the proposed two-dimensional chaotic map delivers superior values for LE, Asymptotic growth rates (\(K_1,K_2\)), CD and KE, while achieving approximately equal performance for the remaining metrics. These results confirm the effectiveness and competitiveness of the proposed chaotic system.

Table 3 Statistical analysis of chaotic maps.

Proposed encryption scheme

This section presents the proposed encryption algorithm, outlining its fundamental building blocks and their integration in transforming an input image into a highly randomized encrypted image. The overall process is illustrated in the flowchart shown in Fig. 13.

Fig. 13
figure 13

Image encryption algorithm flow chart.

Self adaptive prime modulo based Hashing algorithm

The proposed self-adaptive prime-modulo block hashing method partitions an image into dynamically assigned hash blocks and iteratively refines their distribution using a feedback-driven mechanism. Given an input image I of size \(m \times n\), it is first converted to grayscale, flattened into a one-dimensional sequence, and the number of hash blocks is defined as \(B = \min (m,n)\). To ensure uniform and collision-resistant mapping, the smallest prime \(q \ge mn\) is selected as the modular space. This process starts with two secret seeds \(r_{\text {ini}}\) and \(s_{\text {ini}}\) are converted into integer keys r and s as Eq. (32)

$$\begin{aligned} \begin{aligned} r&= \mod \!\left( \lfloor r_{\text {ini}} \times 10^{10} \rfloor , \, q-1\right) + 1, \\ s&= \mod \!\left( \lfloor s_{\text {ini}} \times 10^{10} \rfloor , \, q\right) \end{aligned} \end{aligned}$$
(32)

which control the initial pixel-to-block allocation through the hash function defined by Eq. (33)

$$\begin{aligned} h(i) = \mod \big (\mod (r \cdot i + s, \ q), \ B \big ) + 1 \end{aligned}$$
(33)

where i is the pixel index in the flattened sequence. Each pixel is assigned to a block h(i), and after all pixels are distributed, block statistics such as the total sum \(S_{\text {total}} = \sum _{b=1}^{B} \sum _{x \in \mathscr {B}_b} x\) and cumulative standard deviation \(\sigma _{\text {total}} = \sum _{b=1}^{B} \sigma (\mathscr {B}_b)\) are computed. These statistics are fed back to update the hash keys across rounds using Eq. (34)

$$\begin{aligned} \begin{aligned} r&\leftarrow \big ( r + \lfloor S_{\text {total}} \rfloor \big ) \bmod (q-1) + 1, \\ s&\leftarrow \big ( s + \lfloor \sigma _{\text {total}} \rfloor \big ) \bmod q \end{aligned} \end{aligned}$$
(34)

which introduces adaptivity and ensures that even minor variations in the image propagate across multiple iterations. After a predefined number of rounds, this feedback mechanism yields a highly irregular and content dependent block structure that enhances confusion and diffusion properties, making it well suited for cryptographic applications such as chaotic initialization, DNA based diffusion, or permutation driven image encryption. The step wise implementation of this procedure is summarized in Algorithm 1.

Algorithm 1
figure a

Self-adaptive block hashing

Entropy based key generation

This section describes the generation of control parameters for the proposed chaotic system based on the blocks generated from self adaptive prime modulo based hashing algorithm. In this step each block entropy is calculated and concatenated into a one dimensional vector to apply to SHA-256 hash algorithm, and convert this 256 bit hash value into 512 bit binary number and group onto 64 groups and calculate the control parameters.

The generation of image-dependent chaotic keys is performed in five sequential steps as described below.

Step 1: The input image is initially partitioned into B non-overlapping pixel blocks using self adaptive block hashing algorithm 1 and the Shannon entropy of each block is computed as Eq. (35)

$$\begin{aligned} \begin{aligned} \{\mathscr {B}_1, \mathscr {B}_2, \dots , \mathscr {B}_B\}, \\ H_b = - \sum _{i} p_i^{(b)} \log _2 p_i^{(b)}, \quad b = 1,2,\dots ,B. \end{aligned} \end{aligned}$$
(35)

where \(p_i^{(b)}\) is i-th intensity in block \(\mathscr {B}_b\) probability. The resulting entropy vector is Eq. (36)

$$\begin{aligned} E = [H_1,H_2,\dots ,H_B] \end{aligned}$$
(36)

Step 2: The entropy vector E is fed to SHA-256 algorithm producing a 256-bit digest. The digest is represented as a 512-bit binary sequence, which is further divided into 64 consecutive 8-bit segments as Eq. (37)

$$\begin{aligned} \left\{ \begin{aligned} h&= \text {SHA-256}(E), \\ H_{\text {bin}}&= \text {Binary}(h), \quad H_{\text {bin}} \in \{0,1\}^{512}, \\ K_i&= H_{\text {bin}}[\,8(i-1)+1 : 8i\,], \quad i = 1,2,\dots ,64. \end{aligned} \right. \end{aligned}$$
(37)

Step 3: Each 8-bit group \(K_i\) is converted into its decimal representation using Eq. (38)

$$\begin{aligned} K[i] = \textrm{bin2dec}(K_i) \quad i=1,2,\dots ,64. \end{aligned}$$
(38)

Step 4: To mix entropy across different positions, four aggregate integers are obtained using XOR folding as Eq. (39)

$$\begin{aligned} d_i = \bigoplus _{j=0}^{15} K[i + 4j] \quad i = 1,2,3,4. \end{aligned}$$
(39)

where \(\oplus\) denotes bitwise XOR.

Step 5: Finally, the XOR-folded integers are mapped to the initial conditions and control parameters of the chaotic system as Eq. (40)

$$\begin{aligned} \left\{ \begin{aligned} x_0&= 0.1 + \frac{0.8}{255} \times d_1,\\ y_0&= 0.1 + \frac{0.8}{255} \times d_2,\\ \alpha&= 1.0 + \frac{8.0}{255} \times d_3,\\ \beta&= d_4 \bmod 20. \end{aligned} \right. \end{aligned}$$
(40)

The tuple \((x_0, y_0, \alpha , \beta )\) serves as the final chaotic key, which generates the chaotic sequences of length \(m \times n\), and is modified according to Eqs. (41) and (42) for the usage of subsequent encryption stages. Here consider \(\eta = 10^{-8}\) as constant for generation of chaotic sequences.

$$\begin{aligned} x(i) = \bmod \!\left( \left\lfloor x(i) \times 10^{5} \right\rfloor , 6 \right) + 1 \end{aligned}$$
(41)
$$\begin{aligned} y(i) = \left\lfloor \bmod \!\left( y(i) \times 10^{8}, 256 \right) \right\rfloor \end{aligned}$$
(42)

where \(\lfloor .\rfloor\) indicates floor operation.

Fig. 14
figure 14

Hilbert curve (a) order 1, (b) order 2, and (c) order 3.

Recursive chaotic based block scrambling

Traditional image scrambling methods such as row column shuffling, zigzag scanning, Arnold cat maps, and global chaotic permutations offer basic obfuscation but suffer from limited key space, predictable structures under chosen plaintext attacks, weak entropy diffusion, and low resistance to local statistical analysis. To overcome these shortcomings, we propose a Recursive Chaotic Scrambling scheme that leverages fractal inspired quadtree decomposition and chaotic key driven geometric transformations for multi-scale disruption of spatial dependencies.

Given an input image block \(\textbf{I} \in \mathbb {Z}^{N \times N}\), the algorithm recursively partitions it into four sub blocks \(\{\textbf{Q}_1,\textbf{Q}_2,\textbf{Q}_3,\textbf{Q}_4\}\) at each recursion level \(\ell\), where a chaotic key vector \(\textbf{x}\) from Eq. (41) assigns a transformation index \(k = \textbf{x}[4(\ell -1)+i],~i\in \{1,2,3,4\}\). Each partitioned sub block then undergoes a reversible operation horizontal/vertical flip, \(90^\circ\)/\(180^\circ\) rotation, or transposition while \(k=1\) leaves the block unchanged. After local transformation, the blocks are recursively processed up to a maximum depth L and recombined to form the scrambled output \(\textbf{O}\). This whole process is explained in Algorithm 2.

This hierarchical strategy breaks coarse structures in early levels and fine pixel correlations in deeper levels, yielding multilevel permutation with high sensitivity to initial keys. The combined use of flips, rotations, and transpositions enhances permutation entropy, enlarges the key space, and provides high resistance to statistical and differential attacks, while remaining lightweight and fully reversible for seamless integration with subsequent diffusion stages in secure image encryption.

Fractal Fibonacci fusion diffusion

The proposed Fractal Fibonacci Fusion Diffusion scheme enhances image encryption by combining fractal-space traversal with Fibonacci inspired recursive diffusion. First, the input scrambled image \(O \in \mathbb {Z}^{M \times N}\) is linearized into a one-dimensional sequence P using a Hilbert space filling curve of order \(\log _2 N\) as shown in Fig. 14, which preserves local neighbourhood relations while introducing a fractal mapping that disperses spatial correlations.

Algorithm 2
figure b

Recursive chaotic scrambling

Unlike raster scans and zig-zag scans, the Hilbert traversal ensures that 2D neighbours remain close in 1D, enabling local perturbations to propagate globally during diffusion. The chaotic sequence y from Eq. (42) generated from the key dependent system. The diffusion follows the Fibonacci inspired recursion, where the first two pixels are updated as Eq. (43)

$$\begin{aligned} \begin{aligned} D(1) = (P(1) + y(1)) \bmod 256,\quad \\ D(2) = (P(2) + D(1) + y(2)) \bmod 256 \end{aligned} \end{aligned}$$
(43)

and each subsequent pixel for \(i \ge 3\) is computed as Eq. (44)

$$\begin{aligned} D(i) = \big (P(i) + D({i-1}) + D({i-2}) + y(i)\big ) \bmod 256 \end{aligned}$$
(44)

This recursive fusion ensures that every pixel depends on its two predecessors and the chaotic input, amplifying sensitivity to both plaintext and keys. Finally, the diffused 1D sequence is remapped to 2D using the inverse Hilbert curve, yielding the final diffused image \(C_{\text {cipher}}\) as described in Algorithm 3. By jointly leveraging fractal space filling traversal, Fibonacci style dependency, and chaotic modulation, this lightweight diffusion achieves high entropy, strong nonlinearity, and robust resistance against statistical and differential attacks.

Algorithm 3
figure c

Fractal Fibonacci fusion diffusion

Fig. 15
figure 15

Histogram analysis of images chemical plant, chest CT scan, boat and male: Row 1\(\rightarrow\) Original Images; Row 2 \(\rightarrow\) Original Image Histograms; Row3 \(\rightarrow\) encrypted images; Row 4 \(\rightarrow\) Encrypted image histograms; Row 5 \(\rightarrow\)Decrypted Images.

Simulation and security analysis

This section presents the simulation results and security analysis of the proposed encryption algorithm, implemented using MATLAB 2023a. For evaluation, we considered ten different grayscale images from diverse categories, including Chemical Plant, Golden Gate, Couple, Boat, Baboon, Pentagon, and Male from the SIPI database43, Brain Tumour44, Chest CT Scan45, and Berry from the RSSCN7 dataset46. These images collectively represent a wide range of content, including natural, medical, aerial, and remote sensing images.

Visual evaluation

Visual evaluation illustrates the input, encrypted, and reconstructed images. An effective encryption scheme should produce an encrypted image with no recognizable information and a decrypted image closely resembling the original. Figure 15 shows the histogram analysis: the input image exhibits distinct peaks representing data distribution, the encrypted image histogram is flat and uniform, resembling noise, and the decrypted image histogram closely matches the original. These results confirm the proposed scheme’s effectiveness in obscuring visual information while preserving recoverability.

Table 4 Entropy analysis of different images with\(\text {average} \,\pm \, \text {standard deviation}\) for 10 independent runs.

Entropy-based analysis

Entropy-based analysis evaluates image randomness via Global Information Entropy (GIE) and Local Information Entropy (LIE). GIE measures overall image entropy, while LIE computes the average GIE of randomly selected non-overlapping blocks. GIE is calculated as Eq. (45)

$$\begin{aligned} \text {GIE}=-\sum _{i=0}^{L-1} p(x_i) \log (p(x_i)) \end{aligned}$$
(45)

where L is the maximum intensity level and \(p(x_i)\) the probability of intensity \(x_i\). LIE is given by Eq. (46)

$$\begin{aligned} \text {LIE} = \frac{1}{k} \sum _{i=1}^{k} \text {GIE}(B_i, T_B) \end{aligned}$$
(46)

with k randomly selected blocks \(B_i\), each containing \(T_B\) pixels. For our analysis, \(k=30\) and \(T_B=1936\). At a \(5\%\) significance level, an image passes if LIE lies within \((7.9019,\,7.9030)\). As summarized in Table 4, the input image exhibits lower GIE than the encrypted image, and its LIE falls outside the interval, whereas encrypted images meet the LIE criterion. This confirms that the proposed encryption ensures strong global and local randomness.

Table 5 Histogram and distribution analysis.

Pixel level statistical analysis

This section evaluates the proposed encryption scheme visually and statistically using histogram variance analysis and the Chi-square test. Histogram analysis shows pixel distribution, the original image exhibits peaks revealing information, while the encrypted image is uniform, preventing data leakage. The Chi-square statistic is computed as Eq. (47)

$$\begin{aligned} \chi ^2 = \sum _{i=0}^{255} \frac{(o(i) - e(i))^2}{e(i)} \end{aligned}$$
(47)

Here \(o(i)\) is observed and \(e(i)\)is expected frequency of pixel intensity i. The variance of histogram is calculated by Eq. (48)

$$\begin{aligned} \textrm{Var}(F) = \frac{1}{(256)^2} \sum _{i=1}^{256} \sum _{j=1}^{256} (f_i - f_j)^2 \end{aligned}$$
(48)

Here \(f_i\) and \(f_j\) are the histogram frequencies at gray levels i and j. Table 5 reports variance and Chi-square results for original and encrypted images. The encrypted images show significantly lower variance and \(\chi ^2\) values, satisfying \(\chi ^2 < 293.2478\), indicating a uniform pixel distribution. These results confirm strong randomness in the encrypted images, enhancing the security of the proposed scheme.

Table 6 Image quality analysis.

Statistical analysis

The proposed encryption algorithm is further evaluated using statistical metrics, Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), and Visual Information Fidelity (VIF), which quantify distortion during encryption and reconstruction quality during decryption. These are defined as in Eq. (49)

Table 7 Correlation coefficient analysis.
Fig. 16
figure 16

Correlation analysis: original image \(\rightarrow\) Correlation \(\rightarrow\) Encrypted image \(\rightarrow\) Correlation; (ad) Brain Tumour, (eh) Golden gate, (il) Couple, (mp) Baboon.

$$\begin{aligned} \begin{aligned} \text {PSNR} = 10 \log _{10} \frac{L^2}{\frac{1}{mn} \sum _{i=1}^{m} \sum _{j=1}^{n} (r_{i,j} - d_{i,j})^2}, \\ \text {SSIM}(r,d) = \frac{(2\mu _r \mu _d + C_1)(2\sigma _{rd} + C_2)}{(\mu _r^2 + \mu _d^2 + C_1)(\sigma _r^2 + \sigma _d^2 + C_2)}, \\ \text {VIF} = \frac{ \sum \limits _{i \in \text {subbands}} I\left( \vec {C}_{N,i}; \vec {d}_{N,i} \mid s_{N,i} \right) }{ \sum \limits _{i \in \text {subbands}} I\left( \vec {C}_{N,i}; \vec {r}_{N,i} \mid s_{N,i} \right) }. \end{aligned} \end{aligned}$$
(49)

Table 6 presents the results. PSNR, SSIM, and VIF values are very low between the original and encrypted images, confirming strong security, and very high between the original and decrypted images (PSNR \(\rightarrow \infty\), SSIM and VIF \(\approx 1\)), indicating near perfect reconstruction. This demonstrates that the proposed scheme ensures both confidentiality and faithful image recovery.

Correlation between adjacent pixels analysis

Original images exhibit high correlation between adjacent pixels in horizontal, vertical, and diagonal directions, making them vulnerable to statistical attacks. Reducing this correlation is essential for security. The correlation coefficient (CC) between adjacent pixels \(u_i\) and \(v_i\) is computed using Eq. (50)

$$\begin{aligned} CC(u, v) = \frac{\sum \limits _{i=1}^{l} (u_i - \bar{u})(v_i - \bar{v})}{\sqrt{\sum \limits _{i=1}^{l} (u_i - \bar{u})^2 (v_i - \bar{v})^2}} \end{aligned}$$
(50)

where \(\bar{u}\) and \(\bar{v}\) are the mean values. Figure 16 shows that original image pixels cluster closely, indicating strong correlation, whereas encrypted image pixels are widely scattered in all three directions. Table 7 confirms that correlation coefficients for encrypted images are near zero, demonstrating minimal adjacent-pixel dependency and enhanced security.

Table 8 Differential attack analysis wth \(\text {average} \,\pm \, \text {standard deviation}\) for 10 independent runs.

Differential attack analysis

Differential Attack analysis is well known attack test to measure the vulnerability of crypto system. In this analysis two images with slightly differentiate in the features are subjected to undergo encryption process to get two cipher images known as \(E_1\) and \(E_2\). The ability to withstand differential attack of the proposed crypto algorithm is measured by calculating how many number of pixels are differed between two cipher images \(E_1\) and \(E_2\). This difference of pixels are quantified by two statistical metrics known as Number of Pixel Change Rate(NPCR) and Unified Average Changing Intensity(UACI) are calculated using Eqs. (51) and (52) respectively

$$\begin{aligned} \text {NPCR}(E_1, E_2) = \frac{1}{m \times n} \sum _{i=1}^{m} \sum _{j=1}^{n} \xi _{i,j} \times 100\% \end{aligned}$$
(51)
$$\begin{aligned} \text {UACI}(E_1, E_2) = \frac{1}{m \times n} \sum _{i=1}^{m} \sum _{j=1}^{n} \frac{\left| E_1(i,j) - E_2(i,j) \right| }{255} \times 100\% \end{aligned}$$
(52)
$$\xi _{i,j} = {\left\{ \begin{array}{ll} 1, & \text {if } E_1(i,j) \ne E_2(i,j) \\ 0, & \text {if } E_1(i,j) = E_2(i,j) \end{array}\right. }$$
Table 9 Comparison analysis.

Table 8 presents the statistical results of differential attack analysis by measuring NPCR and UACI. From the table, it is evident that the average values of NPCR exceed \(99.6\%\) and UACI exceed \(33.4\%\), which indicates that the proposed algorithm exhibits strong randomness and a high resistance to differential attacks.

Additionally, we compared the statistical values of the Baboon image derived using the proposed encryption algorithm with those from previous algorithms. The results, summarized in Table 9, demonstrate that the proposed algorithm achieves superior performance.

Fig. 17
figure 17

Noise attack analysis for pentagon image. SPN: Salt and Pepper Noise, GN: Gaussian Noise, SN: Speckle Noise.

Fig. 18
figure 18

Crop analysis for pentagon image with % of crop to encrypted image and its corresponding decrypted image.

Fig. 19
figure 19

Key sensitivity analysis. (a) Original image, (b) Encrypted image with \(key_1\), (c) Encrypted image with \(key_2\), (d) Difference between (a) and (b), (e) Decrypted image with \(key_1\), (f) Decrypted image with \(key_2\).

Table 10 Noise attack analysis.
Table 11 Crop analysis.
Table 12 Key space analysis.
Fig. 20
figure 20

NBCR analysis.

Robustness analysis

To evaluate robustness against transmission errors and attacks41, noise and data loss were simulated on encrypted images. Noise of varying types and densities was added, and portions of encrypted images were cropped, followed by decryption. Figure 17 shows that decrypted images remain recognizable despite noise, with PSNR values in Table 10 decreasing as noise density increases, reflecting reduced resemblance. Similarly, Fig. 18 illustrates that even with cropped portions, decrypted images preserve recognizable content, with PSNR values reported in Table 11. These outcomes confirm the proposed encryption approach resilience against noise and partial data loss.

Key sensitivity and space analysis

Key sensitivity was evaluated using the Berry test image, where encryption and decryption were performed with both the original key and slightly modified keys. As shown in Fig. 19, successful decryption occurs only with the exact key, while even minimal key variations produce unrecognizable outputs, confirming strong key sensitivity. Quantitatively, robustness is measured using the Number of Bit Change Rate (NBCR), defined as Eq. (53)

$$\begin{aligned} NBCR(b_1,b_2) = \frac{Ham(b_1,b_2)}{length} \end{aligned}$$
(53)

where Ham(.) denotes the Hamming distance between two matrices \(b_1\) and \(b_2\), and \(length\) represents the total number of bits. Figure 20 illustrates the total number of bit changes between two encrypted images \(E_1\) and \(E_2\), as well as two decrypted images \(D_1\) and \(D_2\), obtained using keys \(key_1\) and \(key_2\), respectively. For each round, the NBCR is approximately 50%, indicating that the proposed encryption algorithm is robust against small key variations, which in turn ensures high randomness in the resulting images.

In addition, the key space analysis and its comparison are summarized in Table 12. Considering the seven parameters random initial seeds(\(r_{ini},s_{ini}\)), \(\alpha\), \(\beta\), \(\eta\), and the initial values(\(x_0,y_0\)) of the chaotic map represented in double-precision floating-point format with approximately \(10^{-15}\) resolution, the total key space is approximately \(2^{348}\). This value is significantly greater than \(2^{100}\), making it suitable for cryptographic applications.

Table 13 Time complexity analysis comparison of different size images.

Time complexity analysis

The proposed algorithm consists of four linear components block hashing, entropy-based key generation, chaotic sequence generation, and Fibonacci diffusion each with complexity O(MN). In addition, recursive scrambling and Hilbert traversal introduce two quasi-linear terms, each \(O(MN \log M)\), due to hierarchical recursion and fractal path computation. Thus, the overall complexity is \(4O(MN) + 2O(MN \log M) \approx O(MN \log M)\), where the logarithmic factor dominates. This quasi-linear cost is only slightly higher than purely linear schemes, but it significantly improves security by enhancing permutation strength and diffusion robustness, making the trade-off both efficient and defensible. Further, Table 13 presents encryption and decryption times (seconds) for different image sizes, \((256 \times 256)\) and \((512 \times 512)\). It also presents time complexity and compares it with existing algorithms. Our proposed algorithm took 1.2455 s (encryption) and 1.3255 s (decryption) for \((256 \times 256)\) images and 6.045 s (encryption) and 6.241 s (decryption) for \((512 \times 512)\) images. This time complexity for encryption is slightly higher when compared to existing algorithms due to recursive scrambling but within acceptable bounds considering the stronger diffusion.

Conclusion

This study introduced a novel image encryption framework that integrates chaotic-based recursive scrambling with a Fractal–Fibonacci diffusion mechanism derived from the Hilbert curve. At its core lies a new two-dimensional chaotic system, the 2D-CPSCM, which exhibits positive LEs, confirming its hyperchaotic nature. The proposed system outperforms existing chaotic maps in statistical measures, including SE, PE and KE. Comprehensive experiments on multiple benchmark images demonstrate the robustness of the scheme, achieving strong performance in entropy, CC, NPCR, UACI, and NBCR metrics. In addition, its resistance to noise and cropping attacks further validates the resilience of the approach. Although the algorithm introduces higher computational complexity, this trade-off is justified by the enhanced security, improved randomness, and strong resistance to cryptographic attacks, making the proposed approach is suitable for secure multimedia communication. noise and cropping attack tests further validate the resilience of the scheme. Although the complexity of the algorithm increases, this trade-off is justified by the enhanced security and improved randomness in the encrypted images.