Professional Documents
Culture Documents
Chapter -1 INTRODUCTION
Chaos word has been derived from the Greek, which refers to unpredictability and it is defined as a study of nonlinear dynamic system. Chaos theory is a mathematical physics which was developed by Edward Lopez. Chaos is suitable for steganography, as it is closely related to some dynamics of its own characteristics. The behavior of the chaos system, under certain conditions, presents phenomena which are characterized by sensitivities to initial conditions and system parameters. Through the sensitivities, the system responses act to be random Steganography is a process of hiding a secret message into an image or hiding a secret image into a cover image. There are two basic methods implemented in steganography: Least significant bit (LSB)Spatial Domain Technique and Transform-based (DCT) Frequency Domain Technique. LSB steganography is a one of the simplest methods. Data hidden in images using this method is highly sensitive to image alteration & vulnerable to attack. DCT steganography is potentially more resistant to loss from image manipulation and increases the difficulty to a potential attacker. In this paper, we mainly deal with only LSB steganography method. 1.1 Purpose Of Project This project is used to encode a secret message into the image in such a way that others cannot discern the presence of information within the image and its very difficult to identify the original image and the image in which the information has been stored which is stego image because both the images are alike , there are very minor or no differences present between the original images and the stego image this encoding is done with the help of a secret key which must be known by the user inorder to decode and view the message which has been embedded within the image.
1
Digital Steganography
Digital Steganography
the binary chaotic sequence, say 10010001000100.(b), which is obtained using threshold value. After XORing we get the output as 11011000..(c). Each of these bits is now XORed with LSB of individual pixel of the cover image. Say the 1st pixel of the image is 56 which have binary value 00111000 (d). The LSB is 0. It is XORed with 1, which is obtained in the above sequence. The same is repeated until all the bits are embedded in the image. Now, the stego image is obtained. Here, the secret message what is chosen is of length 30. The cover image is pokemon image with dimension 80*80. The desteganography is done to get back the secret message by following the reverse process followed for steganography. As we know that each pixel of steganography image is of 8 bits, the first 7 bits are masked to obtain the sequence (c).Generate the chaotic sequence (b) with same initial conditions used for steganography. The sequence of bits obtained in (c) is XORed with (b) to retrieve the secret message. All the above results are obtained from the simulation of steganography algorithm
Digital Steganography
Digital Steganography
Here using LSB technique, the information is hidden in the least significant bits of the image data.
Image viewer used to view the normal and stegoimages. A quality measure gives the variation between original and stegoimage information.
Digital Steganography
In the receiver side the same software is to be installed. When the image file is opened the software tells the user whether that contains any hiding information or not.
If the image contains hidden information then client sockets will receive it.
With over 600 filling stations and exploitation fields petrom needs a powerful and capable system to transport and pick-up data from each location all over the country. They needed a highly flexible and reliable equipment capable to transmit secure data to a central headquarter where are managed through an advanced ERP (Enterprise Resource planning) system. Also the equipment must have been able to transmit data from all kind of locations, the majority having no fixed Internet connection available.
3.3 Modules
Sender Encrypt Send Reciever Decrypt
Module Description
Digital Steganography
Sender
The sender who wants to send the message to the receiver by hiding it behind an image will select the image by browsing and hide the normal secret message by changing Least Significant Bit to the message bits.
Encrypt
The sender encrypts the secret message by using encryption techniques and makes it ready to send the meassage to receiver.
Send
The sender sends the message which is hidden behind the image ,to the receiver along with the image which will be decrypted by receiver later.
Receiver
The user who wants to see the secret message will receive the message which is hidden behind the image.
Decrypt
The receiver will apply the decryption techniques to decrypt and see the secrete message which is hidden behind the image that has been send by the sender.
Chapter 4
Digital Steganography
Software design
4.1 DATAFLOW DIAGRAMS (DFDs)
A data flow diagram is graphical tool used to describe and analyze movement of data through a system. These are the central tool and the basis from which the other components are developed.
sender
filename
message
Browse
encrypt
password
add
IPaddress
receiver
Encrypted message
send
Select filename
receiver browse
password
decrypt
message
exit
receiver
view
Digital Steganography
CLASS DIAGRAM
Class diagram models class structure and contents using design elements such as classes, packages and objects. It also displays relationships such as containment, inheritance, associations and others.
Digital Steganography
Class Diagram
10
Digital Steganography
Actor
Use Case
An actor is represents a user or another system that will interact with the system your modeling. A use case is an external view of the system that represents some action the user might perform in order to complete a task. They are helpful in exposing requirements and planning the project.
11
Digital Steganography
enter message
encrypt
receiver
decrypt
password
ACTIVITY DIAGRAM:
Activity diagrams displays a special state diagram where most of states are action states and most of the transitions are triggered by completion of the actions in the source states. This diagram focuses on flows driven by internal processing.
12
Digital Steganography
enter message
encrypt
send
select file
sav e
decrypt
display message
13
Digital Steganography
14
Digital Steganography
Fig. J.1. Left: gradient with high quality compression Right: gradient with low quality compression
15
Digital Steganography
5.2.1 Encoding
A flowchart describing typical JPEG encoding is shown below in Fig. J.2. 1) The input is a BufferedImage object, which contains a ColorModel and a matrix representing the image with pointers aimed at indices of the ColorModel. The RGB values of the uncompressed input image are converted into three components: one luminance component and two chrominance components (YUV). The luminance component is considered more important. 2) The image is separated into 8x8 pixel blocks starting from the upper left-hand corner . 3) The component signals for each 8x8 block are transformed into the frequency domain by using the two-dimensional discrete cosine transform (DCT). This transformation is similar to the two-dimensional fast Fourier transformation, except that the coefficients are real instead of complex. The perceptually most important information is contained in the first coefficients, and the later coefficients are generally small (redundance reduction). 4) While the coefficients closest to 0 are eliminated, the remaining coefficients are quantized using various degrees of accuracy (irrelevance reduction). This can be modified by changing the quantization tables. The DC luminance coefficients are the most important and are quantized with the most accuracy. 5) Finally, the quantized coefficients are compressed using a Huffman encoder.
16
Digital Steganography
Fig. J.2. JPEG/JFIF encoding scheme Since the DC luminance coefficients are quantized with the most accuracy, we will hide the information inside them. We will simply shift the values up or down by certain amounts into areas that are defined as being 0s and 1s. While this could be implemented by modifying the code of a JPEG encoder manually, we will simply modify the image beforehand so that the DC luminance coefficients will correspond to those that we seek. This method is possible and not especially processor intensive because the DC luminance coefficient corresponds to the average luminance values for each 8x8 block. It works as follows: 1) Convert the RGB signals for the image into YUV using the following formula. Store the result in a temporary float[][] to reduce quantization effects that occur before the compression itself.
17
Digital Steganography
2) Add a small amount of white zero-mean Gaussian noise with standard deviation
empirically during the implementation stage. 3) Carry out a small amount of preprocessing to reduce the likelihood of the rare cases described in step 6. Shift the values of the input f(x,y) to a compacted version f'(x,y).
f'(x,y) = p + f(x,y) (128 p) / 128 4) Determine which blocks should be modified according to the bit-placement algorithm. 5) Cycle through all of those blocks. Call the current one block B, and call b the bit that is supposed to be transmitted with block B. 6) Calculate the average value ya of the luminance signal Y for block B. 7) Find the target average value yt for the luminance signal for block B using the stego-table shown in Fig. J.3. The target value is the value in the middle of the region closest to ya that is labeled with the bit b. The target value will get changed slightly during compression because JPEG/JFIF is a lossy format. 8) Shift the luminance values for block B by adding yt - ya to them. (As long as p < k, there are rare cases in which this will not work due to the fact that certain pixels have luminance values that are bunched up near the edges of the luminance spectrum. That is, they would get shifted out of the valid range [0 255]. In those cases, a new target value yt will be chosen, which is further from the boundaries. Then step 8 will be repeated.) 9) Convert the YUV signals back into RGB signals using the inverse of the transformation above in step 3. (The inverse transformation exists because the matrix is invertible.)
18
Digital Steganography
Fig. J.3. Simple stego-table with k = 20, where k is the width of each region.
Finally, we can simply save the image using the default JPEG encoder for Java called javax.imageio.plugins.jpeg. A block diagram for the combined processes is shown in Fig. J.4.
Fig. J.4. JPEG/JFIF encoding scheme for Steganography To make it more difficult to detect the presence of embedded data, the bit-values along the top of the stego-table will actually be randomized as shown in Fig. J.5. The randomization of the location of the 1s and 0s will simply cause a histogram of the resulting DC coefficients to look more random. If the values were simply pseudorandom, then it would be possible to get multiple consecutive 0s or 1s, so 0s will simply be expanded into 01s and 1s expanded into 10s. So that the same bits will be used for decoding, these k random bits that are dependent on the key will be received from the StegoSecurity object, where k will be empirically
19
Digital Steganography
determined such to criteria that will be mentioned later. Therefore, no DC coefficients will be changed by more than 3k/2 before compression.
5.2.2 Decoding
The decoding scheme is much simpler than encoding. The averages of the luminance of the 8x8 blocks just need to be calculated and converted back to bits while paying attention to the current stego-table and encoding order.
20
Digital Steganography
Output Image
21
Digital Steganography
The bit error rate (BER) is goodthat is, all of the bits were extracted properly. The signal-to-noise ratio (SNR) seems fairly good, even though it is also limited due to JPEG compression, while the size of the resulting JPEG file is rather large. Most importantly, the output image looks just like the input image when compared by the human eye. For more examples, see Appendix A: JPEG Examples and Parameters.
22
Digital Steganography
5.4. Encoding
1) Find the index of the pixel's RGB color in the sorted palette. 2) Get one bit from the input file. Replace the least significant bit of the index. 3) Find the new RGB color that the index now points to in the sorted palette. 4) Find the index of the new RGB color in the original palette. 5) Change the pixel to the index of the new RGB color. Decoding the least significant bit of the index came from the input file. Write it to the output file optional interlaced.
Sample Images
The EZ Stego solution works with varying degree of success, depending on the input image. To illustrate how one image can be a better input than another, here are shown two images with their respective luminance-ordered palettes. Figures 1 and 2 show the image Fox and its palette; Figures 3 and 4 show image Madrill and its palette. Both Fox, with 240x320 pixels, and Madrill, with 512x512 pixels were truncated to 256 colors. We can clearly see that the luminanceordered palette of Fox contains visibly fewer and less severe discontinuities in color than that of Madrill. Therefore, if EZ Stego would be used in this case, there would be a much greater chance of failure with Madrill than with Fox.
23
Digital Steganography
Analysis:
During the process of mapping 3-dimensional RGB colors to one-dimensional luminance rendered colormap, this may lead to visible color discontinuity among the colors that have same luminance yet so far away in the color spectrum. Since luminance is mere sum of three RGB values, luminance ordering does not guarantee the visibly similarity.
For each data bit to be embedded, we know the pixel where it will be embedded. We first have to check whether embedding the data will actually change the LSB. In the best case, it will not be changed, so we will not have to do anything. Otherwise, we start to search for the closest color till we find a match between the bit to be encoded and the parity of the color. The parity of the color is defined as R+G+B mod 2. Once the color is found, the index for the pixel is changed to point to the new color. Since this match making step has to be repeated for each bit modification. GIFStegoImage will perform a batch job of creating NeighborMap[]. Based on the LSB of the colormap index, NeighborMap[] will contain closest matching color that has different LSB. Thus GIFStegoImage only need to reference NeighborMap[] for each replacement.
24
Digital Steganography
3. From the pixelmap[][], colormap is generated by passing through and adding countered new colors to colormap[]. 4. Extracting and applying each red, green and blue color to Euclidean distance formula to find matching color that has different least significant bit of colormap indexes and store them to neighormap[]. 5. Using colormap[],neighormap[], and pixelmap[][] to write out a file in GIF 89a standard format.
25
Digital Steganography
Simple:It is simple for professional programmer to learn & they can use it effectively. If we already know object oriented programming, then learning java is very easy. It inherits
26
Digital Steganography
syntax from c & object oriented features from c++, so if the user knows c\c++ then it will be a
easy way to do effective java programming.
Secure:As we know many people are effected by viral infection when they download an executable file or program. Rather than, virus programs we have Swing is a widget toolkit for Java. It is part of Sun Microsystems' Java Foundation Classes (JFC) an API for providing a graphical user interface (GUI) for Java programs.
Portable:As already we have discussed about compatibility of operating system, computers, chips. In Internet the programs have to be dynamically downloaded to all the various types of platforms. For this purpose java program will generate a byte code (which is not a
executable code). Byte code is a highly optimized set of instructions designed to be executed by java run system, which is called as JVM (Java Virtual Machine).
Object-Oriented:Java is purely object oriented. The object model in java is simple and easy to extend, while simple types, such as integers, are kept as high-performance non-objects.
Robust: The ability to create robust programs was given a high priority in the design of java. To gain reliability, java restricts you in a few key areas, to force you to find your mistakes
27
Digital Steganography
early in program development. At the same time, java frees you from having to worry about many of the most common causes of programming errors. Because java is a strictly typed language, it checks your code at Compile time. Java is robust for two reasons; they are Memory management & mishandled exceptional task in traditional programming environments. Swing is a widget toolkit for Java. It is part of Sun Microsystems' Java Foundation Classes (JFC) an API for providing a graphical user interface (GUI) for Java programs. Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit. Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform.
28
Digital Steganography
29
Digital Steganography
30
Digital Steganography
ENCRYPTION:
SELECT SOURCE FILE
31
Digital Steganography
ENCRYPTION:
SELECT SOURCE FILE AND ENTER THE MESSAGE
32
Digital Steganography
33
Digital Steganography
34
Digital Steganography
35
Digital Steganography
Steganography as whole has existed in many forms throughout much of history. Loseless compression of images with a great deal of color variation work best as a cover image to embed a message. Steganography can be used as a benefictial tool for privacy. If the image has significantly fewer colors than 256, the change of the pixels colors may be visibly detectable. There are a few things that can be done regarding this issue. Adding more colors to the colormap. Based on the colors already in the colormap, plus on the pixels chosen to contain data, we can decide what colors are needed more than others, and add those colors to the colormap. This complicates things because we have to create a histogram showing which colors are needed more than others.
Substituting colors from the colormap as needed. Based on the pixels chosen to contain data, we can determine that some colors are under-represented in the colormap, and that may impair the visual similarity of the resulting image. If some other group of similar colors is well-represented, and visual similarity will not be impaired by decreasing the size of that group, we may choose to do so. Then, we will add the more needed colors. This option also complicates our task, since we will have to calculate the statistics of how much one color is needed compared to another.
- Analyzing the neighboring pixels. We may want to look at the colors of the neighboring pixels, before changing the value of a given pixel. This may be useful in the areas of uniform color. - Possible addition of noise or randomness in adding colors to colormap - Adding a color assurance by checking the mean distance. If the distance exceeds the predetermined limit, different remedying method can be applied.
36
Digital Steganography
Chapter 9 REFERENCES
------------ PETERICKNAUGHTON
------------ BALAGURUSWAMY
SOFTWARE ENGINEERING
37