A Review Of Data Security Issues Information Technology Essay

Published: November 30, 2015 Words: 6003

This Project derives Data Hiding in Audio files is the software developed for hiding information which uses the technology called as Steganography.

Steganography, if however used along with cryptography ,for example, if a message is encrypted using triple DES(EDE) which requires a 112 bit key then the message has become quite secure as far as cryptanalytic attack are concerned. Now, if this cipher text is embedded in an image, video, voice, etc., it is even more secure. If an encrypted message is intercepted, the interceptor knows the text is an encrypted message. With Steganography, the interceptor may know the object contains a message.

When performing data hiding on audio, one must exploit the weakness of the Human Auditory System (HAS), while at the same time being aware of the extreme sensitivity of the human auditory system.

AIM

Our aim is to come up with a technique of hiding the message in the audio file in such a way, that there would be no perceivable changes in the audio file after the message insertion. At the same time, if the message that is to be hidden were encrypted, the level of security would be raised to quite a satisfactory level. Now, even if the hidden message were to be discovered the person trying to get the message would only be able to lay his hands on the encrypted message with no way of being able to decrypt it.

OBJECTIVES

To provide the security for the data transmission by hiding the data in the form of audio file

Applying the audio steganography techniques along with cryptography to the data

Implementing triple DES algorithm

Achieving secure data transmission between two parties.

EVIDENCE OF REQUIRMENTS

Nowadays, several methods are used for communicating secret messages for defense purposes or in order to ensure the privacy of communication between two parties. So we go for hiding information in ways that prevent its detection.

Some of methods used for privacy communication are the use of invisible inks, covert channels are some of existing systems that are used to convey the messages.

The proposed system uses Audio file as a carrier medium which add another step in security. The objective of the newly proposed system is to create a system that makes it very difficult for an opponent to detect the existence of a secret message by encoding it in the carrier medium as a function of some secret key and that remains as the advantage of this system.

CONTEXT DESCRIPTION

-- This is a standard practice

--I have a basic knowledge on this, but I hope that I can accomplish this task through self

reference and review the designed by other designers. I have basic level knowledge in steganography and cryptography concepts.

--I will research more in this area.

RESEARCH METHOD

• Improving relevant technical knowledge by reading books and by using helps in the internet.

• Having discussion with the lecturer in-charge for the project.

• Search and study existing related area

BRIEF PRODUCT DESCRIPTION

Security is the art of protecting access to information and other computing resources from those whom you do not fully trust. Of course, security is only possible if you are able to keep certain secrets, such as passwords, keys, and so forth. Security is ultimately based on one simple concept: keeping secrets. Indeed, cryptography is the science of keeping secrets. In fact, cryptography is generally nothing more than hiding large secrets (which are themselves awkward to hide) with small secrets (which are more convenient to hide). As we will see in the next section, the large secret is typically referred to as plaintext, and the small secret is referred to as the encryption key. A cipher is a system or an algorithm used to transform an arbitrary message into a form that is intended to be unintelligible to anyone other than one or more desired recipients. A cipher represents a transformation that maps each possible input message into a unique encrypted output message, and an inverse transformation must exist that will then reproduce the original message. A key is used by a cipher as an input that controls the encryption in a desirable manner. A general assumption in cryptography work is that the key you choose is the critical secret, whereas the details about the cipher design should not be assumed to be secret. A well-designed encryption algorithm produces an encrypted message that is essentially indistinguishable from a randomly generated byte sequence and provides as little information as possible about the original message to an attacker. A key space is the set of all possible keys that can be used by a cipher to encrypt messages. Sender refers to someone who encrypts a plaintext message and sends the resulting ciphertext to an intended recipient. The intended recipient is referred to as the receiver. Anyone who tries to get between the sender and receiver with the intention of obtaining the key and/or the plaintext message is referred to as an attacker. An attacker is also known by other names, including interloper, villain, and eavesdropper

This is solution to the Data security using cryptography and steganography. My product will include the Complete Solution by documentation. In this Documentation, it includes system Design with Diagrams, system Management Plan, Cost Analysis Report and Network Implementation Document.

1. Cryptography

2. Steganography

LITERATURE SURVEY

Cryptography:

Keys Are the Key

The encryption algorithm uses a "key," which is a binary number that is typically from 40 to 256 bits in length. The greater the number of bits in the key (cipher strength), the more possible key combinations and the longer it would take to break the code. The data are encrypted, or "locked," by combining the bits in the key mathematically with the data bits. At the receiving end, the key is used to "unlock" the code and restore the original data.

Secret Vs. Public Key

Secret key cryptography and public key cryptography are the two major cryptographic architectures.

Secret Keys - Symmetric System

The first method uses a secret key, such as the DES and AES algorithms. Both sender and receiver use the same key to encrypt and decrypt. This is the fastest computation method, but getting the secret key to the recipient in the first place is a problem that is often handled by the second method.

Public Keys - Asymmetric System

The second method uses a two-part key, such as RSA and ElGamal. Each recipient has a private key that is kept secret and a public key that is published for everyone. The sender looks up or is sent the recipient's public key and uses it to encrypt the message. The recipient uses the private key to decrypt the message and never publishes or transmits the private key to anyone. Thus, the private key is never in transit and remains invulnerable.

Both Are Used Together

Secret key and public key systems are often used together, such as the AES secret key and the RSA public key. The secret key method provides the fastest decryption, and the public key method provides a convenient way to transmit the secret key. This is called a "digital envelope." For example, the PGP e-mail encryption program uses one of several public key methods to send the secret key along with the message that has been encrypted with that secret key

Get Faster - Get Stronger

It has been said that any encryption code can be broken given enough time to compute all permutations. However, if it takes months to break a code, the war could already be lost, or the thief could have long absconded with the money from the forged financial transaction. As computers get faster, to stay ahead of the game, encryption algorithms have to become stronger by using longer keys and more clever techniques

SYSTEM REQUIREMENTS 10

IMPLEMENTATION

Encryption

In this project encryption is mainly used for security purpose. Here we are message convert to unknown format. Then only intermediate person can't understand the message. The user messages is encrypted by the received Private Key and append the public key with that encrypted message, then transmit the whole information to the corresponding receiver.

2.2 Decryption

It is the process of retrieving the original format from the encrypted message. After the Decryption we can read the message by using public key. This key is deliberately attached with encrypted message. Then this message will be shown to user.

3. Message Transmission

In this module we are going to transmit our encrypted message to the selected group members. Then the encrypted message will be decrypt at the other end of group member with the proper verification of the signature. In most of these applications, users typically receive identical information from a single or multiple senders. This module having two sub modules they are

Unicasting and

Multicasting

Unicasting sub module is used to transfer our message from one to one recipient.

Multicasting sub module is used to transfer our message from one to many recipient.

This project implements symmetric cipher is a cipher in which encryption and decryption use the same key or keys that are mathematically related to one another in such a way that it is easy to compute one key from knowledge of the other, which is effectively a single key. Since the single key is the only secret to encryption and decryption, it is critical that this key be kept strictly private. Otherwise, an interloper could easily encrypt and decrypt messages at will, and we would be leaking information and accomplishing nothing. For this reason, symmetric ciphers are often referred to as private key, secret key, or shared key ciphers. Symmetric encryption and decryption are represented mathematically by the following, where E is an encryption function, D is a decryption function, k is the single shared secret key, M is a plaintext message, and C is the corresponding ciphertext message.

There are two basic types of symmetric algorithms: block ciphers and stream ciphers. A block cipher processes a block of bytes (usually 64 or 128 bits) at a time. A stream cipher processes a single byte or even a single bit at a time. We shall see that the distinction between block and stream ciphers is somewhat artificial, because certain modes of operation allow a block cipher to behave as a stream cipher.

As we shall see in the next chapter, asymmetric ciphers solve several significant cryptographic problems; however, they tend to be less secure than symmetric ciphers (for a given key size), and symmetric ciphers tend to be faster, making them more suitable for encrypting large quantities of bulk data. It is important to recognize that symmetric and asymmetric ciphers are used to solve different security problems, and in fact their strengths are often complementary to one another. For this reason, there are several important cryptographic protocols that make use of a combination of both symmetric and asymmetric algorithms to accomplish sets of desirable security goals.

Many symmetric ciphers have been developed throughout history, whereas asymmetric ciphers are a fairly recent invention.

STEGANOGRAPHY:

I am using steganography in my project for more security and going to tell about the Steganography in detail and how it has grown from its beginning. Steganography refer to science of invisible communication. This is not like cryptography, in cryptography we secure the data and where as in steganography we are going to hide the presence of the data so that the attacker cannot see the existence of the data and cannot hack the data. In other words it means invisible communication. In general the idea of hiding the information will be discussed first and after that what types of Steganography are using today and what type of steganography is used in this project for providing security is shown . Also where and how the steganographic techniques are being used are shown. And after that at last, we are going to discuss what the steganography holds in future and how advanced it has become.

From the beginning man has first started communicating through the written messages and therefore the need for keeping the messages more secretly was in very high demand. In the past, messages can be easily intercepted and because there is no secrecy devices invented and so the third party can be easily able to read the whole messages. We use steganography in hiding the message, so that it appears in such a way that a message does not exist at all. steganography is hiding a secret message in number of forms such as image audio etc, in such a way that others can not able to recognize the presence of contents of the hidden message. This was the first known case of where we use the Steganography and then, the use of the Steganography has been spread widely. The main reason for this is because everyone want to keep the information (message) secretly while sending to other person. If you think more about it, even though the message is hidden, in order to read it, all the thing you have to do is to find where the message is hidden. If any secret message was transferring from one person to another person and the message was intercepted and the person looked in the correct place, the message could be easily read.

Nowadays most of the messages hidden today are hidden inside any of the video files, audio files and digital images. And even the modern printers can hide the messages with the way they print the text out. For example, laser printers are very precise; they can offset a letter by 1/300th of an inch. By doing this at certain points, they could send a binary message, which would be undetectable to the naked eye. The way it works is that a normal space would be considered a "0" while spaces that are offset by 1/300th of an inch would be considered the "1's" This is good for hiding messages in print form, but has not solved the problem of sending the hidden message from computer to computer. This is where the files come into play.

Hidden files or pictures can be hidden in picture files because pictures files are so complex. Pictures on a computer are represented by tons and tons of pixels. Each pixel consists of a variation of all three primary colors, red, green and blue. In a standard 24-bit bitmap, 8 bits will represent each of the three colors. 8 times 3 is 24. That means there are 256 different variations of each color in every pixel that makes up a picture. So, to represent the color white, the code would look like 11111111 11111111 11111111. Now, the human eye cannot distinguish the difference between too many colors and so the color 11111110 11111110 11111110 would look exactly the same as white. Because of this, the last digit in every bit in every pixel could be changed. This is the basis of the Least Significant Bit Insertion technique. Now to show how this becomes useful. You only need 8 bits to represent Ascii text and there are three extra in every pixel of a picture. Therefore, with every three pixels, you could form one letter of Ascii text. This may not seem like a lot, but when the standard image size is 640 x 480 pixels, that adds up to a lot in a hurry. In order to make this practical to the user, a computer program would be needed. After you type in your secret message and determine a cover message ( the picture you want to hide you message in) the program would go through every pixel and change the last digit to represent each letter of the message you wrote. You would then send the picture to the correct recipient who would then use his program to go trough every pixel and take off the last digit and use that to form the message.

The problem of using steganography over digital communications has been solved. Also, the great thing about LSB (Least Significant Bit Insertion) is that the message is not lost if the file is compressed. Anyone who uses online pictures knows that bitmap files hold a lot of information and so are generally large in size. But because the secret message is encoded into the color bits, the message is never lost when compressed. The one problem with this approach is that it does not work for every picture type. LSB works mainly with Bitmaps because of the way bitmaps are compressed. JPEG's, on the other hand, are compressed using sophisticated algorithms and so a lot of the original information is lost.

Because information could so easily be lost with certain compression programs, other techniques were developed. One technique is called the Masking and Filtering technique. This technique is very similar to watermarking. The image is marked with the secret message or image and then cannot be seen unless the luminosity level is changed to an exact amount. This worked better because the text/image was now actually part of the picture and no longer in the coding part. Another technique developed used the way certain pictures are compressed to its advantage. As stated earlier, JPEG's are compressed using sophisticated algorithms and because of this, a lot of the original information of the picture is lost. So, basically, what this last technique does is, it determines how the picture is going to be compressed with all the algorithms. It then changes the information of the picture accordingly to the secret message. It changes the information in a way that when decompressed, it will look similar to the LSB approach. This way, when the picture is viewed, it still looks the same but the secret message could be determined by taking the last bit of each pixel just like the LSB approach.

Today, the Internet is filled with tons of programs that uses steganography to hide secret messages. A majority of the programs use a variation of the algorithm approach. When looking closely at a program to determine how it works, you soon discover that it is really complicated, or at least, seems to be. But in reality, they are just the using the algorithm approach plus a few minor twists. Steganography is in such wide use today that it has been reported that even the terrorist group Al Quida uses it to deliver messages. Apparently they were using nude pictures on the Internet to hide their messages. I have not been able to find an example of this though.

Steganography is also being used everyday life for practical needs. Odds are, you encounter the use at least once a week and do not even know it. One of the biggest uses today are with copyrighted materials like DVDs. DVDs are actually encoded with certain watermarks that the DVD player recognizes. The watermark has numerous functions. First it tells where the DVD came from so if someone makes copies of their DVDs, the original copy could always be determined. Secondly, the watermark determines if the DVD could actually be copied or not. Finally, the watermark tells the DVD player if it could play the DVD or not. Unknown to a lot of people, but DVDs are made in certain "Regions" and they only work in that region. For example, Asia and North America are considered different regions and so a DVD from Asia will not play on a DVD player that has a North America region code.

Seeing how complex steganography is today, it is hard to imagine what the future could hold. But with the way technology is growing exponentially, the bounds for steganography seem limitless. One day, hiding a message inside someone's brain without the person even knowing it, Johnny Mnemonic style, may become a reality"

Steganography is the art of concealing information in such a way that the fact that information is being concealed is itself a secret. Steganography is technically not considered to be a true branch of cryptography, but it can nevertheless be used very effectively for secret communications. This technique works because the least significant bits tend to have little effect on the visual appearance of the image. The least significant bits in most images tend to be fairly random, so any detectible statistical patterns in these bits could reveal the fact that steganography is being used. Thus, an attacker could do tests on your images to see if those bits are in fact random. To avoid this problem, you can randomize the message bits before inserting them into the image. For example, you could use compression, which not only improves randomness but also improves bandwidth. Alternatively, you could encrypt the message before inserting it, which not only improves randomness but also makes detection and recovery altogether much harder

Steganography refers to the science of "invisible" communication. Unlike cryptography, where the goal is to secure communications from an eaves- dropper, steganographic techniques strive to hide the very presence of the message itself from an observer. The general idea of hiding some infor- mation in digital content has a wider class of applications that go beyond steganography, The techniques involved in such applications are col- lectively referred to as information hiding. For example, an image printed on a document could be annotated by metadata that could lead a user to its high resolution version. In general, metadata provides additional in- formation about an image. Although metadata can also be stored in the file header of a digital image, this approach has many limitations. Usually, when a file is transformed to another format (e.g., from TIFF to JPEG or to BMP), the metadata is lost. Similarly, cropping or any other form of image manipulation destroys the metadata. Finally, metadata can only be attached to an image as long as the image exists in the digital form and is lost once the image is printed. Information hiding allows the metadata to travel with the image regardless of the file format and image state (digital or analog).

A special case of information hiding is digital watermarking. Digital wa- termarking is the process of embedding information into digital multimedia content such that the information (the watermark) can later be extracted or detected for a variety of purposes including copy prevention and control. Digital watermarking has become an active and important area of research, and development and commercialization of watermarking techniques is be- ing deemed essential to help address some of the challenges faced by the rapid proliferation of digital content. The key difference between informa- tion hiding and watermarking is the absence of an active adversary. In wa- termarking applications like copyright protection and authentication, there is an active adversary that would attempt to remove, invalidate or forge wa- termarks. In information hiding there is no such active adversary as there is no value associated with the act of removing the information hidden in the content. Nevertheless, information hiding techniques need to be robust against accidental distortions.

The modern formulation of steganography is often given in terms of the prisoner's problem where Client1 and Client2 are two inmates who wish to communicate in order to hatch an escape plan. However, all communication between them is examined by the warden, Wendy, who will put them in solitary confinement at the slightest suspicion of covert communication. Specifically, in the general model for steganography, illustrated in Fig. 2, we have Client1 wishing to send a secret message m to Client2. In order to do so, she "embeds" m into a cover-object c, and obtains a stego-object s. The stego-object s is then sent through the public channel. Thus we have the following definitions:

Cover-object: refers to the object used as the carrier to embed messages into. Many different objects have been employed to embed messages into for example images, audio, and video as well as file structures, and html pages to name a few.

Stego-object: refers to the object which is carrying a hidden message. so given a cover object, and a messages the goal of the steganographer is to produce a stego object which would carry the message.

In a pure steganography framework, the technique for embedding the message is unknown to Wendy and shared as a secret between Client1 and Client2. However, it is generally considered that the algorithm in use is not secret but only the key used by the algorithm is kept as a secret between the two parties, this assumption is also known as Kerchoff 's principle in the field of cryptography. The secret key, for example, can be a password used to seed a pseudo-random number generator to select pixel locations in an image cover-object for embedding the secret message (possibly encrypted). Wendy has no knowledge about the secret key that Client1 and Client2 share, although she is aware of the algorithm that they could be employing for embedding messages.

Use case for Cryptography:

Encryption:

Decryption:

Stegnography Hiding Text:

Stegnography Extracting Text

Sequence Diagram for Cryptography:

Sequence Diagram for Stegnography:

Stegnography

server

Client1

Cryptography

Client2

The general methodology in developing a system is involved in different phases, which describe the system's life cycle model for developing software project. The concept includes not only forward motion but also have the possibility to return that is cycle back to an activity previously completed. This cycle back or feedback may occur as a result of the failure with the system to meet a performance objective or as a result of changes in redefinition of system activities. Like most systems, the life cycle of the computer based system also exhibits distinct phases.

Those are,

REQUIREMENT ANALYSIS PHASE

DESIGN PHASE

DEVELOPMENT PHASE

CODING PHASE

Technology Overview:

ADO.NET

=================================================

ADO.NET API:

------------

1) System.Data.OleDb

2) System.Data.SqlClient

3) System.Data

==================================================

1) OleDb:

-----------

--> To have a connection with OleDb databases

2) SqlClient:

--------------

--> To have a connection with SqlServer database

3) Data:

---------

--> To interact both OleDb and Sql Server db.

===================================================

1) Classes offerred by "OleDb" namespace

-------------------------------------------------

--> System.Data.OleDb.OleDbConnection

--> System.Data.OleDb.OleDbCommand

--> System.Data.OleDb.OleDbDataReader

--> System.Data.OleDb.OleDbParameter

-> System.Data.OleDb.OleDbDataAdapter

2) Classes offerred by "SqlClient" namespace

----------------------------------------------------

--> System.Data.SqlClient.SqlConnection

--> System.Data.SqlClient.SqlCommand

--> System.Data.SqlClient.SqlDataReader

--> System.Data.SqlClient.SqlParameter

-> System.Data.SqlClient.SqlDataAdapter

3) Classes offerred by "Data" namespace

----------------------------------------------

--> System.Data.DataSet

--> System.Data.DataTable

--> System.Data.DataRow

=================================================

Provider for oracle db

--------------------------

oraoledb.oracle.1

msdaora.1

=================================================

Connecting the App with Db

--------------------------------

API: System.Data.OleDb.OleDbConnection

Impl of connection:

-----------------------

--> Prepare the connection string

string cnstr = "provider=oraoledb.oracle.1;user id=scott;password=tiger;data

source=servername";

Note: Data source is optional for standalone systems.

--> Construct connection obj

OleDbConnection cn=new OleDbConnection(cnstr);

--> Open connection

cn.Open();

--> Impl logics (Query proc/non query)

--> Close the

cn.Close();

=====================================================

ADO.NET Activities

----------------------

a) Query processing

b) Non-Query processing

c) DDL operations

d) Stored Procedure handling

=====================================================

i) Query processing

----------------------

API:

-----

System.Data.OleDb.OleDbConnection

System.Data.OleDb.OleDbCommand

System.Data.OleDb.OleDbDataReader

a) OleDbConnection

-----------------------

To maintain connectivity with backend

b) OleDbCommand

---------------------

To pass a query stmt to backend, and execute it at backend.

c) OleDbDataReader

------------------------

buffer

====================================================

Impl logic

------------

--> Prepare the connection string

string cnstr="provider=oraoledb.oracle.1;user id=scott;password=tiger";

--> Construct connection obj

OleDbConnection cn = new OleDbConnection(cnstr);

--> Open the connection

cn.Open();

--> Prepare the query stmt

string sqlstr = "select * from tablename";

--> Construct OleDbCommand class obj.

OleDbCommand cmd = new OleDbCommand(sqlstr,cn);

--> Construct OleDbDataReader class obj.

OleDbDataReader dr;

--> Execute the command and store the data into the buffer

dr = cmd.ExecuteReader();

--> Impl logic on "dr" (buffer logic)

a) Multiple rows logic

while(dr.Read())

{

dr.GetValue(col index);

dr.GetValue(col index);

dr.GetValue(col index);

..............

}

b) Single row logic

if(dr.Read())

{

dr.GetValue(col index);

dr.GetValue(col index);

dr.GetValue(col index);

}

else

//no data

--> Close the buffer

dr.Close();

--> Close the connection

cn.Close();

=====================================================

Conditional Query Proc

i) With fixed value

string sqlstr="select * from tablename where colname=value";

string sqlstr="select * from tablename where colname='value'";

ii) With varied value

string sqlstr="select * from tablename where colname=" + variable;

string sqlstr="select * from tablename where colname=' " + variable + " ' ";

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.IO;

using data;

namespace datasecurity1

{

public partial class stego : Form

{

private FilePasswordPair[] keys = new FilePasswordPair[0];

private CarrierImage[] imagesHide = new CarrierImage[0];

private CarrierImage[] imagesExtract = new CarrierImage[0];

public stego()

{

InitializeComponent();

}

private void label4_Click(object sender, EventArgs e)

{

}

private void btnKeyFile_Click(object sender, EventArgs e)

{

KeyFilesDialog dlg = new KeyFilesDialog(keys);

if (dlg.ShowDialog(this) == DialogResult.OK)

{

keys = dlg.GetKeys();

switch (keys.Length)

{

case 0:

{

lblKeyFiles.Text = "No key files specified";

btnHide.Enabled = btnExtract.Enabled = false;

break;

}

case 1:

{

lblKeyFiles.Text = "1 key file specified";

btnHide.Enabled = (imagesHide.Length > 0);

btnExtract.Enabled = (imagesExtract.Length > 0);

break;

}

default:

{

lblKeyFiles.Text = keys.Length.ToString() + " key file specified";

btnHide.Enabled = (imagesHide.Length > 0);

btnExtract.Enabled = (imagesExtract.Length > 0);

break;

}

}

}

}

private void btnMessage_Click(object sender, EventArgs e)

{

String fileName = GetFileName(String.Empty);

if (fileName != null)

{

txtMessageFile.Text = fileName;

rdoMessageFile.Checked = true;

}

}

private void btnImageFile_Click(object sender, EventArgs e)

{

Label lblFeedback;

Button btnAction;

CarrierImage[] images;

ImageFilesDialog dlg;

if (sender == btnImageFile)

{

lblFeedback = lblImageFiles;

btnAction = btnHide;

dlg = new ImageFilesDialog(imagesHide, true);

}

else

{

lblFeedback = lblImageFilesExtract;

btnAction = btnExtract;

dlg = new ImageFilesDialog(imagesExtract, false);

}

if (dlg.ShowDialog(this) == DialogResult.OK)

{

if (sender == btnImageFile)

{

imagesHide = dlg.GetImages();

images = imagesHide;

}

else

{

imagesExtract = dlg.GetImages();

images = imagesExtract;

}

switch (images.Length)

{

case 0:

{

lblFeedback.Text = "No carrier files specified";

btnAction.Enabled = false;

break;

}

case 1:

{

lblFeedback.Text = "1 carrier file specified";

btnAction.Enabled = (keys.Length > 0);

break;

}

default:

{

lblFeedback.Text = images.Length.ToString() + " carrier file specified";

btnAction.Enabled = (keys.Length > 0);

break;

}

}

}

}

private void btnHide_Click(object sender, EventArgs e)

{

//get a stream for the message to hide

Stream messageStream = GetMessageStream();

if (messageStream.Length == 0)

{

MessageBox.Show("Please enter a message or select a file.");

txtMessageText.Focus();

}

else

{

this.Cursor = Cursors.WaitCursor;

try

{

//hide the message

CryptUtility.HideMessageInBitmap(messageStream, imagesHide, keys, chkSplitBytes.Checked);

}

catch (Exception ex)

{

MessageBox.Show(ex.Message + "\nStackTrace: " + ex.StackTrace, "Exception");

}

this.Cursor = Cursors.Default;

}

messageStream.Close();

}

private void btnExtractedMsgFile_Click(object sender, EventArgs e)

{

SaveFileDialog dlg = new SaveFileDialog();

if (dlg.ShowDialog() == DialogResult.OK)

{

txtExtractedMsgFile.Text = dlg.FileName;

}

}

private void btntImageFileExtract_Click(object sender, EventArgs e)

{

Label lblFeedback;

Button btnAction;

CarrierImage[] images;

ImageFilesDialog dlg;

if (sender == btnImageFile)

{

lblFeedback = lblImageFiles;

btnAction = btnHide;

dlg = new ImageFilesDialog(imagesHide, true);

}

else

{

lblFeedback = lblImageFilesExtract;

btnAction = btnExtract;

dlg = new ImageFilesDialog(imagesExtract, false);

}

if (dlg.ShowDialog(this) == DialogResult.OK)

{

if (sender == btnImageFile)

{

imagesHide = dlg.GetImages();

images = imagesHide;

}

else

{

imagesExtract = dlg.GetImages();

images = imagesExtract;

}

switch (images.Length)

{

case 0:

{

lblFeedback.Text = "No carrier files specified";

btnAction.Enabled = false;

break;

}

case 1:

{

lblFeedback.Text = "1 carrier file specified";

btnAction.Enabled = (keys.Length > 0);

break;

}

default:

{

lblFeedback.Text = images.Length.ToString() + " carrier file specified";

btnAction.Enabled = (keys.Length > 0);

break;

}

}

}

}

private void btnExtract_Click(object sender, EventArgs e)

{

//empty stream for the extracted message

Stream messageStream = new MemoryStream();

this.Cursor = Cursors.WaitCursor;

try

{

//extract the hidden message from the bitmap

CryptUtility.ExtractMessageFromBitmap(imagesExtract, keys, ref messageStream, chkSplitBytes.Checked);

//save the message, if a filename is available

if (txtExtractedMsgFile.Text.Length > 0)

{

messageStream.Seek(0, SeekOrigin.Begin);

FileStream fs = new FileStream(txtExtractedMsgFile.Text, FileMode.Create);

byte[] streamContent = new Byte[messageStream.Length];

messageStream.Read(streamContent, 0, streamContent.Length);

fs.Write(streamContent, 0, streamContent.Length);

}

//display the message - displays chaos, if it's no unicode text

messageStream.Seek(0, SeekOrigin.Begin);

StreamReader reader = new StreamReader(messageStream, UnicodeEncoding.Unicode);

String readerContent = reader.ReadToEnd();

if (readerContent.Length > txtExtractedMsgText.MaxLength)

{

readerContent = readerContent.Substring(0, txtExtractedMsgText.MaxLength);

}

txtExtractedMsgText.Text = readerContent;

}

catch (Exception ex)

{

MessageBox.Show(ex.Message + "\nStackTrace: " + ex.StackTrace, "Exception");

}

this.Cursor = Cursors.Default;

//close the stream

messageStream.Close();

}

private Stream GetMessageStream()

{

Stream messageStream;

if (rdoMessageText.Checked)

{

byte[] messageBytes = UnicodeEncoding.Unicode.GetBytes(txtMessageText.Text);

messageStream = new MemoryStream(messageBytes);

}

else

{

messageStream = new FileStream(txtMessageFile.Text, FileMode.Open, FileAccess.Read);

}

return messageStream;

}

private String GetFileName(String filter)

{

OpenFileDialog dlg = new OpenFileDialog();

dlg.Multiselect = false;

if (filter.Length > 0) { dlg.Filter = filter; }

if (dlg.ShowDialog(this) != DialogResult.Cancel)

{

return dlg.FileName;

}

else

{

return null;

}

}

private void txtMessageText_Enter(object sender, EventArgs e)

{

rdoMessageText.Checked = true;

}

private void rdoMessage_Click(object sender, EventArgs e)

{

txtMessageFile.Enabled = rdoMessageFile.Checked;

txtMessageText.Enabled = rdoMessageText.Checked;

}

private void txtMessageFile_Enter(object sender, EventArgs e)

{

rdoMessageFile.Checked = true;

}

}

}

TESTING PHASE:

1.2.1. REQUIREMENT ANALYSIS PHASE:

This phase includes the identification of the problem, in order to identify the problem, we have to know information about the problem, the purpose of the evaluation for problem to be known. We have to clearly know about the client's requirements and the objectives of the project.

SYSTEM ANALYSIS PHASE:

Feasibility analysis involves the benefits of various approaches and the determination of the alternative approaches all through methods like questionnaires and interviews etc., different data about the project is collected and the data through out the project is represented in the form of UML Diagrams.

1.2.2 DESIGN PHASE:

S/W design is a process through which the requirements are translated into a representation of a s/w. One of the software requirements have been analyzed and specified, the s/w design involves three technical activities: design, coding generation and testing. The design of the system is in modular form i.e., the s/w is logically partitioned into components that perform specific functions and sub functions. The design phase leads to modules that exhibit independent functional characteristics. It even leads to interfaces that reduce the complexity of the connections between modules and with the external environment. The design phase is of main importance because in this activity, decisions ultimately affect the success of s/w implementation and maintenance.

1.2.3DEVELOPMENT PHASE:

The development phase includes choosing of a suitable s/w to solve the particular problem given. The various facilities and the sophistication in the selected s/w give a better development of the problem.

1.2.4CODING PHASE:

The coding phase is for translating the design of the system produced during the design phase into code in a given programming language, which can be executed by a computer and which performs the computation specified by the design.

1.2.5TESTING PHASE:

Testing is done in various ways such as testing the algorithm, programming code, sample data debugging is also one of following the above testing.

Code:

"Digital signatures are calculated when the data is being encrypted using what the Crypto API documentation refers to as a hash. I maintain the hash object internally before doing any encryption or decryption. Once the encryption/decryption is complete and the digital signature is calculated, ICrypto provides access to it via the property named DigitalSignature."

"The DigitalSignature is stored internally as a BLOB. However, when a client requests the Digital Signature ICrypto passes it out as a Base64 encoded string (to ease use for scripting clients). Scripting clients typically have a difficult time with binary data (sometimes handled as a SAFEARRAY of variants). Typically, you would perform the encryption on a file or memory, then immediate get the Digital Signature property from ICrypto and store it. Later when you decrypt the file or memory you would call VerifyDigitalSignature to determine if the digital signature matches (if the contents of the file or memory has changed since you encrypted)."

Cryptography Classes:

CryptCreateHash

CryptEncrypt

CryptDestroyKey

CryptDestroyHash

CryptDecrypt

CryptImportKey

CryptReleaseContext

CryptAcquireContext

CryptGetUserKey

CryptGenKey

CryptExportKey

CryptSignHash

Screens Shots:

COMPARISON with existing systems

CONCLUSION AND FUTURE WORK

Future Work:

The future work is to implement Digital signatures which require another type of cryptographic primitive, known as cryptographic hash algorithms. The two most commonly used cryptographic hash algorithms are SHA-1 and MD5. SHA-1 produces a 160-bit hash, and MD5 produces a 128-bit hash. For even greater security, SHA-256, SHA-384, and SHA-512 produce hash values with 256, 384, and 512 bits, respectively. All of these hash algorithms are supported by .NET out of the box. Since these hash algorithms are a prerequisite for working with digital signatures, we look at them first. Then, once we have seen how to build programs that make use of digital signatures, we look at how to generate, store, import, and export keys.