Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

1

INFORMATION SECURITY
ANALYSIS AND AUDIT

Team Members:
1. Abhay Mishra 18BCE2530

(abhay.mishra2018@vitstudent.ac.in)

2. K Raksha 18BCE0341

(k.raksha2018@vitstudent.ac.in)

3. Syed Mohammad Saahil 18BCE2226

syedmohammad.saahil2018@vitstudent.ac.in

Report submitted for

the Final Review of the Project

VISUAL CRYPTOGRAPHY
Course Code: ​CSE3501

Slot: G2 + L23 + L24

Submitted to:

Professor ​ANIL KUMAR K - SCOPE.


2

Abstract:

The Internet is the fastest-growing communication medium and an essential part of the
infrastructure, nowadays. To cope with the growth of the internet it has become a constant
struggle to keep the secrecy of information and when profits are involved, protect the
copyright of data. To provide secrecy and copyright of data, many of the steganographic
techniques have been developed. But each of the techniques has its respective pros and
cons. Where one technique lacks in payload capacity, the other lacks robustness. So, the
main emphasis of cryptography is to overcome these shortcomings.

Visual cryptography is a cryptographic technique which allows visual information (pictures,


text, etc.) to be encrypted in such a way that decryption can be done just by sight-reading.
Visual cryptography, a degree associated with rising cryptography technology, uses the
characteristics of human vision to rewrite encrypted photos. Visual cryptography provides
secured digital transmission that is used just for merely the once.

Introduction​:

a. Cryptography

The word cryptography is derived from two Greek words which mean ​“​secret writing​”​.
Cryptography is the process of scrambling the original text by rearranging and substituting
the original text, arranging it in a seemingly unreadable format for others.

Cryptography is an effective way to protect the information that is transmitting through the
network communication path.

b. Visual Cryptography
3

Visual cryptography is a cryptographic technique which allows visual information (pictures,


text, etc.) to be encrypted in such a way that decryption can be done just by sight-reading.
Visual cryptography, a degree associated with rising cryptography technology, uses the
characteristics of human vision to rewrite encrypted photos. Visual cryptography provides
secured digital transmission that is used just for merely the once.

Numerous guidance like military maps and business identifications are transmitted over the
internet. Whereas pattern secret photos, security problems ought to be compelled to be
taken into thought as a result of hackers may utilize weak links over the communication
network to steal info that they need. To touch upon the protection problems with secret
photos, varied image secret sharing schemes are developed. anyone will use it for coding
with no science information and any computations.

Applications of Visual Cryptography:

1. Real-Time Data Communications:

The major effect of using encryption on real-time data communications is on wiretaps.


Wiretap provides valuable information about the criminal's intentions, plans, and any such
rogue activities. Hackers use encryption on real-time data communications to prevent their
communication channels to be intercepted by law enforcement authorities.[9] Internet Relay
Chat(IRC) is a channel that enables hackers to compromise other government machines.

2. Electronic Mail:
4

The criminals use many different ways to encrypt their data in emails. The most used
technique is Pretty Good Privacy(PGP) which provides a key to perform data encryption.
This encryption technique is readily available on the Internet for free, so downloading is very
easy. Electronic mail is very hard to trace.

3. Stored Data:

This is the most commonly used technique by criminals to encrypt their stolen/ confidential
data from law enforcement.

4. Posts Online:

Hackers/criminals create open forums such as Internet websites to carry messages across
from one person to another. This type of communication can be accessed by only those
individuals who possess the decrypting key to that encrypted message.

Purpose of this project:

Security is probably the most challenging and needed property in today's technological era.
Many organizations have spent a tremendous amount of money just to acquire this property
for all their related projects. Without security, the data of any organization or a single unit is
under threat of getting misplaced or completely taken out from existence. Such is the case
with image authentication. Its security analysis is performed through a special method known
as the Visual Cryptography Scheme (VCS).

VCS known for its security uses the method of encryption to separate one image into
many consecutive images. The advantage of VCS is that it provides the user with
decryption of code which does not require any complex computation.

Problem statement:

When we use visual media for our communication from one place to another, there is a
possibility that data can be hacked and sensitive information can be lost. In order to prevent
this from happening, we need an effective solution to overcome this.

Required Technologies:
1. Python Language
2. Any Basic IDE
3. Python Libraries(PIL,OS,random,sys)

Methodology:

The technique I’m going to describe is attributed to two great mathematicians: ​Moni Naor
and ​Adi Shamir​, in 1994. In this implementation, I'm going to show how to split a secret
5

message into two components. Both parts are necessary to reconstruct and reveal the
secret, and the possession of either one, alone, is useless in determining the secret.

The basis of the technique is the superposition (overlaying) of two semi-transparent layers.
Imagine two sheets of transparency covered with a seemingly random collection of black
pixels.

Experiment:

Code for splitting the input image:


6

from PIL import Image, ImageDraw


import os
import sys
from random import SystemRandom
random = SystemRandom()

xrange = range

infile = "index.jpg"

img = Image.open(infile)

f, e = os.path.splitext(infile)
out_filename_A = f+"_A.jpg"
out_filename_B = f+"_B.jpg"

img = img.convert('1') # convert image to 1 bit

print("Image size: {}".format(img.size))


# Prepare two empty slider images for drawing
width = img.size[0]*2
height = img.size[1]*2
print("{} x {}".format(width, height))
out_image_A = Image.new('1', (width, height))
out_image_B = Image.new('1', (width, height))
draw_A = ImageDraw.Draw(out_image_A)
draw_B = ImageDraw.Draw(out_image_B)

# There are 6(4 choose 2) possible patterns and it is too late


for me to think in binary and do these efficiently
patterns = ((1, 1, 0, 0), (1, 0, 1, 0), (1, 0, 0, 1),
(0, 1, 1, 0), (0, 1, 0, 1), (0, 0, 1, 1))
# Cycle through pixels
for x in xrange(0, int(width/2)):
for y in xrange(0, int(height/2)):
pixel = img.getpixel((x, y))
pat = random.choice(patterns)
# A will always get the pattern
draw_A.point((x*2, y*2), pat[0])
draw_A.point((x*2+1, y*2), pat[1])
draw_A.point((x*2, y*2+1), pat[2])
draw_A.point((x*2+1, y*2+1), pat[3])
if pixel == 0: # Dark pixel so B gets the anti pattern
are=0
draw_B.point((x*2, y*2), 1-pat[0])
draw_B.point((x*2+1, y*2), 1-pat[1])
draw_B.point((x*2, y*2+1), 1-pat[2])
draw_B.point((x*2+1, y*2+1), 1-pat[3])
else:
draw_B.point((x*2, y*2), pat[0])
draw_B.point((x*2+1, y*2), pat[1])
draw_B.point((x*2, y*2+1), pat[2])
7

draw_B.point((x*2+1, y*2+1), pat[3])

out_image_A.save(out_filename_A, 'JPEG')
out_image_B.save(out_filename_B, 'JPEG')
print("Done.")

Code for merging the split images:

from PIL import Image

def changeImageSize(maxWidth, maxHeight, image):


widthRatio = maxWidth / image.size[0]
heightRatio = maxHeight / image.size[1]

newWidth = int(widthRatio * image.size[0])


newHeight = int(heightRatio * image.size[1])

newImage = image.resize((newWidth, newHeight))


return newImage

image1 = Image.open("index_A.jpg")
image2 = Image.open("index_B.jpg")

image3 = changeImageSize(800, 500, image1)


image4 = changeImageSize(800, 500, image2)

image5 = image3.convert("RGBA")
image6 = image4.convert("RGBA")

image5.show()
image6.show()

alphaBlended1 = Image.blend(image5, image6, alpha=.2)


alphaBlended2 = Image.blend(image5, image6, alpha=.4)
alphaBlended3 = Image.blend(image5, image6, alpha=.6)
alphaBlended4 = Image.blend(image5, image6, alpha=.8)
alphaBlended5 = Image.blend(image5, image6, alpha=1)

# Display the alpha-blended images


alphaBlended1.show()
alphaBlended2.show()

Input image:
8

Results:

The resultant spitting of images:

The image after it is merged:


9

The merging of image for different alpha:

Alpha = 0.2

Alpha = 0.4
10

Alpha = 0.6

Alpha = 0.8

Alpha = 1
11

Conclusion:

Visual cryptography is one of the techniques used to encrypt the images by dividing the
original image into transparencies. The transparencies can be sent to the intended person,
and at the other end the transparencies received person can decrypt the transparencies
using the tool, thus gets the original image. The proposed Visual cryptography provides the
demonstration to the users to show how encryption and decryption can be done to the
images. In this technology, the end-user identifies an image, which is not the correct image.
That is while transmitting the image the sender will encrypt the image using the application
here sender gets the two or more transparencies of the same image. The application
provides an option to the end-user of encryption. The end-user can divide the original image
into a number of different images. Using the application one can send encrypted images that
are in the format of GIF and PNG. The encrypted transparencies can be saved in the
machine and can be sent to the intended person by other means.

Future scope:

When compared to the conventional method which is used for only single secret image
transmission, this provides a much better way of transmission as it supports multiple secrets.
Here, though the channel is insecure the internal security fights every threat on it. The
multiple secret image sharing has applications for which the world is still to explore and get
the full benefit of it.

References:

1. Naor, M., & Shamir, A. (1994, May). Visual cryptography. In ​Workshop on the Theory
and Application of Cryptographic Techniques​ (pp. 1-12). Springer, Berlin, Heidelberg.

2. Hou, Y. C. (2003). Visual cryptography for color images. ​Pattern recognition,​ ​36(​ 7),
1619-1629.

3. Zhou, Z., Arce, G. R., & Di Crescenzo, G. (2006). Halftone visual cryptography. ​IEEE
transactions on image processing​, ​15(​ 8), 2441-2453.

4. Ateniese, G., Blundo, C., De Santis, A., & Stinson, D. R. (2001). Extended
capabilities for visual cryptography. ​Theoretical Computer Science,​ ​250(​ 1-2),
143-161.

5. Lou, D. C., Tso, H. K., & Liu, J. L. (2007). A copyright protection scheme for digital
images using visual cryptography technique. ​Computer Standards & Interfaces​,
29​(1), 125-131.

You might also like