Steganography Using JAVA
Steganography Using JAVA
(Defence Research & Development Organization) Jodhpur-342011 From 18 May to 15 July, 2011 Project Report On Steganography Using (Java )
Steganography
INTRODUCTION TO D.R.D.O
Before India become an independent nation in 1947, the defence of the country was the responsibility of the Defence Department (under the British Rule). Soon after India become independent, the Defence department become the Ministry of Defence, headed by a Minister of the cabinet rank. According to the constitution of India , the president of India is the supreme commander of the Armed Forces and executive responsibility for national defence rests with the Union Cabinet of which Defence Minister is an important member. Having developed several advanced defence systems , DRDO has acquired expertise in a wide spectrum of defence technologies. Area of the core competence of the organization include : System and Platform ; Development of complex high-end software packages; Develoment of Functional Material ; Test and Evaluation ; Technology Transfer and Absorption. In addition Expertise and Infrastructure have been built up for carrying out basic/applied research in areas of relevance to Defence science and Technology , quality Assurance and Safety, project and Technology Management. Defence Research and Development Organization (DRDO)wasestablished in 1958 by amalgamating defence science organization and some of the technical development establishments . A separate department of defence research and development was formed in 1980, which now administer DRDO and its 50 laboratories
Steganography 2
/ establishments . A.P.J Abdul Kalam , who was previously director of the DRDL responsible for Indias missile development program , currently directs DDRO. Research and development activities at DRDO cover important demarcated disciplines like aeronautics, rocket and missiles , electronics and instrumentation, combat vehicles, engineering , naval system ,research advanced computing , artificial intelligence , robotics, work study, system analysis and life science including high attitude agriculture, physiology , food technology and nuclear medicine. In addition to undertaking research and development activities . DRDO also assist the services by rendering technical advice regarding formulation of requirements, evaluation of systems to be acquired , fireand explosive safety and mathematical and statistical analysis of operational problems. DRDO has made significant achievements in its efforts to meet the requirements of the three services . The notable developmental successes include flight simulators for aircraft, 68mm reusable rocket pod, brake parachute for fighter aircraft , mini remotely piloted vehicle, light field gun, new family of light weight small arms system, charge line mine clearing vehicle for safe passage of vehicle in battlefield and illuminating ammunitions for enhancing night fighting capabilities. Cluster weapon systems for fighter aircraft and low level bombing mountain gun, 130 mm SP gun, low level tracking radar Indra- 1st and 2nd for army and air force, light field artillery radar, battlefield surveillance radar, secondary surveillance radar have also been
Steganography 3
achieved. Bridge layer-tank kartik, military bridging systems capable of withstanding tank load, advanced ship sonar systems, advanced son buoys, naval decoys. Several high technology projects are in various stages of design and development . The main ballet tank Arjun, incorporating stage-of-art tank technologies with superior firepower , high mobility and excellent protection has been developed the army is producing a limited number of tanks as pre-production series, which are in final stages of evaluation. A light combat aircraft , which would be lighter than any other combat aircraft and would incorporate modern design concepts and several stage-of the art technologies, is under full scale engineering development. The integrated Guided Missile Development program is in progress.
Steganography
Index
Abstract..8 Chapter 1: Introduction.9 Chapter 2.Analysis10 Purpose...11 Scope......11User Characteristics..11 Assumptions and
Dependency....11 Constraint....11 Functional Requirement...12 Chapter 3. Design.13 Storing message image into carrier image....13 Micro Level..13 Macro Level .......14 Decrypt.16 Data Flow Diagram.18 Chapter 4.Implementation......20 Chapter 5. Testing.........22 Chapter 6. Post Implementation.............24 Chapter 7. User Walkthrough......28 Chapter 8. Future Enhancement.....30 Chapter 9. References......32
Steganography
ABSTRACT
Steganography is a technique allows a user to securely hide messages in a cover media and to extract hidden message from the same. Cover media can be images or videos. The information to be hidden can be a plain text message, another image or anything that can be represented in binary data . The application is intended to be used to hide confidential and proprietary information by anyone seeking to hide information. A combination of both steganography and encryption algorithm provides a strong backbone to our projects security. This software has an advantage over other information security systems as both the key and the hidden messages are stored and transferred so no other person can see the secret message. Another advantage of this program for individuals is that they do not have to have any knowledge about steganography or encryption. Project is developed using Java Development Kit (JDK) 1.6 , Notepad ++. Any device that can support a Java Virtual Machine for JDK 1.6, along with the necessary memory and disk storage space will be able to execute our application.
Steganography
Chapter 1 INTRODUCTION
The main and the must feature of all the product is security .so I have chosen one of the medium steganography to provide security. Steganography is the art and science of hiding information by embedding messages within other messages. Steganography works by replacing useless or unused data in regular computer files (such as graphics, sound, text, HTML, etc.) with different, invisible information or Using steganography a secret message is embedded in a medium. This hidden information can be plain text, cipher text, or even images. The existence of the hidden message is not known except by the sender and receiver. The word is derived from the Greek words stegos meaning covered and graphia meaning writing. The system that has been developed by me hide message behind any image.
PROBLEM DEFINITION Encrypted data is difficult to decipher, but it is relatively easy to detect. Encryption only obscures a message's meaning, not its existence. Therefore, steganography, a technique that hides the existence of a message, is often used to supplement encryption. It's easy to use and works by replacing bits of data in computer files or communication channels.
Steganography
Chapter 2 ANALYSIS
During analysis we find that there are many techniques for providing security to the digital data i.e. text, images etc from the miscreants. Some of these are as follows: Cryptography. Steganography. Water-marking. Cryptography is an important technique for hiding the message and thus providing security to the message. Cryptographyis the process of obscuring information to make it unreadable without some type of special knowledge. In this case the message is not concealed just scrambled or obscured. It does not hide the fact that the message exists.A coded message that is unhidden, no matter how strong the encryption, will arouse suspicion and may in itself be problematic. Another technique for providing security to the digital data is water-marking. A digital watermark is a pattern of bits inserted into a digital image, audio or video file that identifies the file's copyright information (author, rights, etc.). Digital watermarks are designed to be completely invisible, or in the case of audio clips, inaudible. In digital watermarking the purpose of inserting the bits is to protect the cover image rather than the encrypted bits.
With steganography this problem is resolved. While cryptography and steganography are related, there is a difference between the two. The obvious advantage of steganography over cryptography is that messages do not attract any attention. Steganography conceals the fact that the message exists by hiding the actual message in another. The cover is the medium which is used to hide the secret information. Cover media is an image or a sequence of images. The
information to be hidden is another image. The message can also be scattered randomly throughout the image.
Steganography
In steganography since message is hidden behind the cover and it is cover which is visible, when in encrypted form, thus providing security to the digital data.There is no suitable encryption technique for images other than the steganography. An image contains thousand words so hiding of an image is a hiding of thousand words. Thus we have chosen steganography as My Training project as it is more reliable and secured than other two techniques. System Requirement Specification:-
Purpose:An image contains thousand words so hiding of an message is a hiding of thousand words. So the main purpose of our project is to hide a message into a cover image.
Scope: Message will be hidden into a cover image. A large message will be hidden into multiple cover images. A comparator will distinguish between normal cover image and image after encryption.
User characteristics:A user with brief knowledge about computer will be able to use our software for hiding message. And software developers will be able to use it as a module in other project. Assumptions and Dependencies: Alpha (the transparency factor of image) remains same for each pixel of image, so we will not use the alpha value of cover image for storing message. Size and cover images is dependent upon the size of message.
Constraint:The resultant image should be in bmp or png format because it is a loss less compression of image.
Steganography
Functional Requirements: Store:It will encrypt the message into the cover image. Input: - Message , Carrier image. Operation: - Bits of the carrier message will be manipulated for storing the Message image. Output: - Encrypted image. Retrieve:It will decrypt the encrypted for retrieving the message image. Input: - Encrypted image. Operation: - Bits of the encrypted image will be manipulated for retrieving the message image. Output: - Message.
Steganography
10
Chapter 3 DESIGN
Design is a meaningful engineering representation of something that is to be built. It can be traced to a customers requirements and at the same time accessed for a quality against a set of predefined criteria for good design.
Storing message into carrier image We are using least significant bit insertion method. In this method the LSB of each RGB color component in the image is used to store the secret data. The resulting changes are too small to be recognized by the human eye. The disadvantage of this technique is that since it uses each pixel in an image, a lossless compression format like bmp or gif has to be used for the image. If lossy compression image ( JPEG) is used, some of the hidden information might be lost.
Micro Level (bit level): First of all the message bits are ANDed with 0x01 and then carrier bits are ANDed with 0x0xFE. The resultant carrier bits are ORed with altered message bits to store the message into carrier. This method is shown in following formula:Pmsg AND 0x01 => Pmsg ` Pcarr AND 0xFE => Pcarr ` Pcarr ` OR Pmsg ` => Pcarr ``
Steganography
11
Red 11010010
AND
Green 10110101
Blue 10111111
0x01
00000000
00000000
00000000
0 0 0 0 0 00 1
Pmsg`
00000000
00000000
00000000
00000001
Pcarr 0x fffffffe
11111111 11111111
11101101 11111111
11100100
AND
10111111 11111110
11111111
Pcarr` Pmsg`
11111111 00000000
11101101
OR
11100100 00000000
10111110 00000001
00000000
Pcarr``
11111111
11101101
11100100
1 0 1 1 1 11 1
Like this we will take next one bit of message by right shifting it by 1,2,3. and then it is ORed with the carrier pixel .
Macro Level (image level): Carrier image must be at least 8 times than the message. Because a bit of message is stored into the 1 pixels of carrier image and some extra information like length of message is also stored into the carrier image.
Steganography
12
1 0 1 1 1 0 0 1
1 1 1 0 0 1 0 1
1 1 1 1 1 1 0 1
1 1 1 1 1 1 0 1
1 0 1 1 0 1 0 0
1 1 0 0 0 0 1 1
0 1 1 1 1 1 1 0
0 0 0 0 1 0 1 1
0 1 0 1 1 1 1 0
1 1 1 1 0 0 0 1
0 1 1 0 1 1 1 1
1 0 0 0 0 0 0 1
1 0 1 1 1 1 1 1
1 1 10 0 1 0 1 11 1 0 1 0 11
Message
Carrier image
Steganography
13
1 1 0 1 0 1 0 0 1 1
1 0 1 0 1 0 1 0 1 1
0 1 1 1 1 0 1 0 1 1
1 0 0 0 1 0 0 1 0 0
1 0 0 1 1 1 1 0 0 0
1 0 1 0 1 1 0 0 0 1
0 1 1 1 1 0 1 0 1 1
0 1 1 1 0 1 0 0 0 1
1 1 0 1 1 0 1 1 1 1
1 0 1 0 0 1 1 1 1 1
1 1 0 0 1 0 1 1 1 1
1 0 1 0 0 1 1 1 0 0
1 1 1 0 1 0 0 0 1 1
1 1 1 1 1 1 1 0 1 0
0 0 1 1 1 1 0 1 1 0
1 0 1 1 1 1 1 0 0 1
0 1 1 1 1 0 1 0 1 1
0 0 1 0 0 0 1 1 1 0
1 0 0 1 1 0 1 1 0 1
1 2 3 . . . . . 32
Steganography
14
Pcarr
11111111
1 1 1 0 1 111
AND
1 1 1 0 0 1 11
10111100
0x01
00000000
00000000
00000000
00000011
Pmsg1
00000000
00000000 00000000
00000000 00000000
Pnewmessage 0 0 0 0 0 0 0 0
Pmsg1 00000000
00000000
00000000
0 0 0 0 0 000
Pnewmessage 0 0 0 0 0 0 0 0
00000000
<< 1 (left shift)
00000000 00000000
0 0 0 0 0 0 00 00000000
Pnewmessage
00000000
00000000
Continue with same process with new pixel and save bit in Pnewmessage
Steganography
15
CONTEXT DIAGRAM:
Encrypted image
Steganography
Message Encrypted image
1-LEVEL DFD
Store 1
Encrypted image
Encrypted image
Retrieve 2
Message
Steganography
16
2-LEVEL DFD
Encryptor 1.4
Message
Steganography
17
Chapter 4 IMPLEMENTATION
The GUI will contain a Check object, and will instantiate Encode andDecode objects as needed to encode and decode images. User will respond to all of theusers events and set the progress bar to visible when an encryption process is started.
Field Summary Integer WalkThroughState Contains information regarding the current state of the walkthrough. JFrame progressPopUp A dialog box for the progress bar. JProgressBar codingProgress Shows the user the status of the coding process.
User Panel
JPanel - Panel The main panel of the application contains a text tab and an image tab as described below.
JTextArea - t1,t2,t3 This is the text area into Encode , the user types the text to be hidden within an image.and file path and new file path also save in TextArea. .
BufferedImage - image This tab is also located within the panel. Its sole purpose is to contain an image, for pixel grab work for encryption and create new image after encryption.
JTextArea - t
Steganography
18
.
Functional Panel
JButton button , b1 button will load the image for decode and b1 will load a decode process in Decode.java. JButton b1,b2,b4,b5 b4 will load image for encryption. b2 will load path of new image to be saved. b1 will load a process of encryption. b5 will load a back process for encode decode option in Encode.java
JTextArea - T This box will contain a decrypted message in decoding process In Showmsg class.
Constructor Summary GUI() Instantiates, adds, and sets listeners for all interactive components. Instantiates object and JProgressBar
Steganography
19
Chapter 5 TESTING
I applied many tests on our project and i encountered many bugs and successfully debugged them by using several test modules. Some test cases are as follows: Test: Encryption unit Test 1: Size test: Test approach: Here we took different images of different sizes. Goal and result: This test is performed for checking the maximum size of the message and carrier image. Message can not be more than 32 times of image size.
Test 2: Image comparison: Test approach: Here we compared bit patterns of the message , cover image and encrypted image. Goal and result: This test is performed for checking whether the message is being stored into the cover image. As a result we found that the bit pattern of the normal cover image is different from the encrypted image.
Test 3: Logic testing: Test approach: Here we compared the bit pattern of the encrypted image being made and the encrypted image stored on the disk. Goal and result: This test is performed for checking the bit pattern of the stored encrypted image and encrypted image being made. As a result we found that the information stored at alpha value is lost because the alpha value for every pixel remainssame.
Steganography
20
Test 4: Decryption of message image stored in multiple carrier images. Test approach: Here we took different carrier images in different order. And some time leave some carrier images. Goal and result: This test is performed for checking whether the message can be decrypted from encrypted images , and effect of loosing any one of the encrypted message bit. As a result we found that the encrypted message can be decrypted in any order. Also message can be made after loosing any of the part of encrypted images, but the part of the message, which was in the lost encrypted image, remained undetermined and difficult to find that type of problem, and means it is lost.
Steganography
21
Welcome Page
Steganography
22
Steganography
23
Steganography
24
Steganography
25
A portion of the main GUI is devoted to the user walkthrough. This walkthrough willlead first time users through the process of encoding and decoding message and in its final stepinitiate the actual encoding or decoding of the users text. The user may prepare for and perform encoding and decoding at any time without the use of the walkthrough.Consult the following flow chart and corresponding description of states to understand the walkthrough process.
3 4
The box below explains how each state will be described. Each has a unique state number.
Steganography
26
State 0: There will be two buttons one for message encoing and second for message decoding.
State 1: Choose a carrier image. State 2: Enter message. State 3: Choose path to create a new images. State 4: Press Continue button and wait for while a progress bar not completed. And message encode successfully message will be show.
State 5: Choose encrypted images for the required message to de decrypted. State 6: Press decode it button State 7: After successfully decoding , message will be show in new panel.
Chapter 8
Steganography
27
FUTURE ENHANCEMENT
Our project can be further extended by little bit of efforts. Various security enhancing and fault tolerant features can be implemented easily. They are as follows:1. Further this product can be used to send the video clips and image similar in the fashion as that message is send. 2. Another extra security can be provided by saving the part of message redundantly in more than one carrier. Thus message can be retrieve even if one carrier is lost or destroyed. Thus, making our product fault tolerant.
MI 1 Message part MI 2 MI 3 MI 4
MI 1 MI 2
MI 2 MI 3
MI 3 MI 4
MI 4 MI 1
3.
message can be bifurcated into four or more quadrants and similarly the carrier image. Then
Steganography
28
a random function is used to decide which part of message image is to be stored in which quadrant of the carrier image. Thus enhancing the security aspects.
MI 1
MI 2
Random function
MI 3
MI4
Message Image
MI 4
MI 1
MI 2
MI 3
Encrypted Image
Steganography
29
Chapter 9 REFERENCES
[1] Java Swing, [Loy,Eekestein,Wood,Elloit & Cole].
[4].Park, Jihyun,
Jeong, Yeonjeong,
Yoon, Ki-Song,
protection among the heterogeneous devices, Consumer Electronics, 2007. ISCE 2007, IEEE International Symposium, pp: 1-5. Stoklosa, Janusz: Steganography, Computer Information
Systems and Industrial Management Applications, 2007. CISIM '07, 6th International Conference,, pp: 213-218 . [6] www.realnetworks.com.
[7] en.wikipedia.org/wiki/Steganography.
[8] www.sun.java.com.
Steganography
30