Data Hiding
Data Hiding
(a)
Secret Text
(11001010……
)
Stego- GEMD
PSS Extracted
image Extracting
image
Algorithm
(b)
Figure (2): The hybrid GEMD steganography algorithm (a) Embedding Phase, and (b)
Extracting Phase.
Example (1):- Given the cover pixel-pair (p1, p2) = (190, 201). If LVMA1 = 1 and LVMA2 =
2, and secret data is s = (111)2. Using the hybrid GEMD data hiding techniques, find the
corresponding stego pixel-pair (p′1, p′2).
The Answer
Given (p1, p2) = (190, 201) = (10111110, 11001001)2. If LVMA1 = 1 and LVMA2 = 2, i.e LVMA
= 3, and secret data is s = (111)2. Therefore, the VCA vector is (1011111110010)2 and
VMA vector is (001)2.
Step 1: Compute n = LVMA – 1 = 3 – 1 = 2.
Step 2: Generate 2 vectors (g1, g2) = (1011111, 110010)2 = (95, 50)10.
Step 3: Compute t = f(g1, g2) = (1×95 + 3×50) mod (8) = 5.
Step 4: Calculate the difference value d = (s – t) = 7 – 5 = (2)10.
Step 5: Transform d into binary, d = (010)2, then fill d in VMA = (010)2.
Step 6: The stego pixel-pair will be (p′1, p′2) = (10111110, 11001010)2 = (190, 202)10.
So, the corresponding modified stego-image pixels (p'1, p'2) when the secret data s is
embedded are (190, 202).
Example (2):- Given the cover pixel-pair (p1, p2) = (192, 210). If LVMA1 = 2 and LVMA2 =
2, and secret data is s = (1010)2. Using the hybrid GEMD data hiding techniques, find
the corresponding stego pixel-pair (p′1, p′2).
The Answer
Given (p1, p2) = (192, 210) = (11000000, 11010010)2. If LVMA1 = 2 and LVMA2 = 2, i.e LVMA
= 4, and secret data is s = (1010)2. Therefore, the VCA vector is (110000110100)2 and
VMA vector is (0010)2.
Step 1: Compute n = LVMA – 1 = 4 – 1 = 3.
Step 2: Generate 3 vectors (g1, g2, g3) = (1100, 0011, 0100)2 = (12, 3, 4)10.
Step 3: Compute t = f(g1, g2, g3) = (1×12 + 3×3 + 7×4)mod (16) = 1.
Step 4: Calculate the difference value d = (s – t) = 10 – 1 = (9)10.
Step 5: Transform d into binary, d = (1001)2, then fill d in VMA = (1001)2.
Step 6: The stego pixel-pair will be (p′1, p′2) = (11000010, 11010001)2 = (194, 209)10.
So, the corresponding modified stego-image pixels (p'1, p'2) when the secret data s is
embedded are (194, 209).
Example (3):- Given the stego-pixel pair (p'1, p'2) = (158, 152)10 = (10011110, 10011000)2,
for a block, LVMA = 4 and n = LVMA – 1 = 3, then we can recover the secret data is (0101)2.
The Answer
Step 1: Assign the VCA evenly according to n = 3, and generate 3 vectors denoted as (g1,
g2, g3) = ((1001)2, (1110)2, (0110)2) = (9, 14, 6)10.
Step 2: Compute (g′1, g′2, g′3) = (10, 14, 7)10 from (g1, g2, g3) = (9, 14, 6)10 when VMA =
(1000)2 by following the GEMD method as shown in Table (1).
Step 3: Calculate the secret data s = f(g′1, g′2, g′3) = f(10, 14, 7) = (5)10.
Step 4: Convert decimal number (5)10 to binary (0101)2.
When d < 8
Binary (b4b3b2b1) 0000 0001 0010 0011 0100 0101 0110 0111
g'1 g1 g1+1 g1-1 g1 g1 g1+1 g1-1 g1
g'2 g2 g2 g2+1 g2+1 g2-1 g2-1 g2 g2
g'3 g3 g3 g3 g3 g3+1 g3+1 g3+1 g3+1
When d ≥ 8
Binary (b4b3b2b1) 1111 1110 1101 1100 1011 1010 1001 1000
2's complement 0001 0010 0011 0100 0101 0110 0111
g'1 g1-1 g1+1 g1 g1 g1-1 g1+1 g1 g1+1
g'2 g2 g2-1 g2-1 g2+1 g2+1 g2 g2 g2
g'3 g3 g3 g3 g3-1 g3-1 g3-1 g3-1 g3+1
The proposed algorithm can be applied on grayscale images as well as color images.
The proposed algorithm consists of two phases; an embedding phase and an extracting
phase. During the embedding phase, the proposed algorithm segments each block of pixels
of the cover image into; VCA vector, Indicator Bit (IB) and VMA vector. The improved
pixel segmentation strategy is the pixel segmentation strategy with indicator bit (PSS-IB).
The VCA vector is kept unchanged, the indicator bit (IB) is flipped if required and the
VMA vector is modified. During the extracting algorithm, the embedded data is extracted
from the pixels of the stego-image. The proposed developed GEMG steganography
algorithm based on PSS-IB is shown in Figure (3).
Secret Text
(11001010…
…)
GEMD
Cover Improved PSS Stego-
Embedding
image image
Algorithm
(a)
Secret Text
(11001010……
)
Stego- GEMD
Improved PSS Extracted
image Extracting
image
Algorithm
(b)
Figure (3): The proposed developed steganography algorithm (a) Embedding Phase, and
(b) Extracting Phase.
The secret text is hidden in the cover image by following the steps of the proposed
embedding algorithm to form the stego-image. At the receiver, the text can be extracted
from the stego-image without any information about the cover image by following the steps
of the proposed extracting algorithm.
The steps of the proposed embedding algorithm are summarized as follow:
Inputs Cover image Ic and binary secret data stream S
Outputs Stego image Is
Step 1: Divide each pixel-pair (p1, p2) of the cover image into; VCA vector, IB bit
and VMA vector.
Step 2: Determine the value LVMA.
Step 3: Calculate n = (LVMA – 1), to generate the vector of coordinates.
Step 4: Assign the VCA vector and generate (g1, g2, … , gn).
Step 5: Apply the embedding function t = f(g1, g2,…, gn), calculated by the following
n
f ( g1 , g 2 ,...., g n ) = g i (2i − 1) mod(2 n +1 )
i =1
Step 6: Calculate the difference value d = (s – t).
Step 7: Transform d into binary and Fill it in VMA.
Step 8: Reconstruct stego pixel-pair (p′1, p′2) by returning blocks back to original
positions.
Step 9: Flip the IB and check whether the stego pixel value (p′2) is closer to the
original value (p2) or not. If yes, the IB is flipped.
Example (4):- Given the pixel-pair (p1, p2) = (200, 187) = (11001000, 10111011)2. If
LVMA1 = 2 and LVMA2 = 2, i.e LVMA = 4, and secret data is s = (1101)2. Therefore, the VCA
vector will be (11001010111)2, the IB will be (0)2 and the VMA vector will be (0011)2.
Then, the stego pixel-pair (p′1, p′2) = (200, 186)10 as follows:
The Answer
Step 1: Compute n = LVMA – 1 = 3.
Step 2: Generate 3 vectors, (g1, g2, g3) = (1100, 1010, 111)2 = (12, 10, 7)10.
Step 3: Compute t = f(g1, g2, g3) = (1×12 + 3×10 + 7×7)mod (16) = (11)10.
Step 4: Calculate the difference value d = (s – t) = 13 – 11 = (2)10.
Step 5: Transform d into binary, d = (0010)2, then fill d in VMA = (0010)2.
Step 6: The stego pixel pair will be (11001000, 10111010)2 = (200, 186)10.
Step 7: Flip the IB, the stego pixel value (p′2) = (10111110) = (190)10. Here, there is
two values for p′2.
Step 8: Choose p′2 = 186, because it is closer to 187 than 190. So (p′1, p′2) = (200,
186)10.
So, the corresponding modified stego-image pixels (p'1, p'2) when the secret data s is
embedded are (200, 186).
Example (5):- Given the stego pixel-pair (p'1, p'2) = (200, 186)10 = (11001000, 10111010)2,
for a block, LVMA = 4. Therefore, VCA = (11001010111)2, IB = (0)2 and VMA = (0010)2,
n = LVMA – 1 = 3. Then, the secret data is recovered, s = (1101)2 as follows:
The Answer
Step 1: Assign the VCA vector, generate 3 vectors (g1, g2, g3) = ((1100)2, (1010)2,
(111)2) = (12, 10, 7)10.
Step 2: Compute (g′1, g′2, g′3) = (11, 11, 7)10 from (g1, g2, g3) = (12, 10, 7)10 when VMA
= (0010)2 by following the GEMD method as shown in Table (1).
Step 3: Calculate the secret data s = f(g′1, g′2, g′3) = f(11, 11, 7) = (13)10.
Step 4: Convert decimal number (13)10 to binary (1101)2.