CNS Chapter 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Cryptography and Network Security VVFGC, Tumkur

Chapter - 4

Security at Network Layer


Syllabus:

IP Security- Overview of Architecture and services of IP Security, Authentication Header,


Encapsulating Security Payload combining Security Associations, Security Policy, Key
Management.

What is computer security?

Computer security basically is the protection of computer systems and information


from harm, theft, and unauthorized use. It is the process of preventing and detecting
unauthorized use of your computer system.

IP Security:

IP Security is one of the Information security. To implement this IP Security by 2 protocols.

They are

o Encapsulating Security Pay Load (ESP)

o Authentication Header (AH)

Services Provided by IP Security:

Confidentiality:

It deals with user’s privacy data it ensures that unauthorized persons cannot access the
data.

Authentication:

It verifies user’s identity then only receiver believes that message or data is come
from original source.

Integrity:

It ensures that data should not be altered during transmission.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page1


Cryptography and Network Security VVFGC, Tumkur

IP Security Architecture
Components of IP Security:

It has the following components:

1. Encapsulating Security Payload (ESP) :

It provides data integrity, encryption, authentication and anti replay. But it mainly

concentrates Confidentiality using “Cryptographic or encryption algorithms”.

2. Authentication Header (AH) –

It also provides data integrity, authentication and anti replay by using Authentication

algorithms. It does not protect data’s confidentiality.

3. DOI (Domain of Interpretation)

It interprets the data from ESP and AH Protocols.

4. Key Management:

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page2


Cryptography and Network Security VVFGC, Tumkur

It deals with Key. If it is symmetric encryption how the key will be exchanged

between the sender and receiver. If it is asymmetric how the key are used these are te

tings managed by this module.

Security Association (SA)


It is an association between client and server and it is a one way communication.

If client wants to communicate with server must and should client can have Security

Association. In the same way server side also.

Parameters involved in SA:

1) Security Parameter Index: (SPI)

It can be used by 2 protocols of IP Security. It is an unique number given to every

Security Association (SA).

2) IP Destination Address:

It stores the destination System IP address.

3) Protocol Identifier:

It identifies which protocol is used by SA either ESP or AH.

Security Association Database (SAD)


All the Security Associations will be maintained in SAD.

Parameters involved in SAD:

o Security Parameter Index: (SPI)

It can be used by 2 protocols of IP Security. It is a unique number given to every

Security Association (SA).

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page3


Cryptography and Network Security VVFGC, Tumkur

o Sequence Number Counter:

Each and every packet which is allocated by one number.

o Sequence Number Overflow:

It indicates where we have to stop sending messages.

o Anti replay window:

It is used to avoid receiving of duplicate packets. If the same packet is received by

receiver then it sends a replay message to sender.

o AH Information:

Authentication Header in this we will get all types of signature algorithms like

authentication, integrity algorithms etc.

o ESP Information:

Encapsulating security payload, here we have all cryptographic algorithms like

symmetric or asymmetric etc.

o Life time of SA:

Every SA will have life time; if the life time is expired then we have to recreate the

SA.

o IP Security Protocol Mode:

It specifies SA will use either Transport Mode or Tunnel Mode can be implemented

by both ESP or AH Protocols.

IP Security Protocols

ESP:[ Encapsulating Security Payload ]


It will be implemented in 2 ways. They are

o ESP with optional Authentication.

o ESP with Authentication.

AH: [Authentication Header]

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page4


Cryptography and Network Security VVFGC, Tumkur

It will be implemented in only one way.

o Authentication along with Integrity.

Authentication Header Protocol

General Packet Format of AH Protocol:


The length of this AH Packet format is 32 bits.

Next Header:

It will store the next header of IPV4 header.

Payload Length:

It indicates actual data length.

Reserved Bits:

Some bits are used to reserve for future purpose.

SPI: (Security Parameter Index)

It is used to identify the SA.

Sequence Number:

It is identifying the packet.

Authentication Data:

After applying authentication algorithms, result of all these algorithms will produce
“authentication data”.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page5


Cryptography and Network Security VVFGC, Tumkur

IPV4 and IPV6 Header Formats of AH Protocol in Transport Mode


Before implementing Authentication header the general format of IPV4 and IPV6 is:

IPV4:

IPV6:

After implementing Authentication header the general format of IPV4 and IPV6 is:

IPV4:

IPV6:

IPV4 and IPV6 Header Formats of AH Protocol in Tunnel Mode


IPV4:

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page6


Cryptography and Network Security VVFGC, Tumkur

In the above format general format of IPV4 treated as “inner packet”. We can include new ip

header and AH into that then we can called it as “Tunnel mode Packet”.

And it will be send to the receiver.

IPV6:

In the above format general format of IPV6 treated as “inner packet”. We can include new ip

header, Extension Header and AH into that then we can called it as “Tunnel mode Packet”.

And it will be send to the receiver.

Encapsulating Security Pay Load Protocol (ESP)

General Packet Format of ESP Protocol:


The length of this ESP Packet format is 32 bits.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page7


Cryptography and Network Security VVFGC, Tumkur

Next Header:

It will store the next header of IPV6 header.

Payload Length:

It indicates actual data length.

SPI: (Security Parameter Index)

It is used to identify the SA.

Sequence Number:

It is identifying the packet.

Padding:

Process of adding Dummy bits to the data.

Padding Length:

It indicates length of the dummy bits.

Authentication Data:

Here it is an optional field because ESP implemented by 2 ways. If users can choose

with authentication mechanism then only this field is mandatory. Otherwise it is optional

field.

Note: In order to achieve Confidentiality we can use some Cryptographic Algorithms like if

it is symmetric use DES, 3DES etc., if is Asymmetric then use RES, CAST, IDEA etc

algorithms.

IPV4 and IPV6 Header Formats of ESP Protocol in Transport Mode


Before implementing ESP header the general format of IPV4 and IPV6 is:

IPV4:

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page8


Cryptography and Network Security VVFGC, Tumkur

IPV6:

After implementing ESP header the general format of IPV4 and IPV6 is:

IPV4:

IPV6:

IPV4 and IPV6 Header Formats of ESP Protocol in Tunnel Mode


IPV4:

In the above format general format after implementing ESP protocol of IPV4 treated as

“inner packet”. We can include new ip header into that then we can called it as “Tunnel mode

Packet”.

And it will be send to the receiver.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page9


Cryptography and Network Security VVFGC, Tumkur

IPV6:

In the above format general format after implementing ESP protocol of IPV6 treated as

“inner packet”. We can include new ip header into that then we can called it as “Tunnel mode

Packet”.

And it will be send to the receiver.

Anti Replay Service


What is Replay Attack?

Replay Attack is a type of security attack to the data sent over a network.

In this attack, the hacker or any person with unauthorized access, captures the traffic and

sends communication to its original destination, acting as the original sender. The receiver

feels that it is an authenticated message but it is actually the message sent by the attacker.

The main feature of the Replay Attack is that the receiver would receive the message twice,

hence the name, Replay Attack.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page10


Cryptography and Network Security VVFGC, Tumkur

Prevention from Replay Attack:

1. Timestamp method –

Prevention from such attackers is possible, if timestamp is used along with the data.

Supposedly, the timestamp on a data is more than a certain limit, it can be discarded,

and sender can be asked to send the data again.

2. Session key method –

Another way of prevention, is by using session key. This key can be used only once (by

sender and receiver) per transaction, and cannot be reused.

3. Acknowledgement-

Here receiver sends 2 types of acknowledgements they are positive and another one is

negative.

Whenever receiver sends a negative acknowledgement the sender understood it is a

duplicate frame or damaged frame then it resolve the problem.

4. Sender initializes sequence number to 0 when a new SA is established, increment for each

packet.

5. If receiver receives duplicate packet then it checks the packet sequence number if it is

already there, then it dropped.

Key Management
Key Management is related to determination and distribution of secret keys.

There are 2 modes of key management. They are

 Manual:

In this manually configures each system with its own keys.

 Automated :

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page11


Cryptography and Network Security VVFGC, Tumkur

It enables the on demand creation of keys for Security Associations and use of keys. It can be

implemented by 2 protocols. They are

o Oakley Key Determination Protocol.

o Internet Security Association Key Management Protocol. [ISAKMP]

Oakley Key Determination Protocol:

Oakley is a refinement of the diffie-Hellman key exchange algorithm but providing added

security.

It does not specify specific formats.

Here secret keys created only when need. Exchange does not require any pre existing

infrastructure.

However Diffie-Hellman has got some weaknesses:

o No identity information about the parties is provided.

o It is possible for a man in the middle attack.

o When opponent requests high number of keys.

Internet Security Association Key Management Protocol. [ISAKMP]

 It is designed to carry message for IKE [Internet Key Exchange].

 It defines procedures and packet formats to establish, negotiate (transferring data),

modify and delete security associations.

 IKE defines payload for exchanging key generation and authentication data.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page12


Cryptography and Network Security VVFGC, Tumkur

ISAKMP Header Format

Initiator Cookie:

It is a 32 bit field, it defines the security association establishment, SA notification

and SA deletion.

Responder Cookie:

It is a 32 bit filed. It defines the cookie of responding entity.

Next Payload:

It is a 8 bit filed. It identifies imeediately followed by the header.

Major Version:

It is 4 bit filed. It defines major version of protocol.

Minor Version:

It is 4 bit filed. It defines minor version of protocol.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page13


Cryptography and Network Security VVFGC, Tumkur

Exchange Type:

It is 8 bit field. It indicates type of exchange by ISAKMP.

Flags:

It is 8 bit field, each bit is identifies whether it exchanged or not.

Message ID:

It is 32 bit field. It defines unique message id provided by protocol.

Length:

It defines basically length of the message.

ISAKMP Payload

Payloads are designed to carry the messages.

The generic payload header format is:

Types of Payloads

o SA Payload:

Used for starting the negotiation.

o Proposal Payload:

This contains information used during SA negotiation.

o Key exchange Payload:

This carries data used for generating keys.

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page14


Cryptography and Network Security VVFGC, Tumkur

o Transform Payload:

Defines a Security transformation to create secure channel.

o Identification Payload:

This carries the identification of communication process.

o Certification Payload:

It carries public keys and name of the users.

o Certification request Payload:

Used to request a certificate from other party.

o Hash Payload:

It carries data generated by hash functions.

o Signature Payload:

It carries data generated by signature functions.

o None Payload:

It indicates end of payload.

ISAKMP Exchanges

Base Exchange:

It allows key exchange and authentication material to be transmitted together.

Identity Protection:

It expands the Base Exchange to protect user’s identity.

Authentication only exchange:

Used to perform mutual authentication without key exchange.

Aggressive exchange:

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page15


Cryptography and Network Security VVFGC, Tumkur

Minimizes the number of exchanges.

Information exchange:

Used for one way transmission of information for SA management.

Security Policy
Another important aspect of IP Security is the Security Policy, which defines the type of

security applied to a packet when it is to be sent or received.

Security Policy Database: (SPD)

Each SPD entry is defined by a set of IP and upper layer protocol field values, called

selectors.

Following are 6 fields in SPD entry:

o Remote IP Address:

This is an IP address which is not related to the range of network.

o Source IP Address:

It is related to Source system IP address.

o User ID:

It identifies user identification.

o Data Sensitivity Level:

Used for systems providing information flow security.

o Transport Layer Protocol:

This may be an individual protocol number, list of protocol numbers or range of

protocol numbers.

o Source and Destination Ports:

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page16


Cryptography and Network Security VVFGC, Tumkur

These may be individual TCP or UDP port values.

There are 2 types of SPDs. They are

Outbound SPD:

When a packet is to be sent out, the outbound SPD is consulted.

In bound SPD:

When a packet arrives the inbound SPD is consulted.

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

Prepared By: K C Silpa, Asst.Prof. Dept. of BCA Page17

You might also like