You are on page 1of 60

Synopsis

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 steganography techniques some are more complex than others and all of them have respective strong and weak points. Different applications may require absolute invisibility of the secret information, while others require a large secret message to be hidden. his pro!ect report intends to give an overview of image steganography, its uses and techniques. "t also attempts to identify the requirements of a good steganography algorithm and briefly reflects on which steganographic techniques are more suitable for which applications.

1. INTROUDUCTION

Steganograph $.%.% is back with mind&blowing features which now make it practically usable.

A backgrounder:
his application lets you embed or hide important or private messages or files into picture files like '(), )"F and *M( *itmap images without affecting the quality of actual images or files. "t achieves this by using the least significant bits of these files for embedding data which are not used by the "mage viewers or "mage editors.

REQUIRE ENT ANA!"SIS

O#$ECTI%ES O& 'RO'OSED S"STE : "t allows you to embed the messages or files in encrypted form using ,$ bit D-S algorithm which means that once encrypted, the message or file could be retrieved .or decrypted/ from a Master file only after specifying the correct password which was used at the time of encryption. 0 "t allows embedding messages and files in compressed form using 1"( compression

format. )ives you a choice of compression level to be used. 0 2ew (lastic 3( look and feel which makes the application look and feel much better

than usual '454 look and feel. 4nd best part is that it runs on any platform as long as you have the right '5M for it. 0 6ptimi7ed and meticulously debugged, error free code, runs faster.

0. NU #ER O&

ODU!ES AND T(EIR DESCRI'TION:

-mbed Message his module used -mbed the message to convert its encrypted format.. -mbed File his module used -mbed the message to convert its encrypted format.. 9etrieve message his module used 9etrieve the -ncrypted message from the Master file which is used to store the Steganograph messages. 9etrieve File his module used 9etrieve the -ncrypted message from the Master file which is used to store the Steganograph files.

E)bedding a )essage:

:lick on ;-mbed Message; button or choose File < -mbed Message from the menu. Select the Master file which will be used for embedding data into. Select the 6utput file which will contain the embedded message. his file will be an a copy of master file and will containing the embedded message. "n the ;-mbedding message; dialog box, =ey in the message in the message box or paste a text already present on the clipboard. :hoose the options to be used while embedding message. :ompression and -ncryption. hese options include

"f you specify compression to be used, you can specify the compression level to be used between % to >. "f you specify encryption to be used, you;ll have to specify a password which is a minimum of 8 characters in length. ?ou can change the Master file or 6utput file by clicking on ;:hange; button next to each item.

>

Finally when you;re ready to go, click on ;)o; button.

E)bedding a *i+e:

:lick on ;-mbed File; button or choose File < -mbed File from the menu. Select the Master file which will be used for embedding data into. Select the 6utput file which will contain the embedded Data file. his file will be an a copy of master file and will containing the embedded Data file. Select the Data file which will be embedded into the master file. "n the @-mbed file@ dialog box, choose the options to be used while embedding the data file. hese options include :ompression and -ncryption. "f you specify compression to be used, you can specify the compression level to be used between % to >. "f you specify encryption to be used, you;ll have to specify a password which is a minimum of 8 characters in length. ?ou can change the Master file, 6utput file or Data file by clicking on ;:hange; button next to each item. Finally when you;re ready to go, click on ;)o; button.

Re,rie-ing )essage *ro) a

as,er *i+e:

:lick on ;9etrieve Message; button or choose File < 9etrieve Message from the menu. Select the Master file containing the embedded message. 4 dialog box will appear summari7ing the properties of the Master file. it shows you whether the file contains an embedded message or a file, Steganograph version used to embed the messageAfile, whether compression and encryption have been used and the compression ratio if compression has been used. "t also shows you the request you have made.

Finally when you;re ready to go, click on ;)o; button. "f the message is encrypted, you will be asked for the password. =ey in the password and click on the 6= button. B%

he message will be retrieved and presented to you in a text application similar to Cindows notepad

Re,rie-ing e)bedded *i+e *ro) a


as,er *i+e:

:lick on ;9etrieve File; button or choose File < 9etrieve File from the menu. Select the Master file containing the embedded file. 4 dialog box will appear summari7ing the properties of the Master file. it shows you whether the file contains an embedded message or a file, Steganograph version used to embed the messageAfile, whether compression and encryption have been used and the compression ratio if compression has been used. "t also shows you the request you have made.

Finally when you;re ready to go, click on ;)o; button. "f the file is encrypted, you will be asked for the password. =ey in the password and click on the 6= button. he file will be retrieved and stored in current working directory. "f it is detected that you are using a Cindows platform, you will have a choice to open the file directly from the application

Ob,aining .e+p:

:lick on ;4bout Steganograph; button or choose Delp < 4bout Steganograph from the menu.. :lick on Delp button in the next window. "f you notice any bugs or have any comments about the application, you could send me comments directly from the application. o send comments, click on ;4bout Steganograph; button or choose Delp < 4bout Steganograph, then click on ;Send comments button;.

BB

DE%E!O' ENT EN%IRON ENT


a/

(ard/are En-iron)en,:
(rocessor Memory Floppy Disk Drive Dard disk drive Monitor E E E E E "ntel core $ deo (rocessor. B )* Main Memory B.FF Mb 8% )* :olour Monitor.

b/

So*,/are En-iron)en,:
6perating System (latform Ganguage E E E Cin 3(,Cindows 2 . '$SD= 'ava

B$

A#OUT T(E SO&T0ARE

About Operating System


0indo/s 1' is a line of operating systems developed by Microsoft for use on general& purpose computer systems, including home and business desktops, notebook computers, and media centers. he name @3(@ stands for eXPerience.H$I "t was codenamed @0.is,+er@, after Chistler, *ritish :olumbia, as many Microsoft employees skied at the Chistler&*lackcomb ski resort during its developmentHcitation neededI. Cindows 3( is the successor to both Cindows $%%% (rofessional and Cindows Me, and is the first consumer&oriented operating system produced by Microsoft to be built on the Cindows 2 kernel .version J.B/ and architecture. Cindows 3( was first released on 6ctober $J, $%%B, and over F%% million copies were in use in 'anuary $%%#, according to an estimate in that month by an "D: analyst.H,I "t is succeeded by Cindows 5ista, which was released to volume license customers on 2ovember 8, $%%#, and worldwide to the general public on 'anuary ,%, $%%+. he most common editions of the operating system are Cindows 3( Dome -dition, which is targeted at home users, and Cindows 3( (rofessional, which has additional features such as support for Cindows Server domains and two physical processors, and is targeted at power users and business clients. Cindows 3( Media :enter -dition has additional multimedia features enhancing the ability to record and watch 5 shows, view D5D movies, and listen to music. Cindows 3( ablet (: -dition is designed to run the ink&aware ablet (: platform. wo separate #F&bit versions of Cindows 3( were also released, Cindows 3( #F& bit -dition for "4&#F ."tanium/ processors and Cindows 3( (rofessional x#F -dition for x8#&#F. Cindows 3( is known for its improved stability and efficiency over the >x versions of Microsoft Cindows. "t presents a significantly redesigned graphical user interface, a change Microsoft promoted as more user&friendly than previous versions of Cindows. 2ew software management capabilities were introduced to avoid the @DGG hell@ that plagued older consumer&oriented >x versions of Cindows. "t is also the first version of Cindows to use product activation to combat software piracy, a restriction that did not sit well with some users and privacy advocates. Cindows 3( has also been critici7ed by some users for security B,

vulnerabilities, tight integration of applications such as "nternet -xplorer # and Cindows Media (layer, and for aspects of its default user interface. Gater versions with Service (ack $, and "nternet -xplorer + addressed some of these concerns.

New and updated features


Cindows 3( introduced several new features to the Cindows line, includingE

Faster start&up and hibernation sequences he ability to discard a newer device driver in favour of the previous one .known as driver rollback/, should a driver upgrade not produce desirable results 4 new, arguably more user&friendly interface, including the framework for developing themes for the desktop environment Fast user switching, which allows a user to save the current state and open applications of their desktop and allow another user to log on without losing that information

he ClearType font rendering mechanism, which is designed to improve text readability on Giquid :rystal Display .G:D/ and similar monitors Remote Desktop functionality, which allows users to connect to a computer running Cindows 3( from across a network or the "nternet and access their applications, files, printers, and devices

User interface
Cindows 3( features a new task&based graphical user interface. he Start menu and search capability were redesigned and many visual effects were added, includingE

4 translucent blue selection rectangle in -xplorer Drop shadows for icon labels on the desktop ask&based sidebars in -xplorer windows .@common tasks@/ he ability to group the taskbar buttons of the windows of one application into one button he ability to lock the taskbar and other toolbars to prevent accidental changes he highlighting of recently added programs on the Start menu

BF

Shadows under menus .Cindows $%%% had shadows under mouse pointers, but not menus/

Cindows 3( analyses the performance impact of visual effects and uses this to determine whether to enable them, so as to prevent the new functionality from consuming excessive additional processing overhead. Ksers can further customi7e these settings.HBJI Some effects, such as alpha blending .transparency and fading/, are handled entirely by many newer video cards. Dowever, if the video card is not capable of hardware alpha blending, performance can be substantially hurt and Microsoft recommends the feature should be turned off manually. HB#I Cindows 3( adds the ability for Cindows to use @5isual Styles@ to change the user interface. Dowever, visual styles must be cryptographically signed by Microsoft to run. Luna is the name of the new visual style that ships with Cindows 3(, and is enabled by default for machines with more than #F Mi* of video 94M. Luna refers only to one particular visual style, not to all of the new user interface features of Cindows 3( as a whole. Some users @patch@ the uxtheme.dll file that restricts the ability to use visual styles, created by the general public or the user, on Cindows 3(. "n addition to the included 3( themes, there is one previously unreleased 3( theme with a black taskbar and window bars similar to Cindows 5ista titled @9oyale 2oir@ available for download, albeit unofficiallyHB+I. Microsoft officially released a modified version of this theme as the @1une@ themeL the only difference being the color of the start button .from black to orange/. 4dditionally, the Media :enter @9oyale@ theme is also available for download on non&Media :enter (:sHB>I. he default wallpaper, *liss, is a *M( photograph of a landscape in the 2apa 5alley outside 2apa, :aliforniaH$%I, with rolling green hills and a blue sky with stratocumulus and cirrus clouds. he Cindows $%%% @classic@ interface can be used instead if preferred. Several third party utilities exist that provide hundreds of different visual styles. "n addition, another Microsoft& created theme, called @9oyale@, was included with Cindows 3( Media :enter -dition, and was also released for other versions of Cindows 3(.

BJ

$a-a 2progra))ing +anguage3


$a-a is a programming language originally developed by Sun Microsystems and released in B>>J as a core component of Sun;s 'ava platform. he language derives much of its syntax from : and :MM but has a simpler ob!ect model and fewer low&level facilities. 'ava applications are typically compiled to bytecode which can run on any 'ava virtual machine .'5M/ regardless of computer architecture. he original and reference implementation 'ava compilers, virtual machines, and class libraries were developed by Sun from B>>J. 4s of May $%%+, in compliance with the specifications of the 'ava :ommunity (rocess, Sun made available most of their 'ava technologies as free software under the )2K )eneral (ublic Gicense. 6thers have also developed alternative implementations of these Sun technologies, such as the )2K :ompiler for 'ava and )2K :lasspath.

History
he 'ava language was created by 'ames )osling in 'une B>>B for use in a set top box pro!ect.HFI he language was initially called Oak, after an oak tree that stood outside )osling;s office & and also went by the name Green & and ended up later being renamed to Java, from a list of random words.HJI )osling;s goals were to implement a virtual machine and a language that had a familiar :A:MM style of notation. H#I he first public implementation was 'ava B.% in B>>J. "t promised @Crite 6nce, 9un 4nywhere@ .C694/, providing no&cost runtimes on popular platforms. "t was fairly secure and its security was configurable, allowing network and file access to be restricted. Ma!or web browsers soon incorporated the ability to run secure 'ava applets within web pages. 'ava quickly became popular. Cith the advent of Java , new versions had multiple configurations built for different types of platforms. For example, J !! was for enterprise applications and the greatly stripped down version J "! was for mobile applications. J #! was the designation for the Standard -dition. "n $%%#, for marketing purposes, new J respectively. "n B>>+, Sun Microsystems approached the "S6A"-: ' :B standards body and later the -cma "nternational to formali7e 'ava, but it soon withdrew from the process. H+IH8IH>I 'ava remains a de facto standard that is controlled through the 'ava :ommunity (rocess.HB%I 4t one time, Sun B# versions were renamed Java !!, Java "!, and Java #!,

made most of its 'ava implementations available without charge although they were proprietary software. Sun;s revenue from 'ava was generated by the selling of licenses for speciali7ed products such as the 'ava -nterprise System. Sun distinguishes between its Software Development =it .SD=/ and 9untime -nvironment .'9-/ which is a subset of the SD=, the primary distinction being that in the '9-, the compiler, utility programs, and many necessary header files are not present.

(hilosophy Primary goals


here were five primary goals in the creation of the 'ava language "t should use the ob!ect&oriented programming methodology. B. "t should allow the same program to be executed on multiple operating systems. $. "t should contain built&in support for using computer networks. ,. "t should be designed to execute code from remote sources securely. F. "t should be easy to use by selecting what were considered the good parts of other ob!ect&oriented languages. Platform independence 6ne characteristic, platform independence, means that programs written in the 'ava language must run similarly on any supported hardwareAoperating&system platform. 6ne should be able to write a program once, compile it once, and run it anywhere. his is achieved by most 'ava compilers by compiling the 'ava language code hal$way .to 'ava bytecode/ N simplified machine instructions specific to the 'ava platform. he code is then run on a virtual machine .5M/, a program written in native code on the host hardware that interprets and executes generic 'ava bytecode. ."n some '5M versions, bytecode can also be compiled to native code, either before or during program execution, resulting in faster execution./ Further, standardi7ed libraries are provided to allow access to features of the host machines .such as graphics, threading and networking/ in unified ways. 2ote that, although there is an explicit compiling stage, at some point, the 'ava bytecode is interpreted or converted to native machine code by the '" compiler.

B+

he first implementations of the language used an interpreted virtual machine to achieve portability. hese implementations produced programs that ran more slowly than programs compiled to native executables, for instance written in : or :MM, so the language suffered a reputation for poor performance. More recent '5M implementations produce programs that run significantly faster than before, using multiple techniques. 6ne technique, known as %ust&in&time compilation .'" /, translates the 'ava bytecode into native code at the time that the program is run, which results in a program that executes faster than interpreted code but also incurs compilation overhead during execution. More sophisticated 5Ms use dynamic recompilation, in which the 5M can analy7e the behavior of the running program and selectively recompile and optimi7e critical parts of the program. Dynamic recompilation can achieve optimi7ations superior to static compilation because the dynamic compiler can base optimi7ations on knowledge about the runtime environment and the set of loaded classes, and can identify the hot spots .parts of the program, often inner loops, that take up the most execution time/. '" compilation and dynamic recompilation allow 'ava programs to take advantage of the speed of native code without losing portability. 4nother technique, commonly known as static compilation, is to compile directly into native code like a more traditional compiler. Static 'ava compilers, such as ):', translate the 'ava language code to native ob!ect code, removing the intermediate bytecode stage. his achieves good performance compared to interpretation, but at the expense of portabilityL the output of these compilers can only be run on a single architecture. Some see avoiding the 5M in this manner as defeating the point of developing in 'avaL however it can be useful to provide both a generic bytecode version, as well as an optimised native code version of an application. Implementations Sun Microsystems officially licenses the 'ava Standard -dition platform for Microsoft Cindows, Ginux, and Solaris. hrough a network of third&party vendors and licensees, HB$I o qualify as a alternative 'ava environments are available for these and other platforms. suite of validation and compatibility tests.

certified 'ava licensee, an implementation on any particular platform must pass a rigorous his method enables a guaranteed level of compliance and platform through a trusted set of commercial and non&commercial partners.

B8

Sun;s trademark license for usage of the 'ava brand insists that all implementations be @compatible@. his resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support the 9M" and '2" interfaces and had added platform&specific features of their own. Sun sued and won both damages in B>>+ .some O$% million/ and a court order enforcing the terms of the license from Sun. 4s a result, Microsoft no longer ships 'ava with Cindows, and in recent versions of Cindows, "nternet -xplorer cannot support 'ava applets without a third&party plugin. Dowever, Sun and others have made available 'ava run&time systems at no cost for those and other versions of Cindows. (latform&independent 'ava is essential to the 'ava -nterprise -dition strategy, and an even more rigorous validation is required to certify an implementation. his environment enables portable server&side applications, such as Ceb services, servlets, and -nterprise 'ava*eans, as well as with -mbedded systems based on 6S)i, using -mbedded 'ava environments. hrough the new )lassFish pro!ect, Sun is working to create a fully functional, unified open& source implementation of the 'ava -- technologies. Automatic memory management 6ne of the ideas behind 'ava;s automatic memory management model is that programmers be spared the burden of having to perform manual memory management. "n some languages the programmer allocates memory for the creation of ob!ects stored on the heap and the responsibility of later deallocating that memory also resides with the programmer. "f the programmer forgets to deallocate memory or writes code that fails to do so, a memory leak occurs and the program can consume an arbitrarily large amount of memory. 4dditionally, if the program attempts to deallocate the region of memory more than once, the result is undefined and the program may become unstable and may crash. Finally, in non garbage collected environments, there is a certain degree of overhead and complexity of user&code to track and finali7e allocations. 6ften developers may box themselves into certain designs to provide reasonable assurances that memory leaks will not occur.HB,I "n 'ava, this potential problem is avoided by automatic garbage collection. he programmer determines when ob!ects are created, and the 'ava runtime is responsible for managing the ob!ect;s lifecycle. he program or other ob!ects can reference an ob!ect by holding a reference to it .which, from a low&level point of view, is its address on the heap/. Chen no references to an ob!ect remain, the unreachable ob!ect is eligible for release by the 'ava garbage B>

collector & it may be freed automatically by the garbage collector at any time. Memory leaks may still occur if a programmer;s code holds a reference to an ob!ect that is no longer needed Pin other words, they can still occur but at higher conceptual levels. he use of garbage collection in a language can also affect programming paradigms. "f, for example, the developer assumes that the cost of memory allocationArecollection is low, they may choose to more freely construct ob!ects instead of pre&initiali7ing, holding and reusing them. Cith the small cost of potential performance penalties .inner&loop construction of largeAcomplex ob!ects/, this facilitates thread&isolation .no need to synchroni7e as different threads work on different ob!ect instances/ and data&hiding. he use of transient immutable value&ob!ects minimi7es side&effect programming. :omparing 'ava and :MM, it is possible in :MM to implement similar functionality .for example, a memory management model for specific classes can be designed in :MM to improve speed and lower memory fragmentation considerably/, with the possible cost of adding comparable runtime overhead to that of 'ava;s garbage collector, and of added development time and application complexity if one favors manual implementation over using an existing third&party library. "n 'ava, garbage collection is built&in and virtually invisible to the developer. hat is, developers may have no notion of when garbage collection will take place as it may not necessarily correlate with any actions being explicitly performed by the code they write. Depending on intended application, this can be beneficial or disadvantageousE the programmer is freed from performing low&level tasks, but at the same time loses the option of writing lower level code. 4dditionally, the garbage collection capability demands some attention to tuning the '5M, as large heaps will cause apparently random stalls in performance. 'ava does not support pointer arithmetic as is supported in, for example, :MM. his is because the garbage collector may relocate referenced ob!ects, invalidating such pointers. 4nother reason that 'ava forbids this is that type safety and security can no longer be guaranteed if arbitrary manipulation of pointers is allowed.

Syntax
he syntax of 'ava is largely derived from :MM. Dowever, unlike :MM, which combines the syntax for structured, generic, and ob!ect&oriented programming, 'ava was built exclusively

$%

as an ob!ect oriented language. 4s a result, almost everything is an ob!ect and all code is written inside a class. he exceptions are the intrinsic data types .ordinal and real numbers, boolean values, and characters/, which are not classes for performance reasons. Hello world program his is a minimal Dello world program in 'ava with syntax highlightingE
// Hello.java public class Hello { public static void main(String[] args) { System.out.println("Hello } } World");

o execute a 'ava program, the code is saved as a file named Hello.java. "t must first be compiled into bytecode using a 'ava compiler, which produces a file named Hello.class. his class is then launched. he above example merits a bit of explanation.

4ll executable statements in 'ava are written inside a class, including stand&alone programs. Source files are by convention named the same as the class they contain, appending the mandatory suffix '%ava. 4 class which is declared public is required to follow this convention. ."n this case, the class Hello is public, therefore the source must be stored in a file called (ello'%ava/.

he compiler will generate a class file for each class defined in the source file. he name of the class file is the name of the class, with 'class appended. For class file generation, anonymous classes are treated as if their name was the concatenation of the name of their enclosing class, a ), and an integer.

he keyword public denotes that a method can be called from code in other classes, or that a class may be used by classes outside the class hierarchy. he keyword static indicates that the method is a static method, associated with the class rather than ob!ect instances.

$B

he keyword void indicates that the main method does not return any value to the caller. he method name @main@ is not a keyword in the 'ava language. "t is simply the name of the method the 'ava launcher calls to pass control to the program. 'ava classes that run in managed environments such as applets and -nterprise 'ava *eans do not use or need a main() method.

he main method must accept an array of String ob!ects. *y convention, it is referenced as args although any other legal identifier name can be used. Since 'ava J, the main method can also use variable arguments, in the form of pu lic static
void main(!tring... args),

allowing the main method to be invoked with an he effect of this alternate declaration is

arbitrary number of !tring arguments.

semantically identical .the args parameter is still an array of !tring ob!ects/, but allows an alternate syntax for creating and passing the array.

he 'ava launcher launches 'ava by loading a given class .specified on the command line/ and starting its pu lic static void main(!tring[]) method. Stand&alone programs must declare this method explicitly. he !tring[] args parameter is an he array of !tring ob!ects containing any arguments passed to the class. parameters to main are often passed by means of a command line.

he printing facility is part of the 'ava standard libraryE he System class defines a public static field called out. he out ob!ect is an instance of the "rint!tream class and provides the method println(String) for displaying data to the screen while creating a new line .standard out/.

Applet 'ava applets are programs that are embedded in other applications, typically in a Ceb page displayed in a Ceb browser.
// Hello.java import java.applet.#pplet; import java.a$t.%raphics; public class Hello extends Applet { public void paint(Graphics gc) {

$$

gc.dra$!tring("Hello& $orld'"& ()& *)); } }

he import statements direct the 'ava compiler to include the java.applet.Applet and
java.awt.Graphics

classes in the compilation. he import statement allows these classes to

be referenced in the source code using the simple class name .i.e. #pplet/ instead of the $ully *uali$ied class name .i.e. java.applet.#pplet/. he Hello class extends .subclasses/ the Applet classL the #pplet class provides the framework for the host application to display and control the lifecycle of the applet.
#pplet

he

class is an 4bstract Cindowing

oolkit .4C / +omponent, which provides the

applet with the capability to display a graphical user interface .)K"/ and respond to user events. he Hello class overrides the paint(Graphics) method inherited from the +ontainer superclass to provide the code to display the applet.
Graphics

he paint() method is passed a

ob!ect that contains the graphic context used to display the applet. he paint()

method calls the graphic context drawString(String, int, int) method to display the 4(e++o5 /or+d64 string at a pixel offset of . !, "!/ from the upper&left corner in the applet;s display.
<!-- Hello.html --> #html$ #head$ #title$Hello World #pplet#%title$ #%head$ #body$ #applet code,"Hello" $idth,"-.." height,"-.."$ #%applet$ #%body$ #%html$

4n applet is placed in an D MG document using the #applet$ D MG element. he applet tag has three attributes setE code&'Hello' specifies the name of the #pplet class and
width&'())' height&'())'

sets the pixel width and height of the applet. 4pplets may also

$,

be embedded in D MG using either the o ject or em ed element,HBFI although support for these elements by Ceb browsers is inconsistent. HBJI Dowever, the applet tag is deprecated, so the o ject tag is preferred where supported. he host application, typically a Ceb browser, instantiates the Hello applet and creates an
#pplet+ontext

for the applet. 6nce the applet has initiali7ed itself, it is added to the 4C he paint method is called by the 4C event dispatching thread

display hierarchy.

whenever the display needs the applet to draw itself. Performance 'ava;s performance has improved substantially since the early versions, and performance of '" compilers relative to native compilers has in some tests been shown to be quite similar. HB#I
HB+IHB8I

he performance of the compilers does not necessarily indicate the performance of the

compiled codeL only careful testing can reveal the true performance issues in any system. "n a paper written in B>>> by Gut7 (rechelt it is outlined that, statistically, programmer efficiency and experience has a bearing many standard deviations greater on run&time and memory usage than language choice. his paper specifically uses 'ava as a basis for the comparison, due to its then bad reputation.HB>I Sun Microsystems have taken considerable trouble to address these problems, and regularly produce white papers on this topic. H$%I 4 more recent study .$%%,NF/ gives 'ava a comparable performance to :MM.H$BI Look and feel he default look and feel of )K" applications written in 'ava using the Swing toolkit is very different from native applications. "t is possible to specify a different look and feel through the pluggable look and feel system of Swing. :lones of Cindows, ) = and Motif are supplied by Sun. 4pple also provides an 4qua look and feel for Mac 6S 3. hough prior implementations of these look and feels have been considered lacking, Swing in 'ava S- # addresses this problem by using more native widget drawing routines of the underlying platforms. 4lternatively, third party toolkits such as wxF!, Qt 'ambi or SC may be used for increased integration with the native windowing system.

$F

Object orientation caveat 4s in :MM and some other ob!ect&oriented languages, variables of 'ava;s primitive types were not originally ob!ects. 5alues of primitive types are either stored directly in fields .for ob!ects/ or on the stack .for methods/ rather than on the heap, as is the common case for ob!ects .but see -scape analysis/. his was a conscious decision by 'ava;s designers for performance reasons. *ecause of this, 'ava was not considered to be a pure ob!ect&oriented programming language. Dowever, as of 'ava J.%, autoboxing enables programmers to write as if primitive types are their wrapper classes, with their ob!ect&oriented counterparts representing classes of their own, and freely interchange between them for improved flexibility. Lack of features Knlike :MM, 'ava suppresses several features .such as operator overloading and multiple inheritance/ for classes in order to simplify the language, to @save the programmers from themselves@, and to prevent possible errors and anti&pattern design. his has been a source of criticism, relating to a lack of low&level features, but some of these limitations may be worked around. 'ava inter$aces have always had multiple inheritance. Communications API Sun does not have an official 'ava 4(" for KS*. here is, however, support for the Serial (ort and (arallel (ort via 'ava:omm and *luetooth support via 'S9%8$. here is also third party support for KS*.H$$I

Resources
Java untime !nvironment

he 'ava 9untime -nvironment, or JR!, is the software required to run any application deployed on the 'ava (latform. -nd&users commonly use a '9- in software packages and Ceb browser plugins. Sun also distributes a superset of the '9- called the 'ava $ SD= .more commonly known as the 'D=/, which includes development tools such as the 'ava compiler, 'avadoc, 'ar and debugger.

$J

6ne of the unique advantages of the concept of a runtime engine is that errors .exceptions/ should not ;crash; the system. Moreover, in runtime engine environments such as 'ava there exist tools that attach to the runtime engine and every time that an exception of interest occurs they record debugging information that existed in memory at the time the exception was thrown .stack and heap values/. development environments. hese 4utomated -xception Dandling tools provide ;root&cause; information for exceptions in 'ava programs that run in production, testing or

Co)ponen,s

'ava libraries are the compiled byte codes of source code developed by the '9implementor to support application development in 'ava. -xamples of these libraries areE
o

he core libraries, which includeE

:ollection libraries which implement data structures such as lists, dictionaries, trees and sets 3MG (rocessing .(arsing, ransforming, 5alidating/ libraries Security "nternationali7ation and locali7ation libraries

he integration libraries, which allow the application writer to communicate with external systems. hese libraries includeE

he 'ava Database :onnectivity .'D*:/ 4(" for database access 'ava 2aming and Directory "nterface .'2D"/ for lookup and discovery 9M" and :69*4 for distributed application development he .heavyweight, or native/ 4bstract Cindowing oolkit .4C /,

Kser "nterface libraries, which includeE

which provides )K" components, the means for laying out those components and the means for handling events from those components

he .lightweight/ Swing libraries, which are built on 4C but provide .non&native/ implementations of the 4C widgetry 4("s for audio capture, processing, and playback

4 platform dependent implementation of 'ava virtual machine .'5M/ which is the means by which the byte codes of the 'ava libraries and third party applications are executed

(lugins, which enable applets to be run in Ceb browsers $#

'ava Ceb Start, which allows 'ava applications to be efficiently distributed to end users across the "nternet Gicensing and documentation

APIs Sun has defined three platforms targeting different application environments and segmented many of its 4("s so that they belong to one of the platforms. he platforms areE

'ava (latform, Micro -dition .'ava M-/ P targeting environments with limited resources, 'ava (latform, Standard -dition .'ava S-/ P targeting workstation environments, and 'ava (latform, -nterprise -dition .'ava --/ P targeting large distributed enterprise or "nternet environments.

he classes in the 'ava 4("s are organi7ed into separate groups called packages. -ach package contains a set of related interfaces, classes and exceptions. 9efer to the separate platforms for a description of the packages available. he set of 4("s is controlled by Sun Microsystems in cooperation with others through the 'ava :ommunity (rocess program. :ompanies or individuals participating in this process can influence the design and development of the 4("s. controversy. his process has been a sub!ect of

7. S"STE

DESI8N

$+

System design is the process of planning a new system or replace or complement an existing system. System design covers several important topics. hese include, o Chat the interface will look like, the use of various controls and so on o he files needed, their structure, organi7ation and processing.

o Dow the data are validated o Chat are the procedures needed. Sys,e) Design is o* ,/o ,ypes: Gogical design, which tells how a system will meet the requirements, identified during system analysis. (hysical design, which is a process of developing program software. he system design describes the data to be input, stored, calculated, how to process the data and how to produce output. "n -asySplitter system the user !ust give the filename and get splitted files. he users are benefited with the system, such a way and they can navigate and view data. "nvalid files if entered can be recogni7ed and corrected. is very user&friendly and it satisfies the need of users.
STRUCTURED DESI8N :

he structure and design of reports

he purpose of structured design is to take the logical model of the system and to produce the specification for a physical system that will achieve the ob!ectives of the new system. Structured design is an element of structured analysis that utili7es graphic he goal of structured description, focuses on the development of software specifications.

design is to partition a program in to small independent modules. Structured design is a specific program design technique. Chile considering the developed system, the modular approach increases the efficiency of the system, and it satisfies the ob!ective of the system proposed.

DATA &!O0 DIA8RA : $8

i.

S"STE

&!O0 DIA8RA :
Steganography

-mbed Message

-mbed File

9etrieve Message

9etrieve File

Select Chich Message Should be -ncrypted Select the Master file.

Select Chich File Should be -ncrypted Select the Master file.

Select the -ncrypted message form the Master File Kse the Decryption key and retrieve the Message

Select the -ncrypted File form the Master File Kse the Decryption key and retrieve the File

ii.

'ROCESS &!O0 DIA8RA : $>

a. E)bed

essage 'rocess

Stegano graph
-mbed

Select Message

)ive Master File Gocation

-mbed Message is stored in the Master File

b. Re,rie-e &i+e 'rocess

,%

-mbedded files are Decrypted and the file stored in Destination File name

Stegano graph
9etrive

Select -mbedded File from the Master File location

)iven Destination File name

,B

I '!E ENTATION i. Sys,e) I)p+e)en,a,ion: he Developed System RSteganographS for the organi7ation has been run with the test data. he reports are generated smoothing without errors. hen the system is implemented to many tests and its performance is good. his system provides many reports and results. secured, efficient and consistent. advantage. ii. Sys,e) Securi,y: 4 computer N based system is a combination of many asserts or resources for example Dardware, Software, (eople and data procedures and data transmission facilities designed to perform some functions or to provide some service. "n case of RSteganographS the security measures have been tighten. :hecking the users with password when they enter the system is one of the ways of preventing the intruders. hese are very useful for the all

organi7ation from the above discussion this computer system is extremely fact, accurate, 6n the whole this computeri7ed system has more

,$

S"STE

TESTIN8

TESTIN8
Software testing is an important element of SAC quality assurance and represents the ultimate review of specification design and coding.

UNIT TESTIN8
Knit testing focuses verification effort on the smallest unit of SAC design. he tests that occur as part of unit testing is illustrated below. he module TinterfaceU is tested to ensure that information properly flows into and out of the program unit under test. he local data structures are examined to ensure that data stored temporarily maintains its integrity during all steps in an algorithms execution. *oundary conditions are tested to ensure that the module operates properly at boundaries established to limit to restrict processing. 4ll Tindependent pathsU through the control structures are exercised to ensure that all statements in a module have been executed to ensure that all statements in a module have been executed at least once. Finally all error& handling paths are tested.

"2 -)94 "2) -S "2)


"ntegration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. he ob!ective is to take unit&tested modules and build a program structure that has been dictated by design. finally. op&Down "ntegration and *ottom&up "ntegration are tested

S"STE

TESTIN8
System testing is series of different tests whose primary purpose is to fully

exercise the computer based system. 4lthough each test has a different purpose, all the work

,,

should verify that all system elements have been properly integrated and perform allocated functions.

%A!IDATION AND %ERI&ICATION


he goals of verification and validation activities are to assess and improve the quality of the work products generated during development and modification of software. Quality attributes of interests include correctness, completeness, consistency, reliability, efficiency, conformance to standards, and overall cost effectiveness. 4ccording to *oehm, 5erificationE R4re we building the product rightVS 5alidation E R4re we building the right productVS

5erification and 5alidation involve assessment of work products to determine conformance to specifications. Specifications include the requirements specifications, the design documentationUs, various stylistic guidelines, implementation language standards, pro!ect standards, organi7ational standards and user expectations, as well as the meta& specifications for the formats and notations used in the various product specifications. 5arious data were given as the input to the form for the validations and checked well for the mal&functioning of the site when the user submits unwanted data. here are two types of verificationE life&cycle verification and formal verification. Gife&cycle verification is the process determining the degree to which the work products of a given phase of the development cycle fulfill the specifications established during prior phases. Formal verification is a rigorous mathematical demonstration that source code conforms its specifications. 5alidation is the process of evaluating software at the end of the software development process to determine compliance with the requirements. Digh quality cannot be achieved through testing of source code alone. 4lthough a program should be totally free of errors, this is seldom the case for large software products. -ven if source code errors were the only measure of quality, testing alone cannot guarantee the absence of errors in a program. 4 well known maxim states that the number of bugs remaining in a program is proportional to the number already discovered. his is because one

,F

has most confidence in programs with no detected bugs after thorough testing and least confidence in a program with a long history of fixes. he best way to minimi7e the number of errors in a program is to catch and remove the errors during analysis and design, so that few errors are introduced into the source code. 5erification and validation are pervasive concepts, not a set of activities that occur strictly following implementation.

,J

A''ENDI1

SCREEN !A"OUTS

,#

,+

,8

,>

F%

FB

Co)p+e,e Source Code:


AWW W W W W WA File 2ame X Steganograph.!ava :lass 2ame X Steganograph 5ersion $.%.%

import !ava.io.WL import !ava.nio.*yte*ufferL import !ava.util.7ip.WL import !avax.crypto.WL import !avax.crypto.spec.WL import !avax.swing.WL import !avax.swing.event.WL import !ava.awt.WL import !ava.awt.event.WL AWWW Deader descriptionE WWW "n bytesE .F/M ,M BM BM FX $M > *ytes. .WF & for every B byte in ./ as every F bytes of of master file contain $ bits/ W $ bytes representing the si7e of the actual file W , bytes indicate the version of the software used to embed message eg. $ % % W B *yteB .F actual bits/ incicates features used which include file :ompression, -ncryption, MessageAFile W B byte contains the compression ratio W F bytes :ontain the si7e of the data .4 ,$ bit integer value/ WWWA public class Steganograph Y public static final String 5-9S"62X @$.%.%@L public static final byteHI 5-9S"62Z*? -X Y;$;,;%;,;%;[L public static final int 6FFS- Z'()X ,L public static final int 6FFS- Z(2)X F$L public static final int 6FFS- Z)"FZ*M(Z "FX ,$L public static final short D-4D-9ZG-2) DX BJW FL AA hree letters indicateE AA KncompressedA:ompressed -ncryptedAKnencrypted MessageAFile public static final byte KKMX %L public static final byte KKFX BL public static final byte K-MX $L public static final byte K-FX ,L public static final byte :KMX FL public static final byte :KFX JL public static final byte :-MX #L public static final byte :-FX +L private static :ipher cipherL

F$

private static Secret=eySpec specL private static String master-xtension, messageL private static 4boutFrame aboutX new 4boutFrame./L private static File masterFileL AA his byte stores the features being used by the file private static byte featuresL private static int inputFileSi7eL private static int i, !, input6utputMarker, messageSi7e, temp"ntL private static short compression9atioX %, tempL private static byte byteB, byte$, byte,, byte4rray"nHIL private static *yte4rray6utputStream byte6utL private Steganograph./ Y System.out.println.@Steganograph @M 5-9S"62M @ ready...@/L [ public static String getMessage./ Y return messageL [ AA -mbeds a message into a Master file public static boolean embedMessage.File masterFile, File outputFile, String msg, int compression, String password/ Y if.msgXXnull/ Y messageX @Message is empty@L return falseL [ if.msg.length./\B/ Y messageX @Message is empty@L return falseL [ if.password]X null ^^ password.length./\8/ Y messageX @(assword should be minimum of 8 :haracters@L return falseL [ messageSi7eX msg.length./L if.compression]X &B/ Y AA Make sure that the compression is a valid numerical between % and > if.compression\ %/ compressionX %L

F,

if.compression<>/ if.passwordXX null/ else [ else Y if.passwordXX null/ else [ try Y

compressionX >L featuresX :KML featuresX :-ML

featuresX KKML featuresX K-ML

byte6utX new *yte4rray6utputStream./L AA :onvert message into a character array byte HImessage4rrayX msg.get*ytes./L messageSi7eX message4rray.lengthL inputFileSi7eX .int/ masterFile.length./L AA create a byte array of length equal to si7e of input file byte4rray"nX new byteHinputFileSi7eIL AA 6pen the input file read all bytes into byte4rray"n Data"nputStream inX new Data"nputStream.new File"nputStream.masterFile//L in.read.byte4rray"n, %, inputFileSi7e/L in.close./L String file2ameX masterFile.get2ame./L master-xtensionX file2ame.substring.file2ame.length./&,, file2ame.length.//L if.master-xtension.equals"gnore:ase.@!pg@// Y AA Skip past 6FFS- Z'() bytes byte6ut.write.byte4rray"n, %, 6FFS- Z'()/L input6utputMarkerX 6FFS- Z'()L [ else if.master-xtension.equals"gnore:ase.@png@// Y AA Skip past 6FFS- Z(2) bytes byte6ut.write.byte4rray"n, %, 6FFS- Z(2)/L input6utputMarkerX 6FFS- Z(2)L [ else Y AA Skip past 6FFS- Z'()Z*M(Z "F bytes byte6ut.write.byte4rray"n, %, 6FFS- Z)"FZ*M(Z "F/L input6utputMarkerX 6FFS- Z)"FZ*M(Z "FL

FF

[ AA :onvert the ,$ bit input file si7e into byte array byte temp*yteHIX new byteHFIL for.iX$F, !X%L i<X%L i&X8, !MM/ Y temp"ntX inputFileSi7eL temp"nt<<X iL temp"nt^X %x%%%%%%FFL temp*yteH!IX .byte/ temp"ntL [ AA -mbed F byte input File si7e array into the master file embed*ytes.temp*yte/L AA Crite the remaining bytes byte6ut.write.byte4rray"n, input6utputMarker, inputFileSi7e& input6utputMarker/L input6utputMarkerX inputFileSi7eL AA -mbed the , byte version information into the file write*ytes.5-9S"62Z*? -/L AA Crite B byte for features write*ytes.new byteHIYfeatures[/L AA :ompress the message if required if.featuresXX :KM __ featuresXX :-M/ Y *yte4rray6utputStream array6utputStreamX new *yte4rray6utputStream./L 1ip6utputStream 76utX new 1ip6utputStream.array6utputStream/L 1ip-ntry entryX new 1ip-ntry.@M-SS4)-@/L 76ut.setGevel.compression/L 76ut.put2ext-ntry.entry/L 76ut.write.message4rray, %, messageSi7e/L 76ut.close-ntry./L 76ut.finish./L 76ut.close./L AA )et the compressed message byte array message4rrayX array6utputStream.to*yte4rray./L compression9atioX .short/ ..double/message4rray.length A .double/messageSi7e W B%%.%/L messageSi7eX message4rray.lengthL [ AA -mbed B byte compression ratio into the output file write*ytes.new byteHIY.byte/ compression9atio[/L

FJ

AA -ncrypt the message if required if.featuresXX K-M __ featuresXX :-M/ Y :ipher cipherX :ipher.get"nstance.@D-S@/L Secret=eySpec specX new Secret=eySpec.password.substring.%, 8/.get*ytes./, @D-S@/L cipher.init.:ipher.-2:9?( ZM6D-, spec/L message4rrayX cipher.doFinal.message4rray/L messageSi7eX message4rray.lengthL [ AA :onvery the ,$ bit message si7e into byte array temp*yteX new byteHFIL for.iX$F, !X%L i<X%L i&X8, !MM/ Y temp"ntX messageSi7eL temp"nt<<X iL temp"nt^X %x%%%%%%FFL temp*yteH!IX .byte/ temp"ntL [ AA -mbed F byte messageSi7e array into the master file write*ytes.temp*yte/L AA -mbed the message write*ytes.message4rray/L Data6utputStream outX new Data6utputStream.new File6utputStream.outputFile//L AAout.write.byte4rray6ut, %, byte4rray6ut.length/L byte6ut.write o.out/L out.close./L [ catch.-6F-xception e/ Y [ catch.-xception e/ Y messageX @6ops]]`n-rrorE @M e.toString./L e.printStack race./L return falseL [ messageX @Message embedded successfully in file ;@M outputFile.get2ame./M @;.@L return trueL [ AA 9etrieves an embedded message from a Master file

F#

public static String retrieveMessage.Stegano"nformation info, String password/ Y String messgX nullL featuresX info.getFeatures./L try Y masterFileX info.getFile./L byte4rray"nX new byteH.int/ masterFile.length./IL Data"nputStream inX new Data"nputStream.new File"nputStream.masterFile//L in.read.byte4rray"n, %, .int/masterFile.length.//L in.close./L messageSi7eX info.getDataGength./L if.messageSi7e\X%/ Y messageX @Knexpected si7e of messageE %.@L return.@aF4"G-Da@/L [ byteHI message4rrayX new byteHmessageSi7eIL input6utputMarkerX info.get"nputMarker./L read*ytes.message4rray/L AADecrypt the message if required if.featuresXX :-M __ featuresXX K-M/ Y passwordX password.substring.%, 8/L byte password*ytesHIX password.get*ytes./L cipherX :ipher.get"nstance.@D-S@/L specX new Secret=eySpec.password*ytes, @D-S@/L cipher.init.:ipher.D-:9?( ZM6D-, spec/L try Y message4rrayX cipher.doFinal.message4rray/L [ catch.-xception bp/ Y messageX @"ncorrent (assword@L bp.printStack race./L return @aF4"G-Da@L [ messageSi7eX message4rray.lengthL [ AA Kncompress the message if required if.featuresXX :KM __ featuresXX :-M/

F+

Y *yte4rray6utputStream byX new *yte4rray6utputStream./L Data6utputStream outX new Data6utputStream.by/L 1ip"nputStream 7ip"nX new 1ip"nputStream.new *yte4rray"nputStream.message4rray//L 7ip"n.get2ext-ntry./L byte4rray"nX new byteHB%$FIL while..temp"ntX 7ip"n.read.byte4rray"n, %, B%$F//]X &B/ out.write.byte4rray"n, %, temp"nt/L 7ip"n.close./L out.close./L message4rrayX by.to*yte4rray./L messageSi7eX message4rray.lengthL [ messgX new String.Stegano"nformation.byte o:har4rray.message4rray//L [ catch.-xception e/ Y messageX @6ops]]`n -rrorE @M eL e.printStack race./L return.@aF4"G-Da@/L [ messageX @Message si7eE @M messageSi7eM @ *@L return messgL [ AA -mbeds a file into a Master file public static boolean embedFile.File masterFile, File outputFile, File dataFile, int compression, String password/ Y messageSi7eX .int/ dataFile.length./L if.password]X null ^^ password.length./\8/ Y messageX @(assword should be minimum of 8 :haracters@L return falseL [ if.compression]X %/ Y AA Make sure that the compression is a valid numerical between % and > if.compression\ %/ compressionX %L if.compression<>/ compressionX >L if.passwordXX null/ featuresX :KFL

F8

else [ else Y if.passwordXX null/ else [

featuresX :-FL

featuresX KKFL featuresX K-FL

inputFileSi7eX .int/ masterFile.length./L try Y byte6utX new *yte4rray6utputStream./L AA create a byte array of length equal to si7e of input file byte4rray"nX new byteHinputFileSi7eIL AA 6pen the input file read all bytes into byte4rray"n Data"nputStream inX new Data"nputStream.new File"nputStream.masterFile//L in.read.byte4rray"n, %, inputFileSi7e/L in.close./L String file2ameX masterFile.get2ame./L master-xtensionX file2ame.substring.file2ame.length./&,, file2ame.length.//L if.master-xtension.equals"gnore:ase.@!pg@// Y AA Skip past 6FFS- Z'() bytes byte6ut.write.byte4rray"n, %, 6FFS- Z'()/L input6utputMarkerX 6FFS- Z'()L [ else if.master-xtension.equals"gnore:ase.@png@// Y AA Skip past 6FFS- Z(2) bytes byte6ut.write.byte4rray"n, %, 6FFS- Z(2)/L input6utputMarkerX 6FFS- Z(2)L [ else Y AA Skip past 6FFS- Z)"FZ*M(Z "F bytes byte6ut.write.byte4rray"n, %, 6FFS- Z)"FZ*M(Z "F/L input6utputMarkerX 6FFS- Z)"FZ*M(Z "FL [ AA :onvert the ,$ bit input file si7e into byte array byte temp*yteHIX new byteHFIL for.iX$F, !X%L i<X%L i&X8, !MM/ Y

F>

temp"ntX inputFileSi7eL temp"nt<<X iL temp"nt^X %x%%%%%%FFL temp*yteH!IX .byte/ temp"ntL [ AA -mbed F byte input File si7e array into the master file embed*ytes.temp*yte/L AA Crite the remaining bytes byte6ut.write.byte4rray"n, input6utputMarker, inputFileSi7e& input6utputMarker/L input6utputMarkerX inputFileSi7eL AA -mbed the , byte version information into the file write*ytes.5-9S"62Z*? -/L AA Crite B byte for features write*ytes.new byteHIYfeatures[/L AA 9ead the data bytes into file4rray byte HIfile4rrayX new byteHmessageSi7eIL inX new Data"nputStream.new File"nputStream.dataFile//L in.read.file4rray, %, messageSi7e/L in.close./L AA :ompress the message if required if.featuresXX :KF __ featuresXX :-F/ Y *yte4rray6utputStream array6utputStreamX new *yte4rray6utputStream./L 1ip6utputStream 76utX new 1ip6utputStream.array6utputStream/L 1ip-ntry entryX new 1ip-ntry.dataFile.get2ame.//L 76ut.setGevel.compression/L 76ut.put2ext-ntry.entry/L 76ut.write.file4rray, %, messageSi7e/L 76ut.close-ntry./L 76ut.finish./L 76ut.close./L AA )et the compressed message byte array file4rrayX array6utputStream.to*yte4rray./L compression9atioX .short/ ..double/file4rray.length A .double/messageSi7e W B%%.%/L messageSi7eX file4rray.lengthL [ AA -mbed B byte compression ratio into the output file write*ytes.new byteHIY.byte/ compression9atio[/L

J%

AA -ncrypt the message if required if.featuresXX K-F __ featuresXX :-F/ Y :ipher cipherX :ipher.get"nstance.@D-S@/L Secret=eySpec specX new Secret=eySpec.password.substring.%, 8/.get*ytes./, @D-S@/L cipher.init.:ipher.-2:9?( ZM6D-, spec/L file4rrayX cipher.doFinal.file4rray/L messageSi7eX file4rray.lengthL [ AA :onvery the ,$ bit message si7e into byte array temp*yteX new byteHFIL for.iX$F, !X%L i<X%L i&X8, !MM/ Y temp"ntX messageSi7eL temp"nt<<X iL temp"nt^X %x%%%%%%FFL temp*yteH!IX .byte/ temp"ntL [ AA -mbed F byte messageSi7e array into the master file write*ytes.temp*yte/L AA -mbed the message write*ytes.file4rray/L Data6utputStream outX new Data6utputStream.new File6utputStream.outputFile//L byte6ut.write o.out/L out.close./L [ catch.-6F-xception e/ Y [ catch.-xception e/ Y messageX @6ops]]`n-rrorE @M e.toString./L e.printStack race./L return falseL [ messageX @File ;@M dataFile.get2ame./M @; embedded successfully in file ;@M outputFile.get2ame./M @;.@L return trueL [ AA 9etrieves an embedded file from a Master file

JB

public static boolean retrieveFile.Stegano"nformation info, String password, boolean overwrite/ Y File dataFileX nullL featuresX info.getFeatures./L try Y masterFileX info.getFile./L byte4rray"nX new byteH.int/ masterFile.length./IL Data"nputStream inX new Data"nputStream.new File"nputStream.masterFile//L in.read.byte4rray"n, %, .int/masterFile.length.//L in.close./L messageSi7eX info.getDataGength./L byteHI file4rrayX new byteHmessageSi7eIL input6utputMarkerX info.get"nputMarker./L read*ytes.file4rray/L if.messageSi7e\X%/ Y messageX @Knexpected si7e of embedded fileE %.@L return falseL [ AADecrypt the file if required if.featuresXX :-F __ featuresXX K-F/ Y passwordX password.substring.%, 8/L byte password*ytesHIX password.get*ytes./L cipherX :ipher.get"nstance.@D-S@/L specX new Secret=eySpec.password*ytes, @D-S@/L cipher.init.:ipher.D-:9?( ZM6D-, spec/L try Y file4rrayX cipher.doFinal.file4rray/L [ catch.-xception bp/ Y messageX @"ncorrent (assword@L bp.printStack race./L return falseL [ messageSi7eX file4rray.lengthL [ AA Kncompress the file if required

J$

if.featuresXX :KF __ featuresXX :-F/ Y *yte4rray6utputStream byX new *yte4rray6utputStream./L Data6utputStream outX new Data6utputStream.by/L 1ip"nputStream 7ip"nX new 1ip"nputStream.new *yte4rray"nputStream.file4rray//L 1ip-ntry entryX 7ip"n.get2ext-ntry./L dataFileX new File.entry.get2ame.//L byte4rray"nX new byteHB%$FIL while..temp"ntX 7ip"n.read.byte4rray"n, %, B%$F//]X &B/ out.write.byte4rray"n, %, temp"nt/L 7ip"n.close./L out.close./L file4rrayX by.to*yte4rray./L messageSi7eX file4rray.lengthL [ info.setDataFile.dataFile/L if.dataFile.exists./ ^^ ]overwrite/ Y messageX @File -xists@L return falseL [ Data6utputStream outX new Data6utputStream.new File6utputStream.dataFile//L out.write.file4rray, %, file4rray.length/L out.close./L [ catch.-xception e/ Y messageX @6ops]]`n -rrorE @M eL e.printStack race./L return falseL [ messageX @9etrieved file si7eE @M messageSi7eM @ *@L return trueL [ AA Method used to write bytes into the output array private static void embed*ytes.byteHI bytes/ Y int si7eX bytes.lengthL for.int iX%L i\ si7eL iMM/ Y

J,

byteBX bytesHiIL for.int !X#L !<X%L !&X$/ Y byte$X byteBL byte$<<X !L byte$^X %x%,L byte,X byte4rray"nHinput6utputMarkerIL byte,^X %xF:L byte,_X byte$L byte6ut.write.byte,/L input6utputMarkerMML [ [ [ AA Method used to write bytes into the output array private static void write*ytes.byteHI bytes/ Y int si7eX bytes.lengthL for.int iX%L i\ si7eL iMM/ Y byte6ut.write.bytesHiI/L input6utputMarkerMML [ [ AA Method used to retrieve bytes into the output array private static void retrieve*ytes.byteHI bytes/ Y int si7eX bytes.lengthL for.int iX%L i\ si7eL iMM/ Y byteBX %L for.int !X#L !<X%L !&X$/ Y byte$X byte4rray"nHinput6utputMarkerIL input6utputMarkerMML byte$^X %x%,L byte$\\X !L byteB_X byte$L [ bytesHiIX byteBL [ [ AA Method used to read bytes into the output array

JF

private static void read*ytes.byteHI bytes/ Y int si7eX bytes.lengthL for.int iX%L i\ si7eL iMM/ Y bytesHiIX byte4rray"nHinput6utputMarkerIL input6utputMarkerMML [ [ public static void show4boutDialog./ Y about.setDisplayed.true/L [ public static void updateKser"nterface./ Y SwingKtilities.update:omponent reeK".about/L [ public static void showDelpDialog./ Y new D MGFrame.@fileE@M System.get(roperty.@user.dir@/ M System.get(roperty.@file.separator@/ M @help.html@, false/L [ AAWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW WAA AA "nner class for description about Steganograph in a frame private static class 4boutFrame extends 'Frame implements 4ctionGistener Y private final :olor )9--2X :olor.greenL private final :olor ?-GG6CX :olor.yellowL private final :olor *G4:=X :olor.blackL private 'Gabel lbl itle, lbl"mage, lbl2ame, lbl-mail, lbl(honeL private 'Gabel fillerB, filler$, filler,L private '*utton btn5isit, btn:omments, btnDelp, btn:loseL private )rid*agGayout gblL private )rid*ag:onstraints gbcL public 4boutFrame./ Y set itle.@4bout Steganograph @M Steganograph.5-9S"62/L fillerBX new 'Gabel.@ @/L filler$X new 'Gabel.@ @/L filler,X new 'Gabel.@ @/L

JJ

lbl itleX new My'Gabel.@Steganography "mplementation @M Steganograph.5-9S"62, new Font.@4rial@, Font.(G4"2, BJ/, ?-GG6C, *G4:=/L lbl2ameX new My'Gabel.@*yE Mohammad Mu!eeb@, new Font.@Monotype :orsiva@, Font.(G4"2, BF/, )9--2, *G4:=/L lbl-mailX new My'Gabel.@ mohammad.mu!eebbgmail.com@, )9--2, *G4:=/L lbl(honeX new My'Gabel.@ M>B >,F$$%F%$>@, )9--2, *G4:=/L if.new File.@"magesA4bout@/.exists.// lbl"mageX new 'Gabel.new "mage"con.@"magesAMyself@//L else Y lbl"mageX new My'Gabel.@Steganograph @M Steganograph.5-9S"62, new Font.@ imes new roman@, Font.(G4"2, J%/, :olor.red, :olor.black/L lbl"mage.set(referredSi7e.new Dimension.$$$, $,B//L [ btn5isitX new My'*utton.@4uthor;s Domepage@, )9--2, *G4:=/L btn:ommentsX new My'*utton.@Send :omments@, )9--2, *G4:=/L btnDelpX new My'*utton.@Delp@, )9--2, *G4:=/L btn:loseX new My'*utton.@:lose@, )9--2, *G4:=/L btn5isit.add4ctionGistener.this/L btnDelp.add4ctionGistener.this/L btn:lose.add4ctionGistener.this/L btn:omments.add4ctionGistener.this/L '(anel panel4boutX new '(anel./L panel4bout.set*ackground.*G4:=/L panel4bout.setForeground.)9--2/L gblX new )rid*agGayout./L gbcX new )rid*ag:onstraints./L panel4bout.setGayout.gbl/LL gbc.anchorX )rid*ag:onstraints.:-2 -9L gbc.weightxX $L gbc.weightyX $L gbc.gridxX BL gbc.gridyX BL gbl.set:onstraints.lbl itle, gbc/L panel4bout.add.lbl itle/L gbc.gridyX $L gbl.set:onstraints.fillerB, gbc/L panel4bout.add.fillerB/L gbc.gridyX ,L gbl.set:onstraints.lbl2ame, gbc/L panel4bout.add.lbl2ame/L gbc.gridyX FL gbl.set:onstraints.filler$, gbc/L panel4bout.add.filler$/L gbc.gridyX JL gbl.set:onstraints.lbl-mail, gbc/L panel4bout.add.lbl-mail/L gbc.gridyX #L gbl.set:onstraints.filler,, gbc/L panel4bout.add.filler,/L gbc.gridyX +L gbl.set:onstraints.lbl(hone, gbc/L

J#

panel4bout.add.lbl(hone/L panel4boutX Ktility6perations.create*ordered(anel.panel4bout, @4bout Steganograph@, ,, ,/L '(anel panelKpperX new '(anel./L panelKpper.set*ackground.*G4:=/L panelKpper.setGayout.new FlowGayout.//L panelKpper.add.lbl"mage/L panelKpper.add.new My'Gabel.@ @, )9--2, *G4:=//L panelKpper.add.panel4bout/L '(anel panel*uttonsX new '(anel./L panel*uttons.set*ackground.:olor.black/L panel*uttons.setGayout.new FlowGayout.//L panel*uttons.set*ackground.:olor.black/L panel*uttons.add.btn:omments/L panel*uttons.add.new 'Gabel.@ @//L panel*uttons.add.btnDelp/L panel*uttons.add.new 'Gabel.@ @//L panel*uttons.add.btn:lose/L '(anel main(anelX new '(anel./L main(anel.set*ackground.:olor.black/L gblX new )rid*agGayout./L main(anel.setGayout.gbl/L gbc.gridxX BL gbc.gridyX BL gbl.set:onstraints.panelKpper, gbc/L main(anel.add.panelKpper/L gbc.gridyX $L gbl.set:onstraints.panel*uttons, gbc/L main(anel.add.panel*uttons/L main(anelX Ktility6perations.create*ordered(anel.main(anel, ,, $/L set:ontent(ane.main(anel/L Dimension dX oolkit.getDefault oolkit./.getScreenSi7e./L int widthX .int/ .d.widthW$.BA,/L int heightX .int/ .d.heightWB.>/A,L setSi7e.width, height/L setGocation..d.width& width/A$, .d.height& height/A$/L set9esi7able.false/L [ public void setDisplayed.boolean choice/ Y set5isible.choice/L [ public void action(erformed.4ction-vent e/ Y if.e.getSource./XX btn5isit/ new D MGFrame.@httpEAAmu!eeb.addr.com@, true/L

J+

if.e.getSource./XX btnDelp/ new D MGFrame.@fileE@M System.get(roperty.@user.dir@/ M System.get(roperty.@file.separator@/ M @help.html@, false/L if.e.getSource./XX btn:omments/ new D MGFrame.@httpEAAmu!eeb.addr.comAcomments.html@, true/L if.e.getSource./XX btn:lose/ set5isible.false/L [ [ [ AA -nd of :lass 4boutFrame AA -nd of :lass Steganograph

AA :lass to obtain information about a Steganograph file class Stegano"nformation Y private File fileL private File dataFileX nullL private String starterL private String versionL private byte featuresL private short compression9atioL private int dataGength, tempL private boolean is-sterX falseL private byte byte4rrayHI, nameHI, byteB, byte$L private int inputMarker, i, !L AA 4ccessor methods public File getFile./ Y return fileL [ public int get"nputMarker./ Y return inputMarkerL [ public File getDataFile./ Y return dataFileL [ public String get5ersion./ Y return versionL [ public byte getFeatures./ Y return featuresL [ public short get:ompression9atio./ Y return compression9atioL [ public int getDataGength./ Y return dataGengthL [ public boolean is-ster./ Y return is-sterL [ AA Mutator methods public void setDataFile.File dataFile/ Y this.dataFileX dataFileL [ private void retrieve*ytes.byteHI bytes, byteHI array, int marker/ Y byte4rrayX arrayL inputMarkerX markerL

J8

int si7eX bytes.lengthL for.iX%L i\ si7eL iMM/ Y byteBX %L for.!X#L !<X%L !&X$/ Y byte$X byte4rrayHinputMarkerIL inputMarkerMML byte$^X %x%,L byte$\\X !L byteB_X byte$L [ bytesHiIX byteBL [ [ private void retrieve*ytes.byteHI bytes/ Y int si7eX bytes.lengthL for.iX%L i\ si7eL iMM/ Y byteBX %L for.!X#L !<X%L !&X$/ Y byte$X byte4rrayHinputMarkerIL inputMarkerMML byte$^X %x%,L byte$\\X !L byteB_X byte$L [ bytesHiIX byteBL [ [ private void read*ytes.byteHI bytes, byteHI array, int marker/ Y byte4rrayX arrayL inputMarkerX markerL int si7eX bytes.lengthL for.iX%L i\ si7eL iMM/ Y bytesHiIX byte4rrayHinputMarkerIL inputMarkerMML

J>

[ [ private void read*ytes.byteHI bytes/ Y int si7eX bytes.lengthL for.iX%L i\ si7eL iMM/ Y bytesHiIX byte4rrayHinputMarkerIL inputMarkerMML [ [ public static charHI byte o:har4rray.byteHI bytes/ Y int si7eX bytes.length, iL char HIcharsX new charHsi7eIL for.iX%L i\si7eL iMM/ Y bytesHiI^X %x+FL charsHiIX .char/ bytesHiIL [ return charsL [ public Stegano"nformation.File file/ Y this.fileX fileL is-sterX falseL if.]file.exists.// Y starterX nullL returnL [ if.file.get2ame./.equals.@Secax^y@// Y is-sterX trueL returnL [ byte4rrayX new byteH.int/ file.length./IL try Y Data"nputStream inX new Data"nputStream.new File"nputStream.file//L in.read.byte4rray, %, .int/ file.length.//L in.close./L

#%

[ catch.-xception e/ Y starterX nullL returnL [ AA 6btain the original file length nameX new byteHFIL String file2ameX file.get2ame./L String file-xtensionX file2ame.substring.file2ame.length./&,, file2ame.length.//L if.file-xtension.equals"gnore:ase.@!pg@// inputMarkerX Steganograph.6FFS- Z'()L else if.file-xtension.equals"gnore:ase.@png@// inputMarkerX Steganograph.6FFS- Z(2)L else inputMarkerX Steganograph.6FFS- Z)"FZ*M(Z "FL retrieve*ytes.name, byte4rray, inputMarker/L dataGengthX %L for.iX$F,!X%L i<X%L i&X8,!MM/ Y tempX nameH!IL temp^X %x%%%%%%FFL temp\\X iL dataGength_X tempL [ inputMarkerX dataGengthL if.dataGength\% __ dataGength<file.length.// Y starterX @"nvalid@L returnL [ else starterX @MK'--*@L AA 9etrive the name and version information byte version4rrayHIX new byteH,IL read*ytes.version4rray, byte4rray, inputMarker/L char HIversion empX byte o:har4rray.version4rray/L char HIverX new charHJIL for.iX%, !X%L i\JL iMM/ if.iXX B __ iXX ,/ verHiIX ;.;L else Y verHiIX version empH!MMIL

#B

[ versionX new String.ver/L AA 6btain the features nameX new byteHBIL read*ytes.name/L featuresX nameH%IL AA 6btain the compression ratio read*ytes.name/L nameH%I^X %x+FL compression9atioX nameH%IL AA 6btain the data length nameX new byteHFIL read*ytes.name/L dataGengthX %L for.iX$F,!X%L i<X%L i&X8,!MM/ Y tempX nameH!IL temp^X %x%%%%%%FFL temp\\X iL dataGength_X tempL [ [ public boolean is5alid./ Y if.starter.equals.@MK'--*@// Y return trueL [ else return falseL [ [ class D MGFrame extends 'Frame implements DyperlinkGistener Y '-ditor(ane editor(aneL 'Scroll(ane scroll(aneL public D MGFrame.String startK9G, boolean is6nline/ Y super.@Delp & Steganograph @M Steganograph.5-9S"62M @ && *yE Mohammad Mu!eeb@/L editor(aneX new '-ditor(ane./L editor(ane.set-ditable.false/L

#$

if.is6nline/ Y editor(ane.set*ackground.:olor.white/L set itle.@Steganograph @M Steganograph.5-9S"62M @ && *yE Mohammad Mu!eeb@/L [ AAelse AA editor(ane.set*ackground.:olor.black/L editor(ane.addDyperlinkGistener.this/L scroll(aneX new 'Scroll(ane.editor(ane/L try Y editor(ane.set(age.startK9G/L get:ontent(ane./.add.scroll(ane/L [ catch.-xception e/ Y '6ption(ane.showMessageDialog.this, @6ops]] -rror`n@M e, @-rror@, '6ption(ane.C492"2)ZM-SS4)-/L returnL [ Dimension dX oolkit.getDefault oolkit./.getScreenSi7e./L setSi7e.d.width, d.height/L set5isible.true/L [ public void hyperlinkKpdate.Dyperlink-vent e/ Y if.e.get-vent ype./XX Dyperlink-vent.-vent ype.4: "54 -D/ Y try Y editor(ane.set(age.e.getK9G.//L [ catch.-xception ex/ Y '6ption(ane.showMessageDialog.this, @6ops]] -rror`n@M ex, @-rror@, '6ption(ane.C492"2)ZM-SS4)-/L [ [ [ [

#,

CONC!USION
Developing this pro!ect is really a milestone of one educational curriculum. 6nce a particular task is started, we canUt assure that we will get a successful result. *ut in that world there is no problem without solution. Ce will reach the solution by analy7ing the system again and again. Knderstanding the functions and responsibilities of the every user and how they are proposed manually is a very boring task. he computeri7ation of this process is an efficient way is a challenging, but also interesting. he entire task should be sub!ected to future modification. *ecause in this world every minute why not every microsecond we get an improvement. his software has been developed in such a manner that will be further modified by the user. Ce tried our level best to incorporate almost all the transitions to a well established form. *efore to conclude this pro!ect, we can thank one and all who helped us to complete the pro!ect successfully.

#F

#I#!IO8RA'(" 1. 'ava completes reference $. Software -ngineering & (atrick 2auton. & 9ichard fairly.

#J

You might also like