mcms2003
TRANSCRIPT
-
7/30/2019 mcms2003
1/8
Data Hiding In A Binary Image
Ahmed Al-Jaber and Khair Eddin SabriDepartment of Computer Science
King Abdullah II School for Information Technology (KASIT)
University of Jordan
Email: [email protected], [email protected]
Abstract
In this paper, a new algorithm based on the CPT-algorithm [1] has been proposed for data hiding in
a binary image. This technique does not need any key for embedding and extracting data. Also, it
allows hiding four bits in a block of size 55 by changing a maximum of two bits. The proposed
algorithm ensures security and the hiding effect is quite invisible. A comparison with the CPT
algorithm is also described.
Keywords:steganography, watermarking, binary images, security, data hiding.
1. Introduction
The security of digital media becomes of major concern due to its emergencies and wide spread.
The security of the transformation of hidden data can be achieved by two ways: encryption and
steganography. A combination of the two techniques can be used to further increase the security of
data. In encryption, the message is changed so that no data can be disclosed if received by an
attacker [2]. While in steganography, the secret message is embedded into an image (or any media)
called cover image, and then sent to the receiver who extracts the secret message from the cover
message [3]. After embedding the secret message, the cover image is called a stego-image. This
image should not be distinguishable from the cover image, so that the attacker cant discover any
embedded message.
There are many techniques for encrypting data [2], which vary in their security, robustness,
performance and so on. Also, there are many ways for embedding a message into another one. The
most popular one is embedding a message into a colored image using LSB [4]. This method hides
the data in the least significant bit of each pixel in the cover image. However, there are other known
methods for hiding messages [4,5,6,7]. In the proposed scheme, the binary (black and white) image
is used for hiding the secret message. Hiding in a binary image is very difficult due to the fact that
-
7/30/2019 mcms2003
2/8
changing one bit in a binary image is easy to detect as it changes the color from black to white or
the opposite. However, there are many techniques for a hiding a message in a binary image [1,8,9].
This paper presents a new scheme for embedding four bits in 5 5 block in a binary image by
changing at most two bits with an efficient and invisible way without using a key.
Finally, it should be noted that steganography is different from watermarking technique [10].
Watermarking is not used to transmit a secret message but to embed data, which might be visible, to
guarantee ownership. The rest of the paper presents the CPT algorithm in the 2nd
section, the
proposed method in the 3rd
section, experimental results in the 4th
section, and the conclusion in the
5th
section.
2. Review of an Existing SchemeThe CPT-algorithm[1] is a well-known algorithm applied on a binary cover image to hide data. This
algorithm is designed to embed at most log(mn+1) bits of the secret message in a m n block by
changing a maximum of two bits. Before discussing the algorithm, the following notations are
defined:
K: Secret key used to embed and extract the message. It has a size of m n, and contains 0
& 1.
W: Weight matrix also used in embedding and extracting the message. Its size is m n and
its numbers range from 1 to 2r
1.
r: Number of bits embedded in one block.
F: Covered image used to hide data.
The Embedded Algorithm
Input: Cover image (F), secret key (K), weight matrix (W) and secret message.
Output: Stego-image.
Step1:Divide F into blocks (Fi), each of size m n.
Step2:Determine the size ofr where r log(mn+1)
Step3:Perform the following steps for each Fi until the whole secret message is embedded:
a) Find (Fi K) W
b) Find the sum (s) of the matrix obtained by the previous step.
c) Find s mod m where m=2r
d) Get the sequence of bits from the secret message.
e) Compare the values obtained from c and d: if they are equal, no action is required,
else, one or two bits in Fi should be changed to make the values equal.
-
7/30/2019 mcms2003
3/8
The Extracted Algorithm
Input: Stego-image, secret key (K) and weight matrix (W).
Output: Secret message.
Step1: Divide F into blocks (Fi), each of size mn.
Step2: Determine the size ofr.
Step3: Perform the following steps for each Fi until the whole secret message is extracted:
a) Find (Fi K) W
b) Find the sum (s) of the matrix obtained by the previous step.
c) Find s mod m where m=2r. The result is r bits of the secret message.
However, the CPT algorithm can embed 4 bits in a 5 5 block using a secret key and a weightmatrix. The proposed algorithm takes a fixed block size 5 5 that can embed 4 bits by changing a
maximum of 2 bits as in the CPT algorithm without using a secret key or a weight matrix as
described in the following section.
3. Proposed Algorithm
This algorithm is based on dividing the cover image into blocks, each of size 5 5. In each block, 4
bits from the secret message can be embedded with changing at most two bits in the block.
Embedding Algorithm
Input: Cover image and secret message
Output: Stego-image.
Step1: Divide the cover image into blocks (F) each of size 5 5.
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 r1r2r3r4.
2. For every column in the first four columns of the block, exclusive-or all the bits of
that column to get c1c2c3c4.
3. Exclusive-or the results in 1 and 2 to get s1s2s3s4 where s1=r1 c1, s2=r2 c2, and so
on.
4. 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:
if the difference in one bit bi, the bit [F] i,5 or [F]5,i should be changed
-
7/30/2019 mcms2003
4/8
else if difference in two bits bi and bj,then the bit[F] i,j or [F]j,i should be changed.
else if difference in three bits bi, bjandbk,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,i or [F]j,k)) or
(( [F] 5,j or [F] j,5) and ( [F]k,i or [F]i,k))
should be changed
else (difference in four bits bi, bj, bkand bm)then the bits
(( [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,i or [F]j,k)) or
(( [F] m,j or [F] j,m) and ( [F]k,i or [F]i,k))
should be changed
The selection of the bit depends on the number of adjacent bits with the same value. The bit that has
the least number of adjacent bits is selected. This is because it has a minimum effect on the cover
image when it is changed.
Extracting Algorithm
Input: Stego-image
Output: Secret message
The algorithm used for extracting is similar to that used for embedding. It performs the following
steps to give the embedded data.
Step1:Divide the cover image into blocks (F) each of size 5 5.
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 r1r2r3r4.
2. For every column in the first four columns of the block, exclusive-or all the bits of
that column to get c1c2c3c4.
3. Exclusive-or the results in 1 and 2 to get the embedded bits s1s2s3s4 where s1=r1 c1,
s2=r2 c2, and so on.
-
7/30/2019 mcms2003
5/8
Example: Suppose that we have the following cover image:
1 1 1 1 1 1 0 0 1 0
1 1 0 0 0 1 0 1 0 1
0 1 0 1 0 0 0 0 0 0
1 0 1 0 0 1 1 0 1 0
1 1 1 1 1 1 1 0 0 0
and the embedded data: 11100101
Applying the step For every row in the first four rows of the block, exclusive-or all the bits of that
row to get r1r2r3r4 on the given block,the following result is obtained:
1 1 1 1 1 = 1 1 1 0 0 0 = 0 0 1 0 1 0 = 0
1 0 1 0 0 = 0 The result is 1000
Applying the step For every column in the first four columns of the block, exclusive-or all the bits
of that column to get c1c2c3c4on the same block to get the following result:
1 1 0 1 1 = 0 1 1 1 0 1 = 0 1 0 0 1 1 = 1
1 0 1 0 1 = 1 The result is 0011
Applying the step Exclusive-or the results in 1 and 2 to get the embedded bits s1s2s3s4where s1=
r1 c1,s2=r2 c2, and so on on the same block to get the following result:
1 0 = 1 0 0 = 0 0 1 = 1 0 1 = 1
The result is 1011 and the embedded data is 1110.
As we can see, the bits number 2 and 4 in the result are different form those in the embedded data.
So there should be a change in either the bit [F]2,4 or [F]4,2. Considering its effect on the cover
image, the bit [F]4,2 should be changed. In the other block, if the same operation is repeated, the
following results are obtained:
r1r2r3r4 = 0101 c1c2c3c4 = 0010 s1s2s3s4 = 0111
The embedded data is 0101.
Therefore, the bit that should be changed is either [F]3,5or [F]5,3. Based on its effect on the cover
image, [F]5,3is to be changed.
-
7/30/2019 mcms2003
6/8
4. Experimental Results
The proposed algorithm together with the CPT algorithm have been applied on different images for
different data. The following computations were performed for each stego-image:
Similarity: Between the stego-image and the original image
Average: It is computed for each pixel depending on its neighbors. Then the average of
pixel average values is also computed to test the consistency between each pixel and its
neighbors.
Standard Deviation: Compute the average for each pixel depending on its neighbors, and
then compare it with the original image.
The result of these factors on Lena image is shown in figure 1, figure 2 and figure 3. Also, a stego-image generated using the proposed algorithm and the CPT algorithm is shown in figure 4.
A comparison of the proposed algorithm with the existing scheme shows that the proposed
algorithm gives a better performance of the average and standard deviation factors, although CPT
algorithm shows a better similarity factor.
.
.
.
Lena 128x128
0
2
4
6
8
10
12
0 50 100
character
STD
150
Proposed AlgorithmCPT Algorithm
Lena 128x128
98.2
98.4
98.6
98.8
99
99.2
99.4
99.6
99.8
100
0 50 100 150
Character
Similarity
Proposed Algorithm
CPT Algorithm
Lena 128x128
89.6
89.8
90
90.2
90.4
90.6
90.8
0 50 100 150
Character
Average
Proposed Algorithm
CPT Algorithm
Figure 3: Similarity comparison
between the proposed Algorithm
and CPT algorithm.
Figure 2:"Standard Deviation
comparison between proposed
algorithm and CPT algorithm.
Figure 1: Average comparison
between the proposed Algorithm
and CPT algorithm
-
7/30/2019 mcms2003
7/8
(a) (b) (c)
Figure 4: (a) The original image, (b) The proposed algorithm, (c) CPT algorithm
5. Conclusions
In this paper, a new technique has been proposed to hide data in a binary image. The used algorithm
is secure and the hidden information is quite invisible. The advantages of the proposed technique
are:
The new algorithm shows a better performance of both the average and standard deviations
between the original image and stego-image factors as we consider the neighbors of the
modified bit.
The new algorithm does not need a secret key, it needs only an agreement between the
embedding and extracting agents. Whereas this key is necessary for the CPT algorithm, and the
size of the key increases as the block size gets larger.
In CPT algorithm, the weight matrix is needed to perform the multiplication of the three
matrices to calculate the sum(S). This operation generates a large computational time. Whereas,
in the proposed algorithm such computational time does not exist.
A modification to this algorithm can be made to increase its security. For example, the block can be
chosen randomly rather than sequentially depending on a seed number. Also, the ignored row and
column of an order other than 5 can be changed so that the attacker cant get the message.
References
[1] Y. Chen, H. Pan, and Y. Tseng, A secure Data Hiding Scheme for Two-Color Images,
IEEE Symposium On Computers and Communications, 2000
[2] A. Menezes, P. Oorschot, S. Vanstone, Handbook of Applied Cryptography CRC Press,
1996.
[3] N. Johnson and S. Jajodia, Exploring steganography: seeing the unseen, IEEE Computer,
pp. 26-34, February 1998.
-
7/30/2019 mcms2003
8/8
[4] K. Stefan and A. Fabien Information hiding techniques for steganography and digital
watermarking, Artech House, 2000
[5] F. Petitcolas, R. Anderson and M. Kuhn Information Hiding, A Survey Proceedings of the
IEEE, special issue on protection of multimedia content, July 1999.[6] W. Bender, D. Gruhl, N. Morimoto, and A. Lu, Techniques for data hiding, IBM Systems
Journal, Vol. 35, No. 3 and 4, pp. 313-336, 1996.
[7] M. Celik, G. Sharma, and A. M. Tekalp, Reversible data hiding Proceeding IEEE ICIP,
Rochester, NY, Sept. 2002.
[8] M. Wu, E. Tang, B. Liu: "Data Hiding in Digital Binary Image", IEEE International
Conference on Multimedia & Expo (ICME'00), New York City, 2000.
[9]
M. Wu and J. Lee, "A Novel Data Embedding Method for Two-Color Facsimile Images",Proeeding of International Symposium on Multimedia Information Processing, Taiwan,
December 1998.
[10] C. Podilchuk and E. Delp, "Digital Watermarking: Algorithms and Applications," IEEE
Signal Processing Magazine, Vol. 18, pp. 33-46, 2001.