Image hiding by optimal LSB substitution and genetic algorithm

Image hiding by optimal LSB substitution
and genetic algorithm
Author : Ran-Zan Wang, Chi-Fang Lin, Ja-Chen Lin
Source : Pattern Recognition 34(2001)671-683
Speaker : Phoenix Huang
Outline
1. The optimal LSB substitution ( the most right k bits)
2. The proposed genetic algorithm is near optimal
1.The image hiding by simple LSB substitution :
(a) Hiding data in the host image will make it easy to be detected.
(b) The quality of the host image after embedding may not be
acceptable
PSNR =
MSE =


2
10  log 2  1 /MSE
n
1 m
2


Z

h
 i i
m i 1
=

10 log 2552 /MSE

m : the image size of Z and H
2.Encryption :
E transform

 E
f x   k0  k1 x mod S
gcd k1S   1
two keys k0 , k1 ; Where S is image size of E 
f x  : pixel location of
x : pixel location of E 
example :
0
2
E
1
3
1
3
E 
2
0
E 
3.Optimal LSB substitution :
k
2
1
k bits : gray value 0,1,2,…,
There are a total of 2  ! Possible substitutions. (permutation)
Among them, having the largest PSNR is selected as the optimal
result.
k
Corollary : The worst MSE of the optimal substitution is identical to
half of the worst MSE of the simple substitution.
Example : 2 bits substitution (total of 4 | substitutions)
if
0
1
2
3
0 1 1
2 3 1
2 0 3
E 
1 2 3
3 0 3
2 1 2
R
1 3 3
2 0 3
2 1 0
E*
1 2 3
3 0 3
2 1 2
R
1
3
2
0
is optimal substitution
0 1 1
2 3 1
2 0 3
MSE 
22
9
Simple LSB substitution
1 3 3
2 0 3
2 1 0
MSE 
6
9
Optimal LSB substitution
3.Image hiding by genetic algorithm (GA) :
They develop a genetic algorithm is near optimal, and the
processing time is acceptable.
GA is mainly comprised of the following three operators :
(1) reproduction
(2) crossover (3) mutation
The process will repeat for many times until a predefined
requirement is satisfied, or a constant number of iterations is
exceeded.
Chromosome G in GA consist of
G = g 0 g1  g 2
k
1
i  j
ex :
G
0 1 2 3
1 3 0 2
g 0 g1 g 2 g 3
G = 1302
(2-bit)
2 k genes
:
Crossover :
two chromosomes
(一) Split
G1  P0 P1  P2 K 1 , G2  g 0 g1  g 2 K 1
G1 and G2 into left-hand side and right-hand side parts
with equal sizes.
(二) Replace their right-hand side parts with each other to get new.
G1  P0 P1  P2 k 1 1 g 2 k 1 g 2 k 1 1  g2 k 1
G2  g0 g1  g 2 k 1 1P2 k 1 P2 k 1 1  P2 k 1
(三) To be adjusted so that the validation of chromosome can be
achieved.
Example :
(a) two chromosomes G1 and G2
(b) new chromosomes G1 and G2 obtained by
crossover
adjustment
(c) the initial values of flags ( N:on , F:off )
(d) the status after the first pass of adjustment
(e) the status after the second pass of adjustment
Mutation :
Given Chromosome G  g 0 g1  g 2
K
1
,
Two genes of G are selected randomly and their
values are replaced with each other.
Example : G  01234567
(change 1 and 5 )
Mutation G  05234167
Conclusion
1.The size of the embedding data can be very large, and
the quality of the embedding result is not degraded
significantly.
2.The randomized process can make the embedding data
meaningless so the data can be protected well.
3.The embedding result utilizing the proposed genetic
algorithm is near optimal, and the processing time is
acceptable.