0% found this document useful (0 votes)
6 views7 pages

Data Hiding

The document discusses various data hiding techniques, specifically focusing on steganography methods such as pixel segmentation strategy and the hybrid GEMD algorithm, which enhance the embedding capacity of secret data within cover images. It outlines the embedding and extracting phases of these algorithms, providing detailed steps and examples for both processes. Additionally, it introduces a proposed developed GEMD algorithm that incorporates an improved pixel segmentation strategy to further optimize data hiding in grayscale and color images.

Uploaded by

ahmedmohey2040
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views7 pages

Data Hiding

The document discusses various data hiding techniques, specifically focusing on steganography methods such as pixel segmentation strategy and the hybrid GEMD algorithm, which enhance the embedding capacity of secret data within cover images. It outlines the embedding and extracting phases of these algorithms, providing detailed steps and examples for both processes. Additionally, it introduces a proposed developed GEMD algorithm that incorporates an improved pixel segmentation strategy to further optimize data hiding in grayscale and color images.

Uploaded by

ahmedmohey2040
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Data hiding (Steganography) Techniques

1- Pixel segmentation strategy


The embedding of secret data is performed on a pair of cover image pixels. With two
grayscale pixels, 16 bits can be segmented into four pieces as shown in Figure (1), which
are denoted as VCA1, VMA1, VCA2 and VMA2 respectively. The VCA1 and VCA2
represent the most significant bits of the first pixel and the second pixel of the cover image
respectively. The VMA1 and VMA2 represent the least significant bits of the first pixel and
the second pixel of the cover image respectively. The vector coordinate area (VCA) vector
is composed of VCA1 & VCA2 and has (8 – LVMA1) + (8 – LVMA2) bits where LVMA1 &
LVMA2 are the bit length of VMA1 & VMA2 respectively. The VMA vector is composed of
VMA1 & VMA2. For example, given a pixel-pair (p1, p2) = (192, 210)10 = (11000000,
11010010)2. If LVMA1 = 2 and LVMA2 = 1, then the VCA vector is (1100001101001)2 and
the VMA vector is (000)2.

Figure (1): Pixel-pair segmentation.

2- The hybrid GEMD algorithm


This algorithm is based on the GEMD algorithm and the pixel segmentation strategy
to enhance the embedding payload capacity of GEMD method. The hybrid GEMG
steganography algorithm based on PSS is shown in Figure (2).
Secret Text
(11001010…
…)
GEMD
Cover PSS Stego-
Embedding
image image
Algorithm

(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.

The steps of the hybrid GEMD embedding algorithm are as follow:


Inputs Cover image Ic and binary secret data stream S
Outputs Stego image Is
Step 1: Divide each block of k-pixels (p1, p2,…, pk) of the cover image into two areas,
VCA and VMA, and determine the value LVMA.
Step 2: Calculate "n" for generating vector of coordinates, i.e., n = (LVMA–1).
Step 3: Allocate the VCA vector according to n, and generate n vectors denoted as
(g1, g2, … , gn).
Step 4: Apply the embedding function t = f(g1, g2,…, gn), calculated by Equation
below.
n 
f ( g1 , g 2 ,...., g n ) =   g i  (2i − 1)  mod(2 n +1 )
 i =1 
Step 5: Calculate the difference value d = (s – t).
Step 6: Transform d into binary and Fill it in VMA.
Step 7: Reconstruct stego k-pixels (p′1, p′2,…, p′k) by returning blocks back to
original position.

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).

The steps of the hybrid GEMD extracting algorithm are as follow:


Inputs Stego-image Is
Outputs Secret data stream S
Step 1: For each block, divide the k-pixels (p'1, p'2,…, p'k) of the stego-image into
two areas, VCA and VMA.
Step 2: Determine the value LVMA.
Step 3: Calculate n = (LVMA – 1), for generating vector of coordinates.
Step 4: Allocate the VCA vector according to n, and generate n vectors denoted as
(g1, g2, … , gn).
Step 5: Compute (g′1, g′2, … , g′n) from (g1, g2, … , gn) using VMA by following
the GEMD method.
Step 6: Calculate the secret data s = f(g′1, g′2, … , g′n) and convert it into binary.
Step 7: Concatenate s from each block to recover the original secret data S.

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.

Table (1): The Pixel modified quality depending on "d".

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

3- The proposed developed GEMD steganography algorithm


The proposed algorithm is based on developed GEMD algorithm and an improved
pixel segmentation strategy (improved PSS). The improved PSS is shown in Figure (3).

Figure (3): Improved pixel-pair segmentation.

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).

The steps of the proposed extracting algorithm are summarized as follow:


Inputs Stego-image Is
Outputs Secret data stream S
Step 1: Divide each pixel-pair (p'1, p'2) of the stego-image into two; VCA vector, IB
bit and VMA vector.
Step 2: Determine the value LVMA.
Step 3: Calculate n = (LVMA – 1), for generating vector of coordinates.
Step 4: Assign the VCA vector and generate (g1, g2, … , gn).
Step 5: Compute (g′1, g′2, … , g′n) from (g1, g2, … , gn) using VMA following the
GEMD method.
Step 6: Calculate the secret data s = f(g′1, g′2, … , g′n) and convert it into binary.
Step 7: Concatenate s from each block to recover the original secret data S.
Step 8: Concatenate the secret data "s" to obtain the embedded secret data stream S.

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.

You might also like