Download presentation
Presentation is loading. Please wait.
Published byNorman Black Modified over 7 years ago
1
IP Security Q. What is IPSec ? Explain its application benefits and the authentication header ? What is IPSec mode of operation ? Q. Describe the IPSec document in detail ? Q. What is Security association ? Define its parameters ? Q. Explain 2 modes of IPSec ? Q. What is authentication header ? Explain in detail ?
2
IP Security IP security (IPSec) is a capability that can be added to either current version of Internet Protocol (IPv4 or IPv6 ) by means of additional headers. IPSec encompasses three functional areas : Authentication, confidentiality, and key management. Authentication make use of HMAC message authentication code. Authentication can be applied to the original IP packet (tunnel mode ) or to all of the packet except for the IP header (transport mode).
3
IP Security Confidentiality is provided by an encryption format known as encapsulating security payload . Both tunnel and transport modes can be accommodated. IPSec defines a number of techniques for key management.
4
IP Security Overview IAB (Internet architecture board) included authentication and encryption as necessary security features in next-generation IP. Generally issued in IPv6. Capabilities were deigned to be usable both with current IPv4 and the future IPv6. Applications of IPSec IPSec provides secure communication across LAN, private WAN, public WAN, and Internet.
5
IP Security Overview Examples are
Secure branch office connectivity over the Internet : Company can build a secure VPN over the Internet or over a public WAN. Enables a business to rely heavily on Internet and reduce its need for private network, saving costs and network management overhead. Secure remote access over the Internet : End user with IP Security protocols with help of ISP can gain access to a company network. Reduces the cost of travelling employees and other communication charges (Telephones).
6
IP Security Overview Establishing extranet and intranet connectivity with partners : IPSec can be used for secure communication with other organizations, ensuring authentication and confidentiality and provides a key exchange mechanism. Enhancing electronic commerce security : Generally web and e-commerce applications have built-in security protocols. Use of IPSec enhances that security.
7
IP Security Overview Main feature of IPSec which enables it to support these applications is that it can encrypt and/or authenticate all traffic at the IP level. Therefore distributed application like remote logon, client/server, , file transfer, web access etc can be secured. Fig shows a typical scenario of IPSec usage. An organization maintains LAN’s at dispersed locations with non secure IP traffic on each LAN. For traffic offsite, IPSec protocols are used. These protocols operates in networking devices such as router, firewall etc. that provide connectivity with outside world.
8
IP Security Overview
9
IP Security Overview IPSec networking device will encrypt and compress traffic going into the WAN, and decrypt and decompress traffic coming from WAN. Operation is transparent to workstation and Servers. Implementing IPSec protocol in user workstation will provide secure transmission facility to individual user. Benefits of IPSec : When Implemented in firewall or router, provides strong security which can be applied to all traffic crossing the perimeter. Traffic within company or workgroup does not incur security related processing overload.
10
IP Security Overview As IPSec lies below transport layer (TCP, UDP), it is transparent to applications. There is no need to change Software on user or server system for implementing IPSec in firewall or router. Also in end user system applications in upper layer is not affected. IPSec in firewall is resistant to bypass if all traffic from the outside must use IP. Firewall is the only means of entrance from Internet into organization.
11
IP Security Overview It is transparent to user also as training on security mechanism is not needed to user. It can also provide security for individual user if needed. This is useful for offsite workers and also for setting up a secure virtual sub network within an organization for sensitive application. Routing Applications : In addition of supporting end users and protecting premises systems and networks. IPSec also plays a crucial role in routing architecture.
12
IP Security Overview IPSec assure that
A router or neighbor advertisement comes from an authorized router A redirect message comes from the router to which the initial packet was sent A routing update is not forged
13
IP Security Architecture
The IPSec specification consist of various documents. It includes RFC 2401, 2402,2406, and 2408. -- RFC 2401 : An overview of security architecture. -- RFC 2402 : Description of packet authentication extension from IPv4 to IPv6. -- RFC 2406 : Description of packet encryption extension to IPv4 and IPv6. -- RFC : Specification of key management capabilities.
14
IP Security Architecture
Support for features such as authentication extension to IPv4 and IPv6. Packet encryption extension to IPv4 and IPv6, Key management capabilities etc. These are mandatory for IPv6 and optional for IPv4. In both cases, security features are implemented as extension headers that follows the main header. Extension header for authentication is known as Authentication Header. For encryption is known as Encapsulating Security Payload Header(ESP).
15
IP Security Architecture
In addition to these RFC additional draft have been published. The documents are divided into Seven groups as shown in fig. Architecture : Covers the general concepts, security requirements, definitions, and mechanisms defines IPSec technology. Encapsulating Security Payload (ESP) : It covers the packet format and general issues related to use of ESP for packet encryption and optionally, authentication.
16
IP Security Architecture
Fig : IPSec Document Overview
17
IP Security Architecture
Authentication Header (AH) : Covers the packet format and general issues related to the use of AH for packet authentication. Encryption Algorithm : A set of documents that describes how various encryption algorithms are used for ESP. Authentication Algorithm : A set of documents that describe how various authentication algorithms are used for AH and for authentication option of ESP. Key Management : Documents that describe key management schemes.
18
IP Security Architecture
Domain of Interpretation (DOI) : Contains values needed for the other document to relate to each other. It include identifier for approved encryption and authentication algorithms, as well as operational parameters such as key lifetime.
19
IPSec Services IpSec provides Security service at the IP layer.
Enables a system to select required security protocols, Determine the algorithms to use for the services. Place any cryptographic keys for requested services. Two protocols were used for security service. Authentication Protocol : designated by the header of the protocol, Authentication Header(AH). Combined encryption/authentication protocol : designated by the format of the packet for that protocol, Encapsulating Security payload (ESP).
20
IPSec Services Services are: Access Control Connectionless integrity
Data origin authentication Rejection of replayed packets . Confidentiality (encryption) Limited traffic flow confidentiality. Connectionless integrity. Assurance that received traffic has not been. modified. Integrity includes anti-reply defenses Limited traffic flow confidentiality : Ensures that information cannot be inferred simply by monitoring network traffic (traffic analysis attacks).
21
IPSec Services Table shows the services provided by AH and ESP Protocols. For ESP, there are two cases : with and without authentication option. Both AH and ESP are vehicles for access control. depending upon cryptographic keys and traffic flow management.
22
Security Associations
Q. What is security association ? Define its parameters. Security Associations : It is an key concept, appears in both authentication and confidentiality mechanism for IP. an SA is a one-way relationship between a sender and a receiver system If peer relationship needed, then two SA is required. an SA is used either for AH or for ESP but never for both
23
Security Associations
an SA is uniquely identified by three parameters Security Parameters Index (SPI) a bit string assigned to the SA carried in AH and ESP headers to allow the receiving party to select the SA which must be used to process the packet IP destination address currently only unicast address is allowed. i.e. address of an destination end point of SA i.e end-system or a network element (e.g., router). security protocol identifier indicates whether the SA is an AH or an ESP SA Hence in any IP packet, The SA is uniquely identified by destination address in IPv4 or IPv6 header and the SPI in the enclosed extension header (AH or ESP).
24
SA Parameters In each IPSec implementation there is an nominal security association database sequence number counter A 32 bit value used to generate the sequence no. field in AH or ESP headers. sequence counter overflow flag indicates whether overflow of the sequence number counter should prevent further transmission using this SA anti-replay window used to determine whether an inbound AH or ESP packet is a replay AH / ESP information algorithm, key, and related parameters used with AH or ESP
25
SA Parameters lifetime
a time interval or byte count after which this SA must be terminated protocol mode tunnel or transport mode path MTU any observed maximum transmission unit
26
SA Selectors IPSec provides user considerable security by having IPSec service applied to IP traffic. The means by which IP traffic is related to specific SAs is the nominal Security Policy database (SPD). SPD contains entries, subset of IP traffic and points to an SA for that traffic. In more complex environments , there may be multiple entries relates to a single SA or multiple SAs associated with single SPD entry.
27
SA Selectors Each SPD entry is defined by a set of IP and upper layer protocol field values, called selectors. Selectors are used to filter outgoing traffic in order to map it into a particular SA. Following are the general sequence for each IP Packet. Compare values of appropriate fields in the packet (Selector field) against the SPD to find matching SPD entry , which will point to zero or more SAs.
28
SA Selectors Determine the SA if any for this packet and its associated SPI(Security Parameter Index). Do the required IPSec processing (i.e. AH or ESP processing). Following selectors determines an SPD entry. Destination IP address : May be single IP address, an enumerated list or range of address or a wildcard address(mask). range of address and wildcard address is used to support more than one destination. Source IP address : May be single IP address, an enumerated list or range of address or a wildcard address(mask).
29
SA Selectors range of address or a wildcard address support more than one source system sharing the same SA. UserID : User identifier from Operating system This field is not in the IP or upper-layer header. It is availabe if IPSec is running on the same OS as a user. Data sensitivity level : Used for systems to provide information flow security. ( e.g. secret or unclassified. Transport layer protocol : Obtained from IPV4 or IPv6 next header field. Source and destination ports : TCP or UD ports value , enumerated list of ports, or wildcard port.
30
TRANSPORT MODE VS TUNNEL MODE
Discuss IPSec mode of operation ? Q. Distinguish Between two modes of IPSec ? IPSec in the transport mode does not protect the IP header; it only protects the information coming from the transport layer. IPSec in tunnel mode protects the original IP header.
31
Transport mode in action
provides protection primarily for upper layer protocols protection is applied to the payload of the IP packet ESP in transport mode encrypts and optionally authenticates the IP payload but not the IP header AH in transport mode authenticates the IP payload and selected fields of the IP header usually used between end-systems
32
Transport mode in action
When a host runs AH or ESP over IPv4 payload is the data that normally follows the IP header. For IPv6, payload is the data that normally follow both the IP header and any IPv6 extensions headers.
33
Transport mode in action
34
Tunnel mode in action Tunnel mode
provides protection to the entire IP packet the entire IP packet is considered as payload and encapsulated in another IP packet (with potentially different source and destination addresses) ESP in tunnel mode encrypts and optionally authenticates the entire inner IP packet AH in tunnel mode authenticates the entire inner IP packet and selected fields of the outer IP header usually used between security gateways (routers, firewalls)
35
Tunnel mode in action *
36
Authentication Header
Authentication header provides support for data integrity and authentication of IP packets. Data integrity ensures protection against undetected modification. Authentication enables end system or network device to authenticate the user or application and filter the traffic accordingly. Prevents the address spoofing attacks . AH also guards against the replay attack.
37
Authentication Header
Authentication is based on the use of a message authentication code (MAC) . Therefore two parties must share a secret key. Payload length length of AH (in 32 bit words) minus 2 e.g., default length of authentication data field is 96 bits or three 32 bit words. With a three-word fixed header, there a total of six-words in header, and payload length field has a value of 4 Reserved (16 bits) For future use. Security Parameters Index(32 bits): identifies the SA used to generate this header Sequence number (32 bits) : sequence number of the packet Authentication data (variable): a (truncated) MAC or Integrity Check value(ICV). Next header Payload length Reserved Security Parameters Index (SPI) Sequence number Authentication data (variable length) Next header type of header immediately following this header (e.g., TCP, IP, etc.)
38
Anti-replay service Explain Anti-replay Service ?
In Replay attack, attacker obtains a copy of an authenticated header and then transmits to an intended destination. The receipt of duplicate authenticated IP packet disrupt service or may have undesired consequence. Sequence number field is designed to thwart such attacks. Sequence number generation : When a new SA is established, the sender initializes a sequence number counter to 0.
39
Anti-replay service Each time the packet is sent, sender increments the counter by 1 and places value in sequence number field. Thus first value to be used is 1. If anti-replay is enabled then the sender must not allow the sequence number to cycle past 232 – 1 back to 0. Or it will create multiple packets with same sequence number. If limit of 232 – 1 is reached, sender should terminate SA and negotiate a new SA with a new key.
40
Anti-replay service IP is connectionless, and unreliable.
This protocol does not guarantee the in order packet delivery, and also not guarantee that all packet get delivered. Therefore IPSec authentication document dictates that receiver should implement a window size W. Default W=64.
41
Anti-replay service
42
Anti-replay service Right edge represents the highest sequence number N, received so far for a valid packet. Any packet with sequence number in range from N-W+1 to N has been correctly received (i.e. properly authenticated). Corresponding slot in window is marked as shown.
43
Anti-replay service Its processing
If received packet falls within window and is new, the MAC is checked, If packet is authenticated, corresponding slot in window is marked. If received packet is to the right of window and is new, the MAC is checked, If packet is authenticated, the window is advanced so the sequence number is the right edge of window, and corresponding slot in window is marked. If received packet is to the left of window, or if authentication fails, the packet is discarded; It is auditable event.
44
Integrity check Value Authentication data field value referred as Integrity check value. ICV is a message authentication code or a truncated version of a code produced by MAC algorithm. Specifications dictates that implementation must support HMAC –MD5-96 HMAC – SHA
45
Integrity check Value These are the HMAC algorithm in which one of them uses MD5 hash code and other uses SHA-1 hash code. In both algorithm, HMAC value is calculated and then truncated by using first 96 bits, this is an default length for the Authentication data field. the MAC is calculated over IP header fields that do not change in transit the AH header fields except the Authentication data field entire upper layer protocol data the fields not covered by the MAC are set to 0 for the calculation
46
Transport and Tunnel Mode
47
Transport and Tunnel Mode
There are two ways for IPSec authentication service can be used. First case authentication is provided directly between a server and client workstation. Workstation can be either on same network as the server on an external network. As long as workstation and server share a protected secret key, the authentication is secure. This mode uses a transport mode SA.
48
Transport and Tunnel Mode
In other case, a remote workstation authenticate itself to corporate firewall, either for accessing the entire internal network or the requested server does not support the authentication feature. This case uses a Tunnel mode.
49
Transport and Tunnel Mode
Fig a .) Before Applying AH
50
Transport and Tunnel Mode
We can see the scope of authentication provided by AH and the authentication header location for two modes. Fig a. Shows the typical IPv4 and IPv6 packets. In this case, IP payload is a TCP segment. or it may be a data unit of any other protocol that uses IP, such as UDP or ICMP. For Transport mode AH using IPv4, the AH is inserted after the original IP header and before the IP payload as shown in fig b.
51
Transport and Tunnel Mode
Authentication covers the entire packet, excluding mutable (variable) fields in the IPv4 header and are set to zero for MAC calculations. In the context of IPv6, AH is viewed as an end-to-end payload. i.e. it is not examined or processed by intermediate routers. Therefore, the AH appears after the IPv6 base header and hop-by-hop, routing, and fragment extension headers. Destination option extension header could appear before or after AH header depending upon semantics desired. Authentication covers the entire packet, excluding mutable fields that are set to zero for MAC calculations.
52
Transport and Tunnel Mode
Fig b. ) Transport Mode
53
Transport and Tunnel Mode
For Tunnel Mode AH, the entire original IP packet is authenticated , and the AH is inserted between the original IP header and a new IP header as shown in fig c. Inner IP header carries the ultimate source and destination addresses while an outer IP header may contain different IP addresses (e.g. addresses of firewalls or other security gateways). With tunnel mode, the entire inner packet, including the entire inner IP header is protected by AH. The outer IP header (in IPv6, the outer IP extension header) is protected except for mutable and unpredictable fields.
54
Transport and Tunnel Mode
Fig c .) Tunnel Mode
55
Encapsulating Security Payload
ESP provides confidentiality service, including confidentiality of message contents and limited traffic flow confidentiality. Optionally ESP can also provide an authentication service. ESP format : Shown in fig. It consist of various fields. Security Parameter Index (32 bits) : Identifies the SA. Sequence Number (32 bits) : Monolithically increasing counter value; Provide protection against replay attacks. Payload data (Variable) : It is an transport level segment (transport mode) or IP packet (tunnel mode)that is protected by encryption.
56
Encapsulating Security Payload
57
Encapsulating Security Payload
Padding (0-255 bytes) Pad Length (8 bits) : Indicates number of pads bytes immediately preceding this field. Next header (8 bits) : It identifies type of data in the payload data field, by simply identifying the first header in that payload. Authentication data (variable) : A variable-length field (integral number of 32-bits) that contains the integrity check value over the ESP packet minus the authentication data field.
58
Encryption and Authentication Algorithms
Payload data, Padding, Pad Length, and Next Header field are encrypted by the ESP services. If cryptographic synchronization data such as an initialization vector (IV) is required, then data get carried explicitly at the beginning of payload data field. If included, IV is usually not encrypted. There are number of algorithms assigned for encryption; These includes Three-key triple DES. RC5 Three-key triple IDEA CAST Blowfish.
59
Encryption and Authentication Algorithms
ESP supports the use of MAC with default length of 96 bits. Specification dictates that implementation must support HMAC- MD5-96 and HMAC-SHA-1-96. Concept of Padding : Padding serve for several purpose If an encryption algorithm requires plaintext to be multiple of some bytes, the padding field is used to expand the plaintext to be of required length. ESP format require Pad Length and next Header fields be right aligned within a 32-bit word. It is also require for partial traffic flow confidentiality.
60
Transport and Tunnel Mode
There are two ways in which IPSec ESP service can be used. One technique provides encryption directly between two hosts as shown in fig a. Fig b. shows how tunnel mode operation for setting Virtual private network. Fig a : Transport-level Security
61
Transport and Tunnel Mode
Fig b : Virtual Private Network via Tunnel mode
62
Transport and Tunnel Mode
As shown in fig, An organization has four private networks interconnected across the internet. Hosts on the internal networks use the Internet for transport of data. Transport mode ESP : Transport mode ESP is used to encrypt and optionally authenticate the data carried by IP (e.g. TCP segment) as shown in fig a. In transport mode using IPv4, the ESP header is inserted into the IP packet immediately prior to the transport layer header (e.g. TCP,UDP, ICMP) and an ESP trailer (Padding, Pad Length, and next header fields) is placed after the IP packet.
63
Transport and Tunnel Mode
65
Transport and Tunnel Mode
If authentication is selected, the ESP Authentication data field is added after the ESP trailer. Entire transport-level segment + ESP trailer are encrypted. Authentication covers all of the ciphertext + ESP header. In IPv6 context, ESP is viewed as an end-to-end payload, i.e. it is not examined or processed by intermediate routers. Therefore ESP header appears after IPv6 base header and hop-by-hop, routing, and fragment extension headers. Destination option extension header could appear before or after the ESP header, depending on semantics desired.
66
Transport and Tunnel Mode
For Ipv6, encryption covers the entire transport-level segment + the ESP trailer + destination options header if occurs after the ESP header. Authentication covers the ciphertext + the ESP header.
67
Tunnel mode ESP Tunnel mode ESP : Use to encrypt an entire IP packet as shown. For this ESP header is prefixed to packet and then the packet + ESP trailer is encrypted. It is necessary to encapsulate entire packet as IP header contains destination address + routing directives + hop by hop option information.
68
Tunnel mode ESP it is not simply to transmit the encrypted IP packet prefixed by a ESP header. Intermediate routers would be unable to process such a packet. Therefore, it is necessary to encapsulate the entire block
71
Combining Security Associations
An individual SA can implement either in AH or ESP protocol but not both. Some traffic flow may require services provided by both AH and ESP. Sometime a traffic flow require IPSec services between hosts and, for that same flow, separate service between security gateway e.g. in firewalls. For all these cases multiple SAs must be employed for same traffic to achieve the desired IPSec services.
72
Combining Security Associations
Security association bundle refers to a sequence of SAs. SAs are combined in bundles in two ways. Transport adjacency : Applying more than one security protocol to the same IP packet without tunneling . -- Combining AH and ESP allows for only one level of combination. Iterated tunneling : Refers to application of multiple layers of security protocols effected through IP tunneling. -- allows multiple levels of nesting as each tunnel can originate or terminate at different IPSec site along path.
73
Authentication Plus Confidentiality
Encryption and authentication can be combined to transmit IP packet which can have confidentiality and authentication between hosts. There are various approaches. ESP with Authentication option :
74
Authentication Plus Confidentiality
The user first applies ESP to data to be protected and then appends the authentication data field. It has two subclasses. Transport mode ESP : Authentication and encryption apply to the IP payload delivered to host, but IP header is not protected. Tunnel mode ESP : Authentication applies to the entire IP packet delivered to the outer IP destination address (e.g. firewall) and authentication is performed at the destination. -- Entire inner packet is protected. For both cases, authentication applies to ciphertext rather the plaintext.
75
Authentication Plus Confidentiality
Basic combinations of Security Associations. IPSec Architecture document lists four examples of combinations of SAs . Case 1 : All security is provided between end systems that implements IPSec. For communication between two end system using SA, they must share the appropriate secret key. Among the possible combinations. AH in transport mode. ESP in transport mode ESP followed by AH in transport mode (an ESP SA inside an AH SA). Any one of a,b, or c inside AH or ESP in tunnel mode.
76
Combining Security Associations
77
Combining Security Associations
Case 2 : Security is provided between gateways (routers, firewalls etc) and no host implement IPSec. It represent simple virtual private network support. Security architecture document specifies that only a single tunnel SA is needed for this case. Tunnel could support AH, ESP, or ESP with authentication. Nested tunnels are not required because the IPSec services apply to the entire inner packet.
78
Combining Security Associations
79
Combining Security Associations
Case 3 : It is build on Case 2 by adding end-to-end security. Similar to case 1 and case 2 combinations. Gateway-to –gateway tunnel provides either authentication or confidentiality or both for all traffic between end systems. When gateway-to-gateway tunnel is ESP, it also provides a limited form of traffic confidentiality. Host can implement any additional IPSec services required by user or application, by means of end-to-end SAs.
80
Combining Security Associations
81
Combining Security Associations
Case 4 : It provide a support for remote host that uses the Internet to reach an organization’s firewall and then gain access to some server or workstation behind the firewall. Only tunnel mode is required between the remote host and the firewall, and one or two SAs may be used between the remote host and the local host.
82
Combining Security Associations
83
Key Management Key management involves the determination and distribution of secret key. It require four keys for communication between two applications: i.e. transmit and receive pairs for both AH and ESP. IPSec architecture document mandates support for two types of key management. Manual : System admin manually configures each system with its own keys and with keys of other communications system. It is practical for small, relatively static environments.
84
Key Management Automated : Automated system enables the on-demand creation of keys for SAs and facilitates the use of keys in large distributed systems. Automated key management protocol for IPSec is referred as ISAKMP/Oakley and it consist of elements such as. Oakley Key Determination Protocol : Oakley is a key exchange protocol based on Diffie-Hellman algorithm but it also provide added security. Oakley is generic as it does not dictate any specific format.
85
Key Management Internet Security Association and Key Management Protocol (ISAKMP) : ISAKMP provide a framework for Internet key management and provides the specific protocol support, including formats, for negotiation of security attributes.
86
ESP Tunnel Mode Encrypted Authenticated (optionally)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.