Data Hiding in binary images using block parity Group ID -17 Guided by Mr. Pramod Ganjewar By – Sipendra Sinha Deepak Kumar Rohit Singh Amol Gaikwad Snehal Darade
Outline Introduction Algorithm Embedding Algorithm Extraction Algorithm Checking visibility due to bit changed Binary File specifications Implementation Details and Result Applications Conclusion
Algorithm Partitioned block Calculating characteristic value Data retrieving Data hiding Partitioned block Calculating characteristic value Secret data Original image Stego- image Stego- image Secret data Flow for data hiding and retrieving
Checking visibility of change
Binary File Specifications PBM or Portable Bitmap is used. Binary format is used as it uses 1 bit per pixel..
Embedding Algorithm Step 1:Divide the cover image into blocks of 5 X 5
Embedding Algorithm Step 2: For each block, except single-value black and white ones, proceed as follows: 1. X-OR all 4 rows and 4 columns. r1=1 c1=0 r2=0 c2=0 r3=0 c3=1 r4=0 c4=1
Embedding Algorithm 2. X-OR the results in 1 and 2 to get s1,s2,s3,s4 where s1=r1 ⊕ c1, s2=r2 ⊕ c2, and so on. s1= r1 ⊕ c1= 0 ⊕ 1=1 s2= r2 ⊕ c2= 0 ⊕ 0=0 s3= r3 ⊕ c3= 0 ⊕ 1=1 s4= r4 ⊕ c4= 0 ⊕ 1=1
Embedding Algorithm 3. Compare the result obtained from 3 with the four embedded bits b1b2b3b4. If there is no difference, no change of bits in F is needed, otherwise, consider the following cases: a)If the difference in one bit bi, the bit [F] i,5 or [F]5,i should be changed. b)else if difference in two bits bi and bj, then the bit [F] i,j or [F]j,i should be changed..
c)else if difference in three bits bi, bj and bk, then the bits (( [F] I,j or [F] j,i) and ( [F]k,5 or [F]5,k)) or (( [F] i,5 or [F] 5,i) and ( [F] k,j or [F] j,k)) or (( [F] 5,j or [F] j,5) and ( [F] k,i or [F] I,k)) should be changed
d)else difference in four bits then (( [F] i,j or [F] j,i) and ( [F]k,m or [F]m,k)) or (( [F] i,m or [F] m,i) and ( [F]k,j or [F]j,k)) or (( [F] m,j or [F] j,m) and ( [F]k,i or [F]i,k)) should be changed
Embedding Algorithm 4. Here we have 3 bits difference, So third criteria is selected and Fi,j or Fk,5 are changed.
After hiding data in a 5*5 block is : Fig. Block image after hiding data
Extraction Algorithm IInput : Stego-Image Output : Secret message
The step envolve in the Extraction Algorithms are:- Step1: Divide the cover image into blocks (F) each of size 5×5. Fig.Stego-block
Step2: For each block, except single-value black and white ones, proceed as follows: 1.For every row in the first four rows of the block,exclusive-or all the bits of that row to get r1,r2,r3 and r4. 2.For every column in the first four columns of the block, exclusive-or all the bits of that column to get c1,c2,c3 and c4 is given bellow.
3.Exclusive-or the results in 1 and 2 to get the embedded bits s1,s2,s3,s4 where S1 = r1 XOR c1, S2 = r2 XOR c2, S3 = r3 XOR c3, S4 = r4 XOR c4. S1 = r1 XOR c1 = 0 XOR 0 = 0 S2 = r2 XOR c2 = 0 XOR 1 = 1 S3 = r3 XOR c3 = 1 XOR 1 = 0 S4 = r4 XOR c4 = 0 XOR 1 = 1
a) Embedded datab) Extracted data
Snapshot of Result 1 ASCII representation - Input image
E:\work\Java>java hiding --- Data Hiding bytes can be hidden Enter text string to be hidden : image23
2 ASCII representation –Output image
E:\work\Java>java extraction --- Data extraction --- image23 7 bytes of data successfully extracted !!
Implementation Details and Result Embedding E:\work\Java>java hiding --- Data Hiding bytes can be hidden Enter text string to be hidden : the quick brown fox jumped over the wolf 40 bytes of data successfully hidden !! Fig. Cover-image
No. of blocks in Binary image = No. of blocks available for hiding = 7236 Hiding capacity of 1 block = 4 bit Hiding capacity of given binary image = 7236/2 =3618 byte Hiding capacity of given image = 3.53 KB Hiding factor = =(7236/10404) X 100 = %
Extraction E:\work\Java>java extraction --- Data extraction --- the quick brown fox jumped over the wolf 40 bytes of data successfully extracted !! Fig. Stego-image
3 Comparison of original image with result Fig. 1 Cover-image Fig. 2 Stego-image
Applications FAX Adding captions to images Copyright protection of digital images (authentication) Image integrity protection (fraud detection) Covert Communication -To conceal the very presence of communication, to make the communication invisible.
Conclusion Using this method of hiding data in binary images,at max 2 bits are changed in a block of 5X5 for hiding 4 bit data in it.As only 12 XOR operations are needed for hiding and extraction of data,the computational time is very less. Binary images are used in sending FAX,so using scanning technique,data can be extracted from hard copy of images in FAX.
References Data Hiding In A Binary Image by Ahmed Al- Jaber and Khair Eddin Sabri Department of Computer Science King Abdullah II School for Information Technology (KASIT) University of Jordan N. Johnson and S. Jajodia, “Exploring steganography: seeing the unseen,” IEEE Computer, pp , February 1998.
QUESTIONS ?