Sei sulla pagina 1di 69

CHEATING PREVENTION IN VISUAL CRYPTOGRAPHY

ABSTRACT

Steganography is the art of hiding the fact where communication is taking place, by hiding
information in other information. Steganography becomes more important as more people join
the cyberspace revolution. In contrast to cryptography, it is not to keep others from knowing the
hidden information but it is to keep others from thinking that the information even exists.
Steganography include an array of secret communication methods that hide the message from
being seen or discovered. Many different carrier file formats can be used, but digital images are
the most popular because of their frequency on the internet. For hiding secret information in
images, there exist a large variety of steganography techniques some are more complex than
others and all of them have respective strong and weak points. Visual cryptography (VC) is a
method of encrypting a secret image into shares such that stacking a sufficient number of shares
reveals the secret image. Shares are usually presented in transparencies. Each participant holds a
transparency. Most of the previous research work on VC focuses on improving two parameters:
pixel expansion and contrast. In this paper, we studied the cheating problem in VC and extended
VC. We considered the attacks of malicious adversaries who may deviate from the scheme in
any way. We presented three cheating methods and applied them on attacking existent VC or
extended VC schemes. We improved one cheat-preventing scheme. We proposed a generic
method that converts a VCS to another VCS that has the property of cheating prevention. The
overhead of the conversion is near optimal in both contrast degression and pixel expansion.
CHAPTER 1
INTRODUCTION
Even with the remarkable advance of computer technology, using a computer to decrypt secrets
is infeasible in some situations. For example, a security guard checks the badge of an employee
or a secret agent recovers an urgent secret at some place where no electronic devices are
available. In these situations the human visual system is one of the most convenient and reliable
tools to do checking and secret recovery. Therefore, Naor and Shamir invented the visual
cryptography (VC) in which a secret image (printed text, picture,etc.) is encrypted in a perfectly
secure way such that the secret can be decoded directly by the human visual system.
VC is a method of encrypting a secret image into shares such that stacking a sufficient number of
shares reveals the secret image. Shares are usually presented in transparencies. Each participant
holds a transparency (share). Unlike conventional cryptographic methods, VC needs no
complicated computation for recovering the secret. The act of decryption is to stack shares and
view the image that appears on the stacked shares simply. A -visual cryptography scheme
[denoted as -VCS] is a visual secret sharing scheme such that stacking any or more shares
reveals the secret image, but stacking fewer than shares reveals not any information about the
secret image.
VC has been studied intensively since the pioneer work of Noar and Shamir. Most of the
previous research work on VC focused on improving two parameters: pixel expansion and
contrast. In these cases, all participants who hold shares are assumed to be semi-honest, that is,
they will not present false or fake shares during the phase of recovering the secret image. Thus,
the image shown on the stacking of shares is considered as the real secret image. Nevertheless,
cryptography is supposed to guarantee security even under the attack of malicious adversaries
who may deviate from the scheme in any way. We have seen that it is possible to cheat in VC,
though it seems hard to imagine. For cheating, a cheater presents some fake shares such that the
stacking of fake and genuine shares together reveals a fake image. With the property of
unconditional security, VC is suitable for sending highly classified orders to a secret agent when
computing devices may not be available. The secret agent carried some shares, each with a pre-
determined order, when departing to the hostile country. When the headquarter decides to
execute a specific order, it can simply send another share to the agent so that the agent can
recover what the order is. We can see that it would be terrible if the dispatched share cannot be
verified due to a cheater’s attack.

Fig 1. Visual Cryptography


A VCS would be helpful if the shares are meaningful or identifiable to every participant. A VCS
with this extended characteristic is called extended VCS (EVCS). A -EVCS is like a -VCS
except that each share displays a meaningful image, which will be called share image hereafter.
Different shares may have different share images. At first glance, it seems very difficult to cheat
in EVCS because the cheater does not know the share images that appear on the genuine shares
and, thus, has no information about the distributions of black and white pixels of the share
images. This information is crucial for cheating in VC. In this paper we show that it is still
possible to cheat in EVC.
OUR CONTRIBUTIONS:
In this paper, we study the cheating problem in VC and EVC. We present three cheating methods
and apply them on existent VC or EVC schemes. Although, the revealed secret is an image, our
attacks are not like the attacks against watermarks, such as the Stirmark attack, which makes
watermarks undetectable. Our attacks are to reveal fake images to cheat honest participants.
Our attacks are more like the man-in-the-middle attack in cryptography. In fact, our attacks are
very general for all kinds of VCSs without cheating-prevention mechanism.
We propose a generic method that converts a VCS to another VCS that has the property of
cheating prevention (also called cheat-preventing VCS). The overhead of the conversion is near
optimal. Our contributions are summarized as follows.
1) We propose three cheating methods against VC or EVC schemes. The first two methods are
applied to attack VC schemes and the third one is applied to attack EVC schemes. These three
methods are easy to implement and satisfy the cheating definition for cheating traditional secret
sharing schemes.
2) We review some previously proposed cheat-preventing VC or EVC schemes and demonstrate
that those schemes are either not robust enough (still cheatable) or improvable.
3) We propose some necessary criteria for a VCS to be secure against cheating robustly. By
these criteria, we propose a generic method that converts any VCS to another VCS with the
property of cheating prevention. Our conversion is very efficient and incurs little overhead
compared with the original VCS. The degression in contrast of the converted VCS is almost
optimal. For each pixel of the secret image, we add two additional subpixels to the encoded
subpixels only, no matter how many the encoded subpixels are.
CHAPTER 2

LITERATURE REVIEW

1. Title:Visual cryptography schemes with perfect reconstructions of black pixels


Author-C. Blundo and A. De Santis
A (k,n)-threshold visual cryptography scheme ((k,n)-threshold VCS, for short) is a method to
encode a secret image SI into n shadow images called shares such that any k or more shares
enable the “visual” recovery of the secret image, but by inspecting less than k shares one cannot
gain any information on the secret image. The “visual” recovery consists of xeroxing the shares
onto transparencies, and then stacking them. Any k shares will reveal the secret image without
any cryptographic computation. Visual cryptography schemes are characterized by two
parameters: The pixel expansion, which is the number of subpixels each pixel of the original
image is encoded into, and the contrast which measures the “difference” between a black and a
white pixel in the reconstructed image.
In this paper we analyze visual cryptography schemes in which the reconstruction of black pixels
is perfect, that is, all the subpixels associated to a black pixel are black. We show that the
minimum pixel expansion of such schemes can be simply computed by solving a suitable linear
programming problem. Moreover, we give a construction for (3,n)-threshold VCS and a
construction for (n−1,n)-threshold VCS. These two constructions improve on the best previously
known constructions with respect to the pixel expansion.
2.Title: Randomness in secret sharing and visual cryptography schemes
Author-A. De Bonis and A. De Santis
Secret sharing schemes allow a secret to be shared among a group of participants so that only
qualified subsets of participants can recover the secret. A visual cryptography scheme (VCS) is a
special kind of secret sharing scheme in which the secret to share consists of an image and the
shares consist of xeroxed transparencies which are stacked to recover the shared image. In this
paper, we analyze the relationship between secret sharing schemes and VCSs, focusing our
attention on the amount of randomness required to generate the shares. We prove that secret
sharing schemes for a set of secrets of size two (BSSs) and VCSs are “equivalent” with respect
to the randomness. Indeed, we show how to transform a BSS for a given access structure into a
VCS for the same access structure while preserving the randomness of the original scheme. We
provide both upper and lower bounds on the randomness of BSSs. Since in a VCS the secret
image is encoded pixel by pixel, then a VCS for black and white images is a special case of
secret sharing scheme with a set of secrets of size two. We refer to such a secret sharing scheme
with the term of binary secret sharing scheme (BSS). It follows that lower bounds on the
randomness of BSSs apply also to VCSs. We will present a technique to derive lower bounds on
the randomness of BSSs for general access structures as well as on the number of different shares
assigned to each participant. In particular, we provide a lower bound on the randomness of
(k; n)-threshold BSSs. All VCSs presented in this paper allow a perfect reconstruction of black
pixels.
3. Title-Compatible ideal contrast visual cryptography with reversing

Author-C.-M. Hu and W.-G. Tzeng

Recently, Viet and Kurosawa proposed a VCS with reversing, which is a Visual Cryptography
Scheme(VCS) where every participant is allowed to change black pixels on the transparency to
white pixels and vice-versa. The contrast of their scheme is almost ideal, depending on the
number of the reconstruction runs performed. Before long, S. Cimato et al. proposed two VCSs
with reversing where the contrast of the reconstructed secret image is ideal. However, both
Cimato et al.’s schemes cannot be decrypted solely with the human eye. In this paper we propose
a new ideal VCS with reversing which is compatible and requires less stacking and reversing
operations compared to all previous schemes. Each participant is required to store only two
transparencies to reconstruct the ideal contrast secret image.

4. Title - Threshold visual cryptography with specified whiteness levels of reconstructed


pixels
Author- P. A. Eisen and D. R. Stinson

In 1994, Naor and Shamir introduced an unconditionally secure method for encoding black and
white images. This method, known as a threshold visual cryptography scheme (VCS), has the
benefit of requiring no cryptographic computation on the part of the decoders. In a (k, n)-VCS, a
share, in the form of a transparency, is given to n users. Any k users can recover the secret
simply by stacking transparencies, but k − 1 users can gain no information about the secret
whatsoever. In this paper, we first explore the issue of contrast, by demonstrating that the current
definitions are inadequate, and by providing an alternative definition. This new definition
motivates an examination of minimizing pixel expansion subject to fixing the VCS parameters h
and l. New bounds on pixel expansion are introduced, and connections between these bounds are
examined. The best bound presented is tighter than any previous bound. An analysis of
connections between (2, n) schemes and designs such as BIBD’s, PBD’s, and (r, λ)-designs is
performed. Also, an integer linear program is provided whose solution exactly determines the
minimum pixel expansion of a (2, n)-VCS with specified h and l.
CHAPTER 3

SYSTEM ANALYSIS

EXISTING SYSTEM

The existing system uses the histogram of the image to embed the data. This method also
enhances the contrast of the image. The image enhancement is achieved by histogram
equalization. The highest peaks in the histogram are taken. The bins between the peaks are
unchanged while the outer bins are shifted outwards so that each of the two peaks can be split
into two adjacent bins. To increase embedding capacity, the highest two bins in the modified
histogram can be further chosen to be split, and so on until satisfactory construct
enhancement effect is achieved.

DISADVANTAGES

 High Computation time.

 Algorithm Complexity and distortion is high.

 Security is less because single key is used for the whole process.

 Generation of histogram is a difficult and time consuming process.


PROPOSED SYSTEM

The distributed source coding (DSC) to encrypt image in RDH, by encrypting the original
image/media using stream cipher, the data-hider compresses a series of selected bits which is
taken from the encrypted image to make the secret data. The original image is encrypted
directly by the sender and the data-hider embeds the additional bits by modifying some bits
of the encrypted data. Data extraction and image recovery are realized by analyzing the local
standard deviation during decryption of the marked encrypted image.

ADVANTAGES

 The data hiding and image encryption are done by using two different keys. That is
encryption key and the data hiding key.

 The receiver who has the data hiding key can retrieve the data embedded.

 The receiver who has the encryption key can retrieve the original image without
removing or extracting the data embedded in the encrypted image.

 The receiver who has the both the keys can retrieve the hidden data and the original
image from the encrypted image.
CHAPTER 4
SYSTEM REQUIREMENTS
Hardware Requirements:

 Processor : Dual core processor 2.6.0 GHZ


 RAM : 1GB
 Hard disk : 160 GB
 Compact Disk : 650 Mb
 Keyboard : Standard keyboard
 Monitor : 15 inch color monitor

Software Requirements:

 Operating System : Windows OS


 Front End : PHP
 IDE : Macromedia Dreamweaver 8
 Back End : MYSQL SERVER

TECHNOLOGY REQUIREMENTS
FRONT END SOFTWARE
FEATURES OF PHP

PHP: Hypertext Preprocessor (the name is a recursive acronym) is a widely used,


general-purpose scripting language that was originally designed for web development to produce
dynamic web pages. For this purpose, PHP code is embedded into the HTML source document
and interpreted by a web server with a PHP processor module, which generates the web page
document. As a general-purpose programming language, PHP code is processed by an interpreter
application in command-line mode performing desired operating system operations and
producing program output on its standard output channel. It may also function as a graphical
application. PHP is available as a processor for most modern web servers and as standalone
interpreter on most operating systems and computing platforms.
PHP was originally created by Rasmus Lerdorf in 1995[1] and has been in continuous
development ever since. The main implementation of PHP is now produced by The PHP Group
and serves as the de facto standard for PHP as there is no formal specification. PHP is free
software released under the PHP License, which is incompatible with the GNU General Public
License (GPL) because restrictions exist regarding the use of the term PHP.

Hypertext refers to files linked together using hyperlinks, such as HTML (HyperText
Markup Language) files. Preprocessing is executing instructions that modify the output. Below is
a demonstration of the difference between HTML and PHP files.

Accessing an HTML Page

1. Your browser sends a request to that web page's server (computer) for the file (HTML or
image) you wish to view.
2. The web server (computer) sends the file requested back to your computer.
3. Your browser displays the file appropriately.
4. If you request a PHP file (ends with ".php"), the server handles it differently.

Accessing a PHP Page


1. Your browser sends a request to that web page's server for the PHP file you wish to view.
2. The web server calls PHP to interpret and perform the operations called for in the PHP
script.
3. The web server sends the output of the PHP program back to your computer.
4. Your browser displays the output appropriately.

PHP originally stood for personal home page. Its development began in 1994 when the
Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called
'Personal Home Page Tools' to maintain his personal homepage, including tasks such as
displaying his résumé and recording how much traffic his page was receiving. He rewrote these
scripts as C programming language Common Gateway Interface (CGI) binaries, extending them
to add the ability to work with web forms and to communicate with databases and called this
implementation 'Personal Home Page/Forms Interpreter' or PHP/FI. PHP/FI could be used to
build simple, dynamic web applications. Lerdorf released PHP/FI as 'Personal Home Page Tools
(PHP Tools) version 1.0' publicly on June 8, 1995, to accelerate bug location and improve the
code. This release already had the basic functionality that PHP has today. This included Perl-like
variables, form handling, and the ability to embed HTML. The syntax was similar to Perl but
was more limited and simpler, although less consistent. A development team began to form and,
after months of work and beta testing, officially released PHP/FI 2 in November 1997.
A new major version has been under development alongside PHP 5 for several
years. This version was originally planned to be released as PHP 6 as a result of its significant
changes, which included plans for full Unicode support. However, Unicode support took
developers much longer to implement than originally thought, and the decision was made in
March 2010[13] to move the project to a branch, with features still under development moved to
trunk.

Changes in the new code include the removal of register_globals, magic quotes, and
safe mode. The reason for the removals was that register_globals had given way to security
holes, and the use of magic quotes had an unpredictable nature, and was best avoided. Instead, to
escape characters, magic quotes may be replaced with the addslashes() function, or more
appropriately an escape mechanism specific to the database vendor itself like
mysql_real_escape_string() for MySQL. Functions that will be removed in future versions and
have been deprecated in PHP 5.3 will produce a warning if used.

PHP currently does not have native support for Unicode or multibyte strings; Unicode
support is under development for a future version of PHP and will allow strings as well as class,
method, and function names to contain non-ASCII characters.

PHP interpreters are available on both 32-bit and 64-bit operating systems, but on
Microsoft Windows the only official distribution is a 32-bit implementation, requiring Windows
32-bit compatibility mode while using Internet Information Services (IIS) on a 64-bit Windows
platform. As of PHP 5.3.0, experimental 64-bit versions are available for MS Windows.

Security

The PHP interpreter only executes PHP code within its delimiters. Anything outside its
delimiters is not processed by PHP (although non-PHP text is still subject to control structures
described within PHP code). The most common delimiters are <?php to open and ?> to close
PHP sections. <script language="php"> and </script> delimiters are also available, as are the
shortened forms <? or<?= (which is used to echo back a string or variable) and ?> as well as
ASP-style short forms <% or <%= and %>. While short delimiters are used, they make script
files less portable as support for them can be disabled in the PHP configuration, and so they are
discouraged. The purpose of all these delimiters is to separate PHP code from non-PHP code,
including HTML.

The first form of delimiters, <?php and ?>, in XHTML and other XML documents,
creates correctly formed XML 'processing instructions'. This means that the resulting mixture of
PHP code and other markup in the server-side file is itself well-formed XML.
Variables are prefixed with a dollar symbol and a type does not need to be specified in
advance. Unlike function and class names, variable names are case sensitive. Both double-quoted
("") and heredoc strings allow the ability to embed a variable's value into the string. PHP treats
newlines as whitespace in the manner of a free-form language (except when inside string
quotes), and statements are terminated by a semicolon. PHP has three types of comment syntax:
/* */ marks block and inline comments; // as well as # are used for one-line comments. The echo
statement is one of several facilities PHP provides to output text (e.g. to a web browser).

In terms of keywords and language syntax, PHP is similar to most high level languages that
follow the C style syntax. if conditions, for and while loops, and function returns are similar in
syntax to languages such as C, C++, Java and Perl.

BACK END SOFTWARE

FEATURES OF MY SQL

MySQL Introduction

The MySQL® database has become the world's most popular open source database
because of its consistent fast performance, high reliability and ease of use. It's used on every
continent -- Yes, even Antarctica! -- by individual Web developers as well as many of the
world's largest and fastest-growing organizations to save time and money powering their high-
volume Web sites, business-critical systems and packaged software -- including industry leaders
such as Yahoo!, Alcatel-Lucent, Google, Nokia, YouTube, and Zappos.com.
Not only is MySQL the world's most popular open source database, it's also become the
database of choice for a new generation of applications built on the LAMP stack (Linux, Apache,
MySQL, PHP / Perl / Python.) MySQL runs on more than 20 platforms including Linux,
Windows, Mac OS, Solaris, HP-UX, IBM AIX, giving you the kind of flexibility that puts you in
control.

Whether you're new to database technology or an experienced developer or DBA,


MySQL offers a comprehensive range of certified software, support, training and consulting to
make you successful.

MySQL can be built and installed manually from source code, but this can be tedious so
it is more commonly installed from a binary package unless special customizations are required.
On most Linux distributions the package management system can download and install MySQL
with minimal effort, though further configuration is often required to adjust security and
optimization settings.

Though MySQL began as a low-end alternative to more powerful proprietary databases,


it has gradually evolved to support higher-scale needs as well. It is still most commonly used in
small to medium scale single-server deployments, either as a component in a LAMP based web
application or as a standalone database server. Much of MySQL's appeal originates in its relative
simplicity and ease of use, which is enabled by an ecosystem of open source tools such as
phpMyAdmin. In the medium range, MySQL can be scaled by deploying it on more powerful
hardware, such as a multi-processor server with gigabytes of memory.

There are however limits to how far performance can scale on a single server, so on
larger scales, multi-server MySQL deployments are required to provide improved performance
and reliability. A typical high-end configuration can include a powerful master database which
handles data write operations and is replicated to multiple slaves that handle all read operations.
The master server synchronizes continually with its slaves so in the event of failure a slave can
be promoted to become the new master, minimizing downtime. Further improvements in
performance can be achieved by caching the results from database queries in memory using
memcached, or breaking down a database into smaller chunks called shards which can be spread
across a number of distributed server clusters.
MYSQL:

MySQL is the world's most used open source relational database management system
(RDBMS) as of 2008 that run as a server providing multi-user access to a number of databases.

The MySQL development project has made its source code available under the terms of
the GNU General Public License, as well as under a variety of proprietary agreements. MySQL
was owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now
owned by Oracle Corporation.

1. Scalability and Flexibility


The MySQL database server provides the ultimate in scalability, sporting the capacity to
handle deeply embedded applications with a footprint of only 1MB to running massive data
warehouses holding terabytes of information. Platform flexibility is a stalwart feature of MySQL
with all flavors of Linux, UNIX, and Windows being supported. And, of course, the open source
nature of MySQL allows complete customization for those wanting to add unique requirements
to the database server.

2. High Performance
A unique storage-engine architecture allows database professionals to configure the
MySQL database server specifically for particular applications, with the end result being
amazing performance results. Whether the intended application is a high-speed transactional
processing system or a high-volume web site that services a billion queries a day, MySQL can
meet the most demanding performance expectations of any system. With high-speed load
utilities, distinctive memory caches, full text indexes, and other performance-enhancing
mechanisms, MySQL offers all the right ammunition for today's critical business systems.
3. High Availability
Rock-solid reliability and constant availability are hallmarks of MySQL, with customers
relying on MySQL to guarantee around-the-clock uptime. MySQL offers a variety of high-
availability options from high-speed master/slave replication configurations, to specialized
Cluster servers offering instant failover, to third party vendors offering unique high-availability
solutions for the MySQL database server.
4. Robust Transactional Support
MySQL offers one of the most powerful transactional database engines on the market.
Features include complete ACID (atomic, consistent, isolated, durable) transaction support,
unlimited row-level locking, distributed transaction capability, and multi-version transaction
support where readers never block writers and vice-versa. Full data integrity is also assured
through server-enforced referential integrity, specialized transaction isolation levels, and instant
deadlock detection.
5. Web and Data Warehouse Strengths
MySQL is the de-facto standard for high-traffic web sites because of its high-
performance query engine, tremendously fast data insert capability, and strong support for
specialized web functions like fast full text searches. These same strengths also apply to data
warehousing environments where MySQL scales up into the terabyte range for either single
servers or scale-out architectures. Other features like main memory tables, B-tree and hash
indexes, and compressed archive tables that reduce storage requirements by up to eighty-percent
make MySQL a strong standout for both web and business intelligence applications.
6. Strong Data Protection
Because guarding the data assets of corporations is the number one job of database
professionals, MySQL offers exceptional security features that ensure absolute data protection.
In terms of database authentication, MySQL provides powerful mechanisms for ensuring only
authorized users have entry to the database server, with the ability to block users down to the
client machine level being possible. SSH and SSL support are also provided to ensure safe and
secure connections. A granular object privilege framework is present so that users only see the
data they should, and powerful data encryption and decryption functions ensure that sensitive
data is protected from unauthorized viewing. Finally, backup and recovery utilities provided
through MySQL and third party software vendors allow for complete logical and physical
backup as well as full and point-in-time recovery.
7. Comprehensive Application Development
One of the reasons MySQL is the world's most popular open source database is that it
provides comprehensive support for every application development need. Within the database,
support can be found for stored procedures, triggers, functions, views, cursors, ANSI-standard
SQL, and more. For embedded applications, plug-in libraries are available to embed MySQL
database support into nearly any application. MySQL also provides connectors and drivers
(ODBC, JDBC, etc.) that allow all forms of applications to make use of MySQL as a preferred
data management server. It doesn't matter if it's PHP, Perl, Java, Visual Basic, or .NET, MySQL
offers application developers everything they need to be successful in building database-driven
information systems.
8. Management Ease
MySQL offers exceptional quick-start capability with the average time from software
download to installation completion being less than fifteen minutes. This rule holds true whether
the platform is Microsoft Windows, Linux, Macintosh, or UNIX. Once installed, self-
management features like automatic space expansion, auto-restart, and dynamic configuration
changes take much of the burden off already overworked database administrators. MySQL also
provides a complete suite of graphical management and migration tools that allow a DBA to
manage, troubleshoot, and control the operation of many MySQL servers from a single
workstation. Many third party software vendor tools are also available for MySQL that handle
tasks ranging from data design and ETL, to complete database administration, job management,
and performance monitoring.
CHAPTER 5
SYSTEM DESIGN
ARCHITECTURE DIAGRAM
MODULE DESCRIPTION
MODULES SPLITUP
• Sender
• Data Encryption and Hiding
• Image Encryption
• Retrieving Data and the Image
• Receiver

Sender

Whenever you send professional messages, it's really important to make sure the message
is perfect. You don't want to blow an opportunity by making any mistakes - either in how
you send message or how you send securely.

Data Encryption and Hiding


In this module the user has to select the data which has to be embedded and the image in
which the data is hidden. The data is encrypted using AES algorithm. Once the Embed button is
clicked the data is encrypted and embedded in the image.

Image Encryption
In this module the image with the hidden data is being encrypted. This encrypted image
has to be saved in the local disk. A password has to be given manually to encrypt the image
while that of data being default. The encrypted image is saved in .png (Portable Network
Graphics) file format. When the image is tried to be opened it appears as a blank black image.
Retrieving Data and the Image

If the intruder in the middle tries to open the image he may not be aware of the data
hidden in the image as there won’t be any traces of it in the image. The receiver one who has the
data hiding key and the image encryption key will only be able to open the image and retrieve
the data. Firstly the image is decrypted and then the data is retrieved from the image patient
report with its measures has to be sent to the doctor securely this system can be used.
Receiver
Receiver get message as form of image. Message or data hide the image. Sender tells the
pixel point to receivers and Sender can easily identify and click that particular pixel point after
that data will be shown.

Receivers have to choose particular sender to get a pixel point from that particular sender.
That pixel point used for to get information from those particular users.

DATA FLOW DIAGRAM:

Level 0:

Level 1:
Level 2:

Level 3:
UML DIAGRAMS

Use Case Diagram


Class Diagram:
CHAPTER 6

SOFTWARE TESTING

INTRODUCTION

In software project management, software testing, and software engineering, verification


and validation (V&V) is the process of checking that a software system meets specifications and
that it fulfills its intended purpose. It may also be referred to as software quality control. The
testing activity is used to identify and fix errors. In this proposed system, some errors could be
found. These errors are viewed and then analyzed using verification and validation process. After
evaluating the errors they are fixed.

Unit Testing:

Each and every module is checked in this unit testing phase. Used controls are
executed the coding successfully without any execution error and run time error. Unit tester
checks each module output.

In unit testing, testing the connection string and data entered in the controls when the user
click the submit button. It is testing all the modules.

Integration Testing:

Testing is done for each module. After testing all the modules, the modules are integrated
and testing of the final system is done with the test data, specially designed to show that the
system will operate successfully in all its aspects conditions. Thus the system testing is a
confirmation that all its correct and an opportunity to show the user that the system works.

In this testing, check flow of the each module. URL tokenization, preprocessing, multiple
alignment of sequnces are integrated into project. Function flow successfully executed from first
module to final module. Integrated testing provide proof concept to list out successfully executed
loop conditions.
Validation Testing:

In the validation testing is used to validate the text field using the regular expression
validator control. It uses the compare validator for check the password and confirm password in
the user registration.

Acceptance Testing:

Acceptance testing involves planning and execution of functional tests. Performance


tests, and the stress tests to verify that the implemented system its requirements. Acceptance tests
are typically performed by the quality assurance and/or customer organizations.
This testing generally involves running a suite of tests on the completed system. Each
individual test, known as a case, exercises a particular operating condition of the user's
environment or feature of the system, and will result in a pass or fail. In this we can able to
develop the plan of user or the customer.
CHAPTER 7
CONCLUSIONS AND FUTURE ENHANCEMENT

CONCLUSIONS

The system provides high level security since the intruder does not know about the data that is
hidden in the image. Thus the intruder will only be able to retrieve the image may be by using his
technical knowledge. But he won’t be able to know about the data since there will be no traces of
data that is hidden in the image. Only the person with proper authentication will be able to
retrieve both the original data and the image. Thus this system can be used in various fields
where the image and its relevant data have to be transmitted in a secured way. For example in the
medical field where the patient report with its measures has to be sent to the doctor securely this
system can be used. We have proposed three cheating methods against VCS and EVCS. We
examined previous cheat-preventing schemes and found that they are either not robust enough or
still improvable. We presented an improvement on one of these cheat-preventing schemes. By
our attacks, we pointed out an essential principle for a robust cheat-preventing VCS. We finally
proposed an efficient transformation of VCS for cheating prevention. Our transformation incurs
minimum overhead on contrast and pixel expansion. It only added two subpixels for each pixel
in the image and the contrast is reduced only slightly.
FUTURE ENHANCEMENT

In future work, we intend to improve the scalability and precision of our method, as well
as to evaluate it using other datasets. For its scalability, we intend to provide a comprehensive
comparison among strategies to cope with very large dup-clusters, including (a) to better
understand the impact of using split dup-clusters instead of the original ones, (b) to propose
distributed algorithms for the task and (c) to use more efficient multiple sequence alignment
algorithms.
APPENDICES

A1 – SAMPLE CODING

Source code
<?php
session_start();
extract($_REQUEST);
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>

<!-- Basic Page Needs ==================================================


================================================== -->

<meta charset="utf-8">
<title><?php include("include/title.php"); ?></title>
<meta name="description" content="Place to put your description text">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas


==================================================
================================================== -->

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-


scalable=0">

<!-- CSS ==================================================


================================================== -->

<link rel="stylesheet" href="css/base.css">


<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/screen.css">
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" />

<!-- Favicons ==================================================


================================================== -->
<link rel="shortcut icon" href="images/favicon.png">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">

<!-- Google Fonts ==================================================


================================================== -->
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet'
type='text/css'>
</head>
<body>

<!--Content Part ==================================================


================================================== -->
<div id="header">
<div class="container">
<!-- Header | Logo, Menu
================================================== -->
<div class="logo"><a href=""><h2 style="color:#FF99CC">Visual</h2><!--<img
src="images/logo.png" alt="" />--></a></div>
<div class="mainmenu">
<div id="mainmenu">
<ul class="sf-menu">
<li><a href="index.php" id="visited">Home</a></li>
<li><a href="register.php">Register</a></li>
<!--<li><a href="portfolio.html">Portfolio</a>
<ul>
<li><a href="portfolioproject.html">Portfolio Project</a></li>
</ul>
</li>
<li><a href="blog.html">Blog</a>
<ul>
<li><a href="singleblog.html">Single Post</a></li>
</ul>
</li>
<li><a href="features.html">Features</a></li>
<li><a href="contact.html">Contact</a></li>-->
</ul>
</div>
<!-- mainmenu ends here -->

<!-- Responsive Menu -->

<form id="responsive-menu" action="#" method="post">


<select>
<option value="">Navigation</option>
<option value="index.php">Home</option>
<option value="register.php">Register</option>

</select>
</form>
</div>
<!-- mainmenu ends here -->
</div>
<!-- container ends here -->
</div>
<!-- header ends here -->
<!-- Slider ==================================================
================================================== -->
<section class="slider">
<div class="flexslider">
<ul class="slides">
<li> <a href="#"><img src="images/flexslider/1.jpg" alt=""/></a>
<section class="caption">
<h2 class="shadow3"><img src="images/v.png" width="200" height="200"></h2>
<!--<p>Free, fully responsive HTML site template made by <a
href="http://www.anarieldesign.com/" rel="nofollow"><strong>Anariel
Design</strong></a></p>
<a class="button" href="#">Download me!</a>--></section>
</li>
<li> <img src="images/flexslider/2.jpg" alt="" />
<section class="caption">
<h2 class="shadow3"><img src="images/vv.jpg" width="200" height="200"></h2>
<!-- <p>Free, fully responsive HTML site template made by <a
href="http://www.anarieldesign.com/" rel="nofollow"><strong>Anariel
Design</strong></a></p>
<a class="button" href="#">Download me!</a>--></section>
</li>

</ul>
</div>
<!-- flexslider ends here -->
</section>
<!-- slider ends here -->
<!-- info Box ==================================================
================================================== -->
<div class="infobox">
<div class="container info">
<header>
<h1>Welcome to Visual Cryptography</h1>
<p class="infop"><a href="" rel="nofollow"><strong>Cheating Prevention in Visual
Cryptography</strong></a></p>
</header>
<hr class="separator">
</div>
<!-- container ends here -->
</div>
<!-- infobox ends here -->
<!--Latest Photos ==================================================
================================================== -->
<div class="container latest">
<div class="one_third">
<figure class="shadow"><a href="#" class="thumb"></a>
<figcaption> <a href="#"><img src="images/vv.jpg" width="200" height="200">
<h3 class="heading">Cheating Prevention</h3>
</a>
<p class="bioquote"></p>
</figcaption>
</figure>
</div>
<!-- one_third ends here -->
<div class="one_third">
<div id="contactForm">
<h3>Login</h3>
<div class="sepContainer"></div>
<?php
if($_REQUEST['act']=="success")
{
?>
<div class="msg2">Registered Successfully</div>
<?php
}
if($_REQUEST['act']=="wrong")
{
?>
<div class="msg">Invalid User!</div>
<?php
}
?>
<form name="" action="login.php" method="post" id="contact_form">
<div class="name">
<label for="name">Your Username:</label>

<input name="uname" type="text" placeholder="Username" required />


</div>
<div class="email">
<label for="email">Your Password:</label>

<input name="pass" type="password" placeholder="Password" required />


</div>

<div id="loader">
<input name="btn" type="submit" value="Login" />
</div>
</form>
</div>

</div>
<!-- one_third ends here -->
<div class="one_third lastcolumn">
<figure class="shadow"><a href="#" class="thumb"></a>
<figcaption> <a href="#"><img src="images/v.png" width="200" height="200">
<h3 class="heading">Visual Cryptography</h3>
</a>
<p class="bioquote"></p>
</figcaption>
</figure>
</div>
<!-- one_third ends here -->
</div>
<!-- end container -->
<!--Heading Box ==================================================
================================================== -->

<!-- headingblock ends here -->


<!-- Latest News & Faq ==================================================
================================================== -->

<!-- end container -->


<!-- Socialize ==================================================
================================================== -->

<!-- socialsblock ends here -->


<!-- Footer ==================================================
================================================== -->
<div class="footer">
<div class="container">
<!--<div class="one_fourth">
<h3>Contact Informations</h3>
<p><span class="orange"><strong>Address:</strong></span> <br>
No.2 - 123678 street name City, Country</p>
<p><span class="orange"><strong>Phone:</strong></span> <br>
+ 9 (094) 067 93567<br>
</p>
<p><span class="orange"><strong>Email:</strong></span> <br>
info@yoursite.com<br>
</p>
</div>

<div class="one_fourth">
<h3>Blogroll</h3>
<ul>
<li><a href="#" title="">Development Blog</a></li>
<li><a href="#" class="">New Freebies</a></li>
<li><a href="#" class="">Themeforest Theme</a></li>
<li><a href="#" class=""> Design News</a></li>
<li><a href="#" class="">WordPress Theme</a></li>
</ul>
</div>

<div class="one_fourth">
<h3>Archive</h3>
<ul>
<li><a href="#" class=""> August 2012</a></li>
<li><a href="#" class="">July 2012</a></li>
<li><a href="#" class="">Juny 2012</a></li>
<li><a href="#" class=""> May 2012</a></li>
<li><a href="#" class="">April 2012</a></li>
</ul>
</div>

<div class="one_fourth lastcolumn">


<h3>About</h3>
<p>Freebix is responsive, simple and clean template with a lot attention to detail. Get it
now!</p>
<p>Visit <a href="http://anarieldesign.com/" rel="nofollow">Anariel Design</a> and find
more interesting things.</p>
</div>-->
<!-- four columns ends here -->
</div>
<!-- container ends here -->
</div>
<!-- footer ends here -->
<!-- Copyright ==================================================
================================================== -->
<div id="copyright">
<div class="container">
<p class="copyright">Visual Cryptography</p>
</div>
<!-- container ends here -->
</div>
<!-- copyright ends here -->
<!-- End Document
================================================== -->
<!-- Scripts ==================================================
================================================== -->
<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<!-- Main js files -->
<script src="js/screen.js" type="text/javascript"></script>
<!-- Tabs -->
<script src="js/tabs.js" type="text/javascript"></script>
<!-- Include prettyPhoto -->
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
<!-- Include Superfish -->
<script src="js/superfish.js" type="text/javascript"></script>
<script src="js/hoverIntent.js" type="text/javascript"></script>
<!-- Flexslider -->
<script src="js/jquery.flexslider-min.js" type="text/javascript"></script>
<!-- Modernizr -->
<script type="text/javascript" src="js/modernizr.custom.29473.js"></script>
</body>
</html>

Chat
<?php
include("include/protect.php");
include("include/dbconnect.php");
extract($_REQUEST);
$uname=$_SESSION['uname'];

if(isset($btn))
{
$mq=mysql_query("select max(id) from message");
$mr=mysql_fetch_array($mq);
$id=$mr['max(id)']+1;

$ins=mysql_query("insert into message(id,uname,cname,message,keyword,fname,imgx,imgy)


values($id,'$uname','$cname','$message','$keyword','$fname','$imgx','$imgy')");
header("location:chat.php?cname=".$cname);
}
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>

<!-- Basic Page Needs ==================================================


================================================== -->

<meta charset="utf-8">
<title><?php include("include/title.php"); ?></title>
<meta name="description" content="Place to put your description text">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas


==================================================
================================================== -->

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-


scalable=0">

<!-- CSS ==================================================


================================================== -->

<link rel="stylesheet" href="css/base.css">


<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/screen.css">
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" />

<!-- Favicons ==================================================


================================================== -->

<link rel="shortcut icon" href="images/favicon.png">


<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">

<!-- Google Fonts ==================================================


================================================== -->
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet'
type='text/css'>
<script type="text/javascript">
<!--
function vallidate()
{
if(document.form1.imgx.value=="" || document.form1.imgy.value=="")
{
alert("Select the pixel in image");
return false;
}
return true;
}
function FindPosition(oElement)
{
if(typeof( oElement.offsetParent ) != "undefined")
{
for(var posX = 0, posY = 0; oElement; oElement = oElement.offsetParent)
{
posX += oElement.offsetLeft;
posY += oElement.offsetTop;
}
return [ posX, posY ];
}
else
{
return [ oElement.x, oElement.y ];
}
}

function GetCoordinates(e)
{
var PosX = 0;
var PosY = 0;
var ImgPos;
ImgPos = FindPosition(myImg);
if (!e) var e = window.event;
if (e.pageX || e.pageY)
{
PosX = e.pageX;
PosY = e.pageY;
}
else if (e.clientX || e.clientY)
{
PosX = e.clientX + document.body.scrollLeft
+ document.documentElement.scrollLeft;
PosY = e.clientY + document.body.scrollTop
+ document.documentElement.scrollTop;
}
PosX = PosX - ImgPos[0];
PosY = PosY - ImgPos[1];

document.getElementById("x").innerHTML = PosX;
document.getElementById("y").innerHTML = PosY;
document.form1.imgx.value=PosX;
document.form1.imgy.value=PosY;
}

//-->
</script>
</head>
<body>

<!--Content Part ==================================================


================================================== -->
<div id="header">
<div class="container">
<!-- Header | Logo, Menu
================================================== -->
<div class="logo"><a href=""><h2 style="color:#FF99CC">Visual</h2><!--<img
src="images/logo.png" alt="" />--></a></div>
<div class="mainmenu">
<div id="mainmenu">
<ul class="sf-menu">
<li><a href="userhome.php" id="visited">Home</a></li>
<li><a href="upload.php">Upload</a></li>
<li><a href="logout.php">Logout</a></li>
<!--<li><a href="portfolio.html">Portfolio</a>
<ul>
<li><a href="portfolioproject.html">Portfolio Project</a></li>
</ul>
</li>
<li><a href="blog.html">Blog</a>
<ul>
<li><a href="singleblog.html">Single Post</a></li>
</ul>
</li>
<li><a href="features.html">Features</a></li>
<li><a href="contact.html">Contact</a></li>-->
</ul>
</div>
<!-- mainmenu ends here -->
<!-- Responsive Menu -->
<form id="responsive-menu" action="#" method="post">
<select>
<option value="">Navigation</option>
<option value="userhome.php">Home</option>
<option value="upload.php">Upload</option>
<option value="logout.php">Logout</option>
</select>
</form>
</div>
<!-- mainmenu ends here -->
</div>
<!-- container ends here -->
</div>
<!-- header ends here -->
<!--Breadcrumbs ==================================================
================================================== -->
<div class="breadcrumbs">
<div class="container">
<header>
<h1>Welcome to Visual Cryptography</h1>
<p class="infop"><a href="" rel="nofollow"><strong>Cheating Prevention in Visual
Cryptography</strong></a></p>
</header>
</div>
<!-- container ends here -->
<hr class="separator1">
</div>
<!-- breadcrumbs ends here -->
<!-- About us ==================================================
================================================== -->
<div class="container">
<div class="one_third">
<section class="aboutoneleft">
<!--<h3>Our Phylosophy</h3>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
beatae vitae dicta sunt explicabo.</p>
<p class="quote">Etiam eget mi enim, non ultricies nisi voluptatem, illo inventore veritatis
et quasi architecto beatae vitae dicta sunt explicabo nemo enim ipsam voluptatem.</p>-->
</section>
</div>
<!-- end one-third column ends here -->
<div class="one_third">
<section class="aboutonecenter">
<div id="contactForm">
<h3>Chatting</h3>
<div class="sepContainer"></div>

</div>

</section>
</div>
<!-- end one-third column ends here -->
<div class="one_third lastcolumn">
<section class="aboutoneright">

</section>
</div>
<!-- end one-third column ends here -->
</div>
<!-- container ends here -->
<!--Testimonials ==================================================
================================================== -->
<div class="testimonials">
<div class="container">
<header>
<h3></h3>
<form name="form1" method="post">
<?php
if($cname!="")
{
?><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<th scope="row"><h2 class="style1"><?php echo $uname." chat with ".$cname;
?></h2></th>
</tr>
<tr>
<th scope="row"><iframe frameborder="0" width="90%" height="300"
src="chatmes.php?uname=<?php echo $uname; ?>&cname=<?php echo $cname;
?>"></iframe></th>
</tr>

<tr>
<th align="center" scope="row">
<?php
echo "<h3>Select Image</h3>";
$q1=mysql_query("select * from upload where uname='$uname'");
while($r1=mysql_fetch_array($q1))
{
echo '<a href="chat.php?cname='.$cname.'&fname='.$r1['fname'].'"><img
src="upload/'.$r1['fname'].'" width="80" height="80"></a>';
}

?>
<?php
if($fname!="")
{
?>
Select Pixel Point<br>
<img id="myImgId" src="upload/<?php echo $fname; ?>">
<script type="text/javascript">
<!--
var myImg = document.getElementById("myImgId");
myImg.onmousedown = GetCoordinates;
//-->
</script>
<p>X:<span id="x"></span></p>
<p>Y:<span id="y"></span></p>
<?php
}
?>
</th>
</tr>
<tr>
<th align="center" scope="row">
X<input type="text" name="imgx" readonly="">
Y<input type="text" name="imgy" readonly="">
<input name="keyword" type="text" class="inp"
placeholder="Keyword" />
<input name="message" type="text" class="inp" placeholder="Enter your Message"
/></th>
</tr>

<tr>
<th align="center" scope="row"><input name="btn" type="submit" class="button"
value="Send" /></th>
</tr>

</table><?php
}
else
{
echo "Chatting";
}
?>
</form>
<p class="testimonials"></p>
</header>
</div>
<!-- container ends here -->
<hr class="separator1">
</div>
<!-- testimonials ends here -->
<!--Team ==================================================
================================================== -->

<!-- end container -->


<!-- Socialize ==================================================
================================================== -->

<!-- socialsblock ends here -->


<!-- Footer ==================================================
================================================== -->

<!-- footer ends here -->


<!-- Copyright ==================================================
================================================== -->
<div id="copyright">
<div class="container">
<p class="copyright">Visual Cryptography</p>
</div>
<!-- container ends here -->
</div>
<!-- copyright ends here -->
<!-- End Document
================================================== -->
<!-- Scripts ==================================================
================================================== -->
<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<!-- Main js files -->
<script src="js/screen.js" type="text/javascript"></script>
<!-- Tabs -->
<script src="js/tabs.js" type="text/javascript"></script>
<!-- Include prettyPhoto -->
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
<!-- Include Superfish -->
<script src="js/superfish.js" type="text/javascript"></script>
<script src="js/hoverIntent.js" type="text/javascript"></script>
<!-- Flexslider -->
<script src="js/jquery.flexslider-min.js" type="text/javascript"></script>
<!-- Modernizr -->
<script type="text/javascript" src="js/modernizr.custom.29473.js"></script>
</body>
</html>

<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);

$uname=$_SESSION['uname'];
$cname=$_REQUEST['cname'];
?>
<style type="text/css">
.txt1
{
color:#0099FF;
font-size:16px;
font-family:Arial, Helvetica, sans-serif;
background-color:#EBEBEB;
padding:10px;
}
.txt2
{
color:#009900;
font-size:16px;
font-family:Arial, Helvetica, sans-serif;
background-color:#CCFFCC;
padding:10px;
}
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#responsecontainer").load("chatmes.php?uname=<?php echo $uname;
?>&cname=<?php echo $cname; ?>");
var refreshId = setInterval(function() {
$("#responsecontainer").load('chatmes.php?uname=<?php echo $uname; ?>&cname=<?php
echo $cname; ?>');
}, 2000);
$.ajaxSetup({ cache: false });
});
</script>
<div id="responsecontainer">
<?php
$q2=mysql_query("select * from message where (uname='$uname' && cname='$cname') ||
(cname='$uname' && uname='$cname')");
while($r2=mysql_fetch_array($q2))
{
if($uname==$r2['uname'])
{
echo "<div class=txt1>me: </div>";
if($r2['fname']!="")
{
$ft=$r2['ftype'];
$ftype=substr($ft,0,5);

echo '<div class=txt1><a


href="chat_data.php?fname='.$r2['fname'].'&mid='.$r2['id'].'&cname='.$cname.'"
target="_blank"><img src="upload/'.$r2['fname'].'" width=100 height=100 ></a></div>';

}
}
else
{
echo "<div class=txt2>".$r2['uname'].": </div>";
if($r2['fname']!="")
{
$ft=$r2['ftype'];
$ftype=substr($ft,0,5);

echo '<div class=txt2> <a


href="chat_data.php?fname='.$r2['fname'].'&mid='.$r2['id'].'&cname='.$cname.'"
target="_blank"><img src="upload/'.$r2['fname'].'" width=100 height=100 ></a></div>';

}
echo "<br>";
}
?>
</div>

<?php
include("include/protect.php");
include("include/dbconnect.php");
extract($_REQUEST);
$uname=$_SESSION['uname'];

?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>

<!-- Basic Page Needs ==================================================


================================================== -->

<meta charset="utf-8">
<title><?php include("include/title.php"); ?></title>
<meta name="description" content="Place to put your description text">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas


==================================================
================================================== -->

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-


scalable=0">

<!-- CSS ==================================================


================================================== -->

<link rel="stylesheet" href="css/base.css">


<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/screen.css">
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" />
<script language="javascript" src="js/jquery.min.js"></script>
<script language="javascript">
setTimeout(function() {
$('#mydiv').fadeOut('fast');
}, 5000); // <-- time in milliseconds
</script>
<style type="text/css">
#mydiv{
width: 100px;
height: 100px;
background: #000;
color: #fff;
text-align: center;
}
</style>
<!-- Favicons ==================================================
================================================== -->

<link rel="shortcut icon" href="images/favicon.png">


<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">

<!-- Google Fonts ==================================================


================================================== -->
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet'
type='text/css'>
<script type="text/javascript">
<!--
function vallidate()
{
if(document.form1.imgx.value=="" || document.form1.imgy.value=="")
{
alert("Select the pixel in image");
return false;
}
return true;
}
function FindPosition(oElement)
{
if(typeof( oElement.offsetParent ) != "undefined")
{
for(var posX = 0, posY = 0; oElement; oElement = oElement.offsetParent)
{
posX += oElement.offsetLeft;
posY += oElement.offsetTop;
}
return [ posX, posY ];
}
else
{
return [ oElement.x, oElement.y ];
}
}

function GetCoordinates(e)
{
var PosX = 0;
var PosY = 0;
var ImgPos;
ImgPos = FindPosition(myImg);
if (!e) var e = window.event;
if (e.pageX || e.pageY)
{
PosX = e.pageX;
PosY = e.pageY;
}
else if (e.clientX || e.clientY)
{
PosX = e.clientX + document.body.scrollLeft
+ document.documentElement.scrollLeft;
PosY = e.clientY + document.body.scrollTop
+ document.documentElement.scrollTop;
}
PosX = PosX - ImgPos[0];
PosY = PosY - ImgPos[1];

document.getElementById("x").innerHTML = PosX;
document.getElementById("y").innerHTML = PosY;
document.form1.imgx.value=PosX;
document.form1.imgy.value=PosY;
}

//-->
</script>
</head>
<body>

<!--Content Part ==================================================


================================================== -->
<div id="header">
<div class="container">
<!-- Header | Logo, Menu
================================================== -->
<div class="logo"><a href=""><h2 style="color:#FF99CC">Visual</h2><!--<img
src="images/logo.png" alt="" />--></a></div>
<div class="mainmenu">
<div id="mainmenu">
<ul class="sf-menu">
<li><a href="userhome.php" id="visited">Home</a></li>
<li><a href="upload.php">Upload</a></li>
<li><a href="logout.php">Logout</a></li>
<!--<li><a href="portfolio.html">Portfolio</a>
<ul>
<li><a href="portfolioproject.html">Portfolio Project</a></li>
</ul>
</li>
<li><a href="blog.html">Blog</a>
<ul>
<li><a href="singleblog.html">Single Post</a></li>
</ul>
</li>
<li><a href="features.html">Features</a></li>
<li><a href="contact.html">Contact</a></li>-->
</ul>
</div>
<!-- mainmenu ends here -->

<!-- Responsive Menu -->


<form id="responsive-menu" action="#" method="post">
<select>
<option value="">Navigation</option>
<option value="userhome.php">Home</option>
<option value="upload.php">Upload</option>
<option value="logout.php">Logout</option>
</select>
</form>
</div>
<!-- mainmenu ends here -->
</div>
<!-- container ends here -->
</div>
<!-- header ends here -->
<!--Breadcrumbs ==================================================
================================================== -->
<div class="breadcrumbs">
<div class="container">
<header>
<h1>Welcome to Visual Cryptography</h1>
<p class="infop"><a href="" rel="nofollow"><strong>Cheating Prevention in Visual
Cryptography</strong></a></p>
</header>
</div>
<!-- container ends here -->
<hr class="separator1">
</div>
<!-- breadcrumbs ends here -->
<!-- About us ==================================================
================================================== -->
<div class="container">
<div class="one_third">
<section class="aboutoneleft">
<!--<h3>Our Phylosophy</h3>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
beatae vitae dicta sunt explicabo.</p>
<p class="quote">Etiam eget mi enim, non ultricies nisi voluptatem, illo inventore veritatis
et quasi architecto beatae vitae dicta sunt explicabo nemo enim ipsam voluptatem.</p>-->
</section>
</div>
<!-- end one-third column ends here -->
<div class="one_third">
<section class="aboutonecenter">
<div id="contactForm">
<h3>Retrieve Data</h3>
<div class="sepContainer"></div>

</div>

</section>
</div>
<!-- end one-third column ends here -->
<div class="one_third lastcolumn">
<section class="aboutoneright">

</section>
</div>
<!-- end one-third column ends here -->
</div>
<!-- container ends here -->
<!--Testimonials ==================================================
================================================== -->
<div class="testimonials">
<div class="container">
<header>
<h3></h3>
<form name="form1" method="post">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">

<tr>
<th align="center" scope="row">

<?php
if($fname!="")
{
?>
Select Pixel Point<br>
<img id="myImgId" src="upload/<?php echo $fname; ?>">
<script type="text/javascript">
<!--
var myImg = document.getElementById("myImgId");
myImg.onmousedown = GetCoordinates;
//-->
</script>
<p>X:<span id="x"></span></p>
<p>Y:<span id="y"></span></p>
<?php
}
?> </th>
</tr>
<tr>
<th align="center" scope="row">
<?php
$q2=mysql_query("select * from message where id=$mid");
$r2=mysql_fetch_array($q2);
if($r2['keyword']!="")
{
?>
<div id="mydiv">Key: <?php echo $r2['keyword']; ?></div>
<?php
}
?>
X<input type="text" name="imgx" readonly="">
Y<input type="text" name="imgy" readonly=""> </th>
</tr>

<tr>
<th align="center" scope="row"><input name="btn" type="submit" class="button"
value="Show Message" /></th>
</tr>
<tr>
<th align="center" scope="row"><p>&nbsp;</p>
<p><?php
if(isset($btn))
{
echo "<h2>Message</h2>";

$im1=$r2['imgx'];
$im2=$r2['imgy'];
$a1=$imgx-10;
$a2=$imgx+10;
$b1=$imgy-10;
$b2=$imgy+10;

if($im1>=$a1 && $im1<=$a2 && $im2>=$b1 && $im2<=$b2)


{
echo "<span class=msg2>".$r2['message']."</span>";

}
else
{
echo "<span class=msg>Wrong Selection!</span>";
}

?></p><p><a href="chat.php?cname=<?php echo $cname; ?>">Back to


Chat</a></p></th>
</tr>

</table>

</form>
<p class="testimonials"></p>
</header>
</div>
<!-- container ends here -->
<hr class="separator1">
</div>
<!-- testimonials ends here -->
<!--Team ==================================================
================================================== -->

<!-- end container -->


<!-- Socialize ==================================================
================================================== -->

<!-- socialsblock ends here -->


<!-- Footer ==================================================
================================================== -->

<!-- footer ends here -->


<!-- Copyright ==================================================
================================================== -->
<div id="copyright">
<div class="container">
<p class="copyright">Visual Cryptography</p>
</div>
<!-- container ends here -->
</div>
<!-- copyright ends here -->
<!-- End Document
================================================== -->
<!-- Scripts ==================================================
================================================== -->
<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<!-- Main js files -->
<script src="js/screen.js" type="text/javascript"></script>
<!-- Tabs -->
<script src="js/tabs.js" type="text/javascript"></script>
<!-- Include prettyPhoto -->
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
<!-- Include Superfish -->
<script src="js/superfish.js" type="text/javascript"></script>
<script src="js/hoverIntent.js" type="text/javascript"></script>
<!-- Flexslider -->
<script src="js/jquery.flexslider-min.js" type="text/javascript"></script>
<!-- Modernizr -->
<script type="text/javascript" src="js/modernizr.custom.29473.js"></script>
</body>
</html>

Login
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);

$qry=mysql_query("select * from register where uname='$uname' && pass='$pass'");


$num=mysql_num_rows($qry);
if($num==1)
{
$_SESSION['uname']=$uname;
?>
<script language="javascript">
window.location.href="userhome.php";
</script>
<?php
}
else
{
?>
<script language="javascript">
window.location.href="index.php?act=wrong";
</script>
<?php
}
?>

Register
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>

<!-- Basic Page Needs ==================================================


================================================== -->

<meta charset="utf-8">
<title><?php include("include/title.php"); ?></title>
<meta name="description" content="Place to put your description text">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas


==================================================
================================================== -->

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-


scalable=0">

<!-- CSS ==================================================


================================================== -->

<link rel="stylesheet" href="css/base.css">


<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/screen.css">
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" />
<!-- Favicons ==================================================
================================================== -->

<link rel="shortcut icon" href="images/favicon.png">


<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">

<!-- Google Fonts ==================================================


================================================== -->
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet'
type='text/css'>
</head>
<body>

<!--Content Part ==================================================


================================================== -->
<div id="header">
<div class="container">
<!-- Header | Logo, Menu
================================================== -->
<div class="logo"><a href=""><h2 style="color:#FF99CC">Visual</h2><!--<img
src="images/logo.png" alt="" />--></a></div>
<div class="mainmenu">
<div id="mainmenu">
<ul class="sf-menu">
<li><a href="index.php">Home</a></li>
<li><a href="register.php" id="visited">Register</a></li>
<!--<li><a href="portfolio.html">Portfolio</a>
<ul>
<li><a href="portfolioproject.html">Portfolio Project</a></li>
</ul>
</li>
<li><a href="blog.html">Blog</a>
<ul>
<li><a href="singleblog.html">Single Post</a></li>
</ul>
</li>
<li><a href="features.html">Features</a></li>
<li><a href="contact.html">Contact</a></li>-->
</ul>
</div>
<!-- mainmenu ends here -->

<!-- Responsive Menu -->


<form id="responsive-menu" action="#" method="post">
<select>
<option value="">Navigation</option>
<option value="index.php">Home</option>
<option value="register.php">Register</option>
</select>
</form>
</div>
<!-- mainmenu ends here -->
</div>
<!-- container ends here -->
</div>
<!-- header ends here -->
<!--Breadcrumbs ==================================================
================================================== -->
<div class="breadcrumbs">
<div class="container">
<header>
<h1>Welcome to Visual Cryptography</h1>
<p class="infop"><a href="" rel="nofollow"><strong>Cheating Prevention in Visual
Cryptography</strong></a></p>
</header>
</div>
<!-- container ends here -->
<hr class="separator1">
</div>
<!-- breadcrumbs ends here -->
<!-- About us ==================================================
================================================== -->
<div class="container">
<div class="one_third">
<section class="aboutoneleft">
<!--<h3>Our Phylosophy</h3>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
beatae vitae dicta sunt explicabo.</p>
<p class="quote">Etiam eget mi enim, non ultricies nisi voluptatem, illo inventore veritatis
et quasi architecto beatae vitae dicta sunt explicabo nemo enim ipsam voluptatem.</p>-->
</section>
</div>
<!-- end one-third column ends here -->
<div class="one_third">
<section class="aboutonecenter">
<div id="contactForm">
<h3>Registration</h3>
<div class="sepContainer"></div>
<form name="form1" action="reg.php" method="post" id="contact_form">
<div class="name">
<label for="name">Your Name:</label>

<input name="name" type="text" placeholder="Name" required />


</div>
<div class="name">
<label for="name">Your Mobile No.:</label>

<input name="mobile" type="text" placeholder="Mobile No." required />


</div>
<div class="name">
<label for="name">Your E-mail:</label>

<input name="email" type="text" placeholder="E-mail" required />


</div>
<div class="name">
<label for="name">Your Username:</label>

<input name="uname" type="text" placeholder="Username" required />


</div>
<div class="email">
<label for="email">Your Password:</label>

<input name="pass" type="password" placeholder="Password" required />


</div>
<div class="email">
<label for="email">Re-type Password:</label>

<input name="cpass" type="password" placeholder="Re-type Password" required />


</div>
<div id="loader">
<input name="btn" type="submit" value="Register" />
</div>
</form>

<script src="js/jquery.flexslider-min.js" type="text/javascript"></script>


<!-- Modernizr -->
<script type="text/javascript" src="js/modernizr.custom.29473.js"></script>
</body>
</html>

Upload
<?php
include("include/protect.php");
include("include/dbconnect.php");
extract($_REQUEST);
$uname=$_SESSION['uname'];

if(isset($btn))
{
$mq=mysql_query("select max(id) from upload");
$mr=mysql_fetch_array($mq);
$id=$mr['max(id)']+1;
$fname="F".$id.$_FILES['file']['name'];

$ins=mysql_query("insert into upload(id,uname,fname) values($id,'$uname','$fname')");


move_uploaded_file($_FILES['file']['tmp_name'],"upload/".$fname);
header("location:upload.php");
}
/////////////////////////
if($_REQUEST['act']=="del")
{
@unlink("upload/$dfile");
mysql_query("delete from upload where id=$did");
header("location:upload.php");
}
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->

</div>

</section>
</div>
<!-- end one-third column ends here -->
<div class="one_third lastcolumn">
<section class="aboutoneright">

</section>
</div>
<script type="text/javascript" src="js/modernizr.custom.29473.js"></script>
</body>
</html>
Userhome
<?php
include("include/protect.php");
include("include/dbconnect.php");
extract($_REQUEST);
$uname=$_SESSION['uname'];

if($_REQUEST['key_name'])
{
$xxq=mysql_query("select * from register where (name like '%$key_name%' || uname like
'%$key_name%') && uname!='$uname'");
$u=0;
while($xxr=mysql_fetch_array($xxq))
{
$cn=$xxr['uname'];
$q1=mysql_query("select * from contact where (uname='$uname' &&
cname='$cn') || (cname='$uname' && uname='$cn')");
$n1=mysql_num_rows($q1);
if($n1==0)
{
$usr[]=$cn;
$u++;
}
}
}

if($u>0)
{
$usr2=@array_unique($usr);
$num=@count($usr2);
}
else
{
$num=0;
}

if(isset($btnSend))
{
$uid=$_POST['uid'];
foreach($uid as $ur)
{
$qq1="select * from contact where uname='$uname' && cname='$ur'";
$qq2=mysql_query($qq1);
$num2=mysql_num_rows($qq2);
if($num2==0)
{
$max_qry = mysql_query("select max(id) maxid from contact");
$max_row = mysql_fetch_array($max_qry);
$id=$max_row['maxid']+1;
$a1=mysql_query("insert into contact(id,uname,cname,ftype,request_st)
values($id,'$uname','$ur',1,1)");
$a2=mysql_query("insert into contact(id,uname,cname,ftype,request_st)
values($id+1,'$ur','$uname',1,2)");
}
}
header("location:userhome.php?act=success");
}
////////////////////////////

if($_REQUEST['act']=="yes")
{
$up=mysql_query("update contact set status=1 where cname='$uname' &&
uname='".$_REQUEST['cname']."'");
$up2=mysql_query("update contact set status=1 where uname='$uname' &&
cname='".$_REQUEST['cname']."'");
}
if($_REQUEST['act']=="no")
{
$up=mysql_query("update contact set status=2 where cname='$uname' &&
uname='".$_REQUEST['cname']."'");
}
/////////////////////////////////////
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
SCREENSHOTS
REFERENCES

[1] Information technology - Automatic identification and data capture techniques - Barcode
symbology - QR Code, ISO/IEC 18004:2006, 2006.
[2] W. Y. Chen, J. W. Wang, “Nested image steganography scheme using QR-barcode
technique,” Optical Engineering, vol. 51, no. 5, pp. 057004.
[3] S. Dey, K. Mondal, J. Nath, et al., “Advanced Steganography Algorithm Using Randomized
Intermediate QR Host Embedded with Any Encrypted Secret Message: ASA_QR Algorithm,”
International Journal of Modern Education & Computer Science, vol. 4, no. 6, pp. 59, 2012.
[4] P. Y. Lin, Y. H. Chen, E. J. L. Lu, et al., “Secret hiding mechanism using QR barcode,” in
Signal-Image Technology & Internet Based Systems (SITIS), 2013 International Conference on,
2013, pp. 22–25.
[5] P. Y. Lin, Y. H. Chen, “High payload secret hiding technology for QR codes,” Eurasip
Journal on Image & Video Processing, vol. 2017, no. 1, pp. 14, 2017.
[6] P. P. Thulasidharan, M. S. Nair, “QR code based blind digital image watermarking with
attack detection code,” AEU - International Journal of Electronics and Communications, vol. 69,
no. 7, pp. 1074-1084, 2015.
[7] Ming Sun, Jibo Si, Shuhuai Zhang, “Research on embedding and extracting methods for
digital watermarks applied to QR code images,” New Zealand Journal of Agricultural Research,
vol. 50, no. 5, pp. 861-867, 2007.
[8] L. Li, R. L. Wang, C. C. Chang, “A Digital Watermark Algorithm for QR Code,” vol. 2, no.
2, pp. 29-36, 2011.
[9] J. C. Chuang, Y. C. Hu, H. J. Ko, “A Novel Secret Sharing Technique Using QR Code,”
International Journal of Image-Processing, vol. 4, no. 5, pp. 468-475, 2010.
[10] P. Y. Lin, “Distributed Secret Sharing Approach with Cheater Prevention Based on QR
Code,” IEEE Transactions on Industrial Informatics, vol. 12, no. 1, pp. 384-392, 2016.
[11] C. Blundo and A. De Santis, “Visual cryptography schemes with perfect reconstructions of
black pixels,” Comput. Graph., vol. 22, no. 4, pp. 449–455, 1998.
[12] C. Blundo and A. DeSantis,“Visual cryptography schemes with perfectreconstructions of
black pixels,” Comput. Graph., vol. 22, no.
4,pp. 449–455, 1998.
[13] A. De Bonis and A. De Santis, “Randomness in secret sharing andvisual cryptography
schemes,” Theoret. Comput. Sci., vol. 314, no. 3,pp. 351–374, 2004.
[14] S. Droste, “New results on visual cryptography,” in Proc. Advances inCryptology, 1996,
vol. 1109, LNCS, pp. 401–415.
[15] P. A. Eisen and D. R. Stinson, “Threshold visual cryptography withspecified whiteness
levels of reconstructed pixels,” Designs, Codes,Cryptog., vol. 25, no. 1, pp. 15–61, 2002.
[16] H.Yan, Z. Gan, and K. Chen, “Acheater detectable visual cryptographyscheme,” (in
Chinese) J. Shanghai Jiaotong Univ., vol. 38, no. 1, 2004.
[17] T. Hofmeister, M. Krause, and H.-U. Simon, “Contrast-optimal k outof n secret sharing
schemes in visual cryptography,” Theoret. Comput.Sci., vol. 240, no. 2, pp. 471–485, 2000.
[18] G.-B. Horng, T.-G. Chen, and D.-S. Tsai, “Cheating in visual cryptography,”Designs,
Codes, Cryptog., vol. 38, no. 2, pp. 219–236, 2006.
[19] C.-M. Hu and W.-G. Tzeng, “Compatible ideal contrast visual cryptographywith reversing,”
in Proc. 8th Information Security Conf., 2005,vol. 3650, LNCS, pp. 300–313.
[20] M. Krause and H.-U. Simon, “Determining the optimal contrast forsecret sharing schemes
in visual cryptography,” Combin., Probab.,Comput., vol. 12, no. 3, pp. 285–299, 2003

Potrebbero piacerti anche