1 Introduction

Everyone is turning to the digital world. The Internet considers to be an essential part of communication between all parties. Internet communications are vulnerable to violations in the security triangle which need proper ensuring the security of information. Any data transfers through normal insecure communication channels are subject to be under attack affecting its Confidentiality, Integrity, and Availability (CIA). They are the main threats considered in the field of information security. Securing these three components (CIA) of information security has become an urgent need [32].

Today, our living in the digital world puts all communication multimedia to be facing urgent security challenges. Digital media includes several types, such as audio, videos, images, holograms, social media, and any virtual reality multimedia [8]. It exists in many industries like those associated with education, health, and government. This confirms the digital community needs for a continued secure environment that guarantees delivering and exchanging data to the user safely [3].

Nowadays, the usage of images has become more widespread among users. So, encryption data is necessary for protecting the privacy of content and preventing unauthorized control or access to information by modifications. This implies a necessity for verifying the authentication of the image via passwords for their security being vital multimedia data [3].

Currently, users’ sensitive images must be protected via cryptography [3]. The use of data encryption is urgently needed to be protected when transmitted through unsafe Internet channels [30]. Cryptography converts data to another form such that it changes texts from plain texts to ciphertexts form [7]. Encryption is the making of many different mathematical calculations to substitute the data and convert it into useless information [31]. It needs a secret key for encrypting and decrypting the data to ensure security [4].

Most applications are involving digital images in secure scenarios. It has recently entered heavily into sensitive fields like legal, military, and medical systems. The crypto methods designed for encrypting images have been limited and not very suitable for today’s usages[5]. For example, the AES system is not an effective efficient scheme to encrypt images. The structure of the images is different from AES practical data patterns. For this reason, researchers study the AES cipher scheme main operations to be tailored and organized for encrypting images [63].

There are two techniques to accomplish encryption: transposition, and substitution [80]. Firstly, the transposition method, which deals with pixels of the original image to map the block of image into other position and shuffle the position of the pixels. Secondly, the substitution method, which is used to change all pixel values [36]. Both techniques achieve confusion and diffusion goals that indicate the principle of cryptography[22].

Image encryption techniques are classified into three techniques; the first technique is permuting pixels. This technique changes the position of pixels which means rearrange the pixels for obtaining the reorganized image. The second technique is substituting values, the value of pixels is replacing according to a key generator. The third technique is a combination of permutation and substitution techniques [58].

Last few years, researchers have studied different problems in image encryption. They have suggested several efficient schemes based on various theories such as; Jacobian elliptic maps [17], Arnold’s Cat Map [54], zigzag transformation [57], Baker map [44], discretized tent map[91], Deoxyribonucleic Acid (DNA)[83], S-box transformation [35], Rubik’s Cube [88], and the affine transformation [2], amongst many other studies.

This paper is dealing with a symmetric encryption [12], which the process is using the same key for encryption and decryption. It utilizes pseudo random number generator (PRNG) to realize encryption [14]. For example, the studies, in which the same method of image encrypted using PRNG with a different approach is a clear in [14, 38, 60, 71]. PRNG is a procedure of generating a sequence of random numbers with two essential properties; unpredictability and randomness [74].

The term ‘pseudo’ refers to that the computation numbers are not truly random, however, it’s random enough in terms of cryptography application [21]. The pseudo random number generator requires the initial value called as the seed value [37]. Usually, the user has to provide the seed, then the generator can generate a sequence of random numbers [77]. To ensure a good chosen PRNG for cryptographic purposes, it should pass the United States NIST [15]. It can be conducted on any random generator to determine randomness quality. Poor random generator selection leads to a weak system used in the encryption purpose [21]. For instance, linear congruential random number generator can be expressed in term of linear equation, and can be described as modular linear equations [11]. It can be predicted by guessing internal constants, and detect the state of generation [11]. Due to that reason several scientists are working to improve PRNG weaknesses, particularly the applications of PRNGs used in image encryption [23].

The PRNG can generate long series of random number with good random behavior. For each PRNG should have several properties to consider the right choice. There are respectively, large period, reproducibility, uniformity, consistency, independence, portability, disjoint subsequences, permutations, and efficiency [18]. Therefore, this pseudo random number generators are chosen to be our objective study for encrypting images. We will explain the suitable and effectiveness generator for using in encryption images.

Several researchers are concerned to improve image encryption. The mathematical properties of PRNGs have been widely studied, i.e. researchers developed and proposed a new PRNG in [25, 53, 68, 82, 90]. The practical assistance for determining the strength of RNG algorithm can be providing a strong encryption system. In contrast, we can find that weak randomness is ensuring the scheme of random number generator insecure performance. Due to this security requirement, this research reveals the performance for each individual six of PRNGs using in encrypting images. We will try to convey information about good results for encrypting images based on six PRNGs. The security analysis exposes the highest and worst effective image encryption for many different types of PRNG. So, the research can demonstrate the efficient generators with good characteristics tend to be encrypted images secure totally.

In this paper, we introduce exploring different pseudo-random number generator options for possible improving the security strategy of the image encryption [71]. Our research tested its experimentations on RGB images at the block of pixels levels to obtain cipher image. The work explores the image encryption involving different PRNG within both permutation and substitution sequential techniques, for fair comparisons, i.e. similar in principle to the two steps security presented in [71]. To be specific, the research’s main contribution implements the cryptographic approaches via creating the key streams by six pseudo-random number generators (PRNGs) for selecting the appropriate one. The six PRNGs models involved are: (1) Mersenne Twister(MT), (2) SIMD-oriented Fast Mersenne Twister (dSFMT), (3) Combined Multiple Recursive (MRG), (4) Multiplicative Lagged Fibonacci (MLFG), (5) Shift-register generator summed with linear congruential generator (shr3cong), and (6) Modified subtract with borrow generator (SWB). According to this sequence, the pixel permutation and substitution are performed differently, i.e. 6 times applying every PRNG showing different results. All experimental have been conducted on several statistical measures. The results determine the suitable PRNG to use in image encryption and present the final PRNG that achieved the highest effectiveness to secure the image.

The flow of the paper presentation is as follows. Section 2 covers the literature review. Section 3 describes the methodology of our proposed image encryption mechanism using the PRNG algorithm. Section 4 discusses the results and shows the experimental notes. Section 5 presents the comparisons of our proposal vs. others. Section 6 includes the conclusion of the paper.

2 Literature review

2.1 Related image cryptography

In this section, we will cover the fundamentals of image encryption with two encryption processes as standardization used within this study [71]. This depends on the encryption of images by transposition cipher followed by substitution cipher using random number generators. Coverage will include a brief description of PRNG, and permutation and substitution methods in the context of image encryption and illustrations and highlight the implementation of each operation separately.

2.1.1 An overview of the basic image encryption processes

Image encryption is the process of encrypting an original image in an unreadable form that can only be read and be visible by the owner or authorized person. Many methods can be applied to images based on many transposition or substitution to obtain cipher image [38]. The fundamental concept is as shown in Fig. 1, Alice can encrypt the image before sending it by using her key, while Bob receives the encrypted image. He is able to decrypt it using the same key. The powerful algorithm is used between the two parties in encryption, which makes image information random, and makes it difficult for Oscar to know its contents.

Fig. 1
figure 1

The general steps for encrypting images

The property and structure of the images have a high redundancy in pixel values and their important size. In addition, the 256 scales are repeated in more than one pixel, which leads to a strong correlation among pixels [6]. These characteristics or image’s behaviors are not suitable to some of the behaviors of the encryption algorithms, used in both Symmetric key encryption and Asymmetric key encryption types, such as ASE [73], RSA [73], and DES [73] for their useful use in textual data.

The PRNG is used in cryptography to generate secret keys [78]. The PRNG can produce a set of sequences of random numbers involving two properties unpredictability and randomness [74]. The sequence of the PRNG keeps repeating itself according to the specified length of the period and produce long sequences of random numbers also unpredictable nature of the produced random numbers.

Figure 2 explains in-depth the technics of PRNGs used in our cryptosystem to investigate their performance. The behaviors of random number generators are unpredictable, randomness, and uniformly distributed. We can generate two keys by using six PRNGs: permutation key and xor key. In the permutation process, we reorder or rearrange the block of the image to shift to another position [40]. This situation remodels pixels of the images and makes them visually random. Furthermore, in the substitution process, change, or replace pixels by substituting the pixel’s identity [40]. It leads to replacing pixels with another value by keeping the same position of the pixels. We will introduce in detail manner the two techniques that we will use in image encryption and describe the performance of PRNGs in the two processes.

Fig. 2
figure 2

PRNG for encrypting images

The basic block permutation for encrypting image

The technique of transposition is accomplished by performing some sort of permutation on the images. The identity of the pixels is not altered, also the technique doesn’t replace one pixel with another and instead, it switches the location of pixels. The position of pixels in the image is arranged according to the random removal of the association between pixels [19]. The image content would be totally disordered, and it will not remain understandable. Flipping and altering the pixel values orderly can be termed as a confusion concept [89]. The aim of applying permutation is to reduce the possible correlations between the plain images and the cipher images [28]. And, to stand powerful against common differential attack measures as well as to prevent brute force attacks.

Block permutation is a process for the decomposing image into blocks [49]. These blocks are permuted according to a map with a newly replaced index vector. If the number of blocks is very small, namely it is 1 block, then the images are not clear after the permutation [49]. In another word, each block contains 1 pixel and is then transformed to another location [13]. The process of permuting the position of each pixel in the image is based on the linear indexing concept. This indexing treats the matrix as if it is a long vector in which the elements start from the top left corner and go down the first column. Then the second column, etc., along with the last element that is positioned in the bottom right corner of the matrix [70].

For example, in the illustration Fig. 7, we can do the block permutation technique by creating a square matrix with 3 × 3 sizes, which describes the concept of process. We suppose the square matrix size of the image is 3 × 3 to maximize the visibility of operations in a simplified way. In addition, illustrating the matrix with an original index position for all elements, P(i,j) is the original position of the block image.

$$ \mathrm{Suppose}\ \mathrm{a}\ \mathrm{square}\ \mathrm{matrix},\mathrm{P}\left(\mathrm{i},\mathrm{j}\right)=\left[\begin{array}{ccc}199& 140& 55\\ {}30& 44& 71\\ {}18& 6& 22\end{array}\right]\to \left[\begin{array}{ccc}P1& P4& P7\\ {}P2& P5& P8\\ {}P3& P6& P9\end{array}\right] $$

In this fundamental scheme, the encryption, and decryption process deal with PRNGs to create the permutation key. They produce the integer sequence of values. The generated key is based on a seed value. Entering the same seed is to output the same sequence of values by PRNG. A series of random integer numbers will be generated along with the size of the images, or rather the size of the index length of the matrix, which is 9 blocks long of images, or 9 IDs of the linear vector. It’s permuting index length, as it’s clear in Fig. 4 the permutation key is [1 6 5 2 4 7 9 8 3].

On the sender’s side, the essential matrix can be encrypted using a series of random numbers as a permutation key. These steps are preparation for the encryption process, which uses the PRNG key to scramble and permutes the matrix indexes. The matrix divides into a random number of blocks. Each matrix index, should rely on the key by linking each random number in the cell array to the index. All original index values from 1 to 9 are rearranged into the new array by, shuffling value using the new random indexes obtained from the PRNG. For more clarification, Fig. 3 shows the index of original matrix 1 with value 199 goes to the replaced index number 1 with the same value 199 in a new array, and the index of original matrix 6 with a value 6 goes to the replaced index number 2 with the same value 30, and so on. The rest of the new array indexes are filled in the same method as mentioned before. p’(i,j) refers to block image after shuffling. It’s a swapping position, by mapping key permutation with P(i,j) to result in the scrambled matrix.

Fig. 3
figure 3

General illustration for scrambling matrix

Fig. 4
figure 4

Permutation blocks image and de-permutation process

Fig. 5
figure 5

MT generator frequency

Fig. 6
figure 6

XORkey frequency by using MT generator

Fig. 7
figure 7

Image encryption using transposition and substitution operations and PRNGs

Fig. 8
figure 8

Two categories of RNGs types

Fig. 9
figure 9

Most suitable generator for each application

Fig. 10
figure 10

The first experiment

Fig. 11
figure 11

The second experiment

Fig. 12
figure 12

The third experiment

Fig. 13
figure 13

The graphical user interface window

Fig. 14
figure 14

The system gets the inputs for preparing color image encryption

Fig. 15
figure 15

The system obtained the final encrypted image and results of performance analysis

Fig. 16
figure 16

The system gets the inputs for preparing color image decryption

Fig. 17
figure 17

The system obtained the final decrypted image

Fig. 18
figure 18

Image encryption by using MT generator. (1–3) is an original image. (4–6) is scrambled images by using the permutation method. (7–9) is ciphered images by using the substitution method. (10–12) is an encrypted image by using a combination of two methods of permutation and substitution

Fig. 19
figure 19

Histogram of images encryption by using MT generator. (1–3) is original image. (4–10) Histogram of scrambled images by using permutation method. (11–15) Histogram of ciphered images by using substitution method. (16–20) Histogram of encrypted image by using combination of two methods permutation and substitution

Fig. 20
figure 20

Correlation of adjacent pixels: (1–3) horizontal, vertical, and diagonal correlation for each channel of plain Lena and scrambled image using MT generator. (4–6) horizontal, vertical, and diagonal correlation for each channel of plain Lena and XORed image using MT generator. (7–9) horizontal, vertical, and diagonal correlation for each channel of plain Lena and encrypted image by combining of two encryption processes using MT generator

$$ \mathrm{Cipher}\ \mathrm{matrix},\mathrm{C}\left(\mathrm{i},\mathrm{j}\right)=\left[\begin{array}{ccc}199& 30& 22\\ {}6& 140& 71\\ {}44& 55& 18\end{array}\right]\to {\mathrm{p}}^{\prime}\left(\mathrm{i},\mathrm{j}\right)=\left[\begin{array}{ccc}P1& P2& P9\\ {}P6& P4& P8\\ {}P5& P7& P3\end{array}\right] $$

The output on the sender side from this technique is the scrambling matrix. The writing result from this technique output is, to ensure securing the information and keep it unnoticed, or visible. After the data transfer to another side, it is read as a scrambled matrix. Then the technique produces the same series of random numbers, which the sender used before. Each random number refers to the original index of a matrix, all block IDs go to restore, and order according to the obtained series random numbers. Index 1 in the scrambled matrix, linked to random number 1, and index 2 in the scrambled matrix linked to next random number 6 to reorder the original matrix and so on along the scrambled matrix until the whole data is decrypted.

The research studies six of PRNGs for encrypting RGB images. All six random generators are underperformance analytic procedures. For each generator, we study their efficient use to encrypt the image. Each of the random series is used as a new indicator of pixel position and similar in principle to the work presented in [71]. The original images after the change, have the indexes of random series. The performance of the six generators is studied in terms of applying image encryption to all six generators and recording several security measurements.

The length of the elements for each vector of the different PRNGs is from 1 to the length of the selected image. The behaviors of all key generations are nonrepeating random integers. As shown in Fig. 5, we selected the color Lena 256 × 256 and MT generator. The random permutation key is 1-dimensional with a length of 1 × 65536. It takes the same length of the original image, as the color Lena 256 × 256. The frequency of each 65,536 samples of random integer permutation is 1. This confirms that each number in the vector appeared one time. It is a permutation of a set (1, 2, … 65,536). Each vector content depends on the value of the seeds and the type of algorithms used in the permutation process. The distribution of each number of all series are integer, unique, and unsigned.

The basic pixels substitution for encrypting image

One of several systems used to encrypt images and diffusion is a substitution cipher. This kind of cipher, is a method of replacing bits with substitution way using a particular algorithm. The algorithm determines how the replacement occurs, and it is based on a key. Therefore, the receiver of the encrypted message, must know the algorithm used for encryption, and key mechanism to apply the decryption. When the receiver receives the encrypted image, the receiver will use the known substitution algorithm between the two parties to decrypt the images and show the original image that the sender wanted to send.

When making substitution and transposition ciphers in images, there are obvious differences between the two methods. In the process of transposition, the primary target is confused changing positions without being affected on pixel values. Otherwise, substitution cipher maintains the same sequence of pixel positions and modifies the same pixels with other values determined by the algorithm and the key used in encryption.

Substitution cipher is utilized pseudo-random numbers to generate keys that is a suitable structure, for encrypting the images. Each bit of the image is linked with the entire key by XOR operation, to replace the plain image bits in the encrypted image bits. Any changing on bits of the key, will alter the cipher image entirely. The XOR operation appears in a binary sequence with two values 1 or 0 and the probability of 0 appearance occurs when the two entrances are the same while the probability of 1 value appearance occurs when the two entrances are different.

For instance, if we assume the 3*3 matrix refers to a plain cropped image, we can estimate the general processes and explain them in detail as following: To cipher color image in a range of [0255], we use XOR operation by generating key in the same image class. Anyway, the P refers to the plain image with 3*3 sizes and KE refers to the key of encryption with the same size of P. The KE is equal to KD that is used in an inverse way to decrypt the image. Each pixel shall XORed with the corresponding key. The results of XOR operation are shown in the following Table 1.

$$ \mathrm{Suppose}\ \mathrm{plain}\ \mathrm{image},\mathrm{P}=\left[\begin{array}{ccc}199& 140& 55\\ {}30& 44& 71\\ {}18& 6& 22\end{array}\right] $$
Table 1 A simple illustration example of the xor process that replaces each pixel with the corresponding value of the key

Generating key by using Mersenne Twister generator.

$$ {\mathrm{K}}_{\mathrm{E}}=\left[\begin{array}{ccc}25& 84& 129\\ {}56& 52& 185\\ {}238& 43& 146\end{array}\right] $$

Then cipher image E: C = P ⊕ KE

$$ \mathrm{C}=\left[\begin{array}{ccc}222& 216& 182\\ {}38& 24& 254\\ {}252& 45& 132\end{array}\right] $$

The real example of performance analysis on samples of XORkey is as shown in Fig. 6. We create a key using the Mersenne Twister generator for the same size as 256 for Lena’s color image. The random number series are integer numbers. Key behavior appears to have a low and maximum value in the period [0255], and has recurring numbers so when the series reaches the specified period it produces the same period again until the key size is completed.

The combination of the transposition and substitution processes make the security system stronger and more complex. The sequence of the two processes depends initially on the image encryption by the transposition cipher and secondly on applying the substitution process to the result of the image we obtained from the transposition cipher. So, one of our objectives in this study is to study the performance of all six PRNGs to generate keys that will be used to encrypt the images and conduct tests on the results of the encrypted images.

This research aims to recommend encrypting images in a suitable way, and determine the efficient PRNGs between usage different options of PRNGs. The study records the several parameters to determine the effective security way for encrypting images by three techniques of encryption by using six of PRNGs. All three techniques of experiments (permutation, substitution, and combination two operations) are shown in Fig. 7. The three experiments should show differences in results. Each experiment should analysis with several measurements and by comparing the results, we can record the high score in results. The high results can be a good effect on cost-effectiveness. Otherwise, when the results record low score in measurements, the cost- effectiveness refers to the worst way of image encryption.

figure b

2.2 Related random number generator (RNG)

Random number generators (RNGs) are essential bases for cryptography [39]. For example, they are commonly used as trustworthy key generators for public-key cryptosystems e.g. RSA, symmetric key e.g. stream cipher, and as sources of passwords. Random numbers are intrinsic to the account in certain algorithms such as DSA or protocols such as zero-knowledge proof [27]. RNGs are a principal method used for producing a sequence of numbers by using software or hardware types of generator between specific interval [min, max], this sequence has a feature such as non-deterministic in nature.

When the generator computes the values mathematically, each sequence of values should be independent of the others. Some features which are considered to be desirable RNG:

  • The RNG should be fast enough in producing a large sequence of random numbers.

  • The RNG should be more secure against attackers.

There are two types of random numbers generators (RNGs) founded on vary source of randomness as shown below [50]:

  • True random number generators (TRNGs):

TRNG presents genuinely random data obtained from non-deterministic events that exist in nature. It is a non-deterministic generator utilizing a physical process. The entropy of the output of the generator depends upon the entropy of a source. Physical phenomena generally used in the production of random numbers are thermal noise, radioactive decay, and the cosmic microwave background [10].

  • Pseudorandom number generators (PRNGs):

PRNG is explained as a mathematical algorithm for generating a sequence of numbers with random features. It is a deterministic generator utilizing a mathematical algorithm. Due to that, it is not truly random, it completely depends on the initial value, called as the state of the PRNG. The initial value needs to be unpredictable and random [62].

The classification of RNGs is shown in Fig. 8, depending on the form of the algorithm used, mathematical and PRNG can often be classified into many types each type has its own mathematical calculation; and on the other hand, TRNG has many structures based on various entropy sources, it attracted many researchers and research is acquiring an impetus yet, recently, it can be classified into four sources: noise, chaos, free-running oscillator (FRO), and quantum RNGs.

In comparison, the merits of PRNGs are totally different from TRNGs. TRNGs are considered roughly ineffectual compared to PRNGs, it extremely spends a long time to generate numbers. They are too non-deterministic, i.e. it is not possible to repeat presented sequences of numbers, while the same series can definitely occur many times by chance. TRNGs don’t have a specific period [33]. The two types of RNG can be described by three main characterizations as it is shown in Table 2.

Table 2 Comparison of the three main qualities between PRNG and TRNG [33]

Based on different characterizations between PRNG and TRNG, the appropriate RNG type with high characterization is suitable approximately for the set of applications. For example, using TRNG for games and data encryption is suitable. Whereas excellent efficiency and deterministic nature of PRNGs make them more appropriate for simulation and modeling applications. The following Fig. 9 presents which applications are better supported by its generator type [33].

In this research, we compare six types of PRNGs to determine their suitability for image encryption. All PRNGs involved in this research appear as follows:

  1. A.

    Mersenne Twister generator (MT) [48]. (It is known as mt19937ar)

  2. B.

    SIMD-oriented Fast Mersenne Twister (dSFMT) [64]. (It is known as dsfmt19937)

  3. C.

    Combined multiple recursive (MRG) [41]. (It is known as mrg32k3a)

  4. D.

    Multiplicative Lagged Fibonacci (MLFG) [47]. (It is known as mlfg6331_64)

  5. E.

    Shift-register generator summed with linear congruential generator (shr3cong) [45]. (It is known as shr3cong)

  6. F.

    Modified subtract with borrow generator (SWB) [46]. (It is known as swb2712)

2.3 Considered image encryption work

The researchers in the digital security field have proposed many digital encryption methodologies that are specialized in media encryption and decryption mechanisms. This section gives a general overview of media encryption methodologies, where PRNG algorithms are used to encrypt the digital images.

  1. A.

    Image encryption utilizing scrambling

From the practical point of view, the scrambling of the image in classical cryptography is analogous to the substitution process. In modernistic cryptosystems, the scrambling of the image is also utilized in pre-processing and post-processing for encrypting images. This also plays a significant role in cryptography. Experts have recently carried out extensive and in-depth analysis work which has accomplished fruitful results. Arnold transform, also known as cat map, which Arnold proposed while he was researching Ergodic theory. Arnold transform was suggested for the transformation of the large dimensions [20]. Furthermore, researchers suggested other image scrambling approaches, for example, affine transformation, the MagicCube, and Baker’s transformation. The scope of several advanced types of research involves various methods of scrambling image as follows:

Sarma et al. in [67] propose image encryption methodology based on scrambling techniques to change pixels positions. The methodology is based on two keys, which are used as input to their proposed algorithm to produce a sequence of random numbers that will be used to scramble the image to be scrambled. Their methodology reads the image, finds its size, converts it from a 2D matrix to a 1D array, generates the random sequence of numbers based on the given two secret keys, scrambles the positions of pixels accordingly and outputs the scrambled image. The approach uses two keys as input instead of incorporating a password. The scenario is inappropriate to use real numbers.

T. Sivakumar and K [71]. Gayathri Devi proposed irregular stage of squares and performing XOR activity over the permuted picture with the key produced by utilizing Lagged Fibonacci Generator (LFG) for image encryption. The graph square shows the progression of procedure for there’s proposed technique. These methods are our enthusiasm to contemplate the viability encryption way and research various forms of PRNGs.

In 2018, a novel PRNG based image encryption methodology was proposed by S. Saha et al. [63]. The proposed encryption methodology showed highly efficient encryption processing by incorporating the two processes permutation of pixels positions and substitution of pixels positions. Therefore, the proposed encryption methodology is considered a two-level image encryption, where in the first level the shuffling of the pixels is based on the PRNG algorithm LFSR. The second level, encryption is performed where the XOR is applied on the pixels to substitute their values by replicating the rows with columns to produce the final encrypted image.

Ramasamy et al. [59] proposed a novel symmetric key generation to encrypt color image. They use block scrambling, modified zigzag transformation, and enhanced logistic-tent map. Block scrambling is conducted on color image, and the total number of blocks is 64 blocks. Then, a modified zigzag transformation is applied on the obtained result from block scrambling technique. So that the key is generated by using enhanced logistic-tent map and using secret key to XOR RGB image after performed zigzag transformation.

Zhou et al. [92] implemented a quantum image algorithm focused on Arnold transform created to encrypt location information, whereas the gray-level information encrypted through the double random-phase processes, which is heuristic to present more techniques of image processing into quantum image encryption. The proposed algorithm for image encryption has reduced computational complexity than its traditional predecessors.

  1. B.

    Image encryption based on entropy concept

In 1948, the inventor of the theory of information developed the principle of entropy-based information in thermodynamics [69]. Thermodynamics entropy explains the disordered state of the physical system, and thermodynamics entropy is considered as a measure of the degree of disorder. Similarly, we also take into consideration information entropy to be a measure of the degree of signal disturbance that is used to describe information instability. When the receiver obtains information, the ambiguity is reduced, the entropy of the source is lowered to acquire the information. Image encryption aims to render the encrypted image in a state of disorganization. Consequently, image encryption is intended to improve the original image’s security. Pixel replacement and pixel diffusion are both successful ways to change image encryption pixel values which can reduce pixel correlation and increase the entropy of information. The value of each pixel will be changed individually in the pixel substitution process which is not connected to others. Taking into consideration that image encryption needs high speed, and the image substitution normally utilizes “Exclusive OR” operation [76]. Lately, this method is involved in several types of research, we can demonstrate them bellow:

Banthia and Tiwari [14], show a suggestion for encrypting images, by using two techniques of random generators. The two random generators are linear congruential generator, and Logisitic map. The linear congruential generator permutes the position of pixels. Rows and columns reorder according to number generated. The Random number is generated by Logisitic map. These numbers are used to reorder the position of rows, columns, and pixels.

A. Ramesh and A. Jain [60] have proposed a new hybrid image encryption methodology using Pseudorandom number generators. Their methodology combines two pseudorandom number generator algorithms, the first is the Altered Sophie Germain Prime (ASGP), where the generated pseudorandom numbers are used as the new values for each pixel of the image to be encrypted to output an intermediary ciphered image. After that comes the second phase, where Lehmer Random Number Generator (LRNG) is used to generate pseudo-random numbers based on the user’s entered the key, and the resulting sequence of random numbers is used to swap the position of each pixel of the encrypted image with another pixel.

Another algorithm was proposed in 2015 by V. Kapur et al. [38] to encrypt and secure images using Pseudorandom number generators. Their proposed methodology is a two-level image encryption algorithm, where the first phase uses the Linear Feedback Shift Register algorithm to swap the rows and swap the columns of the image to encrypt it to produce an intermediary ciphered image. After that comes the second phase where the Blum Blum Shub algorithm is used to substitute the values of the intensity of each pixel of the image using the generated pseudorandom numbers and produce the final ciphered image.

One of these plans examined by Imam Saputra [66] contemplated randomization of images utilizing just one occasion cushion calculation which is an exceptionally amazing calculation and very hard to unravel by cryptanalysis within the event that it’s an extended and arbitrary key. Utilizing a produced key utilizing an instantaneous compatible arbitrary generator will create an irregular key.

  1. C.

    Image encryption based on Chaotic scheme

The chaos theory is a branch of mathematics that focuses on the actions of the Dynamic structures extremely sensitive to initial conditions. The chaos theory implies the nonlinear dynamic system’s random phenomena; this phenomenon is non-convergent, non-periodic and is highly susceptible to initial and external parameters. Chaotic systems are nonlinear dynamic systems [42] with strong randomness that can generate pseudorandom series and is useful for data encrypting. In 1997, the chaotic systems were introduced for data encryption, and Fridrich introduced the image encryption method at first based on a chaotic system [26]. Recently numerous studies discussed this approach as follows:

Linda and Karim[29], proposed a combination of pseudo number generator to generate an encryption key. The key generated is used to encrypt an image in two stages. The two stages are confusing and diffusion. Pixel permutes and changes according to the combination keys of two Logistic map.

Rohith S. et al. [61], the authors suggested a composite method to generate the encryption key used, for encrypting the gray image. The method depends on the image encryption by using the theory of chaos. The two random generators Logisitic map, and LFSR are used to generate two keys, and apply the XOR process to obtain the final key that shall be used to encrypt the image. This approach is better in security because it depends on the combination of chaos systems to provide the key instead of generating key by single chaos.

Chanil and Lilian [52] have introduced a new color image encryption with a better new one-dimension chaotic system. This approach is better chaotic performances than the old one-dimensional chaotic map. The method produces chaotic sequence for shuffling pixels positions and obtains scrambled images. After that, diffusion operation is applied to a permuted image.

Several image encryption algorithms have been evolving in recent years to increase the capability of transmission and encryption such as in Ye et al. (2020) [84], optical multiple-image encryption systems. Ye et al. suggested an encryption technique for multi-image founded on quaternion discrete fractional Hartley transform (QD-FrHT) and enhanced pixel adaptive diffusion. Moreover, in this method, the plain images are compressed into four fusion images by using two operations; discrete cosine transform (DCT), and Zigzag operations. Then the four resulting images are defined as the quaternion algebra.

Another study suggested image encryption using the phase-truncated short-time fractional Fourier transform, along with the hyper-chaotic system [87]. PTSTFRFT is distinguished from standard phase truncation coding in that it has been paired with wave-based permutation. This is achieved according to create the encryption unite to code divided image. In this encoding, the confusing phase information is recombined with the amplitude information.

3 Proposed method

This paper presents different keys of six types of PRNGs based on color image encryption. The research examines different possible techniques for encrypting images. Depending on this research, we can introduce an effective generator for using to encrypt images. The system checks the performance of individual PRNG by using three techniques for encrypting images, i.e. we use MT generator in different phases for permuting image technique, substituting image, and combined of two techniques. Then, we work on estimating the performance for MT generator at each state of three techniques. The main processes consist of encryption and decryption processes.

The encryption process makes at the sender side and the decryption process at the receiver side. At the encryption process, the proposed methodology receives the image to be encrypted as well as the secrete pin-code that is used as a secret password only between the authorized users (the sender and the receiver). The proposed methodology takes the pin-code as the seed value to the PRNG algorithm to encrypt the image and output the encrypted image.

On the other hand, at the receiver side, the proposed methodology works in the reversed order. It receives the same pin-code from the receiver user and the encrypted image, takes the pin-code from the receiver user, and inserts it as the seed value to the PRNG. However, the steps were taken previously for encrypting the image is now taking in the revised order to decrypt the image and outputs the decrypted image to the receiver user.

The main objective of this research is to determine and presenting a secure way to encrypt images based on different types of PRNGs. The implementation of encryption images is to use the same basic scheme of encryption and decryption with all 6 PRNGs. This work shows the performance of different types of PRNGs. Each random generator individually can produce a high or slow score rate in several measurements. The system checks the good and worst results of image encryption based on PRNGs with three methods of experiments of encryption.

The research examines three outputs images: (a) a permuted image using a permutation blocks process, (b) a ciphered image using XOR, and (c) a permuted image encrypted using XOR. Several statistical parameters of the three images are computing to demonstrate strong performance between methods and compared with each other. The main three methods experiences for encrypting images are discussed as follows:

  1. A.

    Approach 1: Permute images by using only transposition cipher/permutation. The method is done with the same existing study in [67, 71]. The user should insert the initial value. It appeared in Fig. 10. Each pixel was reordered randomly. Pixels positions in original image change to new positions. This method leads us to perform analysis on scrambled images and study the performance for all 6 permutation keys of PRNGs.

  2. B.

    Approach 2: Substitute each pixel with a new value by using a substitution cipher. Similar work is in a one-time pad algorithm [66, 71] with different PRNGs. In Fig. 11, we apply only XOR operation to encrypt images. The research records the differences with previous method 1. The outputs from this method are placed in several measurements. Each usage of 6 XOR keys of PRNGs indicates different results. All keys have been analyzed individually by using the National Institute of Standards and Technology of the U.S. Government (NIST).

  3. C.

    Approach 3: Combine two operations to encrypt images, respectively as shown in Fig. 12. In this method firstly, use the generated sequences to randomly shuffle the pixels. Secondly, apply substitution, for XORing each pixel with a key. Thirdly, the encrypted image is evaluated and compared with other previous methods.

GUI implementation for encrypting RGB image through single PRNG

The system implementation for encrypting RGB image of a single type of six PRNGs is shown in Fig. 13.

The window that appeared after the implementation contains two panels:

  1. A.

    The left panel specializes in encrypting an RGB image by splitting three channels of the color image. It contains a button to select a color image that will be encrypted.

  2. B.

    The right panel represents the receiver side. It takes a reverse operation for encrypting color images. The decryption side contains a button to select an encrypted image that will be decrypted.

When, a color Lena image uploads and runs the process for encrypting Lena image by using MT generator, the window can be shown as in Fig. 14. The requirement to continue the encryption process is to insert a PIN. Besides, each time the user enters a different pin code, a different sequence of random numbers will be produced accordingly, and hence the output of the encrypted image will be different and unique from any previous encryption processes. The entered pin code will be used as the seed value for the PRNG algorithm, and during implementation. This pin code will produce a sequence of random numbers based on this seed input value.

The final output from the encryption process is shown in Fig. 15. The performance metrics are applying for each plane; R plane, G plane, B plane, and for combining RGB.

The right panel is a decryption process. The system gets two inputs from the user to decrypt; the encrypted image that the user wants to decrypt, and PIN, as shown in Fig. 16. The seed is the produced sequence of numbers. It is produced to encrypt the image which can be reproduced by the receiving user to decrypt and hence receive the encrypted image.

The final decrypted color image is done by reversing the operation of encryption, as shown in Fig. 17. If the user entered the pin code incorrectly, he/she could not read the image and decrypt it. That user will only be able to decrypt it who knows the secret pin code that the sender used to generate the image. When the correct pin code is provided, then the same shuffled and substituted sequence will later be obtained.

The following subsections explain the steps to be considered during image encryption and decryption.

3.1 Encryption process

In the encryption process, we study the two operations performed within the cryptosystem. The process runs transposition followed by substitution which has been proven to secure the images for communications [63]. The cryptography algorithm is tested on RGB images.

3.1.1 First operation: Transposition/ permutation block

  • Step 1: Read the plain color image from the user; RGB channels image.

  • Step 2: Get the Secret personal identification number (PIN) code from the user, as a seed of PRNG.

  • Step3: Divided image into separate blocks, where the number of pixels in each block is one pixel per block.

  • Step 4: Test the six PRNG algorithms, starting with the same pin code (seed) to generate a random sequence. The six PRNGs that are considered in this study: (1) Mersenne Twister, (2) SIMD-oriented Fast Mersenne Twister, (3) Combined Multiple Recursive, (4) Multiplicative Lagged Fibonacci, (5) Shift-register generator summed with a linear congruential generator, and (6) Modified subtract with borrow generator.

  • Step 5: Shuffle the positions of the pixels according to the PRNG results (generated random numbers). The pixel permutation is performed by all six selected generators in this study so that each image will be scrambled once time at each time we select one generator from the six random generators.

  • Step 6: Display the scrambled image after transposition and examine the security of the results.

3.1.2 Second operation: Substitution / XORing pixels

  • Step 1: Use the same generator of PRNG for every transposition operation. The range of each key from the six PRNG is (0 to 255). The key size is the same image size for applying the one-time-pad XOR substitution operation.

  • Step 2: Do XOR the resultant image with a key to encrypt the image. An XOR operation is substituted with each pixel value in the image with the corresponding key value of the pixel value.

  • Step 3: Display the encrypted image after substitution and examine the results.

3.2 Decryption process

The decryption process applies the encryption algorithm in reverse order. The process takes place in the communication process at the receiver end of the image transmission. The original image can be obtained by entering the user with the correct pin code that was used for the same image encryption. To be specific, the decryption process can be outlined as below.

3.2.1 First decryption operation: XOR (de-substitution)

  • Step 1: Read the encrypted image from user and get the length, breadth, and num of channels.

  • Step 2: Generate the same sequence number key by a similar process that was used for encryption.

  • Step 3: Perform XOR decryption between the image and its key-image.

3.2.2 Second decryption operation: Pixel unscrambling (de-transposition)

  • Step 1: Use the same pin code with the same PRNG algorithms to generate the same six PRNG sequences of random numbers.

  • Step 2: Use the generated random numbers in the reversed order to un-scramble the pixels of the encrypted image (de-transposition: undo the shuffling of pixels positions).

  • Step 3: Convert the sets of unscrambled pixel blocks to an image. Then, retrieve and display the decrypted image.

4 Results and discussion

This section studies the results and statistical comparison remarks applying the approach images cryptography. The test is noted in every stage of encryption to build a fair exploration. The study tested its philosophy on one form of RGB images. Our security analysis is made by studying several metrics showing results of key sensitivity, visual testing, histogram, Chi-squared, Mean, median, variance, standard deviation, entropy, correlation, MSE (Mean-Squared Error), PSNR (Peak Signal to Noise Ratio), Signal to Noise Ratio (SNR), Mean absolute error (MAE), Normalized Absolute Error (NAE), structural similarity index (SSIM), Structural dissimilarity (DSSIM), Universal Image Quality Index (UIQI), IQMs based on difference distortion, and measuring time analysis.

The implementation and examination platform used was MATLAB version number R2019a, on a laptop with an operating system of Windows 10, Intel 5(R) Core (TM) i5-7200 U running CPU @ 2.50GHz 2.70GHz, 8GB memory, and 64-bit Operating System, ×64-based processer, i.e. to implement the methodology, and conduct the images encryption and decryption, as well as doing all the testing that comes after finishing the implementation phases. All experiments of encryption methods are tested on 5 color images from the USC-SIPI image database [75].

4.1 Visual testing

As shown below in the following Fig. 18 by the visual testing with abstract sight, nothing can be inferred from the encrypted images with a combination of permutation and substitution methods proving that the image encryption method is visually effective. The figures show samples of images in which we validated our algorithms and present each original image with corresponding encrypted images of the steps of the operation. The study presents encryption images by permutation images method to prove its experimentations. There is no change in the pixels value. While using the substitution method, the results show nothing in the correlation between pixels except the change in the intensity of the pixels.

4.1.1 Histogram

The histogram is a methodology used to calculate the color-level intensity in the image. In the case of gray-level images, the histogram diagram shows how many pixels are there in each one of the 255 grey levels. It is applied to the color image by separating each channel from 3- dimensional into red, green, and blue histogram individually. The plot is used to compute the number of pixels on the y-axis for each color that is presented on the x-axis. It estimates the distribution of color in encrypted images for image encryption methodology.

We work through our methods to implement the algorithm to encrypt images with no statistical link between the original image and the encrypted image. We use the histogram functions to be applied to the color images to view the pixel intensity by graphically displaying the number of pixel distribution of the images after the encryption. Figure 19 are shown differently after implanting each of the cryptographic stages of the study for samples of color images and their cipher images. The cipher methods with the three different outputs can show differences in comparing histograms.

The results are good in using a substitution cipher method, and in using a combination of permutation and substitution ciphers. The bars of the histogram diagram of the images after encryption are evenly distributed among the 255 levels, which indicates that the quality of the images encrypted by the image encryption method is good. The difference in the distribution of pixel positions for all images has been reflected in the pixel shuffled level. Also, the obvious difference in flattening the histogram of the image means a change in the pixel values resulting from XORed images. The histogram of scrambled images by using the permutation method has a clear distribution of pixels in the graph allowing intruders to expect reading the image information. While encrypted images by substitution and combination of two methods distribute pixels in the graph, they are uniform and flat. That means that unauthorized can hardly expect that the image information and the strength of resistance to the statistical attack are enough. The randomness resulting from the distribution of histogram through applying two methods shuffles followed by XORing algorithm ensures good effect and high confidentiality.

4.1.2 Chi-Square test

The uniformity is demonstrated by the chi-square test. It is calculated by the following Eq. 1 [24]:

$$ {x}^2=\sum \limits_{k=1}^{256}\frac{{\left({O}_k-{E}_k\right)}^2}{E_k} $$
(1)

The Ok refers to the observed frequencies of the gray intensity values (0–255). The Ek refers to the expected frequencies of the gray intensity values (0–255) [24]. The performance of an encryption algorithm is better when the value of chi-square χ 2 is low. The lower value means the distribution of the histogram of an encrypted image is uniform [65].

For comparison between three methods of image encryptions by using each of the six PRNGs techniques, the chi-square values of the encrypted images produced for three methods of encryption by using each PRNG separately. Chi-square was compared as shown in Table 3. The min function is computed for chi-square in three methods of encryption for all different types of the six PRNGs. The min value indicates the best value of chi-square among the other three experiments of image encryption. After the observed the best value of chi-square, we computed the med function to analyze the moderate performance among the other three methods of encryption. Otherwise, like max function is computed for chi-square in three methods of encryption for all different types of the six PRNGs. The max function indicates the worst value of chi-square among the other three experiments of image encryption.

Table 3 Chi-square test for original and encrypted images

The comparison provides the chi-square for experiment 1, which is encrypted Lena, Baboon, Peppers images by permuting the blocks according to each of the six PRNGs. It is shown in Table 3 that chi-square in permutation method for encrypted Lena, Baboon, Peppers images is the highest, this means that the distribution of the pixels is not changed. Furthermore, the comparison of the chi-square values for experiment 2, which is used for substituting each pixel in Lena Baboon, Peppers images are lower than experiment 1. Experiment 2 works to change the distribution of the pixels in the Lena, Baboon, Peppers images therefor chi-square has lower values than experiment 1. Experiment 3 gives the best chi-square values like experiment 2 results. Experiment 3 is the results of encrypting images by combining the two methods permutation and substitution. The comparisons of the best lower values in experiment 2 and experiment 3 are presented with the best chi-square values in the two experiments approximately equivalently.

4.1.3 Measures of central tendency and dispersion

Mean, median, variance, and standard deviation have been performed for comparison of performance for all the pixels in the plain and encrypted image. The comparative analysis confirms that the values for encrypted images are uniform, not alike the values for the plain image [72].

Median has computed the median value of the image. The median value of the sorted matrix is computed as Eq. 2, where N is the size of the matrix. For the odd size matrix, the middle value is the median, and for the even size matrix, the median is the mean of the middle two values.

$$ \frac{N}{2} $$
(2)

Mean is used to calculate the brightness for the plain and encrypted images. A high mean value denotes that the image is bright, and a low mean value indicates that the image is dark. Mean is defined as Eq. 3 [55]. Where N is the total number of the pixels and xji is the pixels values.

$$ {\mu}_j=\frac{1}{MN}\ C\sum \limits_{j=1}^M\sum \limits_{i=1}^N{x}_{ji} $$
(3)

Variance indicates how pixels are spread. A large variance value indicates there is changing between adjacent pixels, and it lends to the image a noise look. It is defined as Eq. 4, Where μj is the mean value.

$$ V=\frac{1}{MN}\ \sum \limits_{j=0}^{N-1}\sum \limits_{i=0}^{M-1}{\left({x}_{ji}-{\mu}_j\right)}^2 $$
(4)

Standard deviation is used to compute the contrast of the pixel’s intensity. A high standard deviation value means that the image is high contrast, and a low standard deviation value indicates that the image is low contrast. It is defined as Eq. 5 [55].

$$ {\sigma}_j=\sqrt{\frac{1}{MN}\ \sum \limits_{i=0}^{255}{\left({x}_{ji}-{\mu}_j\right)}^2} $$
(5)

Table 4 is studied the statistical structure of the original image, and for the original image after applying encryption with different three methods. Mean, median, variance, and standard deviation are collaborating to produce a clarification for changing the behavior of the image after encrypted.

Table 4 Measures of central tendency and dispersion

The obtained remarkable results from Table 4 show that experiment 1 is the same original image statistically, its results confirm there is no change in pixels value. Whereas the comparative analysis for experiment 2 and experiment 3 show that the values for three cipher images are uniform. Furthermore, the mean, median, variance, and standard deviation values for cipher Lena, Baboon, and Peppers are similar and unlike the mean, median, variance, and standard deviation values for the original image.

For comparison of performance, every single PRNG used in experiment 1 shows that all the measure of central tendency has identical values like the values for the plain image. Experiment 2 and experiment 3 results are the opposite experiment 1 results. The results for each generator among the six PRNGs are uniform according to each term of the measure of central tendency, and its results different from than results of the original image.

4.1.4 Entropy (S)

Entropy is one of the important image analysis tools in reading information extracted from images. In image analysis, we use a histogram to calculate the number of pixels in images and estimate the probability of distributing the intensity of each pixel in color levels. Entropy can measure the information in images whether in the single part of the images or in the entire contents of the image. When computing the histogram of the original image and the encrypted image, the number of different pixels between the histogram computing of the two images appear. The change will be noticeable when you change pixel values or when you change pixel positions. Using encryption such as XOR or scrambling encryption helps to hide information and maintains randomness. Its reflection of the randomness of the data and the satisfactory evaluation is 8.

Each study has to obtain the ideal value 8. The highest number of entropy value indicates good image encryption. The entropy is the summation of all the possible occurrences of probability distribution pixels pi, as shown in the following Eq. 2 [81].

$$ \mathrm{H}\ (I)=-\sum \limits_{i=1}^{256}{p}_i\log {p}_i $$
(6)

Table 5 shows the measuring process of data predictability or the information predictability from the ciphered image into three samples of images Lena, Baboon, and Peppers images at three stages of encryption. The first stage is the scrambling operations, the second stage is XOR encryption, and the three-stage is combining two methods of permutation and substitution, respectively. The results we got from the entropy computation was very close to 8 in experiment 2, and experiment 3, it is confirmed the good performance. This refers to the strength of the two encryption methods to resist entropy attacks. The max function denotes the ideal value of the entropy among the three encryption methods for each of the six PRNG and produced the highest value. The min function indicates the worst value of the entropy among the three encryption methods for each of the six PRNG and produced the lower value. And the moderate value of the entropy can be measured by med function for the three encryption methods according to each of the six PRNG.

Table 5 Entropy measure for three enrryption methods

Table 5 appears the best entropy results we have obtained after the image is encrypted with two methods substitution, and the combination of two methods of permutation and substitution, respectively. The range of the best results of two experiments 2 and 3 between 7.9971 to 7.9995. By focusing on the results of the Lena image, the result of the entropy indicates that the PRNG that achieved the highest number is Multiplicative Lagged Fibonacci (MLFG) equal 7.9975 for combination method encryption. The results of the encrypted Baboon image in both experiments 2, and experiments 3 are equal. The results of encrypted Peppers image in both experiments 2, and experiments 3 are equally for Mersenne Twister (MT), SIMD oriented Fast Mersenne Twister (dSFMT), and Shift-register generator summed with linear congruential generator (shr3cong), whereas the assessment showed that the generator with the highest value in entropy results for Peppers image is Combined multiple recursive (MRG) in experiment 3 with a value of 7.9974 and the highest value in entropy results for Peppers image is Modified subtract with borrow generator (SWB) in experiment 2 with a value of 7.9974.

4.2 Correlation-based measures

4.2.1 Correlation coefficient (CC)

In the correlation coefficient image test, it is implemented order to examine the relationship of the original image with encrypted image. In this test, the original image pixels are measured with the encrypted images pixels. Each pixel is measured equally to the corresponding pixels from the encrypted image. Then the resulting number from this test indicates that the pixels are similar or different. The concept of computing the correlation coefficient is based on the following Eq. 7 as shown below [51]:

$$ CC=\frac{\sum \limits_{i=1}^M\sum \limits_{j=1}^N\left({A}_{ij}-\overline{A}\right)\left({B}_{ij}-\overline{B}\right)}{\sqrt{\left(\sum \limits_{i=1}^M\sum \limits_{j=1}^N{\left({A}_{ij}-\overline{A}\right)}^2\right)\left(\sum \limits_{i=1}^M\sum \limits_{j=1}^N{\left({B}_{ij}-\overline{B}\right)}^2\right)}} $$
(7)

A and B represent plain and cipher images, respectively. \( \overline{A} \) and \( \overline{B} \) are represented the mean value of the two matrices A and B. M and N refer to the high and width of the two images plain/cipher images [51]. In quantitative measure, low-value results in correlation coefficient mean good security for encrypting image, and inversely high-value results indicate high similarity between two images.

The results are listed in Table 5, which illustrates the computing of the correlation coefficient for the three samples of Lena, Baboon, and Peppers images with encrypted images by three operations of encryption. The results show that the three processes of encryption images are variance in CC results among them. All processes of encryptions are achieved approximately CC value very close to 0 in the three-way, differently. This means that the similarity between the original image and the encrypted image is nonexistent. The three functions of the max, med, and min respectively show the worst value with faraway from 0 value, the moderate value, and the ideal value, which is closer to 0 value, respectively.

To clarify the correlation coefficient results from Table 6, the results of the processes we obtained to test the Lina image after implementing three operations of encryption separately were high in expermint1 by using three generators separately. The generators scored the highest ideal value for Lena image among the three encryption process are MT, dSFMT, and MRG. In experiment 2 the highest CC value scored for substituting by using MLFG generator. And In experiment 3 the highest CC value scored for combining two methods by using shr3cong and SWB generators.

Table 6 Correlation coefficient for three encryption methods
Table 7 Pearson’s correlation coefficient for encrypting three images based on six PRNGs

The comparison for Baboon image among the three encryption processes produced the generators with the highest values close to zero. In experiment 1 the efficient generators with high CC results are are dSFMT, and MRG with values of 0.0001, and − 0.0004. Also, dSFMT, MRG, and SWB with values of 0.0001, 0.00004, and 0.0001 in experiment 2 respectively. Whereas, in experiment 3 the efficient generators with high CC results are MT with a value of 0.0005.

The results we obtained from the test to investigate Peppers image after implementing three operations of encryption separately, were between interval 0.00003 and − 0.0029. The generator with the highest value close to zero among three prosses for dSFMT, shr3cong, and SWB are in experiment 2 with values equal 0.00003, 0.000095,and 0.0001, respectively.

  1. A.

    Pearson’s Correlation Coefficient (PCC)

The Pearson’s correlation coefficient is commonly utilized in pattern detection, mathematic analysis, and image processing. For the later, application include a comparison of two images for the reason object recognition, image recoding, and measurement of disparity [85]. Mathematically, the Pearson correlation coefficient is computed as Eq. 8.

$$ {\displaystyle \begin{array}{l}{PCC}_{xy}=\frac{\mathit{\operatorname{cov}}\left(x,y\right)}{\sigma_x{\sigma}_y}\\ {}\mathrm{Where}\ \mathit{\operatorname{cov}}\left(x,y\right)=\sum \limits_{i=1}^M\sum \limits_{j=1}^N\left({X}_{ij}-\overline{X}\right)\left({Y}_{ij}-\overline{Y}\right)\\ {}{\sigma}_x=\kern0.5em \sum \limits_{i=1}^M\sum \limits_{j=1}^N\left({X}_{ij}-\overline{X}\right)\kern0.5em and\ {\sigma}_y=\sum \limits_{i=1}^M\sum \limits_{j=1}^N\left({Y}_{ij}-\overline{Y}\right)\end{array}} $$
(8)

Where Xij indicates the intensity of the coordinate pixel in the original image, Yij indicates the intensity of the coordinate pixel in an encrypted image, \( \overline{X} \) and \( \overline{Y} \) is the mean intensity of original, and encrypted images, respectively. A lower value means the similarity between the two images does not exist, whereas a higher value indicates the two images are identical. For a comparison of performance, the following Table 7 shows the differences between the six PRNGs among three processes of encryption.

  1. B.

    Correlation of Adjacent Pixels

Analysis of the correlation of adjacent pixels in encrypted images is very important to test their relationship between adjacent pixels. We selected randomly 3000 pairs of adjacent pixels from original and encrypted images. A high correlation of Adjacent Pixels appears in the original image and has a value close to ±1. Whereas a low correlation should score for the ciphered image with a value close to 0. The good encryption method should destroy the strong correlation among adjacent pixels in the original image to resist statistical attacks. The following equations explain the calculation of the correlation coefficient for each pair of two adjacent pixels rxy, where x and y represent the gray-scale value of two adjacent pixels in the image, and N denotes the entire number of pixels picked from the image [43]. Table 8 presents the result for encrypting images with three processes by using six PRNGs, separately. Figure 20 displays the strong correlation for the original image in three orientations, and the correlation of encrypted image in three processes of encryption with three orientations.

Table 8 Correlation of adjacent pixels for encrypting three images by using six of PRNGs
$$ E(x)=\frac{1}{N}\ \sum \limits_{i=1}^N{x}_i $$
(9)
$$ D(x)=\frac{1}{N}\ \sum \limits_{i=1}^N{\left({x}_i-E(x)\right)}^2 $$
(10)
$$ \mathit{\operatorname{cov}}\left(x,y\right)=\frac{1}{N}\ \sum \limits_{i=1}^N\left({x}_i-E(x)\right)\left({y}_i-E(y)\right) $$
(11)
$$ {r}_{xy}=\frac{\mathit{\operatorname{cov}}\left(x,y\right)}{\sqrt{D(x).D(y)}} $$
(12)
  1. C.

    Normalized cross-correlation calculation (NCC)

A normalized cross-correlation (NCC) is a metric to evaluate the difference between two digital images, it might be original and encrypted digital images. We used NCC to measure the degree of correlation between the two images. The range of results from normalized cross-correlation is between −1 and 1. If the NCC is considered as 1, this means the difference between the two images does not exist. For each image, the calculation of similarity depends on the direct splendor and complication of the cross-correlation varieties. Normalized cross-correlation is identified as Eq. 13, where m × n indicates the size of both original image P and encrypted image C [86].

$$ NCC=\frac{\sum \limits_{j=1}^m\sum \limits_{k=1}^n{P}_{jk}\times {C}_{jk}}{\sum \limits_{k=1}^n{\left({P}_{jk}\right)}^2} $$
(13)

Table 9 presents the results of Lena, Baboon, and Peppers images according to three cipher processes by using different types of PRNGs, separately. The best and ideal value of NCC is presented in the min function for each PRNG among the three processes of encryption. The med function denotes moderate results. The max function indicates the worst results of distinction between the original and ciphered images.

Table 9 Normalized cross correlation calculation for encrypting three images by using six of PRNGs
Table 10 Image error and quality measurements for encrypting three image by using six of PRNGs

4.3 Image quality assessment (IQA) metrics

4.3.1 Image error and quality measurements

We can determine the image quality by studying the following measures: mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), peak signal to noise ratio (PSNR), Signal to Noise Ratio (SNR), structural similarity index (SSIM), and mutual information (MI).

  1. 1.

    Mean square error (MSE): MSE computes the differences squared between the whole pixel image, then divides it by the total number of pixels. It can be calculated as equation 54 [9]. If the MSE value appears to be zero, this means that the highest value of the similarity of the two images has been achieved. The opposite represents the dissimilarity of the two images.

$$ MSE=\frac{1}{MN}\ \sum \limits_{X=0}^{M-1}\sum \limits_{Y=0}^{N-1}\ {\left(C\left(x,y\right)\hbox{--} P\Big(x,y\Big)\right)}^2 $$
(14)
  1. 2.

    Root mean square error (RMSE): The small value from RMSE informs that the original and encrypted images are more similar. Whereas the bigger RMSE indicates that the similarity between the two images is different, it can be calculated as Eq. 15, where MN refers to the size of the image. Also, R(i,j) and I(i,j) denote the original image and the encrypted images.

$$ RMSE=\sqrt{\frac{1}{MN}\sum \limits_{i=1}^M\sum \limits_{j=1}^N{\left|R\left(i,j\right)-I\left(i,j\right)\right|}^2} $$
(15)
  1. 3.

    Mean absolute error (MAE): MAE is defined as Eq. 16. C(x,y) and P(x,y) indicate cipher and plain images. MN indicates to size image. The higher MAE is better in good encryption [51].

$$ MAE=\frac{1}{MN}\ \sum \limits_{y=1}^M\sum \limits_{x=1}^N\ \left|\left(C\left(x,y\right)\hbox{--} P\Big(x,y\right)\right| $$
(16)
  1. 4.

    Peak signal to noise ratio (PSNR): PSNR is defined as the peak signal-to-noise ratio between two images, i.e. the original images and encrypted images. The highest value in PSNR means the quality of the image is good and the lower value means the whole image is noise. It can be described as Eq. 17.

$$ PSNR=10{\mathit{\log}}_{10\ \left(\frac{255^2}{MSE}\right)} $$
(17)
  1. 5.

    Signal to Noise Ratio (SNR): SNR is computed as the ratio of the signal power to the noise power. Low-value results obtained from SNR indicated that the encrypted image is more secure. The SNR is expressed as Eq. 18, where ps denotes to signal power and pn represents noise power.

$$ SNR=10{\log}_{10}\frac{p_s}{p_n} $$
(18)
  1. 6.

    Normalized Absolute Error (NAE): NAE is calculated as Eq. 19, it’s the sum of the absolute difference between original and encrypted images over the sum of the original image. A higher NAE calculation reveals the wonderful value of the obtained encrypted image after the encryption process.

$$ NAE=\frac{\sum \limits_{j=1}^m\sum \limits_{k=1}^n\mid {P}_{jk}-{C}_{jk}\mid }{\sum \limits_{j=1}^m\sum \limits_{k=1}^n{P}_{jk}} $$
(19)

The following Table 10 shows the results of quality measures for encrypting three images by three operations of encryption. All metrics applied between the original images with the encrypted image. The result of Peak signal to noise ratio (PSNR), and Signal to Noise Ratio (SNR) are low as should be for totally dissimilar images. Mean square error (MSE), root mean square error (RMSE), Mean absolute error (MAE), and Normalized Absolute Error (NAE) are very high.

4.3.2 Human visual system (HVS) features

  1. 1.

    Structural similarity index (SSIM): SSIM is used to calculate the similarity between two images. The value results of SSIM statistics range from −1 and 1. The high value in SSIM means that the two sets of data are identical, and the two comparative images are the same. The opposite value means that the two images are totally different. The SSIM metric is measured as shown in Eq. 20, where \( {\mu}_{\mathcal{x}} \) denotes to the average of x, and μydenotes to the average of y. \( {\sigma}_x^2 \)represents the variance of x, and \( {\sigma}_y^2 \) refers to the variance of y. C1and C2 are two variables to achieve the stabilization of the division with a weak denominator[1].

$$ SSIM\ \left(x,y\right)=\frac{\left(2{\mu}_{\mathcal{x}}{\mu}_y+{C}_1\right)\left(2{\sigma}_{\mathcal{x}y}+{C}_2\right)}{\left({\mu}_x^2+{\mu}_y^2+{C}_1\right)\left({\sigma}_x^2+{\sigma}_y^2+{C}_2\right)} $$
(20)
  1. 2.

    Structural dissimilarity (DSSIM): DSSIM is a measure derived from SSIM. It is used to analyze the dissimilarities between original and encrypted images. A high DSSIM value means that the two images are dissimilar, and a low DSSIM value confirms that the two images are the same. DSSIM measure is defined as Eq. 21 [16]:

$$ DSSIM\left(x,y\right)=\frac{1- SSIM\left(x,y\right)}{2} $$
(21)
  1. 3.

    Multi-scale structural similarity index (MS-SSIM):

MS_SSIM is proposed by Wang et al. [79]. The term refers to an evaluation of the image at different scales [56]. It is applied on multiple scales of the original and encrypted images. MSSIM returns a numeric value between 0 and 1. The highest quality for the image accomplishes 1 in MS-SSIM index. MSSIM is calculated as Eq. 22, where Im (x, y), Ci (x, y), and Si(x, y) are multiple scales of contrast, structure, and luminance. α, β, and y are parameters which are selected as αi = βi = γi and \( \sum \limits_{i=1}^m{\gamma}_i=1 \) [34].

$$ MSSIM\ \left(x,y\right)={\left[\left({I}_m\ \left(x,y\right)\right)\right]}^{\alpha_m}\ \prod \limits_{i=1}^m{\left[\left({C}_i\ \left(x,y\right)\right)\right]}^{\beta_i}.\kern0.5em {\left[\left({S}_i\left(x,y\right)\right)\right]}^{\gamma_i} $$
(22)
  1. 4.

    Universal Image Quality Index (UIQI): UIQI presented by Wang and Bovik in 2002 [78]. The comparison between original and encrypted image is broken into luminance l(x, y), contrast c(x, y), and structural comparisons s(x, y) such as three Eqs. in (23), (24) and (25).

$$ l\left(x,y\right)=\frac{2{\mu}_x{\mu}_y}{\mu_x^2+{\mu}_y^2} $$
(23)
$$ c\left(x,y\right)=\frac{2{\sigma}_x{\sigma}_y}{\sigma_x^2+{\sigma}_y^2} $$
(24)
$$ s\left(x,y\right)=\frac{2{\sigma}_{xy}}{\sigma_x+{\sigma}_y} $$
(25)

Where μxμy, σxσy, and σxy denote the mean values, the standard deviation, and the covariance of original and encrypted images, respectively. Based on the above three equations the UIQI is given in Eq. 26 [6].

$$ UIQI=\mathrm{l}\left(\mathrm{x},\mathrm{y}\right).\mathrm{c}\left(\mathrm{x},\mathrm{y}\right).\mathrm{s}\left(\mathrm{x},\mathrm{y}\right)=\frac{4{\mu}_x{\mu}_y{\mu}_{xy}}{\left({\mu}_x^2+{\mu}_y^2\right){\sigma}_x^2+{\sigma}_y^2}\kern0.5em $$
(26)

UIQI has a range between −1 and 1. The value 1 denotes that the original and encrypted images are similar.

The following Table 11 shows the results of quality measures for encrypting three images by three operations of encryption. All metrics applied between the original images with the encrypted image. Structural similarity index (SSIM), Multi-scale structural similarity index (MS-SSIM), and Universal Image Quality Index (UIQI) are nearly 0 for all images- which means that the similarity between images and their encrypted versions is nonexistent. Lastly, the Structural dissimilarity (DSSIM) is high, which means that there is no similarity between the original image and its encrypted image.

Table 11 Human Visual System (HVS) features
  1. 1.

    IQMs based on difference distortion and statistical pixel distance

  1. A.

    Image Fidelity (IF): The fidelity calculates the proximity of an image to its typical image. Image fidelity is defined as Eq. 27 [23].

$$ IF=1-\left(\frac{\sum \limits_{j=1}^M\sum \limits_{k=1}^N{\left[P\left(j,k\right)-C\left(j,k\right)\right]}^2}{\sum \limits_{j=1}^M\sum \limits_{k=1}^N\left[P{\left(j,k\right)}^2\right]}\right) $$
(27)

Where P(j,k) is the original image, and C(j,k) is the encrypted image at j and k coordinates. M and N represent the number of rows and columns of pixels of the images.

  1. B.

    Average difference (AD): AD is used to compute the noise between two images. The high AD value denotes how different is the encrypted image from the original image and its poor quality [58]. The formula of difference can be formed as the mean of an absolute of a subtract between each pixel in the original image and its corresponding in the encrypted image. AD equation represents as Eq. 28, Where X(i,j) and y(i,j) are the original and encrypted images, respectively [22].

$$ AD=\frac{\sum \limits_{i=1}^M\sum \limits_{j=1}^N abs\left(\left(x\left(i,j\right)\right)-\left(y\left(i,j\right)\right)\right)}{M\times N} $$
(28)

To get the percentage the average difference would be calculated as the AD and is divided by 255 as represented in Eq. 29 [22].

$$ AD\%=\frac{AD}{255} $$
(29)
  1. C.

    Maximum difference (MD): MD is defined as the absolute difference between two images, the difference between the two images would be between original and encrypted images. The large value of the MD denotes that the image quality is destroyed [58]. MD is calculated as represented in Eq. 30, where x(i,j) indicates the original image, and y(i,j) denotes the encrypted image.

$$ MD=\mathit{\operatorname{Max}}\left(\left|x\left(i,j\right)-y\left(i,j\right)\right|\right) $$
(30)
  1. D.

    Mean bias (MB): MB is calculated as the difference between original and encrypted images. The zero value indicates that the original and encrypted images are similar. MB is defined as Eq. 31 where x is the original image and y is the encrypted image [36].

$$ MB=\frac{x_{mean}-{y}_{mean}}{x_{mean}} $$
(31)
  1. 2.

    The IQMs based on the association of the content of the images

    1. A.

      The structure content (SC): SC is defined as Eq. 32 between original and encrypted images. Where f(n, m) denotes an original image, and g(n, m) is the encrypted image [16]. A high value of SC means that the image quality is destroyed.

$$ SC=\frac{\sum \limits_{n=1}^n\sum \limits_{m=1}^m{\left[f\left(n,m\right)\right]}^2}{\sum \limits_{n=1}^n\sum \limits_{m=1}^m{\left[g\left(n,m\right)\right]}^2} $$
(32)
  1. B.

    Mutual information (MI): MI measurement is about how closely the two images relate. The value of MI indicates the extent to which the encrypted image contains information about the original image. A low MI value means good encryption. The following Eq. 33 shows the mathematical calculation of MI measurement, where p(x,y) denotes the probability distribution function of original and encrypted images, and p(x), p(y) indicate the probability intensity functions in the single images [16].

$$ MI\left(X,Y\right)=\sum \limits_{y\in Y}\sum \limits_{x\epsilon X}p\left(x,y\right)\log \left(\frac{p\left(x,y\right)}{p(x)p(y)}\right) $$
(33)
  1. C.

    Correlation Quality (CQ): Correlation quality calculates the encrypted image degradation compared to an original image depending on the size of each image. Correlation quality is defined as Eq. 34, where Pjk is the original image, and Cjk is the encrypted image [23].

$$ CQ=\frac{\sum \limits_{j=1}^m\sum \limits_{k=1}^n{P}_{jk}\times {C}_{jk}}{\sum \limits_{j=1}^m\sum \limits_{k=1}^n{P}_{jk}} $$
(34)

The following Table 12 shows the results of quality measures for encrypting three images by three operations of encryption. All metrics applied between the original images with the encrypted image. The huge estimation of Average difference (AD), (AD%), Maximum difference (MD), Mean bias (MB), and the structure content (SC) imply that the three encrypted images are of low quality. Whereas the low estimation of Image Fidelity (IF), Mutual information (MI), and Correlation Quality (CQ) are indicating that the three encrypted images of low quality.

Table 12 IQAs based on distinction distortion and on association of the content of the images

4.4 Sensitive analysis to resist differential attack

To measure the sensitivity of the change in the original images and the strength of the algorithm used in encryption. We were able to use two of the metrics that make it happen, which is the number of pixels changing rate (NPCR), another metric is the unified averaged changed intensity (UACI). It can be defined as the following equations.

$$ NPCR=\frac{1}{m\times n\ }\ \sum \limits_{i=1}^m\sum \limits_{j=1}^n\delta \left(i,j\right)\times 100\% $$
(35)
$$ UACI=\frac{1}{m\times n}\ \left(\sum \limits_{i=1}^m\sum \limits_{j=1}^n\frac{\left|{C}_1\left(i,j\right)-{C}_2\left(i,j\right)\right|}{255}\right)\times 100\% $$
(36)

The NPCR takes a high percentage if the positions of the pixels between the two images have been changed. The ideal value for UACI is close to 33% [80]. These metrics are sensitive to any change in images, even if the change is a single-pixel that notices the tiny change. The NPCR calculates and measures the percentage of pixel change in encrypted images and this value means the change in the pixel of the original image. The UACI measures the average pixel intensity in encrypted images and this value means the change in pixel intensity in the original image as defined in Eqs. 35 and 36. Table 13 presented all sensitivity metrics for encrypted three images according to three processes of encryption by using six types of PRNGs.

Table 13 NPCR and UACI measures for encrypting three images by using six types of PRNGs

4.4.1 Execution time analysis

Good encryption processes depend on the flexibility of the algorithms used to encrypt images and the speed of processes. So, we analyzed and calculated the time required to execute the program for operations. The computational time of the three processes of encryptions among the six types of PRNGs is listed in Table 14. The purpose of the analysis is to confirm the flexible and rapid implementation for each six of the PRNGs. To test the speed of encryption, the test was conducted on 256 and 512 sizes of images and different operations of encryption. Comparing the three experiments, experiment 2 took less time than experiment 1, and experiment 2.

Table 14 Execution time analysis

4.4.2 NIST test

The NIST measurable test suite [15] was utilized to assess the randomness of keys. The test includes 15 tests, which detect the appropriation of RNG for randomness in the sequence. These tests were used as the main measure for making randomness decision. In this paper, we work to investigate the randomness by using runs test, Monobit test, Frequency Test within a Block test, and Longest Run of Ones in a Block test. Table 15 shows the outcomes and demonstrates that all p − values among 65,536 are uniformly disseminated within the permutation key and XOR key, while the pass rate is additionally satisfactory in three of the NIST test. The standard pass rate is p_value >0.01.

Table 15 The NIST measurable test suite

5 Research comparison

5.1 Cost-effectiveness

The quality of the encryption system leads to decide the effective algorithm by using several PRNGs. Several statistical parameters can be visualizing the impact of quality in the image encryption system. So, we work on extract the features of each encryption system individually and present a clarification of three existing image encryption systems by using six PRNGs. Due to the extract features and analyze the performances, we achieve one of our goals which are to decide and select the best security PRNGs for processing to enhance and secure PRNGs.

Cost-effectiveness is computed as a figure of merit to combine the comparison parameters similar in principle to the work in reference calculating the weight in paper [5] as the cost-effectiveness equation bellow:

$$ Cost=\frac{The\ weight\ of\ \mathrm{the}\ \mathrm{best}\ \mathrm{high}\ \mathrm{values}\ \mathrm{in}\ \mathrm{metrics}}{The\ wight\ of\ \mathrm{the}\ \mathrm{best}\ \mathrm{low}\ \mathrm{values}\ \mathrm{in}\ \mathrm{metrics}} $$
(37)

Where, the weight of the best high values in metrics (W1) is the multiplication of all metrics that achieve high values in image encryption such as entropy, MSE, RMSE, DSSIM, MAE, NAE, SC, MD, AD, AD%, MB, NPCR, UACI, whereas the weight of the best low values in metrics (W2) is the multiplication of all metrics that achieve low values in image encryption such as PSNR, SNR, IF, SSIM, MS-SSIM, MI, CC, CQ, PCC, H, V, D, ci-square, NCC, time, UIQI.

After applying this computation, the paper presents several remarkable about which system of three encryption methods achieves the high security among six of PRNGs than other rest of the methods. The cost-effectiveness is applying through seven steps. Therefore, we computed the priority weight of several image quality assessments (IQA) with the high and low ideal value in image encryption. The cost-effectiveness results are computed in Table 16 for all six PRNGs experiments in each of the three encryption methods as the following steps.

  1. 1.

    The system computes the cost-effectiveness of each plane of the RGB image separately and then recompiling the image.

  2. 2.

    The system determines the secure type PRNG among the other six types of PRNGs of experiment 1 which uses the permutation method only to encrypt the image.

  3. 3.

    The system determines the secure type PRNG among the other six types of PRNGs of experiment 2 which uses the XOR method only to encrypt the image.

  4. 4.

    The system determines the secure type PRNG among the other six types of PRNGs of experiment 3 which uses the combination methods of permutation and XOR processes to encrypt the image.

  5. 5.

    The system computes the best high values in metrics to get weight in each method (W1). And select the secure method which has a higher value in quality metrics weight.

  6. 6.

    The system computes the best low values in metrics to get weight in each method (W2). And select the secure method which has a lower value in quality metrics weight.

  7. 7.

    The cost-effectiveness is computed as the fraction for the higher value in quality metrics weight divided on the lower value in quality metrics weight. Then, the higher value from cost effectiveness decides the secure method among other methods.

Table 16 Cost effectiveness for each encrypting processes among six types of PRNG
  1. A.

    Comparison of permutation method

Experiment 1 obtained several results of different six permutation keys of PRNGs using for scrambling the images as it is shown in Table 16. Each permutation key is evaluating separately, so Lena’s image is encrypted six times individually by using different types of PRNGs and so on for Baboon and Pepper’s images.

The effective random generator for using to encrypt Lena’s image among other types of PRNGs is Mersenne Twister (MT). MT is selected as an efficient generator because its cost-effectiveness is the highest equals 1.09e+14.

In a similar manner for encrypting the Baboon image, we observed the effective generator by using several performance metrics. The good performance for encrypting the Baboon image is multiplicative lagged Fibonacci (MLFG). Its measuring cost-effectiveness gives the highest value equals 1.40e+13.

Furthermore, we extracted the effective and suitable generator for using in experiment 1 to encrypt the peppers image. Shift-register generator summed with linear congruential generator (shr3cong) achieved the highest cost-effectiveness among the other six PRNGs. The cost-effectiveness equals 3.98e+14.

  1. B.

    Comparison of the XOR method

Experiment 2 shows all the six keys of PRNGs that are used for encrypting images by using XOR operation. The study runs six different experiments separately by using a single PRNG at each one time from the other six keys of PRNGs. In Table 16 presents the comparison for XORing three images Lena, Baboon, and Peppers.

The effective PRNG using for encrypting Lena image is multiplicative lagged fibonacci (MLFG). The system determining the MLFG as the secure algorithm by computing the cost-effectiveness where it equaled 4.83e+19. So, this experiment considered MLFG with the highest cost.

The efficient way for encrypting Baboon image is XORing image by using modified subtract with borrow generator (SWB) because its cost-effectiveness is the highest equals 7.3e+22 among other generators.

The recommended way for encrypting Peppers image is xoring by using multiplicative lagged fibonacci (MLFG). It achieved the highest cost of equaled 6.1e+21 among the other keys of PRNGs.

Considering the XOR method and depending on higher cost-effectiveness for encrypting the three images, the effective PRNGs are different between Lena, Baboon, and Peppers. It’s higher in Baboon and Peppers images than Lena’s image. It different because the size is bigger for Baboon and Peppers than Lena. Also, due to the difference in variance for Baboon and Peppers images than Lena’s image. The pixels values in Baboon and Peppers images indicate spread more than Lena’s image.

  1. C.

    Comparison combination of two methods

Experiment 3 contains six PRNGs based on the combination of two methods. Which is a permuted block of pixels, and then substituted each pixel value. From this experiment, the system extracted the security method among other keys of PRNGs.

For encrypting Lenas’ image, SIMD-oriented Fast Mersenne Twister (dSFMT) is selected as an effective PRNG because its cost is the highest equals 2.11e+18 among other keys of PRNGs. This means the verification of choosing the effectiveness PRNG is the algorithm having the best values in several image quality assessments.

Depending on the cost of effective six of PRNGs, subtract with borrow generator (SWB) seems to be offering the highest cost-effectiveness. Therefore, using the keys of SWB considered a secure algorithm for encrypting the Baboon image because its cost equals 2.29e+20.

For the Peppers image, the outcome demonstrating the highest cost-effectiveness is SIMD-oriented Fast Mersenne Twister (dSFMT). It achieved 1.05e+21 in safety measures strength study. The selection has a higher rate of merit than the other PRNGs.

6 Conclusion

The fundamental point of the paper is to introduce a security system for private image transmission over the web. This paper shall give the experimentation subtleties with the resulted outcomes, indicating which of the PRNG is suitable, a solid and a productive calculation for encrypting and decrypting images. The contribution lies in combining multiple algorithms acting as the pseudorandom number generators that will be used to decrypt images based on a key given by the user.

This paper provides an investigation of six PRNGs by encrypting images with three encryption processes, wherein the first operation of encryption PRNG generates numbers of sequences that are used for shuffling the positions of each pixel of the image to produce an encrypted image with the details being totally wiped. At the second operation of encryption, keys are generated for XOR operations. And the third operation of encryption, examine cipher images by encrypting using a combination of two methods of encryption.

The performance of the PRNG based image encryption methodology was evaluated using several statistical measurements. The experimentations results have shown that the best three PRNGs using in the permutation method are Mersenne Twister (MT), multiplicative lagged Fibonacci (MLFG), and Shift-register generator summed with linear congruential generator (shr3cong) for three encrypted images Lena, Baboon, and Peppers respectively. We obtained the best three PRNGs among substitution cipher experiment, namely multiplicative lagged Fibonacci (MLFG), subtract with borrow generator (SWB), multiplicative lagged fibonacci (MLFG). The observed robust three PRNGs through the third experiment (Combination of permutation and substitution methods) are SIMD-oriented Fast Mersenne Twister (dSFMT), subtract with borrow generator (SWB), and multiplicative lagged fibonacci (MLFG) for three encrypted images Lena, Baboon, and Peppers respectively.

As a future work plan, the continuations of the study of this paper propose to study all cases of the image encryption compared with gray images with the same methodology. This is to show the differences that can occur and study them in terms of changing the data of the encryption method. We can apply all the security measurements studied in this paper to compare the results with them assuming the cost is the same showing possibilities of more attractive remarks.