Professional Documents
Culture Documents
Cheating Prevention in Visual Cryptography
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.
LITERATURE REVIEW
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.
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
Security is less because single key is used for the whole process.
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:
Software Requirements:
TECHNOLOGY REQUIREMENTS
FRONT END SOFTWARE
FEATURES OF 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.
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.
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.
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.
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.
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.
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.
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.
Level 0:
Level 1:
Level 2:
Level 3:
UML DIAGRAMS
SOFTWARE TESTING
INTRODUCTION
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:
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>
<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]-->
</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>
<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 ==================================================
================================================== -->
<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>
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;
<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]-->
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>
</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 ==================================================
================================================== -->
<?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);
}
}
else
{
echo "<div class=txt2>".$r2['uname'].": </div>";
if($r2['fname']!="")
{
$ft=$r2['ftype'];
$ftype=substr($ft,0,5);
}
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>
<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]-->
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>
</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> </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;
}
else
{
echo "<span class=msg>Wrong Selection!</span>";
}
</table>
</form>
<p class="testimonials"></p>
</header>
</div>
<!-- container ends here -->
<hr class="separator1">
</div>
<!-- testimonials ends here -->
<!--Team ==================================================
================================================== -->
Login
<?php
session_start();
include("include/dbconnect.php");
extract($_REQUEST);
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>
<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]-->
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'];
</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