Steganography Using LSB Substitution and Pixel Value Differencing

Steganography Using LSB Substitution and Pixel Value Differencing

DOI: 10.4018/978-1-5225-7516-0.ch005


This chapter describes four techniques that use both the principles of LSB substitution and pixel value differencing (PVD). These techniques use 1×3, 2×2, 2×3, and 3×3 size pixel blocks. In a block, LSB substitution is applied on one of the pixels, which is designated as the central pixel. Using the new value of this central pixel, pixel differences are computed with all its neighboring pixels. Based on these pixel value differences, embedding capacity is decided, and embedding is performed by addition and subtraction operations. The experimental results reveal that when the block size increases, the tolerance to RS analysis and pixel difference histogram (PDH) analysis also increases.
Chapter Preview

Steganography Using Lsb Substitution And Pvd In A Block

Khodaei and Faez’s LSB+PVD Technique

This technique was proposed by Khodaei & Faez (2012). The embedding procedure is mentioned in the following steps.

  • Step 1: The image is raster scanned and divided into 1×3 size non-overlapping blocks, Figure 1. The pixels are designated as 978-1-5225-7516-0.ch005.m01, 978-1-5225-7516-0.ch005.m02, and 978-1-5225-7516-0.ch005.m03.

Figure 1.

A pixel block

  • Step 2: In 978-1-5225-7516-0.ch005.m04 k-bit LSB substitution is applied, where k is chosen from the list {5, 6, 7, 8}. The new value of 978-1-5225-7516-0.ch005.m05 is 978-1-5225-7516-0.ch005.m06. Let L be the decimal value of the k LSBs of 978-1-5225-7516-0.ch005.m07 and S be the decimal value of k-data bits hidden in 978-1-5225-7516-0.ch005.m08. The 978-1-5225-7516-0.ch005.m09 value can be further optimized using Eq. (1), where d=L-S.


  • Step 3: Using 978-1-5225-7516-0.ch005.m11.the following two differences are calculated as in Eq. (2).


  • Step 4: The Table 1 is range table for variant-1 and Table 2 is range table for variant 2.

Table 1.
Range table of variant 1
Embedding length33344
Table 2.
Range table of variant 2
Range978-1-5225-7516-0.ch005.m19=[0,7]978-1-5225-7516-0.ch005.m20=[8,15]978-1-5225-7516-0.ch005.m21=[16,31]978-1-5225-7516-0.ch005.m22=[32,63]978-1-5225-7516-0.ch005.m23=[64, 255]
Embedding length33456
  • Step 5: The value 978-1-5225-7516-0.ch005.m24 falls into a range whose embedding length is 978-1-5225-7516-0.ch005.m25 and lower bound is 978-1-5225-7516-0.ch005.m26. Similarly, the value 978-1-5225-7516-0.ch005.m27 falls into a range whose embedding length is 978-1-5225-7516-0.ch005.m28 and lower bound is 978-1-5225-7516-0.ch005.m29.

  • Step 6: From the secret binary data stream 978-1-5225-7516-0.ch005.m30 bits of data is taken and converted to a decimal value 978-1-5225-7516-0.ch005.m31. Similarly, from the secret binary data stream 978-1-5225-7516-0.ch005.m32 bits of data is taken and converted to a decimal value 978-1-5225-7516-0.ch005.m33. Two new difference values 978-1-5225-7516-0.ch005.m34 and 978-1-5225-7516-0.ch005.m35 are computed as in Eq. (3).978-1-5225-7516-0.ch005.m36 + 978-1-5225-7516-0.ch005.m37, 978-1-5225-7516-0.ch005.m38 + 978-1-5225-7516-0.ch005.m39(3)

  • Step 7: Using 978-1-5225-7516-0.ch005.m40 and 978-1-5225-7516-0.ch005.m41 two new values for 978-1-5225-7516-0.ch005.m42 namely, 978-1-5225-7516-0.ch005.m43 and 978-1-5225-7516-0.ch005.m44.are calculated. Similarly, using 978-1-5225-7516-0.ch005.m45 and 978-1-5225-7516-0.ch005.m46 two new values for 978-1-5225-7516-0.ch005.m47 namely, 978-1-5225-7516-0.ch005.m48 and 978-1-5225-7516-0.ch005.m49 are calculated using Eq. (4).978-1-5225-7516-0.ch005.m50 = 978-1-5225-7516-0.ch005.m51 - 978-1-5225-7516-0.ch005.m52, 978-1-5225-7516-0.ch005.m53 = 978-1-5225-7516-0.ch005.m54 + 978-1-5225-7516-0.ch005.m55, 978-1-5225-7516-0.ch005.m56 = 978-1-5225-7516-0.ch005.m57 - 978-1-5225-7516-0.ch005.m58, 978-1-5225-7516-0.ch005.m59 = 978-1-5225-7516-0.ch005.m60 + 978-1-5225-7516-0.ch005.m61(4)

  • Step 8: Now the stego value of 978-1-5225-7516-0.ch005.m62, say 978-1-5225-7516-0.ch005.m63 is calculated using 978-1-5225-7516-0.ch005.m64 and 978-1-5225-7516-0.ch005.m65. Similarly, the stego value of978-1-5225-7516-0.ch005.m66, say 978-1-5225-7516-0.ch005.m67 is calculated using 978-1-5225-7516-0.ch005.m68 and 978-1-5225-7516-0.ch005.m69. This is done using Eq. (5) and Eq. (6).


Hence the stego block is represented in Figure 2.

Figure 2.

The stego-block


The extraction of secret embedded data can be done in the following manner. Suppose the stego-block is as shown in Figure 2 from which we have to extract the hidden data. The following steps are used.

  • Step 1: From the center pixel 978-1-5225-7516-0.ch005.m72, k-LSBs are extracted. The value k is one of the values in the list {5, 6, 7, 8} which was chosen during embedding.

  • Step 2: Using 978-1-5225-7516-0.ch005.m73 and 978-1-5225-7516-0.ch005.m74, the difference value 978-1-5225-7516-0.ch005.m75 is computed. Similarly, using 978-1-5225-7516-0.ch005.m76 and 978-1-5225-7516-0.ch005.m77, the difference value 978-1-5225-7516-0.ch005.m78 is computed as in Eq. (7).


  • Step 3: The difference 978-1-5225-7516-0.ch005.m81 belongs to a range whose lower bound is 978-1-5225-7516-0.ch005.m82 and embedding length is 978-1-5225-7516-0.ch005.m83. Similarly, the difference 978-1-5225-7516-0.ch005.m84 belongs to a range whose lower bound is 978-1-5225-7516-0.ch005.m85 and embedding length is 978-1-5225-7516-0.ch005.m86. Refer the range table.

  • Step 4: As in Eq. (8), using 978-1-5225-7516-0.ch005.m87 and 978-1-5225-7516-0.ch005.m88, calculate the decimal value 978-1-5225-7516-0.ch005.m89 and convert 978-1-5225-7516-0.ch005.m90 to 978-1-5225-7516-0.ch005.m91 binary bits. Similarly using 978-1-5225-7516-0.ch005.m92 and 978-1-5225-7516-0.ch005.m93, calculate the decimal value 978-1-5225-7516-0.ch005.m94 and convert 978-1-5225-7516-0.ch005.m95 to 978-1-5225-7516-0.ch005.m96 binary bits.978-1-5225-7516-0.ch005.m97 = 978-1-5225-7516-0.ch005.m98, 978-1-5225-7516-0.ch005.m99 = 978-1-5225-7516-0.ch005.m100(8)

Complete Chapter List

Search this Book: