image authentication and tamper detection using fragile...

6
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET) Volume 6, Issue 7, July 2017, ISSN: 2278 1323 1058 All Rights Reserved © 2017 IJARCET AbstractIn this paper a fragile watermarking scheme based on adaptive embedding rules is proposed. The watermark embedding and detection rules are applied according to the characteristics of image blocks. In our algorithm we have used gray level variance of image blocks to distinguish it as smooth and unsmooth block. The discrete embedding rules are applied for smooth and unsmooth blocks to improve authentication of the image. In order to access the performance of the proposed scheme copy and paste attack has been applied to the watermarked images. Experimental results have been compared with Hsu and Tu’s [9] method and found significant increase in PSNR of the watermarked images and decrease in False negative rate and False positive rate. Index TermsFragile watermarking, Image authentication, Spatial domain, Tamper detection. I. INTRODUCTION Due to rapid growth of internet and digital technologies, the digital images can be easily shared across the globe. At the same time, the data shared can be easily manipulated with the help of image processing tools such as Photoshop. The ease and extent of such manipulations draw the attention to the need of image authentication. Therefore, verifying the integrity of digital images has become a crucial research topic. Image authentication can be implemented using digital signatures or digital watermarking. A digital signature is an encrypted or signed hash value of image contents. A digital signature can detect that an image is modified but its drawback is that it cannot locate the tampered regions. Digital watermarking enables not only identifying whether an image is tampered, but also locate the tampered part. Thus digital watermarking overcomes the limitation of digital signatures. Digital watermark based authentication scheme has two steps: the first is embedding of the watermark and the second is tamper detection. The digital watermarking scheme not only identify whether an image is tampered, but can also locate the tampered part. In digital watermarking fragile watermarking is used for the purpose of authentication of the images. Fragile watermarking can be applied in spatial domain or transform domain. In spatial domain the intensity values of the pixels are modified directly to embed the watermark. In case of the transform Manuscript received July, 2017. Yadwinder Kaur, Department of Computer Science, Punjabi University Patiala, India. Dr. Sukhjeet Kaur Ranade, Associate Professor, Department of Computer Science, Punjabi University Patiala, India. domain the transform coefficients of the image are modified to embed the watermark. We have chosen to work in spatial domain as it is easy to implement and its computational complexity is less. II. LITERATURE SURVEY The first fragile watermarking technique was proposed by Walton [1] in 1995 based on the use of the checksum which is calculated from the 7 most significant bits and embedded in the least significant bit. It has a limitation that one can change the image content by keeping the least significant bit unchanged and it cannot detect the tamper location. Yeung and Mintzer [2] proposed an algorithm to verify that an image is not modified by the use of an invisible watermark embedded into the image pixel values. The watermark extraction process extracts the embedded watermark from watermarked image using the verification key. The limitation of this technique is that watermark can be easily forged. Kailasanathan [3] proposed a modified version of the Yeung Mintzer scheme in order to prevent the two main attacks proposed for Yeung Mintzer method. Lee and Lin [4] proposed a scheme that uses the dual watermark for the purpose of the image tamper detection and recovery. In proposed scheme every block in the image contains watermark of further two blocks. For every non-overlapping block in the image there are two copies of watermark. Therefore there are two copies of watermark for the entire image and when first copy is destroyed the second watermark can be used. A secret key that is send along with the watermarked image is used to extract the watermark for tamper recovery purpose. Zhang and Wang [5] proposed a method based upon novel fragile watermarking which can recover the original image from the tampered image. In this scheme a watermark which consists of reference bits and check bits is embedded into the original image using data hiding method. In order to find the tampered image blocks the extracted bits can be compared with the calculated check bits. The disadvantage of this technique is that it cannot recover the tampered part if the tampered area is large. Rawat and Raman [6] discussed a novel chaos based watermarking algorithm for image authentication and . Image authentication and tamper detection using fragile watermarking in spatial domain Yadwinder Kaur, Dr. Sukhjeet Kaur Ranade

Upload: ngotu

Post on 20-Apr-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)

Volume 6, Issue 7, July 2017, ISSN: 2278 – 1323

1058 All Rights Reserved © 2017 IJARCET

Abstract— In this paper a fragile watermarking scheme

based on adaptive embedding rules is proposed. The

watermark embedding and detection rules are applied

according to the characteristics of image blocks. In our

algorithm we have used gray level variance of image blocks to

distinguish it as smooth and unsmooth block. The discrete

embedding rules are applied for smooth and unsmooth blocks

to improve authentication of the image. In order to access the

performance of the proposed scheme copy and paste attack has

been applied to the watermarked images. Experimental results

have been compared with Hsu and Tu’s [9] method and found

significant increase in PSNR of the watermarked images and

decrease in False negative rate and False positive rate.

Index Terms— Fragile watermarking, Image

authentication, Spatial domain, Tamper detection.

I. INTRODUCTION

Due to rapid growth of internet and digital technologies, the

digital images can be easily shared across the globe. At the

same time, the data shared can be easily manipulated with

the help of image processing tools such as Photoshop. The

ease and extent of such manipulations draw the attention to

the need of image authentication. Therefore, verifying the

integrity of digital images has become a crucial research

topic. Image authentication can be implemented using digital

signatures or digital watermarking. A digital signature is an

encrypted or signed hash value of image contents. A digital

signature can detect that an image is modified but its

drawback is that it cannot locate the tampered regions.

Digital watermarking enables not only identifying whether

an image is tampered, but also locate the tampered part.

Thus digital watermarking overcomes the limitation of

digital signatures. Digital watermark based authentication

scheme has two steps: the first is embedding of the

watermark and the second is tamper detection. The digital

watermarking scheme not only identify whether an image is

tampered, but can also locate the tampered part. In digital

watermarking fragile watermarking is used for the purpose of

authentication of the images. Fragile watermarking can be

applied in spatial domain or transform domain. In spatial

domain the intensity values of the pixels are modified

directly to embed the watermark. In case of the transform

Manuscript received July, 2017.

Yadwinder Kaur, Department of Computer Science, Punjabi University

Patiala, India.

Dr. Sukhjeet Kaur Ranade, Associate Professor, Department of Computer

Science, Punjabi University Patiala, India.

domain the transform coefficients of the image are modified

to embed the watermark. We have chosen to work in spatial

domain as it is easy to implement and its computational

complexity is less.

II. LITERATURE SURVEY

The first fragile watermarking technique was proposed by

Walton [1] in 1995 based on the use of the checksum which is

calculated from the 7 most significant bits and embedded in

the least significant bit. It has a limitation that one can

change the image content by keeping the least significant bit

unchanged and it cannot detect the tamper location.

Yeung and Mintzer [2] proposed an algorithm to verify that

an image is not modified by the use of an invisible watermark

embedded into the image pixel values. The watermark

extraction process extracts the embedded watermark from

watermarked image using the verification key. The

limitation of this technique is that watermark can be easily

forged.

Kailasanathan [3] proposed a modified version of the Yeung

Mintzer scheme in order to prevent the two main attacks

proposed for Yeung Mintzer method.

Lee and Lin [4] proposed a scheme that uses the dual

watermark for the purpose of the image tamper detection and

recovery. In proposed scheme every block in the image

contains watermark of further two blocks. For every

non-overlapping block in the image there are two copies of

watermark. Therefore there are two copies of watermark for

the entire image and when first copy is destroyed the second

watermark can be used. A secret key that is send along with

the watermarked image is used to extract the watermark for

tamper recovery purpose.

Zhang and Wang [5] proposed a method based upon novel

fragile watermarking which can recover the original image

from the tampered image. In this scheme a watermark which

consists of reference bits and check bits is embedded into the

original image using data hiding method. In order to find the

tampered image blocks the extracted bits can be compared

with the calculated check bits. The disadvantage of this

technique is that it cannot recover the tampered part if the

tampered area is large.

Rawat and Raman [6] discussed a novel chaos based

watermarking algorithm for image authentication and

.

Image authentication and tamper detection

using fragile watermarking in spatial domain

Yadwinder Kaur, Dr. Sukhjeet Kaur Ranade

International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)

Volume 6, Issue 7, July 2017, ISSN: 2278 – 1323

1059 All Rights Reserved © 2017 IJARCET

tamper detection. The proposed method can detect any

change made to the image and can also show the specific

locations that have been changed. Two chaotic maps are used

to improve the security of the proposed scheme. In this

scheme the initial values of the chaotic maps are used as

secret keys. In order to extract the right watermark the person

should have the correct keys. The scheme has two limitations

first the cat map that is

used to disarrange the host image is appropriate only for

square image. Second it cannot resist collage attack.

Teng et al [7] proposed the scheme that analyzed the security

of a chaotic system based fragile watermarking scheme for

image tamper detection proposed by Rawat and Raman

[6].The proposed method discussed some errors and

modification attacks against Rawat and Raman’s scheme.

The experimental results and theoretical analysis showed

that the fragile watermarking scheme of Rawat is not secure.

This method proposed an improved version in order to

improve the security of the existing technique. Performance

evaluation is carried out by performing the attacks such as cut

and paste attack, text addition and collage attack.

Caragata et al [8] proposed two attacks on Teng et al’s [7]

fragile watermarking scheme. The attacker can apply valid

watermarks on tampered images in both the cases, therefore

making the watermarking scheme useless. The first attack

uses the watermarked version of two chosen images, and the

second attack is a generalization of the first, uses a number of

arbitrary watermarked images. The paper also models the

cryptanalysis process for the second attack using Markov

chains in order to demonstrate that the necessary number of

images is relatively small for a high probability of successful

attack. All the results that are presented in this paper have

been confirmed by a practical implementation.

Hsu and Tu [9] proposed the scheme that uses the

smoothness to differentiate the types of image blocks and use

different watermark embedding, tamper detection, and

recovery schemes for different block types. The performance

of this scheme can be improved further by changing its

embedding rules and tamper detection procedure.

III. PROPOSED METHOD

In this work the embedding and tamper detection procedure

of the existing scheme [9] is modified in order to improve its

efficiency. In the proposed scheme the watermark embedding

rules are defined according to the characteristics of image

blocks. The gray level variance of image blocks is used to

distinguish it as smooth and unsmooth block. The spatial

domain layouts of non smooth and smooth small blocks are

shown in Fig.1 and Fig.2 respectively, where each row

represents eight bits b7, b6, . . ., b0 of a pixel. As is the

authentication information of a small block, Rs is the

recovery information of a small block, Rl is the recovery

information of a large block, Ms is the two bit information

obtained from the two most significant bits of the mean of

each small block.

b7 b 6 b 5 b 4 b 3 b 2 b 1 b 0

A

s

As

A

s

As

A

s

M

s

Rl M

s

Fig. 1 Watermark embedding rules for unsmooth small

blocks

b7 b 6 b 5 b 4 b 3 b 2 b 1 b 0

p0

p1

p2

p3

Fig. 2 Watermark embedding rules for smooth small blocks

The watermarking embedding and tamper detection

procedure is described in detail as follow:

Watermark embedding procedure:

1. Divide the entire image into k = M ×N/64 non-overlapping

large blocks of 8 × 8. Each large block consists of 16 small

blocks of 2×2. M and N are height and width of image

respectively.

2. Compute gray level variance of each large block and sort it

in descending order. The top⌊ (M ×N/)/ (64 × 3) ⌋ blocks are

non-smooth blocks and the remaining are smooth blocks.

3. Iterate for each large block

a) Compute the mean of the large block and convert it in the

binary form and then generate the 16 bit information by

producing combination of first four most significant bits four

times and then most significant bit. Embed these 16 bits in Rl

position of 16 small blocks.

b) Calculate the mean of each 2×2 non-smooth small block

and convert it into binary form. Embed the five most

significant bits of the mean in Rs position.

c) If the current block is the last block then proceed to step 4

else go to step 3 (a).

4. In order to minimize the difference between the

watermarked image and original image the following

equation is used as smoothing function.

(1)

where x’ is the value of the five most significant bits of

original pixel of the image, d is the difference between the

value of three least significant bits after a watermark is

embedded and value of three least significant bits of original

pixel of the image.

5. Input the secret key.

6. Iterate for each small blocks

Rs Rs As

Rs As As

Rs As M

s

Rs Rl M

s

p0

p1

p2

p3

International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)

Volume 6, Issue 7, July 2017, ISSN: 2278 – 1323

1060 All Rights Reserved © 2017 IJARCET

a) Compute Message Digest 5 [10] over the small block and

then apply the XOR over the message digest and secret key.

Fold the information to the 5 bits. If current block is smooth

block the embed the first four bits in the As position else

embed the five bits in As position.

b) Compute the mean of the small block and convert it into

the binary form. Embed the two most significant bits in Ms

position.

c) If current block is the last block then go to step 7 else go to

step 6(a).

7. Compute the performance parameters and return the

watermarked image.

Tamper detection procedure: The image tamper detection

model reverses the whole procedure of embedding and

verifies the embedding to recognize the tampered part. In our

scheme two level tamper detection is performed in order to

detect the tampered regions in the image.

1. Input the tampered image.

2. Divide the entire image into k = M ×N/64 non-overlapping

large blocks of 8 × 8. Each large block consists of 16 small

blocks of 2×2. M and N are height and width of image

respectively.

3. Compute gray level variance of each large block and sort it

in descending order. The top⌊ (M ×N)/ (64 × 3) ⌋ blocks are

non-smooth blocks and the remaining are smooth blocks.

4. Input the secret key used during the embedding process.

5. Initialize a binary image equal to the size of input image,

detectbinary.

6. Iterate for each small block

a) Compute Message Digest 5 [10]over the small block and

then apply the XOR over the message digest and secret key.

Fold the information to the 5 bits. If current block is smooth

block the compare the first four bits with the pre-embedded

information in the As position else compare the 5 bits with the

pre-embedded information in As position.

b) Compute the mean of the small block and convert it into

the binary form. Extract the two most significant bits of the

mean and compare it with the pre-embedded information in

Ms position.

c) If both the information does not match with pre-embedded

information then current 2×2 block is marked as invalid and

the corresponding pixels in detectbinary. are assigned the value

1 (i.e. white color to represent the tampered part).

d) If current block is the last block then go to step 7 else go to

step 6(a).

7. Return the detectbinary image mentioning the tampered

region and compute the performance parameters.

IV. EXPERIMENTATION AND RESULTS

All the experiments are performed in MATLAB 7.10.0

(R2010a) on a PC with 1.70 GHz Intel Core i3 CPU, 4 GB

RAM and 1 TB HDD under windows 8 environment. In

order to evaluate the performance of the proposed system

copy-move attack has been applied on the watermarked

images using the adobe Photoshop. All the images are of size

512×512 and are in tiff format. The performance evaluation

metrics used are Peak Signal to Noise Ratio (PSNR), False

negative rate (FNR), False positive rate (FPR), True positive

rate (TPR) and True negative rate (TNR).

PSNR is measured in decibels and is given by following

equation:

(2)

where MSE is mean square error and is given by:

(3)

where and represents the length and width of the two

dimensional image respectively

In order to measure the tamper detection accuracy FNR, FPR,

TPR and TNR are used.

False negative rate is the proportion of actual tampered pixels

that were erroneously reported as untampered pixels.

(4)

False positive rate is the proportion of actual untampered

pixels that were erroneously reported as tampered pixels.

(5)

True positive rate is the proportion of actual tampered pixels

that are reported as tampered pixels.

(6)

True negative rate is the proportion of actual untampered

pixels that were reported as untampered pixels.

(7)

where represents True Positive , represents False

Negative, represents False Positive and represents

True Negative.

True Positive means the number of pixels that are tampered

and judged as tampered. False Negative means the number of

pixels that are tampered but judged as untampered. False

Positive means the number of pixels that are untampered but

judged as tampered. True negative means the number of

pixels that are untampered and judged as untampered. Table I. PSNR, FPR, FNR, TPR, TNR of proposed scheme.

Image

name

PSNR

(dB) FPR FNR TNR TPR

Baboon 43.70 0.0035 0.0002 0.9965 0.9998

Barbara 43.84 0.0006 0.0002 0.9994 0.9998

Jet plane 44.47 0.0017 0.0004 0.9983 0.9996

Pirate 43.84 0.0011 0.0004 0.9989 0.9996

Pepper 43.82 0.0041 0.0003 0.9959 0.9997

Lena 43.92 0.0031 0.0014 0.9969 0.9986

Gold 43.77 0.0030 0.0007 0.9970 0.9993

Bridge 44.29 0.0006 0.0004 0.9994 0.9996

Couple 43.90 0.0027 0.0007 0.9973 0.9993

Zelda 43.78 0.0025 0.0007 0.9975 0.9993

Elaine 43.76 0.0018 0.0004 0.9982 0.9996

Sailboat 43.72 0.0020 0.0002 0.9980 0.9998

Average 43.90 0.0022 0.0005 0.9978 0.9995

International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)

Volume 6, Issue 7, July 2017, ISSN: 2278 – 1323

1061 All Rights Reserved © 2017 IJARCET

Table II. Comparison between experimental data of proposed

method and Hsu and Tu’s scheme [9].

(a) (b) (c) (d)

(e) (f) (g) (h)

( i) (j) (k) (l)

Fig. 3 Watermarked images (a) Baboon (b) Barb (c) Jet plane (d) Pirate (e) Pepper (f) Lena (g) Gold

(h) Bridge (i) Couple (j) Zelda (k) Elaine (l) Sailboat

(a) (b) ( c) (d)

(e) (f) (g) (h)

Method

PSNR

(dB) FPR FNR TNR TPR

Proposed 43.90 0.0022 0.0005 0.9978 0.9995

Hsu and

Tu’s 40.72 0.0047 0.0008 0.9953 0.9992

International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)

Volume 6, Issue 7, July 2017, ISSN: 2278 – 1323

1062 All Rights Reserved © 2017 IJARCET

(i) (j) (k) (l)

Fig. 4 Copy-move attack experiment (a) Baboon (b) Barb (c) Jet plane (d) Pirate (e) Pepper (f) Lena

(g) Gold (h) Bridge (i) Couple (j) Zelda (k) Elaine (l) Sailboat

(a) (b) (c) (d)

(e) (f) (g) (h)

(i ) (j) (k) (l)

Fig.5 Tamper detection results of copy move attacks (White zones are tampered zones).

V. CONCLUSION

In this paper fragile watermarking scheme based on

adaptive embedding is implemented. The experimental

results of PSNR show that the watermarked images have

high visual imperceptibility. Comparison results of Table

II show that our scheme outperforms the existing

technique by reducing false positive rate and false negative

rate and increasing the PSNR of watermarked images.

Future scope of this work includes extending this scheme

for authentication of color images.

ACKNOWLEGDEMENT

With profound gratitude and due regards , I whole

heartedly and sincerely acknowledge the efforts,

encouragement and proper guidance by Dr. Sukhjeet Kaur

Ranade Associate Professor, Department of Computer

Science, Punjabi University, Patiala .

REFERENCES [1] S. Walton, “Information authentication for a slippery new

age,” Dr. Dobbs Journal, 20.4(1995):18-26.

[2] M.M. Yeung and F. Mintzer, “An Invisible Watermarking

Technique for Image Verification", International

Conference on Image Processing, IEEE (1997).

[3] C. Kailasanathan,"Fragile watermark based on polarity of

pixel points." Image and Signal Processing and Analysis,

2003. Proceedings of the 3rd International Symposium on.

2(2003).

[4] T.Y. Lee and S. D. Lin, "Dual watermark for image tamper

detection and recovery." Pattern recognition 41.11 (2008):

3497-3506.

[5] X. Zhang and S. Wang, "Fragile watermarking with

error-free restoration capability." IEEE Transactions on

Multimedia 10.8 (2008): 1490-1499.

[6] S. Rawat and B. Raman, "A chaotic system based fragile

watermarking scheme for image tamper

detection." AEU-International Journal of Electronics and

Communications 65.10 (2011): 840-847.

International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)

Volume xx, Issue xx, Month 20xx, ISSN: 2278 – 1323

All Rights Reserved © 2017 IJARCET 1063

[7] L. Teng, X. Wang and X. Wang, "Cryptanalysis and

improvement of a chaotic system based fragile

watermarking scheme." AEU-International Journal of

Electronics and Communications 67.6 (2013): 540-547.

[8] D. Caragata, et al, "Cryptanalysis of an improved fragile

watermarking scheme." AEU-International Journal of

Electronics and Communications 70.6 (2016): 777-785.

[9] C.S. Hsu and S.F. Tu,"Image tamper detection and recovery

using adaptive embedding rules." Measurement 88 (2016):

287-296.

[10] R. Rivest, RFC1321: The MD5 message-digest algorithm,

RFC Editor,United States, 1992.

Yadwinder Kaur is a student of M.Tech (CSE) in

Department of Computer Science, Punjabi University, Patiala

carrying out her research work under the guidance of Dr.

Sukhjeet Kaur Ranade. Her main research interest is digital

watermarking.

Dr. Sukhjeet Kaur Ranade is presently serving

as Associate Professor in Department of Computer Science,

Punjabi University, Patiala. Her key research areas are image

processing and information hiding. She has published more than

50 papers in various journals and conferences of international

and national repute.