Muthuazkhi
Muthuazkhi
Steganography is the process of hiding one file inside another such that
others can neither identify the meaning of the embedded object nor
even the embedded object nor even recognize its existence. Current
trends favor using digital image files as the cover file to hide other digital
file that contains the secret message or information. Steganography
becomes more important as more people join the cyberspace revolution.
Steganography is the art of concealing information in ways that
prevent the detection of hidden messages. The goal of
steganography is to avoid drawing suspicion to the existence of a hidden
message. This approach of information hiding technique has recently
become important in a number of application areas. Digital audio,
video, and pictures are increasingly furnished with distinguishing but
imperceptible marks, which may contain a hidden copyright notice or
serial number or even help to prevent unauthorized copying directly.
Military communications systems make increasing use of traffic security
techniques that, rather than merely concealing the content of a message
using encryption, seek to conceal its sender, its receiver, or its very
existence. Similar techniques are used in some mobile phone systems
and schemes proposed for digital elections. One of the most common
methods of implementation is Least Significant Bit Insertion, in which
the least significant bit of every byte is altered by the bit-string
representing the embedded file. This encryption and decryption of the
images will be done using MATLAB code.
Introduction
The use of multimedia digital signals has grown in popularity over the last
decade as a result of the proliferation of wireless Internet-based services,
such as the introduction of fourth-generation mobile communication
systems that allow users to transfer data at speeds of up to 1Gbps.
Digital data can be easily copied, modified, and retransmitted in the
network by any user thanks to the availability of low-cost editing tools. It
is critical to developing tools that protect and authenticate digital
information in order to effectively support the growth of multimedia
communications. We present a novel embedding scheme based on the
LSB technique in this contribution. It has no effect if the value of a pixel in
an image is changed by a value of '1'.
Steganography types
d) Steganography for text files: Steganography can also be used for text
files. Text steganography is the process of concealing information in a text
file.
LSB METHODS
Gray scale
The graph below shows all 256 Gray-scale colors. A two-digit hex
value is used to define up to 256 shades of grey in the gray-scale
color naming scheme. A grayscale digital image is one in which
each pixel's value is a single sample, carrying only intensity
information in photography and computing. Images of this type, also
known as black-and-white, are made up entirely of shades of grey,
ranging from black to white at their most intense. Grayscale images are
distinct from one-bit bi-tonal black- and-white images, which are images
with only two colors, black and white, in the context of computer
imaging (also called bi-level or binary images). There are many shades of
grey in grayscale images. Grayscale images are frequently the result
of measuring the intensity of light at each pixel in a single band of the
electromagnetic spectrum (e.g., infrared, visible light, ultraviolet, etc.),
and they are monochromatic proper when only one frequency is captured
in such cases Figure shows the grayscale shading strengths (0=no colour;
15=full colour).
Fig 1.1 Pixel Density of grey scale image [0-255]
The least significant bits of the cover media's digital data are used
to conceal the message in LSB steganography. LSB replacement is the
most basic of the LSB steganography techniques. The last bit of
each pixel value is changed in LSB replacement steganography to
reflect the message that needs to be hidden. Consider an
01010010
01001010
10010111
11001100
11010101
01010111
00100110
We would replace the LSBs of these pixels with the following new values
to hide the letter Z, whose ASCII code binary value is 10110101:
01010011
01001010
10010111
11001101
11010100
01010111
00100110
01000011
It's worth noting that only half of the LSBs need to be changed on
average. The difference between the cover (original) image and the stego
image will be almost imperceptible to the naked eye. One of its major
drawbacks is the small amount of data that can be embedded in such
images using only LSB. Attacks on LSB are extremely common. In
contrast to 8-bit formats, LSB techniques applied to 24-bit formats
for colour images are difficult to detect.
System Specification
Hardware requirements
Software requirement
Hardware Requirements
RAM :8GBRAM
Processor :INTEL
Software Requirements
Operating system:windows10
Frontend :python
Existing system have use the current tracking system for Product
delivery.
In this method the admin can take all the control, so they can modify
the data and also we need go for the third party for trust and making a
security.
This system has a lot possibility to change the real product when it's going
to customer
Disadvantages of steganography
Detectability:
Complexity:
Transmission time:
Visual quality:
Additional information
Proposed System
Advantages of steganography
Security:
Steganography can hide information so well that it's difficult for others to
detect.
Capacity:
Covert communication:
Robustness:
Steganography can hide messages that remain intact even after common
image processing operations.
Resistance to cryptanalysis:
This technique relies on the fact that small changes in image color or
noise are very difficult to detect with the human eye. For example, one
image can be concealed within another by using the least significant bits
of each pixel in the image to represent the hidden image instead
The hidden text is shown in the textbox using the Tkinter module
The encoder algorithm is as given below:
5: end if
6: end for
The most common technique is to replace the LSBs of each color channel
(red, green, blue) in a pixel with the bits of the secret message, as these
small changes are nearly imperceptible to the human eye.
Embedding process:
Convert data to binary: The secret message is converted into a binary
string.
Iterate through pixels: Each pixel is accessed, and its LSBs are replaced
with corresponding bits from the secret message.
Generating the stego image: The modified pixels form the "stego image"
which appears visually identical to the original image but contains the
hidden data.
Access the stego image: The receiver needs the same key or algorithm
used for embedding to extract the hidden data.
Extract LSBs: By reading the LSBs of each pixel in the stego image, the
binary data representing the secret message is retrieved.
System Design:
Concept Exploration:
Data Hiding Capacity: Assessing how much data can be hidden within a
given image without noticeable distortion.
Robustness Testing: Evaluating the system's ability to withstand common
image manipulations like resizing, compression, and noise addition.
Detection Resistance: Analyzing how difficult it is for potential attackers
to detect the presence of hidden data within the stego image.
Usecase diagram
ActiveDiagram
Architetutre Design
SOFTWARE DESCRIPTION
Python is an interpreted high-level programming language for general-purpose programming.
Created by Guido van Rossum and first released in 1991, Python has a design philosophy thatem
phases code readability, notably using significant whitespace. Python is Interpreted
Python is processed at runtime by the interpreter. You do not need toyour program before
executing it. This is similar to PERL and PHP. Python is Interactive
you can actually sit at a Python prompt and interact with theinterpreter directly to write your
programs.Python also acknowledges that speed of development is important. Readable and terse
codeis part of this, and so is access to powerful constructs that avoid tedious repetition of
code.Maintainability also ties into this may be an all but useless metric, but it does say
somethingabout how much code you have to scan, read and/or understand to troubleshoot problemsor
tweak behaviors. This speed of development, the ease with which a programmer of other languages can
pick up basic Python skills and the huge standard library is key to another areawhere Python excels. All its tools
have been quick to implement, saved a lot of time, andseveral of them have later been patched and
updated by people with no Python background -without breaking.
What is MySQL?
SOURCE CODE :
stego=cover;
for i=1:strlength(message)
binary_all=append(binary_all,binary_separate(i,:)); end
count=1; %initializing count with 1 for i=1:row
for j=1:column
count=count+1;
for i=1:row
for j=1:column
count=count+1;
original_message='';
while i<=len
%Convert the decimal number which is the ascii value to its corresponding
character
End
image_data = iter(image.getdata())
data = ''
while (True):
image_data.__next__()[:3] +
image_data.__next__()[:3]]
binary_str = ''
for i in pixels[:8]:
if i % 2 == 0:
binary_str += '0'
else:
binary_str += '1'
if pixels[-1] % 2 != 0:
return data
def generate_Data(self,data):
new_data = []
for i in data:
new_data.append(format(ord(i), '08b')
#function to modify the pixels of image
dataList = self.generate_Data(data)
dataLen = len(dataList)
imgData = iter(pix)
for i in range(dataLen):
imgData.__next__()[:3] +
imgData.__next__()[:3]]
if (pix[j] % 2 != 0):
pix[j] -= 1
pix[j] -= 1
if (i == dataLen - 1):
if (pix[-1] % 2 == 0):
pix[-1] -= 1
else:
if (pix[-1] % 2 != 0):
pix[-1] -= 1
pix = tuple(pix)
yield pix[0:3]
yield pix[3:6]
yield pix[6:9]
import numpy as np
image = Image.open(image_path)
image_array = np.array(image)
# Make sure the message is not too long for the image to hold
# Flatten the image array and replace the least significant bit with the
message binary
flattened_image = image_array.flatten()
# Embed the message bits into the least significant bit of each pixel
for i in range(len(message_binary)):
image_array = flattened_image.reshape(image_array.shape)
encoded_image = Image.fromarray(image_array.astype(np.uint8))
encoded_image.save(output_path)
def decode_image(image_path):
image = Image.open(image_path)
image_array = np.array(image)
# Flatten the image array and extract the least significant bit from each
pixel
flattened_image = image_array.flatten()
message = ''
byte = message_binary[i:i+8]
break
message += char
return message
# Example usage
if __name__ == "__main__":
decoded_message = decode_image(output_image)
Opening and Manipulating the Image: The image is loaded using Pillow
and converted to a numpy array for easier manipulation of pixel values.
Extracting the Hidden Message: The LSB of each pixel is extracted and
concatenated to form the binary string of the hidden message.
Converting Binary to Text: The binary string is then grouped into 8-bit
chunks and converted back to text using chr(int(byte, 2)). The message is
terminated when a null byte ('\0') is encountered.
Run the Code: When you run the script, the message will be hidden in the
image, and you can later decode it.
Encoding:
Decoding:
Decode the message from encoded_image.png and the result will be:
"Hello, Steganography!".
Notes:
Message Size: The message's size is constrained by the size of the image.
For example, if the image has 1,000,000 pixels, you can hide up to
1,000,000 bits (or about 125,000 bytes). Be sure to check the message
length before attempting to encode.
Image Format: Lossy formats like JPEG are not suitable for steganography
as they may alter pixel values during compression. Use lossless formats
like PNG or BMP.
TESTING
. • meets the requirements that guided its design and development, responds
correctly to all kinds of inputs.
concurrently.
The main aim of testing is to analyze the performance and to evaluate the
errors that
occur when the program is executed with different input sources and running
in different
operating environments.
• Unit Testing.
• Integration Testing.
• Validation Testing.
• User Acceptance Testing.
UNIT TESTING
Unit testing, also known as component testing refers to tests that verify the
environment, this is usually at the class level, and the minimal unit tests
include the
costs. The following Unit Testing shows the functions that were tested at the
time of
Testing steps
Steganography overview
The sender conceals the secret message in a cover image, then transfers
the stego image to the receiver
Use the least significant bit (LSB) technique to hide secret messages in
images
Use gray scale images and separate images into RGB layers to increase
embedding capacity
The image that will be used for steganography will be shown first.
Import libraries: Utilize libraries like Pillow (PIL) in Python to handle image
manipulation, and potentially additional libraries for encryption if you
want to add an extra security layer to the secret message.
Load the cover image: Read the image file into your program using the
image processing library functions.
Prepare the secret message: Convert the secret message (text, file, etc.)
into a binary string.
Replace the LSB with the corresponding bit from the secret message.
Save the stego-image: Save the modified image with the embedded
secret message.
LSB using XOR gave MSE and PSNR values which decreases as number of bits
substituted are increases. For good quality of stego image, MSE should be low
and PSNR should be high. This is achieved in both the techniques i.e.
LSB and DCT. DCT method gives better performance than LSB technique. Only
the two distinct transformations were
study is needed.
Mujtiba, Syed & Yousu, Salihah & Bisma, Syed & Siddiqi, Mehvish & Khaki,
Zahidgulzar. (2017). COMPARISION OF LSB AND DWT STEGANOGRAPHY
TECHNIQUES. 10.21090/IJAERD.ETIECE08.
for Hiding Image in an Image using LSB Technique for 24 Bit Colour