Nothing Special   »   [go: up one dir, main page]

Image Steganography in LSB: Presented By: Ritu Agarwal 9910103516

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

IMAGE

STEGANOGRAPHY IN LSB

Presented by:
Ritu Agarwal
9910103516
CRYPTOGRAPHY & STEGANOGRAPHY
CRYPTOGRAPHY :

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.
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.
Introduction to 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.
TYPES

Types of Steganography:

1. Image Steganography
2. Text Steganography
3. Video Steganography
4. Protocol Steganography
5. Audio Steganography
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).
 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.
IMAGE STEGANOGRAPHY
WITH 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.
 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).
 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.
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);
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)
 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
 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.
 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


THANK YOU

You might also like