You are on page 1of 425

Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
A PROJECT REPORT ON
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
***************Title of the Project***************

Journal: IEEE C
Submitted to ******************** University for the partial fulfillment of the
Requirement for the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Award of Degree for

***********Course Name*************

Journal: IEEE C
Done By
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Mr. /Miss *********************************************

Journal: IEEE C
**************Institute of Management and Computer Science
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
CERTIFICATE
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
This is to certify that Mr., /Miss ****************** bearing Roll

No. ********************** have developed software project

Titled **************** For ********************* Software


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Solutions as Partial fulfillment for the award of the Degree of

**************

Journal: IEEE C
Head of the Department Principal
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
******College Name******

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
External

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
ACKNOWLEDGEMENT

At every outset I express my gratitude to almighty lord for showering his grace and
blessings upon me to complete this project.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Although our name appears on the cover of this book, many people had contributed
in some form or the other form to this project Development. We could not done this project
without the assistance or support of each of the following we thank you all.

Journal: IEEE C
I wish to place on my record my deep sense of gratitude to my project guide, Mr.
******, ***** Software Solutions, for his constant motivation and valuable help
through the project work. Express my gratitude to Mr. ******, Director of *******
Institute of Management & Computer Sciences for his valuable suggestions and
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
advices throughout the ***** course. I also extend my thanks to other Faculties for their
Cooperation during my Course.

Journal: IEEE C
Finally I would like to thank my friends for their cooperation to complete this project.

*******Your Name*********
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
ABSTRACT
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
In this project, you will develop a secure chat program that lets users send short
messages to each other via an encrypted, authenticated channel. The project is deliberately
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
open-ended to give you the opportunity to develop the features you find most compelling.
For example, you may develop a chat program with a GUI (in DOT NET), as you see fit. You
may include a rendezvous server in your chat system . There are also several optional

Journal: IEEE C
security extensions to the base project.

Connection Initiation. If Alice and Bob are both running your chat application, then
Alice can use her program to initiate a connection to Bob. If you have a rendezvous server,
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
then she may just click on a name in a list, or you may have Alice specify Bob's current IP
address or hostname, e.g. GM@gre.ac.ck

Journal: IEEE C
Basic Security Handshake. Once Alice and Bob's chat applications are connected via
a TCP connection, they should perform a Diffie-Hellman key agreement to establish a
shared secret key, k. The exact format of the messages exchanged in this step is up to you.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Key Setup. The actual chat messages should be encrypted using an encryption
algorithm(RSA), mode-of-operation, and algorithm of your choice. You will have to derive
encryption keys, etc. from the shared secret k. Chatting. Once the key setup is complete,

Journal: IEEE C
users can exchange chat messages, and the program will transmit these over the encrypted
channel.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Preface

Table of Contents

INTRODUCTION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INTRODUCTION TO PROJECT

ORGANIZATION PROFILE

Journal: IEEE C
PURPOSE OF THE SYSTEM

PROBLEMS IN EXISTING SYSTEM

SOLUTION OF THESE PROBLEMS


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SYSTEM ANALYSIS

INTRODUCTION

Journal: IEEE C
STUDY OF THE SYSTEM

HARDWARE AND SOFTWARE REQUIRMENTS

PROPOSED SYSTEM
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INPUT AND OUTPUT

PROCESS MODULES USED WITH JUSTIFICATION

Journal: IEEE C
FEASIBILITY REPORT

TECHNICAL FEASIBILITY

OPERATIONAL FEASIBILITY
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
ECONOMICAL FEASIBILTY

SOFTWARE REQUIREMENT SPECIFICATIONS

Journal: IEEE C
FUNCTIONAL REQUIREMENTS

PERFORMANCE REQUIREMENTS

SELECTED SOFTWARE
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INTRODUCTION TO .NET FRAME WORK

VC#.NET

Journal: IEEE C
SYSTEM DESIGN

INTRODUCTION

SYSTEM WORK FLOW


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
UML DIAGRAMS

OUTPUT SCREENS

Journal: IEEE C
SYSTEM TESTING AND IMPLEMENTATION

INTRODUCTION

STRATEGIC APPROACH OF SOFTWARE TESTING


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
UNIT TESTING

SYSTEM SECURITY

Journal: IEEE C
INTRODUCTION

SECURITY IN SOFTWARE

CONCLUSION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
FUTURE ENHANCEMENTS

BIBLOGRAPHY

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
INTRODUCTION TO PROJECT
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
From the days of development of public-key cryptography, the RSA cryptography has

Journal: IEEE C
gained utmost popularity. It is believed that there is certain difficulty encountered in
computing eth roots modulo N, where n is the product of two large unknown primes.Inspite
of this difficulty, this method is widely secure for large N.RSA can be processed by
factorization of N.But the security of RSA is often based on the integer factorization
problem, which is and continues to be a well-studied problem. At present, for the RSA to be
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
considered secure, the suggested bit length of N is at least 1024.Using the popular factoring
algorithms, the expected workload of factoring a 1024-bit modulus is 2 powers 80 which are
currently believed to be impracticable. A workload of 280 is the current cryptographic

Journal: IEEE C
benchmark used for security.

The foremost reason for the RSA to be popular lies in its simplicity. Only one modular
exponentiation is enough for both encryption and decryption. However, computing an
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
exponentiation modulo N is very costly because the RSA modules are much larger than
other module of public key cryptosystems such as those based on elliptic curves. The size of
the key pairs is the other main limitation in using RSA. For instance, the RSA key size must

Journal: IEEE C
be much larger than that of elliptic curve based cryptosystems to offer the same level of
security as a given symmetric key cryptosystem. Furthermore, as the security level is
increased the RSA key size grows at a much faster rate than the keys in an elliptic curve
cryptosystem.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In this project, you will develop a secure chat program that lets users send short

Journal: IEEE C
messages to each other via an encrypted, authenticated channel. The project is deliberately
open-ended to give you the opportunity to develop the features you find most compelling.
For example, you may develop a chat program with a GUI (in DOT NET), as you see fit. You
may include a rendezvous server in your chat system . There are also several optional
security extensions to the base project.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Connection Initiation If Alice and Bob are both running your chat application, then
Alice can use her program to initiate a connection to Bob. If you have a rendezvous server,
then she may just click on a name in a list, or you may have Alice specify Bob's current IP

Journal: IEEE C
address or hostname, e.g. GM@gre.ac.ck Basic Security Handshake. Once Alice and Bob's
chat applications are connected via a TCP connection, they should perform a Diffie-Hellman
key agreement to establish a shared secret key, k. The exact format of the messages
exchanged in this step is up to you. Key Setup. The actual chat messages should be
encrypted using an encryption algorithm(RSA), mode-of-operation, and algorithm of your
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
choice. You will have to derive encryption keys, etc. from the shared secret k. Chatting.
Once the key setup is complete, users can exchange chat messages, and the program will
transmit these over the encrypted channel.

Journal: IEEE C
ORGANIZATION PROFILE

The IT solution provider for a dynamic environment where business and technology
strategies integrate is called as Software Solutions. Their approach focuses on new ways of
business combining IT innovation and adoption at the same time leveraging an
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
organization’s current IT assets. Their work with large global corporations and new
products or services and to implement prudent business and technology strategies in
today’s environment.

Journal: IEEE C
Xxxxxxx’s RANGE OF EXPERTISE INCLUDES:

Software Development Services

Engineering Services
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Systems Integration

Customer Relationship Management

Journal: IEEE C
Product Development

Electronic Commerce

Consulting
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
IT Outsourcing

In Order to accomplish two broad targets, we apply technology with creativity and

Journal: IEEE C
responsibility:

Effectively address the business issues our customers face today.

Generate new opportunities that will help them stay ahead in the future.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
THIS APPROACH RESTS ON:

A strategy where we architect, integrate and manage technology services and

Journal: IEEE C
solutions - we call it AIM for success.

A robust offshore development methodology and reduced demand on customer


resources.

A focus on the use of reusable frameworks to provide cost and times benefits.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
They combine the best people, processes and technology to achieve excellent results
- consistency. We offer customers the advantages of:

Journal: IEEE C
SPEED:

They understand the importance of timing, of getting there before the competition.
A rich portfolio of reusable, modular frameworks helps jump-start projects. Tried and
tested methodology ensures that we follow a predictable, low - risk path to achieve results.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Our track record is testimony to complex projects delivered within and even before
schedule.

Journal: IEEE C
EXPERTISE:

Our teams combine cutting edge technology skills with rich domain expertise. What’s
equally important - they share a strong customer orientation that means they actually start
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
by listening to the customer. They’re focused on coming up with solutions that serve
customer requirements today and anticipate future needs.

Journal: IEEE C
A FULL SERVICE PORTFOLIO:

They offer customers the advantage of being able to Architect, integrate and manage
technology services. This means that they can rely on one, fully accountable source instead
of trying to integrate disparate multi vendor solutions.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SERVICES:

Journal: IEEE C
Xxx is providing its services to companies which are in the field of production, quality
control etc with their rich expertise and experience and information technology they are in
best position to provide software solutions to distinct business requirements.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
PURPOSE OF THE PROJECT
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
RSA’s information-centric approach to security protects the integrity
confidentiality of information throughout its lifecycle – no matter where it moves, who
accesses it or how it is used. RSA offers industry-leading solutions in identity assurance &
and

Journal: IEEE C
access control, encryption & key management, compliance & security information
management and fraud protection.

RSA is essentially two distinct instances of RSA that share the same public and
private exponents.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Reduce the storage space of 2 RSA keys. In particular, focus on the situation of
using two RSA systems simultaneously, such as blind signature and authentication/secrecy

Journal: IEEE C
By using this system we can communicate with the computers across the network with
extra effort.

PROBLEM IN EXISTING SYSTEM

I f you want to communicate in LAN have to use 3ed party tool.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
For this the company or any organization has to spend money for that.

This server has to bare lot of burden. it will effect on other processes

Journal: IEEE C
In Existing System while communicating users there is no handshaking.

In existing System total text goes in plain text.

It leads to Security lose.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In this essentially Has only single key share the same public and private exponents.

You can communicate any system within the network

Journal: IEEE C
You can also chat with specified system by giving Ip address

We also have a provision to ping the selected node.

Internally it use shell command


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Memory issue is very high

Cross threading issue will be here. It will to communicate between users depends on

Journal: IEEE C
operating System

SOLUTION OF THESE PROBLEMS


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In order to overcome these drawbacks, many researchers have studied variants of
RSA which either reduce the computational costs or reduce the key storage requirements.

Journal: IEEE C
The problem which is faced in the existing system is that information cannot
be transferred from one place to another with high security which could be easily accessed
by any one. The solution to the problem using RSA cryptopad is that the readable language
will get convert to non-readable Language. . Ensuring that no one can read the message
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
except the intended receiver. So this process becomes high secure with security purposes
for militaries and government.

Journal: IEEE C
When public-key cryptography was first developed, the RSA cryptosystem has
become the most popular cryptosystems in the world.

One of the reasons that RSA is popular is its simplicity.

Both encryption and decryption requires only one modular exponentiation.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In addition the security level is increased the RSA key size grows at a much faster
rate than the keys in an elliptic curve cryptosystem.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
SYSTEM ANALYSIS
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
2.1 INTRODUCTION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The dependence of organizations in both public and private sectors on electronic data

Journal: IEEE C
processing has become dominant. Providing protection to this important data is of utmost
concern to the organizations and cryptography is one of the primary ways to achieve this.
Public Key Cryptography is used to protect digital data going through an insecure channel
from one place to another. RSA algorithm is extensively used in the popular
implementations of Public Key Infrastructures. This paper focuses on an effectuation of RSA
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
algorithm using gmp library from GNU. Examination of changes in the performance of the
algorithm by changing the number of characters that we are encoding is also done.(we
termed this procedure as bitwise incremental RSA).

Journal: IEEE C
Since data communication is an important characteristic of our living, protection of
data from misuse is requisite. A cryptosystem involves a pair of data transformations called
encryption and decryption. Encryption is applied to the plain text i.e. the data to be
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
communicated to produce cipher text i.e. encrypted data using encryption key. Decryption
uses the decryption key to convert cipher text to plain text i.e. the original data.
Cryptography is said to be symmetric if the encryption key and the decryption key are the

Journal: IEEE C
same or one can be derived from the other. This type of coding system can be easily broken
if the key used to encrypt or decrypt can be found. In order to enhance the protection
mechanism, Public Key Cryptosystem was introduced in 1976 by Whitfield Diffe and Martin
Hellman of Stanford University. This mechanism makes use of a pair of related keys one for
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
encryption and other for decryption. Former key, known as private key, is kept secret and
other one known as public key is revealed.

Journal: IEEE C
The public key is used to encrypt the message and decryption can only be done
through the private key. So, the encrypted message cannot be decrypted by anyone who
knows the public key. Thus ensuring the secure communication. RSA is the most prominent
public key algorithm. It depends on the issue of factoring in mathematics that shows that
given a very large number it is quite unattainable in today’s aspect to find two prime
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
factors. The large the number the less the chances for finding the factors of the number. As
we increase the number the possibility for factoring the number decreases. So, we need
very large numbers for a good Public Key Coding system. Numbers of varying precision can

Journal: IEEE C
be manipulated by a library named as GMP. We have used this library to implement RSA
algorithm. This paper signifies that the time to decrypt and the efficiency of coding system
depends to a large extent on the number of bits encrypted together using a public key.

REVIEW OF EXISTING LITERATURE


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The credentials validation rules and their implications.

Calculating inverse of a shared secret modulus, which involves mathematical

Journal: IEEE C
formulation of RSA.

Employing hash function in the field of cryptography.

The potential of RSA algorithm is discussed.

A detailed inspection of fast exponentiation method is done.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
A close examination of Coding system for sensor networks is done.

Security evidence for various digital signature schemes is provided.

Journal: IEEE C
Multiparty credentials validation services and key agreement rules.

Various fast RSA implementations are formulated.

RSA is implemented in an efficient way.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The basic RSA algorithms and other cryptography related issues are formulated.

SCOPE OF PRESENT WORK

Journal: IEEE C
Our work in this paper is concentrated primarily on the implementation of RSA. In
order to enhance the efficiency of implementation, GMP library is employed. We have
explored the behavior and possibility of the algorithm with the change of various input
parameters. A system with suitable user interface is prepared based on the analysis.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
REVIEW OF THE RSA ALGORITHM

Introduction

Journal: IEEE C
The RSA coding system is based on the dramatic difference between the ease of
finding large primes and the difficulty of factoring the product of two large prime numbers
(the integer factorization problem). A basic idea of the RSA algorithm for encrypting and
decrypting messages is given here.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Key generation

For the RSA coding system, generation of two large prime numbers, 'p' and 'q' of
same size in bits is initiated first. Later, calculate 'n' where n = pq, and 'x' such that, x = (p
-1)(q-1). We select a small odd integer smaller than x, and relatively prime to it i.e.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
gcd(e,x) = 1. At last we find out the unique multiplicative inverse of e modulo x, and name
it 'd'. Hence, the public key is given by the ordered pair (e,n) and the private key is
indicated as d.

Journal: IEEE C
RSA Encryption

For instance assume Tom wishes to send a message say ‘m’ to Jerry. To encrypt the
‘T’ using the RSA encryption methodology, Tom must obtain Jerry's public key ordered pair
(e,n). As a result, the message 'm' must be represented as an integer in the interval [0,n-
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
1]. For the purpose of encryption it, Tom simply calculates the number 'c' where c = m ^ e
mod n. Tom sends the encoded text c to Jerry.

Journal: IEEE C
RSA Decryption

To decode the encoded text c, Jerry needs to use her own private key d and the
modulus n. Calculating the value of c ^ d mod n provides the decoded message (m). And
such texts also offer considerable insights into the various security issues related to the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
methodology. Our foremost concern is on a simple yet flexible implementation of the RSA
coding system that may be of practical importance.

Journal: IEEE C
OUR IMPLEMENTATION OF THE RSA ALGORITHM

Introduction

We have effectuated the RSA coding system in two forms: a console way of
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
accomplishing and a graphical user interface way of accomplishing which is user
adoptable. We concentrate on the console mode of accomplishment here. The console
application employs a 1024 bit modulus RSA implementation, which is sufficient for non-

Journal: IEEE C
critical applications. A slight change in source code achieves higher bit-capabilities with a
minor hit in performance.

Handling large integers and the GMP library

Any practical implementation of the RSA coding system would involve dealing
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
with large integers. A way to overcome this would be to write down a library on our
own to handle all the functions. Hence this results in avoiding our dependence on the third-
party library. But there are limitations. First, the speed of our implementation would not

Journal: IEEE C
match the speed of the libraries available. Secondly, it does not provide as much security as
open-source libraries do. Among the many available libraries, we restrict the choice to three
libraries: the BigInteger library (Java), the GNU MP Arbitrary Precision library (C/C++), and
the OpenSSL crypto library (C/C++). The GMP library best suits our needs. It aims at
providing the fastest possible arithmetic for applications that need a higher precision than
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
the ones directly supported under C/C++ by utilizing highly optimized assembly code. The
GMP library is a cross-platform library, implying that our application should work across
platforms with minimal modifications. The facilities provided by this library are utilized to its

Journal: IEEE C
best in the application. The key generation, encoding and decoding procedures all made use
of the integer handling functions provided by this library.

Timings for 1024-bit RSA (without compiler optimization)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The Encryption time and Decryption time which are tabulated below are recorded on
a 733 MHz Pentium Class processor by making use of time measurement functions offered
by the C library on a GNU/Linux platform (kernel 2.4.20). Key generation: 0.465994

Journal: IEEE C
seconds. The following times were recorded by considering a file with exactly 10,000
characters:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
(All times per 10,000 characters)

Timings for RSA for varying bit strengths

Journal: IEEE C
By changing the constant representing the bit-strength, RSA moduli of various sizes
may be used quite easily. The following times were recorded using the same input file

(10,000 characters):

Bit Strength Chars at once Key Generation Encryption Decryption


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The fastest one is the 512-bit RSA where as the slowest one is the 2048-bit RSA.

But in terms of security, 512-bit RSA is not good. 2048-bit RSA provides utmost

Journal: IEEE C
resistance to attacks. In the present scenario, 1024-bit modulus maintains a good balance
in terms of speed and security.

2.3 ENVIRONMENT
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Implementation Environment

Hardware Environment:

Journal: IEEE C
Server Side: Pentium Processor PC

128 MB RAM

10 GB HDD
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Client Side: Pentium processor PC

64 MB RAM

Journal: IEEE C
3 GB HDD

Software Environment:

Server Side
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Operating System: Windows XP

Database :

Journal: IEEE C
Client Side

Operating System: Windows XP

Software : .NET FRAMEWORK 3.5


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
USER CHARACTERISTICS

Journal: IEEE C
The user should have the following knowledge to operate the application.

Knowledge of web browser

Knowledge of navigating through web sites.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Knowledge of chatting.

Knowledge of opening and reading messages.

Journal: IEEE C
2.4 PROPOSED SYSTEM

The proposed system will overcome all the drawbacks of the existing system.
In the existing system it had only few options for project execution notepad. But in the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
proposed system few more motions were added. In particularly for the encryption and
decryption purposes there is a new method of key pairs of public and private keys were
created. For the encryption method the public key is used and for the decryption process

Journal: IEEE C
the intended receiver used the private key to receive the information.

2.5 INPUT AND OUTPUT

The inputs and outputs that are provided for the system are follows:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Inputs:

For the process of input encryption method, IP address and port number are given as

Journal: IEEE C
inputs. The message to be sent is in the form of a string is also an input for the system.The
request is then sent to the server and the RSA algorithm then generates public and private
keys is done. Then string to be encrypted is done with the public key.

Outputs:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
After the encryption is done the encrypted string occurs in the text box which will be
received by the intended receiver and decryption is done with the private key by the
intended receiver

Journal: IEEE C
2.6 PROCESS MODEL USED WITH JUSTIFICATION

Modules

Login module
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Register module

Sharing Key module

Journal: IEEE C
Encrypt module

Decrypt module

Login module:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In this module user has to his give system IP, sysname to the login form. It check with the
OS. If it is correct it redirect to server/client form.

Register module:

Journal: IEEE C
Any user wants to with his concern his/her give credential to register

Sharing key module:


in this module the system will create two keys for sharing in a network between
communicate users. It will create based on RSA algorithms
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Encrypt Module:

In this, using key the whole cipher text will be converted in user understandable format.

Journal: IEEE C
Decryptmodule:
In this using keys the plain text will converted in cipher format. It can’t be understood by
the hacker.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Encryption Module
In the encryption process the plain text is entered and key pair is generated. The public
key is given for encrypting the data so that no one can read the message except the

Journal: IEEE C
intended receiver. Assuring the receiver that the received message has not been altered in
any way from the original.
Decryption Module
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The decryption module also uses multiple algorithms for decryption of data
from the encrypted state. It uses the key fixed by the encryption module to retrieve
the encrypted data messages to the readable format.

Journal: IEEE C
The decryption process uses the private key for the conversion of the encrypted data
to the readable decrypted data.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Feasibility Report
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Preliminary investigation examine project feasibility, the likelihood the system will be
useful to the organization. The main objective of the feasibility study is to test the Technical,
Operational and Economical feasibility for adding new modules and debugging old running
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
system. All system is feasible if they are unlimited resources and infinite time. There are aspects
in the feasibility study portion of the preliminary investigation:
Technical Feasibility

Journal: IEEE C
Operational Feasibility
Economical Feasibility

3.1. TECHNICAL FEASIBILITY


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The technical issue usually raised during the feasibility stage of the investigation includes
the following:
Does the necessary technology exist to do what is suggested?

Journal: IEEE C
Do the proposed equipments have the technical capacity to hold the data required to use
the new system?
Will the proposed system provide adequate response to inquiries, regardless of the
number or location of users?
Can the system be upgraded if developed?
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Are there technical guarantees of accuracy, reliability, ease of access and data security?
Earlier no system existed to cater to the needs of ‘Secure Infrastructure Implementation
System’. The current system developed is technically feasible. It is a web based user interface for

Journal: IEEE C
audit workflow at NIC-CSD. Thus it provides an easy access to the users. The database’s
purpose is to create, establish and maintain a workflow among various entities in order to
facilitate all concerned users in their various capacities or roles. Permission to the users would be
granted based on the roles specified. Therefore, it provides the technical guarantee of
accuracy, reliability and security. The software and hard requirements for the development of
this project are not many and are already available in-house at NIC or are available as free as
open source. The work for the project is done with the current equipment and existing software
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
technology. Necessary bandwidth exists for providing a fast feedback to the users irrespective of
the number of users using the system.
3.2. OPERATIONAL FEASIBILITY

Journal: IEEE C
Proposed projects are beneficial only if they can be turned out into information system.
That will meet the organization’s operating requirements. Operational feasibility aspects of the
project are to be taken as an important part of the project implementation. Some of the important
issues raised are to test the operational feasibility of a project includes the following: -
Is there sufficient support for the management from the users?
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Will the system be used and work properly if it is being developed and implemented?
Will there be any resistance from the user that will undermine the possible application
benefits?

Journal: IEEE C
This system is targeted to be in accordance with the above-mentioned issues. Beforehand,
the management issues and user requirements have been taken into consideration. So there is no
question of resistance from the users that can undermine the possible application benefits.
The well-planned design would ensure the optimal utilization of the computer resources
and would help in the improvement of performance status.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
3.3. ECONOMICAL FEASIBILITY
A system can be developed technically and that will be used if installed must still be a
good investment for the organization. In the economical feasibility, the development cost in

Journal: IEEE C
creating the system is evaluated against the ultimate benefit derived from the new systems.
Financial benefits must equal or exceed the costs.
The system is economically feasible. It does not require any addition hardware or
software. Since the interface for this system is developed using the existing resources and
technologies available at NIC, There is nominal expenditure and economical feasibility for
certain.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SOFTWARE REQUIREMENT SPECIFICATION

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
INTRODUCTION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Purpose: The main purpose for preparing this document is to give a general insight
into the analysis and requirements of the existing system or situation and for determining
the operating characteristics of the system.

Journal: IEEE C
Scope: This Document plays a vital role in the development life cycle (SDLC) and it
describes the complete requirement of the system. It is meant for use by the developers
and will be the basic during testing phase. Any changes made to the requirements in the
future will have to go through formal change approval process.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
DEVELOPERS RESPONSIBILITIES OVERVIEW:

The developer is responsible for:

Journal: IEEE C
Developing the system, which meets the SRS and solving all the requirements of the
system?

Demonstrating the system and installing the system at client's location after the
acceptance testing is successful.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Submitting the required user manual describing the system interfaces to work on it
and also the documents of the system.

Journal: IEEE C
Conducting any user training that might be needed for using the system.

Maintaining the system for a period of one year after installation.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
4.1. FUNCTIONAL REQUIREMENTS
OUTPUT DESIGN

Journal: IEEE C
Outputs from computer systems are required primarily to communicate the
results of processing to users. They are also used to provides a permanent copy of the
results for later consultation. The various types of outputs in general are:

External Outputs, whose destination is outside the organization.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Internal Outputs whose destination is within organization and they are the

User’s main interface with the computer.

Journal: IEEE C
Operational outputs whose use is purely within the computer department.

Interface outputs, which involve the user in communicating directly.

OUTPUT DEFINITION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The outputs should be defined in terms of the
following points:

Journal: IEEE C
Type of the output

Content of the output

Format of the output


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Location of the output

Frequency of the output

Journal: IEEE C
Volume of the output

Sequence of the output

It is not always desirable to print or display data as it is held on a computer. It


should be decided as which form of the output is the most suitable.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INPUT DESIGN

Input design is a part of overall system design. The main objective during

Journal: IEEE C
the input design is as given below:

To produce a cost-effective method of input.

To achieve the highest possible level of accuracy.

To ensure that the input is acceptable and understood by the user.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INPUT STAGES:

The main input stages can be listed as below:

Journal: IEEE C
Data recording

Data transcription

Data conversion
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Data verification

Data control

Journal: IEEE C
Data transmission

Data validation

Data correction
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INPUT TYPES:

Journal: IEEE C
It is necessary to determine the various types of inputs. Inputs can be categorized
as follows:

External inputs, which are prime inputs for the system.

Internal inputs, which are user communications with the system.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Operational, which are computer department’s communications to the system?

Interactive, which are inputs entered during a dialogue.

Journal: IEEE C
INPUT MEDIA:

At this stage choice has to be made about the input media. To conclude about the
input media consideration has to be given to;

Type of input
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Flexibility of format

Speed

Journal: IEEE C
Accuracy

Verification methods

Rejection rates
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Ease of correction

Storage and handling requirements

Journal: IEEE C
Security

Easy to use

Portability
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Keeping in view the above description of the input types and input media, it can be
said that most of the inputs are of the form of internal and interactive. As

Journal: IEEE C
Input data is to be the directly keyed in by the user, the keyboard can be considered
to be the most suitable input device.

ERROR AVOIDANCE
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
At this stage care is to be taken to ensure that input data remains accurate form the
stage at which it is recorded up to the stage in which the data is accepted by the system.
This can be achieved only by means of careful control each time the data is handled.

Journal: IEEE C
ERROR DETECTION

Even though every effort is make to avoid the occurrence of errors, still a small
proportion of errors is always likely to occur, these types of errors can be discovered by
using validations to check the input data.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
DATA VALIDATION

Procedures are designed to detect errors in data at a lower level of detail. Data

Journal: IEEE C
validations have been included in the system in almost every area where there is a
possibility for the user to commit errors. The system will not accept invalid data. Whenever
an invalid data is keyed in, the system immediately prompts the user and the user has to
again key in the data and the system will accept the data only if the data is correct.
Validations have been included where necessary.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The system is designed to be a user friendly one. In other words the system has
been designed to communicate effectively with the user.
with popup menus.
The system has been designed

Journal: IEEE C
USER INTERFACE DESIGN

It is essential to consult the system users and discuss their needs while designing
the user interface:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
USER INTERFACE SYSTEMS CAN BE BROADLY CLASIFIED AS:

User initiated interface the user is in charge, controlling the progress of the

Journal: IEEE C
user/computer dialogue. In the computer-initiated interface, the computer selects the next
stage in the interaction.

Computer initiated interfaces


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In the computer initiated interfaces the computer guides the progress of the
user/computer dialogue. Information is displayed and the user response of the computer
takes action or displays further information.

Journal: IEEE C
USER_INITIATED INTERGFACES

User initiated interfaces fall into tow approximate classes:


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Command driven interfaces: In this type of interface the user inputs commands or
queries which are interpreted by the computer.

Journal: IEEE C
Forms oriented interface: The user calls up an image of the form to his/her screen
and fills in the form. The forms oriented interface is chosen because it is the best choice.

COMPUTER-INITIATED INTERFACES

The following computer – initiated interfaces were used:


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The menu system for the user is presented with a list of alternatives and the user
chooses one; of alternatives.

Journal: IEEE C
Questions – answer type dialog system where the computer asks question and takes
action based on the basis of the users reply.

Right from the start the system is going to be menu driven, the opening menu
displays the available options. Choosing one option gives another popup menu with more
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
options. In this way every option leads the users to data entry form where the user can key
in the data.

Journal: IEEE C
ERROR MESSAGE DESIGN:

The design of error messages is an important part of the user interface design. As
user is bound to commit some errors or other while designing a system the system should
be designed to be helpful by providing the user with information regarding the error he/she
has committed.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
This application must be able to produce output at different modules for different inputs.
4.2. PERFORMANCE REQUIREMENTS

Journal: IEEE C
Performance is measured in terms of the output provided by the application.

Requirement specification plays an important part in the analysis of a system. Only


when the requirement specifications are properly given, it is possible to design a system,
which will fit into required environment. It rests largely in the part of the users of the
existing system to give the requirement specifications because they are the people who
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
finally use the system. This is because the requirements have to be known during the initial
stages so that the system can be designed according to those requirements. It is very
difficult to change the system once it has been designed and on the other hand designing a

Journal: IEEE C
system, which does not cater to the requirements of the user, is of no use.

The requirement specification for any system can be broadly stated as given below:

The system should be able to interface with the existing system


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The system should be accurate

The system should be better than the existing system

Journal: IEEE C
The existing system is completely dependent on the user to perform all the duties.

SELECTED SOFTWARE

5.1 INTRODUCTION TO .NET FRAMEWORK


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The Microsoft .NET Framework is a software technology that is available with several
Microsoft Windows operating systems. It includes a large library of pre-coded solutions to
common programming problems and a virtual machine that manages the execution of programs
written specifically for the framework. The .NET Framework is a key Microsoft offering and is

Journal: IEEE C
intended to be used by most new applications created for the Windows platform.

The pre-coded solutions that form the framework's Base Class Library cover a large
range of programming needs in a number of areas, including user interface, data access, database
connectivity, cryptography, web application development, numeric algorithms, and network
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
communications. The class library is used by programmers, who combine it with their own code
to produce applications.

Programs written for the .NET Framework execute in a software environment that

Journal: IEEE C
manages the program's runtime requirements. Also part of the .NET Framework, this runtime
environment is known as the Common Language Runtime (CLR). The CLR provides the
appearance of an application virtual machine so that programmers need not consider the
capabilities of the specific CPU that will execute the program. The CLR also provides other
important services such as security, memory management, and exception handling. The class
library and the CLR together compose the .NET Framework.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Principal design features

Interoperability

Journal: IEEE C
Because interaction between new and older applications is commonly required, the .NET
Framework provides means to access functionality that is implemented in programs that execute
outside the .NET environment. Access to COM components is provided in the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework;
access to other functionality is provided using the P/Invoke feature.

Journal: IEEE C
Common Runtime Engine

The Common Language Runtime (CLR) is the virtual machine component of the .NET
framework. All .NET programs execute under the supervision of the CLR, guaranteeing
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
certain properties and behaviors in the areas of memory management, security, and
exception handling.

Journal: IEEE C
Base Class Library

The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library
of functionality available to all languages using the .NET Framework. The BCL provides
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
classes which encapsulate a number of common functions, including file reading and writing,
graphic rendering, database interaction and XML document manipulation.

Journal: IEEE C
Simplified Deployment

Installation of computer software must be carefully managed to ensure that it does


not interfere with previously installed software, and that it conforms to security
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
requirements. The .NET framework includes design features and tools that help address
these requirements.

Journal: IEEE C
Security

The design is meant to address some of the vulnerabilities, such as buffer overflows,
that have been exploited by malicious software. Additionally, .NET provides a common
security model for all applications.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Portability

The design of the .NET Framework allows it to theoretically be platform agnostic, and

Journal: IEEE C
thus cross-platform compatible. That is, a program written to use the framework should run
without change on any type of system for which the framework is implemented. Microsoft's
commercial implementations of the framework cover Windows, Windows CE, and the Xbox
360. In addition, Microsoft submits the specifications for the Common Language
Infrastructure (which includes the core class libraries, Common Type System, and the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Common Intermediate Language), the C# language, and the C++/CLI language to both
ECMA and the ISO, making them available as open standards. This makes it possible for
third parties to create compatible implementations of the framework and its languages on

Journal: IEEE C
other platforms.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Architecture

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Visual overview of the Common Language Infrastructure (CLI)

Journal: IEEE C
Common Language Infrastructure
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The core aspects of the .NET framework lie within the Common Language
Infrastructure, or CLI. The purpose of the CLI is to provide a language-neutral platform for
application development and execution, including functions for exception handling, garbage
collection, security, and interoperability. Microsoft's implementation of the CLI is called the

Journal: IEEE C
Common Language Runtime or CLR.

Assemblies
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The intermediate CIL code is housed in .NET assemblies. As mandated by specification,
assemblies are stored in the Portable Executable (PE) format, common on the Windows platform

Journal: IEEE C
for all DLL and EXE files. The assembly consists of one or more files, one of which must
contain the manifest, which has the metadata for the assembly. The complete name of an
assembly (not to be confused with the filename on disk) contains its simple text name, version
number, culture, and public key token. The public key token is a unique hash generated when the
assembly is compiled, thus two assemblies with the same public key token are guaranteed to be
identical from the point of view of the framework. A private key can also be specified known
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
only to the creator of the assembly and can be used for strong naming and to guarantee that the
assembly is from the same author when a new version of the assembly is compiled (required to
add an assembly to the Global Assembly Cache).

Journal: IEEE C
Metadata
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
All CLI is self-describing through .NET metadata. The CLR checks the metadata to
ensure that the correct method is called. Metadata is usually generated by language compilers but

Journal: IEEE C
developers can create their own metadata through custom attributes. Metadata contains
information about the assembly, and is also used to implement the reflective programming
capabilities of .NET Framework.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Security

Journal: IEEE C
.NET has its own security mechanism with two general features: Code Access Security
(CAS), and validation and verification. Code Access Security is based on evidence that is
associated with a specific assembly. Typically the evidence is the source of the assembly
(whether it is installed on the local machine or has been downloaded from the intranet or
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Internet). Code Access Security uses evidence to determine the permissions granted to the code.
Other code can demand that calling code is granted a specified permission. The demand causes
the CLR to perform a call stack walk: every assembly of each method in the call stack is checked
for the required permission; if any assembly is not granted the permission a security exception is

Journal: IEEE C
thrown.

When an assembly is loaded the CLR performs various tests. Two such tests are
validation and verification. During validation the CLR checks that the assembly contains valid
metadata and CIL, and whether the internal tables are correct. Verification is not so exact. The
verification mechanism checks to see if the code does anything that is 'unsafe'. The algorithm
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
used is quite conservative; hence occasionally code that is 'safe' does not pass. Unsafe code will
only be executed if the assembly has the 'skip verification' permission, which generally means
code that is installed on the local machine.

Journal: IEEE C
.NET Framework uses appdomains as a mechanism for isolating code running in a
process. Appdomains can be created and code loaded into or unloaded from them independent of
other appdomains. This helps increase the fault tolerance of the application, as faults or crashes
in one appdomain do not affect rest of the application. Appdomains can also be configured
independently with different security privileges. This can help increase the security of the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
application by isolating potentially unsafe code. The developer, however, has to split the
application into subdomains; it is not done by the CLR.

Journal: IEEE C
Class library

Namespaces in the BCL


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
System

Journal: IEEE C
System. CodeDom

System. Collections

System. Diagnostics

System. Globalization
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
System. IO

System. Resources

Journal: IEEE C
System. Text

System.Text.RegularExpr
essions
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Microsoft .NET Framework includes a set of standard class libraries. The class library
is organized in a hierarchy of namespaces. Most of the built in APIs are part of either System.*
or Microsoft.* namespaces. It encapsulates a large number of common functions, such as file
reading and writing, graphic rendering, database interaction, and XML document manipulation,

Journal: IEEE C
among others. The .NET class libraries are available to all .NET languages. The .NET
Framework class library is divided into two parts: the Base Class Library and the Framework
Class Library.

The Base Class Library (BCL) includes a small subset of the entire class library and is
the core set of classes that serve as the basic API of the Common Language Runtime. The
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are considered
to be a part of the BCL. The BCL classes are available in both .NET Framework as well as its
alternative implementations including .NET Compact Framework, Microsoft Silverlight and
Mono.

Journal: IEEE C
The Framework Class Library (FCL) is a superset of the BCL classes and refers to the
entire class library that ships with .NET Framework. It includes an expanded set of libraries,
including WinForms, ADO.NET, ASP.NET, Language Integrated Query, Windows Presentation
Foundation, Windows Communication Foundation among others. The FCL is much larger in
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
scope than standard libraries for languages like C++, and comparable in scope to the standard
libraries of Java.

Memory management

Journal: IEEE C
The .NET Framework CLR frees the developer from the burden of managing memory
(allocating and freeing up when done); instead it does the memory management itself. To this
end, the memory allocated to instantiations of .NET types (objects) is done contiguously from
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
the managed heap, a pool of memory managed by the CLR. As long as there exists a reference to
an object, which might be either a direct reference to an object or via a graph of objects, the
object is considered to be in use by the CLR. When there is no reference to an object, and it
cannot be reached or used, it becomes garbage. However, it still holds on to the memory

Journal: IEEE C
allocated to it. .NET Framework includes a garbage collector which runs periodically, on a
separate thread from the application's thread, that enumerates all the unusable objects and
reclaims the memory allocated to them.

The .NET Garbage Collector (GC) is a non-deterministic, compacting, mark-and-sweep


garbage collector. The GC runs only when a certain amount of memory has been used or there is
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
enough pressure for memory on the system. Since it is not guaranteed when the conditions to
reclaim memory are reached, the GC runs are non-deterministic. Each .NET application has a set
of roots, which are pointers to objects on the managed heap (managed objects). These include
references to static objects and objects defined as local variables or method parameters currently

Journal: IEEE C
in scope, as well as objects referred to by CPU registers. When the GC runs, it pauses the
application, and for each object referred to in the root, it recursively enumerates all the objects
reachable from the root objects and marks them as reachable. It uses .NET metadata and
reflection to discover the objects encapsulated by an object, and then recursively walk them. It
then enumerates all the objects on the heap (which were initially allocated contiguously) using
reflection. All objects not marked as reachable are garbage. This is the mark phase. Since the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
memory held by garbage is not of any consequence, it is considered free space. However, this
leaves chunks of free space between objects which were initially contiguous. The objects are
then compacted together, by using memcpy to copy them over to the free space to make them
contiguous again. Any reference to an object invalidated by moving the object is updated to

Journal: IEEE C
reflect the new location by the GC. The application is resumed after the garbage collection is
over.

The GC used by .NET Framework is actually generational. Objects are assigned a


generation; newly created objects belong to Generation 0. The objects that survive a garbage
collection are tagged as Generation 1, and the Generation 1 objects that survive another
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
collection are Generation 2 objects. The .NET Framework uses up to Generation 2 objects.
Higher generation objects are garbage collected less frequently than lower generation objects.
This helps increase the efficiency of garbage collection, as older objects tend to have a larger
lifetime than newer objects. Thus, by removing older (and thus more likely to survive a

Journal: IEEE C
collection) objects from the scope of a collection run, fewer objects need to be checked and
compacted.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Versions
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Microsoft started development on the .NET Framework in the late 1990s originally under
the name of Next Generation Windows Services (NGWS). By late 2000 the first beta versions
of .NET 1.0 were released.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The .NET Framework stack.

Journal: IEEE C ersion


V Version
Number e Date
Releas
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
.0
1
.0
1.0.3705
01-05
2002-

Journal: IEEE C
1 1.1.4322 2003-
.1 .573 04-01

2 2.0.5072 2005-
.0 7.42 11-07

3 3.0.4506 2006-
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
.0 .30

3 3.5.2102
11-06

2007-

Journal: IEEE C
.5 2.8 11-09
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Client Application Development

Journal: IEEE C
Client applications are the closest to a traditional style of application in
Windows-based programming. These are the types of applications that display windows or forms
on the desktop, enabling a user to perform a task. Client applications include applications such as
word processors and spreadsheets, as well as custom business applications such as data-entry
tools, reporting tools, and so on. Client applications usually employ windows, menus, buttons,
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
and other GUI elements, and they likely access local resources such as the file system and
peripherals such as printers. Another kind of client application is the traditional ActiveX control
(now replaced by the managed Windows Forms control) deployed over the Internet as a Web
page. This application is much like other client applications: it is executed natively, has access to

Journal: IEEE C
local resources, and includes graphical elements.

In the past, developers created such applications using C/C++ in conjunction


with the Microsoft Foundation Classes (MFC) or with a rapid application development (RAD)
environment such as Microsoft® Visual Basic®. The .NET Framework incorporates aspects of
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
these existing products into a single, consistent development environment that drastically
simplifies the development of client applications.

The Windows Forms classes contained in the .NET Framework are designed

Journal: IEEE C
to be used for GUI development. You can easily create command windows, buttons, menus,
toolbars, and other screen elements with the flexibility necessary to accommodate shifting
business needs.

For example, the .NET Framework provides simple properties to adjust


visual attributes associated with forms. In some cases the underlying operating system does not
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
support changing these attributes directly, and in these cases the .NET Framework automatically
recreates the forms. This is one of many ways in which the .NET Framework integrates the
developer interface, making coding simpler and more consistent.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Server Application Development

Server-side applications in the managed world are implemented through

Journal: IEEE C
runtime hosts. Unmanaged applications host the common language runtime, which allows your
custom managed code to control the behavior of the server.

This model provides you with all the features of the common language
runtime and class library while gaining the performance and scalability of the host server.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro The following illustration shows a basic network schema with managed
code running in different server environments. Servers such as IIS and SQL Server can perform
standard operations while your application logic executes through the managed code.

Journal: IEEE C
Server-side managed code
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro ASP.NET is the hosting environment that enables developers to use the
.NET Framework to target Web-based applications. However, ASP.NET is more than just a
runtime host; it is a complete architecture for developing Web sites and Internet-distributed
objects using managed code. Both Web Forms and XML Web services use IIS and ASP.NET as

Journal: IEEE C
the publishing mechanism for applications, and both have a collection of supporting classes in
the .NET

5.2 C#.NET
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The Relationship of C# to .NET

Journal: IEEE C
C# is a new programming language, and is significant in two respects:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
It is specifically designed and targeted for use with Microsoft's .NET Framework (a
feature rich platform for the development, deployment, and execution of distributed
applications).

Journal: IEEE C
It is a language based upon the modern object-oriented design methodology, and
when designing it Microsoft has been able to learn from the experience of all the other
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
similar languages that have been around over the 20 years or so since object-oriented
principles came to prominence

Journal: IEEE C
One important thing to make clear is that C# is a language in its own right. Although
it is designed to generate code that targets the .NET environment, it is not itself part of
.NET. There are some features that are supported by .NET but not by C#, and you might be
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
surprised to learn that there are actually features of the C# language that are not supported
by .NET like Operator Overloading.

Journal: IEEE C
However, since the C# language is intended for use with .NET, it is important for us
to have an understanding of this Framework if we wish to develop applications in C#
effectively. So, in this chapter
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The Common Language Runtime:

Journal: IEEE C
Central to the .NET framework is its run-time execution environment, known
as the Common Language Runtime (CLR) or the .NET runtime. Code running under the
control of the CLR is often termed managed code.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
However, before it can be executed by the CLR, any source code that we develop (in
C# or some other language) needs to be compiled. Compilation occurs in two steps in .NET:

Journal: IEEE C
Compilation of source code to Microsoft Intermediate Language (MS-IL)

2. Compilation of IL to platform-specific code by the CLR


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
At first sight this might seem a rather long-winded compilation process. Actually, this

Journal: IEEE C
two-stage compilation process is very important, because the existence of the Microsoft
Intermediate Language (managed code) is the key to providing many of the benefits of
.NET. Let's see why.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Advantages of Managed Code

Journal: IEEE C
Microsoft Intermediate Language (often shortened to "Intermediate
Language", or "IL") shares with Java byte code the idea that it is a low-level language with
a simple syntax (based on numeric codes rather than text), which can be very quickly
translated into native machine code. Having this well-defined
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Universal syntax for code has significant advantages.

Journal: IEEE C
Platform Independence

First, it means that the same file containing byte code instructions can be
placed on any platform; at runtime the final stage of compilation can then be easily
accomplished so that the code will run on that particular platform. In other words, by
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
compiling to Intermediate Language we obtain platform independence for .NET, in much the
same way as compiling to Java byte code gives Java platform independence.

Journal: IEEE C
You should note that the platform independence of .NET is only theoretical at present
because, at the time of writing, .NET is only available for Windows. However, porting .NET
to other platforms is being explored (see for example the Mono project, an effort to create
an open source implementation of .NET, at http://www.go-mono.com/).
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Performance Improvement

Journal: IEEE C
Although we previously made comparisons with Java, IL is actually a bit more
ambitious than Java byte code. Significantly, IL is always Just-In-Time compiled, whereas
Java byte code was often interpreted. One of the disadvantages of Java was that, on
execution, the process of translating from Java byte code to native executable resulted in a
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
loss of performance (apart from in more recent cases, here Java is JIT-compiled on certain
platforms).

Journal: IEEE C
Instead of compiling the entire application in one go (which could lead to a slow
start-up time), the JIT compiler simply compiles each portion of code as it is called (just-in-
time). When code has been compiled once, the resultant native executable is stored until
the application exits, so that it does not need to be recompiled the next time that portion of
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
code is run. Microsoft argues that this process is more efficient than compiling the entire
application code at the start, because of the likelihood those large portions of any
application code will not actually be executed in any given run. Using the JIT compiler, such

Journal: IEEE C
code will never get compiled.

This explains why we can expect that execution of managed IL code will be almost as
fast as executing native machine code. What it doesn't explain is why Microsoft expects that
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
we will get a performance improvement. The reason given for this is that, since the final
stage of compilation takes place at run time, the JIT compiler will know exactly what
processor type the program will run on. This means that it can optimize the final executable

Journal: IEEE C
code to take advantage of any features or particular machine code instructions offered by
that particular processor.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Traditional compilers will optimize the code, but they can only perform optimizations
that will be independent of the particular processor that the code will run on. This is because
traditional compilers compile to native executable before the software is shipped. This

Journal: IEEE C
means that the compiler doesn't know what type of processor the code will run on beyond
basic generalities, such as that it will be an x86-compatible processor or an Alpha processor.
Visual Studio 6, for example, optimizes for a generic Pentium machine, so the code that it
generates cannot take advantages of hardware features of Pentium III processors. On the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
other hand, the JIT compiler can do all the optimizations that Visual Studio 6 can, and in
addition to that it will optimize for the particular processor the code is running on.

Journal: IEEE C
Language Interoperability

How the use of IL enables platform independence, and how JIT compilation
should improve performance. However, IL also facilitates language interoperability.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Simply put, you can compile to IL from one language, and this compiled code should then
be interoperable with code that has been compiled to IL from another language.

Journal: IEEE C
Intermediate Language

From what we learned in the previous section, Intermediate Language


obviously plays a fundamental role in the .NET Framework. As C# developers, we now
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
understand that our C# code will be compiled into Intermediate Language before it is
executed (indeed, the C# compiler only compiles to managed code). It makes sense, then,
that we should now take a closer look at the main characteristics of IL, since any language

Journal: IEEE C
that targets .NET would logically need to support the main characteristics of IL too.

Here are the important features of the Intermediate Language:


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Object-orientation and use of interfaces

Journal: IEEE C
Strong distinction between value and reference types

Strong data typing

Error handling through the use of exceptions


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Use of attributes

Journal: IEEE C
Support of Object Orientation and Interfaces
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The language independence of .NET does have some practical limits. In particular,
IL, however it is designed, is inevitably going to implement some particular programming
methodology, which means that languages targeting it are going to have to be compatible

Journal: IEEE C
with that methodology. The particular route that Microsoft has chosen to follow for IL is that
of classic object-oriented programming, with single implementation inheritance of classes.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Besides classic object-oriented programming, Intermediate Language also brings in
the idea of interfaces, which saw their first implementation under Windows with COM. .NET
interfaces are not the same as COM interfaces; they do not need to support any of the COM

Journal: IEEE C
infrastructure (for example, they are not derived from I Unknown, and they do not have
associated GUIDs). However, they do share with
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
COM interfaces the idea that they provide a contract, and classes that implement a
given interface must provide implementations of the methods and properties specified by
that interface.

Journal: IEEE C
Object Orientation and Language Interoperability
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro Working with .NET means compiling to the Intermediate Language, and that
in turn means that you will need to be programming using traditional object-oriented
methodologies. That alone is not, however, sufficient to give us language interoperability.

Journal: IEEE C
After all, C++ and Java both use the same object-oriented paradigms, but they are still not
regarded as interoperable. We need to look a little more closely at the concept of language
interoperability.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
An associated problem was that, when debugging, you would still have to
independently debug components written in different languages. It was not possible to step
between languages in the debugger. So what we really mean by language interoperability is

Journal: IEEE C
that classes written in one language should be able to talk directly to classes written in
another language. In particular:

A class written in one language can inherit from a class written in another language
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The class can contain an instance of another class, no matter what the languages of
the two classes are

Journal: IEEE C
An object can directly call methods against another object written in another
language

Objects (or references to objects) can be passed around between methods


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
the
When calling methods between languages we can step between the method calls in

Journal: IEEE C
debugger, even where this means stepping between source code written in different
languages
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
This is all quite an ambitious aim, but amazingly, .NET and the Intermediate
Language have achieved it. For the case of stepping between methods in the debugger, this
facility is really offered by the Visual Studio .NET IDE rather than from the CLR itself.

Journal: IEEE C
Strong Data Type
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
One very important aspect of IL is that it is based on exceptionally strong data
typing. What we mean by that is that all variables are clearly marked as being of a
particular, specific data type (there is no room in IL, for example, for the Variant data type

Journal: IEEE C
recognized by Visual Basic and scripting languages). In particular, IL does not normally
permit any operations that result in ambiguous data types.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
For instance, VB developers will be used to being able to pass variables around
without worrying too much about their types, because VB automatically performs type
conversion. C++ developers will be used to routinely casting pointers between different

Journal: IEEE C
types. Being able to perform this kind of operation can be great for performance, but it
breaks type safety. Hence, it is permitted only in very specific circumstances in some of the
languages that compile to managed code. Indeed, pointers (as opposed to references) are
only permitted in marked blocks of code in C#, and not at all in VB (although they are
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
allowed as normal in managed C++). Using pointers in your code will immediately cause it
to fail the memory type safety checks performed by the CLR.

Journal: IEEE C
You should note that some languages compatible with .NET, such as VB.NET, still
allow some laxity in typing, but that is only possible because the compilers behind the
scenes ensure the type safety is enforced in the emitted IL.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Although enforcing type safety might initially appear to hurt performance, in many

Journal: IEEE C
cases this is far outweighed by the benefits gained from the services provided by .NET that
rely on type safety. Such services include:

Language Interoperability
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Garbage Collection

Security

Journal: IEEE C
Application Domains

Common Type System (CTS)

This data type problem is solved in .NET through the use of the Common Type
System (CTS). The CTS defines the predefined data types that are available in IL, so that
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
all languages that target the .NET framework will produce compiled code that is ultimately
based on these types.

Journal: IEEE C
The CTS doesn't merely specify primitive data types, but a rich hierarchy of types,
which includes well-defined points in the hierarchy at which code is permitted to define its
own types. The hierarchical structure of the Common Type System reflects the single-
inheritance object-oriented methodology of IL, and looks like this:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Common Language Specification (CLS)

Journal: IEEE C
The Common Language Specification works with the Common Type System to
ensure language interoperability. The CLS is a set of minimum standards that all compilers
targeting .NET must support. Since IL is a very rich language, writers of most compilers will
prefer to restrict the capabilities of a given compiler to only support a subset of the facilities
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
offered by IL and the CTS. That is fine, as long as the compiler supports everything that is
defined in the CLS.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Garbage Collection

The garbage collector is .NET's answer to memory management, and in


particular to the question of what to do about reclaiming memory that running applications
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
ask for. Up until now there have been two techniques used on Windows platform for deal
locating memory that processes have dynamically requested from the system:

Journal: IEEE C
Make the application code do it all manually

Make objects maintain reference counts


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The .NET runtime relies on the garbage collector instead. This is a program whose
purpose is to clean up memory. The idea is that all dynamically requested memory is
allocated on the heap (that is true for all languages, although in the case of .NET, the CLR

Journal: IEEE C
maintains its own managed heap for .NET applications to use). Every so often, when .NET
detects that the managed heap for a given process is becoming full and therefore needs
tidying up, it calls the garbage collector. The garbage collector runs through variables
currently in scope in your code, examining references to objects stored on the heap to
identify which ones are accessible from your code – that is to say which objects have
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
references that refer to them. Any objects that are not referred to are deemed to be no
longer accessible from your code and can therefore be removed. Java uses a similar system
of garbage collection to this.

Journal: IEEE C
Security
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro .NET can really excel in terms of complementing the security mechanisms
provided by Windows because it can offer code-based security, whereas Windows only really
offers role-based security.

Journal: IEEE C
Role-based security is based on the identity of the account under which the
process is running, in other words, who owns and is running the process. Code-based
security on the other hand is based on what the code actually does and on how much the
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
code is trusted. Thanks to the strong type safety of IL, the CLR is able to inspect code
before running it in order to determine required security permissions. .NET also offers a
mechanism by which code can indicate in advance what security permissions it will require

Journal: IEEE C
to run.

The importance of code-based security is that it reduces the risks associated with
running code of dubious origin (such as code that you've downloaded from the Internet).
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
For example, even if code is running under the administrator account, it is possible to use
code-based security to indicate that that code should still not be permitted to perform
certain types of operation that the administrator account would normally be allowed to do,

Journal: IEEE C
such as read or write to environment variables, read or write to the registry, or to access
the .NET reflection features.

.Net Framework Classes


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro The .NET base classes are a massive collection of managed code classes that
have been written by Microsoft, and which allow you to do almost any of the tasks that were
previously available through the Windows API. These classes follow the same object model

Journal: IEEE C
as used by IL, based on single inheritance. This means that you can either instantiate
objects of whichever .NET base class is appropriate, or you can derive your own classes
from them.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The great thing about the .NET base classes is that they have been designed to be
very intuitive and easy to use. For example, to start a thread, you call the Start() method of
the Thread class. To disable a TextBox, you set the Enabled property of a TextBox object to

Journal: IEEE C
false. This approach will be familiar to Visual Basic and Java developers, whose respective
libraries are just as easy to use. It may however come as a great relief to C++ developers,
who for years have had to cope with such API functions as GetDIBits(),
RegisterWndClassEx(), and IsEqualIID(), as well as a whole plethora of functions that
required Windows handles to be passed around.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Name Spaces

Journal: IEEE C
Namespaces are the way that .NET avoids name clashes between classes.
They are designed, for example, to avoid the situation in which you define a class to
represent a customer, name your class Customer, and then someone else does the same
thing (quite a likely scenario – the proportion of businesses that have customers seems to
be quite high).
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
A namespace is no more than a grouping of data types, but it has the effect that the

Journal: IEEE C
names of all data types within a namespace automatically get prefixed with the name of the
namespace. It is also possible to nest namespaces within each other. For example, most of
the general-purpose .NET base classes are in a namespace called System. The base class
Array is in this namespace, so its full name is System. Array.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
If a namespace is explicitly supplied, then the type will be added to a nameless
global namespace.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Creating .Net Application using C#

C# can be used to create console applications: text-only applications that run

Journal: IEEE C
in a DOS window. You'll probably use console applications when unit testing class libraries,
and for creating Unix/Linux daemon processes. However, more often you'll use C# to create
applications that use many of the technologies associated with .NET. In this section, we'll
give you an overview of the different types of application that you can write in C#.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Creating Windows Forms

Journal: IEEE C
Although C# and .NET are particularly suited to web development, they still
offer splendid support for so-called "fat client" apps, applications that have to be installed
on the end-user's machine where most of the processing takes place. This support is from
Windows Forms.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
A Windows Form is the .NET answer to a VB 6 Form. To design a graphical window

Journal: IEEE C
interface, you just drag controls from a toolbox onto a Windows Form. To determine the
window's behavior, you write event-handling routines for the form's controls. A Windows
Form project compiles to an EXE that must be installed alongside the .NET runtime on the
end user's computer. Like other .NET project types, Windows Form projects are supported
by both VB.NET and C#.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Windows Control

Journal: IEEE C
Although Web Forms and Windows Forms are developed in much the same
way, you use different kinds of controls to populate them. Web Forms use Web Controls,
and Windows Forms use Windows Controls.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
A Windows Control is a lot like an ActiveX control. After a Window control is
implemented, it compiles to a DLL that must be installed on the client's machine. In fact,
the .NET SDK provides a utility that creates a wrapper for ActiveX controls, so that they can

Journal: IEEE C
be placed on Windows Forms. As is the case with Web Controls, Windows Control creation
involves deriving from a particular class, System.Windows.Forms.Control.

Windows Services
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro A Windows Service (originally called an NT Service) is a program that is

Journal: IEEE C
designed to run in the background in Windows NT/2000/XP (but not Windows 9x). Services
are useful where you want a program to be running continuously and ready to respond to
events without having been explicitly started by the user. A good example would be the
World Wide Web Service on web servers, which

listens out for web requests from clients.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
It is very easy to write services in C#. There are .NET Framework base classes

Journal: IEEE C
available in the System.ServiceProcess namespace that handle many of the boilerplate tasks
associated with services, and in addition, Visual Studio .NET allows you to create a C#
Windows Service project, which starts you out with the Framework C# source code for a
basic Windows service.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The Role of C# In .Net Enterprise Architecture

Journal: IEEE C
C# requires the presence of the .NET runtime, and it will probably be a few
years before most clients – particularly most home machines – have .NET installed. In the
meantime, installing a C# application is likely to mean also installing the .NET
redistributable components. Because of that, it is likely that the first place we will see many
C# applications is in the enterprise environment. Indeed, C# arguably presents an
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
outstanding opportunity for organizations that are interested in building robust, n-tiered
client-server applications.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SYSTEM DESIGN

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
6.1. INTRODUCTION

Software design sits at the technical kernel of the software engineering process and
is applied regardless of the development paradigm and area of application. Design is the
first step in the development phase for any engineered product or system. The designer’s
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
goal is to produce a model or representation of an entity that will later be built. Beginning,
once system requirement have been specified and analyzed, system design is the first of the
three technical activities -design, code and test that is required to build and verify software.

Journal: IEEE C
The importance can be stated with a single word “Quality”. Design is the place where
quality is fostered in software development. Design provides us with representations of
software that can assess for quality. Design is the only way that we can accurately translate
a customer’s view into a finished software product or system. Software design serves as a
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
foundation for all the software engineering steps that follow. Without a strong design we
risk building an unstable system – one that will be difficult to test, one whose quality cannot
be assessed until the last stage.

Journal: IEEE C
During design, progressive refinement of data structure, program structure, and
procedural details are developed reviewed and documented. System design can be viewed
from either technical or project management perspective. From the technical point of view,
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
design is comprised of four activities – architectural design, data structure design, interface
design and procedural design.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SYSTEM WORK FOLW

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
6.3 UML DIAGRAMS

Journal: IEEE C
Use Case Diagram:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro System

Journal: IEEE C
Register

Login
Server
Client

exit
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro Host
System

Journal: IEEE C
Connect

Ip and port info

Server Client

Compose

Send
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Sequential Diagram:((client/Server) :
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
User Checkip() CheckSysname() Login ChatRoom

Journal: IEEE C
1 : Enter Ip()

2 : Verify()

3 : Enter systemname()

4 : Verity()

5 : authenticate()

6 : varity no()
7
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
User Server Setting Host Prepare Compose Send

Journal: IEEE C
1 : Enter ip and port()

2 : verify()

3 : start server()

4 : verify()

5 : Compose()

6 : Send()
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Collaboration Diagram:

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro 7
Login
6: varityno()

Journal: IEEE C
ChatRoom

5: authenticate()

4: Verity()

CheckSysname()

3: Enter systemname()

8: if authenticateresponse()

1: Enter Ip() 2: Verify()


User
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro Send

6 : Send()

Journal: IEEE C
Prepare Compose

2 : verify()

Server Setting
5 : Compose()
3 : start server()

1 : Enter ip and port()


4 : verify()

Host
User
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Data Flow diagram:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Class Diagram:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
OUTPUT SCREENS
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Home Screen:

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Server application:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
If U want login to Chat with other system Open file menu ->Click login

Enter Ur System IP Address (192.168.100.8)

Journal: IEEE C
Enter Ur System Name (Chandu)
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
This the Our actual Chat application:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Click On Host Button
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Client System:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
If U want to Connect to Server Application . U have to enter Server ip Address.

Click on Connect button

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Sample Code:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
namespace CHAT

Journal: IEEE C
public partial class ChatApp : Form

ChatSession session;
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro public ChatApp()

Journal: IEEE C
InitializeComponent();

//the form control is sent with it because we will need it later to do invokes
on it(to be on the safe side of threading)
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
session = new ChatSession(this);

SetEvents();

Journal: IEEE C
}

private void btnsend_Click(object sender, EventArgs e)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

sendmessage();

Journal: IEEE C
}

private void btnhost_Click(object sender, EventArgs e)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

session.port = int.Parse(txtport.Text);

Journal: IEEE C
MethodInvoker invoker = new MethodInvoker(session.Host);

invoker.BeginInvoke(null, null);

btnhost.Enabled = false;
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
btnconnect.Enabled = false;

Journal: IEEE C
private void btnconnect_Click(object sender, EventArgs e)

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
session.port = int.Parse(txtport.Text);

session.host = txtip.Text;

Journal: IEEE C
MethodInvoker invoker = new MethodInvoker(session.Connect);

invoker.BeginInvoke(null, null);

btnhost.Enabled = false;
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
btnconnect.Enabled = false;

Journal: IEEE C
private void txtmessage_KeyDown(object sender, KeyEventArgs e)

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
if (e.KeyCode == Keys.Enter)

Journal: IEEE C
sendmessage();

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
void sendmessage()

Journal: IEEE C
if (session.Connected)

session.SendMessage(txtmessage.Text);
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
txtmessage.Text = "";

Journal: IEEE C
else

MessageBox.Show("Not connected");
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
}

Journal: IEEE C
void SetEvents()

session.gotmessage += new
ChatSession.gotMessage(session_gotmessage);
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
ChatSession.Lostconnection(session_lostconnection);
session.lostconnection += new

Journal: IEEE C
}

void session_lostconnection()

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
MessageBox.Show("Lost connection, closing the application");

this.Close();

Journal: IEEE C
}

void session_gotmessage(string message)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

txttext.Text += DateTime.Now.ToString("hh:mm:ss") + ">" + message +

Journal: IEEE C
"\r\n";

private void txtip_KeyDown(object sender, KeyEventArgs e)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

Journal: IEEE C
}

private void ChatApp_Load(object sender, EventArgs e)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

this.CenterToScreen();

Journal: IEEE C
string ip =
(Dns.GetHostByName(Loginform.sysname)).AddressList[0].ToString().Trim().ToString();

txtip.Text = ip;

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}

Journal: IEEE C
}

class ChatSession

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public delegate void gotMessage(string message);

Journal: IEEE C
public event gotMessage gotmessage;

public delegate void Lostconnection();


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public event Lostconnection lostconnection;

Journal: IEEE C
Control control;

public int port;

public string host;


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Stream stream;

Journal: IEEE C
Encryption encryption;

Message message;
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
bool connected = false;

Journal: IEEE C
/// <summary>

///

/// </summary>
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
/// <param name="invokecontrol">The gui that needs to be updated</param>

public ChatSession(Control invokecontrol)

Journal: IEEE C
{

this.control = invokecontrol;
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}

public bool Connected

Journal: IEEE C
{

get { return this.connected; }

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public void Host()

Journal: IEEE C
{

try

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro TcpListener listener = new TcpListener(IPAddress.Any, port);

listener.Start();

Journal: IEEE C
SendMessageToControl("Starting to listen on port " + port);

TcpClient client = listener.AcceptTcpClient();

SendMessageToControl("Connection established with " +


client.Client.LocalEndPoint.ToString());
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Initialize(client);

Journal: IEEE C
}

catch (Exception ex)

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
MessageBox.Show("Unknown error occured:" + ex.Message);

Journal: IEEE C
}

public void Connect()

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
try

Journal: IEEE C
TcpClient client = new TcpClient(host, port);

SendMessageToControl("connecting to " + host + " on port " + port);

Initialize(client);
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}

catch

Journal: IEEE C
{

MessageBox.Show("Unknown error occured");

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}

Journal: IEEE C
void Initialize(TcpClient client)

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
encryption = new Encryption();

stream = client.GetStream();

Journal: IEEE C
message = new Message(stream, encryption);
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
//starts accepting messages from the other peer

MethodInvoker invoker = new MethodInvoker(getMessage);

Journal: IEEE C
invoker.BeginInvoke(null, null);

SendMessageToControl("Sending public key");


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
//the public key has to be sent first(unencrypted ofcourse)

Journal: IEEE C
message.Send_Message(encryption.Get_This_Publickey(), false);

SendMessageToControl("public key sent");


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
connected = true;

Journal: IEEE C
public void getMessage()

{
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
try

Journal: IEEE C
SendMessageToControl("Receiving public key");

//The first line is the public key from the other peer

string publickey = message.Receive_Message();


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SendMessageToControl("public key Received");

Journal: IEEE C
encryption.Set_Contact_Public(publickey);

for (; ; )
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

SendMessageToControl(message.Receive_Message());

Journal: IEEE C
}

catch (Exception ex)


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
{

control.BeginInvoke(lostconnection);

Journal: IEEE C
}

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public void SendMessage(string messagestring)

Journal: IEEE C
message.Send_Message(messagestring, true);

SendMessageToControl(messagestring);
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}

Journal: IEEE C
void SendMessageToControl(string message)

control.BeginInvoke(gotmessage, new string[] { message });


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
}
}

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
class Encryption

Journal: IEEE C
RSACryptoServiceProvider contact_public = new
RSACryptoServiceProvider(1024);

RSACryptoServiceProvider this_private = new


RSACryptoServiceProvider(1024);
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public Encryption()

Journal: IEEE C
}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public byte[] EncryptOutgoingV2(byte[] message)

Journal: IEEE C
return contact_public.Encrypt(message, true);

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public byte[] DecryptIncomingV2(byte[] encrypteddata)

Journal: IEEE C
return this_private.Decrypt(encrypteddata, true);

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public string Get_This_Publickey()

Journal: IEEE C
return this_private.ToXmlString(false);

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
public void Set_Contact_Public(string xmlstring)

Journal: IEEE C
contact_public.FromXmlString(xmlstring);

}
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
SYSTEM TESTING AND IMPLEMENTATION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
INTRODUCTION

Software testing is a critical element of software quality assurance and represents the

Journal: IEEE C
ultimate review of specification, design and coding. In fact, testing is the one step in the software

engineering process that could be viewed as destructive rather than constructive.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
A strategy for software testing integrates software test case design methods into a
well-planned series of steps that result in the successful construction of software. Testing is
the set of activities that can be planned in advance and conducted systematically. The

Journal: IEEE C
underlying motivation of program testing is to affirm software quality with methods that can
economically and effectively apply to both strategic to both large and small-scale systems.

8.2. STRATEGIC APPROACH TO SOFTWARE TESTING


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
The software engineering process can be viewed as a spiral. Initially system
engineering defines the role of software and leads to software requirement analysis where
the information domain, functions, behavior, performance, constraints and validation criteria

Journal: IEEE C
for software are established. Moving inward along the spiral, we come to design and finally
to coding. To develop computer software we spiral in along streamlines that decrease the
level of abstraction on each turn.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
A strategy for software testing may also be viewed in the context of the spiral. Unit
testing begins at the vertex of the spiral and concentrates on each unit of the software as
implemented in source code. Testing progress by moving outward along the spiral to
Secure Chat application using RSA

Project Titl

A Survey on C
UNIT
TESTING

MODULE

System Appro
TESTING

Component
Testing testing, where the focus is on the design and
integration SUB-SYSTEM
the construction of the software
TESING
architecture. Talking another turn on outward on the spiral we encounter validation testing
where requirements established as part of software requirements analysis are validated

Journal: IEEE C
against the software that has been constructed. Finally we arrive at system testing, where
SYSTEM
the software and other system elements are tested as a whole.
Integration Testing
TESTING

ACCEPTANCE
User
TESTING
Testing
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
\
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
8.3. UNIT TESTIN

Unit testing focuses verification effort on the smallest unit of software design, the

Journal: IEEE C
module. The unit testing we have is white box oriented and some modules the steps are

conducted in parallel.

1. WHITE BOX TESTING


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
This type of testing ensures that

All independent paths have been exercised at least once

Journal: IEEE C
All logical decisions have been exercised on their true and false sides

All loops are executed at their boundaries and within their operational bounds

All internal data structures have been exercised to assure their validity.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro To follow the concept of white box testing we have tested each form .we have
created independently to verify that Data flow is correct, All conditions are exercised to
check their validity, All loops are executed on their boundaries.

Journal: IEEE C
2. BASIC PATH TESTING

Established technique of flow graph with Cyclomatic complexity was used to derive
test cases for all the functions. The main steps in deriving test cases were:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Use the design of the code and draw correspondent flow graph.

Determine the Cyclomatic complexity of resultant flow graph, using formula:

Journal: IEEE C
V(G)=E-N+2 or

V(G)=P+1 or

V(G)=Number Of Regions
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Where V(G) is Cyclomatic complexity,

E is the number of edges,

Journal: IEEE C
N is the number of flow graph nodes,

P is the number of predicate nodes.

Determine the basis of set of linearly independent paths.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
3. CONDITIONAL TESTING

In this part of the testing each of the conditions were tested to both true and false

Journal: IEEE C
aspects. And all the resulting paths were tested. So that each path that may be generate on
particular condition is traced to uncover any possible errors.

4. DATA FLOW TESTING


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
This type of testing selects the path of the program according to the location of
definition and use of variables. This kind of testing was used only when some local variable
were declared. The definition-use chain method was used in this type of testing. These were

Journal: IEEE C
particularly useful in nested statements.

5. LOOP TESTING

In this type of testing all the loops are tested to all the limits possible. The following
exercise was adopted for all loops:
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
All the loops were tested at their limits, just above them and just below them.

All the loops were skipped at least once.

Journal: IEEE C
For nested loops test the inner most loop first and then work outwards.

For concatenated loops the values of dependent loops were set with the help of
connected loop.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Unstructured loops were resolved into nested loops or concatenated loops and tested
as above.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SYSTEM SECURITY

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
9.1 INTRODUCTION
The protection of computer based resources that includes hardware, software, data,

Journal: IEEE C
procedures and people against unauthorized use or natural
Disaster is known as System Security.

System Security can be divided into four related issues:

Security
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Integrity

Privacy

Journal: IEEE C
Confidentiality
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SYSTEM SECURITY refers to the technical innovations and procedures applied to
the hardware and operation systems to protect against deliberate or accidental damage
from a defined threat.

Journal: IEEE C
DATA SECURITY is the protection of data from loss, disclosure, modification and
destruction.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
SYSTEM INTEGRITY refers to the power functioning of hardware and programs,
appropriate physical security and safety against external threats such as eavesdropping and
wiretapping.

Journal: IEEE C
PRIVACY defines the rights of the user or organizations to determine what
information they are willing to share with or accept from others and how the organization
can be protected against unwelcome, unfair or excessive dissemination of information about
it.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
CONFIDENTIALITY is a special status given to sensitive information in a database
to minimize the possible invasion of privacy. It is an attribute of information that
characterizes its need for protection.

Journal: IEEE C
9.3 SECURITY SOFTWARE

System security refers to various validations on data in form of checks and controls to
avoid the system from failing. It is always important to ensure that only valid data is entered and
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
only valid operations are performed on the system. The system employees two types of checks
and controls:
RSA Crypto pad is one of the major digital rights management enabling

Journal: IEEE C
technologies. Usually, to provide confidentiality, the data is encrypted using a stream cipher or a
block cipher. Here security purpose is the important aspects to transfer data’s in a not readable
format ensuring that no one can read the message except the intended receiver. Assuring the
receiver that the received message has not been altered in any way from the original.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
NET has two kinds of security:

Role Based Security

Journal: IEEE C
Code Access Security

The Common Language Runtime (CLR) allows code to perform only those operations
that the code has permission to perform. So CAS is the CLR's security system that enforces
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
security policies by preventing unauthorized access to
operations. Using the Code Access Security, you can do the following:
protected resources and

Journal: IEEE C
Restrict what your code can do

Restrict which code can call your code

Identify code
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
CONCLUSION
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
In this paper an efficient implementation of RSA is shown by using various functions

Journal: IEEE C
of the GMP library. Feasibility analysis is done by comparing the time taken for encryption
and decryption. It shows that when we increase the number of bits of

information to be encrypted together the total time including encryption and decryption
steadily decreases. It must always be kept in mind that the integer representation of the message
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
to be encrypted should lie within the range specified by the modulus (that is, m lies in the range
[0,n-1]), which poses a limitation on the maximum number of characters that can be encrypted at
a single time.

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
BIBLIOGRAPHY
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
S. Berkovits, “Factoring via superencryption,” Cryptologia, vol. 6, no.

3, pp. 229–237, 1982.

Journal: IEEE C
M. Bellare and P. Rogaway, “Optimal asymmetric encryption—How

to encrypt with RSA,” in Advances in Cryptology—EUROCRYPT’94,


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
ser. Lecture Notes in Computer Science, A. D. Santis, Ed. New York:

Springer, 1995, vol. 950, pp. 92–111.

Journal: IEEE C
D. Bleichenbacher and A. May, “New attacks on RSA with small secret

CRT-exponents,” in Public Key Cryptology—PKC 2006, ser. Lecture


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Notes in Computer Science. New York: Springer, 2006, vol. 3958,

pp. 1–13.

Journal: IEEE C
J. Blömer and A. May, Eds., “Low Secret Exponent RSA Revisited,”

in Cryptography and Lattices, Int. Conf., CaLC 2001, J. H. Silverman,

Ed., 2001, vol. 2146, pp. 4–19, Springer, Lecture Notes in Computer
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Science.

D. Boneh, “Twenty years of attacks on the RSA cryptosystem,” Notices

Journal: IEEE C
of the American Mathematical Society, vol. 46, no. 2, pp. 203–213,

Paul Syversion and Illiano Cervesato, The logic of authentication protocols,

FOSAD’00, Bertinoro, Italy, 2000.


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Dario Catalano, Rosario Gennaro and Shai Halevi, Computing inverse over a

shared secret modulus, IBM T. J. Watson Research center, NY, USA, 1999.

Journal: IEEE C
[Don coppersmith, Markus Jakobsson, Almost optimal hash sequence traversal,

RSA Laboratories, NY, 2001.

Elichiro Fujisaki, Tatsuaki Okamoto, David Pointcheval and Jacques Stern, RSAOAEP
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
is secure under the RSA assumption, Journal of Cryptology, 2002.

Daniel M. Gordon, A survey of fast exponentiation methods, Journal of

Journal: IEEE C
algorithms, 27, 1998, 126-146.

Adrian Perrig, Robet Szewczyk, Victor Wen, David Culler and J.D. Tygar,

SPINS: Security protocols for sensor networks, Mobile Computing and


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Networking, Rome, Italy, 2001.

David Pointcheval and Jacques Stern, Security proofs for signature schemes,

Journal: IEEE C
EUROCRYPT ’96, Zaragoza, Spain, 1996.

[8] Giuseppe Ateniese, Michael Steiner, and Gene Tsudik, New multiparty

authentication services and key agreement protocols, IEEE Journal of Selected


Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Areas in Communication, 18(4), 2000.

Cetin Kaya Koc, High speed RSA implementation, RSA Laboratories, CA, 1994.

Journal: IEEE C
Anand Krishnamurthy, Yiyan Tang, Cathy Xu and Yuke Wang, An efficient

implementation of multi-prime RSA on DSP processor, University of Texas,

Texas, USA,2002.
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Menezes, P. Van Oorschot, S. Vanstone, Handbook of Applied Cryptography,

CRC Press, 1996 ( www.cacr.math.uwaterloo.ca/hac )

Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C
Secure Chat application using RSA

Project Titl

A Survey on C
System Appro
Journal: IEEE C