You are on page 1of 34

ABSTRACT

|Information hiding techniques have recently become important in a number of application areas. Digital audio, video, and pictures are increasingly furnished with distinguishing but imperceptible marks, which may contain a hidden copyright notice or serial number or even help to prevent unauthorised copying directly. Military communications systems make increasing use of traffic security techniques which, rather than merely concealing the content of a message using encryption, seek to conceal its sender, its receiver or its very existence. Similar techniques are used in some mobile phone systems and schemes proposed for digital elections. Criminals try to use whatever traffic security properties are provided intentionally or otherwise in the available communications systems, and police forces try to restrict their use. However, many of the techniques proposed in this young and rapidly evolving field can trace their history back to antiquity; and many of them are surprisingly easy to circumvent. An important sub discipline of information hiding is steganography. While cryptography is about protecting the content of messages, steganography is about concealing their very existence. It comes from Greek roots literally means `covered writing', and is usually interpreted to mean hiding information in other information. We shall now briefly introduce the terminology which will be used in the rest of the paper and which was agreed at the first international workshop. The general model of hiding data in other data can be described as follows. The embedded data is the message that one wishes to send secretly. It is usually hidden in an innocuous message referred to as a cover-text, or cover-image or cover-audio as appropriate, producing the stego-text or other stego-object. A stego-key is used to control the hiding process so as to restrict detection and/or recovery of the embedded data to parties who know it (or who know some derived key value). As the purpose of steganography is having a covert communication between two parties whose existence is unknown to a possible attacker, a successful attack consists in detecting the existence of this communication.

Prisoners Problem
Intuitively, the purpose of steganography is to set up a secret communication path between two parties such that any person in the middle cannot detect its existence; the attacker should not gain any information about the embedded data by simply looking at cover-text or stegotext. This was first formalised by Simmons in 1983 as the `prisoners' problem'. Alice and Bob are in jail and wish to prepare an escape plan. The problem is that all their communications are arbitrated by the warden Willie. If Willie sees any ciphertext in their messages, he will frustrate them by putting them into solitary confinement. So Alice and Bob must find a way to exchange hidden messages. In the general case of steganography, where Willie is allowed to modify the information flow between Alice and Bob, he is called an active warden; but if he can only observe it he is called a passive warden. Further studies showed that public key steganography is possible (in this
1|Page

model, Alice and Bob did not exchange secrets before going to jail, but have public keys known to each other) {although the presence of an active warden makes public key steganography more difficult.} This difficulty led to the introduction of the supraliminal channel, which is a very low bandwidth channel that Willie cannot afford to modify as it uses the most perceptually significant components of the cover object as a means of transmission. For example, a prisoner might write a short story in which the message is encoded in the succession of towns or other locations at which the action takes place. Details of these locations can be very thoroughly woven into the plot, so it becomes in practice impossible for Willie to alter the message he must either allow the message through or censor it. The effect of this technique is to turn an active warden into a passive one. The same effect may be obtained if the communicating parties are allowed to use a digital signature scheme.

2|Page

PROBLEM DEFINITION
Our goal is to build a simple application that is able to send and receive encrypted messages embedded inside images. The user is able to choose the image he wants and the text he wants to send.

3|Page

3.REQUIREMENTS
Steganography is the art of hiding the fact that communication is taking place, by hiding information in other information. Many different carrier file formats can be used, but digital images are the most popular because of their frequency on the Internet. For hiding secret information in images, there exists a large variety of steganographic techniques some are more complex than others and all of them have respective strong and weak points. Different applications have different requirements of the steganography technique used. For example, some applications may require absolute invisibility of the secret information, while others require a larger secret message to be hidden.

3.1PURPOSE OF PROJECT:
y

To protect communication between two participating parties.

3.2SCOPE OF THE PROJECT:


Our goal is to build a simple application that is able to send and receive encrypted messages embedded inside images. The user is able to choose the image he wants and the program must tell if this image will suit the text or not. No pixel deformation or size distortion is allowed. TIF images may suffer slight size increments or decrements, but we will get to that later. The user can set a different password for every message he sends, which will enable the manager to transmit the same image to two groups, but with two different passwords and two different messages.

3.3DESCRIPTION OF THE PROJECT:


Related to embedding data into the image of various formats such as .jpg, .bmp, .tiff. It can embed data of any size depending on the size of the image. It works as- select the image then writes data or copy data from any .doc file which is to be embedded into the image of selected type. Now, select option from menu of stego image creation it will prompt for the user name and password. These are unique to the image and are at start level meant for security purpose. Now, after inserting the values stego image is created. Now, save the image with certain name by clicking save option. Thus stego image is created. To decrypt the data from stego image select the stego image from options and then select the option decrypt data it will again prompt for username and password. Now enter the values which u inserted at initial levels. If values entered are correct, the data will be displayed.

4|Page

3.4SOFTWARE REQUIREMENTS:

1. VISUAL BASIC 6.0 2. COMMAND PROMPT 3.4.1INTRODUCTION TO VISUAL BASIC 6.0


VISUAL BASIC is a high level programming language which was evolved from the earlier DOS version called BASIC. BASIC means Beginners' All purpose Symbolic Instruction Code. It is a very easy programming language to learn. The codes look a lot like English Language. Different software companies produced different version of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC ,IBM BASICA and so on. However, it seems people only use Microsoft Visual Basic today, as it is a well developed programming language and supporting resources are available everywhere. Now, there are many versions of VB exist in the market, the most popular one and still widely used by many VB programmers is none other than Visual Basic 6. We also have VB.net, VB2005 and the latest VB2008, which is a fully object oriented programming (OOP) language. It is more powerful than VB6 but looks more complicated to master. VISUAL BASIC is a VISUAL and events driven Programming Language. These are the main divergence from the old BASIC. In BASIC, programming is done in a text-only environment and the program is executed sequentially. In VB, programming is done in a graphical environment. In the old BASIC, you have to write program codes for each graphical object you wish to display it on screen, including its position and its color. However, In VB , you just need to drag and drop any graphical object anywhere on the form, and you can change its color any time using the properties windows. On the other hand, because users may click on a certain object randomly, so each object has to be programmed independently to be able to response to those actions (events). Therefore, a VB Program is made up of many subprograms, each has its own program codes, and each can be executed independently and at the same time each can be linked together in one way or another.

5|Page

3.4.2INTRODUCTION TO COMMAND PROMPT


The command prompt is run from its own window by invoking the Windows XP command interpreter that is provided by the filecmd.exe located in the folder \Windows\System32\. (The old DOS command interpreter is command.com.) If you look in this folder you may also see several files that look suspiciously like some of the old DOS files. They are, however, different 32-bit versions with many new features. The command prompt window can be opened by entering "cmd" (without quotes) into Start-Run or through Start-All ProgramsAccessories. A black and white window (the colors can be changed) containing the command prompt will open. The window looks just like the old DOS window but do nt be fooled, it isnt. Note that it is possible to open several windows containing command prompts, all running independently. It is even possible to run a separate command prompt shell inside another command prompt window.

6|Page

3.5 INTRO

CTION TO STEGANOGRAPHY

3.5.1DEFINITION:  Deri ed from t e Greek words steganos whi h means covered and  graphia which means writing Thus meaning covered writing  It is the art of concealed communication; the very existence of a message is secret 3.5.2HISTORY:  Examples of old steganography techni ues:  Writing on shaved heads  Invisi le ink  Microscopic images 3.5.3BASIC MODEL:

ENCODER

INSECURE CHANNEL

DECODER

MESSAGE

KEY

KEY

MESSAGE

7|Page

3.6CLASSIFICATION

Information Hiding

Covert Channels

Steganography

Anonymity

Copyright Marking

Linguistic Steganography

Technical Steganography

8|Page

3.7 CRYPTOGRAPHY Vs STEGANOGRAPHY


CRYPTOGRAPHY:
This involves translating message into a cipher code. Third party cannot read message but knows that a secret message is present.

STEGANOGRAPHY:
Steganography techniques strive to hide the very presence of the message itself from an observer so there is no knowledge of the existence of the message in the first place.

9|Page

3.8 APPLICATIONS
There are a number of other applications driving interest in the subject of information hiding: 1. Military and intelligence agencies require unobtrusive communications. Even if the content is encrypted, the detection of a signal on a modern battle field may lead rapidly to an attack on the signaller. For this reason, military communications use techniques such as spread spectrum modulation or meteor scatter transmission to make signals hard for the enemy to detect or jam. 2. Criminals also place great value on unobtrusive communications. Their preferred technologies include prepaid mobile phones, mobile phones which have been modified to change their identity frequently, and hacked corporate switchboards through which calls can be rerouted. 3. Law enforcement and counter intelligence agencies are interested in understanding these technologies and their weaknesses, so as to detect and trace hidden messages. 4. Recent attempts by some governments to limit online free speech and the civilian use of cryptography have spurred people concerned about liberties to develop techniques for anonymous communications on the net, including anonymous remailers and Web proxies. 5. Schemes for digital elections and digital cash make use of anonymous communication techniques. 6. Marketers use email forgery techniques to send out huge numbers of unsolicited messages while avoiding responses from angry users.

10 | P a g e

DESIGN

During this phase, the system is designed to satisfy the functional requirements identified in the previous phase. Since problems in the design phase can be very expensive to solve in later stages of the software development, a variety of elements are considered in the design to mitigate risk. These include:
o Identifying potential risks and defining mitigating design features. o Performing a security risk assessment. o Determining the operating environment. o Defining major subsystems and their inputs and outputs. o Allocating processes to resources. o Preparing detailed logic specifications for each software module.

We have three forms with various objects dropped and dragged from the toolbox. The snapshots of the three forms follow: 1. MDI FORM 2. FORM IMAGE 3. FORM READ FROM IMAGE

11 | P a g e

MDI FORM

12 | P a g e

FORM IMAGE

13 | P a g e

FORM READ FROM IMAGE

14 | P a g e

CODING
In this phase the designs are translated into code. Programming tools such as compilers and quality assurance tools are used to generate good quality source code and the software application. Testing of small self-contained parts (modules) of the overall application may take place depending on the modularity of the code.

1. frmMain

Private Sub MDIForm_Load() If Dir("C:\Input Image", vbDirectory) = "" Then MkDir ("C:\Input Image") End If If Dir("C:\Input Image\Output.jpg", vbDirectory) <> "" Then Kill ("C:\Input Image\Output.jpg") End If End Sub Private Sub mnuDecryptImage_Click() frmReadFromImage.Show vbModal End Sub Private Sub mnuEncryptImage_Click() frmImage.Show vbModal End Sub

15 | P a g e

2. Form frmImage
Dim strFileName As String

Private Sub cmdProcessImage_Click() Dim RetVal As Long Dim TLINE As String Dim TargetString As String Dim MessageString As String

strFileName = txtFilePath.Text If Len(strFileName) = 0 Then MsgBox "File Not Valid", vbInformation Exit Sub End If

If UCase(Right(strFileName, 3)) <> "BMP" And UCase(Right(strFileName, 3)) <> "JPG" And UCase(Right(strFileName, 3)) <> "TIF" Then MsgBox "Only JPG,BMP,TIF FILE CAN BE ENCRYPTED", vbInformation Exit Sub End If txtFilePath.Text = strFileName

If Len(strFileName) = 0 Then MsgBox "Please Select File To Encrypt", vbInformation Exit Sub End If

16 | P a g e

lblProcessing.Caption = "Encrypting Image...Please Wait..." Open "C:\INPUT IMAGE\MESSAGE.TXT" For Input As #1 Open "C:\INPUT IMAGE\NEWMESSAGE.TXT" For Output As #2 Print #2, "$$$"; While Not EOF(1) Line Input #1, TLINE For I = 1 To Len(TLINE) Print #2, Chr(Asc(Mid(TLINE, I, 1)) + 100); Next Wend Close #1 Close #2

'Processing Image File Open App.Path & "\run.bat" For Output As #1 Print #1, "C:" Print #1, "CD\" Print #1, "CD INPUT IMAGE" Print #1, "COPY " & strFileName & "/B+NEWMESSAGE.TXT/B OUTPUT" & Right(strFileName, 4) Close #1 RetVal = Shell(App.Path & "\run.bat", vbHide) DoEvents Sleep (5000) If Dir("C:\INPUT IMAGE\NEWMESSAGE.TXT") <> "" Then Kill ("C:\Input Image\NEWMESSAGE.TXT") End If

17 | P a g e

If Dir(App.Path & "\Run.bat") <> "" Then Kill (App.Path & "\Run.bat") End If

lblProcessing.Caption = "Image Encrypted Successfully" MsgBox "Successfuly File Encrypted on C:\Input Image\OUTPUT" & Right(strFileName, 4), vbInformation End Sub

Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub

Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub

Private Sub File1_Click() txtFilePath.Text = File1.List(File1.ListIndex) End Sub

18 | P a g e

3.Form frmReadFromImage Dim strFileName As String

Private Sub cmdProcessImage_Click() Dim RetVal As Long Dim TLINE As String Dim MessageString As String Dim txtFind As String Dim txtFile As String Dim Position As Long Dim TargetString As String strFileName = txtFilePath.Text If Len(strFileName) = 0 Then MsgBox "File Not Valid", vbInformation Exit Sub End If

If UCase(Right(strFileName, 3)) <> "BMP" And UCase(Right(strFileName, 3)) <> "JPG" And UCase(Right(strFileName, 3)) <> "TIF" Then MsgBox "Only JPG,BMP,TIF FILE CAN BE ENCRYPTED", vbInformation Exit Sub End If txtFilePath.Text = strFileName

If Len(strFileName) = 0 Then MsgBox "Please Select File To Decrypt", vbInformation Exit Sub
19 | P a g e

End If lblProcessing.Caption = "Decrypting Image...Please Wait..." txtFile = "" txtFile = ReadTextFile("C:\INPUT IMAGE\" & strFileName) Position = InStr(1, txtFile, "$$$", vbTextCompare) If Position = 0 Then MsgBox "No any Message Found", vbInformation Exit Sub End If MessageString = Right(txtFile, Len(txtFile) - Position - 2)

TargetString = "" For I = 1 To Len(MessageString) TargetString = TargetString & Chr(Asc(Mid(MessageString, I, 1)) - 100) Next DoEvents Sleep (5000) txtMessage.Text = TargetString lblProcessing.Caption = "Decryption Completed..." End Sub

Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub

20 | P a g e

Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub

Private Sub File1_Click() txtFilePath.Text = File1.List(File1.ListIndex) End Sub

21 | P a g e

4. Module
'Common API's Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Public Function EncryptString(Message As String) As String Dim I As Long Dim MessageString As String MessageString = "" For I = 1 To Len(Message) MessageString = MessageString & Chr(Asc(Mid(Message, I, 1)) + 100) Next End Function

Public Function ReadTextFile(strPath As String) As String Dim strOutput As String Set fso = CreateObject("Scripting.FileSystemObject") Set ts = fso.OpenTextFile(strPath) Do Until ts.AtEndOfStream strOutput = strOutput + ts.ReadLine Loop

ts.Close ReadTextFile = strOutput End Function

22 | P a g e

OUTPUT

To display theoutputof the project we take up an image and the text that is to be encrypted and embedded in the image chosen. After processing we receive an output image embedded with the text message whose existence is concealed. Thus the third party or attacker doesnt get to know about the hidden message.

1. INPUT IMAGE: the image can be of the following formats, namely jpg, bmp, tif.

23 | P a g e

2.INPUT MESSAGE: This is the secret message that has to be hidden and sent.

24 | P a g e

3. TO ENCRYPT

25 | P a g e

4.FINAL IMAGE(OUTPUT)

26 | P a g e

5. TO DECRYPT

27 | P a g e

TESTING
Introduction:
Software Testing is a critical element of software quality assurance and represents the Ultimate review of specification, design, and coding. The purpose of product testing is to verify and validate the various work products viz. units, integrated unit, final product to ensure that they meet their respective requirements. Testing Object:1. Testing is the process of executing a program with the intent of finding an error. 2. A good test case is one that has a high probability of finding an as yet undiscovered error. 3. A successful test is one that uncovers an as yet undiscovered error. Our objective is to design tests that systematically uncover different classes of errors and do so with a minimum amount time and effort. This process has two parts: a) Planning: This involves writing and reviewing unit, integration, functional, validation and acceptance test plans. b) Execution : This involves executing these test plans, measuring, collecting data and verifying if it meets the quality criteria set in the Quality Plan chapter of PMP. Data collected is used to make appropriate changes in the plans related to development and testing. The quality of a product or item can be achieved by ensuring that the product meets the requirements by planning and conducting the following tests at various stage. Various tests done are as follows: Unit Tests at unit level, conducted by development team, to verify individual standalone units. Integration Tests after two or more product units are integrated conducted by development team, to test the interface between the integrated units. Functional Tests prior to the release to validation manager, designed and conducted by the team independent of designers and coders, to ensure the functionality provided against the customer requirement specifications. Acceptance Tests are prior to the release to validation manager, conducted by the development team, if any supplied by the customer.

28 | P a g e

Validation Tests are prior to release to customer, conducted by the validation team to validate the product against the customer requirement specifications and the user documentation. There are two general strategies for testing software:y Code Testing: The code-testing strategy examines the logic of the program. In this kind of testing, analyst develops test cases that result in executing every instruction in the program or module; that is, every path through the program is tested. A path is a specific combination of conditions that is handled by the program. However, even if code testing can be performed in its entirety, it does not guarantee against software failures. This testing strategy does not indicate whether the code meets its specifications nor does it determine whether all aspects are even implemented. Code testing also does not check the range of data that the program will accept. y Specification Testing: To perform specification testing, the analyst examines the specifications stating what the program should do and how it should perform under various conditions. Then test cases are developed for each condition or combination of conditions and submitted for processing. This strategy treats the program as if it were a black box; we do not look into the program to study the code and is not concerned about whether every instruction or path through the program is tested. In that sense, specification testing is not complete testing.

TESTING TECHNIQUES Regardless of which strategy the analyst follows, there are preferred practices to ensure that the testing is useful. The levels of tests and types of test data, combined with testing libraries, are important aspects of the actual test process. TYPES OF TESTING

WHITE BOX TESTING

BLACK BOX TESTING

WHITE BOX TESTING: White Box testing which is performed early in the testing process is also called glassbox testing. Using white box testing, the software engineer can derive test cases that

29 | P a g e

Guarantee that all the independent paths within the module have been exercised at least once.
y y y

Exercise all logical decisions on their true and false sides. Execute all loops at their boundaries and within their operational bounds. Exercise internal data structure to assure their validity.

BLACK BOX TESTING: Black box testing to be applied during later stage of testing. Black box testing, focuses on the functional requirement of the software. Black box testing enables the software engineer to derive sets of input conditions that will fully exercise the functional requirement of a program. Black box testing enables to find error in the following categories:y y y y y

Incorrect or missing functions. Interface errors. Errors in the data structure or external database access. Performance errors. Initialization and termination errors

By applying Black box testing a set of test cases that satisfy the following criteria -y Test cases that reduce, by a count that is greater than one, the number of additional test case must be designed to achieve reasonable testing. y Test cases that tell us something about the presence or absence of classes of errors, rather than associated only with the specific test at hand.

30 | P a g e

CONCLUSION

In this report we gave an overview of information hiding in general and steganography in particular. We looked at a range of applications. We described some of the problems in constructing a general theory and the practical requirements steganographic systems may have to meet. We advanced the suggestion that it is impractical to demand that any one the schemes satisfies all of these requirements simultaneously

31 | P a g e

FLOW DIAGRAM

S T MESS E TEXT

ENCRYPTION ALGORIT M

CIPHER TEXT

EMBEDDING SECRET TEXT IN IMAGE

STEGO OBJECT ie OUTPUT IMAGE WITH HIDDEN MESSAGE

ENCRYPTION

ST

KEY

COVER IMAGE

32 | P a g e

STEGO OBJECT ie OUTPUT IMAGE WITH HIDDEN MESSAGE

KEY

DECRYPTING ALGORITHM

SECRET MESSAGE OBTAINED

DECRYPTION

33 | P a g e

REFERENCES
REFERENCES: y y y y
Visual basics:-( Black Book) www.cryptome.org www.Wikipedia.com www.google.com

34 | P a g e

You might also like