College Project For Message Authentication
College Project For Message Authentication
INTRODUCTION
1.1 BASIC CONCEPTS
Message integrity and authenticity, and replay prevention, are essential
in security-related communications. Here, a receiver is expected to be able to verify
that a received message, originally transmitted by a valid source, was not changed.
Also, the receiver has to verify that the message was not transmitted by a cloned
source, and is not a retransmission of an originally genuine message transmitted in
the past by a valid source. Technically, verifying message integrity and authenticity
is based on the receiver’s ability to prove to itself that the transmitter stores a valid
secret key that was used when the message was transmitted. Surely, symmetric and
asymmetric cryptographic schemes can also be used in satisfying the above. In this
paper, we treat the case where the facility at the data source has limited resources.
In such environments, message integrity and authenticity is usually verified using
Message Authentication code (MAC).
Subsequently, the interrogated component transmits:
1) the component’s public key PK, which is an encrypted
version of K issued by the system manager and stored in the component, 2) M , and
3) CR. Upon receiving the above three values, interrogator performs the operations
shown at the bottom of the figure. The interrogator first retrieves K out of the
received PK, using a system decryption key. In Practice, the system decryption key
is not necessarily stored at the interrogator’s facility. Here, the interrogation
operations can be performed in an external secure place. Under another version, the
key K of the interrogated component is retrieved from secured network, rather than
being recovered by decrypting a value PK submitted by the component. The
interrogating receiver then has same three values that generated the MAC at the
interrogated component.
The same MAC is now calculated at the interrogating receiver, and the output is
compared to the received CR. If the two values match, the integrity and authenticity
of the received message is confirmed. The interrogated component’s response CR is
unique, as it depends on the private secret key K which differs for different
components. The procedure prevents replay
attacks, since the response sent by the interrogated component depends on the real-
time random challenge C sent by the interrogator.The same mechanism can also be
used in access control,preventing illegal writings of a message M into the
component, by still executing a MAC operation in the
component. Here, the component challenges the external party, asking it to prove
that it knows the component’s secret key. In this scenario, the direction of flow of C
and M in Fig. 1 is reversed. It is the component which generates C. The comparison
of the MAC values is done in the component. Upon success, M is allowed to be
written.
1.2 PURPOSE
Radio Frequency IDentification (RFID) facilitates, by definition,
identification by wireless communications. In many applications an RFID tag is
required to prove the authenticity of data it transmits. Two main constraints are
considered : 1) Costs: Wide adoption of RFID is crucially dependent on the price of
a tag. This is translated into a limited number of logic gates used in the tag. 2) Power
consumption: An RFID tag is operated by a magnetic field radiated from the reader.
It does not have its own power source.
1.3 OBJECTIVE
The main objective of this project is to verify the received messages
come from the alleged source and have not been altered. Also sequencing and
timeliness may be authenticated.
1. Verify the RFID details with the help of database.
2. Implementation of HMAC algorithm,
i) To convert the given string as a byte.
ii) Convert the converted byte as a string.
3. Implementation of Stream Ciphering.
In this stream ciphering the given string is converted to the corresponding
bit sequence here the input key is generated by the required user.
1.5 DRAWBACKS
1. The block cipher encryption method Need more memory and hence it
cannot be used for constrained environments.
2. The time consumption is higher comparatively.
CHAPTER 2
LITERATURE REVIEW
2.4 SECURITY
The cryptographic strength of the HMAC depends upon the size of the
secret key that is used. The most common attack against HMACs is brute force to
uncover the secret key. HMACs are substantially less affected by collisions than
their underlying hashing algorithms alone.
CHAPTER 3
SYSTEM ANALYSIS
3.1 HARDWARE REQUIREMENTS
Processor : 400 MHz Processor
RAM : 512 MB RAM
Hard Disk : 40 GB HDD
Server Explorer
This window enables to perform a number of functions such as database
connectivity, performance monitoring, and interacting with event logs.
By using Server Explorer you can log on to a remote server and view database and
system data about that server. Many of the functions that are performed with the
Enterprise Manager in SQL Server can now be executed in the Server Explorer.
Solution Explorer
This provides an organized view of the projects in the application. The toolbar within
the Solution Explorer enables to
➢ View code page of the selected item.
Class View
The Class View window can be viewed from the Start Page by clicking the Class
View tab. The Class View shows all the classes that are contained within your
solution.
The Class View shows the hierarchical relationship among the classes in your
solution as well as the number of other items including methods, enumerations,
namespaces, unions, and events. It is possible to organize the view of these items
within the window by right-clicking anywhere in the Class View area and choosing
how the items are sorted.
Toolbox
The Toolbox window enables to specify elements that will be part of the Windows
Forms or Web Forms. It provides a drag and drop means of adding elements and
controls to the pages or forms. The code snippets can also be stored within the
Toolbox.
Properties window
This window provides the properties of an item that is part of the application. This
enables to control the style and behavior of the item selected to modify.
Document window
The Document window is the main window within Visual Studio.NET where the
applications are built.
The Document window shows open files in either Design or HTML mode. Each
open file is represented by a tab at the top of the Document window. Any number of
files can be kept open at the same time, and you can switch between the open files
by clicking the appropriate tab.
➢ Tables
➢ Views
➢ Stored Procedures
➢ Functions
Database Diagrams
To create a new diagram right click Database diagrams and select New Diagram.
The Add Tables dialog enables to select one to all the tables that you want in the
visual diagram you are going to create. Visual Studio .NET looks at all the
relationships between the tables and then creates a diagram that opens in the
Document window. Each table is represented in the diagram and a list of all the
columns that are available in that particular table. Each relationship between tables
is represented by a connection line between those tables. The properties of the
relationship can be viewed by right clicking the relationship line.
Tables
The Server Explorer allows to work directly with the tables in SQL Server. It gives
a list of tables contained in the particular database selected.
By double clicking one of the tables, the table is seen in the Document window. This
grid of data shows all the columns and rows of data contained in the particular table.
The data can be added or deleted from the table grid directly in the Document
window. To add a new row of data , move to the bottom of the table and type in a
new row of data after selecting the first column of the first blank row. You can also
delete a row of data from the table by right clicking the gray box at the left end of
the row and selecting Delete.
To run queries against the tables in Visual Studio .NET, open the view of the query
toolbar by choosing View->Toolbars->Query.
To query a specific table, open that table in the Document window. Then click the
SQL button which divides the Document window into two panes-one for query and
other to show results gathered from the query.
Views
To create a new view , right-click the View node and select New View. The Add
Table dialog box enables to select the tables from which the view is produced. The
next pane enables to customize the appearance of the data in the view.
FORMS:
A form is used to view and edit information in the database
record by record .A form displays only the information we want to see in the way
we want to see it. Forms use the familiar controls such as textboxes and checkboxes.
This makes viewing and entering data easy.
Views of Form:
We can work with forms in several primarily there are two
views,
They are,
1. Design View
2. Form View
1.Design View
To build or modify the structure of a form, we work in forms
design view. We can add control to the form that are bound to fields in a table or
query, includes textboxes, option buttons, graphs and pictures.
2.Form View
The form view which display the whole design of the form.
REPORT:
A report is used to vies and print information from the database. The
report can ground records into many levels and compute totals and average by
checking values from many records at once. Also the report is attractive and
distinctive because we have control over the size and appearance of it.
MACRO :
A macro is a set of actions. Each action in macros does something. Such as
opening a form or printing a report .We write macros to automate the common tasks
the work easy and save the time.
CHAPTER 4
SYSTEM DESIGN & IMPLEMENTATION
4.1 System design:
System Design is the process of making the newly designed
system fully operational and consistent in performance. The following steps has been
followed in the implementation of the system.
1 Implementation in planning
2 User Training
As the part of implementation, the system is taken the site and
Loaded on to client’s computer. Some of the user’s level, exposure to computer etc.
These users are trained first and they run the system for a month. These users are
trained first and they can run the system for a week. After installation of software,
the hardware specifications are checked. If hardware specifications are satisfactory,
then the software is loaded for pilot run. User training starts at this time itself. Users
will be given a user manual, which documents how to use the system and all the
exception handling procedures.
The data flow diagram (DFD) is one of the most important tools used by system
analysis. Data flow diagrams are made up of number of symbols, which represents
system components. Most data flow modeling methods use four kinds of symbols:
Processes, Data stores, Data flows and external entities. These symbols are used to
represent four kinds of system components. Circles in DFD represent processes.
Data Flow represented by a thin line in the DFD and each data store has a unique
name and square or rectangle represents external entities.
To construct a Data Flow Diagram, we use
➢ 1.Arrow
➢ 2.Circles
➢ 3.Open End Box
➢ 4.Squares
An arrow identifies the data flow in motion. It is a pipeline through which
information is flown like the rectangle in the flowchart. A circle stands for process
that converts data into information. An open – ended box represents a data store,
data at rest or a temporary repository of data. A square defines a source or destination
of system data.
The rules for constructing a Data Flow Diagram are:
1.Arrows should not cross each other
2.Squares, circles and files must bear names
3.Decomposed data flow squares and circles
Fig 4.2 Data flow diagram for message Authentication
The filename of the file to be searched is used as input for searching. The file is
searched in the peers routing table database. If the file is found in the routing table
database, its visit count field is checked. If the visit count exceeds the given limit
viz.3,then it is often requested file so its location is found in the UIM(cache memory)
of the requesting peer pi for a certain period of time.
If the file is not found in its routing table then the file is searched in all the connected
peers. The peer pj containing the file sends the response to the requesting peer p i.
Simultaneously the sharing files of the peer p j are updated in the peer pi’s routing
table for future reference.
4.9.4 HMAC
HMAC is a MAC derived from a cryptographically safe hash-function.
The hash fuctions (MD5, SHA-1) execute faster in software than symmetric block
ciphers. The library code for cryptographic hash functions is widely available. there
are export restrictions from the USA for some block ciphers, bot none for hash-
functions, HMAC is the ”mandatory-to-implement” MAC for IP Security.HMAC
is used widely, e.g. in SSL. Basically HMAC is a way to incorporate a secret key
into an existing hash function.
4.10. MODULES
1. Symmetric Encryption and Decryptions
2. Hmac Implementation
3.Stream Cipher Implementation
Review
Review
Review
Review
Review
Completed
Completed
Completed
Completed
Completed
Completed
System Requirements
Software Requirements Analysis
Preliminary Design
Detail Design
Maintain Software
Output Testing
CHAPTER 5
TESTING
5.1 TESTING
The purpose of testing is to discover errors. Testing is the
process of trying to discover every conceivable fault or weakness in a work product.
It provides a way to check the functionality of components, sub assemblies,
assemblies and/or a finished product It is the process of exercising software with the
intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types of
test. Each test type addresses a specific testing requirement.
CHAPTER 6
SYSTEM MAINTENANCE
CHAPTER 7
CONCLUSION
7.1 CONCLUSION
A complete highly compact MAC implementation, based on stream
ciphering, was implemented successfully in this project. The principle was to
implement a hash transformation based on the stream cipher, where the strength of
the hash is associated with the underlying security of the cipher. This implementation
was the purpose of satisfying the specification for a transition from the one-way
transformation to the iteration procedure. The hash is then utilized to implement
HMAC, based on standard procedures. The principle was implemented a hash
transformation based on the stream cipher, where the strength of the hash is
associated with the underlying security of the cipher. The proposed system removes
the inefficiencies of the existing system. This will help make effective changes in
the resources quickly and reduce network bottle-necks. The use of this system is
with GUI we authenticate the user. Messages encrypted will be decrypted to retrieve
the original message. Hash verification done at incoming data.
CHAPTER 8
FUTURE ENHANCEMENT
8.1 Future Enhancement:
Security and privacy are the inherent problems in RFID
communications. A new ultra lightweight RFID authentication protocol
that provides strong authentication and strong integrity protection of its
transmission and of updated data. The protocol requires only simple bit-wise
operations on the tag and can resist all the possible attacks. These features make it
very attractive to low-cost RFIDs and very low-cost RFIDs.