Steganography with RSA Algorithm

17
IMAGE STEGANOGRAPHY IN LSB Presented by: Ritu Agarwal 9910103516

description

This presentation describes the use of Image Steganography using well defined RSA Algorithm.

Transcript of Steganography with RSA Algorithm

Page 1: Steganography with RSA Algorithm

IMAGE STEGANOGRAPHY IN LSB

Presented by:Ritu Agarwal9910103516

Page 2: Steganography with RSA Algorithm

CRYPTOGRAPHY & STEGANOGRAPHYCRYPTOGRAPHY :

The art of protecting information by transforming it (encrypting it) into an unreadable format, called cipher text. Only those who possess a secret key can decipher (or decrypt) the message into plain text.

STEGANOGRAPHY:

Steganography is basically referred as hidden writing. It is entirely different from cryptography. In cryptography ,we basically perform the encryption and decryption by changing the text into another form.

Page 3: Steganography with RSA Algorithm

STEGANOGRAPHY

But in steganography, we do not change the text into another form but just hide it into the image or audio so that the attacker doesn’t know about the hidden message.

Page 4: Steganography with RSA Algorithm

RSA algorithm is a part of cryptography in which a text message is hidden in some other form. Using steganography alongwith RSA algorithm works for 2-level security.

Introduction to RSA Algorithm

Page 5: Steganography with RSA Algorithm

TYPES

Types of Steganography:

1. Image Steganography

2. Text Steganography

3. Video Steganography

4. Protocol Steganography

5. Audio Steganography

Page 6: Steganography with RSA Algorithm

HOW STEGANOGRAPHY WORKS

Now the question is how steganography works!!

In steganography first we select the text or any file that we want to send to another person.

Then we select the image or audio file in which we want to hide our file(containing message).

Page 7: Steganography with RSA Algorithm

Then we use the steganography software for encryption.

After encryption the text file is now converted in an image file which contains our confidential data.

Then the receiver will also use the same software for decryption.

Page 8: Steganography with RSA Algorithm

IMAGE STEGANOGRAPHYWITH RSA ALGORITHM

How the image steganography works:

Before encrypting file into image file, we use the well defined RSA Algorithm to increase the security of the data transmission.

Then, we use this encrypted message to be encrypted o9nce again into the image file.

Page 9: Steganography with RSA Algorithm

Every image is formed of the pixels. There are a number of pixels in the image. Every pixel is formed of 24 bits. Each pixel has 8 bits of red color, 8 bits of green color and 8 bits of blue color(RGB).

Page 10: Steganography with RSA Algorithm

Also the file that we want to send to the receiver is also formed from a number of bits.

Now the next step is to store every 3 bits of the file in every pixel’s Least Significant bit (LSB) i.e. 1-1 bit in 8th bit of red , blue, green color bits.

In this way our encryption will be done.

In this way, decryption can also be performed by extracting the 8th bit of every color from each pixel.

Page 11: Steganography with RSA Algorithm
Page 12: Steganography with RSA Algorithm

CODE ANALYSIS

First we extract the image by using

Image im=Image.fromfile(imagepath);

Get the height and width by im.height and im.width

Get the pixel info by using

Bitmap bt=new bitmap(im);

Page 13: Steganography with RSA Algorithm

IMAGE STEGANOGRAPHY

Now we extract the file and get the fileinfo by using

FileInfo fi=new FileInfo(filepath)

We convert the file into stream of bytes by using

fc=File.ReadAllBytes(file path)

Page 14: Steganography with RSA Algorithm

Now we perform the encryption

In encryption function, we start a loop and in loop we access every byte of the file 3 times .

We also use the functions ‘byte2bool’ and ‘bool2byte’ which converts byte into bits and vice-versa

Page 15: Steganography with RSA Algorithm

Starting from LSB, in the first iteration we first put 3 bits of the file in the red pixel, then in the green one and in third i.e. blue we put 2 bits.

The chromatic influence of blue color is maximum for human eye so we change only 2 bits of it.

When all the bytes of the file are not able to store in the last bits of every color then we start to replace the 7 th bit of every color.

Page 16: Steganography with RSA Algorithm

In this way the storing capacity of the image file increases but little noise is also increased in the image

In the same way we can perform the decryption

Page 17: Steganography with RSA Algorithm

THANK YOU