A Secure and Lightweight Chaos Based Image Encryption Scheme

2022-11-10 02:28FadiaAliKhanJameelAhmedFehaidAlqahtaniSulimanAlsuhibanyFawadAhmedandJawadAhmad
Computers Materials&Continua 2022年10期

Fadia Ali Khan,Jameel Ahmed,Fehaid Alqahtani,Suliman A.Alsuhibany,Fawad Ahmed and Jawad Ahmad

1Department of Electrical Engineering,Riphah International University,Islamabad,44000,Pakistan

2Department of Computer Science,King Fahad Naval Academy,Al Jubail,35512,Saudi Arabia

3Department of Computer Science,College of Computer,Qassim University,Buraydah,51452,Saudi Arabia

4Department of Cyber Security,Pakistan Navy Engineering College,NUST,Karachi 75350,Pakistan

5School of Computing,Edinburgh Napier University,Edinburgh,EH10 5DT,United Kingdom

Abstract:In this paper,we present an image encryption scheme based on the multi-stage chaos-based image encryption algorithm.The method works on the principle of confusion and diffusion.The proposed scheme containing both confusion and diffusion modules are highly secure and effective as compared to the existing schemes.Initially,an image (red,green,and blue components)is partitioned into blocks with an equal number of pixels.Each block is then processed with Tinkerbell Chaotic Map(TBCM)to get shuffled pixels and shuffled blocks.Composite Fractal Function (CFF) change the value of pixels of each color component(layer)to obtain a random sequence.Through the obtained random sequence,three layers of plain image are encrypted.Finally,with each encrypted layer,Brownian Particles (BP) are XORed that added an extra layer of security.The experimental tests including a number of statistical tests validated the security of the presented scheme.The results reported in the paper show that the proposed scheme has higher security and is lightweight as compared to state-of-the-art methods proposed in the literature.

Keywords:Chaos;fractals;fibonacci;tinkerbell chaotic map;confusion;diffusion;brownian motion

1 Introduction

With the advancement in technology,a large number of digital images are transmitted through the Internet.Generally speaking,digital images are not transmitted or stored in encrypted form[1].Confidentiality of digital images are important in a number of applications that demands restricted access to image data through secure communication.In symmetric cryptography algorithms,the utilized key during the encryption and decryption processes is always same across both the transmitting and receiving ends[2].As a result,both endpoints need to examine the key exchange protocol for data transmission before initiating the communication.Encrypted keys play a vital role,and the key length determines the strength of any cryptographic scheme[3-5].The Data Encryption Standard (DES),Advanced Encryption Standard (AES),and Blowfish encryption technique are currently available in symmetric schemes.Chaos based cryptography is one of the emerging areas that researchers and cryptographers are using for image encryption purpose.The intention of utilizing chaos-based cryptography facilitates security to sensitive data because of its high sensitivity towards initial conditions,ergodic performance,and unpredictability[6,7].

Chaos theory has been extensively used in the image encryption method due to its non-periodic nature,susceptibility to initial values,and uncertainty[8,9].Many schemes are designed by a combination of dynamical phenomena of chaos theory and fractals complex patterns.These(fractal patterns)are never ending complicated shapes that appear to be conscience at various scales.These shapes can be generated using the simple mechanism consistently and systematically[10].Fractals are depictions of chaotic environments that resembling with the images of chaos and are controlled by iteration.Nature is comprised of fractal geometry,and different patterns are quite ubiquitous.For example,trees,rivers,beaches,mountains,clouds,seashells,and hurricanes are natural occurrences.A function based on fractals possesses dynamic behavior and thus is highly sensitive to its original state,making it a better choice for constructing a robust cryptographic algorithm[11-14].A fractal image does have a lot of detailed variability at different dimensions with several choices of the key space.Mandelbrot set is a well-known fractal designed by Benoit Mandelbrot in 1979,a remarkably sophisticated and perturbed architecture[11-14].A computer may generate abstraction fractals,such as the Mandelbrot Set,by constantly computing a mathematical equation[14,15].The research contribution of the proposed work are as follow:

• This research proposes an encryption algorithm that utilizes multi-stages symmetric encryption algorithm to generate maximum random sequencing.

• Multi-stage random sequencing will apply to multimedia data such as images to obtain substitution and permutation-based cryptosystem.

• Initial step is based on the diffusion process where pixels are permuted using Tinkerbell chaotic map (TBCM).The latter part is based on the bitwise XOR process utilizing Mandelbrot set of fractals (MSF) and Brownian particles (BPM) to get higher entropy value and maximum randomness.

• Several existing schemes are investigated,and results are added next to the proposed scheme using various statistical standard tests.

2 Research Background

This section discusses chaos-based multi-stage cryptosystem using Fibonacci series-based permutation process,fractals key generation,and Brownian particles.

Chaos-based multi-stage cryptosystems can be iterated rapidly because of their ease in functionalities[16].As a result,multi-stage techniques are fast in practical uses,especially for image encryption techniques.Chaotic maps are extremely sensitive to initial conditions with deterministic behavior of pseudo-randomness[17].Confusion and diffusion phenomena are two significant components that are to be considered when designing block cipher.Both contribute to the concealment of plain image structure and a reduction in the statistical dependency of pixels during the image encryption process[18,19].The enhancement of security is added by integrating it with the sequence generated by the Fibonacci series.Moreover,this sequence is XORed with the extracted real values of the Mandelbrot set of fractals and Brownian particles;thus chaos-based multi-stage encryption scheme is achieved.

2.1 Tinkerbell Chaotic Map(TBCM)

2.2 Mandelbrot Set of Fractals(MSF)

Fractals are a combination of numeric sequences encompassing many terms in a complex space.These are image-based reiterative and repetitious geometry patterns.They also have the same degrees of variance in all proportions and act identically when iterated.Benoit Mandelbrot (1924-2010)investigated the complicated pattern of recurring shapes in each other,which later he termed it as Mandelbrot set of fractals.A new composite fractal function (CFF) was proposed by the author in,which combines two separate Mandelbrot set (MS) functions with a single control parameter to produce an interesting feature.The results of the CFF simulation show that the proposed map in has a high initial value sensitivity,a complex structure,a larger chaotic region,and a more complex dynamical behaviour than the standard map.CFF is written as:

wherez0=q,where points q in the complex plane for which the orbit ofzndoes not tend to infinity are in the set and 0<L<1.

2.3 Brownian Particles Movement(BPM)

The most employed stochastic or random process is Brownian particles motion.It is the representation of the movement of a particle or a point in three-dimensional space.Mathematically the movement of particles in three axis is defined as:

whereasa=wi×2×π,b=xi×π,0 ≤r≤+∞,0 ≤b≤2π,and 0 ≤a≤π

WhereAandBdenote the horizontal and vertical direction distances,respectively;rdenotes the movement step length;aandbdenote the particle’s movement direction;andwi,xidenote the chaotic sequences produced by chaotic systems.

2.4 Substitution Box

An S-Box (Substitution-Box) is a component of symmetric key algorithms that is responsible for substitution operations in cryptography.Shannon’s property of confusion is commonly utilised in block cyphers to disguise the relationship between the key and the message being encrypted.In many circumstances,the S-Boxes are carefully selected in order to provide resistance to cryptanalysis.In work,we have proposed a novel S-Box which is also known as Fadia’s S-Box.In this paper,we are using Fadia’s S-Box to get a highly secured image in the diffusion stage.

3 The Proposed Image Encryption Scheme

Flowchart of the proposed encryption scheme is shown in Fig.1 One can see that the proposed scheme has both confusion and diffusion processes using TBCM,CFF and BMP,respectively.

Figure 1:The proposed encryption flowchart

Detailed encryption steps are explained as below:

Designing steps for Multistage Cryptographic Algorithm

Algorithm:Multistage chaos-based cryptographic algorithm Input:Key Output:Pseudorandom numbers generator(PRNG’s)Goal:Multimedia security(e.g.,images)1.Colored image I having size(512×512×3)pixels is tested for the proposed cryptographic system.2.An image I is divided into three grey layers image e.g.,grey image red(GIR),grey image green(GIG),and grey image blue(GIB).3.Each channel GIR,GIG,and GIBis converted into blocks B1,B2,...BN.The size of each block (B)=16 × 16 cells,whereas each block contains 32 × 32 pixels.4.The process of permutation is applied at confusion stage to get G-PIR, G-PIG and G-PIB where blocks are permuted using the random sequence generated via TBCM.5.Random matrices A and B are obtained via iterating Eq.(6).6.Permute columns and rows of G-PIR, G-PIR and G-PIR using the random values A and B obtained in step 5 to get G-PCIR, G-PCIG,and G-PCIB.

Algorithm:Continued 6.Generate 1000 × 1000 fractal matrix using CFF and apply zig-zag scan method to obtain random matrix R∧of a size 256 × 256.Apply below operation on the obtained random image:R=Mod (abs(R∧) × 10∧8 Mod (256))7.The permuted image obtained in step 6 is Xored with R to get G-KIR, G-KIG and G-KIB.8.In order to get a higher random ciphertext Fadia’s S-Box is applied on each channel G-KIR, G-KIG and G-KIB.9.To get the final color ciphertext,combine red,green and blue channels to get the final ciphetext C.

4 Performance Analyses

The performance analyses of our proposed encryption scheme are discussed in this section.The plaintext and encrypted images are shown in Figs.2 and 3,respectively.It is clear from Fig.3 that the encrypted images conceal original information.Further detailed analyses are based on NIST randomness suite histogram analyses entropy,Adjacent pixels’correlation,pixel difference analyses and sensitivity analyses etc.

Figure 2:Plaintext images

Figure 3:Encrypted images

4.1 NIST Randomness Test

Through NIST(National Institute of Standards and Technology)tests,one can find the unpredictability and randomness.We analyzed chaos based random sequences using multi-stage cryptographic algorithm using TBCM,CFF and BPM.The sequence of random numbers is produced by transforming the decimal system to binary.The NIST test divides the data into ten categories,each comprising 1,000,000-bit sequences.The randomness of sequence’s using chaos dynamical system and other sequences is validated,and the encryption’s privacy is guaranteed as highlighted in Tab.1.Tab.1 shows that for all tests,the status is a success and it is clear that none of the tests has a failure status.

Table 1:NIST measures for different standard color images

4.2 Histogram Analyses(HA)

Histogram of an image shows the number of occurrence of pixels.In image encryption,the histograms before and after encryption can be seen significantly different and the encrypted histogram should be flat.From the Figs.4,and 5,one can see that the histogram is completely different and the ciphertext histogram is almost flat that is near to ideal values.

Figure 4:Plaintext car image having three grey channels(size=512×512 dimension)with histogram plots

4.3 Information Entropy Analyses

Through the entropy test,one can determine the unpredictability and randomness of an encryption scheme.Entropy is measured by evaluating encrypted images to understand the strength of the proposed system.It is defined as:

In the above Eq.(9)pxjdepicts an event-based Probability Masses Function (PMF) whereasxjis the input event of the PMF.‘X’shows random number having different outcomes that is referred as n-outcomes.The value obtained should be nearly equal to 8 if all the pixels/numbers have equal probability;therefore,the an ideal scheme should have entropy value 8.Tabs.2 and 3 shows the findings of the presented scheme.The results demonstrate that the proposed system’s aggregate encrypted image results are closer to 8 and is higher than the schemes that are already available as shown in Tab.4,intimating that the scheme effectively combats this assault.

Figure 5:Encypted images and it’s histogram plots

Table 2:Entropy of each encrypted grey channel

Table 3:Entropy of color images

Table 4:Comparison of entropy values

4.4 Adjacent Pixels Correlation(APC)

In terms of a linear relation,correlation measures the similarity or closeness among two or more variables[17].Mathematically APC is illustrated as:

In the above Eq.(10)sxyshows covariance and standard deviations based on random variablesxandyand is denoted bysx,andsy.The valid range for APC is 0 to 1.In the given range‘0’shows pixels having no similarity while‘1’show full/higher similarity among adjacent pixels.In case of images,neighboring pixels in a plain image are often relatively identical and have a high correlation level.However,in a cipher-text,it’s often desirable to always have a weak relationship among neighboring pixels,which indicates that the adjacent pixels are unique.It is because if there is any resemblance among pixels in an encrypted image,an attacker or cryptologist can readily exploit it by using the neighboring pixel to determine the content of another pixel.Compared to previous results,the suggested method can break the relationship among neighborhood pixels and has least correlation coefficient values.Tab.5 depicts calculated correlation values for five images in various directions such as Horizontal Direction(HD),Vertical Direction(VD),and Diagonal Direction(DD).In Tab.6,the calculated value for the presented scheme is compared to traditional art of schemes.One can confirm from Tabs.5 and 6 that the proposed scheme has low correlation in all directions.Moreover,Fig.6 shows original and ciphertext correlation plot.From Fig.6,it is evident that plaintext image has correlation while encrypted images has no correlation and pixels are dispersed.

Table 5:Adjacent pixel correlation analysis test for different test images

Table 6:The comparing of adjacent pixels with existing cryptosystems

4.5 Pixels Difference Analyses

Pixel difference analysis compares plain image content and scrambled image data.The difference between pixels in a plain and encrypted image is assessed utilizing two parameters:(i)Mean Square Error(MSE)and the peak to signal to noise ratio is another(PSNR).

The MSE between the cipher-text image and the plaintext image is measured to assess the proposed algorithm’s efficiency.It shows the average squared disparity among cipher-text image and plaintext image pixels.The below equation can mathematically be expressed as MSE[17]:

Figure 6:Correlation of pixels for three different direction

In the Eq.(11),M×Nis the total number of pixels.P(i,j)andC(i,j)is the plain image and cipher image pixels,row is denoted withiand column is denoted withj.For a secure system MSE should be greater.The calculated value for the presented scheme is shown in Tabs.7 and 8.Moreover,calculated value is compared to several existing schemes as shown in Tab.9.

Table 7:Different layers’MSE and PSNR values

Table 8:MSE and PSNR values

PSNR is a metric of the logarithmic (base 10) proportion between value calculated from peak signal and mean square error in image encryption assessment.Mathematically PSNR expresses as:

In the above Eq.(12) ‘Imax’shows calculated maximum value of the pixel.The calculated value for PSNR should be low for a good encryption scheme.The calculated value for the presented scheme is shown in Tabs.7 and 8.Moreover,calculated value is compared to several existing schemes as shown in Tab.9.

Table 9:Comparison of MSE values with other schemes

4.6 Sensitivity Analyses

Confidentiality of an image can be compromised if the plaintext and the encrypted images are identified.Differential attack has become very popular method for detecting this sort of relationship.The small variances in the plaintext message and corresponding scrambled images are discovered through statistical attacks.If a pattern emerges from these findings,the attacker can understand the relation between the encrypted message and the plain text and easily decrypt the message.As a result,employing an encryption scheme that ensures a radical shift in the cipher-text whenever the plain image is modified that would be beneficial from an encryption perspective.Three components are done to gauge and assess the effectiveness of an encryption scheme in this aspect.These are the unified average changing intensity(UACI)and the number of Changing Pixel Rates(NPCR).For our algorithm,these parameters were examined,and their corresponding values were compared.These fall into the category of strong encryption.Attackers seek to establish a bridge between the plain image and the encrypted image by analyzing how changes in an input affect the consequent variation at the outputs to infer the key.The encrypted image transforms when an attacker attempts to adjust the plaintext message,including altering even one pixel.

NPCR is a metric that assesses the number of unique pixels in plain and encrypted images in terms of percentage.Higher NPCR results reflect a significant variation between the plain and encrypted images.One can measure the NPCR values for various four encrypted images with a binary number adjustment and matched it to previously published standards.The NPCR comparison table affirmed our proposed technique for mitigating against differential assaults.The two cipher images areC1(i,j)andC2(i,j)are two ciphertext images which are differ by only pixel.Mathematically NPCR is defined as[17]:

whereD(i,j)is calculated as:

NPCR should be higher for secure systems.The ideal value is 100%.For the presented scheme calculated values are ≥99.60 which shows better security.

UACI is metric used to find the intensity level of plain and encrypted image.It is defined as:

In the above Eq.(15),W×Hshows total dimension of an image.C1(i,j)andC2(i,j)are the two encrypted image which is different by only pixel difference.The calculated results for UACI are shown in Tab.10 for various test images.If the values of NPCR ≥100 and UACI ≥33,it means that the scheme is highly secure.

Table 10:Grey layer wise NPCR and UACI values of certain standard images

5 Conclusion

In this article,we applied the principle of confusion and diffusion for the development of multistage image encryption scheme.Initially,an image(red,green,and blue layers)is converted into blocks with an equal number of pixels where each block is shuffled via TBCM and BPM to get shuffled blocks and shuffled pixels,respectively.In the proposed scheme,CFF to get highly random sequence and used in XOR operation.Using the obtained random sequencing,three layers of permuted images are XORed with random values obtained from MSF.Finally,the final ciphetext is obtained using Fadia’s substitution box.A number of experiments are used to assess the robustness of the proposed scheme and to authenticate the randomness of the newly proposed scheme.These tests include NIST-800-22 and other statistical tests that validated the strength of multi-stage scheme.In future,the aim is to extend this research for audio and video content encryption.Other multimedia data,such as audio and video,will be investigated and analysed using the suggested encryption technique.

Acknowledgement:The researchers would like to thank the Deanship of Scientific Research,Qassim University for funding the publication of this project.

Funding Statement:The authors received no specific funding for this study.

Conflicts of Interest:The authors declare that they have no conflicts of interest to report regarding the present study.