PROJECT REPORT ON “SECURE DATA DATA TRANSMISSION TRANSMISSI ON TOOL”
Submitted in partial fulfillment of the requirements for summer training project. Submitted by: PARVEEN PARVEEN KRISHNANTREY KRISHNA NTREY Roll No. 0691310212! AMIT KHANDOOJA Roll No. 01310212 SAJAL SA"ENA Roll No. 0#91310212
Submitted to: M$. R%&' A$o$% A(('()%*) P$o+,((o$! CSE D,-%$),*) H. M. R. I. T. M.! D,l/'
H. M. R. Institute of Technology and Management AI!IAT"# T$ %&R& %$'I(# SI(%H I(#RA)RASTHA &(I*"RSIT+ Sector , -/ #0ar1a2 #elhi , --33452 India
ACKNOLEDEMENT 6ith due respect2 6e e7press our deep sense of gratitude to our respected and learned guide and mentor M$. D%%*%* for their co,operation and guidance. 6e ac1no0ledge their in8aluable help and suggestions in implementing the project. 6e are than1ful to them for sparing their 8aluable time and encouraging us at e8ery stage.
6e are also grateful to faculty of the /omputer Science #epartment2 HMRITM for their ready support.
DECLARATION
6e hereby declare that the 0or12 0hich is being presented in the project report entitled2 “SECURE DATA TRANSMISSION TOOL” submitted for partial fulfillment of the requirements for
the a0ard of the degree of 'achelor of Technology 9/omputer Science is an authentic record of my o0n 0or1 carried out under the guidance of M$. D%%*%* and the matter embodied in the report has not been submitted for the a0ard of any other degree or diploma.
4PARVEEN KRISHNANTREY5 4AMIT KHANDOOJA5 4SAJAL SA"ENA5
CERTIICATE This is to certify that this minor project entitled as ; SECURE DATA TRANSMISSION TOOL< has been completed by PARVEEN
KRISHNANTREY
KHANDOOJA
4013102125
406913102125! %*
SAJAL
AMIT SA"ENA
40#913102125! during se8enth semester of 'achelor of
Technology in /omputer Science from H. M. R. I. T. M.2 #elhi. The matter embodied in this project has not been submitted earlier for the a0ard of any degree or diploma to the best of my 1no0ledge and belief.
M$. RAVI ARORA
A7STRACT Secured #ata Transmission through (et0or1 handles hiding a secret message 0ith in an image in such a 0ay that others cannot discern the presence or contents of the hidden message. A message might be hidden 0ith in an image by changing !east Significant 'it to be the message bits. Then the image can be transmitted through (et0or1. !S' based Stenography is perhaps the most simple and straight for0ard approach. In this project 0e embed the message in to the least significant bit planes of the image. Since this 0ill only affect each pi7el by =>, -2 if at all2 it is generally assumed 0ith good reason that degradation caused by this embedding process 0ould perceptually transparent.
TA7LE O CONTENTS Title ?????????????????????????? Ac1no0ledgement ??????????????????.?? #eclaration ????????????????????..??.. /ertificate??????????????????????..?. Abstract ????????????????????????.. 1. I*)$o8)'o*................................................................................
-.-. $bjecti8e -.@. #etails 2. P$,$,:8'('),(;;;;;;;;;;;;;;;;;..
@.-. Hard0are and Soft0are Requirements @.@. Technologies to be used 3. T,/*':8,( 8(,;;;;;;;;;;;;;;;;;.. <. Mo8l,(
5. S(), D,('=*....................................................................... #ATA !$6 #IA%RAM 6. So8$, Co,................................................................................ . S*%-(/o)(;;;;;;;;;;;;;;;;;;;;; >. Co*l8('o*;;;;;;;;;;;;;;;;;;;;.. 9. 7'?l'o=$%-/;;;;;;;;;;;;;;;;;;......
-. I(TR$#&/TI$( 1.1 $'"/TI*" The project has the follo0ing objecti8es: -. To create a tool that can be used to hide data inside a @B bit color image. @. The tool should be easy to use2 and should use a graphical user interface. C. The tool should 0or1 cross,platform. B. The tool should effecti8ely hide a message using an image degradation approach2 and should be able to retrie8e this message after0ards. 5. The tool should ta1e into account the original content2 to theoretically more effecti8ely hide the message. . The tool should be able to pro8ide some information as to the effecti8eness of the hiding i.e. it should be able to e8aluate the degradation of an image. The analysis used 0ill consist of e7isting 0atermar1ing measures2 re, implemented for this tool. 4. The tool should be able to encrypt the message before embedding it.
1.2 #"TAI!S Steganography is the art and science of 0riting hidden messages in such a 0ay that no one apart from the intended recipient 1no0s of the e7istence of the messageD this is in contrast to cryptography2 0here the e7istence of the message itself is not disguised2 but the content is obscured. The ad8antage of steganography o8er cryptography alone is that messages do not attract attention to themsel8es2 to messengers2 or to recipients. Steganographic messages are often first encrypted by some traditional means2 and then a co8erte7t is modified in some 0ay to contain the encrypted message2 resulting in stegote7t. or e7ample2 the letter siEe2 spacing2 typeface2 or other characteristics of a co8erte7t can be manipulated to carry the hidden messageD only the recipient 90ho must 1no0 the technique used can reco8er the message and then
decrypt it. Steganography uses in electronic communication include steganographic coding inside of a transport layer2 such as an M)C file2 or a protocol2 such as ). The project FSteganographyG pro8ides means for secure data transmission and secure data storage net0or1. Hereby2 important files carrying confidential information can be stored in the ser8er in an encrypted form. Access to these files is limited to certain authoriEed people only. Transmission also ta1es place in an encrypted form so that no intruder can get any useful information from the original file during transit. urther2 before trying to access important files2 the user has to login to the system using a 8alid username and pass0ord2 0hich is allotted to him by the system administrator.
"ncryption is the process of encoding a message in such a 0ay as to hide its contents. Modern /ryptography includes se8eral secure algorithms for encrypting and decrypting messages. They are all based on the use of secrets called keys. A cryptographic 1ey is a parameter used in an encryption algorithm in such a 0ay that the encryption cannot be re8ersed 0ithout the 1no0ledge of the 1ey. The larger the co8er message is 9in data content terms number of bits relati8e to the hidden message2 the easier it is to hide the latter. or this reason2 digital pictures 90hich contain large amounts of data are used to hide messages on the Internet and on other communication media. It is not clear ho0 commonly this is actually done. or e7ample: a @B,bit bitmap 0ill ha8e bits representing each of the three color 8alues 9red2 green2 and blue at each pi7el. If 0e consider just the blue there 0ill be @ different 8alues of blue. The difference bet0een say -------- and -------3 in the 8alue for blue intensity is li1ely to be undetectable by the human eye. Therefore2 the least significant bit can be used 9more or less undetectably for something else other than color information. If 0e do it 0ith the green and the red as 0ell 0e can get one letter of AS/II te7t for e8ery three pi7els. Stated some0hat more formally2 the objecti8e for ma1ing steganographic encoding difficult to detect is to ensure that the changes to the carrier 9the original signal due to the inject the payload 9the signal to co8ertly embed are 8isually 9and ideally2 statistically negligibleD that is to say2 the changes are indistinguishable from the noise floor of the carrier.
STEANORAPHY TERMS
/arrier ile
, A file 0hich has hidden information inside of it. Steganalysis
, The process of detecting hidden information inside of a file. Stego,Medium J The medium in 0hich the information is hidden. Redundant 'its J )ieces of information inside a file 0hich can be o8er0ritten or altered 0ith )ayload
out
damaging
the
file.
, The information 0hich is the be
concealed. PROCESS DESCRIPTION
The follo0ing formula pro8ides a 8ery generic description of the pieces of the steganographic process: co8ermedium = hiddendata = stego1ey K stegomedium In this conte7t2 the co8ermedium is the file in 0hich 0e 0ill hide the hiddendata2 0hich may also be encrypted using the stego1ey. The resultant file is the stegomedium 90hich 0ill2 of course. 'e the same type of file as the co8ermedium. The co8ermedium 9and2 thus2 the stegomedium are typically image or audio files. STEANORAPHY MERITS SUCCESS SO AR
&p until no02 this has pro8en to be a successful steganographic technique for use in distributing spam and getting around my spam filtering soft0are. At this point in time2 spam filtering soft0are is incapable of detecting the hidden content and categoriEing the message as spam on the basis of that content. This success 0ill probably be short li8ed2 ho0e8er STEANORAPHY VERSUS CRYPTORAPHY
As mentioned abo8e2 cryptography is often used in situations 0here the e7istence of the message is clear2 but the meaning of the message is obscured. In particular2 the sender transforms the message into a form that 9hopefully only the intended recipient of the message can decrypt and read.Steganography is often used in situations 0here the actual e7istence of the message needs to be obscured. STEANORAPHY AND CRYPTORAPHY CAN 7E COM7INED
The message can also be encrypted before it is hidden inside a cover message. This pro8ides a double layer of protection. To begin 0ith2 encryption may ma1e the e7istence of the message e8en more difficult to detect2 due to the fact that some encryption techniques cause the patterns of the characters in the encrypted 8ersion to be more random than in the original 8ersion. In addition2 e8en if the e7istence of the encrypted message is detected2 it is unli1ely that an ea8esdropper 0ill be able to read the message. HIDIN THE MESSAE
-. This program hides the message in the image by doing the follo0ing: @. Reducing the message to the B,character set beginning 0ith the space character in the AS/II table. "ach character can then be represented by si7 bits. C. #ecomposing each si7,bit character into three groups of t0o bits each. B.
Replacing the t0o least,significant bits 9!S' in the red2 green2 and
blue 8alues for a gi8en pi7el by the three groups of t0o bits. Thus2 each pi7el can carry one si7,bit character
@ )R"R"L&ISIT"S
@. )R"R"L&ISIT"S 2.1 H%$@%$, %* (o+)@%$, R,:8'$,,*)( H%$@%$, R,:8'$,,*)(
)rocessor
)entiumB
Ram
5-@ M'
Hard dis1 dri8e
/ache memory
@5 '
Monitor
*%A 0ith -3@B74
eyboard
-3B 1eys
Mouse
B3 %'
Scroll mouse
So+)@%$, R,:8'$,,*)(
$perating system
ront,end
: 6indo0s : # 9 *S@3-@
Tools
:
Soft0are platform
)rogramming
:
language
"clipse
Microsoft :
@S"
6indo0s
2.2 T,/*olo=',( )o ?, 8(, 7$',+ I*)$o8)'o* %?o8) J%&% :
a8a is a -$o=$%'*= l%*=8%=, and a -l%)+o$ . a8a is a high le8el2 robust2 secured and object,oriented programming language. According to Sun2 C billion de8ices run ja8a. There are many de8ices 0here ja8a is currently used. Some of them are as follo0s: -. @. C. B. 5. . 4. .
#es1top Applications such as acrobat reader2 media player2 anti8irus etc. 6eb Applications such as irctc.co.in2 ja8atpoint.com etc. "nterprise Applications such as ban1ing applications. Mobile "mbedded System Smart /ard Robotics %ames etc.
There are mainly B type of applications that can be created using ja8a programming: 15 S)%*%lo*, A--l'%)'o*
It is also 1no0n as des1top application or 0indo0,based application. An application that 0e need to install on e8ery machine such as media player2 anti8irus etc. A6T and S0ing are used in ja8a for creating standalone applications. 25 ,? A--l'%)'o*
An application that runs on the ser8er side and creates dynamic page2 is called 0eb application. /urrently2 ser8let2 jsp2 struts2 jsf etc. technologies are used for creating 0eb applications in ja8a.
35 E*),$-$'(, A--l'%)'o*
An application that is distributed in nature2 such as ban1ing applications etc. It has the ad8antage of high le8el security2 load balancing and clustering. In ja8a2 "' is used for creating enterprise applications. <5 Mo?'l, A--l'%)'o*
An application that is created for mobile de8ices. /urrently Android and a8a M" are used for creating mobile applications. H'()o$ J%&% /'()o$ is interesting to 1no0. The history of ja8a starts from %reen Team. a8a team members 9also 1no0n as $,,* T,% 2 initiated a re8olutionary tas1 to de8elop a language for digital de8ices such as set,top bo7es2 tele8isions etc.
or the green team members2 it 0as an ad8ance concept at that time. 'ut2 it 0as suited for internet programming. !ater2 a8a technology as incorporated by (etscape. /urrently2 a8a is used in internet programming2 mobile de8ices2 games2 e,business solutions etc. There are gi8en the major points that describes the history of ja8a. J%,( o(l'*=2 M', S/,$'%*2 and P%)$' N%8=/)o* initiated the a8a language project in une -NN-. The small team of sun engineers called $,,* T,%. $riginally designed for small2 embedded systems in electronic appliances li1e set,top bo7es. irstly2 it 0as called “$,,*)%l” by ames %osling and file e7tension 0as .gt. After that2 it 0as called O% and 0as de8eloped as a part of the %reen project. (otice that a8a is just a name not an acronym. $riginally de8eloped by ames %osling at Sun Microsystems 90hich is no0 a subsidiary of $racle /orporation and released in -NN5. In -NN52 Time magaEine called J%&% o*, o+ )/, T,* 7,() P$o8)( o+ 199#. # -.3 released in9anuary @C2 -NN. K, +,%)8$,(
There is gi8en many features of ja8a. They are also 1no0n as ja8a buEE0ords. The a8a eatures gi8en belo0 are simple and easy to understand. S'-l,
According to Sun2 a8a language is simple because: synta7 is based on /== 9so easier for programmers to learn it after /==.
Remo8ed many confusing and>or rarely,used features e.g.2 e7plicit pointers2 operator o8erloading etc. (o need to remo8e unreferenced objects because there is Automatic %arbage /ollection in ja8a.
O?B,)o$',*),
$bject,oriented means 0e organiEe our soft0are as a combination of different types of objects that incorporates both data and beha8iour. $bject,oriented programming9$$)s is a methodology that simplify soft0are de8elopment and maintenance by pro8iding some rules. 'asic concepts of $$)s are: -. $bject @. /lass C. Inheritance B. )olymorphism 5. Abstraction . "ncapsulation Pl%)+o$ I*,-,*,*)
A platform is the hard0are or soft0are en8ironment in 0hich a program runs. There are t0o types of platforms soft0are,based and hard0are,based. a8a pro8ides soft0are,based platform. The a8a platform differs from most other platforms in the sense that itGs a soft0are,based platform that runs on top of other hard0are,based platforms.It has t0o components: -. Runtime "n8ironment @. A)I9Application )rogramming Interface a8a code can be run on multiple platforms e.g.6indo0s2!inu72Sun Solaris2Mac>$S etc. a8a code is compiled by the compiler and con8erted into bytecode.This bytecode is a platform independent code because it can be run on multiple platforms i.e. 6rite $nce and Run Any0here96$RA. S,8$,
a8a is secured because: (o e7plicit pointer )rograms run inside 8irtual machine sandbo7. Cl%((lo%,$ adds security by separating the pac1age for the classes of the local file system from those that are imported from net0or1 sources. 7),o, V,$'+',$ chec1s the code fragments for illegal code that can 8iolate access right to objects. S,8$') M%*%=,$ determines 0hat resources a class can access such as reading and 0riting to the local dis1. • • •
•
•
These security are pro8ided by ja8a language. Some security can also be pro8ided by application de8eloper through SS!2AAS2cryptography etc. Ro?8()
Robust simply means strong. a8a uses strong memory management. There is lac1 of pointers that a8oids security problem. There is automatic garbage collection in ja8a. There is e7ception handling and type chec1ing mechanism in ja8a. All these points ma1e ja8a robust. A$/'),)8$,*,8)$%l
There is no implementation dependent features e.g. siEe of primiti8e types is set. Po$)%?l,
6e may carry the ja8a bytecode to any platform. H'=/-,$+o$%*,
a8a is faster than traditional interpretation since byte code is ;close< to nati8e code still some0hat slo0er than a compiled language 9e.g.2 /== D'()$'?8),
6e can create distributed applications in ja8a. RMI and "' are used for creating distributed applications. 6e may access files by calling the methods from any machine on the internet. M8l)')/$,%,
A thread is li1e a separate program2 e7ecuting concurrently. 6e can 0rite a8a programs that deal 0ith many tas1s at once by defining multiple threads. The main ad8antage of multi,threading is that it shares the same memory. Threads are important for multi,media2 6eb applications etc.
3. TECHNIUES USED TECHNIUE USED
Steganographic Techniques used is oncealing data 0ithin encrypted data. The data to be concealed is first encrypted before being used to o8er0rite part of a much larger bloc1 of encrypted data. This technique 0or1s most effecti8ely 0here the decrypted 8ersion of data being o8er0ritten has no special meaning or use. "ach pi7el typically has three numbers associated 0ith it2 one each for red2 green2 and blue intensities2 and these 8alues often range from 3,@55. "ach number is stored as eight bits 9Eeros and ones2 0ith a one 0orth -@ in the most significant bit 9on the left2 then B2 C@2 -2 2 B2 @2 and a one in the least significant bit 9on the right 0orth just -. HO STEANORAPHY ORKS
Steganography strips less important information from digital content and injects hidden data in its place. This is done o8er the spectrum of the entire image. HereOs one 0ay it could be implemented: The follo0ing sequence of @B bits represents a single pi7el in an image. Its C bytes of color information pro8ide a total of @5 different 8alues for each color 9red2 green and blue and thus can represent a total of -.4 million colors. This particular 8alue displays as a dar1 green:
'yte - , Red 33333333
'ytc@,%reen 3--33-33
'yte C , 'lue 33333333
(o02 letOs ta1e -- of these pi7els that represent2 say2 part of a solid,color bac1ground. In the follo0ing sequence2 the least significant 9rightmost bit of each ,
bit byte has been co,opted to hide a te7t messagethe four characters AhaPin AS/II binary:
T%?l, #.2 7')@'(, $,-$,(,*)%)'o* o+ ),) ,((%=,
The hidden message occupies C@ of those @B bits 9about -@Q and contains four
T%?l, #.2 7')@'(, $,-$,(,*)%)'o* o+ ),) ,((%=,
The hidden message occupies C@ of those @B bits 9about -@Q and contains four ,bit bytes. In the diagram2 each maroon or gold bo7 represents a bit that had to be changed to include the hidden message. (otice that only -5 of @B bits 9less than Q
Here are the bits behind those -- pi7els:
Table 5.C Message hidden in pi7el positions
ig 5.insertion
!S'
had to be changed and only eight of the -- pi7els 0ere altered. The t0o figures belo0 represent the -- colored pi7els 0eO8e been manipulating. The figure on the left is the original2 unaltered 8ersion. The one on the right has been modified. ALORITHM USED
The #"S 9#ata "ncryption Standard algorithm is the most 0idely used encryption algorithm in the 0orld. or many years2 and among many people2 secret code ma1ing and #"S ha8e been synonymous. #"S 0or1s on bits2 or binary numbers,,the 3s and -s common to digital computers. "ach group of four bits ma1es up a he7adecimal2 or base -2 number. #"S 0or1s by encrypting groups of B message bits2 0hich is the same as - he7adecimal numbers. To do the encryption2 #"S uses 1eys 0here are also apparently - he7adecimal numbers long2 or apparently B bits long. Ho0e8er2 e8ery th 1ey bit is ignored in the #"S algorithm2 so that the effecti8e 1ey siEe is 5 bits. 'ut2 in any case2 B bits 9- he7adecimal digits is the round number upon 0hich #"S is organiEed.
<. M$#&!"S The project consists of mainly four modules encryption2 hide message2 retrie8e message and decryption. "ncryption and hide message form the modules at the sender side. retrie8e message and decryption form the modules at the recei8er side SENDER SIDE E*$-)'o*
"ncryption includes a message or a file encrypting. "ncryption in8ol8es con8erting the message to be hidden into a cipher te7t. "ncryption can be done by passing a secret 1ey.Secret 1ey can be used for encryption of the message to be hidden.It pro8ides security by con8erting it into a cipher te7t20hich 0ill be difficult for hac1ers to decrypt. Moreo8er if the message is pass0ord protected2then 0hile retrie8ing message2the retrie8er has to enter the correct pass0ord for 8ie0ing the message.
H', M,((%=,
Hiding message is the most important module of steganography.It in8ol8es embedding the message into the co8er te7t. "ach pi7el typically has three numbers associated 0ith it2 one each for red2 green2 and blue intensities2 and these 8alues often range from 3,@55.In order to hide the message2data is first con8erted into byte format and stored in a byte array.The message is then encrypted and then embed each bits into the !S' position of each pi7el position. The least significant 9rightmost bit of each ,bit byte has been co,opted to hide a te7t message. RECEIVER R,)$',&, M,((%=,
SIDE
It in8ol8es retrie8ing the embed message from the file independent of the file format. $nce the message has been retrie8ed it has to be con8erted into original message or file.
This can be done by reading the embedded data from the master file. The read data 0ill be in the bytes format. This message has to be con8erted into the suitable output file format. D,$-)'o*
#ecryption includes a message or a file decrypting. #ecryption in8ol8es con8erting the cipher te7t into decrypted format. #ecryption can be done by passing a secret 1ey. Secret 1ey can be used for decryption of the message that is hidden. It pro8ides security by con8erting the cipher te7t2 into the original data message or file. Moreo8er if the message is pass0ord protected2 then 0hile retrie8ing message2 the retrie8er has to enter the correct pass0ord for 8ie0ing the message.
5. SYSTEM DESIN DATA LO DIARAM
Sender side
----------------------1
Secured data Recei8er side
Sending
Recei8ing
'= #.1 L,&,l 0F DD
'= #.2 L,&,l 1FE?,'*= '*+o$%)'o* '* % +'l,
ig 5.C !e8el @ : Retri8al