Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Internet.Security

.pdf
Скачиваний:
30
Добавлен:
10.02.2015
Размер:
3.75 Mб
Скачать

240

INTERNET SECURITY

Verify that the subject name and subject alternative name extension are consistent with the excluded subtree state variables.

Verify that policy information is consistent with the initial policy set:

– If the explicit policy state variable is less than or equal to x, a policy identifier in the certificate should be in the initial policy set.

– If the policy-mapping variable is less than or equal to x, the policy identifier may not be mapped.

Verify that policy information is consistent with the acceptable policy set:

 

– If the certificate policies extension is marked as critical, the intersection of the

 

 

 

 

 

Y

 

policies extension and the acceptable policy set will be non-null.

 

– The acceptable policy set is assigned the resulting intersection as its new value.

 

 

 

F

Verify that the intersection of the acceptable policy set and the initial policy set is

 

non-null.

 

 

M

 

Recognise and process any other critical extension present in the certificate.

Verify that the certificate is a CA certificate asLspecified in a basic constraints extension

 

or as verified out of band.

 

 

If permittedSubtrees is

present in the certificate, set the constrained subtree state

 

 

 

E

 

 

variable to the intersection of its previous value and the value indicated in the exten-

 

sion field.

T

 

 

If excludedSubtrees is presentAin the certificate, set the excluded subtree state variable

to the union of its previous value and the value indicated in the extension field.

If a policy constraints

extension is included in the certificate, modify the explicit

policy and policy-mapping state variable as follows:

– If the required explicit policy is present and has value r, the explicit policy state variable is set to the minimum of its current value and the sum of r and x.

– If the inhibited policy mapping, whose value is q, is present, the policy-mapping state variable is set to the minimum of its current value and the sum of q and x.

If a key usage extension is marked as critical, ensure the KeyCertSign bit is set.

If any one of the above checks fails, the procedure terminates, returning a failure indication and an appropriate reason; if none of the above checks fail on the end-entity certificate, the procedure terminates, returning a success indication together with the set of all policy qualifier values encountered in the set of certificates.

6.7.2 Extending Path Validation

The path validation algorithm presented in Section 6.7.1 is based on a simplifying assumption, i.e. a single trusted CA that starts all valid paths. This algorithm can be extended for multiple trusted CAs by providing a set of self-signed certificates to the validation module. In this case, a valid path could begin with any one of the self-signed certificates. Limitations in the trust paths for any particular key may be incorporated into the self-signed certificate’s extensions. In this way, the self-signed certificates permit the path validation module to automatically incorporate local security policy and requirements.

Team-Fly®

PUBLIC-KEY INFRASTRUCTURE

241

It is also possible to specify an extended version of the above certification path processing procedure which results in a default behaviour identical to the rules of PEM of REC 1422. In this extended version, additional inputs to the procedure are a list of one or more PCA names and an indicator of the position in the certification path where the PCA is expected. At the nominated PCA position, if the CA name is found, then a constraint of SubordinateToCA is implicitly assumed for the remainder of the certification path and processing continues. If no valid PCA name is found, and if the certification path cannot be validated on the basis of identified policies, then the certification path is considered invalid.

The PKI scheme discussed in this chapter is chiefly embodied in the US scheme of public-key infrastructure. After the appearance of the US version, several countries devised their own PKI systems, mostly derived from many of the principles and system architectures originating from the US PKI scheme. These systems are:

USA: Federal Public Key Infrastructure (FPKI)

Europe: European Trusted Service (ETS) and Internetworking Public Key Certification of Europe (ICE-TEL)

Australia: Public Key Authentication Framework (PKAF)

Canada: Government of Canada Public Key Infrastructure (GoC-PKI) Korea: GPKI for government sector and NPKI for Civilian sector

It will be worthwhile for readers to examine each country’s PKI system through its Website.

7

Network Layer Security

TCP/IP communication can be made secure with the help of cryptography. Cryptographic methods and protocols have been designed for different purposes in securing communication on the Internet. These include, for instance, the SSL and TLS for HTTP Web traffic, S/MIME and PGP for e-mail and IPsec for network layer security. This chapter mainly addresses security only at the IP layer and describes various security services for traffic offered by IPsec.

7.1 IPsec Protocol

IPsec is designed to protect communication in a secure manner by using TCP/IP. The IPsec protocol is a set of security extensions developed by the IETF and it provides privacy and authentication services at the IP layer by using modern cryptography.

To protect the contents of an IP datagram, the data is transformed using encryption algorithms. There are two main transformation types that form the basics of IPsec, the Authentication Header (AH) and the Encapsulating Security Payload (ESP). Both AH and ESP are two protocols that provide connectionless integrity, data origin authentication, confidentiality and an anti-replay service. These protocols may be applied alone or in combination to provide a desired set of security services for the IP layer. They are configured in a data structure called a Security Association (SA).

The basic components of the IPsec security architecture are explained in terms of the following functionalities:

Security Protocols for AH and ESP

Security Associations for policy management and traffic processing

Manual and automatic key management for the Internet Key Exchange (IKE), the Oakley key determination protocol and ISAKMP.

Algorithms for authentication and encryption

Internet Security. Edited by M.Y. Rhee

2003 John Wiley & Sons, Ltd ISBN 0-470-85285-2

244

INTERNET SECURITY

The set of security services provided at the IP layer includes access control, connectionless integrity, data origin authentication, protection against replays and confidentiality. The modularity which is designed to be algorithm independent permits selection of different sets of algorithms without affecting the other parts of the implementation.

A standard set of default algorithms is specified to facilitate interoperability in the global Internet. The use of these algorithms in conjunction with IPsec traffic protection and key management protocols is intended to permit system and application developers to deploy high-quality, Internet layer, cryptographic security technology. Thus, the suite of IPsec protocols and associated default algorithms is designed to provide high-quality security for Internet traffic.

An IPsec implementation operates in a host or a security gateway environment, affording protection to IP traffic. The protection offered is based on requirements defined by a Security Policy Database (SPD) established and maintained by a user or system administrator.

IPsec provides security services at the IP layer by enabling a system to select the required security protocols, determine the algorithms to use for the services, and put in place any cryptographic keys required to provide the requested service. IPsec can be used to protect one or more paths between a pair of hosts, between a pair of security gateways (routers or firewalls) or between a security gateway and a host.

7.1.1 IPsec Protocol Documents

This section will discuss the protocols and standards which apply to IPsec. The set of IPsec protocols is divided into seven groups as illustrated in Figure 7.1.

In November 1998, the Network Working Group of the IETF published RFC 2411 for IP Security Document Roadmap. This document is intended to provide guidelines for the development of collateral specifications describing the use of new encryption and authentication algorithms used with the AH protocol as well as the ESP protocol. Both these protocols are part of the IPsec architecture. The seven-group documents describing the set of IPsec protocols are explained in the following:

Architecture: The main architecture document covers the general concepts, security requirements, definitions and mechanisms defining IPsec technology.

ESP : This document covers the packet format and general issues related to the use of the ESP for packet encryption and optional authentication. This protocol document also contains default values if appropriate, and dictates some of the values in the Domain of Interpretation (DOI).

AH : This document covers the packet format and general issue related to the use of AH for packet authentication. This document also contains default values such as the default padding contents, and dictates some of the values in the DOI document.

Encryption algorithm: This is a set of documents that describe how various encryption algorithms are used for ESP. Specifically:

Specification of the key sizes and strengths for each algorithm.

Any available estimates on performance of each algorithm.

General information on how this encryption algorithm is to be used in ESP.

NETWORK LAYER SECURITY

245

Main architecture

ESP

 

AH

protocol

 

protocol

 

 

 

Encryption

Authentication

algorithm

algorithm

 

DOI

Key management

Figure 7.1 Document overview that defines IPsec.

Features of this encryption algorithm to be used by ESP, including encryption and/or authentication.

When these encryption algorithms are used for ESP, the DOI document has to indicate certain values, such as an encryption algorithm identifier, so these documents provide input to the DOI.

Authentication algorithm: This is a set of documents that describe how various authentication algorithms are used for AH and for the authentication option of ESP. Specifically:

Specification of operating parameters such as number of rounds, and input or output block format.

Implicit and explicit padding requirements of this algorithm.

Identification of optional parameters/methods of operation.

Defaults and mandatory ranges of the algorithm.

Authentication data comparison criteria for the algorithm.

246

INTERNET SECURITY

Key management : This is a set of documents that describe key management schemes. These documents also provide certain values for the DOI. Currently the key management represents the Oakley, ISAKMP and Resolution protocols.

DOI : This document contains values needed for the other documents to relate each other. These include identifiers for approved encryption and authentication algorithms, as well as operational parameters such as key lifetime.

7.1.2Security Associations (SAs)

An SA is fundamental to IPsec. Both AH and ESP make use of SAs. Thus, the SA is a key concept that appears in both the authentication and confidentiality mechanisms for IPsec. An SA is a simplex connection between a sender and receiver that affords security services to the traffic carried on it. If both AH and ESP protection are applied to a traffic stream, then two SAs are required for two-way secure exchange.

An SA is uniquely identified by three parameters as follows:

Security Parameters Index (SPI): This is assigned to each SA, and each SA is identified through an SPI. A receiver uses the SPI to identify the security association for a packet. Before a sender uses IPsec to communicate with a receiver, the sender must know the index value for a particular SA. The sender then places the value in the SPI field of each outgoing datagram. The SPI is carried in AH and ESP headers to enable the receiver to select the SA under which a received packet is processed. However, index values are not globally specified. A combination of destination address and SPI is needed to identify an SA.

IP Destination Address: Because, at present, unicast addresses are only allowed by IPsec SA management mechanisms, this is the address of the destination endpoint of the SA. The destination endpoint may be an end-user system or a network system such as a firewall or router.

Security Protocol Identifier: This identifier indicates whether the association is an AH or ESP security association.

There are two nominal databases in a general model for processing IP traffic relative to SAs, namely, the Security Policy Database (SPD) and the Security Association Database (SAD). To ensure interoperability and to provide a minimum management capability that is essential for productive use of IPsec, some external aspects for the processing standardisation are required.

The SPD specifies the policies that determine the disposition of all IP traffic inbound or outbound from a host or security gateways, while the SAD contains parameters that are associated with each security association.

Security policy database

The SPD, which is an essential element of SA processing, specifies what services are to be offered to IP datagrams and in what fashion. The SPD is used to control the flow of all traffic (inbound and outbound) through an IPsec system, including security and key management traffic (i.e. ISAKMP). The SPD contains an ordered list of policy

NETWORK LAYER SECURITY

247

entries. Each policy entry is keyed by one or more selectors that define the set of all IP traffic encompassed by this entry. Each entry encompasses every indication mechanism for bypassing, discarding or IPsec processing. The entry for IPsec processing includes SA (or SA bundle) specification, limiting the IPsec protocols, modes and algorithms to be employed.

Security association database

The SAD contains parameters that are associated with each security association. Each SA has an entry in the SAD. For outbound processing, entries are pointed to by entries in the SPD. For inbound processing, each entry in the SAD is indexed by a destination IP address, IPsec protocol type and SPI.

Transport mode SA

There are two types of SAs to be defined: a transport mode SA and a tunnel mode SA. A transport mode provides protection primarily for upper-layer protocols, i.e. a TCP packet or UDP segment or an Internet Control Message Protocol (ICMP) packet, operating directly above the IP layer. A transport mode SA is a security association between two hosts. When a host runs AH or ESP over IPv4, the payload is the data that normally follows the IP header. For IPv6, the payload is the data that normally follows both the IP header and any IPv6 extension headers. In the case of AH, AH in transport mode authenticates the IP payload and the protection is also extended to selected portions of the IP header, selected portions of IPv6 extension headers and the selected options.

In the case of ESP, ESP in transport mode primary encrypts and optionally authenticates the IP payload but not the IP header. A transport mode SA provides security services only for higher-layer protocols, not for the IP header or any extension headers proceeding the ESP header.

Tunnel mode SA

Tunnel mode provides protection to the entire IP packet. A tunnel mode SA is essentially an SA applied to an IP tunnel. Whenever either end of an SA is a security gateway, the SA must be tunnel mode, as is an SA between a host and a security gateway. Note that a host must support both transport and tunnel modes, but a security gateway is required to support only tunnel mode. If a security gateway supports transport mode, it should be used as an acting host. But in this case, the security gateway is not as acting a gateway.

When the entire inner (original) packet travels through a tunnel from one point of the IP network to another, routers along the path are unable to examine the inner IP header because the original inner packet is encapsulated. As a result, the new larger packet will have totally different source and destination addresses. When the AH and ESP fields are added to the IP packet, the entire packet plus security field (AH or ESP) is treated as the new outer IP packet with a new outer IP header.

ESP in tunnel mode encrypts and optionally authenticates the entire inner IP packet, including the inner IP header. AH in tunnel mode authenticates the entire inner IP packet and selected portions of the outer IP header.

248

INTERNET SECURITY

7.1.3Hashed Message Authentication Code (HMAC)

A mechanism that provides a data integrity check based on a secret key is usually called the Message Authentication Code (MAC). An HMAC mechanism can be used with any iterative hash functions in combination with a secret key. MACs are used between two parties (e.g. client and server) that share a secret key in order to validate information transmitted between them. An MAC mechanism based on a cryptographic hash function is called HMAC. MD5 and SHA-1 are examples of such hash functions. HMAC uses a secret key for computation and verification of the message authentication values. The MAC mechanism should allow for easy replacement of the embedded hash function in case faster or more secure hash functions are found or required. That is, if it is desired to replace a given hash function in an HMAC implementation, all that is required is simply to remove the existing hash function module and replace it with the new, more secure module. HMAC can be proven as secure provided that the underlying hash function has some reasonable cryptographic strengths.

Current candidates for secure hash functions include SHA-1, MD5 and RIPEMD-160. Hash functions such as MD5 and SHA-1 are generally known to execute faster in software than symmetric block ciphers such as DES-CBC. There has been a number of proposals for the incorporation of a secret key into an existing hash function. MD5 has been recently shown to be vulnerable to collision search attacks. Therefore, it seems that MD5 does not compromise its use within HMAC because it does not rely on a secret key. However, SHA-1 appears to be a cryptographically stronger function.

7.1.3.1HMAC Structure

HMAC is a secret-key authentication algorithm which provides both data integrity and data origin authentication for packets sent between two parties. Its definition requires a cryptographic hash function H and a secret key K. H denotes a hash function where the message is hashed by iterating a basic compression function on data blocks. Let b denote the block length of 64 bytes or 512 bits for all hash functions such as MD5 and SHA-1. h denotes the length of hash values, i.e. h = 16 bytes or 128 bits for MD5 and 20 bytes or 160 bits for SHA-1. The secret key K can be of any length up to b = 512 bits.

To compute HMAC over the message, the HMAC equation is expressed as follows: HMAC = H [(K opad)||H [(K ipad)||M]]

where

ipad = 00110110(0x36) repeated 64 times (512 bits) opad = 01011100(0x5c) repeated 64 times (512 bits) ipad is inner padding opad is outer padding

The following explains the HMAC equation:

1. Append zeros to the end of K to create a b-byte string (i.e. if K = 160 bits in length and b = 512 bits, then K will be appended with 352 zero bits or 44 zero bytes 0x00).

NETWORK LAYER SECURITY

249

2.XOR (bitwise exclusive-OR) K with ipad to produce the b-bit block computed in step 1.

3.Append M to the b-byte string resulting from step 2.

4.Apply H to the stream generated in step 3.

5.XOR (bitwise exclusive-OR) K with opad to produce the b-byte string computed in step 1.

6.Append the hash result H from step 4 to the b-byte string resulting from step 5.

7.Apply H to the stream generated in step 6 and output the result.

Figure 7.2 illustrates the overall operation of HMAC – MD5.

Example 7.1

HMAC – MD5 computation using the RFC method:

Data: 0x 2143f501 f014a713 c1059e23 7123fd68

Key: 0x 31fa7062 c45113e3 2679fd13 53b71264

 

K

 

 

 

 

 

 

 

padding

 

 

 

 

 

 

K' = 512 bits

M

 

 

 

 

 

 

b = 512 bits

b = 512 bits

 

 

M

 

 

 

b

b

b

 

b

ipad

i

|| M

i

M0

M1

ML −1

i = K' ipad ≡ b

 

 

b = 512 bits

 

opad

IV

H

 

 

 

 

 

b = 512 bits

160 bits (SHA-1)

h = 160 bits (SHA-1)

 

 

 

 

128 bits (MD5)

 

128 bits (MD5)

 

 

 

Padding

o = K' opad ≡ b

b = 512 bits

||

160 bits (SHA-1) IV H

128 bits (MD5)

HMAC(M)

Figure 7.2 Overall operation of HMAC computation using either MD5 or SHA-1 (message length computation based on i ||M).

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]