You are on page 1of 87



Akshay Viswanathan-[Reg No.10804004] T.Praveena-[Reg No. 10804081] M.J.Sushmitha-[Reg No.10804130]

Under the guidance of

S.Magesh, MS
(Lecturer, Department of Information Technology)

in partial fulfillment for the award of the degree of Bachelor of Technology


Information Technology


S.R.M. Nagar, Kattankulathur, Kancheepuram District


(Under Section 3 of UGC Act, 1956)


Certified that this project report titled MUSTERION is the bonafide work of Akshay Viswanathan-10804004, T.Praveena-10804081 and M.J.Sushmitha10804130, who carried out the project work under my supervision. Certified further, that to the best of my knowledge the work reported herein does not form any other project report or dissertation on the basis of which a degree or award was conferred on an earlier occasion on this or any other candidate.



GUIDE S.Magesh Lecturer Department Department of Information Technology

HEAD S.Rajendran Head of Department of Information Technology

Signature of the Internal Examiner

Signature of the External Examiner


The successful completion of any task would be incomplete without mentioning the people who made it possible. We take this privilege to express a few words of gratitude and respect to all those who helped us in completion of this project. We would like to express our sincere gratitude to Dr. C. Muthamizhchelvan, Associate Director, Faculty of Engineering and Technology,SRM University for all the help and infrastructure provided to complete this project successfully We express our sincere thanks to our Head of the Department, Prof.S.Rajendran, Department of Information Technology who spent his valuable time with us in guiding throughout the project work. We take this wonderful opportunity to record our sincere thanks to our guide Mr.S.Magesh, Lecturer, for his guidance and encouragement during the project period. We would like to thank the Programmers and the Supporting Staff for their valuable guidance and encouragement during the Project Period. Finally, we would like to thank our beloved parents and friends for their love and support throughout the course of the project.

This paper provides brief history and basics of steganography, and describes the design of the tool Stego Viewer to hide the stego images even on the computers of source and destination to make stenography even more secure. Our design of stego viewer is one step ahead in protecting the traces of hidden message in a clip which might be identified by any inside or outside intruders and hence make the sense of steganography more secure. The word "Steganography" is of Greek origin and means "covered, or hidden writing. The advantage of steganography over cryptography alone is that messages do not attract attention to themselves, to messengers, or to recipients. An unhidden coded message, no matter how unbreakable it is, will arouse suspicion and may in itself be incriminating. Cryptographic techniques "scramble" messages so if intercepted, the messages cannot be understood. Steganography, in an essence, "camouflages" a message to hide its existence and make it seem "invisible" thus concealing the fact that a message is being sent altogether. An encrypted message may draw suspicion while an invisible message will not. Steganography is the art of concealing the existence of information within seemingly innocuous carriers. Steganography and cryptography both have been used throughout recorded history as means to protect information




2. 3.

LITERATURE SURVEY SYSTEM ANALYSIS 3.1 Existing System 3.2 Proposed System 3.3 System Requirements

2 3 3 4 5 7 8 9 10 11 11 11 13 16 17 20 21 23


DATA FLOW DIAGRAM 4.1 Data Sequence Diagram 4.2 UML Diagram 4.3 Class Diagram


SYSTEM SPECIFICATION & IMPLEMENTATION 5.1 Module Separation 5.2 Classification of Steganography Techniques 5.3 Digital Carrier Methods 5.4 Detecting Steganography 5.5 Steganography Detection Tools 5.6 Design Of Stego Viewer 5.7 Steganography: How to Send a Secret Message 5.8 Encryption


SOFTWARE & TESTING 6.1 SOFTWARE 6.1.1. Java 6.1.2. Eclipse 3.2 6.2 TESTING 6.2.1 System Testing 6.2.2 Test Data & Output 6.2.3 Testing Strategies

31 31 31 34 35 35 36 38


SOURCE CODE 7.1 Coding 7.2 Screen shots

40 40 75 78 79 80

8. 9. 10.



1. 2. 3. 4. 5. 6.

Data Flow Diagram Data Sequence Diagram UML Diagram Class Diagram Flowchart for Sender Flowchart for Reciever

6 8 9 10 24 26

1.1 Overview:

Steganography is the art and science of writing hidden messages in such a way that no one apart from the intended recipient knows of the existence of the message; this is in contrast to cryptography, where the existence of the message itself is not disguised, but the content is obscured. This paper will treat steganography as a separate field. Steganography hides the covert message but not the fact that two parties are communicating with each other. The steganography process generally involves placing a hidden message in some transport medium, called the carrier. The secret message is embedded in the carrier to form the steganography medium. The use of a steganography key may be employed for encryption of the hidden message and/or for randomization in the steganography scheme.

Steganography_medium=hidden message + carrier + steganography_key.

In this context, the cover medium is the file in which we will hide the hidden data, which may also be encrypted using the stego_key. The resultant file is the stego_medium (which will, of course. be the same type of file as the cover medium). The cover mediums (and, thus, the stego_medium) are typically image, video or audio files.


Digital multimedia data provides a robust and easy editing and modifying of data. The data can be delivered over computer networks with little to no errors and often without interference. Unfortunately, digital media distribution raises a concern for digital content owners. Digital data can be copied without any loss in quality and content. This poses a big problem for the protection of intellectual property rights of copyright owners. Watermarking is a solution to the problem. It can be defined as embedding digital data, such as information about the owner, recipient, and access level, without being detectable in the host multimedia data.

Steganography relies on hiding covert message in unsuspected multimedia data and is generally used in secret communication between acknowledged parties. Steganography is a method of encryption that hides data among the bits of a cover file, such as a graphic or an audio file. The technique replaces unused or insignificant bits with the secret data. Steganography is not as robust to attacks since the embedded data is vulnerable to destruction. History has seen many examples of steganography in various forms such as sound codes, tattoos, and wooden slabs coated with wax layer. Morse code was used in the world wars to exchange messages between the soldiers. Early steganography was messy. Before phones, before mail, before horses, messages were sent on foot. If you wanted to hide a message, you had two choices: have the messenger memorize it, or hide it on the messenger. In fact, the Chinese wrote messages on silk and encased them in balls of wax. The wax ball, "la wan," could then be hidden in the messenger. Demeratus wrote his messages on the wood backing of a wax tablet. He then hid the message underneath a fresh layer of wax. The apparently blank tablet sailed easily past sentries on the road.


3.1 EXISTING TECHNIQUE There are a few techniques which are used in steganography at present: Concealing messages within the lowest bits of noisy images or sound files. Concealing data within encrypted data. The data to be concealed is first

encrypted before being used to overwrite part of a much larger block of encrypted data. This technique works most effectively where the decrypted version of data being overwritten has no special meaning or use: some cryptosystems, especially those designed for file-systems, add random looking padding bytes at the end of a cipher-text so that its size cannot be used to figure out the size of the original plaintext.

Chaffing and winnowing Invisible ink Concealed messages in tampered executable files. Embedded pictures in video material (optionally played at slower or faster speed).

A new Steganographic technique involves injecting imperceptible delays

to packets sent over the network from the keyboard. Delays in key-presses in some applications (telnet or remote desktop software) can mean a delay in packets, and the delays in the packets can be used to encode data. There is no extra processor or network activity, so the Steganographic technique is "invisible" to the user. This kind of Steganography could be included in the firmware of keyboards, thus making it invisible to the system. The firmware could then be included in all keyboards, allowing someone to distribute a key logger program to thousands without their knowledge. Content-Aware Steganography hides information in the semantics a human user assigns a datagram; these systems offer security against a nonhuman adversary/warden.


3.2 PROPOSED SYSTEM So far in the field of Steganography all the aspects that are present in any given picture have been used up to store and hide data in some or the other way, pixels, data packets, color components etc. The lines and angle measures of the lines with the horizontal were left alone so far. Taking up the length of lines and the angles made by them with the horizontal as the component for hiding text messages. Our technique involves the following steps:

We take the text input from the user in the form of a string array. Each character can be identified as an entity. We use our encryption formula to convert it into a numerical data. Lines originating from the same point represent a word. The sequence of the letters in a word are described by angles assigned to the 1st, 2nd, 3rd letters of the word. Each letter in the alphabet has a fixed line length assigned to it Eg: a=3 b=4 c=5 Thus the angles represent the sequence whereas the length represents the letter. For the point of origin of the lines weve fixed points on the graph which represent each word uniquely. In the Decoding technique we use a Line Detection Algorithm to detect the parameters of the line. Using the various parameters of the line such as slope, co-ordinates of end points etc. we decode the numerical data related to the letters. These data are then decoded using our decoding formula to get the letters back. This information is stored in an array which is of the same form as the initial array.



3.3.1 Software Specifications

Operating System :- Windows XP SP2 Platform :- JAVA-jdk 1.5 and above Application Software :- Eclipse/ JCreator/ NetBeans


Hardware Specifications

Pentium 3+ Processor 10 GB Hard Disk Space (Min) 256 RAM Memory




Text file containing the message as the input for converting into graph

Set actionListener for all the interface components

Use socket functions to setup the connection to the server

Convert the text to graph and embed in the video file


Send the video file to the server

Receive the file

Extract the graph from the video file

Convert the graph into text

Text file containing the text originally taken as input

Fig 1: Data Flow Diagram



Fig 2: Sequence Diagram



Fig3: UML Diagram



Class Input Read File() Convert() Proj String Msg[]

Class Interface desig() Function interface() jbutton, Jframe . . .

Class image convert() draw() Int array Int x,y,x1,y1 . . .

Fig4: Class Diagram




1. Encoding:1. Reading the message from a .txt file. 2. Designing the User Interface on Net Beans. 3. Conversion of the text into an image 2. Decoding:1. Recover the image from the received image. 2. Decoding the image back into numerical form. 3. Making a .text file of the original decoded text. 5.2 CLASSIFICATION OF STEGANOGRAPHY TECHNIQUES


Classification of Steganography Techniques Figure shows a common taxonomy of steganographic techniques

Technical steganography uses scientific methods to hide a message, such as the use of invisible ink or microdots and other size-reduction methods.

Linguistic steganography hides the message in the carrier in some nonobvious ways and is further categorized as semagrams or open codes. Semagrams hide information by the use of symbols or signs. A visual semagram

uses innocent-looking or everyday physical objects to convey a message, such as doodles or the positioning of items on a desk or Website. A text semagram hides a message by modifying the appearance of the carrier text, such as subtle changes in font size or type, adding extra spaces, or different flourishes in letters or handwritten text. Open codes hide a message in a legitimate carrier message in ways that

are not obvious to an unsuspecting observer. The carrier message is sometimes called the overt communication whereas the hidden message is the covert communication. This category is subdivided into jargon codes and covered ciphers. Jargon code, as the name suggests, uses language that is understood by a

group of people but is meaningless to others. Jargon codes include warchalking (symbols used to indicate the presence and type of wireless network signal [Warchalking 2003]), underground terminology, or an innocent conversation that conveys special meaning because of facts known only to the speakers. A subset of jargon codes is cue codes, where certain prearranged phrases convey meaning. Covered or concealment ciphers hide a message openly in the carrier

medium so that it can be recovered by anyone who knows the secret for how it was concealed. A grille cipher employs a template that is used to cover the carrier message. The words that appear in the openings of the template are the hidden message. A null cipher hides the message according to some prearranged set of rules, such as "read every fifth word" or "look at the third character in every word."


As an increasing amount of data is stored on computers and transmitted over networks, it is not surprising that steganography has entered the digital age. On computers and networks, steganography applications allow for someone to hide any type of binary file in any other binary file, although image and audio files are today's most common carriers.


There are many ways in which messages can be hidden in digital media. Digital forensics examiners are familiar with data that remains in file slack or unallocated space as the remnants of previous files, and programs can be written to access slack and unallocated space directly. Small amounts of data can also be hidden in the unused portion of file headers.

Information can also be hidden on a hard drive in a secret partition. A hidden partition will not be seen under normal circumstances, although disk configuration and other tools might allow complete access to the hidden partition. This theory has been implemented in a steganographic ext2fs file system for Linux. A hidden file system is particularly interesting because it protects the user from being inextricably tied to certain information on their hard drive. This form of plausible deniability allows a user to claim to not be in possession of certain information or to claim that certain events never occurred. Under this system users can hide the number of files on the drive, guarantee the secrecy of the files' contents, and not disrupt non-hidden files by the removal of the steganography file driver. There are several characteristics of sound that can be altered in ways that are indiscernible to human senses, and these slight alterations, such as tiny shifts in phase angle, speech cadence, and frequency, can transport hidden information.


Nevertheless, image and audio files remain the easiest and most common carrier media on the Internet because of the plethora of potential carrier files already in existence, the ability to create an infinite number of new carrier files, and the easy access to steganography software that will operate on these carriers. For that reason, the manuscript focus will return to image and audio files. The most common steganography method in audio and image files employs some type of least significant bit substitution or overwriting. The least significant bit term comes from the numeric significance of the bits in a byte. The high-order or most significant bit is the one with the highest arithmetic value (i.e., 27=128), whereas the loworder or least significant bit is the one with the lowest arithmetic value (i.e., 20=1). As a simple example of least significant bit substitution, imagine "hiding" the character 'G' across the following eight bytes of a carrier file (the least significant bits are underlined):

10010101 00001101 11001001 10010110 00001111 11001011 10011111 00010000

A 'G' is represented in the American Standard Code for Information Interchange (ASCII) as the binary string 01000111. These eight bits can be "written" to the least significant bit of each of the eight carrier bytes as follows:

10010100 00001101 11001000 10010110 00001110 11001011 10011111 00010001


In the sample above, only half of the least significant bits were actually changed (shown above in italics). This makes some sense when one set of zeros and ones are being substituted with another set of zeros and ones.

Least significant bit substitution can be used to overwrite legitimate RGB color encodings or palette pointers in GIF and BMP files, coefficients in JPEG files, and pulse code modulation levels in audio files. By overwriting the least significant bit, the numeric value of the byte changes very little and is least likely to be detected by the human eye or ear. Least significant bit substitution is a simple, albeit common, technique for steganography. Its use, however, is not necessarily as simplistic as the method sounds. Only the most naive steganography software would merely overwrite every least significant bit with hidden data. Almost all use some sort of means to randomize the actual bits in the carrier file that are modified. This is one of the factors that make steganography detection so difficult. One other way to hide information in a paletted image is to alter the order of the colors in the palette or use least significant bit encoding on the palette colors rather than on the image data. These methods are potentially weak, however. Many graphics software tools order the palette colors by frequency, luminance, or other parameter, and a randomly ordered palette stands out under statistical analysis. Newer, more complex steganography methods continue to emerge. Spreadspectrum steganography methods are analogous to spread-spectrum radio transmissions (developed in World War II and commonly used in data communications systems today) where the "energy" of the signal is spread across a wide-frequency spectrum rather than focused on a single frequency, in an effort to make detection and jamming of the signal harder. Spread-spectrum steganography has the same function-avoid detection. These methods take advantage of the fact that little distortions to image and sound files are least detectable in the high-energy portions of the carrier (i.e., high intensity in sound files or bright colors in image files). Even when viewed side by side, it is easier to fool human senses when small changes are made to loud sounds and/or bright colors



The Prisoner's Problem is often used to describe steganography, although it was originally introduced to describe a cryptography scenario. The problem involves two prisoners, Alice and Bob, who are locked in separate prison cells and wish to communicate some secret plan to each other. Alice and Bob are allowed to exchange messages with each other, but William, the warden, can read all of the messages. Alice and Bob know that William will terminate the communications if he discovers the secret channel. William can act in either a passive or active mode. In the passive warden model, William examines each message and determines whether to forward the message or not based on his ability to detect a hidden message. In the active warden model, William can modify messages if he wishes. A conservative or malicious warden might actually modify all messages in an attempt to disrupt any covert channel so that Alice and Bob would need to use a very robust steganography method. Steganalysis, the detection of steganography by a third party, is a relatively young research discipline with few articles appearing before the late-1990s. The art and science of steganalysis is intended to detect or estimate hidden information based on observing some data transfer and making no assumptions about the steganography algorithm. Detection of hidden data may not be sufficient. The steganalyst may also want to extract the hidden message, disable the hidden message so that the recipient cannot extract it, and/or alter the hidden message to send misinformation to the recipient. Steganography detection and extraction is generally sufficient if the purpose is evidence gathering related to a past crime, although destruction and/or alteration of the hidden information might also be legitimate law enforcement goals during an on-going investigation of criminal or terrorist groups. Most steganalysis today is signature-based, similar to antivirus and intrusion detection systems. Anomaly-based steganalysis systems are just beginning to emerge. Although the former systems are accurate and robust, the latter will be more flexible and better able to quickly respond to new steganography techniques.


One form of so-called "blind steganography detection" distinguishes between clean and steganography images using statistics based on wavelet decomposition, or the examination of space, orientation, and scale across subsets of the larger image. Steganalysis techniques can be classified in a similar way as cryptanalysis methods, largely based on how much prior information is known. Steganography-only attack: The steganography medium is the only item

available for analysis. Known-carrier attack: The carrier and steganography media are both

available for analysis. Known-message attack: The hidden message is known. Chosen-steganography attack: The steganography medium and algorithm

are both known. Chosen-message attack: A known message and steganography algorithm

are used to create steganography media for future analysis and comparison. Known-steganography attack: The carrier and steganography medium, as

well as the steganography algorithm, are known.


This article has a stated focus on the practicing computer forensics examiner rather than the researcher. This section, then, will show some examples of currently available software that can detect the presence of steganography programs, detect suspect carrier files, and disrupt steganographically hidden messages. This is by no means a survey of all available tools, but an example of available capabilities.

As the research shows, many steganography detection programs work best when there are clues as to the type of steganography that was employed in the first place. Finding steganography software on a computer would give rise to the suspicion that there are actually steganography files with hidden messages on the suspect computer. Furthermore, the type of steganography software found will directly impact any subsequent steganalysis (e.g., S-Tools might direct attention to GIF, BMP, and WAV


files, whereas JP Hide-&-Seek might direct the analyst to look more closely at JPEG files). The second important function of steganography detection software is to find possible carrier files. Ideally, the detection software would also provide some clues as to the steganography algorithm used to hide information in the suspect file so that the analyst might be able to attempt recovery of the hidden information. There are more than 100 steganography programs currently available, ranging from free downloads to commercial products. The most common among them are: Gif-It-Up, a Nelsonsoft program, JP Hide-&-Seek (JPHS) by Allan ,S-Tools, a program by Andy Brown that can hide information inside GIF, BMP, and WAV files. This section will show a simple steganography example by hiding an 11,067-byte GIF map of the Burlington, Vermont, airport in JPEG

This map is hidden in the various carriers


A JPEG carrier file containing the airport map.

JP Hide-&-Seek (JPHS) by Allan Latham is designed to be used with JPEG files and lossy compression. JPHS uses least significant bit overwriting of the discrete cosine transform coefficients used by the JPEG algorithm. The Blowfish crypto algorithm is used for least significant bit randomization and encryption . Figure 3 shows an example JPEG file with the airport map embedded in it. The original carrier file is 207,244 bytes in size and contains 224,274 unique colors. The steganography file is 207,275 bytes in size and contains 227,870 unique colors. There is no color palette to look at because JPEG uses 24-bit color coding and discrete cosine transforms. steganography media are not limited to image or audio files. Other file types also have characteristics that can be exploited for information hiding. Hydan, for example, can conceal text messages in OpenBSD, FreeBSD, NetBSD, Red Hat Linux, and Windows XP executable files. Developed by Rakan El-Khalil, Hydan takes advantage of redundancy in the i386 instruction set and inserts hidden information by defining sets of functionally equivalent instructions, conceptually like a grammar-based mimicry (e.g., where ADD instructions are a zero bit and SUB instructions are a one bit).



The field of steganography and steganalysis is still in early stage. There are lot of possibilities for the experiments and researches to be done in this field

Stego viewer is designed by keeping the fact in mind that after receiving the stego image at the other end the person may separate the image for getting the hidden image or data. That image may be left knowingly or unknowingly on the target system and leaked by some inside person to other. By applying Stego Viewer the need of separating hidden file from the carrier file to view will be avoided and the stegnography become more secure. Even some compression or security technique can also be applied on application layer to further increase the security. On the file pane tab we are going to just click the filename of the image received the software automatically display both the images of the file carrier as well as hidden. The software Stego viewer has in built password security to protect the unauthorized use of the software.


5.7 STEGANOGRAPHY: HOW TO SEND A SECRET MESSAGE Unfortunately, for serious users, every scheme we've seen is unacceptable. All are well known, and once a technique is suspected the hidden messages are easy to discover. Worse, a ten page document whose line spacing spells out a secret message is completely incriminating, even if the message is in an unbreakable code. A good steganographic technique should provide secrecy even if everyone knows it's being used. The key innovation in recent years was to choose an innocent looking cover that contains plenty of random information, called white noise. You can hear white noise as a the nearly silent hiss of a blank tape playing. The secret message replaces the white noise, and if done properly it will appear to be as random as the noise was. The most popular methods use digitized photographs, so let's explore these techniques in some depth. Digitized photographs and video also harbor plenty of white noise. A digitized photograph is stored as an array of colored dots, called pixels. Each pixel typically has three numbers associated with it, one each for red, green, and blue intensities, and these values often range from 0-255. Each number is stored as eight bits (zeros and ones), with a one worth 128 in the most significant bit (on the left), then 64, 32, 16, 8, 4, 2, and a one in the least significant bit (on the right) worth just 1.

A difference of one or two in the intensities is imperceptible, and, in fact, a digitized picture can still look good if the least significant four bits of intensity are altered -- a change of up to 16 in the color's value. This gives plenty of space to hide a secret message. Text is usually stored with 8 bits per letter, so we could hide 1.5 letters in each pixel of the cover photo. A 640x480 pixel image, the size of a small computer


monitor, can hold over 400,000 characters. That's a whole novel hidden in one modest photo! Hiding a secret photo in a cover picture is even easier. Line them up, pixel by pixel. Take the important four bits of each color value for each pixel in the secret photo (the left ones). Replace the unimportant four bits in the cover photo (the right ones). The cover photo won't change much, you won't lose much of the secret photo, but to an untrained eye you're sending a completely innocuous picture. . The trick to good steganography is make the message look random before hiding it.One solution is simply to encode the message before hiding it. Using a good code, the coded message will appear just as random as the picture data it is replacing. Another approach is to spread the hidden information randomly over the photo. "Pseudo-random number" generators take a starting value, called a seed, and produce a string of numbers which appear random. For example, pick a number between 0 and 16 for a seed. Multiply your seed by 3, add 1, and take the remainder after division by 17. Repeat, repeat, repeat. Unless you picked 8, you'll find yourself somewhere in the sequence 1, 4, 13, 6, 2, 7, 5, 16, 15, 12, 3, 10, 14, 9, 11, 0, 1, 4, . . . which appears somewhat random. To spread a hidden message randomly over a cover picture, use the pseudo-random sequence of numbers as the pixel order. Descrambling the photo requires knowing the seed that started the pseudo-random number generator. With these new techniques, a hidden message is indistinguishable from white noise. Even if the message is suspected, there is no proof of its existence. To actually prove there was a message, and not just randomness, the code needs to be cracked or the random number seed guessed. This feature of modern steganography is called "plausible deniability." All of this sounds fairly nefarious, and in fact the obvious uses of steganography are for things like espionage. But there are a number of peaceful applications. The simplest and oldest are used in map making, where cartographers sometimes add a tiny fictional street to their maps, allowing them to prosecute


copycats. A similar trick is to add fictional names to mailing lists as a check against unauthorized resellers. Most of the newer applications use steganography like a watermark, to protect a copyright on information. Photo collections, sold on CD, often have hidden messages in the photos which allow detection of unauthorized use. The same technique applied to DVDs is even more effective, since the industry builds DVD recorders to detect and disallow copying of protected DVDs. Even biological data, stored on DNA, may be a candidate for hidden messages, as biotech companies seek to prevent unauthorized use of their genetically engineered material. The technology is already in place for this: three New York researchers successfully hid a secret message in a DNA sequence and sent it across the country. 5.8 ENCRYPTION There is a secret key shared by the sender and the receiver to authenticate the origin and contents of each packet---the legitimate receiver, knowing the secret authentication key, can determine that a packet is authentic by recomputing the MAC and comparing it to the received MAC. If the comparison fails, the packet and its MAC are automatically discarded. We note that it is typical for each packet to contain a serial number as well. For example, when a long file is transmitted it is broken up into smaller packets, and each packet carries a unique serial number. The serial numbers help the receiver to remove duplicate packets, identify missing packets, and to correctly order the received packets when reassembling the file. The MAC for a packet is computed as a function of the serial number of the packet as well as of the packet contents and the secret authentication key. As an example, we might have a sequence of the form: (1,Hi Bob,465231) (2,Meet me at,782290) (3,7PM,344287)


(4,Love-Alice,312265) of MAC. String messageConvert string into triples of sequence number, message, and


Assign the letters their values f l h d l Encoded?



Make the Lines of the angles dl h Send the JPEG file

End Fig5: Flowchart for Sender

The second process involved in sending a message is ``adding chaff'':adding fake packets with bogus MACs. The chaff packets have the correct overall format, have reasonable serial numbers and reasonable message contents, but have MACs that are not valid. The chaff packets are randomly intermingled with the good (wheat) packets to form the transmitted packet sequence. Extending the preceding example, chaff packets might make the received sequence look like: (1,Hi Larry,532105)


(1,Hi Bob,465231) (2,Meet me at,782290) (2,I'll call you at,793122) (3,6PM,891231) (3,7PM,344287) (4,Yours-Susan,553419) (4,Love-Alice,312265) In this case, for each serial number, one packet is good (wheat) and one is bad (chaff). To obtain the correct message, the receiver merely discards all of the chaff packets, and retains the wheat packets. But this is what the receiver does anyway! In a a typical packet-based communication system the receiver will automatically discard all packets with bad MACs. So the ``winnowing'' process is a normal part of such a system. (Receiving a packet with a bad MAC could conceivably trigger more of a response from the receiver, but not normally; the detection of a missing packet is determined at a different level of the protocol stack, rather than upon receipt of a bad packet, since the packet may have been transmitted more than once and been received OK already.) Let us verb a word, and let ``chaffing'' mean the process of adding chaff to a sequence of packets. As above, ``winnowing'' is the (usual) process of discarding all packets with bad MACs. metaphor. We call the good packets ``wheat'' for consistency of



Start Receive the JPEG Fil Extract

Convert into text yes d no d Done? End

Fig6: Flowchart for Reciever How much confidentiality does chaffing provide? This depends on how the original message is broken into packets, and how the chaffing is done. Note that the problem of providing confidentiality by chaffing and winnowing is based on the difficulty (for the adversary) of distinguishing the chaff from the wheat. It is *not* based on the difficulty of breaking an encryption scheme, since there is no encryption being performed (although confidentiality may be obtained nonetheless, just as for steganography). If the advesary sees only one packet with a given serial number, then that packet is probably wheat, and not chaff. So a good chaffing process will add at least one chaff packet for each packet serial number used by the message. The adversary may also distinguish wheat from chaff by the contents of each packet. If the wheat packets each contains an English sentence, while the chaff packets


contain random bits, then the adversary will have no difficulty in winnowing the wheat from the chaff himself. On the other hand, if each wheat packet contains a single bit, and there is a chaff packet with the same serial number containing the complementary bit, then the adversary will have a very difficult (essentially impossible) task. Being able to distinguish wheat from chaff would require him to break the MAC algorithm and/or know the secret authentication key used to compute the MACs. With a good MAC algorithm, the

adversary's ability to winnow is nonexistant, and the chaffing process provides perfect confidentiality of the message contents. To make this clearer with an example, note that the adversary will see triples of the form: (1,0,351216) (1,1,895634) (2,0,452412) (2,1,534981) (3,0,639723) (3,1,905344) (4,0,321329) (4,1,978823) ... and so on.

It is stressed that the sending process for chaffing and winnowing is not encryption; it is authentication (adding MACs) followed by adding chaff.


Let us assume that the original message is broken into very short (one-bit) packets, and that MACs have been added to each such packet to create the wheat packets. (There is some obvious inefficiency here, since each wheat packet may end up being, say about 100 bits long, but only transmits one bit. Here each MAC might be 64 bits in length, and each serial number 32 bits long. Additional bits might also be present to identify sender, receiver, etc.) Such a message sequence is not encrypted, and the process for creating such a message sequence would presumably not be export-controlled, since the message bits are ``in the clear'' and nicely labelled with serial numbers. The process of creating chaff is also easy: just create a chaff packet with whatever serial number and packet contents you may like, and include a random 64-bit MAC value. This MAC value is overwhelmingly likely to be bad, and thus the packet created is overwhelmingly likely to be chaff. (The chances of creating a good packet are one in 2**64---approximately one in 10**19---which is effectively negligible.) The person creating the chaff would do so having seen the wheat packets, and would make chaff packets up that have the same serial numbers as the wheat packets do, but with complementary packet contents. Again, it is assumed here that an adversary, not

knowing the secret authentication key, can not distinguish a good (wheat) packet from a bad (chaff) one. It is especially intriguing to now observe that creating chaff does not require knowledge of the secret authentication key! That is, creating chaff is done by creating bogus packets with bogus randomly guessed (and thus bad) MACs; to randomly guess a MAC requires no knowledge of the secret authentication key. We could thus have the following intriguing scenario: Alice is communicating with Bob using a standard packet-based communication scheme. Each packet is

authenticated with a MAC created using a secret authentication key known only to Alice and Bob. (In practice, they might use a different key for packets in each direction, although this is not necessary if the packet contents identify sender and receiver.) Furthermore, each packet happens to contain only a single ``message bit.'' (Alice wrote their software, and it contained a bugthat caused this unusual behavior.)


So far, Alice and Bob are not encrypting anything, and are using standard messaging techniques that would not be considered as encryption and that would not be export-controlled. Alice and Bob have no intention of achieving confidentiality of their messages from an eaves dropper. Now, Alice's packets to Bob may be routed from her computer through the computer of her Internet service provider, run by Charles, on another floor of her building, before being sent on to more major trunks of the Internet and then on to Bob. Charles' computer, for whatever reason, then adds ``chaff'' packets to the packet sequence from Alice to Bob. All of sudden, Charles' activities provide a very high degree of confidentiality for the communications between Alice and Bob! Alice's and Bob's software have not been modified in the least to achieve this confidentiality! Charles does not know the secret authentication key used between Alice and Bob! Alice and Bob did not even want or care to have confidential communications! encryption and does not know any encryption key! Amazing! Clearly, the cause of the confidentiality is Charles's activities, but Charles has no encryption key or decryption key that he could give to law enforcement. Alice and Bob share an authentication key, but do not perform any encryption, and have no encryption or decryption keys. Law enforcement may be able to tap the (unencrypted) line from Alice to Charles, but that might be difficult to arrange without Alice's knowledge, as Alice and Charles are in the same building, and may even be friendly or colluding. While Charles' chaffing activities may be suspicious, they don't consitute encryption and don't involve any knowledge of keys on his part; there is no key information he could give to any law enforcement agency. In such a scenario, the obvious tack for law enforcement to take would be to demand to have access to the secret authentication key shared byAlice and Bob. But access to authentication keys is one thing that government has long agreed that they don't want to have. Having such access would allow the government to forge authenticlooking packets for any pair of parties that are communicating. This is way beyond mere Charles is not using


access to encrypted communications, as loss of such authentication keys could wreak massive havoc to the structure and integrity of the entire Internet, allow hackers not only to overhear private messages, but to actually control computers, perhaps to shut down power systems or to airline traffic control systems, etc. The power to authenticate is in many case the power to control, and handing all authentication power to the government is beyond all reason, even if it were for well-motivated law-enforcement reasons; the security risks would be totally unacceptable. Chaffing and winnowing bear some relationship to steganography. The

steganographic technique of sending an innocuous-looking letter whose letters are written in two different, but very similar fonts. By erasing all letters in one font, the hidden message written in the other font, remains. For this technique (as with most

steganographic techniques), security rests on the assumption that the adversary will not notice the use of two fonts. With chaffing and winnowing, the adversary may know (or suspect) that there are two different kinds of packets, but he is unable to distinguish them because he does not possess the secret authentication key. Chaffing and winnowing also bear some resemblance to encryption techniques. Indeed, the process of authenticating packets and then adding chaff achieves confidentiality, and so qualifies as encryption by anyone who uses a definition of encryption that is so broad as to include all techniques for achieving confidentiality. But this fails to note the special structure here, wherein a non-encrypting key-dependent first step (adding authentication) followed by a non-encrypting keyless second step (adding chaff) achieves confidentiality. Since the second step can be performed by anyone (e.g. Charles in our example), and since the first step (adding authentication) may be performed for other good reasons, we see something novel, where strong confidentiality can even be obtained without the knowledge and permission of the original sender.



6.1 SOFTWARE 6.1.1Java It is a Platform Independent. Java is an object-oriented programming language developed initially by James Gosling and colleagues at Sun Microsystems. The language, initially called Oak (named after the oak trees outside Gosling's office), was intended to replace C++, although the feature set better resembles that of Objective C. Software used Java began as a client side platform independent programming language that enabled stand-alone Java applications and applets. The numerous benefits of Java resulted in an explosion in the usage of Java in the back end server side enterprise systems. The Java Development Kit (JDK), which was the original standard platform defined by Sun, was soon supplemented by a collection of enterprise APIs. The proliferation of enterprise APIs, often developed by several different groups, resulted in divergence of APIs and caused concern among the Java developer community. Java byte code can execute on the server instead of or in addition to the client, enabling you to build traditional client/server applications and modern thin client Web applications. Two key server side Java technologies are servlets and Java Server Pages. Servlets are protocol and platform independent server side components which extend the functionality of a Web server. Java Server Pages (JSPs) extend the functionality of servlets by allowing Java servlet code to be embedded in an HTML file.


Features of Java

Platform Independence The Write-Once-Run-Anywhere ideal has not been achieved (tuning for

different platforms usually required), but closer than with other languages.

Object Oriented Object oriented throughout - no coding outside of class definitions,

including main ().

o o

An extensive class library available in the core language packages. Compiler/Interpreter Combo Code is compiled to bytecodes that are interpreted by a Java virtual

machines (JVM) .

This provides portability to any machine for which a virtual machine has

been written.

The two steps of compilation and interpretation allow for extensive code

checking and improved security.


Robust Exception handling built-in, strong type checking (that is, all data must be

declared an explicit type), local variables must be initialized.

o o o

Several dangerous features of C & C++ eliminated: No memory pointers No preprocessor Array index limit checking

Automatic Memory Management


Automatic garbage collection - memory management handled by JVM.

o o o

No memory pointers Programs run inside the virtual machine sandbox. Array index limit checking


Code pathologies reduced by byte code verifier - checks classes after loading Class loader - confines objects to unique namespaces. Prevents loading a hacked "java.lang.SecurityManager" class, for example. Security manager - determines what resources a class can access such as reading and writing to the local disk.

Dynamic Binding

The linking of data and methods to where they are located, is done at runtime.

New classes can be loaded while a program is running. Linking is done on the fly.

Even if libraries are recompiled, there is no need to recompile code that uses classes in those libraries. This differs from C++, which uses static binding. This can result in fragile

classes for cases where linked code is changed and memory pointers then point to the wrong addresses.

Good Performance

Interpretation of byte codes slowed performance in early versions, but advanced virtual machines with adaptive and just-in-time compilation and other techniques now typically provide performance up to 50% to 100% the speed of C++ programs.


Lightweight processes, called threads, can easily be spun off to perform multiprocessing.

o o

Can take advantage of multiprocessors where available Great for multimedia displays.


Built-in Networking

Java was designed with networking in mind and comes with many classes to develop sophisticated Internet communications.

6.1.2 Eclipse 3.2 Eclipse is a toll that is used to edit the java programs that are created and has a very user friendly environment and makes the process to be very simple. Some of the advantages of using this application and its features are explained below. In the Eclipse environment, every file is stored inside a project. This means that every document, folder, code file (.java) and compiled code (.class) has to be contained by a project. Hence the Eclipse project framework is explained. It is necessary to create a new project to develop a new Java program, but also to edit existing code (i.e., a .java file stored inside a diskette). To create a new project select from the main menu line "File > New > Project ... You may also select "New > Project ..." by right clicking any point of the package explorer window. To create or edit Java programs, a Java project should be created. Java project can also store program related information, such as code documentation and other related files. Simple projects should only be created to store documents and other files with no Java code. Plug-in Development projects are used to add new modules and facilities to the Eclipse environment. Eclipse Modeling Framework projects are used to create analysis and design models. Source folders are the folders that store the Java source code files (the .java files). By placing your Java files inside a source folder, they will be automatically compiled. Another striking feature of this version is that every imported element is duplicated. This means that the programmer may delete the copy of these files that Eclipse manages, and still have the original file. Nevertheless, when importing an


existing Eclipse project, the project contents will not be duplicated. Hence, special care needs to be taken when deleting files from Eclipse workspace, especially while deleting those Eclipse imported projects, as no other copies may exist. The files created using Eclipse may also be exported as normal files (File system), Java Jar files and even Zip files. This is achieved through a process similar to the importing process already detailed, selecting the "Export" option. It is also possible copying, cutting and pasting files and folders from Eclipse to your file system (i.e., Windows explorer) and vice versa (i.e., selecting a file, pressing CTRL+C, then choosing a destination folder and pressing CTRL+V). 6.2 TESTING

6.2.1 SYSTEM TESTING Testing is performed to identify errors. It is used for quality assurance. Testing is an integral part of the entire development and maintenance process. The goal of the testing during phase is to verify that the specification has been accurately and completely incorporated into the design .For example in our project we need to check if the basic criteria(hiding data behind the AVI file) has been incorporated properly to satisfy the requirements. Detection of design faults can be achieved by means of inspection as well as walkthrough. Testing is one of the important steps in the software development phase. Testing checks for the errors, as a whole of the project testing involves the following test cases: Static analysis is used to investigate the structural properties of the Source code. Dynamic testing is used to investigate the behavior of the source code by executing the program on the test data.



UNIT TESTING Unit testing is conducted to verify the functional performance of each modular component of the software. Unit testing focuses on the smallest unit of the software design (i.e.), the module. The white-box testing techniques were heavily employed for unit testing.For example in the case of our project the first module is encryption so we check if we obtain the graph for the data file giving and examine its correctness by checking the length of the lines in the graph, checking if all the data in the input file has been encrypted and so on for all the three modules(encryption,

steganography,decryption). FUNCTIONAL TESTS Functional test cases involved exercising the code with nominal input values for which the expected results are known. In our project we give the input file with three words and two or three characters in each word and check the obtained output graph to find three dots representing three words and two or three lines from each dot that represents the characters in the word. This shows that the particular module is functional and if there is a problem in the accuracy or other small alterations are needed this can be made after checking the functionality of the code. This ensures that there are no errors in the basic structure of the code. Also the boundary values and special values, files of identical elements, and empty files are tested here.

Types of tests in Functional test:

Stress Test Structure Test

STRESS TEST Stress Test is those test designed to intentionally break the unit. A Great deal can be learned about the strength and limitations of a program by examining the manner in which a program unit breaks.


STRUCTURED TEST Structure Tests are concerned with exercising the internal logic of a program and traversing particular execution paths. The way in which White-Box test strategy was employed to ensure that the test cases could Guarantee that all independent paths within a module have been have been exercised at least once. Exercise all logical decisions on their true or false sides. Execute all loops at their boundaries and within their operational bounds. Exercise internal data structures to assure their validity. All this can be done by going through the code as many times as possible with an intention of finding flaws. INTEGRATION TESTING Integration testing is a systematic technique for construction the program structure while at the same time conducting tests to uncover errors associated with interfacing. i.e., integration testing is the complete testing of the set of modules which makes up the product. The objective is to take untested modules and build a program structure tester should identify critical modules. Critical modules should be tested as early as possible. One approach is to wait until all the units have passed testing, and then combine them and then tested. This approach is evolved from unstructured testing of small programs. Another strategy is to construct the product in increments of tested units. A small set of modules are integrated together and tested, to which another module is added and tested in combination. And so on. The advantages of this approach are that, interface dispenses can be easily found and corrected. The major error that was faced during the project is linking error. When all the modules are combined the link is not set properly with all support files. Then we checked out for interconnection and the links. Errors are localized to the new module and its intercommunications. The product development can be staged, and modules integrated in as they complete unit testing. Testing is completed when the last module is integrated and tested.



Testing is a process of executing a program with the intent of finding an error. A good test case is one that has a high probability of finding an as-yet undiscovered error. . System testing is the stage of implementation, which is aimed at ensuring that the system works accurately and efficiently as expected before live operation commences. It verifies that the whole set of programs hang together. System testing requires a test consists of several key activities and steps for run program, string, system and is important in adopting a successful new system. This is the last chance to detect and correct errors before the system is installed for user acceptance testing. The software testing process commences once the program is created and the documentation and related data structures are designed. Software testing is essential for correcting errors. Otherwise the program or the project is not said to be complete. Software testing is the critical element of software quality assurance and represents the ultimate the review of specification design and coding. Testing is the process of executing the program with the intent of finding the error. A good test case design is one that as a probability of finding an yet undiscovered error.. Any engineering product can be tested in one of the two ways:

White box testing This testing is also called as Glass box testing. In this testing, by knowing the specific functions that a product has been design to perform test can be conducted that demonstrate each function is fully operational at the same time searching for errors in each function. It is a test case design method that uses the control structure of the procedural design to derive test cases. Basis path testing is a white box testing. Basis path testing Flow graph notation Cyclometric complexity Deriving test cases Graph matrices Control


Black Box Testing

In this testing we do not test the internal functionality. We give various possible inputs and get the required output to check the correctness. If in all the cases the obtained output matches the given input then we conclude that there are no flaws. But the strength of the black box testing lies in the type of inputs that we give. The steps involved in black box test case design are: Graph based testing methods Equivalence partitioning Boundary value analysis Comparison testing


Software validation is achieved through a series of tests that demonstrates conformity with requirements .So in our case we give various possible inputs to check if all the requirements of the project are satisfied. That is if the project is complete.


The logical and syntax errors have been pointed out by program testing. A syntax error is an error in a program statement that in violates one or more rules of the language in which it is written. An improperly defined field dimension or omitted keywords are common syntax error. These errors are shown through error messages generated by the computer. in the program the purpose of condition test is to deduct not only errors in the condition of a program but also other a errors in the program.



7.1 CODING Client

/* * * */

package anglestegnography;

import java.awt.Container; import; import; import; import; import; import; import; import; import; import; import; import; import java.util.ArrayList;

import javax.swing.JFileChooser;


import Log.Log;

import videostegnography.VideoStegnography; import wordextractor.WordTextSource; public class Client extends javax.swing.JFrame {

/** Creates new form Client */ public Client() { initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-

BEGIN:initComponents private void initComponents() { jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jTextField3 = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); jButton4 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jButton5 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel();


setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("AngleStegnographyClient"); setResizable(false); jTextField1.setText("Enter the Server IP"); jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTextField1FocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTextField1FocusLost(evt); } });

jTextField2.setText("Enter The Port"); jTextField2.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTextField2FocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTextField2FocusLost(evt); } });

jButton1.setText("ConnectToServer"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });




jButton2.setText("browse"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

jButton3.setText("convert"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } });


jButton4.setText("stegnograph"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } });


jButton5.setText("send"); jButton5.addActionListener(new java.awt.event.ActionListener() {


public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } });





org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(jTextField2) .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 210, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jButton2)) .add(layout.createSequentialGroup() .add(jButton1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(layout.createSequentialGroup()


.add(jButton3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,

org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(layout.createSequentialGroup()

.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jButton4) .add(jButton5)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)

.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE) .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,

org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(28, 28, 28) .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,

org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(15, 15, 15) .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,

org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(21, 21, 21)


.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton1) .add(jLabel1)) .add(33, 33, 33) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,

org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jButton2)) .add(23, 23, 23) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton3) .add(jLabel2)) .add(17, 17, 17) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton4) .add(jLabel3)) .add(29, 29, 29) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton5) .add(jLabel4)) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton5ActionPerformed // TODO add your handling code here: Socket socket = getSocket();


ObjectOutputStream outputStream = null;

try { outputStream ObjectOutputStream(socket.getOutputStream()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } File file = new File(jLabel3.getText()); InputStream is = null; try { is = new FileInputStream(file); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte[] data = null; try { data = new byte[is.available()]; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try {; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { = new


outputStream.writeObject(data); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { outputStream.writeObject(new Integer(getStartIndex())); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } jLabel4.setText("File sent to server"); }//GEN-LAST:event_jButton5ActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton4ActionPerformed // TODO add your handling code here:

File file = new File("output/info.jc"); VideoStegnography stegnography = new VideoStegnography(); stegnography.stegnograph(file); String aviFileName = stegnography.getAviFileName(); int startIndex = stegnography.getStartIndex(); setStartIndex(startIndex); jLabel3.setText(aviFileName);


private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton3ActionPerformed // TODO add your handling code here:


String fileName = jTextField3.getText(); File file = new File(fileName);

FileReader reader = null; try { reader = new FileReader(file); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } BufferedReader in = new BufferedReader(reader); InputStream inputStream = null;

try { inputStream = new FileInputStream(file); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } WordTextSource extractor = new WordTextSource(); String contentOfFileAsAString = null; try { contentOfFileAsAString = extractor.extractText(inputStream); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("contentOfFileAsAString "+contentOfFileAsAString); =

ArrayList<String> line = new ArrayList<String>();


ArrayList<String> words = new ArrayList<String>(); ArrayList<Word> wordList = new ArrayList<Word>(); String string = "";

for (int i = 0; i < contentOfFileAsAString.length(); i++) { char c = contentOfFileAsAString.charAt(i); if(c != '.'){ string += c; }else{ line.add(new String(string)); string = ""; } }

for (int i = 0; i < line.size(); i++) { line.set(i, line.get(i).trim()); } Log log = new Log("log.txt");

for (int i = 0; i < line.size(); i++) { System.out.println(line.get(i)+"\n"); log.append(line.get(i)+"\n"); }

for (int i = 0; i < line.size(); i++) { String string2 = line.get(i); String[] word = string2.split(" "); for (int j = 0; j < word.length; j++) { words.add(word[j]); log.append(word[j]+"\n"); System.out.println("word = "+word[j]);


} }

for (int j = 0; j < words.size(); j++) { String word = words.get(j); Word graphWord = new Word(j,word); int angValue = 6; for (int i = 0; i < word.length(); i++) { char c = word.charAt(i); //System.out.println(c+" "+Character.getNumericValue(c)); //char d = =

Character.forDigit(Character.getNumericValue(c), Character.MAX_RADIX); //System.out.println("d = "+d); int placeValue = i+1; int angleValue = placeValue * angValue; int lengthValue = Character.getNumericValue(c); graphWord.add(angleValue, lengthValue); }

wordList.add(graphWord); }

File graphFile = new File("output/info.jc");

ObjectOutputStream oos = null; try { oos FileOutputStream(graphFile)); } catch (FileNotFoundException e) { = new ObjectOutputStream(new


// TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }

try { oos.writeObject(wordList); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }

try { oos.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } jLabel2.setText("The Graph file = output/info.jc"); Graph graph = new Graph(wordList);


private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton2ActionPerformed // TODO add your handling code here: File file1 = new File("");


String path = file1.getAbsolutePath(); path = path.substring(0, path.lastIndexOf("\\")); path += "\\Input"; System.out.println(path);

File curDir = new File(path); curDir.mkdir();

JFileChooser chooser = new JFileChooser("SELECT THE MAIN FILE"); chooser.setCurrentDirectory(curDir); System.out.println("curDir = "+curDir);


File file = chooser.getSelectedFile(); jTextField3.setText(file.getAbsolutePath());


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton1ActionPerformed // TODO add your handling code here: String serverIp = jTextField1.getText(); int serverPort = Integer.parseInt(jTextField2.getText());

Socket socket = null; try { socket = new Socket(serverIp,serverPort); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace();


jLabel1.setText("Server is not connected"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } setSocket(socket); jLabel1.setText("Server is connected");







FIRST:event_jTextField2FocusLost // TODO add your handling code here: if(jTextField2.getText().equalsIgnoreCase(""))jTextField2.setText("Enter Port"); }//GEN-LAST:event_jTextField2FocusLost The






FIRST:event_jTextField2FocusGained // TODO add your handling code here: jTextField2.setText(""); }//GEN-LAST:event_jTextField2FocusGained






FIRST:event_jTextField1FocusLost // TODO add your handling code here: if(jTextField1.getText().equalsIgnoreCase(""))jTextField1.setText("Enter Server IP"); }//GEN-LAST:event_jTextField1FocusLost the







FIRST:event_jTextField1FocusGained // TODO add your handling code here: jTextField1.setText(""); }//GEN-LAST:event_jTextField1FocusGained public getSocket() { return socket; }

public void setSocket( socket) { this.socket = socket; } public int getStartIndex() { return startIndex; }

public void setStartIndex(int startIndex) { this.startIndex = startIndex; } public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Client().setVisible(true); } }); }

// Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3;


private javax.swing.JButton jButton4; private javax.swing.JButton jButton5; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JTextField jTextField1; private javax.swing.JTextField jTextField2; private javax.swing.JTextField jTextField3; private socket = null; private int startIndex = 0;

// End of variables declaration//GEN-END:variables


Server /* * */

package anglestegnography;

import; import; import; import; import; import; import; import; import; import; import java.util.ArrayList;

import org.apache.poi.hssf.record.formula.functions.Char;

import videostegnography.VideoStegnography; public class Server extends javax.swing.JFrame {

/** Creates new form Server */ public Server() { initComponents(); }

/** This method is called from within the constructor to * initialize the form.


* WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-

BEGIN:initComponents private void initComponents() { jLabel3 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton();


setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButton1.setText("Start Server"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });


jButton2.setText("ExtractFile"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); }




jButton3.setText("ShowGraph"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } });

jButton4.setText("Get The File"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } });




org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 333, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jButton1) .add(layout.createSequentialGroup()


.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jButton2) .add(jButton3)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE)) .add(jButton4)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(21, 21, 21) .add(jButton1) .add(23, 23, 23) .add(jLabel1) .add(24, 24, 24) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton2) .add(jLabel2)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jButton3) .add(14, 14, 14) .add(jButton4) .addContainerGap(106, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents


private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton4ActionPerformed // TODO add your handling code here:

String fileContent = ""; for (Word word : getWordList()) { String strword = null; ArrayList<Integer> angleList = word.getAngleList(); ArrayList<Integer> lengthList = word.getLengthList(); char[] cs = new char[word.getAngleList().size()]; for (int i = 0; i < cs.length; i++) { int index = angleList.get(i)/6; char Character.MAX_RADIX); cs[index-1] = c; } strword = new String(cs); fileContent += strword+" "; } c = Character.forDigit(lengthList.get(i),

System.out.println("fileContent = "+fileContent);

File outFile = new File("output/OutputFile.txt"); OutputStream osss = null; try { osss = new FileOutputStream(outFile); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } try {


osss.write(fileContent.getBytes()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { osss.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }


private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton3ActionPerformed // TODO add your handling code here:

File graphFile = new File("output/receivedGraphFle.jc"); ObjectInputStream oiss = null; try { oiss = new ObjectInputStream(new FileInputStream(graphFile)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }

ArrayList<Word> wordList = new ArrayList<Word>();


try { wordList = (ArrayList<Word>) oiss.readObject(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }

Graph graph = new Graph(wordList); setWordList(wordList);


private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton2ActionPerformed // TODO add your handling code here:

VideoStegnography stegnography = new VideoStegnography(); stegnography.setStartIndex(startIndex); byte[] graphData = stegnography.getActualData(data);

File graphFile = new File("output/receivedGraphFle.jc"); OutputStream oss = null; try { oss = new FileOutputStream(graphFile); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace();


try { oss.write(graphData); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } jLabel2.setText("output/receivedGraphFle.jc"); }//GEN-LAST:event_jButton2ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GENFIRST:event_jButton1ActionPerformed // TODO add your handling code here: ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(1700); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Socket socket = null; jLabel1.setText("Server is waiting"); try { socket = serverSocket.accept(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } jLabel1.setText("Client Connected"); ObjectInputStream ois = null;


try { ois = new ObjectInputStream(socket.getInputStream()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte[] data = null; try { data = (byte[]) ois.readObject(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }

int startIndex = 0;

try { startIndex = (Integer) ois.readObject(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (ClassNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }

File file = new File("output/ReceivedStegnographedAVI.avi"); OutputStream is = null;


try { is = new FileOutputStream(file); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { is.write(data); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { is.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } jLabel1.setText("AVI file received");

setData(data); setStartIndex(startIndex);

}//GEN-LAST:event_jButton1ActionPerformed public byte[] getData() { return data; }

public void setData(byte[] data) {

73 = data; }

public int getStartIndex() { return startIndex; }

public void setStartIndex(int startIndex) { this.startIndex = startIndex; } public ArrayList<Word> getWordList() { return wordList; }

public void setWordList(ArrayList<Word> wordList) { this.wordList = wordList; } public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Server().setVisible(true); } }); }

// Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; private javax.swing.JLabel jLabel1;


private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private byte[] data = null; private int startIndex = 0; private ArrayList<Word> wordList = null;

// End of variables declaration//GEN-END:variables


package anglestegnography;

import java.awt.Frame; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.util.ArrayList;

import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane;

public class Graph {

ArrayList<Word> wordList = new ArrayList<Word>(); JFrame frame = null;


JScrollPane jScrollPane1 = null; private int scrollPaneW = 900; private int scrollPaneH = 700;

public Graph(ArrayList<Word> wordList) { // TODO Auto-generated constructor stub setWordList(wordList);

/*JFrame frame = new JFrame("Graph"); JPanel panel = new JPanel(){ public void paint(Graphics graphics){ super.paint(graphics); graphics.drawString("Testing", 100, 100); } }; frame.add(panel); frame.setExtendedState(JFrame.MAXIMIZED_BOTH); frame.setVisible(true);*/

String frameName = "Graph"; frame = new javax.swing.JFrame(frameName); jScrollPane1 = new javax.swing.JScrollPane(); JPanel jPanel1 = new javax.swing.JPanel(){ public void paint(Graphics graphics){ super.paint(graphics); paintIt(graphics); //graphics.drawString("Testing", 100, 100); } }; JLabel jLabel1 = new javax.swing.JLabel();


frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255));

org.jdesktop.layout.GroupLayout org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); int paneX = 2000;



jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(paneX, Short.MAX_VALUE) .add(jLabel1)) ); int paneY = 2000; jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(paneY, Short.MAX_VALUE) .add(jLabel1)) ); jScrollPane1.setViewportView(jPanel1);




frame.addComponentListener(new ComponentAdapter(){

public void componentResized(ComponentEvent e) { // TODO Auto-generated method stub super.componentResized(e); /*Component component = arg0.getComponent();

System.out.println("component.getName()="+component.getName()); if (component.getName().equalsIgnoreCase("frame0")) {

Dimension dimension = component.getSize(); System.out.println("dimension.width "+dimension.width); System.out.println("dimension.height "+dimension.height); = =

setScrollPaneW(dimension.width-30); setScrollPaneW(dimension.height-50);

design(); }*/ } }); frame.setVisible(true);

} private void paintIt(Graphics graphics) { // TODO Auto-generated method stub Graphics2D graphics2D = (Graphics2D) graphics;

int x1 = 200;


int y1 = 100;

int count = 0;

for (Word word : wordList) { ArrayList<Integer> angleList = word.getAngleList(); ArrayList<Integer> lengthList = word.getLengthList(); graphics2D.drawString(word.getName(), x1, y1+10); for (int i = 0; i < angleList.size(); i++) { int degree = angleList.get(i); int length = lengthList.get(i); length *= 3; //degree = 90; //length = 100; //System.out.println("degree "+length); = "+degree+", length =

int x2 = (int) ((length * ((Math.cos(degree)))) + x1); int y2 = (int) ((length * ((Math.sin(degree)))) + y1); //System.out.println("x2 = "+x2+",y2 = "+y2+" cos = "+(Math.round(Math.cos(degree)))); graphics2D.drawLine(x1, y1, x2, y2);

//graphics2D.fillArc(10, 10, length, 300, 1, 1);// //break; } y1 += 200; count++; if(count % 10 == 0){ x1 += 200; y1 = 100;


} //break; } } public void design(){ if(frame != null){

frame.getContentPane().setLayout(null); org.jdesktop.layout.GroupLayout org.jdesktop.layout.GroupLayout(frame.getContentPane()); frame.getContentPane().setLayout(layout); layout.setHorizontalGroup( layout = new

layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(10, 10, 10) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(0, Short.MAX_VALUE)) ); layout.setVerticalGroup( scrollPaneW,

layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(10, 10, 10) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(0, Short.MAX_VALUE)) ); scrollPaneH,


} } public ArrayList<Word> getWordList() { return wordList; } public void setWordList(ArrayList<Word> wordList) { this.wordList = wordList; } public static void main(String[] args) { new Graph(null); }} Main /* * * * * To change this template, choose Tools | Template Manager * and open the template in the editor. */

package anglestegnography; public class Main {

/** Creates a new instance of Main */ public Main() { } public static void main(String[] args) { // TODO code application logic here }






The battle between steganography and steganalysis represents an important part of 21st century cyber warfare with a profound influence on information security. The two sides of the battle are the attempt to transmit secret messages under cover of innocuous multimedia signals and the effort to detect or prevent such hidden communication.A number of steganographic tools have been developed, many available online. In a sense, some simple methods are already defeated due to the relentless endeavor of steganalysts. Meanwhile, countermeasures against steganalysis are also emerging. Tools that can withstand, to some degree, both visual and statistical attacks are being introduced. For example, in data embedding, much effort has gone toward preserving the statistical characteristics of the cover media. To combat steganalytic tools based on analyzing the increase of unique colors in an image, new embedding methods may be devised that avoid creation of new colors. Alternatively, modifications leading to detectable artifacts may be compensated for after embedding while ensuring the intended recipient is still able to extract the secret message.



We plan to introduce techniques similar to password hiding which is used in the operating systems wherein only the user knows the data he is entering. And no user will be able to gain access to the message sent by the other user.


[1] S. Katzenbeisser and F.A.P. Petitcolas, (2000), Information Hiding Techniques

for Steganography and Digital Watermarking,Artech House, Boston,. [2] H.K. Pan, Y.Y. Chen, and Y.C. Tseng, (2000), A Secure Data HidingScheme for

Two-Color Images, Proc. Fifth IEEE Symp.Computers and Comm., IEEE Press, Piscataway, N.J. [3] N.F. Johnson and S. Jajodia, (Feb 1998), Exploring Steganography: Seeing the

Unseen, Computer, vol. 31, no. 2. [4] R. Chandramouli, M. Kharrazzi, and N. Memon, (2004), Image steganography

and steganalysis: Concepts and Practice Lecture Notes in Computer Science , SpringerVerlag, vol. 293 [5] [6] Special issues on Neural Network, IETE, journal, 1997 D. Kahn. The history of steganography. In proceedings of Information Hiding,

First international workshop, Cambridge, UK, 1996. [7] T.. Aura, Invisible Communication, EET 1995, technical report, Helsinki

University of Technology, Finland