1 Introduction

Since chaotic circuits were discovered, considerable interests have arisen in developing and analyzing various circuits that exhibit chaos due to their importance in many fields of sciences and engineering [1, 2]. The idea of using chaotic oscillators to encrypt information dates back to Matthews in 1989 [3]. Since then, many contributions in the literature have exploited the close relationship between chaos properties and cryptography [4,5,6,7] to propose chaos-based cryptosystems. In this regard, some famous chaotic circuits and systems have been used to supply pseudorandom numbers needed in the encryption algorithm build-up. Some of them are Lorentz system [8], Van der Pol oscillator [9, 10], jerk systems [11], and Chua circuit [12] just to name a few.

This work describes a simple novel Chua-based memristor oscillator, with digital circuit implementation, which exhibits some multistable chaotic attractors and its chaos-based encryption. It is well known that many simple circuits with different memristors have been developed because of the remarkable dynamics induced in these systems by the nonlinear resistor [13,14,15,16]. But the simple Chua circuit [17] development to build chaos-based encryption systems in the literature is not documented enough. One aim of this paper is to bridge this gap.

On the other hand, due to the growth of computer networks, storage devices, and imaging tools, the images, video, and texts have been extensively used in various fields [18]. As images are exchanged over public networks, they are exposed to various security threats such as eavesdropping, illegal modification, and duplication, just to name a few. In many domains such as diplomacy, military, and telemedicine, confidentiality challenges cannot be overemphasized.

In the e-healthcare domain, the quality of services has been improved due to the artificial intelligence-based biomedical systems [19]. With the advent of intelligent methods, biomedical data processing becomes easier and less error prone. Moreover, remote healthcare is also possible using the IoT infrastructure. Among the data used in e-health, the biomedical images are transmitted over public networks which are exposed to hackers. However, the protection of biomedical images over the network is always considered a challenge because they are exposed to hacker. The biomedical images are generally sensitive to external disturbances and small manipulation in the data may cause huge differences in the ultimate result. Wrong diagnosis can be life threatening in some scenarios or can be severe in almost every instance. Therefore, biomedical data security is one of the major challenges and hiding them is necessary during storage, manipulation, or transmission [20]. Moreover, securing medical images requires adequate techniques for protecting patient privacy. In the context of the COVID-19 pandemic, operational updates on COVID-19 of the World Health Organization stated that globally, there have been 661,545,258 confirmed cases of COVID-19, including 6,700,519 deaths [21]. It is worth noting to mention that, among medical imaging techniques, chest X-ray and computed tomography have been considered as a powerful tool to detect COVID-19 infections, especially in emerging cases of pregnant women and children [22]. This is why we suggest in this contribution an embedded Chua memristive oscillator that could be part of an IoT system for biomedical encryption.

Encryption is a technique to hide information and is intended to ensure confidentiality, integrity, and non-repudiation. Image encryption has received much attention in the last few years [18, 23, 24]. This is more needed for biomedical images, since they are part of human information [25, 26]. A review on medical image encryption has been proposed in refs [27,28,29]. The encryption schemes are based on substitution and permutation of pixels’ images. The first step consists in changing the pixel value, while the second step consists in changing the position of the pixel image.

Over the years, a number of techniques have been used for cryptosystem development [30,31,32,33]: transform domain [34], evolutionary algorithm [35], deoxyribonucleic acid sequence [36], and others [37, 38]. Among the algorithms in the literature, chaos-based ones have experienced considerable growth, as chaos properties such as unpredictability, ergodicity, randomness, and extreme sensitivity to initial conditions and control parameters make them a good candidate for carrying out the confusion and diffusion operations required to build robust cryptosystems [39]. Chaos theory has proved to be an excellent alternative to provide a fast, simple, and reliable image encryption scheme that has a high-enough degree of security [40]. For these reasons, chaos-based image encryption technology is very promising for real-time secure image and video communications in military, industrial, and commercial applications.

Some interesting references performed image encryption using 1D to 4D chaotic to hyperchaotic systems.

Neural networks for the encryption of medical images emerged [41,42,43], with some remarkable characteristics:

  1. (i)

    Chaotic brain-like dynamics of the coupled neural network which shows that the designed cryptosystem has several advantages in the key space, information entropy, and key sensitivity [44].

  2. (ii)

    Hyperchaotic memristive ring neural network and application in medical image encryption [45] which shows a medical image encryption scheme constructed based on the MRNN from a perspective of practical engineering application. Performance evaluations demonstrate that the proposed medical image cryptosystem has several advantages in terms of key space, information entropy, and key sensitivity, compared with cryptosystems based on other chaotic systems.

  3. (iii)

    Complex dynamics, hardware implementation, and image encryption application of multiscroll memristive Hopfield neural network (MHNN) with a novel local active memristor [46] perform well in image encryption applications for the significant complexity of multiscroll.

Memristive circuits from chaotic signals have a very complex topology, which is very similar to those of high-dimensional chaotic systems [11, 47,48,49,50,51,52,53].

Among them, a genetic algorithm was used [54, 55] while others used DNA schemes [47, 56, 57]. The latter consisted in some biological and algebra operations on DNA sequences. Refs [58, 59] combined DNA and bit level permutation to strengthen the encryption algorithm.

Other refs [60,61,62] mixed many chaotic systems to improve randomicity of the chaos. They are used in the aim to increase chaoticity of the seldom map and therefore reinforce randomness of the key produced. Another good-standing contribution performed frequency domain coding approach [63]. This technique provides good security and robustness against noise and distortion attacks. The key space obtained is large enough standard to standard, and the NPCR/UACI are close to ideal values. But the computation times are not shown in this contribution. While the author of references contributes with genetic algorithm [54, 55] resulting in good cryptography metrics, the proposed contribution is robust with huge key space, short time computation, and could have better metrics with good chaotic maps. Some papers with many citations like ref. [64] built a new image encryption scheme, in which shuffling the positions and changing the gray values of image pixels are combined to confuse the relationship between the cipher image and the plain image. The experimental results demonstrate that the key space is large enough to resist the brute-force attack, and the distribution of gray values of the encrypted image has a random-like behavior.

Ref. [65] suggested a new, fast, simple, and robust chaos-based cryptosystem structure. The cryptosystem uses a diffusion layer followed by a bit-permutation layer, instead of byte-permutation, to shuffle the positions of the image pixels. The security analysis and the obtained simulation results show that the proposed cryptosystem is resistant to various types of attacks and it is efficient for hardware and software implementation.

Ref. [20] proposed an encryption scheme for the medical image encryption based on a combination of scrambling and confusion. The novelty of this paper is that they make use of chaos in both image diffusion and confusion parts. It is worth noting that the resistance of the scheme against differential and linear cryptanalysis is at least as of S-AES.

Ref. [26] shows a medical image encryption method based on a hybrid model of the modified genetic algorithm (MGA) and coupled map lattices. Experimental results and computer simulations both indicate that the proposed method that includes a hybrid algorithm not only performs excellent encryption but also is able to resist various typical attacks.

Despite this cloud of cryptosystems designed with great attention described above, we focused in this work on a medical image encryption algorithm built with Chua’s new memristive chaotic oscillator that uses an encryption technique built around a permutation-diffusion architecture. First, the raw images are subdivided into small blocks (\(4 \times 4\)). These blocks are mixed using a rotation of the image pixels. This is followed by a permutation of the pixels, making chaotic iterations along the rows and then along the columns of the mixed image using the pseudorandom number sequences of the Chua memristive chaotic oscillator. The computation of the substituted position index leads to a scrambled image. The diffusion simply consists in performing a XOR operation between the previously obtained image and a stream of pseudorandom numbers in order to obtain the encrypted image at the output of the cryptosystem. The main strengths of the new memristive Chua oscillator and the developed cryptosystem can be summarized in the following points:

  1. (a)

    The new memristive Chua oscillator displays some complex behaviors:

    1. (a)

      Period doubling and intermittency route to chaos

    2. (b)

      The coexisting of multiple attractors in the chaotic regime

    3. (c)

      Bursting and spiking oscillations for a set of its parameters.

  2. (b)

    The novel Chua oscillator is used as a pseudorandom number generator for cryptography application with interesting properties:

    1. (a)

      Simplicity of cryptosystem and fast encryption using new, simple, and famous chaotic map

    2. (b)

      The encryption key used contained image parameters resulting in the improvement of the security of our system

    3. (c)

      Robustness against attacks and therefore reinforced security, thanks to the trick of transformation of secret key to get the initial conditions and control parameters

    4. (d)

      Enhanced sensitivity to key change and key space enlargement, thanks to the used technique.

  3. (c)

    The microcontroller embedded of the oscillator experiment shows consistent results with numerical ones; therefore, it is a candidate for a critical component of the healthcare system.

The rest of this paper is as follows. The novel memristive Chua oscillator is described and mathematically modeled in Sect. 2, and some basic properties are shown in Sect. 3. It is then followed by the numerical analyses in Sect. 4 where some dynamics are investigated. The microcontroller verification is performed in Sect. 5 thereafter, and the image encryption is the object of Sect. 6. The paper ends with some concluding remarks.

2 Circuit Description and Mathematical Modeling of the Novel Memristive Chua Oscillator

The novel memristive Chua oscillator is derived from the circuit presented in ref. [66] where we replace the tunnel diode 1N3858 by the voltage-controlled memristor proposed by ref. [67]. The resulting novel circuit is described in the next section.

2.1 Circuit Description

The new memristor-based oscillator circuit introduced above is shown in Fig. 1.

Fig. 1
figure 1

a Electronic diagram of the novel memristor oscillator and b equivalent electronic diagram of the voltage-controlled memristor RM replacing the tunnel diode proposed in ref. [66]

The circuit of Fig. 1 consists of three nodes and five branches. On the first node, A connected three branches: first one with capacitor C1, the second branch with inductor in series with a DC voltage source, and third branch with resistor R. The second node B connects three branches of capacitor C2, the memristor RM and the common resistor R connecting the two nodes. The memristor part (b) is a voltage-controlled memristor proposed by Xu et al. [67]. It is connected between node B and the ground. The memristor is noted RM in this manuscript. Its internal components are displayed in Fig. 1b, and it is composed of four operational amplifier TL084-A type (u1, u2, u3, u4), three analog multiplier AD633/JN (M1, M2, M3), 10 resistors, and one capacitor C3. The summary of these electronics’ components with their values are listed in the Table 1.

Table 1 Electronic component parameter of the circuits in Fig. 1

In order to study this novel circuit, it is recommended to find its mathematical model that facilitates the following studies.

2.2 Mathematical Model of the Novel Memristive Chua

This model is obtained by first defining state variables of the circuits related to the energy storage elements. For these purposes, the voltage across capacitors C1, C2, and C3 are defined as VC1, VC2, and VC3, respectively. The current flowing across the inductor is named IL. By applying the Kirchhoff’s voltage laws (KVL) to the RM [66], the following equations are obtained from Fig. 1b:

$$\left\{ \begin{array}{l} i_{m} = \frac{1}{{R_{1} }}\left( {1 - \frac{{R_{3} }}{{R_{9} }} + \frac{{R_{3} }}{{R_{2} }}V_{C3}^{2} } \right)V_{A0} \hfill \\ \frac{{dV_{C3} }}{dt} = - \frac{1}{{R_{6} C_{1} }}V_{A0} - \frac{1}{{R_{5} C_{1} }}V_{A0} + \frac{1}{{R_{7} C_{1} }}V_{A0}^{2} V_{C3} \hfill \\ \end{array} \right.$$

By posing a = R3/R2, b = (1/R1) (R3/R9 − 1), c = 1/R6C1, d = /R5C1, e = 1/R7C1, the set of Eq. (1) becomes

$$\left\{ \begin{array}{l} i_{m} = \left( {ay^{2} - b} \right)V_{M} \hfill \\ \mathop y\limits^{ \bullet } = - cV_{M} - dy + eV_{M}^{2} y \hfill \\ \end{array} \right.$$

where a, b, c, d, and e represent the intrinsic parameters of the memristor. To verify the properties of the memory effect of the memristor, a sinusoidal voltage is to be applied to the input of the memristor \(v(t) = V_{\max } \sin (2\pi ft)\), with \(V_{\max }\) as its signal amplitude and f as its frequency [67]. Table 2 display the numeric values of the memristor parameters used.

Table 2 Parameters of the memristor RM

For the given specific parameters, the memristor behavior should be bistable, mining that the orbits from two flanks of the initial critical point move along different pinched hysteresis loops in the state space. With a periodic voltage signal v(t) applied at the input of the circuit Vmax = 0.6 V, we varied the frequency to f = 45 Hz, 50 Hz, and 75 Hz and we plot in Fig. 2a the current flowing inside RM versus the stimulus voltage. On the other figure, Fig. 2b, we maintain the frequency constant to f = 45 Hz and varied the maximum voltage of the stimulus source to Vmax = 0.6 V, Vmax = 0.7 V, and Vmax = 0.8 V and we plot the curves of current i(A) flowing inside RM versus the stimulus voltage v(V) in Fig. 2b.

Fig. 2
figure 2

The current–voltage characteristic of the memristor emulator: a Vmax = 0.6 V, we varied the frequency to f = 45 Hz, f = 50 Hz, and f = 75 Hz; b we maintain the frequency constant to f = 45 Hz and varied the maximum voltage of the stimulus source to Vmax = 0.6 V, Vmax = 0.7 V, and Vmax = 0.8 V. The initial state of the internal voltage is 0.149 V

In the light of the Fig. 2a, we observed that when Vmax is constant, the area of the hysteresis loop decreases with the increase of the frequency, while for constant frequency, this area increases with the value of the Vmax, see Fig. 2b. Thus, the characteristic fingerprints are confirmed by applying periodic signals with zero mean, showing the hysteresis behavior of the memristor. We also note the symmetric pinched loop.

By applying the KVL to the circuit diagram of Fig. 1a, the following set of equations is obtained and presented in Sect. 2.

$$\left\{ \begin{array}{l} \frac{{C_{1} dV_{1} }}{dt} = i_{L} - \frac{{V_{1} - V_{2} }}{R} \hfill \\ \frac{{C_{2} dV_{2} }}{dt} = \frac{{V_{1} - V_{2} }}{R} - \left( {\frac{{R_{3} }}{{R_{1} R_{2} }}y^{2} - \frac{1}{{R_{1} }}\left( {\frac{{R_{3} }}{{R_{9} }} - 1} \right)} \right)V_{2} \hfill \\ \frac{{Ldi_{L} }}{dt} = E - V_{1} \hfill \\ \frac{dy}{{dt}} = - \frac{1}{{R_{6} C_{3} }}V_{2} - \frac{1}{{R_{5} C_{3} }}y + \frac{1}{{R_{7} C_{3} }}V_{2}^{2} y \hfill \\ \end{array} \right.$$

By introducing the following dimensionless variables and normalized circuit parameters,

$$\left\{ \begin{array}{l} x = \frac{{V_{1} }}{1000V};z = \frac{{V_{2} }}{1000V};z = \frac{{i_{L} }}{100A};\tau = RC_{1} t;\alpha = R;\alpha_{1} = \frac{{RC_{1} }}{{R_{6} C_{3} }} \hfill \\ \alpha_{2} = \frac{{RC_{1} }}{{R_{5} C_{3} }};\alpha_{3} = \frac{{RC_{1} }}{{R_{7} C_{3} }};\alpha_{4} = \frac{{C_{1} }}{{C_{2} }};\alpha_{5} = \frac{{RC_{1} }}{L} \hfill \\ \beta_{1} = \frac{{R_{3} R}}{{R_{1} R_{2} }};\beta_{2} = \frac{R}{{R_{1} }}\left( {\frac{{R_{3} }}{{R_{9} }} - 1} \right);u = E;a = 1000 \hfill \\ \end{array} \right.$$

The state Eq. (3) can be written in dimensionless form as

$$\left\{ \begin{array}{l} \dot{x} = \alpha w - x + z \hfill \\ \dot{y} = - \alpha_{1} z - \alpha_{2} y + \alpha_{3} z^{2} y \hfill \\ \dot{z} = \alpha_{4} \left( {x - z - \left( {\beta_{1} y^{2} - \beta_{2} } \right)z} \right) \hfill \\ \dot{w} = \alpha_{5} (u - ax) \hfill \\ \end{array} \right.$$

3 Basic Properties of the Novel Memristive Chua Oscillator

In this section, some analytical properties of the system (5) are presented such as symmetry, dissipativity, and equilibrium point study.

3.1 Symmetry

Based on the symmetry of the above memristor, it is crucial to check if the novel circuit conserved this property. Indeed, it gives information about the number of solutions of the system. Thus, for an asymmetric system, the solutions are unique. On the other hand, for symmetrical systems, the solutions are in pairs; otherwise, they are symmetric around the origin of the state space. Starting from the equation system of the proposed model, we see that it is not variant to the transformation \((x_{1} ,x_{2} ,x_{3} ,x_{4} ) \Rightarrow ( - x_{1} , - x_{2} , - x_{3} , - x_{4} )\). Therefore, our system is not symmetric, and therefore, we do not expect symmetric solutions of Eq. (5).

3.2 Dissipation and Existence of Attractor

The study of the dissipation and the existence of attractors are the first research step of the dynamical behavior of a dynamic system [68, 69]; it aims to verifying the existence of solutions in state space. Note that if the dissipation is greater than zero, then there is no solution in state space, and if, on the other hand, it is less than zero, the solutions exist in the state space. The attractor dissipation formula is given by Eq. (6).

$$\Lambda = V^{ - 1} \frac{dV}{{dt}} = \frac{{\partial \dot{x}_{1} }}{{\partial x_{1} }} + \frac{{\partial \dot{x}_{2} }}{{\partial x_{2} }} + \frac{{\partial \dot{x}_{3} }}{{\partial x_{3} }} + ... + \frac{{\partial \dot{x}_{n} }}{{\partial x_{n} }} < 0$$

By applying Eq. (6) to the system (5), we obtained the Eq. (7)

$$\Lambda = \alpha_{3} z^{2} + \alpha_{4} \left( {\beta_{2} - 1 - \beta_{1} y^{2} } \right) - 1 - \alpha_{2}$$

We choose the parameters α3, α4 and β1, β2 such that Eq. (7) is negative. Therefore, the novel oscillator is dissipative and can develop attractors in the state space.

3.3 Equilibrium Point Study

The equilibrium point of a dynamical system is defined as the set of starting points for which the system does not evolve in space time [70]. Thus, the equilibrium points of the system are obtained by solving the equation \(\dot{x} = \dot{y} = \dot{z} = \dot{w} = 0\). By setting α1 = 45 × 10−7, \({\alpha }_{2}\) = 0.054, \({\alpha }_{3}\) = 0.036, \({\alpha }_{4}\) = 1.41, \({\alpha }_{5}\) = 0.007558, \({\beta }_{1}\) = 1.5, \({\beta }_{2}\) = 7.5, α = 1.5, and a = 1000, we get only one equilibrium point E0 as E0 (\({10}^{-3}\), 1.282 × \({10}^{-8}\), −1.538 × \({10}^{-4}\), 1.153 × \({10}^{-3}\)).

The Jacobian matrix of system (5) evaluated at the equilibrium point E0 is computed as in Eq. (8).

$$J = \left[ {\begin{array}{*{20}c} { - 1} & 0 & 1 & \alpha \\ 0 & {\alpha_{3} z^{2} - \alpha_{2} } & {2\alpha_{3} yz - \alpha_{1} } & 0 \\ {\alpha_{4} } & { - 2\alpha_{4} \beta_{1} yz} & {\alpha_{4} (\beta_{2} - 1 - \beta_{1} y^{2} )} & 0 \\ { - \alpha_{5} a} & 0 & 0 & 0 \\ \end{array} } \right]$$

with \(\det (J - \lambda I_{4} ) = 0\); where I4 is the 4X4 identity matrix. The characteristic equation is written as follows:

$$\begin{array}{l} - \lambda^{4} + (N + 1 - M)\lambda^{3} + (N - MN + M + L - \alpha_{4} - \alpha \alpha_{5} a)\lambda^{2} + \hfill \\ ( - MN + L + G + \alpha P\alpha_{5} a + \alpha T)\lambda + F - \alpha PT = 0 \hfill \\ \end{array}$$

with \(N = \alpha_{4} (\beta_{2} - 1 - \beta_{1} y^{2} )\); \(M = - \alpha_{3} z - \alpha_{2}\); \(L = 2\alpha_{4} \beta_{1} yz(2\alpha_{3} yz - \alpha_{1} )\); \(G = \alpha_{4} ( - \alpha_{3} z + \alpha_{2} )\); \(P = \alpha_{3} z - \alpha_{2}\); \(T = \alpha_{5} \alpha_{4} (\beta_{2} a - a - \beta_{1} y^{2} )\); and \(F = 2\alpha_{5} \alpha \alpha_{4} \beta_{1} ayz\).

Considering the value used to get the equilibrium point E0, we computed in Table 2 the corresponding eigenvalues. In this regard, we have chosen for some discrete values of \(\beta\) and display the eigenvalues of the Eq. (9) in Table 3.

Table 3 Eigenvalues of the characteristic equation and the stability nature of the trivial equilibrium point E0

We have computed the eigenvalues from Eq. (9) in Table 3 by setting the parameter α = αconstant and by varying \(\beta_{2}\) in around the value of stability and instability regimes.

We realize that the stability nature of the equilibrium point E0 changes from stable to unstable by well-known Hof bifurcation phenomenon (not demonstrated here for simplicity reason of the paper) when the parameter \(\beta_{2}\) passes the critical value \(\beta_{2Critical} = 1\).

In global view, to share the dynamic behaviors of the system (5) versus the parameters α and β2, we plot in the space \(\left( {\alpha ,\beta_{2} } \right)\), the sign of real part of the eigenvalue in the Fig. 3 (negative sign in color blue and positive sign in color red of system (5)).

Fig. 3
figure 3

Stability diagram of the novel Chua oscillator in the plane \((\alpha ,\beta_{2} )\) highlighting the stable regions (color blue) and unstable regions (color red) of system (5)

3.4 Stability Diagram

The stability diagram of the only equilibrium point E0 versus the parameters α and β2 is presented in Fig. 3.

We observed in the light of Fig. 3 that the stable region is separate from the unstable region by the critical line of equation \(\beta_{2Critical} = 1\). The parameter \(\alpha\) does not influence the stability of the system (5). Another remark is that the unstable surface is greater that the stable surface. For the rest of this paper, we will choose the \(\beta_{2}\) > 1.

4 Numerical Study

This section deals with the numerical analyses of the system (5) using the fourth order Runge Kutta algorithm (RK4). The numerical computation environment is Pascal compiler with variable in extended precision running on an Intel core i5 processor computer with 4 GB of RAM. The well-known methods for dynamical systems analysis such as 2D bifurcation diagram, phase portraits, largest Lyapunov exponent plot, times series, and basin of attraction diagram are used.

4.1 2D Bifurcation Diagrams

The 2D bifurcation diagrams play a very important role in engineering applications because they provide a wider view on the system dynamics under investigation [71]. The following diagrams in Fig. 4 are obtained by varying at the same time two important parameters of the system (5) in order to have a global view on the evolution of the system: firstly, \(1 < \beta_{1} < 1.5\), \(1 < u < 4.5\) in Fig. 4a, and secondly, \(3 < u < 7\) in Fig. 4b; \(1 < \alpha < 1.5\).

Fig. 4
figure 4

2D bifurcation diagrams in the plane: a (\(u\)\(\beta_{1}\)) and b (\(u\)\(\alpha\)) depicting the region of complex dynamics of the system (4) with respect to the maximum Lyapunov exponent (MLE) (right column bar); System (5) parameters are \(\alpha 1 \, = \, 45 \times 10 - 7, \, \alpha_{2} \, = \, 0.054, \, \alpha_{3} \, = 0.036,\alpha_{4} \, = 1.41, \, \alpha_{5} \, = 0.007558,\beta_{1} \, = 1.5, \,\)\(\beta_{2} \, = 7.5,u = 1, \, a = 1000.\) Initial conditions are (x0; y0; z0; w0) = (0.025; 0.27; 0.001; 0) (Color figure online)

The colors on these diagrams described the behavior of the novel Chua memristive oscillator according to the value of the MLE (maximum Lyapunov exponent), computed using the well-known method described by Wolf et al. in ref. [72]. In the light of these figures, the light green, cyan, dark red, and magenta characterize a chaotic motion while the blue, dark-blue, and light green represent periodic or quasi-periodic motion. It is therefore visible that parameters \(u\), \(\beta_{1}\), and \(\alpha\) induced many diverse and interesting dynamics. For these reasons, we chose them in their interesting interval to study the scenario toward chaos.

4.2 Transition to Chaos

In this subsection, we study the transition into chaos toward different parameters of the system namely \(\alpha\) and \(u\) chosen from Fig. 4. The transition to chaos is illustrated by plotting the bifurcation diagram which represents the local maximums when a parameter of the system is varied [73]. In the following diagrams, we can easily study and predict the long-term behavior of a dynamic system as show in the following subsections.

4.3 Transition to Chaos with the Parameter α

A system is sensitive toward a parameter when, by plotting the bifurcation diagram versus that parameter, we observe a qualitative and quantitative change in the dynamics. This behavior is generally observed in chaotic oscillators as Wien bridge oscillator [74], jerk circuit [75], and more others.

Figure 5a represents the bifurcation diagram by varying the \(\alpha\) parameter: \(1 < \alpha < 1.5\). The system exhibits period-2 oscillations in the range \(1 < \alpha < 1.18\) followed by chaotic oscillations up to \(\alpha = 1.28\). Then, a periodic dynamic of period −7 appears followed by a chaotic dynamics in an explanatory way: This is the intermittency route to chaos phenomenon [74]. Figure 5b is the plot of the maximum exponent of Lyapunov for increasing and decreasing value of the control parameter α: \(1 < \alpha < 1.5\). The purpose of plotting this figure is to confirm the dynamics observed in the bifurcation diagram [69].

Fig. 5
figure 5

a Bifurcation diagrams of local maxima of state variable x and b MLE (λmax) plotted in the range \(1 < \alpha < 1.5\) while keeping α1 = 45 × 10.−7, α2 a = 0.054, α3 = 0.036, α4 = 1.41, α5 = 0.007558, β1 = 1.5, β2 = 7.5, u = 1, and a = 1000 constants. Blue curve is for increasing value \(\alpha\), while red curve is for decreasing value. Initial computing state (0.025, 0.27, 0.001, 0)

We also notice that the increasing path (blue curve) is different from the decreasing path (red curve) of the control parameter: This is known as the hysteresis phenomenon [76]. The hysteresis behaviors are observed in many dynamic systems as in ref. [77]; this behavior is sometimes at the origin of multistability dynamics [78].

4.3.1 Dynamic 1 Revealed: Intermittency Route to Chaos on Parameter α

In dynamical systems, intermittency is the irregular alternation of phases of apparently periodic and chaotic dynamics (Pomeau–Manneville dynamics), or different forms of chaotic dynamics (crisis-induced intermittency) [79]. They described three routes to intermittency where a nearly periodic system shows irregularly spaced bursts of chaos [80]. The following Fig. 6 shows some phase portraits alongside with a time traces of the system (5) for some discrete values of \(\alpha\).

Fig. 6
figure 6

Intermittency route to chaos of system (5) by varying parameter \(\alpha\): a period-2 attractor with \(\alpha = 1.1\); b chaotic attractor with \(\alpha = 1.2\). Other parameters: \({\mathrm{\alpha }}_{1}\)= 45 × 10.−7, \({\mathrm{\alpha }}_{2}\) = 0.054, \({\mathrm{\alpha }}_{3}\) = 0.036, \({\mathrm{\alpha }}_{4}\)= 1.41, \({\mathrm{\alpha }}_{5}\) = 0.007558, \({\upbeta }_{1}\) = 1.5, \({\upbeta }_{2}\) = 7.5, u = 1, and a = 1000. (i) are the phased portraits while (ii) are the corresponding time traces. Initial conditions \((x_{0};\,y_{0};\,z_{0};\,w_{0} ) = \left( {0.025;\,0.27;\,0.001;\,0} \right)\)  

Figure 6 shows the phase portraits of different transitions observed in our bifurcation diagram with their corresponding temporal traces. Firstly, we obtained an attractor of period-2 with \(\alpha = 1.1\) and after tiny changes of control parameter \(\alpha\), the dynamic changes directly to chaotic with \(\alpha = 1.2\), which confirms the comments above.

4.4 Transition to Chaos with DC Voltage u

We remarked that the parameter \(u\) presents rich dynamics that can be exploited for the study of the global dynamics of the novel memristive Chua oscillator. In addition, the parameter \(u\) has a physical meaning which represents for the studied system, the direct voltage connected in series with the inductance L. We plotted in Fig. 7 the bifurcation diagram of the system (5) with respect to parameter \(u\) and its corresponding MLE.

Fig. 7
figure 7

Bifurcation diagram showing local maxima of state variable \({\text{x}}\) (a) and the MLEs (λmax) (b), plotted in the range \(3 < u < 7\) taking \({\alpha }_{1}\)= 45 × 10−7, \({\alpha }_{2}\) = 0.054, \({\alpha }_{3}\) = 0.036, \({\alpha }_{4}\)= 1.41, \({\alpha }_{5}\) = 0.007558, \({\beta }_{1}\) = 1.5, \({\beta }_{2}\) = 7.5, α = 1.5, and a = 1000. Blue curve is for increasing value \(\alpha\), while red curve is for decreasing value. Initial conditions \((x_{0} ;\,y_{0} ;\,z_{0} ;\,w_{0} ) = \left( {0.025;\,0.27;\,0.001;\,0} \right)\)  

Figure 7 represent the outward and inward bifurcation diagrams while varying the parameter u as well as the corresponding MLE spectrum. The interval of this parameter is \(3 < u < 7\). As in the previous subsection, we also record the phenomenon of hysteresis marked by the non-superposition of the blue curve and the red curve.

Some sample-phased portraits Fig. 8(i) with the corresponding time traces Fig. 8(ii) are drawn in the following line to illustrate the sensitivity of the system (5) toward u.

Fig. 8
figure 8

Route to chaos by varying the parameter u: a period-3 attractor with \(u = 7\); b period-6 attractor with \(u = 6.3\); c period-12 attractor with \(u = 5.3\); and d chaotic attractor with \(u = 3\). The others parameter are \({\alpha }_{1}\)= 45 × 10−7, \({\alpha }_{2}\) = 0.054, \({\alpha }_{3}\) = 0.036, \({\alpha }_{4}\)= 1.41, \({\alpha }_{5}\) = 0.007558, \({\beta }_{1}\)= 1.5, \({\beta }_{2}\) = 7.5, α = 1.5, and a = 1000. Initial condition \((x_{0} ;\,y_{0} ;\,z_{0} ;\,w_{0} ) = \left( {0.025;\,0.27;\,0.001;\,0} \right)\)  

Figure 8 shows phase portraits of the different transitions observed in the bifurcation diagram on Fig. 7 for varying \(u\), with their corresponding temporal traces. We obtained an attractor of period-2 with \(u = 7\); period-4 attractor with \(u = 6.3\); period-8 attractor with \(u = 5.3\); and chaotic attractor with \(u = 3\). We can conclude that the system enters chaos by well-known period doubling route [73].

4.4.1 Dynamics 2 Revealed: Coexistence of Multiple Attractors

The multistability is the ability of a system to present different a long-term dynamic with the same set of system parameters and with only changing initial conditions. In chaotic systems, it is defined by the coexistence of multiple attractors in phase space [74, 81]. Note that these solutions are found by fixing the system parameters and by just varying only the initial conditions [82]. This phenomenon is very interesting because it has encountered many engineering systems like electronics circuits [73, 83], Josephson junction [84], biological systems [85], and chemical reaction [86], just to name a few. They are, for some other engineering applications, avoided.

The diagrams in Fig. 9 are obtained by fixing \(\alpha \, = 1.16\) and by changing only the initial conditions from (× 0; y0; z0; w0) = (2; 2; 0.001; 0) to (× 0; y0; z0; w0) = (0.025; 0.27; 0.001; 0). We obtained two different dynamics: a limit cycle of period-2 and a chaotic attractor. This phenomenon is characterized by sensitivity to initial conditions. It is caused by the presence of hysteresis branches observed in the bifurcation diagrams (see Figs. 5 and 7). We therefore drawn the basin of attraction for each found coexisting attractor in Fig. 10 in order to highlight all the initials conditions resulting to each attractor.

Fig. 9
figure 9

Phase portraits showing the coexistence of two kinds of attractors for α = 1.16; a chaotic attractor taking initials conditions: (× 0; y0; z0; w0) = (2; 2; 0.001; 0) and b period-2 attractor taking (× 0; y0; z0; w0) = (0.025; 0.27; 0.001; 0). The system parameters are \({\alpha }_{1}\) = 45 × 10−7, \({\alpha }_{2}\) = 0.054, \({\alpha }_{3}\) = 0.036, \({\alpha }_{4}\) = 1.41, \({\alpha }_{5}\) = 0.007558, \({\beta }_{1}\) = 1.5, \({\beta }_{2}\) = 7.5, and a = 1000

Fig. 10
figure 10

Basin of attraction plotted in the plane (X(0), Y(0)) showing initial conditions that lead to each coexisting steady states: magenta area is for chaotic attractor while blue area is for a period-2 attractor. System (5) parameters are \({\mathrm{\alpha }}_{1}\) = 45 × 10.−7, \({\alpha }_{2}\) = 0.054, \({\alpha }_{3}\) = 0.036, \({\alpha }_{4}\) = 1.41, \({\alpha }_{5}\) = 0.007558, \({\beta }_{1}\) = 1.5, \({\beta }_{2}\) = 7.5, α = 1.5, a = 1000, and u = 1 (color online)

The basin of attraction of an attractor is defined as the set of points in the phase space which give an evolving trajectory toward the attractor considered. Pools can extend into infinity, but we stay between [−3, 3] for simplicity of the figure. Some good-standing papers describe the evidence of this behaviors in electronic chaotic oscillators [87, 88], electrical machines [89], chaotic systems [73], and many others.

In the light of Fig. 10, we can see that the blue area that represents initial conditions evolving to the period-2 attractor is larger than the magenta zone that evolve to the chaotic attractor in the plane \(\left( {X\left( 0 \right),Y\left( 0 \right)} \right)\). The other planes are not shown for simplicity of the paper.

4.4.2 Dynamics 3 Revealed: Spiking and Chaos Bursting

Another interesting dynamic found in this contribution is the spiking and dynamic bursting oscillations. Bursting behavior is an extremely diverse [90] and is found during the activation patterns of neurons in the central nervous system and spinal cord where periods of rapid action potential spiking are followed by quiescent periods much longer than typical inter-spike intervals [91]. We choose the set of parameters \(\alpha\) = \(\alpha_{1}\) = 45 × 10−7, \(\alpha_{2}\) = 0.054, \(\alpha_{3}\) = 0.036, \(\alpha_{4}\) = 1.41, \(\alpha_{5}\) = 0.007558, \(\beta_{1}\) = 1.5, \(\beta_{2}\) = 7.5, \(\alpha\) = 1.5 and record the phase portraits and the time traces of the state variable z and x.

The bursting and the spiking displayed in Fig. 11 are interesting phenomena found in the study of the dynamics of our novel memristive Chua oscillator. This phenomenon shows the slow variables Fig. 11a and the fast variables Fig. 11b of the system (5) during its evolution over time. These phenomena are found in many engineering systems [92] and are used in telecommunications [93].

Fig. 11
figure 11

Temporal traces of the variables z and x (top) and phase portraits (bottom) marked respectively by the phenomenon of spiking and bursting for the initial conditions (× 0; y0; z0; w0) = (1; −0.27; −0.2; 1). The system (5) parameters are \(\alpha\) = \(\alpha_{1}\) = 45 × 10−7, \(\alpha_{2}\) = 0.054, \(\alpha_{3}\) = 0.036, \(\alpha_{4}\) = 1.41, \(\alpha_{5}\) = 0.007558, \(\beta_{1}\) = 1.5, \({\upbeta }_{2}\) = 7.5, \(\alpha\) = 1.5, and a = 1000 for bursting and \(\alpha_{3}\) = 0.0036 for the spiking

This section end with some interesting dynamics revealed. The next section is focused on the microcontroller experiment to confirm their existence in the novel Chua memristive oscillator.

5 Experimental Study: Microcontroller Implementation

In this section, we proposed an embedded system of the Chua memristive circuit based on the Arduino MEGA microcontroller to confirm the revealed dynamics. This is one of the best methods of implementing dynamic systems because the implementation errors are very low [74]. Note that there are also other digital implementations using FPGA, FPAA, or PIC microcontrollers. Using the RK4 integration method, we solve the discrete version of system (5) using the microcontroller. We are able to retrieve the information in the card from the serial port of the card. The complete setup of the implementation of the novel memristive Chua oscillator is displayed in Fig. 12.

Fig. 12
figure 12

Microcontroller design circuit embedded the novel memristive Chua oscillator

In Fig. 12, the computer is connected to the USB port of an Arduino card built on a simple ATmega2560 microprocessor. The novel memristive Chua oscillator described by system (5) is transformed in its numerical form by means of the 4th order Runge Kutta numerical method with tiny a step time of 0.005 in Arduino software and downloaded in the Arduino card. The resulting real state variables are sent to the serial monitor of the software from the analog signal. Figures 13, 14 and 15 show the phase planes obtained from the microcontroller of embedded novel memristive Chua oscillator.

Fig. 13
figure 13

Route to chaos using Arduino: The first figure obtained with u = 7, the second with u = 6.3, the third with u = 5.3, and the fourth with u = 3. Initial conditions \((x_{0} ;\,y_{0} ;\,z_{0} ;\,w_{0} ) = \left( {0.025;\,0.27;\,0.001;\,0} \right).\) These figures resemble the one in Fig. 8, Sect. 4

Fig. 14
figure 14

Intermittency route to chaos confirmed: The first figure obtained with \(\alpha = 1.1\) and alpha second with \(\alpha = 1.2\). Initial condition \((x_{0} ;\,y_{0} ;\,z_{0} ;\,w_{0} ) = \left( {0.025;\,0.27;\,0.001;\,0} \right)\). These figures resemble the ones in Fig. 6

Fig. 15
figure 15

Multistability behavior experiment using Arduino: The first figure obtained with \(\alpha = 1.16\). Initial condition \(\left( {x0; \, y0; \, z0; \, w0} \right) \, = \, \left( {2 \, ; \, 2 \, ; \, 0.001 \, ; \, 0} \right)\), and the second with initial condition \((x_{0};\,y_{0};\,z_{0};\,w_{0} ) = \left( {0.025;\,0.27;\,0.001;\,0} \right).\) These curves resemble the ones in Fig. 9

The well-known period doubling route to chaos versus voltage u is confirmed experimentally.

As the reader can notice, the intermittence route to chaos revealed in Fig. 6 is confirmed experimentally.

In the light of Fig. 15, the coexisting of 2 different kinds of attractor revealed in Fig. 9 is confirmed experimentally.

From Figs. 13, 14 and 15, we notice that the results obtained experimentally are in agreement with the numerical results obtained in Sect. 4, which shows that our system can be used in engineering applications such as image encryption [94], telemedicine [95], and more others.

These interesting dynamics summarizes a contribution in the research community regarding the idea of founding novel oscillators that have interesting dynamics and that can be helpful in some engineering application [96]. Therefore, in the following Sect. 6, the engineering application (biomedical image encryption) of the novel Chua memristive oscillation is presented.

6 Image Encryption Using the Novel Chua Oscillator

In this section, we are going to use the novel Chua circuit as a random number generation for image encryption as an engineering application.

6.1 Pseudorandom Number Generation

A pseudorandom number generator (PRNG), is an algorithm that generates a sequence of numbers with certain properties of chance [36]. For example, numbers are assumed to be sufficiently independent of each other, and it is potentially difficult to spot groups of numbers that follow a certain rule (group behaviors). Pseudorandom numbers are usually generated from chaotic systems [36], chaotic maps [97], and more others. In addition, note that pseudorandom numbers generated are applied in the encryption of medical information [98]. Our scheme of producing pseudorandom numbers is as follows (Fig. 16).

Fig. 16
figure 16

Flow chart of the PRNG

The bits generated from the previous flowchart must be subjected to NIST test 800–22 Rev. 1a [99] if they are intended for cryptography application. The NIST test allows you to check if the generated bits are random enough to guarantee their use in key for image encryption [100]. The following Table 4 shows the NIST test 800–22 Rev. 1a test carried out.

Table 4 NIST test 800–22 Rev. 1a performed on data coming from the system (5)

Table 4 shows the NIST tests performed on our system (5), each time keeping the last eight bits of the three different state variables. We can see for different tests, the \(P - value \ge 0.01\): This is the necessary condition for the success of a statistical test [101]. Hence, our 4D system is authorized to be used in a cryptosystem application [102].

6.2 Description of the Encryption/Decryption Scheme

In this subsection, the data produced by the Chua’s new chaotic map are used in a permutation-diffusion structure for encryption and decryption of some images and a set of combined images. The main steps of the encryption algorithm are shown in Sect. 6.2.1 and those of the decryption algorithm are shown in Sect. 6.2.2.

6.2.1 Encryption Scheme

The flowchart of the proposed algorithm consists of three parts, namely, a preprocessing part, a permutation part, and a diffusion part shown in Fig. 17.

Fig. 17
figure 17

Flowchart of the proposed encryption scheme

The proposed scheme is designed to encrypt one or more images. When a plain image consists of a single source of information, the permutation operation at the pixel level is sufficient to perform the diffusion of it. On the other hand, when the plain image contains several sources of information (a medical image, different medical images in a combined image), it becomes necessary to carry out a first preprocessing operation. It consists of an image pixel rotation (or circular transformation) of blocks of pixels that allows in addition to the rotations to interchange the positions of the blocks in the split image while maintaining parallelism. For this, we used the procedure described in Algorithm 1 because it increases the randomness in the image and reduces the correlation of the image to process. This circular transformation phase results in a mixed image which is then used in the permutation phase at the pixel’s level. In this phase of permutation, the chaotic sequence is generated and used to modify the position of the pixels of the mixed image, in order to obtain the permuted image. Then, a diffusion phase is performed by applying a bit-by-bit XOR operation between another chaotic sequence generated by our chaotic Chua system and the permuted image to obtain the encrypted image. The encryption process is detailed below.

Step 1:

  1. (a)

    Split the original image (or combined images) into main image elements (or sub-blocks of small images);

  2. (b)

    A pixel block rotation (or circular transformation) is performed between the different image sub-blocks of the main image elements as described by Algorithm 1. The resulting image is a mixed element image.

Step 2:

Introducing the original image (of size [M N] where M is the number of rows and N is the number of columns) is fed into the SHA-256 hash function to produce the keys \(x_{0} ,\,y_{0} ,\,z_{0} ,\,w_{0}\) for the proposed new Chua chaotic oscillator. More precisely, we obtained a 256-bit hash key that can be denoted by \(k = k_{1} ,\,k_{2} ,\,...,\,k_{32}\); then, the 256-bit secret key is divided into 8-bit blocks (\(k_{i} = \left\{ {k_{1} ,\,k_{2} ,\,...,\,k_{8} } \right\}\)). The keys of our new proposed Chua chaotic map here are obtained as follows:

$$\left\{ \begin{array}{l} x_{0} = \frac{1}{{2^{8} }}\left( {k_{1} \oplus k_{8} \oplus k_{2} \oplus k_{7} \oplus k_{3} \oplus k_{6} \oplus k_{4} \oplus k_{5} } \right) \hfill \\ y_{0} = \frac{1}{{2^{8} }}\left( {k_{9} \oplus k_{16} \oplus k_{10} \oplus k_{15} \oplus k_{11} \oplus k_{14} \oplus k_{12} \oplus k_{13} } \right) \hfill \\ z_{0} = \frac{1}{{2^{8} }}\left( {k_{17} \oplus k_{24} \oplus k_{18} \oplus k_{23} \oplus k_{19} \oplus k_{22} \oplus k_{20} \oplus k_{21} } \right) \hfill \\ w_{0} = \frac{1}{{2^{8} }}\left( {k_{25} \oplus k_{32} \oplus k_{26} \oplus k_{31} \oplus k_{27} \oplus k_{30} \oplus k_{28} \oplus k_{29} } \right) \hfill \\ \end{array} \right.$$

where \(\oplus\) is the bitwise or exclusive operation. Due to the high sensitivity of the raw image for SHA-256, the slightest change in the original image will result in completely different secret keys. Considering the original images of thorax, phalanges, and combined images, the initial conditions are chosen as follows: \(\left( {x_{0} ,\,y_{0} ,\,z_{0} ,\,w_{0} } \right)\), \(\left( {x_{0} ,\,y_{0} + d_{2} ,\,z_{0} + d_{3} ,\,w_{0} } \right)\), and \(\left( {x_{0} ,\,y_{0} + d_{1} ,\,z_{0} + d_{1} ,\,w_{0} } \right)\), with \(d_{1} = 0.1\), \(d_{2} = 0.2\), and \(d_{3} = 0.5\) depending on whether we have the thorax image (\(256 \times 256\)), phalanges (\(512 \times 512\)), and combined images (\(512 \times 512\)), respectively.

Step 3:

  1. (a)

    Use the previously obtained initial conditions \(\left( {x_{0} ,\,y_{0} ,\,z_{0} ,\,w_{0} } \right)\) and the control parameters \(\alpha ,\,\alpha_{1} ,\,\alpha_{2} ,\,\alpha_{3} ,\,\alpha_{4} ,\,\alpha_{5} ,\,\beta_{1} ,\beta_{2} ,\,u,\,a\) of our Chua chaotic system as the key parameters of our cryptosystem.

  2. (b)

    After specifying the key parameters, use the fourth order Runge–Kutta discretization algorithm to iterate Eq. (5) n times and generate two sequences of values \(X_{1} = \left\{ {x_{1} ,\,x_{2} , \ldots ,\,x_{n} } \right\}\), \(Y_{1} = \left\{ {y_{1} ,\,y_{2} , \ldots ,\,y_{n} } \right\}\), or n = M

The first sequence of values \(X_{1}\) is intended to scramble the image of mixed elements along the rows and the second \(Y_{1}\) along the columns. The first 10,000 iterations are dropped.

figure a

Step 4:

  1. (a)

    Arrange the values of the chaotic sequences obtained previously in ascending order;

  2. (b)

    For each position of couple row-column \(\left( {x_{i} ,\;y_{i} } \right)\) of pixels of the image, look for the previous position of the corresponding couple row-column \(\left( {X_{i - 1} ,\;Y_{i - 1} } \right)\) of the ordered and substituted pseudorandom values.

    $$\left( {x_{i} ,\,y_{i} } \right) \leftarrow \left( {X_{i - 1} ,\,Y_{i - 1} } \right)$$
  3. (c)

    Permute the position of the last pixel of the image with a real.

Step 5:

Convert the permuted image as a column vector.

Step 6:

  1. (a)

    Do the same as in Step 3 (a);

  2. (b)

    Use the fourth order Runge–Kutta discretization algorithm to iterate Eq. (5) and generate a sequence of values \(Z_{2} = \left\{ {z_{1} ,\,z_{2} , \ldots ,\,z_{M \times N} } \right\}\), where M and N are, respectively, the number of rows and columns of the original image.

  3. (c)

    Load the values of the chaotic sequence \(Z_{2}\) into an array \(W\) of the same size with the permuted (or encrypted) image.

Step 7:

Reshape the values \(W\) of as a column vector.

Step 8:

Calculate the pixel value \(C(i)\) of the encrypted image using the pixel of the permuted (or scrambled) image \(P(i)\) and the column vector of the chaotic sequence values \(W(i)\) according to the following relationship:

$$C(i) = P(i) \oplus floor\left[ {\bmod \left( {W(i) \times 10^{15} } \right),\;256} \right]$$

Or \(i = 1,2,...,M \times N\).

Thus, the cipher image is obtained.

6.2.2 Decryption Scheme

To recover the permuted (or scrambled) image during decryption, it is sufficient to perform the inverse form of Eq. (12) as follows:

$$P(i) = C(i) \oplus floor\left[ {\bmod \left( {W(i) \times 10^{15} } \right),\;256} \right]$$

Or \(i = 1,2,...,M \times N\).

Thus, the scrambled (or permuted) image is obtained.

The raw image is obtained by decrypting the permuted image following the decryption flowchart in Fig. 18.

Fig. 18
figure 18

Flowchart of the proposed decryption scheme

6.3 Experimental Results

The encryption/decryption process is applied on 3 biomedical images: Thorax \(\left( {256 \times 256} \right)\), phalanges \(\left( {512 \times 512} \right)\), and combined image \(\left( {512 \times 512} \right)\) as shown in the first line of Fig. 19.

Fig. 19
figure 19

Medical images of a thorax, b phalanges, and c combined: from top to bottom: plain, circular transformation, cipher, and decipher. a Thorax, b phalanges, c and combined image

Then, the mixed and ciphered images of the latter are shown in the second and third line of Fig. 19. Thereafter, the recovered images are shown in the fourth line of Fig. 19. Simulations are carried out on a computer using the MATLAB 2012b platform, Windows 10 operating system, Intel(R) Core (TM) i5-4030 M CPU @ 1.9 GHz, and 4 GB RAM. In order to appreciate the efficiency of the proposed cryptosystem against the mains attacked, many tests and analyses are performed in the upcoming subsection.

6.4 Performance Analyses

This subsection is devoted to show some indicators and results to access the performances of our cryptosystem. They are key space, key sensitivity, differential attack, statistical analyses, histogram, speed analysis, and noise attack just to mention some critical ones.

6.4.1 Key Space

For a good cryptosystem, the key space should be large enough to invalidate violent attack [103, 104]. It is built from available key used in the cryptosystem. For our cryptosystem, the initial conditions (x0, y0, z0, w0) and the parameters (\(\alpha\), \(\alpha_{1}\), \(\alpha_{2}\), \(\alpha_{3}\), \(\alpha_{4}\), \(\alpha_{5}\), \(\beta_{1}\), \(\beta_{2}\), \(u\), \(a\)) of the chaotic oscillator constitute the key space parameters. Therefore, the key space is around (1015)4 × (1015)10 = 10210≈2630. The suggested accuracy is 10−15, for 64 bits’ double precision number, which depends on the IEEE floating point rule. The resulting key space is 26 times greater than the value of key space to be safe 2100. Therefore, the key space is not the means by which this encryption algorithm will fail.

6.4.2 Key Sensitivity

For a good cryptosystem, a tiny change in the secret key should result in a completely different cipher image for the same input image. In this way, one cannot decrypt the cryptogram of the other cryptosystem. It then becomes very difficult to carry out a plain image or chosen cipher image attack. To verify this property, we performed a slight change in the key of order of 10−5, resulting in difficulty to decrypt the cipher image. We tested this property by modifying of 14 parameters of the key and results in image difficulty to decrypt as shown in Fig. 20.

Fig. 20
figure 20

Key sensitivity analysis when decrypting the encrypted image of thorax by slightly changing the secret key: a \(y_{0}\) modified to \(y_{0}^{\prime } = y_{0} + 10^{ - 15}\), b \(\alpha\) modified to \(\alpha^{\prime}\, = \alpha + 10^{ - 15}\), c \(\alpha_{5}\) modified to \(\alpha_{5}^{\prime } = \alpha_{5} + 10^{ - 15}\), d \(\beta_{1}\) modified to \(\beta_{1}^{\prime } = \beta_{1} + 10^{ - 15}\), e \(z_{0}\) modified to \(z_{0}^{\prime } = z_{0} + 10^{ - 15}\), and f \(\alpha_{1}\) modified to \(\alpha_{1}^{\prime } = \alpha_{1} + 10^{ - 15}\)

6.4.3 Differential Attack Analysis

There are two main parameters to analyze the differential attacks: the number of pixels change rate (NPCR) and the unified average changing intensity (UACI). These parameters test the sensitivity algorithm toward slightest changes in plain image [48].

NPCR The NPCR is defined as the percentage of different pixel numbers between two encrypted images, whose plain images have only one-pixel difference. It can be computed as follows.

$$NPCR = \frac{{\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{n} {f(i,j)} } }}{m \times n} \times 100{\raise0.5ex\hbox{$\scriptstyle 0$} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{$\scriptstyle 0$}}$$
$${\mathrm{With}}\;f(i,j) = \left\{ \begin{array}{l} 0\quad if\quad I_{mo} (i,j) = I_{mc} (i,j) \hfill \\ 1\quad if\quad I_{mo} (i,j) \ne I_{mc} (i,j) \hfill \\ \end{array} \right.$$

where m and n represent, respectively, the high and the width of the image. \(f(i,j)\) denotes the difference between corresponding pixels of encrypted image \(I_{mc} (i,j)\) from the original image \(I_{mo} (i,j)\). The ideal value of NPCR is 100. In the light of Eq. (14), we displayed in Table 5 this metric for the 3 analyzed images.

Table 5 NPCR computation after differential attacks of thorax, phalanges, and combined images

It is easy to see from Table 5 that the average NPCR value for the thorax, phalanges, and combined images is at least 99.6044%; therefore, our encryption method having NPCR value is close to ideal metrics.

UACI The average intensity of the pixel value modified in the same location of the two images is determined by UACI defined as

$$UACI = \frac{{\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{n} {\left| {I_{mo} (i,j) - I_{mc} (i,j)} \right|} } }}{255 \times m \times n} \times 100{\raise0.5ex\hbox{$\scriptstyle 0$} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{$\scriptstyle 0$}}$$

The UACI values computed for the analyzed images are displayed in Table 6.

Table 6 UACI computation after differential attacks of thorax, phalanges, and combined images

It is evident from Table 6 that the UACI values computed are close to those standard values, and these results indicate that the proposed image encryption algorithm may effectively spread slight change of original images to the complete cipher images. That is because our algorithm is highly sensitive to the plain image, so that the different cipher images may be gotten by varying plain image a little.

6.4.4 Statistical Analysis

Histogram Analysis

This analysis reflects the distribution of gray scale of digital image [52]. The variance computation is an analysis to measure the randomness in histogram of images as in the Eq. (16).

$${\text{var}} \left( z \right) = \frac{1}{{n^{2} }}\sum\limits_{1}^{n} {\sum\limits_{1}^{n} \frac{1}{2} } \left( {z_{i} - z_{j} } \right)^{2}$$

where z is the vector of the histogram values in an array and the quantity of pixels having gray levels zi equivalent to i; the quantity of pixels having gray levels zj equivalent to j individually; the total number of pixels is represented by n.

We computed the histogram of original image of thorax and phalanges in Fig. 21 as well as the scramble image at Fig. 22. It can be seen that Fig. 22 hides the statistic behavior of the image.

Fig. 21
figure 21

Histogram diagram of original images: a Thorax (\(256\times 256)\), b phalanges (\(512\times 512\)), and c combined images (\(512\times 512\))

Fig. 22
figure 22

Histogram diagram of cipher images: a Thorax (\(256\times 256)\), b phalanges (\(512\times 512\)), c combined images (\(512\times 512\))

To demonstrate the degree of distribution in each image, Table 7 shows the cipher images variance computed of phalange, thorax, and combined images.

Table 7 Histogram variances for original and scrambles images of the proposed cryptosystem

In the light of Table 7, the variance of cipher image is not far from the ideal value of 5000 showing that our encryption method is secure enough to overcome the statistical attacks.

Correlation Analysis

An important statistical key point to evaluate an image encryption algorithm in the adjacent pixel correlation [105]. If neighboring pixels are highly correlated, the image is exposed to statistical attack. To avoid this type of attack, 5000-pixel pairs are randomly selected from plain images and their respective cipher. Then, the correlation index between two adjacent pixels in vertical, horizontal, and diagonal directions is calculated using Eq. (17).

$$r_{xy} = \frac{{N \times \sum\limits_{i = 1}^{N} {x_{i} y_{i} - \sum\limits_{i = 1}^{N} {x_{i}^{2} \times \sum\limits_{i = 1}^{N} {y_{i}^{2} } } } }}{{\sqrt {\left( {N \times \sum\limits_{i = 1}^{N} {\left( {x_{i} } \right)^{2} - \left( {\sum\limits_{i = 1}^{N} {x_{i} } } \right)^{2} } } \right)} \times \left( {N \times \sum\limits_{i = 1}^{N} {\left( {y_{i} } \right)^{2} - \left( {\sum\limits_{i = 1}^{N} {y_{i} } } \right)^{2} } } \right)}}$$

where \(x\) and \(y\) are the values of the selected adjacent pixels, N is the total number of randomly selected pixel pairs, and \(r_{xy}\) is the correlation coefficient of \(x\) and \(y\). The pixel distributions of the raw images and the encrypted images are shown in Figs. 23 and 24.

Fig. 23
figure 23

Pixel value distribution of the plain images of a thorax, b phalanges, and c combined images

Fig. 24
figure 24

Distribution of the adjacent pixels of cipher images in the horizontal direction: a thorax, b phalanges, and c combined images

As can be seen in Fig. 23, for the phalanx image, the adjacent pixels in the plain image are densely concentrated in all directions, while the adjacent pixels in its encrypted image in Fig. 24 are uniformly distributed. This shows that the plain image has strong correlation in all directions (horizontal, vertical, and diagonal), but the correlation in the encrypted image is weak.

Furthermore, the values of the correlation coefficients of the images are recorded in Table 8 for the correlation coefficients of the plain images and their encrypted equivalents in Fig. 19. These results show that the correlation coefficients of the plain images are close to 1. While for the encrypted images, the correlation coefficients are close to 0. Thus, the proposed algorithm is highly resistant to statistical attacks.

Table 8 Correlation coefficients of two adjacent pixels of plain image and cipher images

As it can be seen from Table 8, correlation coefficients of adjacent pixels of plain images are greater than 0.9, indicating that there is a strong relationship between adjacent pixels of plain images in different directions, and correlation coefficients of adjacent pixels of cipher images are less than 0.015; the correlation between pixels is small and can be ignored. The above results prove that our image encryption has good pixel de-correlation feature.

Entropy Analysis

This key point measures the disorder or the randomness of the encrypted image. A high value of entropy determines a better distribution of the gray levels of the image [106]. It is measured using the Shannon entropy formula as follows.

$$H\left( m \right) = \sum\limits_{i = 0}^{255} {p\left( {m_{i} } \right)} \log_{2} \left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {p\left( {m_{i} } \right)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${p\left( {m_{i} } \right)}$}}} \right)$$

where p(mi) is the probability of the symbol mi and H(m) is the entropy of the data image. For an image of 256 Gy level, the pixel has 28 possible values and the ideal entropy for a perfect encrypted image is 8. Then, the security of the encryption algorithm against entropy attack is highlighted when the entropy value is close to 8.

In the light of Table 9, the information entropy computed for cipher images is all at least greater than 7.99 indicating that cipher images gotten from the proposed algorithm have good randomness.

Table 9 Information entropy values (H) of encrypted image

6.4.5 Speed Analysis

The processing time is the time required to encrypt and decrypt an image. The smaller value the processing time has, the better the encryption efficiency will be. Time consumption was carried under Windows 10 operating system, Intel(R) Core (TM) i5-4030 M CPU @ 1.9 GHz, and 4 GB RAM. The MATLAB 2018(a) platform was used for our encryption algorithm. For a 512 × 512 image, it takes 2.465685 s for encryption. This time is very small to give time for some attacks.

6.4.6 Noise Attack Analysis

This type of attack is designed to prevent the receiver from successfully recovering the encrypted image by introducing Gaussian or Poisson noise into the encrypted image. To test the encryption scheme, Gaussian noise of zero mean and different variance is added to the image as follows.

$${\text{Img}} = {immnoise}\left( {Ie,^{\prime}{\text{Guassian}}^{\prime},0,{\text{var}} } \right)$$

where Ie represents the original image; Img represents the contaminated image; and var represents the variance number 0.01 < var < 1. Figure 12 displays the analyzed image thorax, of 256 × 256 bits added to Gaussian noise with variance of 0.1; 0.5; and0.9.

In the light of Fig. 25, the decrypted image of thorax \(\left( {256 \times 256} \right)\) affected by Gaussian noise is presented for three different values of the variance. In this figure, we observed that even for a high value of the variance (\({\text{var}} = 0.9\)), the decrypted image is still recognizable.

Fig. 25
figure 25

Decipher images with Gaussian noise. a \({\text{var}} = 0.4\), b \({\text{var}} = 0.7\), c \({\text{var}} = 0.9\)

6.5 Comparison with Other Cryptosystems

In this last subsection, the security comparisons with the latest published article in terms of security testing are shown in Table 10.

Table 10 Comparison of the proposed algorithm metrics with recent contribution in the literature

The performance of our system has been compared (Table 10) with some recent and good quality papers in the literature. We can see in Table 10 that the key space of our cryptosystem is larger than those of refs. [44, 45, 50, 52, 53]. It should be noted that compared to ref. [53], the proposed encryption scheme has a lower information entropy. Nevertheless, the difference between them is so small that it does not affect the security of the cryptosystem. We can also notice in Table 10 that the average NPCR and UACI values obtained by the proposed scheme are among the best in the literature. Therefore, these results suggest that the medical image encryption scheme based on Chua’s chaotic memristive oscillator system can resist entropy and statistical and differential attacks more effectively and can be applied to protect image data in real-time information communication systems.

7 Conclusion

In this paper, a novel memristive Chua circuit is proposed and used as a chaos-based encryption scheme for biomedical image security. It is demonstrated that the novel memristive oscillator can develop complex behaviors like: (i) period doubling and intermittency routes to chaos; (ii) multistability or coexisting of different attractors for the same set of oscillator parameters; and (iii) spiking and bursting oscillations. An Arduino-based embedding of the oscillator confirms these dynamics. We used the chaotic attractor data along with system parameters to generate a secret key for the encryption scheme. The chaotic data passed the NIST test SP 800–22 Rev.1a proved that they are pseudorandom enough to be used for cryptography application. Security tests of brute force attack and differential attack are demonstrated to be inefficient to our proposed cryptosystem. Other tests like variance of histogram, correlation analysis, and entropy results attested that those statistical attacks failed since the algorithm exhibits excellent statistical properties of the designed maps. Moreover, the encryption/decryption average NPCR and UACI values obtained by the proposed scheme are compared with recent and good-standing contributions: They are among the best in the literature. Therefore, these results suggest that the medical image encryption scheme based on Chua’s chaotic memristive oscillator system can resist entropy and statistical and differential attacks more effectively. Therefore, it can be applied to protect biomedical images in real-time information communication systems.