# A Secure Steganographic Algorithm Based on Frequency Domain for the Transmission of Hidden Information

Authors: A. Soria-Lorente; S. Berres
Journal: Security and Communication Networks
 (2017)

---

## Abstract

This contribution proposes a novel steganographic method based on the compression standard according to the Joint Photographic Expert Group and an Entropy Thresholding technique. The steganographic algorithm uses one public key and one private key to generate a binary sequence of pseudorandom numbers that indicate where the elements of the binary sequence of a secret message will be inserted. The insertion takes eventually place at the first seven AC coefficients in the transformed DCT domain. Before the insertion of the message the image undergoes several transformations. After the insertion the inverse transformations are applied in reverse order to the original transformations. The insertion itself takes only place if an entropy threshold of the corresponding block is satisfied and if the pseudorandom number indicates to do so. The experimental work on the validation of the algorithm consists of the calculation of the peak signal-to-noise ratio (PSNR), the difference and correlation distortion metrics, the histogram analysis, and the relative entropy, comparing the same characteristics for the cover and stego image. The proposed algorithm improves the level of imperceptibility analyzed through the PSNR values. A steganalysis experiment shows that the proposed algorithm is highly resistant against the Chi-square attack.


---

## Body

## 1. Introduction

### 1.1. Motivation

Nowadays, there is a risk that confidential information may be acceded by nonauthorized people, being consulted, divulged, modified, destroyed, or sabotaged, affecting its availability and legal access. Evidently, the information that transits through insecure channels can be easily intercepted. Therefore, the use of Cryptography and Steganography plays a significant role in information security management [1].Cryptography is the science of protecting information by encryption techniques. As cryptography on its own does not hide the fact that a message is secret, to provide this steganography is used.The ability to protect sensible information from adversaries, especially during their transmission through channels that are opposed to have leaks, is crucial in a world of emerging cyberwar. Nowadays, all electronic communications are being continuously and automatically monitored by both private and state-owned intelligent systems that have an enormous computer power. In particular, every transmission of cipher-text calls the attention of any of these systems and certainly is chosen to be analyzed, among others, by competitors and any sort of opposing forces. The use of electronic transmission media requires a method that calls less attention of the supervisory automatic systems. Modern Steganography offers a level of service that includes privacy, authenticity, integrity, and confidentiality of the transmitted data.


### 1.2. State of the Art

Steganography is the art of hiding information by impeding the detection of hidden messages [2]. Steganography involves communicating secret data in an appropriate multimedia carrier, like image [3], audio [4], or video files [5]. The media with or without hidden information are called Stego Media and Cover Media, respectively. Thus, the cover image with the secret message embedded is called the stego image.


#### 1.2.1. Embedding Capacity

The performance of steganographic algorithms can be measured by two main criteria, embedding capacity and detectability. Thus, novel steganographic algorithms are expected to increase the image capacity and the encryption strength of the message. The image capacity can be increased by adaptive strategies which decide where to insert best the message. For example, the Pixel-Value Differencing method [6] proposes to embed more data in edged areas than in smooth areas.In steganography theembedding capacity is defined as the maximum number of bits that can be embedded in a given cover image. However, thesteganographic capacity is the maximum number of bits that can be embedded in a given cover image with a negligible probability of detection by an adversary. Therefore, the embedding capacity is larger than the steganographic capacity [7].


#### 1.2.2. Methods of Embedding Data

There are two common methods of embedding data, which can be classified into two categories, namely, spatial-domain and frequency-domain methods. In the spatial domain method, the secret message is inserted directly into the least significant bit (LSB) of image pixels [8, 9]. In the frequency-domain method [10] the cover image is first transformed from the spatial to a frequency-domain using transformation methods such as discrete cosine transform (DCT) [11, 12], discrete Fourier transform (DFT) [13], or discrete wavelet transform (DWT) [13–15]. Then the secret message is embedded in the transformed coefficients [16], and finally the data are transformed back from the frequency-domain to the spatial domain.There are different strategies to additionally encrypt hidden steganographic data, like permutation [17] or by a statistical threshold [18]. One should not confuse cryptography with steganography: Cryptography modifies the data to make them incomprehensible, while steganography on its own simply hides them between other data. In many instances the combination of both techniques provide a high level security to the protected information; see, for instance, [3, 19–23].In this contribution we adopt the two-dimensional discrete cosine transform [11] as the most common frequency domain method used in image processing. For a recent survey on steganography see [24], where our approach can be classified within DCT based steganography. A frequent method that uses the DCT is the Jpeg-Jsteg embedding method [25], where the secret message is embedded in those LSB of the quantized DCT coefficients whose values are not 0, 1, or −1.


#### 1.2.3. Design Principles That Counter Steganalysis

Westfeld [26] introduced the F5 steganographic algorithm, where, instead of replacing the LSB of the quantized DCT coefficients by the secret bits, the absolute value of the coefficients is reduced by 1. Since the F5 algorithm randomly chooses DCT coefficients to embed the secret bits it is strong against the Chi-square attack.To counter the Chi-square attack, Provos [25, 27] proposed the OutGuess steganographic algorithm. This method embeds data by a similar way as Jpeg-Jsteg, though its embedding capacity is much lower than that of Jpeg-Jsteg.There are general design principles for less detectable stegosystems [28]. However, some steganalyis concepts are specialized in the detection of data hidden in the least significant bits of a natural image [29]. For recent improvements in LSB steganography approaches see [28, 30].In [31], Chang et al. presented a new steganography method based upon Joint Photographic Expert-Group (JPEG) and a quantization table modification. In this case, the secret message is first encrypted and then embedded in the 26 coefficients located in the middle-frequency area of the cover image. In [32], Noda et al. proposed two JPEG steganography schemes using a quantization index modulation in DCT domain.In [33], Wong et al. presented a novel DCT based on a blind Mod4 steganography method for still images. In [34], Chang et al. proposed a lossless and reversible embedding of secret data in each block of DCT coefficients based on the compressed image technique JPEG. In this scheme, two successive zero coefficients of the medium-frequency components in each block are used to hide the secret data. Li and Wang [35] proposed a novel steganographic method, based on JPEG and the Particle Swarm Optimization algorithm. Here, the transformed messages are embedded in the 36 coefficients located in the middle-frequency components of the quantized DCT coefficients of the cover-image.


#### 1.2.4. Embedding Strategies

In [36], Velasco-Bautista et al. present the Entropy Thresholding method, where the secret message is inserted in the DCT domain. In [37], Lin and Shiu suggest a high capacity data hiding scheme, where the secret data are embedded in the middle frequency of the DCT coefficients. Narayana and Prasad [21] introduce two new methods wherein cryptography and steganography are combined to encrypt the secret message that is hidden. In [38], Lin proposes a reversible data hiding method which is based on the DCT of the cover image. The cover image is decomposed into different frequencies, where the secret messages are embedded into the high-frequency parts. Mali et al. propose a novel image steganographic method using a block level Entropy Thresholding technique where the secret message is embedded in the 26 coefficients located in the middle-frequency area of the cover image [16]. Amin et al. present an efficient data hiding technique based on the DCT, where secret bits are embedded in all frequency components of the quantized DCT coefficient [11]. Jaheel and Beiji combine two steganography algorithms, namely, Jpeg-Jsteg and OutGuess algorithms, with the purpose of enhancing a major security level [39]. In [1], Soria et al. propose a new steganographic algorithm in the frequency domain. This method uses a private key of 64 bits that suggest the positions where the secret bits are inserted after applying the Entropy Thresholding method; the experimental analysis accomplishes a comparison of the results with respect to the Entropy Thresholding method proposed by Velasco-Bautista et al. [36].In the present work, we show an experimental comparison of the proposed method with respect to the two previous methods. All three approaches use the Entropy Thresholding method. The Velasco-Bautista method does not use keys, the Soria method uses a private key of 64 bits, and the proposed method uses two keys, one public key and one private key of 64 bits.


### 1.3. Transformation of the Blocks

A digital image is represented in computer systems as an array of pixels. In this paper, we work with a steganography algorithm for embedding a secret message into a RGB 24-bit color image, where each pixel has three color components: Red, Green, and Blue (RGB). Each RGB component is represented by a byte. The values range from 0 to 255, where zero represents the darkest and 255 the brightest shade of a color.Since we consider a RGB 24-bit color image as three blocks of bytes corresponding to each color component, in the proposed method the cover imageC of size m×n is divided into 3mn/64 different blocks of 8×8 bytes such that the DCT transformation can be performed on each one of them. Here we assume that m and n are divisible by 8.LetBi,jk be the kth block of 8×8 bytes of the image, with i,j=0,…,7, k∈K=1,2,…,3mn/64 and let Bu,vk be its two dimensional discrete cosine transform, with u,v=0,…,7. The relationship between Bu,vk≡DCT(u,v) and its inverse Bi,jk≡IDCT(i,j) is given by(1)Bu,vk=4-1σuσv∑0≤i,j≤7Bi,jk×cos⁡πu2i+116cos⁡πv2j+116,Bi,jk=4-1∑0≤u,v≤7σuσvBu,vk×cos⁡πu2i+116cos⁡πv2j+116, where σ(x)=2/2 for x=0 and σ(x)=1 otherwise. A DCT of a 8×8 integer matrix becomes a 8×8 matrix of real numbers. By definition, the coefficient B0,0k is the DC coefficient (zero frequency) and all others are called the AC coefficients.


### 1.4. This Contribution

In this paper, two steganography methods are combined, namely, the JPEG steganography method and the Entropy Thresholding technique [36, 39]. This combination allows to hide secret messages in images while maintaining a high visual quality and a low detectability. The JPEG method divides the cover image into nonoverlapping blocks of 8×8 bytes and then applies the discrete cosine transform with the purpose of hiding the secret message in the DCT domain by modifying certain coefficients located in the low-frequency area of the cover image.The Entropy Thresholding method decides whether or not to embed the secret message in a certain matrix of order8 of transformed coefficients, depending on the entropy within that matrix.


## 1.1. Motivation

Nowadays, there is a risk that confidential information may be acceded by nonauthorized people, being consulted, divulged, modified, destroyed, or sabotaged, affecting its availability and legal access. Evidently, the information that transits through insecure channels can be easily intercepted. Therefore, the use of Cryptography and Steganography plays a significant role in information security management [1].Cryptography is the science of protecting information by encryption techniques. As cryptography on its own does not hide the fact that a message is secret, to provide this steganography is used.The ability to protect sensible information from adversaries, especially during their transmission through channels that are opposed to have leaks, is crucial in a world of emerging cyberwar. Nowadays, all electronic communications are being continuously and automatically monitored by both private and state-owned intelligent systems that have an enormous computer power. In particular, every transmission of cipher-text calls the attention of any of these systems and certainly is chosen to be analyzed, among others, by competitors and any sort of opposing forces. The use of electronic transmission media requires a method that calls less attention of the supervisory automatic systems. Modern Steganography offers a level of service that includes privacy, authenticity, integrity, and confidentiality of the transmitted data.


## 1.2. State of the Art

Steganography is the art of hiding information by impeding the detection of hidden messages [2]. Steganography involves communicating secret data in an appropriate multimedia carrier, like image [3], audio [4], or video files [5]. The media with or without hidden information are called Stego Media and Cover Media, respectively. Thus, the cover image with the secret message embedded is called the stego image.


### 1.2.1. Embedding Capacity

The performance of steganographic algorithms can be measured by two main criteria, embedding capacity and detectability. Thus, novel steganographic algorithms are expected to increase the image capacity and the encryption strength of the message. The image capacity can be increased by adaptive strategies which decide where to insert best the message. For example, the Pixel-Value Differencing method [6] proposes to embed more data in edged areas than in smooth areas.In steganography theembedding capacity is defined as the maximum number of bits that can be embedded in a given cover image. However, thesteganographic capacity is the maximum number of bits that can be embedded in a given cover image with a negligible probability of detection by an adversary. Therefore, the embedding capacity is larger than the steganographic capacity [7].


### 1.2.2. Methods of Embedding Data

There are two common methods of embedding data, which can be classified into two categories, namely, spatial-domain and frequency-domain methods. In the spatial domain method, the secret message is inserted directly into the least significant bit (LSB) of image pixels [8, 9]. In the frequency-domain method [10] the cover image is first transformed from the spatial to a frequency-domain using transformation methods such as discrete cosine transform (DCT) [11, 12], discrete Fourier transform (DFT) [13], or discrete wavelet transform (DWT) [13–15]. Then the secret message is embedded in the transformed coefficients [16], and finally the data are transformed back from the frequency-domain to the spatial domain.There are different strategies to additionally encrypt hidden steganographic data, like permutation [17] or by a statistical threshold [18]. One should not confuse cryptography with steganography: Cryptography modifies the data to make them incomprehensible, while steganography on its own simply hides them between other data. In many instances the combination of both techniques provide a high level security to the protected information; see, for instance, [3, 19–23].In this contribution we adopt the two-dimensional discrete cosine transform [11] as the most common frequency domain method used in image processing. For a recent survey on steganography see [24], where our approach can be classified within DCT based steganography. A frequent method that uses the DCT is the Jpeg-Jsteg embedding method [25], where the secret message is embedded in those LSB of the quantized DCT coefficients whose values are not 0, 1, or −1.


### 1.2.3. Design Principles That Counter Steganalysis

Westfeld [26] introduced the F5 steganographic algorithm, where, instead of replacing the LSB of the quantized DCT coefficients by the secret bits, the absolute value of the coefficients is reduced by 1. Since the F5 algorithm randomly chooses DCT coefficients to embed the secret bits it is strong against the Chi-square attack.To counter the Chi-square attack, Provos [25, 27] proposed the OutGuess steganographic algorithm. This method embeds data by a similar way as Jpeg-Jsteg, though its embedding capacity is much lower than that of Jpeg-Jsteg.There are general design principles for less detectable stegosystems [28]. However, some steganalyis concepts are specialized in the detection of data hidden in the least significant bits of a natural image [29]. For recent improvements in LSB steganography approaches see [28, 30].In [31], Chang et al. presented a new steganography method based upon Joint Photographic Expert-Group (JPEG) and a quantization table modification. In this case, the secret message is first encrypted and then embedded in the 26 coefficients located in the middle-frequency area of the cover image. In [32], Noda et al. proposed two JPEG steganography schemes using a quantization index modulation in DCT domain.In [33], Wong et al. presented a novel DCT based on a blind Mod4 steganography method for still images. In [34], Chang et al. proposed a lossless and reversible embedding of secret data in each block of DCT coefficients based on the compressed image technique JPEG. In this scheme, two successive zero coefficients of the medium-frequency components in each block are used to hide the secret data. Li and Wang [35] proposed a novel steganographic method, based on JPEG and the Particle Swarm Optimization algorithm. Here, the transformed messages are embedded in the 36 coefficients located in the middle-frequency components of the quantized DCT coefficients of the cover-image.


### 1.2.4. Embedding Strategies

In [36], Velasco-Bautista et al. present the Entropy Thresholding method, where the secret message is inserted in the DCT domain. In [37], Lin and Shiu suggest a high capacity data hiding scheme, where the secret data are embedded in the middle frequency of the DCT coefficients. Narayana and Prasad [21] introduce two new methods wherein cryptography and steganography are combined to encrypt the secret message that is hidden. In [38], Lin proposes a reversible data hiding method which is based on the DCT of the cover image. The cover image is decomposed into different frequencies, where the secret messages are embedded into the high-frequency parts. Mali et al. propose a novel image steganographic method using a block level Entropy Thresholding technique where the secret message is embedded in the 26 coefficients located in the middle-frequency area of the cover image [16]. Amin et al. present an efficient data hiding technique based on the DCT, where secret bits are embedded in all frequency components of the quantized DCT coefficient [11]. Jaheel and Beiji combine two steganography algorithms, namely, Jpeg-Jsteg and OutGuess algorithms, with the purpose of enhancing a major security level [39]. In [1], Soria et al. propose a new steganographic algorithm in the frequency domain. This method uses a private key of 64 bits that suggest the positions where the secret bits are inserted after applying the Entropy Thresholding method; the experimental analysis accomplishes a comparison of the results with respect to the Entropy Thresholding method proposed by Velasco-Bautista et al. [36].In the present work, we show an experimental comparison of the proposed method with respect to the two previous methods. All three approaches use the Entropy Thresholding method. The Velasco-Bautista method does not use keys, the Soria method uses a private key of 64 bits, and the proposed method uses two keys, one public key and one private key of 64 bits.


## 1.2.1. Embedding Capacity

The performance of steganographic algorithms can be measured by two main criteria, embedding capacity and detectability. Thus, novel steganographic algorithms are expected to increase the image capacity and the encryption strength of the message. The image capacity can be increased by adaptive strategies which decide where to insert best the message. For example, the Pixel-Value Differencing method [6] proposes to embed more data in edged areas than in smooth areas.In steganography theembedding capacity is defined as the maximum number of bits that can be embedded in a given cover image. However, thesteganographic capacity is the maximum number of bits that can be embedded in a given cover image with a negligible probability of detection by an adversary. Therefore, the embedding capacity is larger than the steganographic capacity [7].


## 1.2.2. Methods of Embedding Data

There are two common methods of embedding data, which can be classified into two categories, namely, spatial-domain and frequency-domain methods. In the spatial domain method, the secret message is inserted directly into the least significant bit (LSB) of image pixels [8, 9]. In the frequency-domain method [10] the cover image is first transformed from the spatial to a frequency-domain using transformation methods such as discrete cosine transform (DCT) [11, 12], discrete Fourier transform (DFT) [13], or discrete wavelet transform (DWT) [13–15]. Then the secret message is embedded in the transformed coefficients [16], and finally the data are transformed back from the frequency-domain to the spatial domain.There are different strategies to additionally encrypt hidden steganographic data, like permutation [17] or by a statistical threshold [18]. One should not confuse cryptography with steganography: Cryptography modifies the data to make them incomprehensible, while steganography on its own simply hides them between other data. In many instances the combination of both techniques provide a high level security to the protected information; see, for instance, [3, 19–23].In this contribution we adopt the two-dimensional discrete cosine transform [11] as the most common frequency domain method used in image processing. For a recent survey on steganography see [24], where our approach can be classified within DCT based steganography. A frequent method that uses the DCT is the Jpeg-Jsteg embedding method [25], where the secret message is embedded in those LSB of the quantized DCT coefficients whose values are not 0, 1, or −1.


## 1.2.3. Design Principles That Counter Steganalysis

Westfeld [26] introduced the F5 steganographic algorithm, where, instead of replacing the LSB of the quantized DCT coefficients by the secret bits, the absolute value of the coefficients is reduced by 1. Since the F5 algorithm randomly chooses DCT coefficients to embed the secret bits it is strong against the Chi-square attack.To counter the Chi-square attack, Provos [25, 27] proposed the OutGuess steganographic algorithm. This method embeds data by a similar way as Jpeg-Jsteg, though its embedding capacity is much lower than that of Jpeg-Jsteg.There are general design principles for less detectable stegosystems [28]. However, some steganalyis concepts are specialized in the detection of data hidden in the least significant bits of a natural image [29]. For recent improvements in LSB steganography approaches see [28, 30].In [31], Chang et al. presented a new steganography method based upon Joint Photographic Expert-Group (JPEG) and a quantization table modification. In this case, the secret message is first encrypted and then embedded in the 26 coefficients located in the middle-frequency area of the cover image. In [32], Noda et al. proposed two JPEG steganography schemes using a quantization index modulation in DCT domain.In [33], Wong et al. presented a novel DCT based on a blind Mod4 steganography method for still images. In [34], Chang et al. proposed a lossless and reversible embedding of secret data in each block of DCT coefficients based on the compressed image technique JPEG. In this scheme, two successive zero coefficients of the medium-frequency components in each block are used to hide the secret data. Li and Wang [35] proposed a novel steganographic method, based on JPEG and the Particle Swarm Optimization algorithm. Here, the transformed messages are embedded in the 36 coefficients located in the middle-frequency components of the quantized DCT coefficients of the cover-image.


## 1.2.4. Embedding Strategies

In [36], Velasco-Bautista et al. present the Entropy Thresholding method, where the secret message is inserted in the DCT domain. In [37], Lin and Shiu suggest a high capacity data hiding scheme, where the secret data are embedded in the middle frequency of the DCT coefficients. Narayana and Prasad [21] introduce two new methods wherein cryptography and steganography are combined to encrypt the secret message that is hidden. In [38], Lin proposes a reversible data hiding method which is based on the DCT of the cover image. The cover image is decomposed into different frequencies, where the secret messages are embedded into the high-frequency parts. Mali et al. propose a novel image steganographic method using a block level Entropy Thresholding technique where the secret message is embedded in the 26 coefficients located in the middle-frequency area of the cover image [16]. Amin et al. present an efficient data hiding technique based on the DCT, where secret bits are embedded in all frequency components of the quantized DCT coefficient [11]. Jaheel and Beiji combine two steganography algorithms, namely, Jpeg-Jsteg and OutGuess algorithms, with the purpose of enhancing a major security level [39]. In [1], Soria et al. propose a new steganographic algorithm in the frequency domain. This method uses a private key of 64 bits that suggest the positions where the secret bits are inserted after applying the Entropy Thresholding method; the experimental analysis accomplishes a comparison of the results with respect to the Entropy Thresholding method proposed by Velasco-Bautista et al. [36].In the present work, we show an experimental comparison of the proposed method with respect to the two previous methods. All three approaches use the Entropy Thresholding method. The Velasco-Bautista method does not use keys, the Soria method uses a private key of 64 bits, and the proposed method uses two keys, one public key and one private key of 64 bits.


## 1.3. Transformation of the Blocks

A digital image is represented in computer systems as an array of pixels. In this paper, we work with a steganography algorithm for embedding a secret message into a RGB 24-bit color image, where each pixel has three color components: Red, Green, and Blue (RGB). Each RGB component is represented by a byte. The values range from 0 to 255, where zero represents the darkest and 255 the brightest shade of a color.Since we consider a RGB 24-bit color image as three blocks of bytes corresponding to each color component, in the proposed method the cover imageC of size m×n is divided into 3mn/64 different blocks of 8×8 bytes such that the DCT transformation can be performed on each one of them. Here we assume that m and n are divisible by 8.LetBi,jk be the kth block of 8×8 bytes of the image, with i,j=0,…,7, k∈K=1,2,…,3mn/64 and let Bu,vk be its two dimensional discrete cosine transform, with u,v=0,…,7. The relationship between Bu,vk≡DCT(u,v) and its inverse Bi,jk≡IDCT(i,j) is given by(1)Bu,vk=4-1σuσv∑0≤i,j≤7Bi,jk×cos⁡πu2i+116cos⁡πv2j+116,Bi,jk=4-1∑0≤u,v≤7σuσvBu,vk×cos⁡πu2i+116cos⁡πv2j+116, where σ(x)=2/2 for x=0 and σ(x)=1 otherwise. A DCT of a 8×8 integer matrix becomes a 8×8 matrix of real numbers. By definition, the coefficient B0,0k is the DC coefficient (zero frequency) and all others are called the AC coefficients.


## 1.4. This Contribution

In this paper, two steganography methods are combined, namely, the JPEG steganography method and the Entropy Thresholding technique [36, 39]. This combination allows to hide secret messages in images while maintaining a high visual quality and a low detectability. The JPEG method divides the cover image into nonoverlapping blocks of 8×8 bytes and then applies the discrete cosine transform with the purpose of hiding the secret message in the DCT domain by modifying certain coefficients located in the low-frequency area of the cover image.The Entropy Thresholding method decides whether or not to embed the secret message in a certain matrix of order8 of transformed coefficients, depending on the entropy within that matrix.


## 2. Determination of Location of Message

In this section we describe how to determine the encrypted random locations where the secret message is inserted. It is assumed thatN is the length of the binary sequence of the secret message (2)S=si∈0,1:1≤i≤N, where si is a bit containing 0 or 1. The locations where the secret message is hidden is determined by a pseudorandom sequence defined by (3)A=a1,a2,…,al,…,aM. We denote by |X| the number of bits of an array of bits X which are equal to 1. We continue to concatenate the pseudorandom sequence as long as we reach a cardinality A=N; that is, the length of the message is covered.In the next subsections, first, we describe the generation of 15 subkeys, and then how the subkeys are used to determine a pseudorandom sequence of locations where the secret bits are inserted.


### 2.1. Creation of 15 Subkeys

There are two types of cryptography techniques, namely, private key and public key cryptography. Public key cryptography is an asymmetric cryptography technique which encrypts the message with a private key and decrypts the message with a public key. Private key cryptography is a symmetric cryptography technique which encrypts and decrypts a message with the same key. The DES (Data Encryption Standard) algorithm [40] is the most widely used symmetric encryption algorithm in the world and its design idea is still used in numerous block ciphers.In this paper we use steps similar to those developed for the Data Encryption Standard (DES) algorithm to generate subkeys, but we only generate 15 new subkeysCi of 96 bits, with i=1,…,15, using compressions (permutations) of 112 and 96 bits, respectively.To generate the 15 subkeys we use one key of 128 bits (as defined in the first step of Section2.2), by the following steps:(1)
The 128-bit key is permuted according to the following permutation:4237535133123128114271073829741792641045845601032363785839117651321013512431974441110251203105615070102951137711559752148125204799100903219949468122109892883111821254847314786288575579911012193108983012787342449111407143806915119112225258167The first entry in the table being42 means that the 42th bit of the original key becomes the first bit of the permuted key. The 37th bit of the original key becomes the second bit of the permuted key. The 67th bit of the original key is the last bit of the permuted key. Note that only 112 bits of the original key appear in the permuted key.(2)
Next, split this key into a left and a right half,c0L and c0R, where each half contains 56 bits.(3)
Then, withc0L and c0R defined, we now create fifteen blocks ciL and ciR, 1≤i≤15. Each pair of blocks ciL and ciR is formed from the previous pair ci-1L and ci-1R, respectively, for i=1,…,15, using the following schedule of “left shifts” of the previous block: (4)1fori∈1,2,9,2fori∈1,…,15∖1,2,9.To do a left shift, move each bit one place to the left, except for the first bit, which is cycled to the end of the block. A double shift is twice a single shift. This means, for example,c9L and c9R are obtained from c8L and c8R, respectively, by one left shift, and c15L and c15R are obtained from c14L and c14R, respectively, by two left shifts.(4)
In order to finish, we generate keysCi of 96 bits, with 1≤i≤15, by applying the following permutation to each of the concatenated pairs [ciL∣ciR]:441477494511168372347813132679121027369298832762751589341110975810510484705103100788721836317117306513504112534120810954613894408074425510111079649222859110759243598233529399192851904843827952557Notice that the first bit ofCi is the 44th bit of [ciL∣ciR], the second bit is the 14th, and so on, ending with the 96th bit of Ci being the 57th bit of [ciL∣ciR].In summary, this procedure uses one key of 128 bits, to determine 15 subkeys of 96 bits, which, through the procedure that is described in continuation, generates a pseudorandom sequence that determines the location to insert the secret bits.


### 2.2. Generation of Pseudorandom Sequence of Locations

In this subsection we describe how the location of the secret message is determined by using the subkeys as defined in Section2.1. The generation of the pseudorandom sequence is realized according to the following steps:(1)
Generate a public key of 64 bits. Concatenate the private key and the public key. Alternate its bytes to create a new key of 128 bits. The first element of the composed key of 128 bits is the first element of the private key and the second is the first element of the public key and so on. Extract the least significant bits of each byte of the composed key, getting this way a binary sequenceC0 of 16 bits.(2)
From the newly concatenated key generate 15 new subkeysCi of 96 bits, with i=1,…,15, according to the steps that were described in Section 2.1.(3)
Apply the permutation.4160756176877711872331872757876562548922422369358010138776728596766371992646645542537986276433439355854327077122734895155254644275682817357784320775983845677777278877772940115194349144211437904714843830509157587176957477716572818952577to the binary sequenceCj⊕Cj+1, with j=1,…,14, expanding it to a binary sequence C~j of 128 bits. Here, the symbol ⊕ defines the binary operation 0⊕0=1⊕1=0 and 0⊕1=1⊕0=1. Then, apply the operation ⊕ between the 16 bits of sequence C0 and each of the 8 blocks of 16 bits of the binary sequence C~j of 128 bits, creating a new binary sequence C^j of 128 bits.(4)
ConcatenateC¯=C^1∪C^2∪⋯∪C^14. If the cardinality of concatenated keys is |C¯|≥N, then the subsequence A=a1,a2,…,al,…,aN of C¯ is extracted such that the cardinality |A|=N covers the whole secret message being a1 the first bit of C¯ and so on.(5)
If the length of the secret message exceeds the cardinality|C¯| then the set C¯ is extended by adding another pseudorandom sequence obtained using the first 64 bits of C^13 as private key and the last 64 bits of C^14 as public key. This procedure continues until the desired length is obtained.


## 2.1. Creation of 15 Subkeys

There are two types of cryptography techniques, namely, private key and public key cryptography. Public key cryptography is an asymmetric cryptography technique which encrypts the message with a private key and decrypts the message with a public key. Private key cryptography is a symmetric cryptography technique which encrypts and decrypts a message with the same key. The DES (Data Encryption Standard) algorithm [40] is the most widely used symmetric encryption algorithm in the world and its design idea is still used in numerous block ciphers.In this paper we use steps similar to those developed for the Data Encryption Standard (DES) algorithm to generate subkeys, but we only generate 15 new subkeysCi of 96 bits, with i=1,…,15, using compressions (permutations) of 112 and 96 bits, respectively.To generate the 15 subkeys we use one key of 128 bits (as defined in the first step of Section2.2), by the following steps:(1)
The 128-bit key is permuted according to the following permutation:4237535133123128114271073829741792641045845601032363785839117651321013512431974441110251203105615070102951137711559752148125204799100903219949468122109892883111821254847314786288575579911012193108983012787342449111407143806915119112225258167The first entry in the table being42 means that the 42th bit of the original key becomes the first bit of the permuted key. The 37th bit of the original key becomes the second bit of the permuted key. The 67th bit of the original key is the last bit of the permuted key. Note that only 112 bits of the original key appear in the permuted key.(2)
Next, split this key into a left and a right half,c0L and c0R, where each half contains 56 bits.(3)
Then, withc0L and c0R defined, we now create fifteen blocks ciL and ciR, 1≤i≤15. Each pair of blocks ciL and ciR is formed from the previous pair ci-1L and ci-1R, respectively, for i=1,…,15, using the following schedule of “left shifts” of the previous block: (4)1fori∈1,2,9,2fori∈1,…,15∖1,2,9.To do a left shift, move each bit one place to the left, except for the first bit, which is cycled to the end of the block. A double shift is twice a single shift. This means, for example,c9L and c9R are obtained from c8L and c8R, respectively, by one left shift, and c15L and c15R are obtained from c14L and c14R, respectively, by two left shifts.(4)
In order to finish, we generate keysCi of 96 bits, with 1≤i≤15, by applying the following permutation to each of the concatenated pairs [ciL∣ciR]:441477494511168372347813132679121027369298832762751589341110975810510484705103100788721836317117306513504112534120810954613894408074425510111079649222859110759243598233529399192851904843827952557Notice that the first bit ofCi is the 44th bit of [ciL∣ciR], the second bit is the 14th, and so on, ending with the 96th bit of Ci being the 57th bit of [ciL∣ciR].In summary, this procedure uses one key of 128 bits, to determine 15 subkeys of 96 bits, which, through the procedure that is described in continuation, generates a pseudorandom sequence that determines the location to insert the secret bits.


## 2.2. Generation of Pseudorandom Sequence of Locations

In this subsection we describe how the location of the secret message is determined by using the subkeys as defined in Section2.1. The generation of the pseudorandom sequence is realized according to the following steps:(1)
Generate a public key of 64 bits. Concatenate the private key and the public key. Alternate its bytes to create a new key of 128 bits. The first element of the composed key of 128 bits is the first element of the private key and the second is the first element of the public key and so on. Extract the least significant bits of each byte of the composed key, getting this way a binary sequenceC0 of 16 bits.(2)
From the newly concatenated key generate 15 new subkeysCi of 96 bits, with i=1,…,15, according to the steps that were described in Section 2.1.(3)
Apply the permutation.4160756176877711872331872757876562548922422369358010138776728596766371992646645542537986276433439355854327077122734895155254644275682817357784320775983845677777278877772940115194349144211437904714843830509157587176957477716572818952577to the binary sequenceCj⊕Cj+1, with j=1,…,14, expanding it to a binary sequence C~j of 128 bits. Here, the symbol ⊕ defines the binary operation 0⊕0=1⊕1=0 and 0⊕1=1⊕0=1. Then, apply the operation ⊕ between the 16 bits of sequence C0 and each of the 8 blocks of 16 bits of the binary sequence C~j of 128 bits, creating a new binary sequence C^j of 128 bits.(4)
ConcatenateC¯=C^1∪C^2∪⋯∪C^14. If the cardinality of concatenated keys is |C¯|≥N, then the subsequence A=a1,a2,…,al,…,aN of C¯ is extracted such that the cardinality |A|=N covers the whole secret message being a1 the first bit of C¯ and so on.(5)
If the length of the secret message exceeds the cardinality|C¯| then the set C¯ is extended by adding another pseudorandom sequence obtained using the first 64 bits of C^13 as private key and the last 64 bits of C^14 as public key. This procedure continues until the desired length is obtained.


## 3. Proposed Algorithm

In this section we propose a new algorithm for steganography. Given a procedure for the determination of the possible locations of the sub-keys (as described in Section2.2), the algorithm is mainly about the effective insertion of the message according to a threshold. The embedding algorithm has a sandwich structure, where first several transformations are applied subsequently. In the core of the algorithm the secret message is inserted respectively extracted whenever an entropy threshold criterion is satisfied. Finally, inverse transformations are applied in reverse order. See Algorithm 1 for a pseudocode, where the operating mode is switched to embedding or extraction by setting the parameter mode to EMBEDDING or EXTRACTION, respectively.Algorithm 1:Embedding algorithm.
⊳ Subtract 128 from each byte of image to produce a data range that is centered around zero, so that the modified
range is-128,127.
(i) Divide the cover image into3mn/64 non-overlapping blocks of 8×8 bytes as indicated in Section 1.3.
for
k
∈
K
do
⊳ Calculate the Discrete Cosine Transform (DCT) coefficients Bu,vk for each 8×8 byte matrix Bi,jk.
(i) Compute the entropy
Ek=∑0≤u,v≤7Bu,vk2.
end for
(i) Calculate mean entropyE- of all transformed blocks.
(ii)l=1.
(iii)i=1.
for
k
∈
K
do
ifEk>E-then
⊳Θk←Bk: Quantify Bu,vk according to (9).
⊳νk←Θk: Apply the zigzag scan, see Figure 3.
forj=2,…,8do
ifal=1then
if mode = EMBEDDING then
ifνjk<0then
ν-jk←-R(round(νjk),si): Apply the replacement rule according to (5) and (6).
else
ν-jk←R(round(νjk),si)
end if
else
si=R-1(round(νjk)): Apply extraction rule (8).
end if
i=i+1: Goto next bit of secret message.
else
ν-jk←νjk
end if
l=l+1: Goto next index of location indicator.
end for
⊲Θ-k←ν-k: Reorganize the vector νk with the secret message to a matrix of order 8, taking into account the zigzag
scan order.
⊲B-k←Θk: Multiply the previous matrix by the quantification matrix (10).
⊲B-k←B-k: Apply the Inverse Discrete Cosine Transform (IDCT).
else
⊲B-k←Bk: Copy the matrix.
end if
end for
⊲ Add to each byte 128 to reconstruct the image, obtaining the expected stego image.Roughly speaking, bits of the secret message are inserted at given locations whenever the entropy of a block is above a certain threshold value. Therefore, the proposed algorithm divides the cover image into nonoverlapping blocks of8×8 bytes and then applies the discrete cosine transform to each matrix of them. The Entropy Thresholding method determines the matrices that will be quantized. The combined private-public key determines a binary sequence of pseudorandom numbers that indicate the first seven AC coefficients where the elements of the binary sequence of the secret image will be inserted.


### 3.1. Replacement Rule

We denote byR(x,si) the function that replaces a value x∈N by the corresponding secret message bit si. For si=0 the rule R(x,si) is defined by(5)Rx,si=x-1,ifxisodd,x,ifxiseven.Analogously, for si=1 we define R(x,si) as(6)Rx,si=x,ifxisodd,x+1,ifxiseven.The effect of different values of x and si on R(x,si) is shown in (7). The replacement rule is designed (7)xevenxoddsi=0Rx,sievenRx,sievensi=1Rx,sioddRx,sioddsuch that si=0 corresponds to even and si=1 to odd values of R(x,si) and thus provides the rule for the inverse operation R-1 for the following extraction function defined by(8)x=R-1y=0,ifyiseven,1,ifyisodd.The process of extraction follows the same procedure as executed in the process of insertion, except that instead of inserting the least significant bit, the corresponding message bit is extracted. For both processes, embedding and extraction, the input consists of the stego image, private key, public key, and the quality factor.


### 3.2. Embedding Algorithm

The secret message is inserted into the cover image by the embedding procedure described in Algorithm1.Input. Secret message, cover image, private key, public key, and quality factor.Procedure. In the proposed algorithm, it is assumed that the emitter as well as the receiver holds the same system of private keys. Indeed, the receiver sends the public key to the emitter by an insecure channel. Then, the emitter generates the stego image with both keys and sends it through another insecure channel to the receiver, which can extract the secret message from the public and private key; see Figure 2.The emitter generates the stego image according to Algorithm1. Firstly, the proposed algorithm subtracts 128 from each byte of the image. Next, it splits the cover image up into nonoverlapping blocks of 8×8 bytes and then applies the discrete cosine transform to each one of them. From each transformed block it calculates the entropy.By the Entropy Thresholding method it decides whether or not to embed the secret message in the transformed block. If the entropy of a block is greater than the overall average entropy then each selected block is quantified using the quantification matrix (9); the zigzag scan is applied, with the purpose to align frequency coefficients in ascending order; see Figure 3. Afterwards, the elements of the binary sequence of the secret message are inserted in the first seven AC coefficients whenever the elements al∈A are equal to 1. Since the replacement rule operates on natural numbers, the real valued coefficients have to be rounded.After insertion of the secret message the back transformation is realized in reverse order: By the zigzag scan the matrix of order8 is reconstructed, which afterwards is unquantified multiplying by the quantification matrix (10). Finally, the Inverse Discrete Cosine Transform (IDCT) is applied, and to each byte of the resultant image the value 128 is added in order to reconstruct the image, obtaining the expected stego image.


### 3.3. Details on Quantification Procedure and Zig-Zag Scan

In the quantification procedure each block of8×8 bytes selected by the Entropy Thresholding method is quantified using the given quantification matrix that scales the quantized values by a compression quality factor qF; see [36] for more details. The quantized DCT coefficients Θu,vk are computed as(9)Θu,vk=roundBu,vkQu,vqF,0≤u,v≤7,where QqF is the matrix(10)QqF=100-qF50Q50,ifqF>50,50qFQ50,otherwise.Here, the quantization matrix Q50 is chosen to be the Lohscheller matrix: (11)Q50=1611101624405161121214192658605514131624405769561417222951878062182237566810910377243555648110411392496478871031211201017292959811210010399. The transformation of the matrix Θu,vk, with 0≤u,v≤7, to a vector νk=νik:1≤i≤64 of length 64 is done by the zigzag order scan; see Figure 3, which aligns frequency coefficients in ascending order starting from frequency zero (DC coefficient) to nonzero frequency components (AC coefficients). Indeed, the DC coefficient contains a significant fraction of the image energy. In addition, the AC coefficients can be classified in three groups, those that occur at low (yellow color), at middle (green color), and at high (blue color) frequency, respectively. Out of the 9 low frequency AC coefficients (yellow color) only the first 7 AC coefficients are considered, whenever the pseudorandom sequence and the entropy threshold permits.Usually, zero AC coefficients occur at middle and high frequency, so modifications to them break the structure of continuous zeros. Abrupt nonzero values give a hint of the existence of secret bits. The nonzero AC coefficients occur at low and middle frequency such that perturbations to them do not affect the visual quality [41].


## 3.1. Replacement Rule

We denote byR(x,si) the function that replaces a value x∈N by the corresponding secret message bit si. For si=0 the rule R(x,si) is defined by(5)Rx,si=x-1,ifxisodd,x,ifxiseven.Analogously, for si=1 we define R(x,si) as(6)Rx,si=x,ifxisodd,x+1,ifxiseven.The effect of different values of x and si on R(x,si) is shown in (7). The replacement rule is designed (7)xevenxoddsi=0Rx,sievenRx,sievensi=1Rx,sioddRx,sioddsuch that si=0 corresponds to even and si=1 to odd values of R(x,si) and thus provides the rule for the inverse operation R-1 for the following extraction function defined by(8)x=R-1y=0,ifyiseven,1,ifyisodd.The process of extraction follows the same procedure as executed in the process of insertion, except that instead of inserting the least significant bit, the corresponding message bit is extracted. For both processes, embedding and extraction, the input consists of the stego image, private key, public key, and the quality factor.


## 3.2. Embedding Algorithm

The secret message is inserted into the cover image by the embedding procedure described in Algorithm1.Input. Secret message, cover image, private key, public key, and quality factor.Procedure. In the proposed algorithm, it is assumed that the emitter as well as the receiver holds the same system of private keys. Indeed, the receiver sends the public key to the emitter by an insecure channel. Then, the emitter generates the stego image with both keys and sends it through another insecure channel to the receiver, which can extract the secret message from the public and private key; see Figure 2.The emitter generates the stego image according to Algorithm1. Firstly, the proposed algorithm subtracts 128 from each byte of the image. Next, it splits the cover image up into nonoverlapping blocks of 8×8 bytes and then applies the discrete cosine transform to each one of them. From each transformed block it calculates the entropy.By the Entropy Thresholding method it decides whether or not to embed the secret message in the transformed block. If the entropy of a block is greater than the overall average entropy then each selected block is quantified using the quantification matrix (9); the zigzag scan is applied, with the purpose to align frequency coefficients in ascending order; see Figure 3. Afterwards, the elements of the binary sequence of the secret message are inserted in the first seven AC coefficients whenever the elements al∈A are equal to 1. Since the replacement rule operates on natural numbers, the real valued coefficients have to be rounded.After insertion of the secret message the back transformation is realized in reverse order: By the zigzag scan the matrix of order8 is reconstructed, which afterwards is unquantified multiplying by the quantification matrix (10). Finally, the Inverse Discrete Cosine Transform (IDCT) is applied, and to each byte of the resultant image the value 128 is added in order to reconstruct the image, obtaining the expected stego image.


## 3.3. Details on Quantification Procedure and Zig-Zag Scan

In the quantification procedure each block of8×8 bytes selected by the Entropy Thresholding method is quantified using the given quantification matrix that scales the quantized values by a compression quality factor qF; see [36] for more details. The quantized DCT coefficients Θu,vk are computed as(9)Θu,vk=roundBu,vkQu,vqF,0≤u,v≤7,where QqF is the matrix(10)QqF=100-qF50Q50,ifqF>50,50qFQ50,otherwise.Here, the quantization matrix Q50 is chosen to be the Lohscheller matrix: (11)Q50=1611101624405161121214192658605514131624405769561417222951878062182237566810910377243555648110411392496478871031211201017292959811210010399. The transformation of the matrix Θu,vk, with 0≤u,v≤7, to a vector νk=νik:1≤i≤64 of length 64 is done by the zigzag order scan; see Figure 3, which aligns frequency coefficients in ascending order starting from frequency zero (DC coefficient) to nonzero frequency components (AC coefficients). Indeed, the DC coefficient contains a significant fraction of the image energy. In addition, the AC coefficients can be classified in three groups, those that occur at low (yellow color), at middle (green color), and at high (blue color) frequency, respectively. Out of the 9 low frequency AC coefficients (yellow color) only the first 7 AC coefficients are considered, whenever the pseudorandom sequence and the entropy threshold permits.Usually, zero AC coefficients occur at middle and high frequency, so modifications to them break the structure of continuous zeros. Abrupt nonzero values give a hint of the existence of secret bits. The nonzero AC coefficients occur at low and middle frequency such that perturbations to them do not affect the visual quality [41].


## 4. Experimental Results

In this Section the experimental results of the proposed algorithm are presented. The proposed algorithm is implemented in Matlab. Five different images consisting of784×512 pixels are used, with a quality factor equal to qF=57. The cover images and the stego images are shown in Figure 1.Figure 1
The images before and after embedding the secret message. The first row contains the cover images while the second contains the stego images.Figure 2
Exchange of information.Figure 3
Zigzag order scan.The used keys were taken randomly. We have tested our proposed algorithm by inserting the following message to each of the five images:Nec vero habere virtutem satis est quasi artem aliquam nisi utare; etsi ars quidem cum ea non utare scientia tamen ipsa teneri potest, virtus in usu sui tota posita est. (Cicero, “De re publica”)In addition, a comparison of the proposed method with respect to the Entropy Thresholding method proposed by Velasco-Bautista et al. [36] and to the method proposed by Soria et al. [1] is included in this section. The performance of the proposed approach has been studied using different kinds of statistical measures.


### 4.1. Imperceptibility Test

The information security through steganography depends in great part on the level of imperceptibility, since a steganographic system has to generate a sufficiently innocent stego image. Therefore, the degree of distortion or imperceptibility of a stego image in relation to the original image plays a fundamental role. Usually, the image distortion is measured by the peak signal-to-noise ratio (PSNR), which is given by(12)PSNR=10log10⁡2562MSE,where (13)MSE=3mn-1∑γ∈ΓCγ-Sγ2,and C and S are the cover and stego image, respectively. The index set γ=(γ1,γ2,γ3) sums over the set of bytes as(14)Γ=1,…,m×1,…,n×1,2,3,where m, n account for the image size, β3 addresses the three colours, and C,S∈{0,1,…,255}.In the first experiment, the PSNR values indicate the level of imperceptibility and distortion of those images. In this experiment, 128 randomly chosen pairs of different keys were used. The experimental results show that the proposed algorithm produces high quality stego images with appropriate PSNR values; see Figures4–8, which is in correspondence with the heuristic values of PSNR (30 to 50 db) found in literature [42]. Moreover, this experiment shows that the proposed method gives usually better results than the methods proposed by Soria et al. [1] and Velasco-Bautista et al. [36].Figure 4
PSNR values for the Airplane image.Figure 5
PSNR values for the City image.Figure 6
PSNR values for the Leaves image.Figure 7
PSNR values for the Lenna image.Figure 8
PSNR values for the Peppers image.


### 4.2. Image Quality Measures

The relationship between the display and the human visual system can be quantitatively expressed by mathematical relationships of Image Quality Measures (IQMs). Steganographic schemes eventually leave statistical evidence that can be used to quantify the hidden content in the stego image relative to the cover image; see [43]. The metrics measure the similarity between the cover image C and the stego image S after insertion of the message, summing over the set of all bytes Γ as defined by (14): (15)CQ=∑γ∈ΓCγSγ∑γ∈ΓCγ,SC=∑γ∈ΓCγ2∑γ∈ΓSγ2,IF=1-∑γ∈ΓCγ-Sγ2∑γ∈ΓIγ2,AD=3mn-1∑γ∈ΓCγ-Sγ. The IQMs based on correlation of the content of the images include Correlation Quality (CQ) and Structure Content (SC); see [43, 44]. In addition, the IQMs based on difference distortion and pixel distance include Image Fidelity (IF) and Average Absolute Difference (AD), respectively; see [43, 44].In the case of the metrics CQ, SC, IF, and AD, the closer the value is to one, the higher the level of similarity is. However, in the case of the metric AD, the closer the value is to zero, the lower the global distortion of the stego image is with respect to the cover image. A large value of AD means that the stego image is very poor in quality.In the second experiment, the values of CQ, SC, IF, and AD were found for seven pairs of different keys. It can be observed that CQ, SC, and IF tend to one (see Figures9 and 10) while the AD values are small (see Table 1), which shows that between the cover image and the stego image there are no significant differences.Table 1
AD values for the Lenna image.
Keys
Method
Proposed
Soria
Velasco
1
0.006847
0.006607
0.005021
3
0.006806
0.007415
0.005021
3
0.006800
0.006327
0.005021
4
0.006673
0.006941
0.005021
5
0.006753
0.006786
0.005021
6
0.006728
0.006656
0.005021
7
0.006812
0.006360
0.005021Figure 9
CQ values for the Lenna image (displayed: CQ − 1).Figure 10
IF values for the Lenna image (displayed: IF − 1).


### 4.3. Histogram Analysis

In the third experiment we use the Peppers image. The calculation of the previous quantities produced similar results (not shown). In Figure11, the histograms for the red block of the analyzed image are shown. A distortion metric is the Histogram Similarity (HS), which is calculated as (16)HS=∑0≤l≤255fCl-fSl, where fC(l) is the relative frequency of level l in a 256-level image; see [43, 45]. This measure is connected to the differences between each histogram pair. Table 2 shows that the values of HS are close to zero, which corresponds to the values calculated in the previous example.Table 2
Values of histogram similarity.
Keys
Proposed method
Soria method
Velasco method
Airplane
1
0.002534
0.002496
0.002033
2
0.002377
0.002860
0.002033
3
0.002256
0.002476
0.002033
4
0.002457
0.002557
0.002033
5
0.002444
0.002573
0.002033
6
0.002271
0.002406
0.002033
7
0.002387
0.002439
0.002033
City
1
0.000965
0.001002
0.000954
2
0.000901
0.001031
0.000954
3
0.000968
0.000987
0.000954
4
0.001051
0.000951
0.000954
5
0.000989
0.000947
0.000954
6
0.001067
0.001072
0.000954
7
0.001104
0.000893
0.000954
Leaves
1
0.001501
0.001622
0.001224
2
0.001755
0.001649
0.001224
3
0.001634
0.001568
0.001224
4
0.001648
0.001475
0.001224
5
0.001680
0.001652
0.001224
6
0.001788
0.001631
0.001224
7
0.001643
0.001469
0.001224
Lenna
1
0.002055
0.002050
0.001408
2
0.002204
0.002098
0.001408
3
0.002075
0.001983
0.001408
4
0.002003
0.002027
0.001408
5
0.001925
0.001944
0.001408
6
0.002152
0.001948
0.001408
7
0.002068
0.001855
0.001408
Peppers
1
0.004432
0.004207
0.002718
2
0.004313
0.004803
0.002718
3
0.004288
0.004031
0.002718
4
0.004490
0.004672
0.002718
5
0.004433
0.004226
0.002718
6
0.004416
0.004138
0.002718
7
0.004485
0.004093
0.002718Figure 11
The histogram of Peppers image before and after embedding the secret message.


### 4.4. Security Test

The security of a steganographic system can be evaluated beyond examining the distribution of the cover and stego image. Cachin [46] proposed a statistical measure for steganographic systems, which is called ε-secure and given by (17)REPC∥PS=∑PClog⁡PCPS≤ε,where PC and PS represent the distribution of cover image and stego image, and REPC∥PS is the relative entropy between the two probability distributions. Moreover, a steganographic system is called perfectly secure if REPC∥PS=0.In the fourth experiment we observe that the values of the relative entropy are close to zero, which affirms that the steganographic system obtained from the proposed algorithm is sufficiently secure; see Table3 and Figure 12 corresponding to the City image.Table 3
Values of relative entropy pairs.
Keys
Proposed method
Soria method
Velasco method
Airplane
1
0.002525
0.002487
0.002025
2
0.002370
0.002849
0.002025
3
0.002249
0.002468
0.002025
4
0.002449
0.002550
0.002025
5
0.002436
0.002564
0.002025
6
0.002263
0.002398
0.002025
7
0.002378
0.002434
0.002025
Leaves
1
0.001501
0.001622
0.001225
2
0.001755
0.001650
0.001225
3
0.001635
0.001569
0.001225
4
0.001648
0.001475
0.001225
5
0.001680
0.001652
0.001225
6
0.001789
0.001631
0.001225
7
0.001644
0.001469
0.001225
Lenna
1
0.002055
0.002051
0.001409
2
0.002204
0.002098
0.001409
3
0.002076
0.001983
0.001409
4
0.002004
0.002028
0.001409
5
0.001925
0.001944
0.001409
6
0.002152
0.001949
0.001409
7
0.002068
0.001856
0.001409
Peppers
1
0.004259
0.004068
0.002649
2
0.004155
0.004607
0.002649
3
0.004113
0.003909
0.002649
4
0.004323
0.004485
0.002649
5
0.004253
0.004045
0.002649
6
0.004230
0.003969
0.002649
7
0.004308
0.003974
0.002649Figure 12
RE values for the City image.


### 4.5. Steganalysis Experiment: Chi-Square Attack Resistance Test

Steganalysis is the science of detecting hidden information. In other words, steganalysis intends to find the secret information that carries some stego-information by attacking the security of the used steganography algorithm. During the design of secure steganographic algorithms, the simulation of attacks is essential to evaluate the security. In this work some of the stego images produced by the Soria-Lorente method, the Velasco-Bautista method, and the proposed method have been tested against the well-known Chi-square attack [47]. The Chi-square attack is one of the algorithms to test the detectability of any secret data embedding algorithm. This test is based on the frequency with which pixel values appear. It is unusual for the frequency of pixel value 2j to be (nearly) equal to the frequency of pixel value 2j+1 in a typical image with no embedded information. The Chi-squared attack was designed to detect these near-equal biases in images and bases the probability of embedding on how close to equal the even pixel values and their corresponding odd pixel values are in the test image. Indeed, in [48] it was shown that the Chi-square attack detects successfully the existence of the embedded secret bits in the first half of the DCT coefficients of the stego image created by the Jpeg-Jsteg method; see also [32].The Chi-squareχk-12 statistic with k-1 degrees of freedom is given as (18)χk-12=∑1≤j≤kηj-Eηj2Eηj,Eηj=ηj+λj2, where ηj and λj are the total pixels in image sample of gray value 2j and 2j+1, respectively. The values of the Chi-square statistic are always positive. The expectation is that, for a stego image, χk-12 is relatively small because ηj should be near λj, by the hypothesis, and for a non-stego image, χk-12 is relatively large because ηj should be far from λj. The final step of the process is calculating p, the probability of embedding, by integrating the density function with χk-12 as its upper limit: (19)p=1-21-kΓk-1/2∫0χk-12e-x/2xk-1/2-1dx. This probability of embedding is the probability of χk-12 under the condition that ηj=λj for 1≤j≤k. The density function, 1-p, converges to 1 as χk-12 approaches infinity, so p approaches 0 as χk-12 approaches infinity. Therefore, for large χk-12, the probability of embedding is near 0. In other words, larger values of the χk-12 mean a lower probability of embedding. However, when χk-12 is small relative to k-1, then 1-p is near to zero and hence p is near to 1. Thus for relatively small χk-12, the probability of embedding is near 1.In the fifth experiment we verify that the stego images created by the Soria-Lorente method and the proposed method cannot be detected by the Chi-square attack; see Figures13 and 14. This means that the proposed method is robust against the Chi-square attack. However, in Figure 14, one can observe that the Chi-square attack detects the existence of the embedded secret bits approximately in 1.02% of the stego images created by the Velasco-Bautista method, with a probability of embedding of 0.94.Figure 13
The detection results of the Chi-square attack to the stego image (Airplane) created by the Soria-Lorente method, the Velasco-Bautista method, and the proposed method.Figure 14
The detection results of the Chi-square attack to the stego image (City) created by the Soria-Lorente method, the Velasco-Bautista method, and the proposed method.


## 4.1. Imperceptibility Test

The information security through steganography depends in great part on the level of imperceptibility, since a steganographic system has to generate a sufficiently innocent stego image. Therefore, the degree of distortion or imperceptibility of a stego image in relation to the original image plays a fundamental role. Usually, the image distortion is measured by the peak signal-to-noise ratio (PSNR), which is given by(12)PSNR=10log10⁡2562MSE,where (13)MSE=3mn-1∑γ∈ΓCγ-Sγ2,and C and S are the cover and stego image, respectively. The index set γ=(γ1,γ2,γ3) sums over the set of bytes as(14)Γ=1,…,m×1,…,n×1,2,3,where m, n account for the image size, β3 addresses the three colours, and C,S∈{0,1,…,255}.In the first experiment, the PSNR values indicate the level of imperceptibility and distortion of those images. In this experiment, 128 randomly chosen pairs of different keys were used. The experimental results show that the proposed algorithm produces high quality stego images with appropriate PSNR values; see Figures4–8, which is in correspondence with the heuristic values of PSNR (30 to 50 db) found in literature [42]. Moreover, this experiment shows that the proposed method gives usually better results than the methods proposed by Soria et al. [1] and Velasco-Bautista et al. [36].Figure 4
PSNR values for the Airplane image.Figure 5
PSNR values for the City image.Figure 6
PSNR values for the Leaves image.Figure 7
PSNR values for the Lenna image.Figure 8
PSNR values for the Peppers image.


## 4.2. Image Quality Measures

The relationship between the display and the human visual system can be quantitatively expressed by mathematical relationships of Image Quality Measures (IQMs). Steganographic schemes eventually leave statistical evidence that can be used to quantify the hidden content in the stego image relative to the cover image; see [43]. The metrics measure the similarity between the cover image C and the stego image S after insertion of the message, summing over the set of all bytes Γ as defined by (14): (15)CQ=∑γ∈ΓCγSγ∑γ∈ΓCγ,SC=∑γ∈ΓCγ2∑γ∈ΓSγ2,IF=1-∑γ∈ΓCγ-Sγ2∑γ∈ΓIγ2,AD=3mn-1∑γ∈ΓCγ-Sγ. The IQMs based on correlation of the content of the images include Correlation Quality (CQ) and Structure Content (SC); see [43, 44]. In addition, the IQMs based on difference distortion and pixel distance include Image Fidelity (IF) and Average Absolute Difference (AD), respectively; see [43, 44].In the case of the metrics CQ, SC, IF, and AD, the closer the value is to one, the higher the level of similarity is. However, in the case of the metric AD, the closer the value is to zero, the lower the global distortion of the stego image is with respect to the cover image. A large value of AD means that the stego image is very poor in quality.In the second experiment, the values of CQ, SC, IF, and AD were found for seven pairs of different keys. It can be observed that CQ, SC, and IF tend to one (see Figures9 and 10) while the AD values are small (see Table 1), which shows that between the cover image and the stego image there are no significant differences.Table 1
AD values for the Lenna image.
Keys
Method
Proposed
Soria
Velasco
1
0.006847
0.006607
0.005021
3
0.006806
0.007415
0.005021
3
0.006800
0.006327
0.005021
4
0.006673
0.006941
0.005021
5
0.006753
0.006786
0.005021
6
0.006728
0.006656
0.005021
7
0.006812
0.006360
0.005021Figure 9
CQ values for the Lenna image (displayed: CQ − 1).Figure 10
IF values for the Lenna image (displayed: IF − 1).


## 4.3. Histogram Analysis

In the third experiment we use the Peppers image. The calculation of the previous quantities produced similar results (not shown). In Figure11, the histograms for the red block of the analyzed image are shown. A distortion metric is the Histogram Similarity (HS), which is calculated as (16)HS=∑0≤l≤255fCl-fSl, where fC(l) is the relative frequency of level l in a 256-level image; see [43, 45]. This measure is connected to the differences between each histogram pair. Table 2 shows that the values of HS are close to zero, which corresponds to the values calculated in the previous example.Table 2
Values of histogram similarity.
Keys
Proposed method
Soria method
Velasco method
Airplane
1
0.002534
0.002496
0.002033
2
0.002377
0.002860
0.002033
3
0.002256
0.002476
0.002033
4
0.002457
0.002557
0.002033
5
0.002444
0.002573
0.002033
6
0.002271
0.002406
0.002033
7
0.002387
0.002439
0.002033
City
1
0.000965
0.001002
0.000954
2
0.000901
0.001031
0.000954
3
0.000968
0.000987
0.000954
4
0.001051
0.000951
0.000954
5
0.000989
0.000947
0.000954
6
0.001067
0.001072
0.000954
7
0.001104
0.000893
0.000954
Leaves
1
0.001501
0.001622
0.001224
2
0.001755
0.001649
0.001224
3
0.001634
0.001568
0.001224
4
0.001648
0.001475
0.001224
5
0.001680
0.001652
0.001224
6
0.001788
0.001631
0.001224
7
0.001643
0.001469
0.001224
Lenna
1
0.002055
0.002050
0.001408
2
0.002204
0.002098
0.001408
3
0.002075
0.001983
0.001408
4
0.002003
0.002027
0.001408
5
0.001925
0.001944
0.001408
6
0.002152
0.001948
0.001408
7
0.002068
0.001855
0.001408
Peppers
1
0.004432
0.004207
0.002718
2
0.004313
0.004803
0.002718
3
0.004288
0.004031
0.002718
4
0.004490
0.004672
0.002718
5
0.004433
0.004226
0.002718
6
0.004416
0.004138
0.002718
7
0.004485
0.004093
0.002718Figure 11
The histogram of Peppers image before and after embedding the secret message.


## 4.4. Security Test

The security of a steganographic system can be evaluated beyond examining the distribution of the cover and stego image. Cachin [46] proposed a statistical measure for steganographic systems, which is called ε-secure and given by (17)REPC∥PS=∑PClog⁡PCPS≤ε,where PC and PS represent the distribution of cover image and stego image, and REPC∥PS is the relative entropy between the two probability distributions. Moreover, a steganographic system is called perfectly secure if REPC∥PS=0.In the fourth experiment we observe that the values of the relative entropy are close to zero, which affirms that the steganographic system obtained from the proposed algorithm is sufficiently secure; see Table3 and Figure 12 corresponding to the City image.Table 3
Values of relative entropy pairs.
Keys
Proposed method
Soria method
Velasco method
Airplane
1
0.002525
0.002487
0.002025
2
0.002370
0.002849
0.002025
3
0.002249
0.002468
0.002025
4
0.002449
0.002550
0.002025
5
0.002436
0.002564
0.002025
6
0.002263
0.002398
0.002025
7
0.002378
0.002434
0.002025
Leaves
1
0.001501
0.001622
0.001225
2
0.001755
0.001650
0.001225
3
0.001635
0.001569
0.001225
4
0.001648
0.001475
0.001225
5
0.001680
0.001652
0.001225
6
0.001789
0.001631
0.001225
7
0.001644
0.001469
0.001225
Lenna
1
0.002055
0.002051
0.001409
2
0.002204
0.002098
0.001409
3
0.002076
0.001983
0.001409
4
0.002004
0.002028
0.001409
5
0.001925
0.001944
0.001409
6
0.002152
0.001949
0.001409
7
0.002068
0.001856
0.001409
Peppers
1
0.004259
0.004068
0.002649
2
0.004155
0.004607
0.002649
3
0.004113
0.003909
0.002649
4
0.004323
0.004485
0.002649
5
0.004253
0.004045
0.002649
6
0.004230
0.003969
0.002649
7
0.004308
0.003974
0.002649Figure 12
RE values for the City image.


## 4.5. Steganalysis Experiment: Chi-Square Attack Resistance Test

Steganalysis is the science of detecting hidden information. In other words, steganalysis intends to find the secret information that carries some stego-information by attacking the security of the used steganography algorithm. During the design of secure steganographic algorithms, the simulation of attacks is essential to evaluate the security. In this work some of the stego images produced by the Soria-Lorente method, the Velasco-Bautista method, and the proposed method have been tested against the well-known Chi-square attack [47]. The Chi-square attack is one of the algorithms to test the detectability of any secret data embedding algorithm. This test is based on the frequency with which pixel values appear. It is unusual for the frequency of pixel value 2j to be (nearly) equal to the frequency of pixel value 2j+1 in a typical image with no embedded information. The Chi-squared attack was designed to detect these near-equal biases in images and bases the probability of embedding on how close to equal the even pixel values and their corresponding odd pixel values are in the test image. Indeed, in [48] it was shown that the Chi-square attack detects successfully the existence of the embedded secret bits in the first half of the DCT coefficients of the stego image created by the Jpeg-Jsteg method; see also [32].The Chi-squareχk-12 statistic with k-1 degrees of freedom is given as (18)χk-12=∑1≤j≤kηj-Eηj2Eηj,Eηj=ηj+λj2, where ηj and λj are the total pixels in image sample of gray value 2j and 2j+1, respectively. The values of the Chi-square statistic are always positive. The expectation is that, for a stego image, χk-12 is relatively small because ηj should be near λj, by the hypothesis, and for a non-stego image, χk-12 is relatively large because ηj should be far from λj. The final step of the process is calculating p, the probability of embedding, by integrating the density function with χk-12 as its upper limit: (19)p=1-21-kΓk-1/2∫0χk-12e-x/2xk-1/2-1dx. This probability of embedding is the probability of χk-12 under the condition that ηj=λj for 1≤j≤k. The density function, 1-p, converges to 1 as χk-12 approaches infinity, so p approaches 0 as χk-12 approaches infinity. Therefore, for large χk-12, the probability of embedding is near 0. In other words, larger values of the χk-12 mean a lower probability of embedding. However, when χk-12 is small relative to k-1, then 1-p is near to zero and hence p is near to 1. Thus for relatively small χk-12, the probability of embedding is near 1.In the fifth experiment we verify that the stego images created by the Soria-Lorente method and the proposed method cannot be detected by the Chi-square attack; see Figures13 and 14. This means that the proposed method is robust against the Chi-square attack. However, in Figure 14, one can observe that the Chi-square attack detects the existence of the embedded secret bits approximately in 1.02% of the stego images created by the Velasco-Bautista method, with a probability of embedding of 0.94.Figure 13
The detection results of the Chi-square attack to the stego image (Airplane) created by the Soria-Lorente method, the Velasco-Bautista method, and the proposed method.Figure 14
The detection results of the Chi-square attack to the stego image (City) created by the Soria-Lorente method, the Velasco-Bautista method, and the proposed method.


## 5. Conclusions and Discussion

In this contribution, we propose a new steganographic algorithm which uses two keys, one public and another private, in order to reduce the detectability. According to the analyses of PSNR, of histograms and IQMs values, it is demonstrated that in the stego image there are no detectable anomalies with respect to the cover image. Moreover, the obtained values for the relative entropy show that the steganographic system obtained by the proposed algorithm is sufficiently secure. In addition, by the values of embedding probability it was demonstrated that the proposed algorithm is highly resistant against the Chi-square attack.



---

*Source: 5397082-2017-03-01.xml*