Introduction

In the world of digital communication, information is transferred significantly between individuals due to innovations in computers. Nowadays, data hiding, and encryption are becoming more challenging for information security systems. The aims of both are the same, but their techniques differ. During the transfer of information, the main concern is to prevent data from tampering, unauthorized access, loss, and corruption. The use of images is increasing significantly across various platforms. Therefore, it is necessary to prevent image data from an unrecognized person. Image steganography and image encryption play crucial roles in concealing confidential information1. In recent years, there has been an increase in developments in the field of network multimedia. These developments have made it easy for data to be duplicated and unauthorized copies to be generated, which is a concerning situation for original data such as images, audio, text, and video. Toktas et al.2, introduces the bit-level image encryption based on Bessel map with three control parameters. To prevent data duplication, many developments are being created to enhance the security of our data. Given the increasing demands for data security, we introduce a new image encryption scheme that depends on a finite commutative non-chain ring that is based on the Galois field and provides a high level of data security capacity. In literature, various types of block ciphers are utilized to secure communication channels based on Shannon’s theory. In the confusion part of Shannon’s theory, substitutions are made to increase complexity and establish a connection between the ciphertext and the key. In a diffusion process, the statistical characteristics of plaintext are propagated throughout the ciphertext. Public-key and DES are modern encryption schemes that provide confusion and diffusion to securely transfer complex ciphers over large data blocks. Zhou et al.3, developed a bit-level extension algorithm for multiple color images, in which DWT is used for compression of multiple color images to reduce transmission.

Now, to create confusion among readers attempting to decode an encrypted message, the fundamental component utilized is an S-box. An S-box is a nonlinear component and is an essential part of a block cipher that is used in the image encryption process. To transfer secure information from one place to another, different block ciphers are used that consists of confusion and diffusion. To protect our secret information from intruders, researchers have made it more robust and powerful today. For greater robustness in transformation, the algebraic structure is utilized in S-box construction. These S-boxes have the ability and resilience against differential and linear attacks. For instance, an S-box generated by a symmetric group \(\:{S}_{8}\)that is used in AES construction is complex and robust for sharing secret information4. Similarly, an S-box called Affine Power Affine (APA) S-box is also generated by an algebraic structure and used in AES to enhance security5. The Binary Gray S-box is an algebraic component known as the Gray S-box, which plays a role in the AES construction process6. In this process, the polynomial used to create the Substitution box is different from the Advance Encryption Standard S-box. Additionally, this S-box inherits all properties such as algebraic complexity and nonlinearity. Some famous S-boxes, such as Residue Prime S-boxes, Skipjack S-boxes, and Xyi S-boxes are used for both the encryption as well as decryption processes of images7. S-boxes mentioned above are used as a standard to construct new S-boxes that meet security requirements such as the Nonlinearity, Bit Independence Criterion (BIC), Strict Avalanche Criterion (SAC), Linear Approximation Probability Method (LP), and Differential Approximation Probability (DP)8,9.

Chaos based image encryption not only produce complexity but also produces randomness between pixels. Cross-Channel Color IE (CCC-IE) by using of \(\:2D\) hyperchaotic hybrid map of optimization test function10. The \(\:2D\) hyperchaotic map is constructed by hybridizing the Rastrigin and Griewank functions. The hyperchaotic map scrambles the diagonal pixels of plain image and manipulates the pixels in bi-direction to protect from cyberthreat. Particle swarm optimization (PSO) based image encryption by using of modular integrated logistic exponential (MILE) map is used to optimize key and creating randomness between pixels11. The MILE map has a significance behavior due to its dynamical nature that makes to protect from unauthorized recipient. For getting a high performance in multi-layered image encryption using Fractional-Order \(\:3D\) Lorenz chaotic system and \(\:2D\) Discrete Polynomial hyper-chaotic map12. Feng et al.13 is improved the efficiency of image encryption by using Plane Level Image Filter and Discrete Logarithmic transformation.

In recent few years, DNA coding based new image encryption have been widely reported. In the field cryptanalysis it enhances the security and improved the robustness. As QCMDC-IEA has been used to analyze the cryptanalysis that combines of quantum chaotic mapping and DNA coding with two major parts of DNA domain substitution and pixel level permutation. But it establishes two major flaws like neither confusion nor diffusion process of DNA and equivalent keys14. Similarly, in the cryptanalyzing an image cipher using multiple chaos and DNA operations15, the author cryptanalyzes the CICI-DNA having multiple chaotic systems and exists of equivalent keys. Feng et al.16, cryptanalysis and improvement of image encryption scheme based on Feistel Network and dynamic DNA encoding. The author finding critical flaws of designing secret key and in encryption process. Li et al.17 introduces the chaotic based image encryption that’s behavior is more chaotic, and generation of key stream is more practical. Image encryption process passes three main process that makes more efficient by using vector level operations and two-dimensional enhanced logistic modular map (2D-ELMM).

To improve high computational complexity and strengthen the security against attacks involving geometric rotations watermarking algorithm plays important role. Yang et al.18 to overcome these deficiencies introduces zero watermarking algorithm, in which central pixels of RGB layers of plane image takes as the center of circle. Xia et al.19, first proposed a fractional-order radial harmonic Fourier moments (FoRHFMs) to overcome the numerical instability and computational accuracy of IoRHFMs to achieve lossless copyright protection of medical images. For the effectiveness of image reconstruction capability, zero-watermarking, and pattern recognition accuracy Yang et al.20 addresses the issue of color image analysis by combining the quaternion theory with Fractional-order weighted Spherical Bessel-Fourier Moments (FrSBFMs). He et al.21 extends the idea of quaternion fractional-order color orthogonal moments (QFr-COMs) based on Laguerre polynomials and weighted radial normalized fractional-order generalized Laguerre polynomials (WRNFr-GLPs) to quaternion fractional-order weighted generalized Laguerre-Fourier moments (QFr-WGLFMs).

The most of S-boxes consisting of \(\:256\) elements and generated by the technique of composition of inversion and bijective ma on Galois Field (GF). The most famous S-box scheme that is constructed by linear fraction transformations of GF of \(\:256\) elements by fixing the coefficients \(\:a\), \(\:b\), \(\:c\), and \(\:d\). The map used to make an \(\:8\times\:8\) S-boxes called linear fractional transformation (LFT) \(\:x\to\:\frac{ax+b}{cx+d}\). A new technique to develop a \(\:8\times\:8\) S-box consisting of unit elements of integer ring \(\:{\mathbb{Z}}_{512}\)22. The approach consists of two parts, firstly construct two maps, scalar multiple and inverse on unit elements of \(\:{\mathbb{Z}}_{512}\), to enhance the randomness. After that, apply group action on the permuted GF (\(\:{2}^{8}\)) in the way of linear fraction transformation (LFT). The ring \(\:{\mathbb{Z}}_{512}\) is commutative chain ring and module over itself. The subgroup \(\:\mathcal{N}\) of \(\:{\mathbb{Z}}_{512}\) is additive abelian and consisting of non-unit elements of order \(\:256\) and \(\:\mathcal{N}\) is submodule of module \(\:{\mathbb{Z}}_{512}.\) The other half of \(\:{\mathbb{Z}}_{512}\) form a multiplicative group \(\:{\mathcal{N}}_{{G}_{9}}\)consisting of unit elements of order \(\:256\). Two logic operations XOR and AND are supported by two binary operations depends on algebraic framework of \(\:GF\:\left({2}^{8}\right)\). The AND operation apply on multiplicative group \(\:{\mathcal{N}}_{{G}_{9}}\)and XOR operation apply on \(\:\mathcal{N}\).

It demonstrates the construction of S-box of size \(\:4\times\:4\:\) over the Galois ring \(\:GR(4,\:2)\) and an S-box over \(\:GR(4,\:4)\) is useful in visual applications. The \(\:4\times\:4\:\)S-box is constructed by Shah et al. in23 by using of chain ring \(\:\frac{{\mathbb{F}}_{2}\left[x\right]}{<{x}^{8}>}\), this S-box is widely used in image encryption24. Shah et al. in25 is also constructed S-box of size \(\:24\times\:24\) by utilizing of Galois ring \(\:GR\left(\text{8,8}\right)\) but this method is not working correctly during decryption due to absence of inverse of S-box. In26, construction of \(\:9\)-bit S-box by using of non-chain ring \(\:\frac{{\mathbb{F}}_{17}\left[x\right]}{<{x}^{2}-x>}\) and there used in RGB encryption. The main objective of this manuscript is to address knowledge gaps and introduce novel findings. A commonly employed approach for enhancing data security involves utilizing algebraic structures. The proposed scheme establishes a substitution box by using a Galois field over the non-chain ring. This S-box is utilized to encrypt RGB images. The application of algebraic structure has motivated us to create an S-box which uses a non-chain ring. Another objective is to utilize a complex mathematical structure to create a bijection map from a ring to a Galois field. Hussain et al.27, introduces image pixels swapping encryption based on TetraVex game and publicly Hash-sharing algorithm.

We use a unit elements of non-chain ring \(\:\frac{{\mathbb{F}}_{17}\left[x\right]}{<{x}^{2}-1>}\) in our study. Also, apply an affine mapping to the ring. To construct a \(\:8\times\:8\) S-box we use linear fractional transformation (LFT) i.e. \(\:x\mapsto\:\:\frac{ax+b}{cx+d}\) on \(\:GF\left({2}^{8}\right)\) by fixing \(\:a,\:b,\:c\:,\:d\). For diffusion process find the inverse of S-box on \(\:GR\left({2}^{8}\right).\) This \(\:9\)-bit S-box is used later in an encryption process. For checking the efficiency of newly proposed S-box we compare it with standard measure including Strict Avalanche Criterion (SAC), Linear Approximation Probability (LAP), Bit Independence Criterion (BIC), and Differential Approximation Probability (DAP)8,9. Similarly, for securing from intruder’s attack, apply some test like differential attack, NIST test, and statistical attack, on image encryption. The study’s main contribution and significance can be summed up as follows:

  • A novel combinatory approach using non-chain ring and \(\:2D\) Henon map to addressing limitation of image encryptions, including low key space.

  • Define the bijection between the group of units of the ring and the Galois field to create a mathematically complex scheme.

  • Construction of S-boxes by using unit elements of non-chain ring and the Galois field to increase the robustness with its best nonlinearity and SAC value.

  • Utilizing a two-dimensional Henon map creates unpredictability and sensitivity to the initial key in the scheme.

  • The S-boxes and keys generated from the Henon map are used for substitution, exclusive OR operations, and pixel mixing in the scheme, ensuring the efficacy of the proposed algorithm.

The manuscript is categorized in the sections. In section \(\:2\), we discussed some basic concepts related to commutative non chain ring. In section \(\:3\), construct of proposed encryption scheme by using of unit S-box algebraically and the proposed S-box of an encrypted color image is also presented in this section. In section \(\:4\), contains the results related to efficiency of proposed scheme S-box and comparison with other some S-boxes. Section \(\:5\) contains some test like histogram, NPCR, correlation, UACI analysis, entropy, and randomness test for cipher. Finaly, in section \(\:6\) conclusion of proposed work. In section \(\:6\), Robustness analysis under which we discussed data loss and noise analysis, speckle analysis, and cropping analysis for analyzing the performance of image encryption.

Preliminaries

Here, we will know about basic concepts and terms about commutative rings with unity. In addition, each of these definitions contains a unit commutative ring \(\:A\).

A commutative ring \(\:A\) with unity is called local ring if its non-unit elements generate abelian group under addition. In other words, a local ring \(\:A\) has exactly one maximal ideal \(\:m\). The quotient ring \(\:\frac{A}{m}\) is residue field of the ring \(\:A\). A finite \(\:{\mathbb{Z}}_{{p}^{n}}\) local ring is an integer modulo ring where \(\:p\) and \(\:n\) are prime and positive numbers respectively. A ring is called a chain ring if its left and right ideals form a chain. Also, a ring is a chain ring if and only if it is a principal local ring. If \(\:s\) is an element of ring \(\:A\), then there exist \(\:t\) in \(\:A\) such that \(\:st=e\) where \(\:e\) is the identity of \(\:A\). If \(\:s,\:t\in\:A\), both be non-zero elements of \(\:A\), and \(\:st=0\) then ring \(\:A\) is called zero divisor.

The ring \(\:A=\frac{{\mathbb{F}}_{17}\left[u\right]}{<{u}^{2}-1>}\) is commutative non-chain ring. The ring is finite and its elements of the form \(\:\frac{{\mathbb{F}}_{17}\left[u\right]}{<{u}^{2}-1>}=\left\{a+bu\right|\:{u}^{2}=1\:\&\:a,b\in\:\:{\mathbb{F}}_{17}\}\) and having cardinality \(\:289.\) In \(\:289\) elements, \(\:256\) are unit and \(\:33\) are non-unit elements. The ring has two maximal ideals \(\:<u-1>=\left\{au-a\right|a\in\:\:{\mathbb{F}}_{17}\}\) and \(\:<u+1>=\left\{bu+1\right|b\in\:\:{\mathbb{F}}_{17}\}\). Thus \(\:A\) is local and Frobenius ring. Both ideals are isomorphic to \(\:{\mathbb{F}}_{17}\). The main aim behind of this non chain ring is to construct an S-box. Its unit elements play an important role in constructing a proposed S-box. The elements called non-unit are the multiples of \(\:18\) and other units are of the form \(\:17+16i\), where \(\:1\le\:i\le\:14\). To construct a complex \(\:8\)-bit S-box used all other unit elements that used in image encryption. The fundamental objective of cryptographic algorithms are confusion and diffusion, which our provided ring and scheme achieve more effectively.

Feng et al.28 constructed a robust quadratic polynomial hyperchaotic map called 2D-SQPM and pixel fusion to overcome the flaws in key design and poor chaotic performance. As an easier approach for examining the dynamical system of the Lorenz, Henon developed \(\:2D\) invertible chaotic system, the Henon map29, and the Henon attractor, which illustrates the range and behavior chaos and is depicted in Fig. 1. The mathematical form of Henon map is defined as

$$\:{x}_{n+1}=1-a{x}_{n}^{2}+\:{y}_{n}$$
$$\:{y}_{n+1}=b{x}_{n}$$

Here \(\:a\) and \(\:b\) are parameters used for bifurcation. In this map, contraction does not depend on \(\:x\:\)and \(\:y\). The behaviour of Henon map with parameter and initial condition is shown in Fig. 1.

Proposed RGB image encryption scheme based on non-chain ring

This phase is divided into three main subphases, the first one is construction of proposed S-box over the non-chain ring, the second one is implementation of Chaotic Henon map and last one is encryption by using S-box, XOR operation and Henon map.

S-box construction

In many block ciphers, S-box plays a significant role. The objective of the S-box is to convert large input data into different output sets without altering the data length. When used in an iterative round, the substitution box’s primary goal is to maximize the effectiveness required to obtain statistically private data. Substitution, and Henon map are two main components for this image encryption.

Table 1 Proposed Galois field 8-bit S-box.

The non-chain ring \(\:A=\frac{{\mathbb{F}}_{17}\left[u\right]}{<{u}^{2}-1>}\) having elements \(\:289\) and the length of a vector is \(\:9\). From \(\:289\), \(\:256\) unit elements are used in substitution. Define a bijective map \(\:\psi\:\::M\to\:GF\left({2}^{8}\right)\) by

$$\:\psi\:\left(x\right)=\left\{\begin{array}{c}x,\:\:\:\:\:\:\:\:\:\:\:\:\:mod\:256\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\\\:18i,\:\:\:\:\:\:\:\:1\le\:i\le\:14,\:\:x\:is\:even\\\:17+16i,\:\:\:\:\:1\le\:i\le\:14,\:\:\:x\:is\:odd\end{array}\right.$$

Now apply LFT of the form \(\:\varphi\::PGL(2,\:GF({2}^{8}\left)\right)\times\:GF\left({2}^{8}\right)\to\:GF\left({2}^{8}\right)\) by \(\:\varphi\:\left(x\right)=\frac{ax+b}{cx+d}\) where \(\:a,\:b,\:c,\:d\in\:GF\left({2}^{8}\right)\). Finally, the designing of S-box by utilizing map \(\:\psi\:\:and\:\varphi\:\) is displayed in Table 1. Now this S-box is used in substitution process.

Application of 2D Henon map

We use a \(\:2D\) Henon bifurcation mapping to mix pixels in all layers of image through permutation strokes. In this stage, all pixels of an image are mixed with each other without changing its values, as a result we get distorted image. The goal for detecting the perplexity is to decrease the uncertainty between the pixels of the cover data. For this, we use \(\:2\)-dimensional Henon map to increase the security and the level of uncertainty. The map shows chaotic behaviour when \(\:a=1.4\), \(\:b=0.3\), \(\:{x}_{0}=0.07011\) and \(\:{y}_{0}=0.10022\). Figure 1 represent the graph of a given chaotic system.

Fig. 1
figure 1

Chaotic behavior of Henon Map.

To get a key, we iterate the given map into 2N times, where \(\:N\) is the size of the image \(\:(256\times\:256\) or \(\:512\times\:512)\). We have generated three keys from two sequences of the two-dimensional Henon map. The first key \(\:{k}_{1\:}\)is the selection of the first \(\:N\) elements in the first sequence, the third key \(\:{k}_{3\:}\)is the selection of the first \(\:N\) elements of the second sequence, and the second key \(\:{k}_{2\:}\)is combination of \(\:\left(N+1\right)th\) element to the \(\frac{{3N}}{2}th\) elements from the first sequence and the second sequence. These three keys have equal sizes of \(\:N\) elements. After getting the required size of a key, we apply the XOR operation to the substituted red channel of the image using the first key \(\:{k}_{1\:}\)to obtain the encrypted red channel. Similarly, we perform the XOR operation on the substituted green and blue channels of the image using the second and third keys \(\:{({k}_{2\:},\:k}_{3})\), respectively, to generate the encrypted green and blue channels.

Fig. 2
figure 2

Flow Chart of proposed encryption scheme.

Inversion of Galois field S-box to non-chain ring S-box

We define an inverse mapping from \(\:GF\left({2}^{8}\right)\) to unit elements of ring \(\:A\). The map is as follows:

$$\:{\psi\:}^{-1}\left(x\right)=\left\{\begin{array}{c}\genfrac{}{}{0pt}{}{256+2i,\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:1\le\:i\le\:6}{258+2i,\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:7\le\:i\le\:14}\};x=18i\\\:\genfrac{}{}{0pt}{}{257+2i,\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:1\le\:i\le\:7}{259+2i,\:\:\:\:\:\:\:\:\:\:\:\:\:8\le\:i\le\:14}\};x=17+16i\\\:\genfrac{}{}{0pt}{}{256\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:if\:x=0\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:}{x,\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:otherwise\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:}\end{array}\right.$$

After applying the inverse map \(\:{\psi\:}^{-1}\) we obtain an \(\:16\times\:16\:\)lookup table provided in Table 2.

Convert the image \(\:{{\mathcal{H}}_{e}\:}^{{\prime\:}}\) into three layers red (R), green (G), and blue (B). We convert the 9-bit lookup table of the non-chain ring from decimal to binary, labeling it as \(\:X\). Next, we divide \(\:X\) into the first 2048 bits, referred to as \(\:{X}_{1}\), and the last 256 bits, referred to as \(\:{X}_{2}.\) We create copies of the bits until we obtain a total of 2048 bits, and then we perform an XOR operation between \(\:{X}_{1}\) and \(\:{X}_{2}.\)

$$\:Y=\:{X}_{1}\oplus\:{X}_{2}$$

.

Apply the key \(\:Y\) for the exclusive OR operation to each channel of the image, i.e. \(\:Y\oplus\:R\), \(\:Y\oplus\:G,\) and \(\:Y\oplus\:B.\) Finally, concatenate all the image pixels into a single frame to obtain the encrypted image.

Table 2 9-bit Lookup table of Non-chain Ring.

The flowchart of the given proposed encryption scheme is shown in Fig. 2. Figures 3 and 4 shows the cover and encrypted images of Baboon, House, and Peppers of order (\(\:256\times\:256\)) and Baboon and Peppers of order (\(\:512\times\:512\)).

Performance analysis of S-box

To get an efficient S-box it satisfies the cryptography criteria like bijectiveness, nonlinearity (NL), strict avalanche criteria (SAC), linear probability criteria (LP), bit independence criteria (BIC), differential criteria probability (DP) etc. To check the robustness of the newly designed S-box we implement different analyses and compare them with some fundamental S-boxes.

Nonlinearity

Nonlinearity is measured by two functions: Boolean function and direct function. On an even number, the Boolean function takes an input as variable \(\:m\) and achieves maximum nonlinearity of (\(\:{2}^{m-1}-{2}^{\frac{m}{2}-1}\)) called bent function30. On the other hand, at an odd number the value of nonlinearity (\(\:{2}^{m-1}-{2}^{\frac{m-1}{2}}\)) is called bent concatenation bound. The nonlinearity comparison of the designed S-box with other famous S-boxes as shown in Table 3. The given analysis shows that S-boxes of algebraic structure are more effective, and S-boxes based on chaos have a vast interval of randomness. These S-boxes take the place of synthesized S-boxes.

Fig. 3
figure 3

(a-c) represents the plain images of (\(\:256\times\:256\)) and (d-f) the encrypted images (\(\:256\times\:256\)) of Baboon, Peppers, and House, respectively.

Fig. 4
figure 4

(a-b) represents the plain images of (\(\:512\times\:512\)) and (c-d) the encrypted images (\(\:512\times\:512\)) of Baboon, and Peppers respectively.

Bit independence criteria

Examining how the efficiency of the output data bits varies once the input data bits are modified is significant. Many methods have been developed to measure this change. Webster and Tavares introduced the bit independence criteria. This criterion tells the height of the dependent change of output data bits when any input data bit is retracted31,32. The proposed S-box satisfies the BIC and attains an optimum value through the implementation of indices of the proposed S-box.

Strict avalanche criteria (SAC)

Feng and Wu33 developed Strict Avalanche Criteria (SAC). This technique explains how output bits of data swapped into input bits. It is mandatory to change the value of single data bit, half of yielded bits must be changed. The change of a single data bit causes an avalanche change in output bit when iteration occurred.

The uncertainty created by encrypted in an image will be high if changing only in input data bit can alters the output data bit with possibility of \(\:0.5\). Implementation of S-box shows that generated S-box satisfies the SAC criteria. The SAC value of designed S-box is very close to the ideal value.

Differential approximation probability (DAP)

To calculate the differential uniformity of proposed S-box the DAP criterion is used34. Which is defined as:

$$\:{DP}^{s}\left(\varDelta\:a\to\:\varDelta\:b\right)=\left[\frac{\#\{a\in\:X|S\left(a\right)\pm\:S\left(a\pm\:\varDelta\:a\right)=\varDelta\:b\}}{{2}^{m}}\right]$$

This shows that to verify the even mapping possibility for each \(\:i\), use an exclusive map of input variance \(\:{\varDelta\:a}_{i}\) to output variance \(\:{\varDelta\:b}_{i}\). The average value through DAP of designed S-box is \(\:0.0625\), which is like APA, AES, Gray S-box.

Table 3 Performance analysis of proposed S-box.

4.2 Linear approximation probability (LAP)

This indicates an occurrence’s peak polarity. The cohesion of yield data bits selected by cover \(\:{\mathcal{H}}_{b}\) is identical to cohesion of input data bits demonstrated by cover \(\:{\mathcal{H}}_{a}\) is defined by Matsui’s35. The value LAP of proposed is calculated as:

$$\:LP=\underset{{{\mathcal{H}}_{a},\mathcal{H}}_{b\ne\:0}}{\text{max}}\left|\frac{\#\{a\in\:X|a.{\mathcal{H}}_{a}=S\left(a\right).{\mathcal{H}}_{b}\}}{{2}^{n}}-\frac{1}{2}\right|$$

Here ‘\(\:X\)’ is the assembly of all possible data and \(\:{2}^{n}\) is the size of ‘\(\:X\)’. So, the average value of LAP of proposed S-box is \(\:0.015625\), which is able to fend against linear attacks. The results of proposed S-box including SAC, nonlinearity, BIC, LAP and DAP with other S-boxes is shown is Table 3.

Security analysis of encrypted image

To check robustness of proposed novel encryption scheme, we take images like baboon, pepper, and house of dimension \(\:256\) and employ encryption tests like histogram, entropy, UACI, NPCR, AD, MSE, PSNR etc.

Histogram analysis

The histogram test is performed on baboon, pepper, and house images and encrypted baboon, pepper, and house images which is shown in Figs. 5, 6 and 7. The histogram of ciphered images are continuously distributed as the pixels of red, green, and blue pixels are equally distributed which shows the usefulness of proposed algorithm.

Fig. 5
figure 5

Histogram analysis of cover image and encrypted image of Baboon.

Fig. 6
figure 6

Histogram analysis of cover image and encrypted image of Pepper.

Fig. 7
figure 7

Histogram analysis of cover image and encrypted image of House.

Key space analysis

Uses of distinct keys for both encryption and decryption are referred key space. As the length of the key space is large, cryptosystem is effective and secure from brute-force attack. In proposed algorithm, firstly, to describe an action of \(\:PGL(2,\:GF({2}^{8}\left)\right)\) and affine function on \(\:Im\left(f\right)=GF\left({2}^{8}\right)\) for this we have \(\:256!\) Choices and they construct \(\:{2}^{32}\) different S-boxes.

Secondly, for scalar functions we have \(\:256\) choices and \(\:{2}^{32}\) different parameters for projection. By combing all these options, we get a large key that prevents brute-force attack. So, we have multiples of alternatives for affine functions and multi scalar functions that gives an edge to produce many S-boxes. In proposed image cryptosystem, the parameters involved for secret key are \(\:a\), and \(\:b\) with two initial conditions \(\:{x}_{0}\) and \(\:{y}_{0}\). The accuracy is \(\:16\) different digits. So, the possible combinations are \(\:{10}^{16}\). The key space size is \(\:{10}^{64}\approx\:\:{2}^{217}\). Hence the total key space is \(\:{2}^{217}\times\:{2}^{32}={2}^{249}\), which is large enough to resist from brute force attack.

Correlation analysis

The correlation analysis is segregate into three clusters: horizontal, vertical, and diagonal. The relation between pixels with its neighbouring pixels is computed through this analysis. During the analysis process, the overall texture of the encrypted data was taking into account. The mathematical form is

$$\:K={\sum\:}_{i,j}\frac{(i-{\mu\:}_{i})(j-{\mu\:}_{j})p(i,j)}{{\sigma\:}_{i}{\sigma\:}_{j}}$$

Where \(\:{\mu\:}_{i}\), \(\:{\mu\:}_{j}\), \(\:{\sigma\:}_{i}\), and \(\:{\sigma\:}_{j}\) are mean and variance between pixels respectively. The correlation of adjacent pixels of cover image and encrypted image lies in horizontal, vertical, diagonal, and antidiagonal directions respectively as shown in Figs. 8, 9 and 10. The connection between pixels of cover image is linear and pixels of encrypted image are randomly correspondent. The results analysis of baboon, pepper, and house images and encrypted baboon, pepper, and house images is show in Table 4. For good encryption scheme, the correlation result is equal to zero or approaching to this value. The table shows that the correlation value of cover images is approximate to one and correlation value of encrypted data images is almost to zero. Hence results of correlation show good and robust as compared to other schemes presented in36,37.

Fig. 8
figure 8

Correlation analysis of RGB cover image (baboon).

Fig. 9
figure 9

Correlation analysis of RGB cover image (house).

Fig. 10
figure 10

Correlation analysis of RGB cover image (pepper).

Entropy

The amount of entropy in an image relates to the way objects are arranged to help humans recognize the image. In cryptosystem the replacement of nonlinearity induced the unpredictability in an image. The extent of uncertainty that comes from encryption is closely associated with the degree to which one may be certain that an image’s integrity can be detected by the human eye. The lack of unpredictability results in identification of ciphered image. So, the degree of entropy can explain important evidence about encryption. The mathematical formula for calculated entropy is:

Table 4 Correlation analysis of cover images and encrypted images in vertical, horizontal, and diagonal directions.
$$\:H=\sum\:_{i=0}^{n}p\left({x}_{i}\right){\text{log}}_{b}p\left({x}_{i}\right)$$

Here ‘\(\:{x}_{i}\)’ is counts of histogram. The value of entropy analysis is explained in Table 5. The value of entropy analysis of proposed algorithm is \(\:7.9990\), \(\:7.9989\), \(\:7.9989\) for Baboon, House and Peppers respectively which is compared with other algorithms. The experimental values of proposed work is greater than or equal to other published works23,26,40,53, and lower than52. The comparison clearly shows that our approach performs better results than most other mentioned publish work.

Table 5 Entropy of proposed encrypted images with other encrypted images.

NPCR and UACI analysis

For robust cryptosystem, common requirements are that the cover image is entirely hidden within its form of encrypted data image. Two techniques are used: number of pixels change rate (NPCR) and unified average changing intensity (UACI), to estimate the resistance of ciphered image against differential attack.

Two encrypted images are deemed by the NPCR (number of pixels change rate)38 to differ by just one pixel. If one of encrypted image \(\:{C}_{1}(i,j)\) and other one is \(\:{C}_{2}(i,j)\) then NPCR is calculated as

$$\:NPCR\left({C}_{1},{C}_{2}\right)=\frac{\sum\:_{i,j}D(i,j)}{T}\times\:100\%$$

Here ‘\(\:T\)’ represents the total image pixels and \(\:D(i,j)\) is defined as

$$\:D\left(i,j\right)=\left\{\begin{array}{c}0,\:if\:{C}_{1}\left(i,j\right)={C}_{2}(i,j)\\\:1,\:if\:{C}_{1}\left(i,j\right)\ne\:\:{C}_{2}(i,j)\end{array}\right.$$

When the difference between cover image is subtle, the UACI38 (unified average changing intensity) is designed to analyze the number of changing pixels and intensity of arrived at the center of changed capacity among cipher image separately. Mathematical form of UACI is

$$\:UACI\left({C}_{1},{C}_{2}\right)=\frac{1}{m\times\:n}\sum\:_{i=0}^{m-1}\sum\:_{j=0}^{n}\frac{\left|D\left(i,j\right)-P(i,j)\right|}{f\times\:t}\times\:100\%$$

Where ‘\(\:f\)’ represents maximum pixels value that can be used in encoded image and \(\:D\left(i,j\right)\) is defined as

$$\:D\left(i,j\right)=\left\{\begin{array}{c}0,\:if\:{C}_{1}\left(i,j\right)={C}_{2}(i,j)\\\:1,\:if\:{C}_{1}\left(i,j\right)\ne\:\:{C}_{2}(i,j)\end{array}\right.$$

For the best encryption scheme of images, the NPCR value should be \(\:99\%\) which is considerable and UACI value is close to \(\:33\%\). The analysis results of UACI and NPCR of our encoded image are compared with other proposed work is shown in Table 6.

The given table shows that the UACI and NPCR values of proposed scheme of encrypted image is good. The higher value of NPCR shows that pixels of image are randomized. Also, the fitting value for UACI shows that each height of grey pixel of image are closely changed in encryption scheme. For colored image, the UACI and NPCR values of proposed scheme are good and greater than the other proposed work25,26,39,39,41. Thus, the comparison shows that proposed work has ability of diffusion, which prevents algebraic attack.

Table 6 UACI and NPCR values of encrypted image and other encrypted images.

Randomness test for Cipher

In a cryptosystem’s consistency of distribution, long period, and highly complicated output are its essential security related properties. For examine a randomness in a digital image we use NIST \(\:SP800-22\) to get a specific goal42. This test includes many subclasses. The discarded digital image of baboon passes NIST test. The encrypted image made by proposed encryption scheme uses of RGB image of dimension \(\:256\times\:256\) which shows in Table 7. Thus, our proposed encryption scheme consists of unitary S-box passing NIST test and these results show good encryption and secured against algebraic attack.

Mean square error (MSE)

In an image processing, mean square error indicates the strength of encoded image. It tells the square difference of cover image and encoded image over a time43. The mathematical form of mean square error is:

$$\:MSE=\:\frac{1}{m\times\:n}\sum\:_{i=0}^{m}\sum\:_{j=0}^{n}{\left[\mathcal{H}\left(i,j\right)-C(i,j)\right]}^{2}$$

Here \(\:\mathcal{H}\left(i,j\right)\) is cover image, \(\:C(i,j)\) is ciphered image and \(\:m,\:n\) are its dimension. The quality of encrypted image is good if the value of MSE is larger. Table 8 shows the optimum value of images in different layers.

Table 7 NIST test results of encrypted baboon image.

Average difference (AD)

The average difference measurement can also be used to calculate the total differences of two images. The larger value of average difference means the difference between images is strong and the similarity between images show lower value of mean difference. The mean difference is also be described as the arithmetic mean of data image and reference signal44. The mathematical form of mean difference is

$$\:AD=\frac{{\sum\:}_{i=0}^{m}\sum\:_{j=0}^{n}[\mathcal{H}\left(i,j\right)-C(i,j\left)\right]}{m\times\:n}$$

Where \(\:\mathcal{H}\left(i,j\right)\) is cover image, \(\:C\left(i,j\right)\) is encrypted image and \(\:m\times\:n\) is dimension of images. By this technique, the deviation or rate of variation of two images can be measured easily. Table 8 depicts the optimum value of different images for proposed scheme.

Table 8 AD and MSE values of encrypted image and other encrypted images.

Peak signal to noise ratio (PSNR)

Corrupted noises can impact a signal’s interpretation’s credibility45. PSNR is a method that is used to compare the signal’s strength to power of distorted noises. The logarithmic decibel measurement is used to represent the data because of its extensive variability. To recover ciphered images and evaluate their efficacy we use PSNR. During our investigation, cover image is used as a signal while a noise occurred during deforming into encryption. A higher PSNR is usually employed by a higher preservation. The PSNR (dB) of cover data image \(\:\mathcal{H}\left(i,j\right)\) is defined as

$$\:PSNR=10{\text{log}}_{10}\frac{{MAX}^{2}}{\sqrt{MSE}}$$

Table 9 shows the value of PSNR for different layers is close to ideal value. These ideal values demonstrate the strength of the proposed scheme.

Table 9 Comparison of PSNR and SSIM values of proposed encrypted images and other encrypted images.

Structural similarity (SSIM)

Structural similarity indexes are improved based on universal quality marker as stated in38,46. It determines the relation between pair of images. The difference between two identical sized windows of order \(\:n\times\:n\) of both images\(\:\:X\) and \(\:Y\) is calculated as

$$\:SSIM\left(\mathcal{H},I\right)=\frac{(2{\mu\:}_{\mathcal{H}}{\mu\:}_{I}+{c}_{1})(2{\sigma\:}_{\mathcal{H}}{\sigma\:}_{I}+{c}_{2})}{({{\mu\:}_{\mathcal{H}}}^{2}+{{\mu\:}_{I}}^{2}+{c}_{1})({{\sigma\:}_{\mathcal{H}}}^{2}+{{\sigma\:}_{I}}^{2}+{c}_{2})}$$

Where \(\:{\mu\:}_{\mathcal{H}},{\:\mu\:}_{I},{{\:\sigma\:}_{\mathcal{H}}}^{2},{{\:\sigma\:}_{I}}^{2}\) are mean and variance of \(\:\mathcal{H}\) and \(\:I\) and \(\:{\sigma\:}_{\mathcal{H}I}\) are the covariance of \(\:\mathcal{H}\) and \(\:I\). \(\:{c}_{1}={\left({t}_{1}k\right)}^{2}\) and \(\:{c}_{2}={\left({t}_{2}k\right)}^{2}\) are two factors used to stable the division process when term in denominator is small. \(\:k\) is value of pixels and \(\:\left({t}_{1},\:{t}_{2}\right)=(0.01,\:0.03)\) by default. The indices value of SSIM is \(\:-1\) to \(\:1\) and if two images are identical than SSIM takes value \(\:1\). The results depict the SSIM value of encrypted images in red, green, and blue layers is optimum and is shown in Table 9.

Software and hardware configuration

For testing the algorithm’s efficiency and authenticity we have taken three images of Baboon, House, and Pepper of order \(\:256\times\:256\) and \(\:512\times\:512\) that shows robustness of encrypted images by optimum value of entropy, NPCR, PSNR, histogram, SSIM, MSE, AD, and UACI. The main hardware configuration for tests are Intel(R) Core(TM) i5-1035G7 CPU @ 1.20 GHz 1.50 GHz and main software configuration are \(\:64\)-bit Window 10 and MATLAB R\(\:2020\)a.

Robustness analysis

The robustness of our application against noise attacks that could affect transmission channels is demonstrated in this section. Certain kinds of noises can disrupt the algorithm’s decryption process by affecting the security of encrypted images during transmission. Consequently, in order to assure that the decoded images may still be viewed by humans in the event that noise is introduced during transmission, the algorithm needs to be susceptible to noise attacks. In this study, we will illustrate that our proposed scheme can control the noise that creates during the transmission. Here we will investigate noise attacks on encrypted images as well as on their decrypted images.

Fig. 11
figure 11

Salt & Pepper Analysis, (a-c) are encrypted images of Baboon, Pepper, and House and (d-f) are decrypted images with salt & pepper noise.

Salt and pepper noise

Salt and pepper noise is also called spike sound that feels like natural sound that appears during the transmission process47. These are combination of bright and dark spots in pixels of an image and caused by various types of factors like digital conversional error, analog effects, and transmission error. To eliminate these noises various types of techniques are using around bright and darks pixels such as dark frame removal, interpolation, median filtering, and combine mean and median filtering. In Figure 11, shows the encrypted images having a default noise and similarly below images are original plain images that are damaged and also shows that noise affected encrypted image after decryption is also readable.

Fig. 12
figure 12

Speckle Noise Analysis, (g-i) are encrypted images of Baboon, Pepper, and House and (j-l) are decrypted images.

Speckle noise

Bright or noisy features frequently appear in digital images, which might distract from their visual appearance47 and is caused by constructive and destructive time where the images contain blue and black spots. In Fig. 12, shows the default encrypted noise image and below one is the original plain image that is damaged. After speckle noise the original image is visually readable.

Cropping attack

A small amount of information may be lost during the transfer of digital images over networks as a result of malicious disruption or communication barriers. A cropping analysis is used to test capabilities of different plain image from encrypted images, where some of data is missing. In Fig. 13, shows the cropping analysis of different encrypted and decrypted images which shows that some images data is lost during transmission and reveals that decryption of images is possible in an appropriate way even cipher mages have some data lost.

Fig. 13
figure 13

Cropping Analysis of encrypted images of Baboon, Pepper, and House (a-c) and (d-f) are decrypted images.

Conclusion

The proposed algorithm introduces a novel approach known as finite algebraic structure (non-chain ring) and \(\:2D\)-Henon chaotic map. This scheme encrypts any digital information, but we use specifically for image encryption. This algorithm has a high algebraic complexity by using complex algebraic structures to generate secure encrypted images by manipulating confidential data. In block ciphers, a substitution box is a significant component generated by mapping of unit elements to the Galois field \(\:GF\left({2}^{8}\right)\) and applying a linear fractional transformation. The \(\:9\)-bit S-box is used for exclusive operation with permuted pixels. The two-dimensional Hénon map exhibits various features, including randomness and sensitivity to initial conditions. These characteristics make the proposed scheme resistant to brute-force attacks by enhancing the key space. The performance analysis shows that combination of non-chain ring and Henon map refers a reliable encryption performance. The suggested method offers a workable solution to issues with Internet of Things devices and is both lightweight and theoretically possible. The algorithm has a significance importance in real life situations such as banks, state agencies, hospitals that have capability to protect secret information from an unauthorized recipient. The future directions to develop a robust and efficient algorithm for video, and audio encryption.