Top Banner
STEGANOGRAPHY USING VISUAL CRYPTOGRAPHY AUTHORS PRATHEEK PRAVEEN KUMAR RUCHIR BHAGAT SHIKSHA SUVARNA
89

Steganography Using Visual Cryptography

Dec 28, 2015

Download

Documents

This work is authored by Pratheek Praveen Kumar along with Ruchir Bhgat and Shiksha Suvarna, all three Telecommunications Engineers.
The need for underwater wireless communications exists in applications such as remote control in off-shore oil industry, pollution monitoring in environmental systems, collection of scientific data recorded at ocean-bottom stations, speech transmission between divers, and mapping of the ocean floor for detection of objects, as well as for the discovery of new resources. Wireless underwater communications can be established by transmission of acoustic waves.
Underwater communications, which once were exclusively military, are extending into commercial fields. The possibility to maintain signal transmission, but eliminate physical connection of tethers, enables gathering of data from submerged instruments without human intervention, and unobstructed operation of unmanned or autonomous underwater vehicles (UUVs , AUVs).
Thas is a study of the technology.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Steganography Using Visual Cryptography

STEGANOGRAPHY USING

VISUAL CRYPTOGRAPHY

AUTHORS

PRATHEEK PRAVEEN KUMAR

RUCHIR BHAGAT

SHIKSHA SUVARNA

Page 2: Steganography Using Visual Cryptography

STEGANOGRAPHY

USING VISUAL

CRYPTOGRAPHY

AUTHORS

PRATHEEK PRAVEEN KUMAR

RUCHIR BHAGAT

SHIKSHA SUVARNA

Page 3: Steganography Using Visual Cryptography
Page 4: Steganography Using Visual Cryptography

iii

ACKNOWLEDGEMENT

We are deeply indebted to our project guide T.P. Mithun, Assistant Professor, for

his guidance, valuable suggestions, timely and kind help throughout the course of the project.

He stood as an inspiration throughout our project work and explained even the minute details

very patiently at various stages of the project.

We would also like to thank our HoD Dr. H.V. Kumaraswamy for giving us

strength, encouragement, guidance, and support to persevere throughout this project despite

many difficult obstacles.

We express our heartfelt gratitude to Professor K.N. Raja Rao, Advisor, for

immense support and encouragement provided.

We express our sincere thanks to respected Dr. B.S. Satyanarayana, Principal, for

providing us with inspiration, support and the required facilities.

Finally, we want to thank our parents for providing us mental and emotional support

throughout the project work. We also want to take this opportunity to thank our friends who

stood behind us as an inspiration and rendered their full service to help us complete the

project.

Page 5: Steganography Using Visual Cryptography

iv

ABSTRACT

Steganography and Visual Cryptography are gaining importance with time.

Steganography is the art of hiding the fact that communication is taking place, by hiding

information in other information like images, audios and videos. For hiding secret

information in images, there exists a large variety of steganographic techniques. Some are

more complex than others and all of them have their respective strengths and weaknesses.

Visual Cryptography is a new cryptography technique which is used to secure the images

using the secret sharing scheme.

The Least Significant Bit (LSB) method is used in this project for steganography. The

advantage of LSB is its simplicity to embed the bits of the message directly into the LSB

plane of cover-image. It results in stego-images that contain hidden data yet appear to be of

high visual fidelity. However, it is susceptible to RS steganalysis and therefore to make it

more robust and secure we use Visual Cryptography.

LSB method involves changing the least significant bit of the grayscale cover image

in accordance with the normalized version of the black and white message image. Later the

watermarked image undergoes visual cryptography using a threshold which divides it into

two shares and then they are distributed to the participants. One level of encryption is then

used to further secure the message. The decryption side just stacks the share images, thereby

getting the original image. The normalization of the message image to embed into the cover

image is carried out using the Arduino AtMega 328 board. The hard-coded message values

consisting of white(255) and black(0) are normalized in the Arduino board. The board then

sends the values back to the computer serially where the Matlab program accepts it and puts

it in the form of a matrix.

The performance of the proposed system is experimented by performing steganalysis

and conducting benchmarking tests for analysing the parameters like Peak Signal to Noise

Ratio (PSNR) and capacity. The PSNR and capacity values obtained from our method are

better than those obtained from other existing techniques.

Page 6: Steganography Using Visual Cryptography

v

TABLE OF CONTENTS

Chapter

No. Particulars Page No.

Certificate i

Declaration ii

Acknowledgement iii

Abstract iv

Table Of Contents v

List Of Figures vii

List Of Tables viii

List Of Abbreviations And Acronyms ix

1 INTRODUCTION 1

1.1 Definitions 3

1.2 Literature Survey 3

1.2.1 Need For Invisible Watermarking 4

1.2.2 Current State Challenges 5

1.2.3 The Solution 5

1.2.4 Rules Of Invisible Watermarking 7

1.2.5 Existing Systems 8

1.3 Motivation 12

1.4 Problem Statement 12

1.5 Objectives 12

1.6 Methodology 13

1.7 Organisation Of the report 13

2 THEORY AND FUNDAMENTALS 15

2.1 Lsb 15

2.1.1 Technique Basics 15

2.1.2 Data Rate 16

2.1.3 Robustness 17

2.1.4 Ease of detection/Extraction 18

2.1.5 Suitability for steganography or watermarking 18

2.1.6 Problems and possible Solutions 18

2.2 Correlation Based Technique 21

2.3 Frequency Domain Technique 22

2.4 Wavelet Watermarking Technique 24

2.5 Visual Cryptography 26

2.6 Chapter Summary 29

3 DESIGN 30

3.1 Software Requirement Specifications 30

3.1.1 Overall Description 31

3.1.1.1 Product Perspective 31

3.1.1.2 Product Function 31

Page 7: Steganography Using Visual Cryptography

vi

3.1.1.3 User Characteristics 32

3.1.2 Specific Requirements 32

3.1.2.1 Functional Requirements 32

3.1.2.2 Non-Functional Requirements 33

3.1.2.3 Software Requirements 33

3.1.3 Hardware Requirements 33

3.2 High Level Design 33

3.2.1 Design Considerations 34

3.2.1.1 Development Methods 34

3.2.1.2 Attacks On Watermark Image 35

3.2.1.3 Desirable Characteristics Of Invisible Watermarking 36

3.2.2 Architecture Strategies 36

3.2.3 System Architecture 37

3.2.4 Data Flow Diagrams 38

3.2.5 Structure Chart 39

3.3 Chapter Summary 40

4 IMPLEMENTATION 41

4.1 Implementation Requirements 41

4.1.1 Programming Language Selection 41

4.1.2 Platform Selection 42

4.2 Code Conventions 43

4.2.1 Naming Conventions 43

4.2.2 Method Names 44

4.2.3 Variable names 44

4.2.4 Comments 44

4.4 Chapter Summary 45

5 RESULTS 46

5.1 Test Environment 46

5.2 Software Testing 47

5.3 Testing Methodologies 47

5.4 Unit Testing 47

5.5 Integration Testing 52

5.6 System Testing 54

5.7 Comparison Table 58

5.8 Chapter Summary 58

6 CONCLUSION 59

6.1 Limitations Of Project 59

6.2 Future Enhancement 59

7 REFERENCES 61

8 APPENDIX

Page 8: Steganography Using Visual Cryptography

vii

Page 9: Steganography Using Visual Cryptography

ix

LIST OF ABREVIATIONS AND ACRONYMS

ASCII – American Standard Code for Information Interchange

CDMA- Code Division Multiple Access

DAMS- Digital Asset Management Systems

DCT – Discrete Cosine Transform

DFD-Data Flow Diagram

DWT – Discrete Wavelet Transform

EVC – Extended Visual Cryptography

FFT- Fast Fourier Transform

GUI- Graphical User Interface

HVS- Human Visual System

JPEG-Joint Photographic Experts’ Group

LSB- Least Significant Bit

MPEG-Moving Picture Experts’ Group

PN- Pseudo-random noise

PSNR- Peak Signal- to-Noise Ratio

SRS-Software Requirements Specification

VC- Visual Cryptography

VLSI-Very large Scale Integration

Page 10: Steganography Using Visual Cryptography
Page 11: Steganography Using Visual Cryptography
Page 12: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 1

CHAPTER 1

Introduction

Digital Watermarking is the process of irreversibly embedding information into a digital

signal. The signal may be audio, pictures or video. There are two types of Watermarking,

Visible Watermarking and Invisible Watermarking. In Visible Watermarking, the information

is visible in the picture or video. Typically, the information is text or a logo which identifies

the owner of the media. Example of Visible Watermark is when a television broadcaster adds

its logo to the corner of transmitted video. In Invisible Watermarking, information is added as

digital data to audio, picture or video, but it cannot be perceived as such (although it is

possible to detect the hidden information).

Digital Watermarking schemes are widely being used as potential solution for ownership

protection. The Watermarking algorithms in general, may be viewed as digital

communication scheme for imperceptible transmission of an auxiliary message through cover

image. Several software implementations of the proposed algorithms are available, but very

few attempts have been made for the property of robustness and they are not able to provide

the good visual Recovery Watermark Image (IWD) as user aspect. This is accomplished by

spreading one watermark bit over many samples of the Cover data using a modulated

spreading sequence.

The decoding process of the mentioned Invisible Robust Watermarking technique requires

the data recovery processes either the whole or some part of the Cover Image or at least some

information about the cover Image and sometimes watermarks information for the

verification purpose. An important application of Invisible Watermarking is to copyright

protection systems, which are intended to prevent or deter unauthorized copying of digital

media. Annotation of digital photographs with descriptive information is another application

of Invisible Watermarking. Figure 1.1(a), 1.1(b), 1.1(c) illustrates the paradigm for

Watermark Image, Visible Watermarked Image and Invisible Watermarked Image.

Page 13: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 2

Figure 1.1(a) Watermark Image

Figure 1.1 (a) shows a typical watermark image that is to be embedded into the cover image.

Figure 1.1(b) Visible Watermarked Image

Figure 1.1(c) Invisible Watermarked Image

Page 14: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 3

1.1 Definitions

Various terminologies related to this project have been explained in this section.

• Digital Watermarking: Digital Watermarking is the process of embedding information

into a digital signal.

• The Digital Image Processing: Digital Image Watermarking is the process that embeds

data called a Watermark object into a multimedia object such that the Watermark object

can be detected or extracted later to make an assertion about the object.

• Visible Watermarks: It is the type in which the locations in which the Watermark is

embedded are not secret.

• Invisible Watermarks: This is the type of Watermarking in which the Watermark image

and the locations in which the watermark is embedded are secret, only the authorized

persons extract the watermark.

• Cover Image: The image which encoded with the Watermark Image is called Cover

Image,

• Watermark Image: The image which embedded to the Cover Image is called Watermark

Image.

• Watermarked Image: The Cover Image is encoded with the Watermark Image to obtain

Watermarked Image.

1.2 Literature Survey

The purpose of this literature survey is to provide background information on the issues to be

considered in this thesis and to emphasize the relevance of the present study. In this section,

the need for Invisible Robust Watermarking, challenges in designing and the solution for it

has been discussed. The proposed system has been explained in brief. Figure 1.2 illustrates

the Invisible Robust Watermarking. The new image is created by innovation, research or

experience. This image is captured and stored, then the cover image and watermark image is

first Watermarking and encoding, while decoding it decode the Recovery Watermarked

Image and check the Performance Estimate and Analysis of the proposed system.

Page 15: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 4

1.2.1 Need for Invisible Watermarking

The Invisible Watermarking is a type where the locations of the Watermark Image are

embedded is secret, only the authorized persons extract the watermark. The needs of Invisible

Watermarking are:

• Ownership Protection

In the ownership protection applications, a Watermarked Image containing ownership

information is embedded to the multimedia host signal.

• Proof of ownership

It is even more demanding to use Watermarking not only in the identification of the copyright

ownership, but as an actual proof of ownership. This kind of watermark detection is usually

called a blind detection.

• Fingerprinting

Additional data embedded by Watermarking in the fingerprinting applications are used to

trace the originator or recipients of a particular copy of multimedia file.

• Broadcast monitoring

A variety of applications for audio Watermarking are in the field of broadcasting

Watermarking is an obvious alternative method of coding identification information for an

active broadcast monitoring.

Figure 1.2 Invisible Watermarking Scheme

Page 16: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 5

1.2.2 Current State Challenges

This section focuses on the Challenges and Constraints in the current day scenario where

different teams are using watermarking environments. Everyday tons of data is embedded on

digital media or distributed over the internet. The data so distributed can easily be replicated

without error, putting the rights of their owners at risk. One way to discourage illegal

duplication is to insert information known as Watermark, into potentially vulnerable data in

such a way that it is impossible to separate the Watermark from the data. Digital Image

Watermarking is the process that embeds data called a Watermark into a multimedia object

such that the Watermark can be detected or extracted later to make an assertion about the

object.

1.2.3 The Solution

The proposed system defines various approaches for Invisible Digital Image Watermarking,

to secure the Cover Image by Watermarking techniques and to recover the Watermark if the

user is authorized. The various Watermarking techniques used are Least Significant Bit

Modification (LSB), Correlation-Based Technique in Spatial domain, Common Division

Multiple Access (CDMA), Discrete-Cosine-Transform (DCT) in Frequency domain and

Discrete Wavelet Transform (DWT) in Wavelet domain. The Cover Image is encoded with

the Watermark Image to obtain Watermarked Image using the approaches mentioned. Later

in decoding stage the Watermark Image is recovered if the user is authenticated.

Image steganography is an emerging field of research for secure data hiding and transmission

over networks. Hiding information by embedding secret data into an innocuous medium is

often referred to as steganography. Steganography can be applied electronically by taking a

message (a binary file) and some sort of cover (often a sound or image file) and combining

both to obtain a “stego-object”. The RS analysis is considered as one of the most famous

steganalysis algorithm which has the potential to detect the hidden message by the statistic

analysis of pixel values [1]. The process of RS steganalysis uses the regular and singular

groups as the considerations in order to estimate the correlation of pixels [2]. The presence of

robust correlation has been witness in the adjacent pixels. But unfortunately using traditional

LSB replacing steganography [3], the system renders the alteration in the proportion in

Page 17: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 6

singular and regular groups which exposes the presence of the steganography. Ultimately, it

will not be so hard to decrypt the secret message. Both steganography and visual

cryptography has been considered as a distinct topic for image security.

Although there are extensive researches based on combining these two approaches [4]

[5] [6], but the results are not so satisfactory with respect to RS analysis. Other conventional

methods of image security has witnessed the use of digital watermarking extensively, which

embeds another image inside an image, and then using it as a secret image [7]. The use of

steganography in combination with visual cryptography is a sturdy model and adds a lot of

challenges to identifying such hidden and encrypted data. Fundamentally, one could have a

secret image with confidential data which could be split up into various encrypted shares.

Finally when such encrypted shares are reassembled or decrypted to redesign the genuine

image it is possible for one to have an exposed image which yet consists of confidential data.

Such types of algorithms cannot persists without possessing appropriate characteristics in the

visual cryptography procedure. The ground for this is that if the rebuilding method or even

the encoding method changes the data exists in the image, then the system would accordingly

change the encrypted information which makes the system feasible for extracting the

encrypted data from the exposed image The steganalysis is the process to expose the

confidential message even certain uncertain media. There are various attacks reported on

Least Significant Bytes substitution of picture elements or bit planes [8][9]. Various

histogram as well as block effect has also been reported in the prior research work [10].

But certain RS steganalysis work has been reported as most concrete and appropriate

technique to other conventional substitution steganography [11], which uses regular and

singular groups as the elementary parameters to estimate the association of the pixels. In

order to prevent RS analysis, the impact on the association of the pixels will be required to be

compensated. Such types of compensation might be accomplished by adjusting other bit

planes. By doing such attempt, the implications towards security will be almost

computationally impossible. For such reason, various optimization algorithms can be

deployed employed in secure data hiding to identify the optimal embedding positions. The

main aim of the proposed model is to design a feasible RS resistance secure algorithm which

combines the use of both steganography and visual cryptography with the goals of improving

security, reliability, and efficiency for secret message.

Page 18: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 7

1.2.4 Rules of Invisible Watermarking

This section deals with different features of Invisible Watermarking domain; Watermarking

is very similar to steganography in a number of respects. Both seek to embed information

inside a cover message with little to no degradation of the cover-object. Watermarking

however adds the additional requirement of Robustness. An ideal steganographic system

would embed a large amount of information, perfectly securely with no visible degradation to

the cover object. An ideal Watermarking system however would embed an amount of

information that could not be removed or altered without making the cover object entirely

unusable. As a side effect of these different requirements, a Watermarking system will often

trade capacity and perhaps even some security for additional robustness. The different

features are:

• Perceptibility: A Watermarked Image is of no use to anyone if it distorts the cover

image, or even highly distracting [8].

• Robust: The ideal of Watermarking must also be highly entirely resistant to distortion

introduced during either normal use (unintentional attack), or a deliberate attempt to

disable or remove the watermark present (intentional, or malicious attack).

• Keys: Another property of an ideal watermarking is that it implement the use of keys to

ensure that the approach is not rendered useless the moment that the algorithm becomes

known [8].

• Capacity and Speed: These are slightly less important requirements of an ideal

watermarking. A watermarking system must allow for a useful amount of information to

be embedded into the image. This can range from a single bit all the way up to multiple

paragraphs of text.

• Statistical Imperceptibility: The last possible requirement of an ideal watermarking

system is that of statistical imperceptibility where the Watermarking algorithm must

modify the bits of the Cover in such a way that the Statistics of the Image are not

modified in any telltale fashion that may betray the presence of a Watermark [14].

Page 19: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 8

1.2.5 Existing Systems

First we start with a few definitions. Cryptography can be defined as the processing of

information into an unintelligible (encrypted) form for the purposes of secure transmission.

Through the use of a “key” the receiver can decode the encrypted message (decrypting) to

retrieve the original message. Stenography overcomes the problem of Cryptography by

hiding the information and image at the time of sending the object. The message m is

embedded into a harmless message c which is defined as the cover-object. The message m is

then embedded into c, generally with use of a key k that is defined as the stego-key. The

resulting message is then embedded into the cover-object c, which results in stego-object s.

Ideally the stego-object is indistinguishable from the original message c, appearing as if no

other information has been encoded [7]. This can all be seen below in figure 1.3.

Figure 1.3 Illustration of a Stegographic System

The Cover object is only used for the stego-object generation and is then discarded. The hope

of the system is that the stego-object will be close enough in appearance and statistics to the

original such that the presence of information will go undetected. The more difficult task is

providing metrics for perceptibility and robustness. Petitcolas as well as others suggest the

scheme listed below in table 1.1 for the evaluation of Perceptibility [14].

Ghascmi ct al.. [12] proposed a novel steganography scheme based on integer wavelet

transform and Genetic algorithm. Umamaheswari [13] compress the secret message and

encrypt it by the receiver’s public key along with the stego key and embed both messages in a

carrier using an embedding algorithm. Shyamalendu Kandar [14] proposed a technique of

Page 20: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 9

well known k-n secret sharing on color images using a variable length key with share division

using random number. Anupam [15] describes how such an even-odd encryption based on

ASCII value is applied and how encrypted message converting by using Gray code and

embedding with picture can secured the message and thus makes cryptanalyst’s job difficult.

To hide a binary image into two meaningful shares Chin-Chen Chang et al suggested patial-

domain image hiding schemes. These two secret shares are embedded into two gray level

cover images. To decode the hidden messages, embedding images can be superimposed.

Balancing the performance between pixel expansion and contrast Liguo Fang recommend a

(2, n) scheme based on combination. Threshold visual secret sharing schemes mixed XOR

and OR operation with reversing and based on binary linear error-correcting code was

suggested by Xiaoqing and Tan.

The disadvantage of the above schemes is that only one set of confidential messages can be

embedded, so to share large amounts of confidential messages several shares have to be

generated [15].

The secret images or text has been sent to the other party in such a way that if any Third

person or hacker gets the message then he/she cannot find out the original message. This

method is possible only when I use visual cryptography i.e. in this method I divide the image

in different shares such that seeing single piece of share no-one can understand what the

secret text is about. I can only get the final image when I stack all the shares or the threshold

that I have set for the shares to get the final image. But during dividing the share processes

their will be loss of contrast i.e. loss of some pixels due to which the final image will not be

as clear as the original image. But this method is useful for many applications such as in

Banks, Military etc [10].

This method can withstand various signal processing attacks, including lossy compression,

sharpen filtering, blur filtering and image cropping. Especially, it achieves robustness with

respect to the image rotation and image rescaling [17].

But the above method does not withstand the other types of attacks, such as additive noise,

denoising attacks, watermark removal and interference attacks, statistical averaging,

geometrical attacks [8].

Page 21: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 10

Visual cryptography technique is used to make the data secure. Here the original data is

divided into a number of shares which are sent through different communication channels

from sender to receiver. Therefore the intruder has less chance to get the whole information.

But still it is not so secured.

The main drawback of the algorithm is in its number of loops. For n=6, k=5 and a 32 bit pixel

with 50% ‘1’, number of loop operation required is 32. For n=6, k=4 with other conditions

same, number of loop operation required is 48. For n=6, k=3 with other conditions same,

number of loop operation required is 64 [20]. The experimental results show that the

reconstructed image will not be as clear as the original image [3].

Due to the nature of the traditional VC scheme, the size of the decoded image is unavoidably

larger than the original image. In the future, we will introduce a probability-based model to

solve this problem [18]. There are some flaws in the stated system. These flaws are as

follows:

1. Original image is of size MXN and the share is of size nXn. The size of the share changes

at each level. Thus easily identified as shares which requires some more information.

2. The second one is, two share blocks of a white secrete pixel are similar while share blocks

of black secret pixel are complementary. If pixels are black then it‘s ok but in case of white

pixel there an overhead of maintain redundant data of white pixels.

3. Original image is divided into number of shares. From figure we see that the outer pixels

are having less possible combinations of black and white pixels. Hence this system

manipulates pixels partially. Due to this the system may not gives exact output [2].

Table 1.1 Summary of Possible Perceptibility Assurance Levels

Level of Assurance Criteria

Low - Peak Signal-to-Noise Ratio (PSNR)

- Slightly perceptible but not annoying

Moderate - Metric Based on perceptual model

- Not perceptible using mass market equipment

Moderate High - Not perceptible in comparison with original under

studio conditions

High - Survives evaluation by large panel of persons under

the strictest of conditions.

Page 22: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 11

The only rigorously defined metric above is PSNR, shown below in equation 1. The main

reason for this is that no good rigorously defined metrics have been proposed that take the

effect of the Human Visual System (HVS) into account. PSNR is provided only to give us a

rough approximation of the quality of the Watermark. Further levels of evaluation rely

strictly on observation under varied conditions, as shown in table 1.1.

( )∑ −=

yx

yxyx

yx

PP

pXY

PSNRyx

,

2

,,

2

,

)

max ,

(1.1)

Where,

Px,y = Cover Image

Px,y = Watermarked Image

From this equation, we deduce that the higher the PSNR , the smaller the difference between

the two images which indicates that a higher PSNR is better.

In any watermarking or stenographic system the Watermarking is done by embed text strings

into an image. The drawback however to this approach is that ASCII text in which each letter

being represented with a certain pattern of bits. By compressing the watermark-object before

insertion, robustness suffers.

Due to the nature of ASCII codes, a single bit error due to an attack can entirely change the

meaning of that character, and thus the message. It would be quite easy for even a simple task

such as JPEG compression to reduce a copyright string to a random collection of characters.

Rather than characters, the image which is an already highly redundant form can be use for

Watermarking. Not only do images lend themselves to image watermarking applications, but

the properties of the HVS can easily be exploited in recognition of a degraded watermark is

shown in Figure 1.4 below:

Figure 1.4 Ideal Watermark image vs. Object with 25% Additive Gaussian Noise

Page 23: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 12

Note that despite the high number of errors made in watermark detection, the retrieved

watermark is still highly recognizable.

1.3. Motivation

Digital asset management systems (DAMS) generally handle media data in a compressed and

encrypted form. It is sometimes necessary to watermark these compressed encrypted media

items in the compressed-encrypted domain itself for tamper detection or ownership

declaration or copyright management purposes. It is a challenge to watermark these

compressed encrypted streams as the compression process would have packed the

information of raw media into a low number of bits and encryption would have randomized

the compressed bit stream. Attempting to watermark such a randomized bit stream can cause

a dramatic degradation of the media quality. Thus it is necessary to choose an encryption

scheme that is both secure and will allow watermarking in a predictable manner in the

compressed encrypted domain.

1.4 Problem statement

The purpose of the proposed algorithm is to secure the Cover Image, JPEG 2000, by

Watermarking technique and to recover the Watermark Image if the user is authorized.

Several parameters - Elapsed Processing Time (TE), Peak Signal to Noise Ratio (PSNR), and

Delay Processing Time (TD) are used to qualify the proposed approach, examining tests on

the resulted Watermarked image, finally illustrated by graphical representations. Thus the

proposed system uses Spread Spectrum technique of Watermarking to secure the Cover

Image and determines whether the proposed algorithm is secure, robust and recovers

Watermark Image with good perceivable quality with less time.

1.5 Objectives

The proposed approach of Watermarking Image in compressed-encrypted domain can be

applied for authentication as well as secured communication in real time environment,

copyright violation detection, proof of ownership or distributorship, media authentication.

Digital watermarking is relatively a new way of protecting intellectual property. Embedded

Page 24: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 13

watermark will allow identifying the owner of work. This concept is applicable to digital

video and audio also.

1.6 Methodology

The project is divided into two parts. The first part is called steganography where we use the

Least Significant Bit (LSB) technique to embed the message image in the cover image. The

LSB method involves changing the least significant bit of the greyscale cover image in

accordance to the black and white message image. The black and white message image is

initially normalized using a Arduino AtMega 328 board and then the pixel values are

communicated serially back to the computer where the MatLab program uses these

normalized values of the message image for creating a watermark. The watermark is then

embedded into the cover image in order to create an image called as the watermarked image.

The second part of the project is the visual cryptography part where the watermarked

image is divided into two shares based on the visual secret sharing scheme using a threshold.

The resultant two images are called as the stego images or shares. Each share then undergoes

encryption according to the RC4IM standard. This is done in order to prevent unauthorized

users from making sense of the unencrypted images. Then the encrypted shares are

decrypted, after which the watermark embedded in the LSB of the resultant image is

extracted to get the original image.

1.7 Organisation of the report

The project focuses on Invisible Image watermarking, where the main body of the project is

preceded by detailed table of contents including list of figures, tables, and glossary followed

by units used in the report which is followed by appendices which contains the screen shots

and explains some of the key technology elements and off the shelf components used in the

project. The body of the project also contains the Introduction to Invisible Image

watermarking, literature survey done at the early stages of the project to collect the

requirements and product use cases followed by high level design which focuses on

developing the system architecture followed by detailed design where the system is broken

down into modules.

Page 25: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 14

The project also contains details of development and deployment environment used during

the implementation of the project, the test cases executed to validate the features of the

project followed by conclusion. The body of the project is divided into 7 chapters.

Chapter 1-Introduction-Explains the importance of Invisible Image watermarking, scope,

purpose and motivation behind this project work and gives an insight into the Invisible Image

watermarking scenario. It also briefly explains the current state challenges and explains the

existing system and brings out the differences between existing systems and proposed

systems.

Chapter 2-Theory and Fundamentals-Explains the LSB technique used along with its

features for steganography. Gives a basic idea of the correlation based and frequency domain

techniques. Explains the Visual cryptography technique and encryption with illustrations.

Chapter 3-Design-Software Requirement Specifications- provides the Software Requirement

Specification which explains the user characteristics, assumptions and dependencies,

constraints and functional requirements of the system.

High Level Design- discusses the High Level Design which explains the architectural

strategies, system architecture, and Data Flow Diagram in the system.

Chapter 4-Implementation – covers the Implementation which explains the programming

language, development environment, This chapter also puts light on the difficulties

encountered in the course of implementation of the project and strategies used to tackle them.

Chapter 5-Results - describes the various tests carried out to test the application. It includes

unit testing, integration testing, and system testing with diagrams. It provides a

comprehensive analysis of the whole program, in parts and as a whole.

Chapter 6-Conclusion - gives the summary of the project, limitations in the developed

system, and the future enhancements.

Chapter 7-References- Technical papers and books which were referred to obtain an

understanding of the existing technologies and requirements of the project have been

included in the references section.

Page 26: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 15

CHAPTER 2

Theory and Fundamentals

Steganography is the art of hiding the fact that communication is taking place, by hiding

information in other information. It is the art of concealing a message in a cover without

leaving a remarkable track on the original message. The Least Significant Bit method is used

to hide the pixel values of the message image in the LSB of each pixel in the cover image.

The technique has been demonstrated in part below and more extensively in Chapter 5.

Since the LSB method is not very robust, we have incorporated Visual cryptography in order

to make the algorithm more secure.

2.1 LSB

The most straight-forward method of watermark embedding would be to embed the

watermark into the least-significant-bits of the cover object [6]. Given the extraordinarily

high channel capacity of using the entire cover for transmission in this method, a smaller

object may be embedded multiple times. Even if most of these are lost due to attacks, a single

surviving watermark would be considered a success.

2.1.1 Technique basics

Today, when converting an analog image to digital format, we usually choose between three

different ways of representing colors:

24-bit color: every pixel can have one in 2^24 colors, and these are represented as different

quantities of three basic colors: red (R), green (G), blue (B), given by 8 bits (256 values)

each.

8-bit color: every pixel can have one in 256 (2^8) colors, chosen from a palette, or a table of

colors.

8-bit gray-scale: every pixel can have one in 256 (2^8) shades of gray.

LSB insertion modifies the LSBs of each color in 24-bit images, or the LSBs of the 8-bit

value for 8-bit images.

Page 27: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 16

Example:

The letter 'A' has an ASCII code of 65(decimal), which is 1000001 in binary.

It will need three consecutive pixels for a 24-bit image to store an 'A':

Let's say that the pixels before the insertion are:

10000000.10100100.10110101,10110101.11110011.10110111,

11100111.10110011.00110011

Then their values after the insertion of an 'A' will be:

10000001.10100100.10110100,10110100.11110010.10110110,

11100110.10110011.00110011

(The values in bold are the ones that were modified by the transformation)

The same example for an 8-bit image would have needed 8 pixels:

10000000, 10100100, 10110101, 10110101, 11110011, 10110111, 11100111, 10110011

Then their values after the insertion of an 'A' would have been:

10000001, 10100100, 10110100, 10110100, 11110010, 10110110, 11100110, 10110011

(Again, the values in bold are the ones that were modified by the transformation)

From these examples we can infer that 1-LSB insertion usually has a 50% chance to change a

LSB every 8 bits, thus adding very little noise to the original picture.

For 24-bit images the modification can be extended sometimes to the second or even the third

LSBs without being visible. 8-bit images instead have a much more limited space where to

choose colors, so it's usually possible to change only the LSBs without the modification being

detectable.

2.1.2 Data Rate

The most basic of LSBs insertion for 24-bit pictures inserts 3 bits/pixel. Since every pixel is

24 bits, we can hide

3 hidden_bits/pixel / 24 data_bits/pixel = 1/8 hidden_bits/data_bits

So for this case we hide 1 bit of the embedded message for every 8 bits of the cover image.

If we pushed the insertion to include the second LSBs, the formula would change to:

6 hidden_bits/pixel / 24 data_bits/pixel = 2/8 hidden_bits/data_bits

Page 28: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 17

And we would hide 2 bits of the embedded message for every 8 bits of the cover image.

Adding a third-bit insertion, we would get:

9 hidden_bits/pixel / 24 data_bits/pixel = 3/8 hidden_bits/data_bits

Acquiring a data rate of 3 embedded bits every 8 bits of the image.

The data rate for insertion in 8-bit images is analogous to the 1 LSB insertion in 24-bit

images, or 1 embedded bit every 8 cover bits.

We can see the problem in another light, and ask how many cover bytes are needed to send

an embedded byte.

For 1-LSB insertion in 24-bit images or in 8-bit images this value would be 8/1*8 = 8 Bytes,

for 2-LSBs insertion in 24-bit pictures it would be 8/2*8 = 4 Bytes, for 3-LSBs insertion it

would be 8/3*8 = 21.33 Bytes.

2.1.3 Robustness

LSB insertion is very vulnerable to a lot of transformations, even the most harmless and usual

ones.

Lossy compression, e.g. JPEG, is very likely to destroy it completely. The problem is that the

"holes" in the Human Visual System that LSB insertion tries to exploit - little sensitivity to

added noise - are the same that lossy compression algorithms rely on to be able to reduce the

data rate of images.

Geometrical transformations, moving the pixels around and especially displacing them from

the original grid, are likely to destroy the embedded message, and the only one that could

allow recovery is a simple translation.

Any other kind of picture transformation, like blurring or other effects, usually will destroy

the hidden data. All in all, LSB insertion is a robust technique for data hiding.

Page 29: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 18

2.1.4 Ease of detection/extraction

There is no theoretical outstanding mark of LSB insertion, if not a little increase of

background noise.

It's very easy, instead, to extract LSBs even with simple programs, and to check them later to

find if they mean something or not.

2.1.5 Suitability for steganography or watermarking

First of all, since it is a so vulnerable technique even for simple processing, LSB insertion is

almost useless for digital watermarking, where it must face malicious attempts at its

destruction, plus normal transformations like compression/decompression or conversion to

analog (printing or visualization)/conversion to digital (scanning).

Its comparatively high data rate can point it as a good technique for steganography, where

robustness is not such an important constraint.

2.1.6 Problems and possible solutions

Having stated that LSB insertion is good for steganography, we can try to improve one of its

major drawbacks: the ease of extraction. We don't want that a malicious attacker be able to

read everything we are sending.

This is usually accomplished with two complementary techniques:

Encryption of the message, so that who extracts it must also decrypt it before it makes sense

Randomizing the placement of the bits using a cryptographical random function (scattering),

so that it's almost impossible to rebuild the message without knowing the seed for the random

function.

In this way, the message is protected by two different keys, acquiring much more

confidentiality than before.

This approach protects also the integrity of the message, being much more difficult (we could

say at least computationally infeasible) to counterfeit the message.

Anyway, since we don't want our message to be only an encrypted and scrambled message,

we must go back to the purpose of making the communication hidden.

Page 30: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 19

The two most important issues in this problem are:

the choice of images

the choice of the format (24-bit or 8-bit, compressed or not)

The cover image first of all must seem casual, so it must be chosen between a set of subjects

that can have a reason to be exchanged between the source and the receiver.

Then it must have quite varying colors, it must be "noisy", so that the added noise is going to

be covered by the already present one. Wide solid-color areas magnify very much any little

amount of noise added to them.

Second, there is a problem with the file size, that involves the choice of the format. Unusually

big files exchanged between two peers, in fact, are likely to arise suspicion.

Let's calculate, for instance, what the size would be for a 500x300 image (150,000 pixels),

quite common for pictures on the Internet, with the different color representations:

24-bit color: 150,000 pixels x 24 bits/pixel / 8 bits/byte = 90,000 Bytes ~= 440KB

8-bit color / grayscale (the occupancy is the same): 150,000 pixels x 8 bits/pixel / 8 bits/byte

= 150,000 bytes ~= 146KB

Looking at the size, we can see that a 24-bit uncompressed picture is of a quite uncommon

size, because it's very strange that the sender didn't compress it, a practice that's widely used

and wouldn't have worsened the image quality so much.

To solve this problem, it has been studied a modification to the JPEG algorithm that inserts

LSBs in some of the lossless stages or pilots the rounding of the coefficients of the DCT used

to compress the image to encode the bits. Since we need to have small image file sizes, we

should resort in using 8-bit images if we want to communicate using LSB insertion, because

their size is more likely to be considered as normal.

The problem with 256 colors images is that they make use of an indexed palette, and

changing a LSB means that we switch a pixel from a position to an adjacent one. If there are

Page 31: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 20

adjacent contrasting colors in the palette, it can happen that a pixel in the image changes its

color abruptly and the hidden message becomes visible.

To solve this problem different methods have been studied, like rearranging the palette so

that adjacent colors don't contrast so much, or even reducing the palette to a smaller number

of colors and replicating the same entry in the table in adjacent positions, so that the

difference after the embedding of the message is not visible at all. Moreover for most images

the reduction of colors from, for instance, 256 to 32 is hardly visible.

Most of the experts, anyway, advise to use 8-bit grayscale images, since their palette is much

less varying than the color one, so LSB insertion is going to be very hard to detect by the

human eye.

LSB substitution however despite its simplicity brings a host of drawbacks. Although it may

survive transformations such as cropping, any addition of noise or lossy compression is likely

to defeat the watermark. An even better attack would be to simply set the LSB bits of each

pixel to one fully defeating the watermark with negligible impact on the cover object.

Furthermore, once the algorithm is discovered, the embedded watermark could be easily

modified by an intermediate party.

An improvement on basic LSB substitution would be to use a pseudo-random number

generator to determine the pixels to be used for embedding based on a given “seed” or key

[6]. Security of the watermark would be improved as the watermark could no longer be easily

viewed by intermediate parties. The algorithm however would still be vulnerable to replacing

the LSB’s with a constant. Even in locations that were not used for watermarking bits, the

impact of the substitution on the cover image would be negligible. LSB modification proves

to be a simple and fairly powerful tool for stenography, however lacks the basic robustness

that watermarking applications require.

2.2 Correlation Based Technique

Another technique for watermark embedding is to exploit the correlation properties of

additive pseudo-random noise patterns as applied to an image [9]. A pseudo-random noise

Page 32: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 21

(PN) pattern W(x,y) is added to the cover image I(x,y), according to the equation shown

below in equation 2.

),(*),(),( yxWkyxIyxI w += (2.1)

where, Iw(x,y) = Watermarked Image

I(x,y) = Cover Image

W(x,y) = Pseudo-random Noise pattern

In equation 2, k denotes a gain factor, and IW the resulting watermarked image. Increasing k

increases the robustness of the watermark at the expense of the quality of the watermarked

image.

To retrieve the watermark, the same pseudo-random noise generator algorithm is seeded with

the same key, and the correlation between the noise pattern and possibly watermarked image

computed. If the correlation exceeds a certain threshold T, the watermark is detected, and a

single bit is set. This method can easily be extended to a multiple-bit watermark by dividing

the image up into blocks, and performing the above procedure independently on each block.

2.3 Frequency Domain Technique

An advantage of the spatial techniques discussed above is that they can be easily applied to

any image; regardless of subsequent processing (whether they survive this processing

however is a different matter entirely). A possible disadvantage of spatial techniques is they

do not allow for the exploitation of this subsequent processing in order to increase the

robustness of the watermark.

In addition to this, adaptive watermarking techniques are a bit more difficult in the spatial

domain. Both the robustness and quality of the watermark could be improved if the properties

of the cover image could similarly be exploited.

Page 33: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 22

Taking these aspects into consideration, working in a frequency domain of some sort

becomes very attractive. The classic and still most popular domain for image processing is

that of the Discrete-Cosine-Transform, or DCT. The DCT allows an image to be broken up

into different frequency bands, making it much easier to embed watermarking information

into the middle frequency bands of an image. The middle frequency bands are chosen such

that they have minimize they avoid the most visual important parts of the image (low

frequencies) without over-exposing themselves to removal through compression and noise

attacks (high frequencies) [9]. One such technique utilizes the comparison of middle-band

DCT coefficients to encode a single bit into a DCT block. To begin, we define the middle-

band frequencies (FM) of an 8x8 DCT block as shown below in figure 2.1.

FL

FM

Figure 2.1 Definitions of DCT Regions

FL is used to denote the lowest frequency components of the block, while FH is used to denote

the higher frequency components. FM is chosen as the embedding region as to provide

additional resistance to lossy compression techniques, while avoiding significant

modification of the cover image [5].

Next two locations Bi(u1,v1) and Bi(u2,v2) are chosen from the FM region for comparison.

Rather than arbitrarily choosing these locations, extra robustness to compression can be

achieved if we base the choice of coefficients on the recommended JPEG quantization table

shown below in table 2.1. If two locations are chosen such that they have identical

Page 34: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 23

quantization values, we can feel confident that any scaling of one coefficient will scale the

other by the same factor preserving their relative size.

Table2.1 Quantization values used in JPEG compression scheme

16 11 10 16 24 40 51 61

12 12 14 19 26 58 60 55

14 13 16 24 40 57 69 56

14 17 22 29 51 87 80 62

18 22 37 56 68 109 103 77

24 35 55 64 81 104 113 92

49 64 78 87 103 121 120 101

72 92 95 98 112 100 103 99

Based on the table, we can observe that coefficients (4,1) and (3,2) or (1,2) and (3,0) would

make suitable candidates for comparison, as their quantization values are equal. The DCT

block will encode a “1” if Bi(u1,v1) > Bi(u2,v2); otherwise it will encode a “0”. The

coefficients are then swapped if the relative size of each coefficient does not agree with the

bit that is to be encoded [6].

The swapping of such coefficients should not alter the watermarked image significantly, as it

is generally believed that DCT coefficients of middle frequencies have similar magnitudes.

The robustness of the watermark can be improved by introducing a watermark “strength”

constant k, such that Bi(u1,v1) - Bi(u2,v2) > k. Coefficients that do not meet this criteria are

modified though the use of random noise as to then satisfy the relation. Increasing k thus

reduces the chance of detection errors at the expense of additional image degradation [6].

2.4 Wavelet Watermarking Technique

Another possible domain for watermark embedding is that of the wavelet domain. The DWT

(Discrete Wavelet Transform) separates an image into a lower resolution approximation

image (LL) as well as horizontal (HL), vertical (LH) and diagonal (HH) detail components.

Page 35: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 24

The process can then be repeated to computes multiple “scale” wavelet decomposition, as in

the 2 scale wavelet transform shown below in figure 2.2.

LL2

LH1

HL1

HH1

HH2

LH2

HL2

Figure 2.2 2 Scale 2-Dimensional Discrete Wavelet Transform

One of the many advantages over the wavelet transform is that that it is believed to more

accurately model aspects of the HVS as compared to the FFT or DCT. This allows us to use

higher energy watermarks in regions that the HVS is known to be less sensitive to, such as

the high resolution detail bands {LH,HL,HH). Embedding watermarks in these regions allow

us to increase the robustness of our watermark, at little to no additional impact on image

quality [9].

One of the most straightforward techniques is to use a similar embedding technique to that

used in the DCT, the embedding of a CDMA sequence in the detail bands according to the

equation shown below in equation 5,

∈+=

HHLLvuW

LHHLvuxWWI

i

iii

vuW,,

,,,,

α (2.2)

where,

α = Scaling Factor

Wi = Coefficient of the transformed image

xi = Bit of the watermark to be embedded

Page 36: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 25

To detect the watermark we generate the same pseudo-random sequence used in CDMA

generation and determine its correlation with the two transformed detail bands. If the

correlation exceeds some threshold T, the watermark is detected.

This can be easily extended to multiple bit messages by embedding multiple watermarks into

the image. As in the spatial version, a separate seed is used for each PN sequence, which are

then added to the detail coefficients. During detection, if the correlation exceeds T for a

particular sequence a “1” is recovered; otherwise a zero. The recovery process then iterates

through the entire PN sequence until all the bits of the watermark have been recovered.

2.5 Visual Cryptography

Visual cryptography (VC), first proposed in 1914 by Naor and Shamir. It is a secret sharing

scheme, based on black-and-white or binary images. Secret images are divided into

share images which, on their own, reveal no information of the original secret. Shares may be

distributed to various parties so that only by collaborating with an appropriate number of

other parties can the resulting combined shares reveal the secret image. Recovery of the

secret can be done by super imposing the share images and hence the decoding process

requires no special hardware or software and can he simply done by the human eye. Visual

cryptography is of particular interest for security applications based on biometrics. For

example, biometric information in the form of facial, finger print and signature images can be

kept secret by partitioning into shares, which can be distributed for safety to a number of

parties. The secret image can then recovered when all parties release their share images

which are then recombined.

A basic 2-out-of-2 or (2, 2) visual cryptography scheme produces 2 share images from an

original image and must stack both shares to reproduce the original image. More generally a

(k, n.) scheme produces n shares, but only requires combining k shares to recover the secret

image. To preserve the aspect ratio for the recovered secret image for a (2, 2) scheme each

pixel in the original image can be replaced in the share images by a 2 x 2 block of pixels. As

shown in Table 2.2, if the original pixel is white, one of six combinations of share pixels is

randomly created. Similarly, the possible share combination for black pixels is also shown.

After stacking the shares with white transparent and black opaque, the original secret image

Page 37: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 26

will be revealed. Stacking can be viewed as mathematically ORing, where white is equivalent

to “O” and black is equivalent to “1”. The process is illustrated in Figure 2.3 for a simple

binary image. Note that the resulting share images and the recovered secret image contain 4

times more pixels than the original image (since each pixel of the original image was mapped

to four subpixels). It may also be noted that the recovered image has a degradation in visual

quality (specifically, the contrast between white and black is decreased) since a recovered

white pixel is actually comprised of 2 white and 2 black subpixels. A black pixel is

represented by 4 black subpixels in the recovered image.

Table 2.2: Illustration of a (2; 2) VC Scheme with 4 Subpixels

(a) (b)

Page 38: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 27

(c) (d)

Fig. 2.3. Example of a (2; 2) VC Scheme with 4 Subpixels: (a) secret Dancers image; (b) reconstructed Dancers image; (c)first share; (d) second share

It is also obvious that, while the shares appear to be random (and, in fact. can be shown to

contain no informational content that can be used to recover the original secret image on their

own), the shares also have no interesting content that could be used to carry other information

(such as a biometric image) that might be helpful in a security context. For example, if a

share image could he selected to be the finger print of the share holder, this could be useful in

authenticating a user’s right to hold that share when the parties meet to combine their share

images to reveal the secret. In 1996, Ateniese, Bliijido and Stinson proposed extended visual

cryptography (EVC) schemes that can construct meaningful share images. The (2, 2) EVC

scheme proposed in 141 required expansion of one pixel in the original image to 4 subpixels

which can then be selected to produce the required images for each share. It can be shown

that the resulting scheme is, in fact, also perfectly secure. in that. no share image leaks any

information of the original secret image. Figure 2.4 illustrates a (2, 2) scheme containing the

original binary secret image, “Engineering”, with two cover images, Memorial” and

“University” embedded into the shares.

(a) (b)

(b) (d)

Page 39: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 28

(e) (f)

Fig. 2.4. Example of (2; 2) EVC Scheme: (a) first cover image; (b) second cover image; (c) secret image; (d) share 1; (e) share 2; (f)

recovered secret image.

Although visual cryptography operates on binary images. It can be applied to grayscale

images by using a half-toning algorithm to first convert the grayscale image to a binary image.

This allows for use of visual cryptography schemes to biometric images which are naturally

and meaningfully grayscale such as facial images. Hence using half-toning techniques to

convert grayscale images to binary images is a useful pre-processing step for visual

cryptography. However the half-toning process applied to a grayscale image results in a

reduction of the image quality and since Visual Cryptography schemes also result in a

reduction in image quality, mitigating image degradation becomes an important objective in a

visual cryptography scheme. Previous schemes integrating half-toning and visual

cryptography have suffered from issues such as image expansion (that is, requiring

significantly more pixels for the shares and/or recovered secret image) and compromise of

the security of the scheme.

2.6 Chapter Summary

An extensive description of the methods used in the program has been given above. The LSB

method, the Visual cryptography method, the different techniques namely Frequency domain

technique, correlation based technique and wavelet Watermarking technique have been

described.

Page 40: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 29

CHAPTER 3

Design

Design is one of the most important phases of software development. The design is a creative

process in which a system organization is established that will satisfy the functional and non-

functional system requirements. Large Systems are always decomposed into sub-systems that

provide some related set of services. The output of the design process is a description of the

Software architecture.

3.1 Software Requirement Specification

A Software Requirements Specification (SRS) is a complete description of the behavior of

the system to be developed. It includes the functional and non functional requirement for the

software to be developed. The functional requirement includes what the software should do

and non functional requirement include the constraint on the design or implementation of the

system. Requirements must be measurable, testable, related to identified needs or

opportunities, and defined to a level of detail sufficient for system design. What the software

has to do is directly perceived by its users either human users or other software systems. The

common understanding between the user and developer is captured in requirements

document. The writing of software requirement specification reduces development effort, as

careful review of the document can reveal omissions, misunderstandings, and inconsistencies

early in the development cycle when these problems are easier to correct. The SRS discusses

the product but not the project that developed it; hence the SRS serves as a basis for later

enhancement of the finished product. The SRS may need to be altered, but it does provide a

foundation for continued production evaluation. This chapter is divided as:

• Overall Description

• Specific Requirements

o Functional Requirement

o Non Functional Requirement

o Performance Requirements

o Supportability

o External Interface Requirement

Page 41: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 30

3.1.1 Overall Description

This section provides a description of the general factors that affect the product and its

requirements and also specifies the requirement, both for software and hardware which

makes them easier to understand.

3.1.1.1 Product Perspective

A kernel observation and brief summary of this proposed approach is to perform copyright

violation detection, proof of ownership or distributorship, media authentication, as sometimes

watermarking need to be carried out in compressed-encrypted domain with Robustness and

display the good Visual Recovery Watermark Image. Thus, the key problem is to calculate

the Performance Estimated and Analysis which can decide the Robustness of the technique,

TE and TD.

3.1.1.2 Product Function

The functions of this system are as follows:

• Read the cover image.

• Determine the size of the cover image.

• Read the Watermark Image.

• Determine the size of the Watermark Image.

• Insert the Secret Key for authentication.

• Display the Watermarked Image of different technique.

• Insert the Secret Key for verification.

• Display the Authorize User / Unauthorized User.

• Display Elapsed Processing Time, PSNR, Recovery Watermark Image and Delay

Processing Time.

Page 42: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 31

3.1.1.3 User Characteristics

• To use the application the user must have understanding of Digital Image Watermarking,

PSNR, the key terminologies used in the Watermarking.

• The user should know how to install MATLAB, start MATLAB, delete MATLAB either

by the executing the commands or MATLAB manager (A GUI interface for managing

MATLAB).

• User should have understanding of security concepts like Watermarking, Encoding,

Decoding and Message Authentication.

3.1.2 Specific Requirements

This section of the SRS should contain all the software requirements to a level of details

sufficient to enable designer to design a system those requirements, and testers to test that the

system satisfies those requirements. The requirement discussed in this section is functional

requirements, non-functional requirements, Performance Requirements, Supportability, and

External Interface Requirements, if any in the system.

3.1.2.1 Functional Requirements

The following are the functional requirements of this project

Purpose: The purpose of this project is to Watermarking the Watermark Image to the

JPEG2000 Cover Image for secure the Cover Image and to find the Authorize User. The

proposed approach use Spread spectrum Technique to give the Robustness to the cover image

and find the good visual Watermark image.

Input: The Cover Image, Watermark Image and the Secret Key are the input of the proposed

approach.

Output: Several Parameters are used to qualify the proposed technique, examining tests on

the resulted Watermarked Image. The IWD, Authorize/ Unauthorized user, PSNR Value, TE,

IWR, TD are the output of proposed approach.

Page 43: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 32

3.1.2.2 Non-functional Requirements

Typical non- functional requirements are Reliability, Scalability and Cost Effective. Other

terms for non-functional requirements are “Constraints”, “Quality Attributes” and “Quality of

Service Requirements”.

• All the forms and modules shall allow maximum readability to the user.

• Support Reusability and Maintainability.

• It can be extendible and more features can be added.

• It can be extended to process requests for web applications and distributed systems.

3.1.2.3 Software requirement

The minimum software requirement specification

• Operating System : Windows (32-bit)

• Techniques : Mat lab 2010a

3.1.3 Hardware requirement

The minimum software requirement specification

• Processor : Any Intel or AMD x86 processor supporting.

• Disk Space : 1GB for MATLAB

• RAM : 128 MB

• Input Device : Standard Keyboard and Mouse

• Output Device : VGA and High Resolution Monitor

3.2 High level design

Design is one of the most important phases of software development. The design is a creative

process in which a system organization is established that will satisfy the functional and non-

functional system requirements. Large Systems are always decomposed into sub-systems that

provide some related set of services. The output of the design process is a description of the

Software architecture.

Page 44: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 33

A robust watermarking algorithm for JPEG images need to be designed in which the

watermark can be embedded in a predictable manner in compressed-encrypted bytestream by

exploiting the homomorphic property of the cipher scheme.

3.2.1 Design Considerations

The purpose of the design is to plan the solution of the problem specified by the requirements

document. This phase is the first step in moving from problem to the solution domain. The

design of the system is perhaps the most critical factor affecting the quality of the software

and has a major impact on the later phases, particularly testing and maintenance. System

design describes all the major data structure, file format, output as well as major modules in

the system and their Specification is decided.

3.2.1.1 Development Methods

The development method used in this software design is the functional development method.

The Algorithm has the following operations on JPEG2000 images:

• Encryption using RC4

• Watermark embedding using Spread Spectrum DCT2

• Watermark Detection using Spread Spectrum DCT2

Spread Spectrum DCT2

Working in a frequency domain of some sort becomes very attractive. The classic and still

most popular domain for image processing is that of the Discrete-Cosine-Transform (DCT).

The DCT allows an image to be broken up into different frequency bands, making it much

easier to embed watermarking information into the middle frequency bands of an image. The

middle frequency bands are chosen because the middle bands avoid the most visual important

parts of the image (low frequencies) without over-exposing themselves to removal through

compression and noise attacks (high frequencies).

Page 45: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 34

3.2.1.2 Attacks on Watermarked Image

Attacks on Watermarked Image mean that Image is corrupted over time or in transit, in the

other words, the Recovery Watermark Image is not the same set of sequence of bits that came

into existence when the object was created. A Watermarked document is likely to be subject

to common processing operations or intentional manipulations. These attacks are summarized

in Fig.3.1.

Figure 3.1 Attacks on Watermarked Image

• Lossy compression schemes like JPEG and MPEG can degrade the data’s quality

through irretrievable loss of data.

• Geometric distortions include: Rotation, Translation, Scaling and Cropping and are

Specific to Images and Videos.

• Common signal processing operations include: Digital-to-Analog and Analog-to-

Digital Conversion, Re-sampling, Re-quantization, Dithering, Recompression and

common signal enhancements to Image contrast and/or color and Audio frequency

equalization.

• Other intentional attacks include: Re-watermarking, collusion and Forgery attacks.

Page 46: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 35

3.2.1.3 Desirable Characteristics of Invisible Watermarking

Invisible Watermarking is the type of Watermarking where the location of Watermark Image

embedded is secret, only the authorized persons extract the Watermark Image. An Invisible

Watermark must be perceptually unnoticeable. Adding the Watermark should not corrupt the

Original audio, video, or image. An Invisible Watermark should also be robust to common

signal distortions and the recovered watermark image should be good visual to the HVS.

Moreover, the Watermark should serve as an original signature of the owner, so that

retrieving the watermark from a digitized medium would readily identify the original owner.

3.2.2 Architecture Strategies

The architectural design process is concerned with establishing a basic structural framework

for a system. It involves identifying the major components of the system and communications

between these components. The initial design process of identifying these sub-systems and

establishing a framework for sub-system control and communication is called architecture

design and the output of this design process is a description of the software architecture.

The architecture of the proposed approach is threefold: to encode the image, to decode the

image, and to calculate the Performance Estimation and Analysis.

Firstly, the user read the Cover Image and the Watermark Image, and both the images are

normalized then the Cover Image is encrypted and watermarked using Spread Spectrum

DCT2 technique. While decoding, the Watermark Image can be recovered from the

Watermarked Image in Encrypted or Decrypted or Uncompressed Domains. The

identification of authorized user is done using the Recovery Watermark Image. Then the

Performance Estimation and Analysis is calculated to know the strength of the technique,

various parameters are used to calculate the Performance Estimation and Analysis are: PSNR,

TE, TD. Tables 3.1 describe the different notation used in the Watermarking technique.

Page 47: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 36

Table 3.1 Notations used to explain Watermarking Technique

IC Cover image

IW Watermark image

IWD Watermarked image

IWR Recovered Watermark image

PSNR Peak Signal-To-Noise Ratio

TE Elapsed Processing Time

TD Delay Processing Time

AU/UA Authorize user / Unauthorized

USK User Secret Key

IC

IWD IWR PSNR, TE,TD

IW AU/ UA

Encoder USK Decoder

Figure 3.2 Architecture of Encoding and Decoding of Watermark Image

3.2.3 System Architecture

The architecture for Robust Watermarking of JPEG2000 Images describes the details of the

Robust Watermarking Algorithm. The operations performed are:

• Encryption using RC4

• Watermark embedding using Spread Spectrum DCT2

• Watermark Detection using Spread Spectrum DCT2

DCT2 is comparison-based correlation where DCT mid-band uses two PN sequences; one for

a "0" and another for a "1” Watermarking.

Encoding

Decoding

Performance Estimation &

Analysis

Normalization

Page 48: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 37

Figure 3.3 System Architecture

3.2.4 Data Flow Diagrams

A Data Flow Diagram (DFD) is a graphical representation of the "flow" of data through an

information system. Data Flow models are used to show how data flows through a sequence

of processing steps. The data is transformed at each step before moving on to the next stage.

These processing steps or transformations are program functions when Data Flow diagrams

are used to document a software design. DFD diagram is composed of four elements, which

are process, data flow, external entity and data store. The DFD can be decomposed into three

levels such as level 0, level 1 and level 2.

Data Flow Diagram – Level 0

The level-0 is the initial level DFD and it’s generally called as the context level diagram. It is

common practice for a designer to draw a context-level DFD first which shows the

interaction between the system and outside entities. This context-level DFD is then exploded

to show more detail of the system being modeled.

Figure 3.4 Data Flow Diagram Level 0

Page 49: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 38

The Figure 3.4 shows the Level-0 DFD where the Cover Image and the Watermark Image are

the input given to the Image Watermarking, has to be embedded in a image is called a Digital

Watermarking. The outputs of the Image Watermarking are Recovered Watermark Image,

Watermarked Image, Elapsed Processing Time and Delay Processing Time of different

technique. This proposed approach also display weather the user is authorized / unauthorized

user.

3.2.5 Structure Chart

Structured flow chart gives overall strategy for structuring program. It gives details about

each module evolve during detailed design of coding and decoding. This chart is a top-down

modular design tool, constructed of squares representing the different modules in the system,

and lines that connect them. The lines represent the connection and ownership between

activities and sub activities as they are used in organization charts.

In structured analysis structure charts are used to specify the high-level design or architecture,

of a computer program. As a design tool, they aid the programmer in dividing and conquering

a large software problem that is recursively breaking a problem down into parts that are small

enough to be understood by a human brain. The process is called top-down design or function

decomposition. In the design stage, the chart is drawn and used as a way for the client and the

various software designers to communicate. During the actual building of the program

(implementation), the chart is continually referred to as the master-plan. A structure chart

depicts:

• The size and complexity of the system.

• Number of readily identifiable function and modules within each function.

• Find whether each identifiable function is a manageable entity or should be broken

down into smaller components.

Page 50: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 39

Figure 3.5 Structure chart – Spread Spectrum

3.3 Chapter Summary

A robust watermarking algorithm for JPEG images is designed in which the watermark is

embedded in a predictable manner in compressed-encrypted bytestream by exploiting the

homomorphic property of the cipher scheme.

Page 51: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 40

CHAPTER 4

Implementation

The goal of the programming or implementation phase is to translate the design of the system

produced during the design phase in to code in the chosen programming language, which can

be executed by a system that performs the computation specified by the design. These

decisions are often influenced by several factors such as the real environment in which the

system works, the speed that is required, the security concerns, and other implementation

specific details etc., there are three major implementation decisions that have been made

before the implementation of this project. They are as follows:

• Selection of the platform ( operating system)

• Selection of the programming language for development of the application

• Selection of the frameworks for running the project.

4.1 Implementation Requirements

The following are the implementation requirement details:

• Operating System- Windows 7 Professional;

• MATLAB 7.0.1a

4.1.1 Programming Language Selection

The language chosen to develop this project is MATLAB 7.0.1a. MATLAB is a high-

performance language for technical computing. It integrates computation, visualization, and

programming in an easy-to-use environment where problems and solutions are expressed in

familiar mathematical notation. It also has evolved into an interactive system and

programming language for general scientific, technical computation and visualization. The

basic MATLAB data element is a matrix. The MATLAB can be characterized by following

buzzwords:

• Simple

Page 52: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 41

• Architecture neutral

• Object oriented

• Portable

• Distributed

• High performance

• Robust

• Dynamic

4.1.2 Platform Selection

An operating system is software that manages computer resources and provides

programmer/users with an interface used to access those resources. This proposed approach is

developed in Window 7 professional because of the following advantages:

• User-friendly for application programmer

Window 7 professional is more flexible and user friendly than other operating systems and

the users need not be expertise for working in the proposed operating system.

• Experience less Downtime with a system that stays up and running

Window 7 professional is the most reliable windows operating system yet at least ten times

more reliable than window XP with improved system recovery tools and Advanced Security

Technologies to keep the PC running smoothly.

• Share Computers and Network resources

Window 7 professional can easily share documents, valuable resources, and devices among

the users, such as faxes, printers and even an internet connection with a small office network.

Connect multiple computers to the Internet through the window 7 Professional PC and a

single Internet connection, quickly and securely, resulting in potential saving in Internet

service Provider fees and hardware cost.

• Protect Important Business Documents and Information

The Encrypting File System provides a high level of file protection from hackers and data

theft by transparently encrypting selected file with a random generated key. If the PC gets

Page 53: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 42

stolen or lost, unauthorized users should not able to read or view the encrypted files, this

facility is provided by the Window 7 professional.

• Take control of security settings

Window 7 professional Security Centre provides a single, unified view of keys settings and

tools so that you can easily monitor the PC’s security setting in one convenient place.

• Work from anywhere

Easily configure wireless networks for the office or connect seamlessly to wireless ”hotspots”

without having to install or update third-party software. The Remote Desktops feature in

window 7 Professional allows the user to connect and use the computer remotely from

another computer running window 95 or later, giving you access to all of your data and

applications as if you were sitting right there.

4.2 Code Conventions

Code conventions are important to programmers for a number of reasons which improve the

readability of the software, allowing engineers to understand new code more quickly and

thoroughly. This proposed approach is coded according to the coding standard.

The following section describes the coding guidelines:

Program coding guidelines used in the project includes the following:

• Naming conventions

• Method names

• Variable names

4.2.1 Naming Conventions

• Standards

Clear and informative names are one of the best options for creating easily understandable

code. The name of any identifier should briefly describe the purpose of that identifier.

• Guidelines

While coding for this project care as been taking such that names are combination of upper

and lowercase letters or separated by underscores to delineate individual words.

Page 54: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 43

4.2.2 Method Names

• Standards

Function names must identify the action performed or the information provided by the

function.

• Guidelines

The capitalization rule for function names are used, the first letter of the method name should

be capitalized.

4.2.3 Variable Names

• Standards

The type and purpose of each variable should be evident within the code in which it is used.

Variable names should be formed from composite words, delimited by upper case letters,

with no underscores allowed.

• Guidelines

Variable names should be short and meaningful.

4.3.4 Comments

Comments should be used to give overviews of code and provide additional information that

is not readily available in the code itself. Comments should contain only information that is

relevant to reading and understanding the program. Comments are useful for explaining what

function a certain piece of code performs especially if the code relies on implicit or subtle

assumptions or otherwise perform subtle actions.

Comment lines begin with the character '%' in MATLAB, and anything after a '%' character

is ignored by the interpreter. The % character itself only tells the interpreter to ignore the

remainder of the same line. In the MATLAB Editor, commented areas are printed in green by

default, so they should be easy to identify.

Page 55: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 44

4.4 Chapter Summary

Implementation of any software is always preceded by important decisions regarding

selection of the platform, the language used, etc. A careful analysis of the requirements was

carried out and the platform and the language were selected keeping in mind all the

requirements.

Page 56: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 45

CHAPTER 5

Results

Testing is the important phase in the development life cycle of the product. The aim of testing

stage is to discover defects/errors/enhancements by testing individual program components.

These components may be functions, objects or modules. During system testing, these

components are integrated to form the complete system. At this stage, testing should focus on

establishing that the system meets its functional requirements, and does not behave in

unexpected ways. Test data are inputs which have been devised to test the system whereas

test cases are inputs to test the system and the outputs are predicted from these inputs if the

system operates according to its specification. This is to examine the behavior in a cohesive

system. The test cases are selected to ensure that the system behavior can be examined in all

possible combinations of conditions.

This chapter explains in brief tests conducted on Image Watermarking. Unit testing [19] is

done to check whether the encoding and decoding in DCT2. Integration testing is conducted

to find the PSNR value, Elapsed Processing Time, Delay Processing Time and find the

authorized user of the proposed technique. System tests were conducted on a complete,

integrated system to calculate the Performance Estimation and Analysis.

5.1 Test Environment

All the algorithm of the Invisible Digital Image watermarking was tested on the following

platform:

� Operating System – Window 7 Professional

5.2 Software Testing

Software testing is a predominant verification and validation technique. Testing involves

exercising the program using data like the real data processed by the program. The existence

of program defects is inferred from unexpected system outputs. Testing may be carried out

Page 57: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 46

during the implementation phase to verify the software behaves, as intended by its designer

and after the implementation is complete.

5.3 Testing Methodologies

Testing is carried out in multiple levels and the activities at each level must be planned well

in advance and it has to be formally documented. Based on the individual plans only, the

individual test levels are carried out. Testing process starts with a test plan that identifies all

the testing related activities that must be performed and specifies the schedule.

5.4 Unit Testing

The first level of testing is called unit testing. Unit testing focuses verification effort on the

smallest unit of software design- the module. In this, different modules are tested against the

specifications produced during design for the modules. Unit testing is essentially for

verification of the code produced during the coding phase, and hence the goal is to test the

internal logic of the modules. It is typically done by the programmer of the module. A

module is considered for integration only after it has been unit tested satisfactorily. Due to its

close association with coding, the coding phase is frequently called “coding and unit testing”.

The unit testing can be conducted in parallel for multiple modules. The proposed approach

has three modules: Spatial module, Frequency module and Wavelet module. The Unit testing

of each module is discussed below.

Test case 1:

• In the first case, the unit test is carried out on encoding. The encoding part of the

program is tested and the remaining part of the program that includes decoding and

visual cryptography is excluded.

• The inputs are the cover image and the message image.

• The message image is normalized using the arduino board. The message pixel values

are hard-coded into the arduino board itself.

Page 58: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 47

• The normalized image values are then serially sent to the computer and are received

by Matlab which converts the serially received values into a matrix.

• Then the watermark is created from the message image by repeatedly embedding the

message image and stacking them together to create multiple messages in the

watermark. The cover image is gray scale whereas the watermark image is black and

white.

• As the watermark image is in black and white, it is said to be in binary form (1s and

0s) whereas the cover image has pixels whose intensities vary from 0 to 255 and they

are represented in 8-bit format.

• The embedding is carried out using the LSB method where the LSB of the cover

image is altered according to the corresponding pixel intensity of the watermark.

• The resultant output that is derived at the end of this test is the Watermarked image

and is the combination of the message embedded in the cover image.

The below figures a, b , c and d of figure 5.1 represent the cover , message, watermark

and the watermarked image which have been obtained after conduction of the above test.

(a) Cover Image (b) Message Image

Page 59: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 48

(c) Watermark (d) Watermarked Image

Figure 5.1 Unit Test case 1

(a) Pixel Intensity values of the cover image

The above diagram i.e. Figure 5.2(a) shows a small section of the cover image. During the

conduction of the Unit test case 1, the above screen shot was taken so as to denote what the

pixel intensities of the cover image looked like before the embedding of the message image

was done to get the watermarked image.

Below i.e Figure 5.2(b), shows the corresponding section of the watermarked image. The

highlighted values show that the pixel intensities have changed by 1. This is because of the

Page 60: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 49

LSB method which caused the pixel intensities to increase or decrease by 1 in accordance

with the watermark. It can be noticed that 145 has been changed to 144, 142 to 143, and 80 to

81 and so on.

However, though these slight changes in values have occurred, there is no prominent

difference between how the image visually appears before the watermark is embedded into it

and after the embedding takes place. Hence this is found out by the Peak-Signal-to-noise

ration (PSNR) that is found out later on.

(b) Pixel Intensity values of the watermarked image

Figure 5.2 Screen shots of the watermarked image and Cover image

Test case 2:

• In the second case, the unit test is carried out on decoding. The decoding part of the

program is tested and the remaining part of the program that includes encoding and

visual cryptography is excluded.

• The input is the watermarked image.

Page 61: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 50

• Using the bitget function in Matlab, the information embedded in the least significant

bits of each pixel in the watermarked image is extracted.

• The resultant output is the Recovery watermark image. This image is analysed with

respect to the cover image to get the PSNR.

The below Figure 5.3(a) shows the Watermarked image that formed the input for the test

case 2 and the figure 17(b) shows the watermark image that has been recovered after

performing decoding.

(a) Watermarked Image (b) Recovery Watermark image

Figure 5.3 Unit test case 2

5.5 Integration Testing

The second level of testing is called integration testing. In this, many unit tested modules are

combined into subsystems, which are then tested. The goal here is to see if all the modules

can be integrated properly. The proposed approach has been tested for interaction between

the modules. Several parameters are used to qualify the Watermarking technique, examining

tests on the resulted watermark image.

Figure 5.3 below shows the Integration testing for PSNR which is the ratio between the

maximum possible power signals to the power of corrupting noise. The signal in this case is

the Cover image and the noise is the error introduce by the compression.

Page 62: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 51

Test Case 3:

• In the third case, the integration test is carried out on encoding and decoding. The

encoding and decoding part of the program is tested and the remaining part of the

program visual cryptography is excluded.

• The inputs are the cover image and the message image.

• The message image is normalized using the arduino board. The message pixel values

are hard-coded into the arduino board itself.

• The normalized image values are then serially sent to the computer and are received

by Matlab which converts the serially received values into a matrix.

• Then the watermark is created from the message image by repeatedly embedding the

message image and stacking them together to create multiple messages in the

watermark. The cover image is gray scale whereas the watermark image is black and

white.

• As the watermark image is in black and white, it is said to be in binary form (1s and

0s) whereas the cover image has pixels whose intensities vary from 0 to 255 and they

are represented in 8-bit format.

• The embedding is carried out using the LSB method where the LSB of the cover

image is altered according to the corresponding pixel intensity of the watermark.

• Using the bitget function in Matlab, the information embedded in the least significant

bits of each pixel in the watermarked image is extracted.

• The resultant output is the Recovery watermark image. This image is analysed with

respect to the cover image to get the PSNR.

(5.1)

Page 63: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 52

• The above equation is used to calculate the PSNR. In this equation X and Y represent

the dimensions of the cover image. px,y denotes the maximum pixel intensity of the

cover image. Px,y denotes the cover image pixel intensity and Px,y denotes the message

image pixel intensity.

• The PSNR gives us an indication as to the difference between the cover image and the

watermarked image. The lower the PSNR, the higher the difference between the two

images.

• After the PSNR is calculated, the elapsed processing time is also found out. This gives

us the amount of time that is taken to carry out the watermarking.

Below is a screenshot of the values of the PSNR and elapsed processing time that was taken

during the conduction of the Integration Test case.

The PSNR value was found out to be 1.3101*10^5 which translates to approximately 51.7dB.

The elapsed processing time was found out to be 0.9375 seconds.

Figure 5.3 Integration Test Case 3 and 4

Page 64: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 53

5.6 System Testing

In System Testing and acceptance testing the entire software system is tested. The reference

document for this process is the requirements document, and the goal is to see if the software

meets its requirements. Acceptance testing is sometimes performing with realistic data of

decoding data. Testing here focuses on the external behavior of the system. Finally the entire

system is tested with the different possible user inputs. The users generate estimate analysis

of the entire algorithm.

Performance Test and analysis

• We first input the cover image and the message image. The cover image is in the form

of a colour image. On the other hand, the message image is in the form of a black and

white image.

• The colour image is first converted into a grey-scale image using an inbuilt function.

• Later, the black and white message image is normalized and thus converted into the

form of ones and zeroes i.e. binary form.

• We now create an image called the watermark.

• Later, we embed the message image in the cover image using the bitset keyword in

Matlab. Thus, we get the image called as the stego-object.

• We now have to divide the stego-object into n shares. Here, we take n=2. This method

is called visual cryptography. So by using this scheme we get different shares.

• Later, we use two levels of encryption. The first level of encryption involves the

usage of an algorithm that changes the pixel intensity values uniformly. However,

with this level of encryption, the broad contours of the image are unfortunately

distinguishable.

• The second level of encryption involves the usage of pixel-position based encryption

which makes the stego-images indistinguishable. These shares are passed through the

wireless medium and are received.

• Then we carry out decryption. We super-impose the sares that are received to reform

the stego-object. And the steganographic process of LSB is then reversed to get back

the message image.

• The hardware implementation has been performed on the Arduino Duemilano board.

Page 65: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 54

(a) Cover image 1 and 2

In the above figure(a), two samples of cover images have been considered. These are gray

scale images which are obtained from RGB images using an inbuilt function in Matlab. The

inbuilt function being rgb2gray. The cover image in this case is much bigger dimension wise

compared to the message image. The pixel intensity values vary from 0 to 255. It is these

images on which the LSB method is carried out for steganography after which visual

encryption and decoding is performed to obtain all the results below.

(b) Watermarked image 1 and 2

The input message image is of very small dimensions compared to the cover image. This

message image is normalized using the Arduino Duemilano board. It is then used to create

the watermark by stacking multiple message images horizontally and vertically. The

watermark is then embedded into the least significant bits of the cover image using the bitset

function in Matlab to get the watermarked image. The result as seen above does not look

substantially different from the cover image.

Page 66: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 55

(c) Share 1 of cover image 1 and 2

The input watermarked image is then divided into two shares depending on a threshold which

in our case is 45. Any number of shares can be taken according to the visual secret sharing

scheme. In this example, we have taken n=2, indicating 2 shares. All the pixels that have

intensities between 45 and 210 are taken into share 1. If the pixel intensity in the cover image

is not within this range, then the value in the first share is taken as 0. The share then

undergoes encryption under the RC4IM standard. 16 pixels are taken and the pixel intensity

values are altered according to an input key also 16 integers long. The output is also found to

be 16 pixels long. The above figure (c) shows the encrypted first share of the two cover

images respectively.

(d) Share 2 of cover images 1 and 2

All the pixels that have intensities below 45 and above 210 are taken into share 2. If the pixel

intensity in the cover image is not within this range, then the value of the second share is

taken as zero. The share then undergoes encryption under the RC4IM standard. 16 pixels are

taken and the pixel intensity values are altered according to an input key also 16 integers

Page 67: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 56

long. The output is also found to be 16 pixels long. The above figure (d) shows the encrypted

second share of the two cover images respectively.

(e)Received share 1 of cover image 1 and 2

The encrypted first share undergoes decryption according to the RC4IM standards. The input

16 pixels are altered according to the input key to get the original 16 pixels. The black

patches that are present in the above figures are due to the corresponding pixels being present

in the second share. The above figure shows the decrypted received shares 1 of cover images

1 and 2 respectively.

(e) Received Share 2 of cover images 1 and 2

The shares in the above figure have been formed as a result of the pixel values that did not lie

between 45 and 210. When the share 1 and the share two are overlapped, the original cover

image appears.

Page 68: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 57

(g) Recovered watermarked image of cover images 1 and 2

Upon overlapping the two received shares, we get the above figure(g) which corresponds to

the received watermarked image. The received watermarked image differs slightly compared

to the original cover image.

(h) Recovered watermark of cover image 1 and 2

Figure 5.4 System Test Case 5

From the recovered watermarked image, we use the bitget function to obtain the Least

Significant Bit. The image now obtained is the recovered watermark.

Page 69: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 58

5.7 Comparison

Table 5.1 Comparison of capacity and PSNR values with existing algorithms

Author Capacity PSNR

Ours 1 51.7

Prema et al[21] 1 39.4

Kuo et al[22] 0.034 48.2

Thanuja[23] 0.086 61.79

Ching et al[24] 0.491 34.99

Thanuja[25] 0.737 41.67

Ching et al[26] 1.2 32.00

Ali et al[27] 1.91 42.58

C. H. Yang et al[28] 2.1 36.15

Yang et al[29] 2.89 39.31

The table above compares our obtained PSNR and capacity values with values from other

reference papers. Capacity denotes the number of black and white pixels of the message

image that can be embedded in one pixel of the cover image and our value 1 denotes that 1

black and white pixel can be embedded in one colour pixel. It can be noticed that our value

compare favourably with the reference papers’ values. This has resulted due to the unique

combination of LSB method of steganography with Visual cryptography that has been used.

5.8 Chapter Summary

Accordingly, expected behavior of the system under different combinations is given.

Therefore test cases are selected which have inputs and the outputs on expected lines, inputs

that are not valid and for which suitable messages must be given and inputs that do not occur

very frequently which can be regarded as special cases.

Page 70: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 59

CHAPTER 6

Conclusion

The project work introduced a unique combination of two techniques, i.e. the LSB method of

Steganography and Visual Cryptography technique using the secret sharing scheme. Using

the watermarking technique the authorized and unauthorized users could be differentiated.

The limitations and possibilities of each were also touched upon. Although only the very

surface of the field was scratched, it was still enough to draw several conclusions about

Digital Watermarking. LSB is the straight-forward method of watermark embedding use to

embed the watermark into the least-significant-bits of the Cover image. Another observation

is that Frequency domains are typically better candidates for Watermarking then Spatial, for

both reasons of robustness as well as visual impact of Recovery Watermark image.

Embedding in the DCT domain proved to be highly resistant to “.bmp” compression as well

as significant amounts of random noise. The Wavelet domain as well proved to be highly

robust but the amounts of visual of Recovery Watermark image is degradation. Several

techniques are used to calculate the Performance Estimation and Analysis of the proposed

system.

6.1 Limitation of the Project

• The proposed approach is implemented using Matlab

• The proposed system supports only Gray scale Images.

• It provides security for “.bmp” format image.

• The maximum capacity of the Arduino Duemilanove board translates to

approximately 750 pixels of the message image with the hard-coded program. So the

maximum size of the message image has been restricted to 750 pixels.

• The entire program is too heavy to run on the Arduino Duemilaove board therefore

only a small part of the program i.e. the normalization can be run on the board and the

rest of the program has to be run on the computer itself.

• The proposed system supports only black and white images as message images.

Page 71: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 60

6.2 Future Enhancement

• The project developed can be further implemented in hardware using VLSI.

• The proposed system can be further implemented for color image.

• It can further provide the security for JPEG format image.

• Watermarking can be further extended for Digital video and audio.

• The same idea can be easily implemented for same size of Cover Image and

Watermark Image.

Many digital watermarking methods have been proposed for various applications [30, 31, 32,

33, 34, 35-39, 40, 41, 42]. Several studies focus quantization index modulation (QIM)

[30,31], and spread spectrum-based watermarking is still also attractive [32] for tolerance.

From the perspective of the image-quality of watermarked images, image-adaptive

watermarking [33] and informed embedding [34] that utilizes the characteristics of the target

image are effective in improving the imperceptibility of watermarks. To contribute to the

objective image-quality of watermarked images, image-quality guaranteed watermarking

(IQGW) methods that generate watermarked images of a desired image-quality independent

of the characteristics of the target images and without trial and error, have been proposed [35,

44, 45]. On the other hand, a modulo arithmetic-based watermarking method for JPEG-coded

images has also been proposed [46-50]. This method offers the user the flexibility of

choosing the coefficients for watermarking in each 8×8-sized quantized discrete cosine

transformed (DCT) matrix, and extracts hidden data using neither reference images nor the

knowledge of the position of chosen coefficients. Furthermore, because of the use of modulo

arithmetic- based modulation of data, it is capable of reducing the distortion caused by

watermarking. However it is only for JPEG-coded images and its image-quality performance

has not been analyzed enough yet.

Page 72: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 61

CHAPTER 7

References

[1] Fridrich, J., Goljan, M. and Du,R, “Reliable Detection of LSB Steganography in Colour

and Grayscale Images”, Proceedings of ACM Workshop on Multimedia and Security,

Ottawa, pp.27-30, October 5, 2001.

[2] Sathiamoorthy Manoharan, “An empirical analysis of rs steganalysis”, proceedings of the

third international conference on internet monitoring and protection, IEEE computer society

Washington, 2008, pg 89-100.

[3] Rita Rana, Dheerendra Singh, Steganography “Concealing Messages in Images Using

LSB Replacement Technique with Pre-Determined Random Pixel and Segmentation of

Image”, International Journal of Computer Science & Communication Vol. 1, No. 2, pp. 113-

116, July-December 2010.

[4] Singh, K.M.; Nandi, S.; Birendra Singh, S.; ShyamSundar Singh, L.; , “Stealth

steganography in visual cryptography for half tone images”, Computer and Communication

Engineering, International Conference, 2008, pg 112-123.

[5] Jithesh K, Dr. A V Senthil Kumar, “Multi Layer Information Hiding - A Blend Of

Steganography And Visual Cryptography”, Journal of Theoritical and Applied Information

Technology, pg 42-47, 2010.

[6] Hsien-Chu Wu; Chwei-Shyong Tsai; Shu-Chuan Huang;, “Colored digital watermarking

technology based on visual cryptography, Nonlinear Signal and Image Processing”, IEEE-

Eurasip, pg 56-81, 2005.

[7] R. Chandramouli, Nasir Menon, “Analysis of LSB Based Image Steganography

techniques”, pg. 78-92, IEEE-2001.

Page 73: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 62

[8] Arezoo Yadollahpour, Hossein Miar Naimi, “Attack on LSB Steganography in Colour and

Grayscale Images Using Autocorrelation Coefficients”, European Journal of Scientific

Research ISSN 1450- 216X, Vol.31, No.2, 2009.

[9] Qing zhong Liu, Andrew H. Sung, Jianyun X, Bernardete M. Ribeiro,.” Image Complexity

and Feature Extraction for Steganalysis of LSB Matching”, The 18th International

Conference on Pattern Recognition (ICPR'06) 0-7695-2521-0/06 $20.00 © 2006 IEEE, pg

133-144.

[10] J. Fridrich, M. Goljan, and D. Hogea, “Steganalysis of jpeg images: Breaking the f5

algorithm”, In Proc. of the ACM Workshop on Multimedia and Security 2002.

[11] J. Fridrich, M. Goljan, and R. Du. “Detecting lsb steganography in color, and gray-scale

images”, IEEE MultiMedia, pages 22–28, 2001.

[12] Ghascmi E shanbchzadch J and ZahirAzami B, “ A Steganography method based on

Integer Wavelet Transform and Genetic Algorithm” International Conference on

Communications and Signal Processing (ICCSP) pp 42-45,2011.

[13] Dr.M.Umamaheswari Prof. S.Sivasubramanian S.Pandiarajan, “Analysis of Different

Steganographic Algorithms for Secured Data Hiding”, IJCSNS International Journal of

Computer Science and Network Security, VOL.10 No.8, pg 202-234, August 2010.

[14] Shyamalendu Kandar, Arnab Maiti, “Variable Length Key based Visual Cryptography

Scheme for Color Image using Random Number”, International Journal of Computer

Applications . Volume 19– No.4, pg 139-145, April 2011.

[15] Anupam Kumar Bairagi, “ASCII based Even-Odd Cryptography with Gray code and

Image Steganography: A dimension in Data Security”, ISSN 2078-5828 (Print), ISSN 2218-

5224 (Online), Volume 01, Issue 02, Manuscript Code: 110112.

[16] G. Simmons, “The prisoners problem and the subliminal channel” CRYPTO, pp. 51-67,

1983.

Page 74: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 63

[17] Katzenbeisser, S. and Petitcolas F.A.P. “Information hiding techniques for

steganography and digital watermarking”, Artech House, Norwood, MA 02062, USA, 1999,

pg 156-167.

[18] Aderemi Oluyinki, “Some improved genetic algorithms based on Heuristics for Global

Optimization with innovative Applications”, Doctorial thesis, 2010.

[19] Talal Mousa Alkharobi, Aleem Khalid Alvi, “New Algorithm for Halftone Image Visual

Cryptography”, IEEE 2004.

[20] Chin-Chen Chang; Iuon-Chang Lin; “A new (t, n) threshold image hiding scheme for

sharing a secret color image”, Communication Technology Proceedings, ICCT 2003, pg

189-200.

[21] G. Prema, S. Natarajan, “Steganography using Genetic Algorithm along with Visual

Cryptography for Wireless Network Application”, pg. 215-259, 2013.

[22] Wen-Chung Kuo Dong-Jin Jiang Yu-Chih Huang, “A Reversible Data Hiding Scheme

Based on Block Division”, Congress on Image and Signal Processing, 2008, CISP '08,

pp.365-369, Sanya, Hainan, China, May 27-30, 2008.

[23] Thanuja T C, R Nagaraj, Uttara Kumari, “Reversible Data Hiding using Increased Peak

Histogram”, Proceedings of the 11th International Conference on Computer and Information

Technology(ICCIT 2008) & Workshops, pp.44-47, Bangladesh Dec. 24-27, 2008.

[24] Lin Jia , Sang-Ho Shin and Kee-Young Yoo , “A reversible data hiding scheme using

inverse embedding methods in double-embedding strategies”, Proceedings of 7th

International conference on Informatics and Systems (INFOS),28-30 March 2010 , pp 1-7.

[25] U. Kumari, Thanuja T.C, Harsha Kumar K, D Chinmaya, Jayanth Srivatsav, Ganesh

Prasad N, “Watermarking using Integer DCT and Increased Peak Histogram technique”,

Proceedings of the International conference on Mechanical and Electronics Engineering,

Chennai, India ,pg. 27-29 June 2009.

Page 75: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 64

[26] Ching-Yu Yang,Wu-Chih Hua and Chih-Hung Lin, “A Semi Fragile Reversible Data

Hiding by Coefficient-bias Algorithm”, Journal of Information Hiding and Multimedia Signal

Processing, ISSN 2073-4212, Ubiquitous International Volume 1, Number 2, pp 91-100,

April 2010.

[27] Hengfu Yang, Xingming Sun, Guang S un, “A High-Capacity Image Data Hiding

Scheme Using Adaptive LSB Substitution”, Radio Engineering, Vol. 18, No. 4, p. 509-516,

December 2009.

[28] Wu H.-C., Wu N.-I., Tsai C.-S., Hwang M.-S, “Image steganographic scheme based on

pixel-value differencing and LSB Replacement methods”. IEEE Proceedings-Vision, Image

and Signal Processing, 2005, vol. 152, no. 5, pp 611-615, October 2005.

[29] C. De Vleeschouwer, J. F. Delaigle, and B. Macq, “Circular interpretation on histogram

for reversible watermarking,” in IEEE Int. Multimedia Signal Process. Workshop, France,

Oct. 2001, pp. 345–350.

[30] B. Chen and G.W. Wornell, “Quantization index modulation: A class of provably good

methods for digital watermarking and information embedding,” IEEE Trans. Inform. Theory,

vol.47, pp.1423–1443, May 2001.

[31] A.K. Goteti and P. Moulin, “QIM watermarking games,” in Proc. IEEE ICIP, 2004,

pp.717–720.

[32] H.S. Malvar and D.A. Florˆencio, “Improved spread spectrum: A new modulation

technique for robust watermarking,” IEEE Trans. Signal Processing, vol.51, pp.898–905,

Apr. 2003.

[33] C.I. Podilchuk and W. Zeng, “Image-adaptive watermarking using visual models,” IEEE

J. Select. Areas Commun., vol.16, pp.525–539, May 1998.

[34] M.L. Miller, G.J. Do¨err, and I.J. Cox, “Applying informed coding and embedding to

design a robust high-capacity watermark,” IEEE Trans. Image Processing, vol.13, pp.792–

807, June 2004.

Page 76: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 65

[35] I. J. Cox, J. Kilian, T. Leighton, and T. Shamoon, “Secure spread spectrum

watermarking for multimedia”, pp. 204-225, 1995

[36] J. Brassil, S. Low, N. Maxemchuk, and L. O&#39,Gorman, "Electronic marking and

identification techniques to discourage document copying", Proc. Infocom',94, pp.1278 -

1287

[37] R. Schyndel, A. Tirkel, and C. Osborne, "A digital watermark", IEEE Proc. Int. Conf.

Image Processing, vol. 2, pp.86 -90, 1994

[38] G. Caronni, "Assuring ownership rights for digital images", Proc. Reliable IT Systems,

VIS',95, pg 156-168, 1995.

[39] W. Bender, D. Gruhl, and N. Morimoto, “Techniques for data hiding”, 1994.

[40] T. Tachibana, M. Fujiyoshi, and H. Kiya, “A watermarking scheme allowing the desired

image quality with no limitation on the distribution of watermark sequences,” in Proc. IEEE

ISPACS, 2002, pp.373–377.

[41] K. Matsui, T. Tachibana, M. Fujiyoshi, and H. Kiya, “A water- marking method

allowing the desired image quality for binary sequences,” J. ITE, vol.57, pp.878–881, July

2003.

[42] M. Fujiyoshi and H. Kiya, “An image-quality guaranteed method for quantization-based

watermarking using a DWT,” in Proc. IEEE ICIP, 2004, pp.2629–2632.

[43] Y. Seki, H. Kobayashi, M. Fujiyoshi, and H. Kiya, “Quantization-based image

steganography without data hid- ing position memorization,” in Proc. IEEE ISCAS, 2005, to

be published.

[44] Information technology Coding of moving pictures and associated audio for digital

storage media up to about 1,5 Mbits/s Part 2: Video. Int. Std. ISO/IEC IS-11172-2, 1993.

[45] Information technology Generic coding of moving pictures and associated audio

information: Video. Int. Std. ISO/IEC IS-13818-2, 2000.

Page 77: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 66

[46] Information technology Coding of audio-visual objects Part 2: Visual. Int. Std. ISO/IEC

IS-14496-2, 2001.

[47] Y. Noguchi, H. Kobayashi, and H. Kiya, "A method of extracting embedded binary data

from JPEG bitstreams using standard jpeg decoder," in Proc. IEEE ICIP, 2000.

[48] M. Fujiyoshi and H. Kiya, "A data hiding method for indexing JPEGcoded images and

theoretical analyses of image-quality," in Proc. ITCCSCC, 2004.

[49] L.D. Strycker, P. Termont, J. Vandewege, J. Haitsma, A. Kalker, M. Maes, and G.

Depovere, "Implementation of a real-time digital watermarking process for boradcast

monitoring on a TriMedia VLIW processor," IEE Proc. Visual and Image Signal Processing,

vol.147, pp.371-376, Aug. 2000.

[50] D.L. Robie and R.M. Mersereau, "Video error correction using steganography,"

EURASIP J. Appl. Signal Processing, vol.2002, pp.164-173, Feb. 2002.

[51] P.H.-W. Wong and O.C. Au, "Data hiding and watermarking in JPEG compressed

domain by DC coefficient modification," in Proc. SPIE, vol.3971, pp.237-244, 2000.

Page 78: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 67

APPENDIX-A

Page 79: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 68

ARDUINO CODE

int pinMatrix[15][50] = { {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 },

Page 80: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 69

{255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 255, 255,0, 0, 0, 0, 255,255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0,0, 255, 255, 255, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, {255, 255, 255, 255, 255, 255, 255, 255, 255, 255,255, 255, 255, 0, 0,0, 0, 0, 0, 0,0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 255,255, 255, 255, 255, 255,255, 255, 255, 255, 255 }, }; void setup() { Serial.begin(9600); } //close setup() void loop() { for(int i = 0; i < 15; i++) { for(int j = 0; j < 50; j++) { if(pinMatrix[i][j] == 255) Serial.println('1'); else Serial.println('0'); delay(100); }//close for i }//close for j while(1); } //close loop()

Page 81: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 70

MATLAB CODE Main clear all; close all clc start_time=cputime; % read in the cover object file_name='_lena_std_bw.bmp'; cover_object=imread(file_name); if isequal(size(cover_object,3),3) cover_object = rgb2gray(cover_object); end % level = graythresh(cover_object); % cover_object = im2bw(cover_object,level); figure, imshow(cover_object);title('oringinal image') % read in the message image file_name='_copyright.bmp'; message=imread(file_name); % convert to double for normalization, then back again % message=double(message); % message./256 % message=round(message./256); % message=uint8(message); % determine size of cover object Mc=size(cover_object,1); %Height Nc=size(cover_object,2); %Width % determine size of message object Mm=size(message,1); %Height Nm=size(message,2); %Width % title the message object out to cover object size to generate watermark xx(1:Mc,1:Nc) = 0; yy(1:Mc,1:Nc) = 0; for ii = 1:Mc for jj = 1:Nc xx(ii,jj) = mod(ii,Mm)+1; yy(ii,jj) = mod(jj,Nm)+1; watermark(ii,jj)=message(mod(ii,Mm)+1,mod(jj,Nm)+1); end end xx

Page 82: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 71

yy watermark; % now we set the lsb of cover_object(ii,jj) to the value of watermark(ii,jj) watermarked_image=cover_object; for ii = 1:Mc for jj = 1:Nc watermarked_image(ii,jj)=bitset(uint8(watermarked_image(ii,jj)),1,watermark(ii,jj)); end end % write the watermarked image out to a file imwrite(watermarked_image,'lsb_watermarked.bmp','bmp'); % display processing time elapsed_time_e=cputime-start_time, % calculate the PSNR psnr_e=psnr(cover_object,watermarked_image,Mc,Nc), % display watermarked image figure, imshow(watermarked_image,[]); title('Watermarked Image'); %Read Input Binary Secret Image inImg = imread('lsb_watermarked.bmp'); %Visual Cryptography [share1, share2] = VisCrypt(inImg); %Outputs figure, imshow(share1);title('Share 1'); figure, imshow(uint8(share2));title('Share 2'); %-------------% start_time=cputime; [rec_share1, rec_share2] = VisdeCrypt(share1, share2); figure, imshow(uint8(rec_share1));title('rShare 1'); figure, imshow(uint8(rec_share2));title('rShare 2'); watermarked_image(1:Mc,1:Nc) = 0; for i = 1:Mc for j = 1:Nc if rec_share1(i,j) > rec_share2(i,j) watermarked_image(i,j) = rec_share1(i,j); else % rec_share1(i,j) < rec_share2(i,j) watermarked_image(i,j) = rec_share2(i,j); end end end figure, imshow(uint8(watermarked_image));title('Recovered Watermarked image');

Page 83: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 72

%watermarked_image = imresize(watermarked_image, [512 512]); Mw=size(watermarked_image,1); %Height Nw=size(watermarked_image,2); %Width % use lsb of watermarked image to recover watermark for ii = 1:Mw for jj = 1:Nw watermark(ii,jj)=bitget((watermarked_image(ii,jj)),1); end end double(watermark); % scale the recovered watermark watermark=256*double(watermark); % scale and display recovered watermark figure, imshow(watermark,[]); % display processing time elapsed_time_d=cputime-start_time, %psnr psnr_d=psnr(cover_object,watermarked_image,Mc,Nc), % scale and display recovered watermark figure, imshow(watermark,[]); title('Recovered Watermark');

PSNR

function [A] = psnr(image,image_prime,M,N) % convert to doubles image=double(image); image_prime=double(image_prime); % avoid divide by zero nastiness if ((sum(sum(image-image_prime))) == 0) error('Input vectors must not be identical') else psnr_num=M*N*max(max(image.^2)); % calculate numerator psnr_den=sum(sum((image-image_prime).^2)); % calculate denominator A=psnr_num/psnr_den; % calculate PSNR end return

Page 84: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 73

RC4IM2 function outputdata = RC4IM2(key, inputdata) ln = length(inputdata); s = 0:255; j = 0; for i = 0:255 k = key( mod(i,ln)+1 ); j = mod( j + k + s(i+1), 256); tmp = s(i+1); s(i+1) = s(j+1); s(j+1) = tmp; end i = 0; j = 0; for k = 1:ln i = mod( i+1, 256 ); j = mod( j+s(i+1), 256 ); tmp = s(i+1); s(i+1) = s(j+1); s(j+1) = tmp; t = mod( s(i+1) + mod( s(j+1), 256 ) , 256 ); A1 = int16(inputdata(k)) - int16(s(t+1)); if A1 < 0 A1 = A1 + 256; end outputdata(k) = mod( A1, 256 ); end end

RC4IM2D function outputdata = RC4IM2(key, inputdata) ln = length(inputdata); s = 0:255; j = 0; for i = 0:255 k = key( mod(i,ln)+1 ); j = mod( j + k + s(i+1), 256); tmp = s(i+1); s(i+1) = s(j+1); s(j+1) = tmp; end

Page 85: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 74

i = 0; j = 0; for k = 1:ln i = mod( i+1, 256 ); j = mod( j+s(i+1), 256 ); tmp = s(i+1); s(i+1) = s(j+1); s(j+1) = tmp; t = mod( s(i+1) + mod( s(j+1), 256 ) , 256 ); A1 = int16(inputdata(k)) - int16(s(t+1)); if A1 < 0 A1 = A1 + 256; end outputdata(k) = mod( A1, 256 ); end end clear all close all clc img(1:750) = 0; i = 1; delete(instrfind); pause(0.2) s2 = serial('COM13', 'BaudRate', 9600); fopen(s2) for i = 1:750 idn = fscanf(s2); img(i) = idn(1); i = i + 1; end fclose(s2); img1 = char(img); m = 1; msg_img(1:15,1:50) = 0; for i = 1:15 for j = 1:50 msg_img(i,j) = img1(m) - 48; m = m + 1; end end figure, imshow(uint8(msg_img)); imwrite(msg_img, '_copyright.bmp');

Page 86: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 75

VisCrypt function [share1, share2] = VisCrypt(inImg) [imr, imc] = size(inImg); share1 = zeros(1:imr, 1:imc); share2 = zeros(1:imr, 1:imc); % Threshold for generation shares delta = 45; % Image classification into background and textured regions i = 1; while i < (imr + 1) for j = 1 : imc aa = inImg(i, j) > delta; bb = inImg(i, j) < (255 - delta); if (aa && bb) bla(i,j) = inImg(i, j); blb(i,j) = 0; else bla(i,j) = 0; blb(i,j) = inImg(i, j); end end i = i + 1; end key = [240 169 196 235 83 85 157 102 12 43 55 79 93 108 188 55]; outputdata = []; % determine size of cover image Mc=size(bla,1); %Height Nc=size(bla,2); %Width %encript im(1:Mc, 1:Nc) = bla(1:Mc, 1:Nc); for r = 1:Mc for c = 1:16:Nc t = [im(r,c), im(r,c+1), im(r,c+2), im(r,c+3), im(r,c+4), im(r,c+5), im(r,c+6), im(r,c+7), im(r,c+8), im(r,c+9), im(r,c+10), im(r,c+11), im(r,c+12), im(r,c+13), im(r,c+14), im(r,c+15)]; outputdata = RC4IM2(key, t); [im(r,c), im(r,c+1), im(r,c+2), im(r,c+3), im(r,c+4), im(r,c+5), im(r,c+6), im(r,c+7), im(r,c+8), im(r,c+9), im(r,c+10), im(r,c+11), im(r,c+12), im(r,c+13), im(r,c+14), im(r,c+15)] = oneto16(outputdata); end end share1(1:Mc, 1:Nc) = im(1:Mc, 1:Nc);

Page 87: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 76

key = [240 169 196 235 83 85 157 102 12 43 55 79 93 108 188 55]; outputdata = []; % determine size of cover image Mc2=size(blb,1); %Height Nc2=size(blb,2); %Width %encript im(1:Mc2, 1:Nc2) = blb(1:Mc2, 1:Nc2) for r = 1:Mc2 for c = 1:16:Nc2 t = [im(r,c), im(r,c+1), im(r,c+2), im(r,c+3), im(r,c+4), im(r,c+5), im(r,c+6), im(r,c+7), im(r,c+8), im(r,c+9), im(r,c+10), im(r,c+11), im(r,c+12), im(r,c+13), im(r,c+14), im(r,c+15)]; outputdata = RC4IM2(key, t); [im(r,c), im(r,c+1), im(r,c+2), im(r,c+3), im(r,c+4), im(r,c+5), im(r,c+6), im(r,c+7), im(r,c+8), im(r,c+9), im(r,c+10), im(r,c+11), im(r,c+12), im(r,c+13), im(r,c+14), im(r,c+15)] = oneto16(outputdata); end end share2(1:Mc2, 1:Nc2) = im(1:Mc2, 1:Nc2);

VisdeCrypt function [rec_share1, rec_share2] = VisdeCrypt(share1, share2) key = [240 169 196 235 83 85 157 102 12 43 55 79 93 108 188 55]; outputdata = []; % determine size of watermarked image Mw=size(share1,1); %Height Nw=size(share1,2); %Width w_im(1:Mw,1:Nw) = share1(1:Mw,1:Nw); %decript for r = 1:Mw for c = 1:16:Nw t = [w_im(r,c), w_im(r,c+1), w_im(r,c+2), w_im(r,c+3), w_im(r,c+4), w_im(r,c+5), w_im(r,c+6), w_im(r,c+7), w_im(r,c+8), w_im(r,c+9), w_im(r,c+10), w_im(r,c+11), w_im(r,c+12), w_im(r,c+13), w_im(r,c+14), w_im(r,c+15)]; outputdata = RC4IM2D(key, t); [w_im(r,c), w_im(r,c+1), w_im(r,c+2), w_im(r,c+3), w_im(r,c+4), w_im(r,c+5), w_im(r,c+6), w_im(r,c+7), w_im(r,c+8), w_im(r,c+9), w_im(r,c+10), w_im(r,c+11), w_im(r,c+12), w_im(r,c+13), w_im(r,c+14), w_im(r,c+15)] = oneto16(outputdata); end end

Page 88: Steganography Using Visual Cryptography

R V College of Engineering 2013-14

Department of Telecommunication Engineering Page 77

rec_share1(1:Mw,1:Nw) = w_im(1:Mw,1:Nw); key = [240 169 196 235 83 85 157 102 12 43 55 79 93 108 188 55]; outputdata = []; % determine size of watermarked image Mw2=size(share2,1); %Height Nw2=size(share2,2); %Width w_im(1:Mw2,1:Nw2) = share2(1:Mw2,1:Nw2); %decript for r = 1:Mw2 for c = 1:16:Nw2 t = [w_im(r,c), w_im(r,c+1), w_im(r,c+2), w_im(r,c+3), w_im(r,c+4), w_im(r,c+5), w_im(r,c+6), w_im(r,c+7), w_im(r,c+8), w_im(r,c+9), w_im(r,c+10), w_im(r,c+11), w_im(r,c+12), w_im(r,c+13), w_im(r,c+14), w_im(r,c+15)]; outputdata = RC4IM2D(key, t); [w_im(r,c), w_im(r,c+1), w_im(r,c+2), w_im(r,c+3), w_im(r,c+4), w_im(r,c+5), w_im(r,c+6), w_im(r,c+7), w_im(r,c+8), w_im(r,c+9), w_im(r,c+10), w_im(r,c+11), w_im(r,c+12), w_im(r,c+13), w_im(r,c+14), w_im(r,c+15)] = oneto16(outputdata); end end rec_share2(1:Mw2,1:Nw2) = w_im(1:Mw2,1:Nw2);

Page 89: Steganography Using Visual Cryptography

Pratheek Praveen Kumar, Ruchir Bhagat and Shiksha Suvarna, all Graduates in Telecommunication

Engineering, authored this scholarly research work after exhaustive joint study conducted at R.V. College

of Engineering in Bangalore in 2013 and 2014.

Digital Watermarking schemes are widely being used as potential solution for ownership protection. The

Watermarking algorithms in general may be viewed as digital communication scheme for imperceptible

transmission of an auxiliary message through cover image. Several software implementations of the

proposed algorithms are available, but very few attempts have been made for the property of robustness and

they are not able to provide the good visual Recovery Watermark Image (IWD) as user aspect. This is

accomplished by spreading one watermark bit over many samples of the Cover data using a modulated

spreading sequence.

This study is based on this technology.