Protocol Authentication Extensions 61
SPI
A specific security context is identified in the authentication extension by the security
parameter index (SPI) value. The SPI is a 4-byte value that is configured as either a
hexadecimal or decimal value. (Unfortunately, this can often lead to confusion because the peer
devices can require the SPI value to be specified in different formats.) If a security violation is
received on a RRQ, the SPI value is the first item that should be verified, because it identifies
the security context to use in authenticating the message.
Of the over four billion values, the values 0 through 255 are reserved for specific contexts
defined in IETF standards. The only reserved SPI values currently allocated are the Challenge
Handshake Authentication Protocol (CHAP) and CHAP Hash-based Message Authentication
Code (HMAC), 2 and 3 respectively, which are used in the MN-AAA Authentication Extension.
This is discussed in the section “MN-AAA Authentication,” later in this chapter.
NOTE It is common to use SPI value 100 hex or 256 decimal when configuring the first security
context because it is the first nonreserved value.
Algorithm and Mode
The authenticator value in the authentication extension is a message authentication code
(MAC), which can be thought of as a fingerprint. For each registration message, a hash
algorithm calculates the unique fingerprint value, which is of smaller total length than the
original message. Thus, given that more possible values exist for the original message than do
unique fingerprint results, the algorithms are designed so that the result is as unique as possible.
The ideal algorithm results in 50 percent of the bits in the hash changing by changing just 1 bit
in the message.
It is difficult to derive a message that would produce the same result. For example, if the
message is the classic sentence “The quick brown fox jumped over the lazy dog,” an algorithm
whose result identified the message as “containing 36 letters, 3 of which are es” would be less
than ideal. Many sentences would produce the same result, and it is easy to create one. It would
be more secure to say that it “contains 36 letters and at least 1 of each letter in the alphabet.
Coming up with a sentence to match this identification would be much more difficult!
The Mobile IP standard originally defined MD5, as described in Request For Comment (RFC)
1321, as the required algorithm for the Mobile Node-Home Agent and FA-Home Agent
authentication extensions. However, this was later determined to be vulnerable to attack. MD5,
as defined in RFC 1321, is often described as prefix-suffix mode. The standard was later
amended to define HMAC, as described in RFC 2104, as the required algorithm and mode
instead of prefix-suffix MD5. HMAC is a method of computing a hash of the message and is
cryptographically stronger.

Get Mobile IP Technology and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.