Chapter A Data Hiding Approach Based on Reference-Affected Matrix Trong-The Nguyen, Jeng-Shyang Pan, Truong-Giang Ngo and Thi-Kien Dao Abstract Data security has got many remarkable achievements However, the issues of the lower distortion and the higher embedding capacity in the embedded secret data in media have not much been considered by scholars This paper proposes a new data hiding approach to the embedded secrets based on the guidance of the xcross-shaped reference-affected matrix to solve these issues Adjacent pixels would be found out large area with similar values which can utilize for manipulating data embedding and extracting on a difference–coordinate plan instead of the traditional pixel–coordinate plan Three parts: petal matrix, calyx matrix, and stamen matrix are combined for data embedding by using the x-cross-shaped reference matrix The experimental results compared with the previous methods in the literature shows that the proposed approach brings outstanding payload with the cover visual quality Keywords Steganography · Data hiding · Data embedding and extracting 6.1 Introduction Secret messages delivered to target destination need prevent from malicious attacks, so data hiding technique is one of the accessible ways [1] Data hiding technique, a significant subject of information security, is widely used to transfer secret messages to others safely on public channels instead of highly costly and conspicuous private channels [2] Data hiding focuses on finding a secure way to embed secrets in multimedia Pictures, known as common multimedia, can be a perfect means to T.-T Nguyen (B) · J.-S Pan · T.-K Dao Fujian Provincial Key Lab of Big Data Mining and Applications, Fujian University of Technology, Fuzhou, Fujian, China e-mail: jvnthe@gmail.com J.-S Pan e-mail: jspan@cc.kuas.edu.tw T.-T Nguyen · T.-G Ngo Department of Information Technology, Haiphong Private University, Haiphong, Vietnam e-mail: giangnt@hpu.edu.vn © Springer Nature Singapore Pte Ltd 2020 J.-S Pan et al (eds.), Advances in Intelligent Information Hiding and Multimedia Signal Processing, Smart Innovation, Systems and Technologies 156, https://doi.org/10.1007/978-981-13-9714-1_6 53 54 T.-T Nguyen et al carry secret messages At the current stage in steganography, grayscale images are common and convenient carriers Owing to the value of every grayscale image pixel ranging from to 255, so a pixel is easily represented by bits in a binary system [3, 4] The low distortion and the high capacity are two aspects included the lower distortions of images estimate data hiding method’s performance after embedding secrets and the higher capacity of carrying secret messages Generally, a higher embedding capacity will result in higher distortions of stego-images, and vice versa Thus, how to find a feasible way to make a trade-off is a big problem that arises from the data hiding The often steganography method used the least-significant bits (LSB) of each cover pixel’s value from a host image to carry a secret message LSB for data hiding is the simple and achievable methods with a satisfactory capacity of carrying secret digits and the escapable view from human eyes However, they are vulnerable one under the malicious attacks based on the statistical analysis [5] Modified LSB method (LSB to match a revisited approach) devoted to controlling the distortion of host images at a lower level with the same payload The stegoimages generated under the guidance of both of the corresponding two original images’ pixels and two secret digits that performed better in visual imperceptibility apparently in comparison with traditional LSB one [6] The exploiting modification direction (EMD) [7] method in which each unit composed of n pixels of a host image can carry one secret digit in (2n + 1)-ary notational system during embedding processes every time and only one pixel of the unit is modified by every time Therefore, it shows a larger payload and better quality of stego-images Further, in order to improve the ability of payload, the turtle-shell methods [8, 9] provided an easy way to establish a layout (like a turtle shell), so every secret digit ranging from to can be embedded by pixels each time The regular-octagon shape [10], the other method similar to turtle-shell one, had improved the capacity of carrying secret digits This paper places an x-cross-shaped reference matrix extended on a pixel–differencing plan to hide the secret that combined from three parts: petal matrix, calyx matrix, and stamen matrix for secret embedding, and payload with good visual quality The remaining paper is organized as sections Section 6.2 presents related work Section 6.3 states the methodology Section 6.4 discusses the experimental results A conclusion is summarized in Sect 6.5 6.2 Related Work The definition of symbols is used in this paper as follows H Height of an image W Weight of an image Cover/host image Represents the original grayscale image 6 A Data Hiding Approach Based on Reference-Affected Matrix Stego-image i d1 , d2 M(d1 , d2 ) mod pi d1 , d2 pi−1 , pi+1 ls M(d1 , d2 ) σ num 55 Represents the grayscale image after embedding a secret message Represents the index of pixels ( pi−1 , pi , pi+1 ): a triple of consecutive cover pixels Represents the difference values of pixel pairs ( pi−1 , pi ) and ( pi+1 , pi ) from a cover image, respectively Represents the value with the guidance of x-cross-shaped reference matrix Represents a modulo operation Represents the stego-pixel of pi after carrying secret by leastsignificant bit substitution method Represents the difference values of pixel pairs pi−1 , pi and pi+1 − pi , respectively Represents the stego-pixel values of pi−1 and pi+1 after embedding secret, respectively Represents the length of a secret that we are going to hide Represents the value of the secret we are going to embed from the reference matrix Represents standard deviation Represents the number of statistics in the histogram 6.2.1 EMD Scheme A (2n + 1)-ary notational secret data could be embedded for EMD scheme [7, 11] under a group of n cover pixels from the host image every time that achieve efficiency embedding and secrecy with low distortions EMD’s embedding procedure included steps: First, divide a cover image into a series of nonoverlapping groups Each group is composed of n pixels which are G = ( p1 , p2 , , pn ) Second, convert a binary secret message into a sequence of secret digits in (2n + 1)-ary notational system Every secret digit can be shown as s j ( j = 1, 2, , l), where l depends on n Apply EMD to the group G by Eq (6.1) where “mod” represents a modulo operation Equation (6.2) calculates how to carry a (2n + 1)-ary secret digit s j n = f ( p1 , p2 , , pn ) = ( pi i) mod (2n + 1) (6.1) i=1 D = sj − y mod (2n + 1) (6.2) By adding or subtracting, one is used to evaluate changes for certain pi value of G 56 T.-T Nguyen et al pi = ⎧ ⎨ pi , i f s j = ρ p D + 1, i f s j = ρ, and D ≤ n ⎩ p(2n+1)−D − 1, i f s j = ρ, and D ≤ n (6.3) Demonstration, when n = 2, e.g., if the cover pixel pair is ( p1 , p2 ) = (1, 2), ρ is according to Eq (6.1) When the to-be-embedded secret digit s j = 2, the stego-pixel pair will be p1 , p2 = (1, 3) according to Eqs (6.2) and (6.3) When the receiver wants to extract the secret, they can also utilize the function shown in Eq (6.1) That is, the secret digit can be extracted This method ensures a high data payload (about 1.16 bpp when n = 2) and a good image quality (about 52 dB measured by peak signal-to-noise ratio, often abbreviated PSNR) 6.3 Turtle-Shell-Based Scheme Every two pixels can carry a secret data ranging from (000)2 to (111)2 each time in the scheme of turtle shell [8] A reference matrix 256 × 256 containing as many turtle shells as possible is to hide the secret data Each turtle shell is a hexagon that contains eight different distinct numbers ranging from to 7, including six edge digits and two back digits Matrix turtle shell (symbol is M) is arranged one by one without overlapping The rule is the upper row is set to 2, and the next value difference is set to 3, and then continuously it is to again Alternately, add and to every row to complete the entire matrix Therefore, the value difference between two adjacent numbers in the same row of the reference matrix is set to “1”, and the value difference between two adjacent numbers in the same column is set alternately to “2” and “3” Continuously, write down to in every row Every turtle shell contains eight numbers ranging from (000)2 to (111)2 , so that each cover pixel pair is expressed as ( pi , pi+1 ), which can carry a 3-bit digit s j Assume that the grayscale cover image I with sized of H × W is composed by I = { pi |i = 1, 2, , (H × W )} To embed secret digits, the location of each pixel pair ( pi , pi+1 ) will be determined as M( pi , pi+1 ) in the reference matrix M, where pi and pi+1 are the column value and row value, respectively 6.4 Proposed Method Our schemes work according to using three pixels every time with the guidance of the x-cross-shaped reference matrix under a difference–coordinate system The xcross-shaped reference matrix combines three parts: petal matrix, calyx matrix, and stamen matrix for secret embedding, which brings a great payload with cover visual quality 6 A Data Hiding Approach Based on Reference-Affected Matrix 57 6.5 Matrix Construction Procedure A coordinate system (d1 , d2 ), where d1 and d2 range from −255 to 255, represents the difference–value of pixel pairs ( pi−1 − pi ) and ( pi+1 − pi ), respectively There is a large number of difference–values are close to 0s, due to the feature of images that adjacent pixels have nearly similar values Therefore, when d1 and d2 range from −1 to 1, a × is arranged as rectangle-shaped matrix called stamen matrix which is marked in orange Every pair of (d1 , d2 ) in the stamen matrix can carry a secret digit ranging from (000)2 to (111)2 if d1,2 ∈ {−1, 0, 1} (1, d2 ) = d1 + 3d2 + mod 8, (6.4) Then, settle the second part of the big matrix, when either d1 or d2 is equal to The calyx matrix is marked in blue as shown in Fig 6.1 Equation (6.5) describes the calyx matrix M(d1 , d2 ) = d1 mod 4, i f d1 {−1, 0, 1}, d2 = / {−1, 0, 1} d2 mod 4, i f d1 = 0, d2 ∈ (6.5) d2 The positive axis of d ranges from to 255, and the negative axis of d ranges from −2 to −255; meanwhile, d is set The other two calyxes on the positive axis 1 31 30 29 28 28 29 30 31 29 28 27 26 25 24 23 23 24 25 26 27 28 29 23 23 22 21 20 19 18 17 17 18 19 20 21 22 17 16 15 14 13 12 11 11 12 13 14 15 16 17 11 10 5 10 11 2 6 2 11 10 5 10 11 17 16 15 14 13 12 11 11 12 13 14 15 16 17 23 22 21 20 19 18 17 17 18 19 20 21 22 23 29 28 27 26 25 24 23 23 24 25 26 27 28 29 31 30 29 28 28 29 30 31 1 Fig 6.1 The designed scheme based on a reference-affected matrix d1 58 T.-T Nguyen et al and on the negative axis of d could be obtained by transposing calyxes, respectively Every element M(d1 , d2 ) in these calyxes can carry secret digits from (00)2 to (11)2 The major arranging area of the matrix known as petal is marked in green as shown in Fig 6.1 Every its column is set difference value as 1, and the range is from to 31 and every row sets in turn difference value as 5, 6, 6, 6, and 6, and the range is from to 31 The whole matrix called x-cross-shaped reference matrix composed of petal matrix, calyx matrix, and stamen matrix as shown in Fig 6.1 6.6 Payload Calculation Once information hiding needs to conduct in an unreliable environment, that the total volume of secret messages will be expected as much as possible during one transmission Each cover image’s payload depends on the resolution of the host image The steps of a calculating procedure for the secret message are the following: Step Extract a triple of consecutive cover pixels ( pi−1 , pi , pi+1 ), where i = 2, 5, , (W × H − (W × H mod 3) − 1) Convert a message S to a bit stream First, extract three bits from the secret string and embed the segment into the host image using pi by LSB substitution method, and update ls = ls + 3, where ls represents the length of the secret string which is going to be embedded into a cover image Relative to pi is a cover pixel, and then pi is a camouflaging pixel Step Calculate the difference values d1 = pi−1 − pi and d2 = pi+1 − pi , respectively Step Recognize M(d1 , d2 ) belonging to which part of the x-cross-matrix: If it belongs to the calyx area, then ls = ls + 2; if it belongs to the stamen part, ls = ls + 3; otherwise, ls = ls + 5, which means it belongs to the petal matrix Step Repeat from Steps to until all pixels in the cover image are completely processed Return the payload length ls Our scheme embeds a 3-bit sub-secret string to the LSB pixel of pi , and we also embed a ls -bit sub-secret string to the pair of difference values (d1 , d2 ) The binary value s is converted to its corresponding decimal value sd The length ls of to-be-embedded secret data s depends, on where the pair (d1 , d2 ) locates on the flow-shaped reference matrix 6.7 Embedding Procedure A secret message is embedded in a binary system into a host image During the procedure of embedding a secret, our scheme is efficient due to the embedding time less than 25 s with more than 2.6 bit per pixel (bpp) 6 A Data Hiding Approach Based on Reference-Affected Matrix 59 Step Extract a triple of consecutive cover pixels ( pi−1 , pi , pi+1 ), where i = 2, 5, , (W × H − (W × H mod 3) − 1) Step Embed three bits of secret message into the LSB of pi to generate a stegoimage pixel pi Then, compute d1 = pi−1 − pi , d2 = pi+1 − pi Step If the decimal secret sd is equal to M(d1 , d2 ), then keep d1 , d2 unchanged; otherwise, embed sd as the following rules: Case M(d1 , d2 ) belongs to the petal matrix, which means this pair of (d1 , d2 ) can carry five digits of secret message ranging from (00000)2 to (11111)2 While the sub-secret sd is unequal to M(d1 , d2 ), find the pair d1 , d2 which has the shortest distance with (d1 , d2 ) and is equal to sub-secret sd with the guidance of matrix x-cross Change (d1 , d2 ) to d1 , d2 later, according to d1 = pi−1 − pi , d2 = pi+1 − pi , to generate the stego-pixels: pi−1 and pi+1 Case M(d1 , d2 ) belongs to the stamen matrix, which means this pair of (d1 , d2 ) can carry three digits of secret message ranging from (000)2 to (111)2 While the sub-secret sd is unequal to M(d1 , d2 ), find the pair d1 , d2 that is equal to sub-secret sd with the guidance of matrix x-cross Change (d1 , d2 ) to d1 , d2 later, according to d1 = pi−1 − pi , d2 = pi+1 − pi , to generate the stego-pixels: pi−1 and pi+1 Case M(d1 , d2 ) belongs to the calyx matrix, which means this pair of (d1 , d2 ) can carry two digits of secret message ranging from (00)2 to (11)2 While sub-secret sd is unequal to M(d1 , d2 ), find the pair d1 , d2 that is equal to sub-secret sd with the guidance of matrix xcross Change (d1 , d2 ) to d1 , d2 later, according to d1 = pi−1 − pi , d2 = pi+1 − pi , to generate the stego-pixels: pi−1 and pi+1 So far, the triple of consecutive stego-pixels pi−1 , pi , pi+1 are generated Step Repeat Steps 1–4 until all secret messages are embedded We obtain the stego-image finally For example: Once embedding a secret digit “3” by the x-cross-shaped reference matrix, and a secret digit “7” by LSB substitution under the triple cover pixels ( pi−1 , pi , pi+1 ) = (79, 74, 82), the LSB substitution procedure changes the central pixel from 74 (1001010)2 to 79 (1001111)2 such that pi−1 , pi , pi+1 = (79, 79, 82) Then compute (d1 , d2 ) = (0, 3), and find M(0, 4) is 3, so that d1 , d2 = (0, 4), and finally change the stego-vector pi−1 , pi , pi+1 = (79, 79, 83) If we want to embed a secret digit “2” by the x-cross-shaped reference matrix, the procedure flowchart of calculating the length of the secret message 4, and a secret digit “5” by LSB substitution under the triple cover pixels ( pi−1 , pi , pi+1 ) = (77, 74, 77), the embedding procedure first has pi−1 , pi , pi+1 = (77, 77, 77), next compute (d1 , d2 ) = (0, 0), and last d1 , d2 = (−1, 1) Therefore, the triple stego-pixels are pi−1 , pi , pi+1 = (78, 77, 76) If embedding a secret digit “14” 60 T.-T Nguyen et al the x-cross-shaped reference, and a secret digit “7” by LSB substitution under the triple cover pixels ( pi−1 , pi , pi+1 ) = (49, 45, 50), apply LSB procedure to change pi−1 , pi , pi+1 = (49, 47, 50) and compute (d1 , d2 ) = (2, 3), so that d1 , d2 = (3, 4) At last, the triple stego-pixels are pi−1 , pi , pi+1 = (50, 47, 51) 6.8 Secret Extraction Procedure First, select the triple of consecutive stego-pixels pi−1 , pi , pi+1 , from a stegoimage The secret data can be obtained from the three least-significant bits of pi Second, compute d1 = pi−1 − pi and d2 = pi+1 − pi Based on the location indication of the two values d1 , d2 on the x-cross-shaped reference matrix, M d1 , d2 is the secret data Whole secret message could be archived by repeating to process the secret extraction procedure Assume pi−1 , pi , pi+1 from a stego-image is (83, 79, 79) According to the extraction procedure, we can extract secret “7” (111)2 from pi and “3” (11)2 from d1 , d2 , respectively What about the triples pi−1 , pi , pi+1 = (78, 77, 76)? Secret data “5” (101)2 and “2” (101)2 can be extracted from pi and d1 , d2 , respectively Let us look at what the secret message will be extracted from the pi−1 , pi , pi+1 = (51, 47, 50), which are “7” (111)2 from pi = 47 and “14” from d1 , d2 = (4, 3) 6.9 Experimental Result Two measuring parameters are used in the experiment to quantify the performance of the proposed method included: the embedding capacity (EC) and peak signal-tonoise ratio (PSNR) EC is the number of secret data embedded in a test image, and PSNR is a kind of objective criteria for the evaluation of the image (greater PSNR is the better quality of the image) PSNR = 10 log10 MSE = H ×W H 2552 MSE (6.6) W pi, j − pi, j (6.7) i=1 j=1 where H and W represent the height and width of the cover image, respectively, pi, j represents the original cover pixels, and pi, j represents the camouflage image pixels, respectively The process of embedding payload and image quality is as follows: First, divide each test image into × nonoverlapping blocks Second, calculate the block standard deviations Third, use the histogram to present the relationship between the standard deviation and the number of blocks 6 A Data Hiding Approach Based on Reference-Affected Matrix 61 Table 6.1 shows a comparison of the experimental results of embedding secret information into two categories of the image Apparently, the smooth regions are more suitable for embedding secret information due to the smaller difference between the pixel values Figure 6.2 shows the calculation of the block standard deviations for images that use six 512 × 512 grayscale test images The category of smooth images has the block standard deviations that are mostly around 0s The category of complex images has variances block standard deviations are hardly around over Table 6.2 shows the comparison of results of the experiments of the proposed scheme with the turtle-shaped scheme [8] and the regular-octagon scheme [10] Obviously, the performance of the proposed scheme provides outstandingly the results Figure 6.3 compares the original image of bridge with its camouflage one that has low PSNR of 38.1356(dB) Though the image ofbridge is classified as a complex image, with human being’s eyes is difficult to recognize the difference between the original image and the stego-image Table 6.1 Smooth images and complex images PSNR and payload Images Smooth images Images Complex images PSNR (dB) EC (bpp) Lena 40.3699 PSNR (dB) EC (bpp) 2.6023 Baboon 38.1357 2.6403 Peppers Elaine 40.3431 2.6214 Bridge 38.7694 2.6173 40.4183 2.6379 Land 38.7092 2.5935 Fig 6.2 Calculation of the block standard deviations for smooth and complex images 62 T.-T Nguyen et al Table 6.2 Comparison of the proposed scheme with the turtle-shaped scheme and the regularoctagon scheme Name The proposed scheme Turtle-shaped scheme [8] Regular-octagon scheme [10] PSNR (dB) EC (bpp) PSNR (dB) EC (bpp) PSNR (dB) EC (bpp) Lena 40.3699 2.6134 49.42 1.5 43.0017 2.5 Peppers 40.3531 2.6211 49.40 1.5 42.9873 2.5 Elaine 40.3879 2.6037 49.40 1.5 43.0069 2.5 Baboon 38.1356 2.6402 49.39 1.5 NA NA Bridge 40.3774 2.6022 49.42 1.5 NA NA Land 40.4181 2.6379 49.41 1.5 49.25 1.5 Fig 6.3 Original image and stego-image based on bridge Figure 6.4 shows the histograms of six 512 × 512 grayscale test images for identifying image types The experimental results of embedding payload and image quality demonstrate that the proposed method is a competitor of embedding secret data scheme 6.10 Conclusion In this paper, we proposed a new scheme of embedding secrets information to solve the issues of low distortion and high embedding capacity in the embedded secret data in media The guidance of the x-cross-shaped reference-affected matrix was applied for embedding capacity in transferring more secret messages Adjacent pixels in a large area of the matrix with similar values can utilize for manipulating data A Data Hiding Approach Based on Reference-Affected Matrix 63 Fig 6.4 Histograms of six 512 × 512 grayscale test images for identifying image types embedding and extracting on a difference–coordinate plan instead of the traditional pixel–coordinate plan We combined three parts including petal matrix, calyx matrix, and stamen matrix for secret embedding data with the x-cross-shaped reference matrix The experimental results compared with the previous methods show that the proposed scheme brings outstanding both the payloads with good visual quality References Jayaram, P., Ranganatha, H.R., Anupama, H.S.: Information hiding using audio steganography—a survey Int J Multimed Appl 3, 86–96 (2011) Li, B., He, J., Huang, J., Qing Shi, Y.: A survey on image steganography and steganalysis J Inf Hiding Multimed Signal Process 2, 142–172 (2011) Ngo, T.-G., Nguyen, T.-T., Ngo, Q.-T., Nguyen, D.-D., Chu, S.-C.: Similarity shape based on skeleton graph matching J Inf Hiding Multimed Signal Process 7, 1254–1264 (2016) Hu, Y.-C., Tsou, C.-C., Su, B.-H.: Grayscale image hiding based on modulus function and greedy method Fundam Inform 86 (2008) Yang, C.H.: Inverted pattern approach to improve image quality of information hiding by LSB substitution Pattern Recognit 41, 2674–2683 (2008) Boopathy, R., Ramakrishnan, M., Victor, S.P.: Modified LSB method using new cryptographic algorithm for steganography In: Advances in Intelligent Systems and Computing, pp 591–600 (2014) https://doi.org/10.1007/978-81-322-1602-5_63 64 T.-T Nguyen et al Zhang, X., Wang, S.: Efficient steganographic embedding by exploiting modification direction IEEE Commun Lett 10, 781–783 (2006) Liu, L., Chang, C.C., Wang, A.: Data hiding based on extended turtle shell matrix construction method Multimed Tools Appl 76, 12233–12250 (2017) https://doi.org/10.1007/s11042-0163624-7 Jin, Q., Li, Z., Chang, C.C., Wang, A., Liu, L.: Minimizing turtle-shell matrix based stego image distortion using particle swarm optimization Int J Netw Secur 19, 154–162 (2017) https://doi.org/10.6633/IJNS.201701.19(1).16 10 Kurup, S., Rodrigues, A., Bhise, A.: Data hiding scheme based on octagon shaped shell In: 2015 International Conference on Advances in Computing, Communications and Informatics, ICACCI 2015, pp 1982–1986 (2015) https://doi.org/10.1109/ICACCI.2015.7275908 11 Lin, L., Hongbing, J.: Signal feature extraction based on an improved EMD method Meas J Int Meas Confed 42, 796–803 (2009) ... brings a great payload with cover visual quality 6 A Data Hiding Approach Based on Reference- Affected Matrix 57 6.5 Matrix Construction Procedure A coordinate system (d1 , d2 ), where d1 and d2 range... similar values can utilize for manipulating data A Data Hiding Approach Based on Reference- Affected Matrix 63 Fig 6.4 Histograms of six 512 × 512 grayscale test images for identifying image types... secret data in media The guidance of the x-cross-shaped reference- affected matrix was applied for embedding capacity in transferring more secret messages Adjacent pixels in a large area of the matrix