home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1997 December
/
Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso
/
drafts
/
draft_ietf_i
/
draft-ietf-ipsec-isakmp-oakley-04.txt
< prev
next >
Wrap
Text File
|
1997-07-16
|
67KB
|
1,683 lines
IPSEC Working Group D. Harkins, D. Carrel
INTERNET-DRAFT cisco Systems
draft-ietf-ipsec-isakmp-oakley-04.txt July 1997
The resolution of ISAKMP with Oakley
<draft-ietf-ipsec-isakmp-oakley-04.txt>
Status of this Memo
This document is an Internet Draft. Internet Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas,
and working groups. Note that other groups may also distribute
working documents as Internet Drafts.
Internet Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inapproporiate to use Internet Drafts as reference
material or to cite them other than as "work in progress."
To learn the current status of any Internet Draft, please check the
"1id-abstracts.txt" listing contained in the Internet Drafts Shadow
Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
munnari.oz.au (Australia), ds.internic.net (US East Coast), or
ftp.isi.edu (US West Coast).
1. Abstract
[MSST96] (ISAKMP) provides a framework for authentication and key
exchange but does not define them. ISAKMP is designed to be key
exchange independant; that is, it is designed to support many
different key exchanges.
[Orm96] (Oakley) describes a series of key exchanges-- called
"modes"-- and details the services provided by each (e.g. perfect
forward secrecy for keys, identity protection, and authentication).
[Kra96] (SKEME) describes a versatile key exchange technique which
provides anonymity, repudiability, and quick key refreshment.
This document describes a protocol using part of Oakley and part of
SKEME in conjunction with ISAKMP to obtain authenticated keying
material for use with ISAKMP, and for other security associations
such as AH and ESP for the IETF IPsec DOI.
Harkins, Carrel [Page 1]
INTERNET DRAFT July 1997
2. Discussion
This draft describes a hybrid protocol. The purpose is to negotiate,
and provide authenticated keying material for, security associations
in a protected manner.
Processes which implement this draft can be used for negotiating
virtual private networks (VPNs) and also for providing a remote user
from a remote site (whose IP address need not be known beforehand)
access to a secure host or network.
Proxy negotiation is supported. Proxy mode is where the negotiating
parties are not the endpoints for which security association
negotiation is taking place. When used in proxy mode, the identities
of the end parties remain hidden.
This does not implement the entire Oakley protocol, but only a subset
necessary to satisfy its goals. It does not claim conformance or
compliance with the entire Oakley protocol.
Likewise, this does not implement the entire SKEME protocol, but only
the method of public key encryption for authentication and its
concept of fast re-keying using an exchange of nonces.
3. Terms and Definitions
3.1 Requirements Terminology
Keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT" and
"MAY" that appear in this document are to be interpreted as described
in [Bra97].
3.2 Notation
The following notation is used throughout this draft.
HDR is an ISAKMP header whose exchange type is the mode. When
writen as HDR* it indicates payload encryption.
SA is an SA negotiation payload with one or more proposals. An
initiator MAY provide multiple proposals for negotiation; a
responder MUST reply with only one.
SAp is the entire body of the SA payload (minus the ISAKMP generic
header)-- i.e. the DOI, situation, all proposals and all
transforms offered by the Initiator.
g^xi and g^xr are the Diffie-Hellman public values of the
Harkins, Carrel [Page 2]
INTERNET DRAFT July 1997
initiator and responder respectively.
KE is the key exchange payload.
Nx is the nonce payload; x can be: i or r for the ISAKMP initiator
and responder respectively.
IDx is the identity payload for "x". x can be: "ii" or "ir" for
the ISAKMP initiator and responder respectively during phase one
negotiation; or "ui" or "ur" for the user initiator and responder
respectively during phase two. The ID payload format for the
Internet DOI is defined in [Pip96].
SIG is the signature payload. The data to sign is exchange-
specific.
CERT is the certificate payload.
HASH (and any derivitive such as HASH(2) or HASH_I) is the hash
payload. The contents of the hash are specific to the
authentication method.
prf(key, msg) is the keyed pseudo-random function-- often a keyed
hash function-- used to generate a deterministic output that
appears pseudo-random. prf's are used both for key derivations
and for authentication (i.e. as a keyed MAC). (See [KBC96]).
SKEYID is a string derived from secret material known only to the
active players in the exchange.
SKEYID_e is the keying material used by the ISAKMP SA to protect
it's messages.
SKEYID_a is the keying material used by the ISAKMP SA to
authenticate it's messages.
SKEYID_d is the keying material used to derive keys for non-ISAKMP
security associations.
<x>y indicates that "x" is encrypted with the key "y".
--> signifies "initiator to responder" communication (requests).
<-- signifies "responder to initiator" communication (replies).
| signifies concatenation of information-- e.g. X | Y is the
concatentation of X with Y.
Harkins, Carrel [Page 3]
INTERNET DRAFT July 1997
[x] indicates that x is optional.
Payload encryption (when noted by a '*' after the ISAKMP header) MUST
begin immediately after the ISAKMP header. When communication is
protected, all payloads following the ISAKMP header MUST be
encrypted. Encryption keys are generated from SKEYID_e in a manner
that is defined for each algorithm.
When used to describe the payloads contained in complete message
exchanges, the ISAKMP generic header is implicitly included. When
used as part of a prf computation, the ISAKMP generic header is not
included unless specifically noted. For example, the initiator may
send the responder the following message:
HDR, KE, Ni
The ISAKMP header is included in the KE and Ni payloads. But if the
initiator generates the following pseudo-random output:
HASH = prf(key, Ni | Nr)
the ISAKMP headers of the two nonce payloads are not included-- only
the body of the payload-- the nonce itself-- is used.
3.3 Perfect Forward Secrecy
When used in the draft Perfect Forward Secrecy (PFS) refers to the
notion that compromise of a single key will permit access to only
data protected by a single key. For PFS to exist the key used to
protect transmission of data MUST NOT be used to derive any
additional keys, and if the key used to protect transmission of data
was derived from some other keying material, that material MUST NOT
be used to derive any more keys.
Perfect Forward Secrecy for both keys and identities is provided in
this protocol. (Sections 5.8 and 7).
3.4 Security Association
A security association (SA) is a set of policy and key used to
protect information. The ISAKMP SA is the shared policy and key used
by the negotiating peers in this protocol to protect their
communication.
4. Introduction
Oakley defines a method to establish an authenticated key exchange.
This includes how payloads are constructed, the information they
carry, the order in which they are processed and how they are used.
While Oakley defines "modes", ISAKMP defines "phases". The
relationship between the two is very straightforward. ISAKMP's phase
Harkins, Carrel [Page 4]
INTERNET DRAFT July 1997
1 is where the two ISAKMP peers establish a secure, authenticated
channel with which to communicate. This is called the ISAKMP
Security Association (SA). "Main Mode" and "Aggressive Mode" each
accomplish a phase 1 exchange. "Main Mode" and "Aggressive Mode"
MUST ONLY be used in phase 1.
Phase 2 is where Security Associations are negotiated on behalf of
services such as IPsec or any other service which needs key material
and/or parameter negotiation. "Quick Mode" accomplishes a phase 2
exchange. "Quick Mode" MUST ONLY be used in phase 2.
"New Group Mode" is not really a phase 1 or phase 2. It follows
phase 1, but serves to establish a new group which can be used in
future negotiations. "New Group Mode" MUST ONLY be used in phase 2.
The ISAKMP SA is bi-directional. That is, once established, either
party may initiate Quick Mode, Informational, and New Group Mode
Exchanges. Per the base ISAKMP document, the ISAKMP SA is identified
by the Initiator's cookie followed by the Responder's cookie-- the
role of each party in the phase 1 exchange dictates which cookie is
the Initiator's. The cookie order established by the phase 1 exchange
continues to identify the ISAKMP SA regardless of the direction the
Quick Mode, Informational, or New Group exchange. In other words, the
cookies MUST NOT swap places when the direction of the ISAKMP SA
changes.
With the use of ISAKMP phases, an implementation can accomplish very
fast keying when necessary. A single phase 1 negotiation may be used
for more than one phase 2 negotiation. Additionally a single phase 2
negotiation can request multiple Security Associations. With these
optimizations, an implementation can see less than one round trip per
SA as well as less than one DH exponentiation per SA. "Main Mode"
for phase 1 provides identity protection. When identity protection
is not needed, "Aggressive Mode" can be used to reduce round trips
even further. Developer hints for doing these optimizations are
included below. It should also be noted that using public key
encryption to authenticate an Aggressive Mode exchange will still
provide identity protection.
The following attributes are used by ISAKMP/Oakley and are negotiated
as part of the ISAKMP Security Association. (These attributes
pertain only to the ISAKMP Security Association and not to any
Security Associations that ISAKMP may be negotiating on behalf of
other services.)
- encryption algorithm (e.g. DES, IDEA, Blowfish).
- hash algorithm (e.g. MD5, SHA)
Harkins, Carrel [Page 5]
INTERNET DRAFT July 1997
- authentication method (e.g. DSS sig, RSA sig, RSA encryption,
pre-shared key)
- information about a group over which to do Diffie-Hellman.
- prf (e.g. 3DES-CBC-MAC)
All of these attributes are mandatory and MUST be negotiated except
for the "prf". The "prf" MAY be negotiated, but if it is not, the
HMAC (see [KBC96]) version of the negotiated hash algorithm is used
as a pseudo-random function. Other non-mandatory attributes are
described in Appendix A. The selected hash algorithm MUST support
both native and HMAC modes.
ISAKMP/Oakley implementations MUST support the following attribute
values:
- DES-CBC with a weak, and semi-weak, key check (weak and semi-
weak keys are referenced in [Sch94] and listed in Appendix A). The
key is derived according to Appendix B.
- MD5 and SHA.
- Authentication via pre-shared keys. The Digital Signature
Standard SHOULD be supported; RSA SHOULD also be supported.
- MODP over the default group (see below). ECP groups MAY be
supported.
The ISAKMP/Oakley modes described here MUST be implemented whenever
the IETF IPsec DOI [Pip96] is implemented. Other DOIs MAY use the
modes described here.
5. Exchanges
There are two basic methods used to establish an authenticated key
exchange: Main Mode and Aggressive Mode. Each generates authenticated
keying material from an ephemeral Diffie-Hellman exchange. Main Mode
MUST be implemented; Aggressive Mode SHOULD be implemented. In
addition, Quick Mode MUST be implemented as a mechanism to generate
fresh keying material and negotiate non-ISAKMP security services. In
additon, New Group Mode SHOULD be implemented as a mechanism to
define private groups for Diffie-Hellman exchanges. Implementations
MUST NOT switch exchange types in the middle of an exchange.
Exchanges conform to standard ISAKMP [MSST96] payload syntax,
attribute encoding, timeouts and retransmits of messages, and
informational messages-- e.g a notify response is sent when, for
Harkins, Carrel [Page 6]
INTERNET DRAFT July 1997
example, a proposal is unacceptable, or a signature verification or
decryption was unsuccessful, etc.
Main Mode is an instantiation of the ISAKMP Identity Protect
Exchange: The first two messages negotiate policy; the next two
exchange Diffie-Hellman public values and ancillary data (e.g.
nonces) necessary for the exchange; and the last two messages
authenticate the Diffie-Hellman Exchange. The authentication method
negotiated as part of the initial ISAKMP exchange influences the
composition of the payloads but not their purpose. The XCHG for Main
Mode is ISAKMP Identity Protect.
Similarly, Aggressive Mode is an instantiation of the ISAKMP
Aggressive Exchange. The first two messages negotiate policy,
exchange Diffie-Hellman public values and ancillary data necessary
for the exchange, and identities. In addition the second message
authenticates the responder. The third message authenticates the
initiator and provides a proof of participation in the exchange. The
XCHG for Aggressive Mode is ISAKMP Aggressive. The final message is
not sent under protection of the ISAKMP SA allowing each party to
postpone exponentiation, if desired, until negotiation of this
exchange is complete.
Quick Mode and New Group Mode have no analog in ISAKMP. The XCHG
values for Quick Mode and New Group Mode are defined in Appendix A.
Except where noted, there is no requirement for ISAKMP payloads in
any exchagen to be in any particular order.
Three different authentication methods are allowed with either Main
Mode or Aggressive Mode-- digital signature, public key encryption,
or pre-shared key. The value SKEYID is computed seperately for each
authentication method.
For signatures: SKEYID = prf(Ni | Nr, g^xy)
For public key encryption: SKEYID = prf(Ni | Nr, CKY-I | CKY-R)
For pre-shared keys: SKEYID = prf(pre-shared-key, Ni | Nr)
The result of either Main Mode or Aggressive Mode is three groups of
authenticated keying material:
SKEYID_d = prf(SKEYID, g^xy | CKY-I | CKY-R | 0)
SKEYID_a = prf(SKEYID, SKEYID_d | g^xy | CKY-I | CKY-R | 1)
SKEYID_e = prf(SKEYID, SKEYID_a | g^xy | CKY-I | CKY-R | 2)
and agreed upon policy to protect further communications. The values
of 0, 1, and 2 above are represented by a single octet. The key used
for encryption is derived from SKEYID_e in an algorithm-specific
Harkins, Carrel [Page 7]
INTERNET DRAFT July 1997
manner (see appendix B).
To authenticate either exchange the initiator of the protocol
generates HASH_I and the responder generates HASH_R where:
HASH_I = prf(SKEYID, g^xi | g^xr | CKY-I | CKY-R | SAp | IDii)
HASH_R = prf(SKEYID, g^xr | g^xi | CKY-R | CKY-I | SAp | IDir)
For authentication with digital signatures, HASH_I and HASH_R are
signed and verified; for authentication with either public key
encryption or pre-shared keys, HASH_I and HASH_R directly
authenticate the exchange.
As mentioned above, the negotiated authentication method influences
the content and use of messages for Phase 1 Modes, but not their
intent. When using public keys for authentication, the Phase 1
exchange can be accomplished either by using signatures or by using
public key encryption (if the algorithm supports it). Following are
Main Mode Exchanges with different authentication options.
5.1 ISAKMP/Oakley Phase 1 Authenticated With Signatures
Using signatures, the ancillary information exchanged during the
second roundtrip are nonces; the exchange is authenticated by signing
a mutually obtainable hash. Main Mode with signature authentication
is described as follows:
Initiator Responder
---------- -----------
HDR, SA -->
<-- HDR, SA
HDR, KE, Ni -->
<-- HDR, KE, Nr
HDR*, IDii, [ CERT, ] SIG_I -->
<-- HDR*, IDir, [ CERT, ] SIG_R
Aggressive mode with signatures in conjunction with ISAKMP is
described as follows:
Initiator Responder
----------- -----------
HDR, SA, KE, Ni, IDii -->
<-- HDR, SA, KE, Nr, IDir,
[ CERT, ] SIG_R
HDR, [ CERT, ] SIG_I -->
In both modes, the signed data, SIG_I or SIG_R, is the result of the
negotiated digital signature algorithm applied to HASH_I or HASH_R
Harkins, Carrel [Page 8]
INTERNET DRAFT July 1997
respectively.
In general the signature will be over HASH_I and HASH_R as above
using the negotiated prf, or the HMAC version of the negotiated hash
function (if no prf is negotiated). However, this can be overridden
for construction of the signature if the signature algorithm is tied
to a particular hash algorithm (e.g. DSS is only defined with SHA's
160 bit output). In this case, the signature will be over HASH_I and
HASH_R as above, except using the HMAC version of the hash algorithm
associated with the signature method. The negotiated prf and hash
function would continue to be used for all other proscribed pseudo-
random functions.
Since the hash algorithm used is already known there is no need to
encode its OID into the signature. In addition, there is no binding
between the OIDs used for RSA signatures in PKCS #1 and those used in
this document. Therefore, RSA signatures MUST be encoded as a private
key encryption in PKCS #1 format. DSS signatures MUST be encoded as r
followed by s.
One or more certificate payloads MAY be optionally passed.
5.2 Phase 1 Authenticated With Public Key Encryption
Using public key encryption to authenticate the exchange, the
ancillary information exchanged is encrypted nonces. Each party's
ability to reconstruct a hash (proving that the other party decrypted
the nonce) authenticates the exchange.
In order to perform the public key encryption, the initiator must
already have the responder's public key. In the case where the
responder has multiple public keys, a hash of the certificate the
initiator is using to encrypt the ancillary information is passed as
part of the third message. In this way the responder can determine
which corresponding private key to use to decrypt the encrypted
payloads and identity protection is retained.
In addition to the nonce, the identities of the parties (IDii and
IDir) are also encrypted with the other party's public key. If the
authentication method is public key encryption, the nonce and
identity payloads MUST be encrypted with the public key of the other
party. Only the body of the payloads are encrypted, the payload
headers are left in the clear.
Harkins, Carrel [Page 9]
INTERNET DRAFT July 1997
When using encrytion for authentication, Main Mode is defined as
follows.
Initiator Responder
----------- -----------
HDR, SA -->
<-- HDR, SA
HDR, KE, [ HASH(1), ]
<IDii>PubKey_r,
<Ni>PubKey_r -->
HDR, KE, <IDir>PubKey_i,
<-- <Nr>PubKey_i
HDR*, HASH_I -->
<-- HDR*, HASH_R
Aggressive Mode authenticated with encryption is described as
follows:
Initiator Responder
----------- -----------
HDR, SA, [ HASH(1),] KE,
<IDii>Pubkey_r,
<Ni>Pubkey_r -->
HDR, SA, KE, <IDir>PubKey_i,
<-- <Nr>PubKey_r, HASH_R
HDR, HASH_I -->
Where HASH(1) is a hash (using the negotiated hash function) of the
certificate which the initiator is using to encrypt the nonce and
identity.
RSA encryption MUST be encoded in PKCS #1 format. The payload length
is the length of the entire encrypted payload plus header. The PKCS
#1 encoding allows for determination of the actual length of the
cleartext payload upon decryption.
Using encryption for authentication provides for a plausably deniable
exchange. There is no proof (as with a digital signature) that the
conversation ever took place since each party can completely
reconstruct both sides of the exchange. In addition, security is
added to secret generation since an attacker would have to
successfully break not only the Diffie-Hellman exchange but also both
RSA encryptions. This exchange was motivated by [Kra96].
Note that, unlike other authentication methods, authentication with
public key encryption allows for identity protection with Aggressive
Mode.
Harkins, Carrel [Page 10]
INTERNET DRAFT July 1997
5.3 Phase 1 Authenticated With a Pre-Shared Key
A key derived by some out-of-band mechanism may also be used to
authenticate the exchange. The actual establishment of this key is
out of the scope of this document.
When doing a pre-shared key authentication, Main Mode is defined as
follows:
Initiator Responder
---------- -----------
HDR, SA -->
<-- HDR, SA
HDR, KE, Ni -->
<-- HDR, KE, Nr
HDR*, IDii, HASH_I -->
<-- HDR*, IDir, HASH_R
Aggressive mode with a pre-shared key is described as follows:
Initiator Responder
----------- -----------
HDR, SA, KE, Ni, IDii -->
<-- HDR, SA, KE, Nr, IDir, HASH_R
HDR, HASH_I -->
When using pre-shared key authentication with Main Mode the key can
only be identified by the IP address of the peers since HASH_I must
be computed before the initiator has processed IDir. Aggressive Mode
allows for a wider range of identifiers of the pre-shared secret to
be used. In addition, Aggressive Mode allows two parties to maintain
multiple, different pre-shared keys and identify the correct one for
a particular exchange.
5.4 Phase 2 - Quick Mode
Quick Mode is not a complete exchange itself, but is used as part of
the ISAKMP SA negotiation process (phase 2) to derive keying material
and negotiate shared policy for non-ISAKMP SAs. The information
exchanged along with Quick Mode MUST be protected by the ISAKMP SA--
i.e. all payloads except the ISAKMP header are encrypted. In Quick
Mode, a HASH payload must immediately follow the ISAKMP header. This
HASH authenticates the message and also provides liveliness proofs.
Quick Mode is essentially an exchange of nonces that provides replay
protection. The nonces are used to generate fresh key material and
prevent replay attacks from generating bogus security associations.
An optional Key Exchange payload can be exchanged to allow for an
Harkins, Carrel [Page 11]
INTERNET DRAFT July 1997
additional Diffie-Hellman exchange and exponentiation per Quick Mode.
While use of the key exchange payload with Quick Mode is optional it
MUST be supported.
Base Quick Mode (without the KE payload) refreshens the keying
material derived from the exponentiation in phase 1. This does not
provide PFS. Using the optional KE payload, an additional
exponentiation is performed and PFS is provided for the keying
material. If a KE payload is sent, a Diffie-Hellman group (see
section 5.7.1 and [Pip96]) MUST be sent as attributes of the SA being
negotiated.
Quick Mode is defined as follows:
Initiator Responder
----------- -----------
HDR*, HASH(1), SA, Ni
[, KE ] [, IDui, IDur ] -->
<-- HDR*, HASH(2), SA, Nr
[, KE ] [, IDui, IDur ]
HDR*, HASH(3) -->
Where:
HASH(1) is the prf over the message id (M-ID) from the ISAKMP
header concatenated with the entire message that follows the hash
including all payload headers, but excluding any padding added for
encryption. HASH(2) is identical to HASH(1) except the initiator's
nonce-- Ni, minus the payload header-- is added after M-ID but before
the complete message. The addition of the nonce to HASH(2) is for a
liveliness proff. HASH(3)-- for liveliness-- is the prf over the
value zero represented as a single octet, followed by a concatenation
of the message id and the two nonces-- the initiator's followed by
the responder's-- minus the payload header. In other words, the
hashes for the above exchange are:
HASH(1) = prf(SKEYID_a, M-ID | SA | Ni [ | KE ] [ | IDui | IDur ])
HASH(2) = prf(SKEYID_a, M-ID | Ni | SA | Nr [ | KE ] [ | IDui |
IDur ])
HASH(3) = prf(SKEYID_a, 0 | M-ID | Ni | Nr)
If PFS is not needed, and KE payloads are not exchanged, the new
keying material is defined as KEYMAT = prf(SKEYID_d, protocol | SPI |
Ni | Nr).
If PFS is desired and KE payloads were exchanged, the new keying
material is defined as KEYMAT = prf(SKEYID_d, g(qm)^xy | protocol |
SPI | Ni | Nr), where g(qm)^xy is the shared secret from the
ephemeral Diffie-Hellman exchange of this Quick Mode.
Harkins, Carrel [Page 12]
INTERNET DRAFT July 1997
In either case, "protocol" and "SPI" are from the ISAKMP Proposal
Payload that contained the negotiated Transform.
A single SA negotiation results in two security assocations-- one
inbound and one outbound. Different SPIs for each SA (one chosen by
the initiator, the other by the responder) guarantee a different key
for each direction. The SPI chosen by the destination of the SA is
used to derive KEYMAT for that SA.
For situations where the amount of keying material desired is greater
than that supplied by the prf, KEYMAT is expanded by feeding the
results of the prf back into itself and concatenating results until
the required keying material has been reached. In other words,
KEYMAT = K1 | K2 | K3 | ...
where
K1 = prf(SKEYID_d, [ g(qm)^xy | ] SPI | Ni | Nr)
K2 = prf(SKEYID_d, K1 | [ g(qm)^xy | ] SPI | Ni | Nr)
K3 = prf(SKEYID_d, K2 | [ g(qm)^xy | ] SPI | Ni | Nr)
etc.
This keying material (whether with PFS or without, and whether
derived directly or through concatenation) MUST be used with the
negotiated SA. It is up to the service to define how keys are derived
from the keying material.
In the case of an ephemeral Diffie-Hellman exchange in Quick Mode,
the exponential (g(qm)^xy) is irretreivably removed from the current
state and SKEYID_e and SKEYID_a (derived from phase 1 negotiation)
continue to protect and authenticate the ISAKMP SA and SKEYID_d
continues to be used to derive keys.
If ISAKMP is acting as a proxy negotiator on behalf of another party
the identities of the parties MUST be passed as IDui and then IDur.
Local policy will dictate whether the proposals are acceptible for
the identities specified. If IDs are not exchanged, the negotiation
is assumed to be done on behalf of each ISAKMP peer. If an ID range
(see Appendix A of [Pip96]) is not acceptable (for example, the
specified subnet is too large) a BAD_ID_RANGE notify message followed
by an acceptible ID range, in an ID payload, MUST be sent.
Harkins, Carrel [Page 13]
INTERNET DRAFT July 1997
Using Quick Mode, multiple SA's and keys can be negotiated with one
exchange as follows:
Initiator Responder
----------- -----------
HDR*, HASH(1), SA0, SA1, Ni,
[, KE ] [, IDui, IDur ] -->
<-- HDR*, HASH(2), SA0, SA1, Nr,
[, KE ] [, IDui, IDur ]
HDR*, HASH(3) -->
The keying material is derived identically as in the case of a single
SA. In this case (negotiation of two SA payloads) the result would be
four security associations-- two each way for both SAs.
5.5 New Group Mode
New Group Mode MUST NOT be used prior to establishment of an ISAKMP
SA. The description of a new group MUST only follow phase 1
negotiation. (It is not a phase 2 exchange, though).
Initiator Responder
----------- -----------
HDR*, HASH(1), SA -->
<-- HDR*, HASH(2), SA
where HASH(1) is the prf output, using SKEYID_a as the key, and the
message-ID from the ISAKMP header concatenated with the entire SA
proposal, body and header, as the data; HASH(2) is the prf output,
using SKEYID_a as the key, and the message-ID from the ISAKMP header
concatenated with the reply as the data. In other words the hashes
for the above exchange are:
HASH(1) = prf(SKEYID_a, M-ID | SA)
HASH(2) = prf(SKEYID_a, M-ID | SA)
The proposal will specify the characteristics of the group (see
appendix A, "Attribute Assigned Numbers"). Group descriptions for
private Groups MUST be greater than or equal to 2^15. If the group
is not acceptable, the responder MUST reply with a Notify payload
with the message type set to GROUP_NOT_ACCEPTABLE (13).
ISAKMP implementations MAY require private groups to expire with the
SA under which they were established.
Groups may be directly negotiated in the SA proposal with Main Mode.
To do this the Prime, Generator (using the Generator One attribute
class from Appendix A), and Group Type are passed as SA attributes
Harkins, Carrel [Page 14]
INTERNET DRAFT July 1997
(see Appendix A in [MSST96]). Alternately, the nature of the group
can be hidden using New Group Mode and only the group identifier is
passed in the clear during phase 1 negotiation.
5.6 ISAKMP Informational Exchanges
This protocol protects ISAKMP Informational Exchanges when possible.
Once the ISAKMP security association has been established (and
SKEYID_e and SKEYID_a have been generated) ISAKMP Information
Exchanges, when used with this protocol, are as follows:
Initiator Responder
----------- -----------
HDR*, HASH(1), N/D -->
where N/D is either an ISAKMP Notify Payload or an ISAKMP Delete
Payload and HASH(1) is the prf output, using SKEYID_a as the key, and
the entire informational payload (either a Notify or Delete) as the
data. In other words, the hash for the above exchange is:
HASH(1) = prf(SKEYID_a, M-ID | N/D)
If the ISAKMP security association has not yet been established at
the time of the Informational Exchange, the exchange is done in the
clear without an accompanying HASH payload.
5.7 Oakley Groups
With ISAKMP/Oakley, the group in which to do the Diffie-Hellman
exchange is negotiated. The value 0 indicates no group. The values 1
and 2 indicate the default groups described below. The attribute
class for "Group" is defined in Appendix A. Other groups are also
defined in [Orm96]. All values 2^15 and higher are used for private
group identifiers. For a discussion on the strength of the default
Oakley groups please see the Security Considerations section below.
5.7.1 First Oakley Default Group
Oakley implementations MUST support a MODP group with the following
prime and generator. This group is assigned id 1 (one).
The prime is: 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 }
Its hexadecimal value is
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF
Harkins, Carrel [Page 15]
INTERNET DRAFT July 1997
The generator is: 2.
5.7.2 Second Oakley Group
ISAKMP/Oakley implementations MUST support a MODP group with the
following prime and generator. This group is assigned id 2 (two).
The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }.
Its hexadecimal value is
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
FFFFFFFF FFFFFFFF
The generator is 2 (decimal)
Other groups can be defined using New Group Mode. These default
groups were generated by Richard Schroeppel at the University of
Arizona. Properties of these primes are described in [Orm96].
5.8 Payload Explosion for Complete a ISAKMP/Oakley Exchange
This section illustrates how the ISAKMP/Oakley protocol is used to:
- establish a secure and authenticated channel between ISAKMP
processes (phase 1); and
- generate key material for, and negotiate, an IPsec SA (phase 2).
Harkins, Carrel [Page 16]
INTERNET DRAFT July 1997
5.8.1 Phase 1 using Main Mode
The following diagram illustrates the payloads exchanged between the
two parties in the first round trip exchange. The initiator MAY
propose several proposals; the responder MUST reply with one.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ISAKMP Header with XCHG of Main Mode, ~
~ and Next Payload of ISA_SA ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Domain of Interpretation (IPsec DOI) !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Situation !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Proposal #1 ! PROTO_ISAKMP ! SPI size | # Transforms !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ SPI (8 octets) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_TRANS ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Transform #1 ! KEY_OAKLEY | RESERVED2 !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ prefered SA attributes ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Transform #2 ! KEY_OAKLEY | RESERVED2 !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ alternate SA attributes ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The responder replies in kind but selects, and returns, one transform
proposal (the ISAKMP SA attributes).
Harkins, Carrel [Page 17]
INTERNET DRAFT July 1997
The second exchange consists of the following payloads:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ISAKMP Header with XCHG of Main Mode, ~
~ and Next Payload of ISA_KE ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_NONCE ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ D-H Public Value (g^xi from initiator g^xr from responder) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Ni (from initiator) or Nr (from responder) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The shared keys, SKEYID_e and SKEYID_a, are now used to protect and
authenticate all further communication. Note that both SKEYID_e and
SKEYID_a are unauthenticated.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ISAKMP Header with XCHG of Main Mode, ~
~ and Next Payload of ISA_ID and the encryption bit set ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_SIG ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Identification Data of the ISAKMP negotiator ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ signature verified by the public key of the ID above ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The key exchange is authenticated over a signed hash as described in
section 5.1. Once the signature has been verified using the
authentication algorithm negotiated as part of the ISAKMP SA, the
shared keys, SKEYID_e and SKEYID_a can be marked as authenticated.
(For brevity, certificate payloads were not exchanged).
5.8.2 Phase 2 using Quick Mode
The following payloads are exchanged in the first round of Quick
Mode with ISAKMP SA negotiation. In this hypothetical exchange, the
ISAKMP negotiators are proxies for other parties which have requested
authentication.
Harkins, Carrel [Page 18]
INTERNET DRAFT July 1997
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ISAKMP Header with XCHG of Quick Mode, ~
~ Next Payload of ISA_HASH and the encryption bit set ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_SA ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ keyed hash of message ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_NONCE ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Domain Of Interpretation (DOI) !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Situation !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Proposal #1 ! PROTO_IPSEC_AH! SPI size | # Transforms !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ SPI (8 octets) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_TRANS ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Transform #1 ! AH_SHA | RESERVED2 !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! other SA attributes !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Transform #1 ! AH_MD5 | RESERVED2 !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! other SA attributes !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_ID ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ nonce ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! ISA_ID ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ID of source for which ISAKMP is a proxy ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ID of destination for which ISAKMP is a proxy ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where the contents of the hash are described in 5.4 above. The
responder replies with a similar message which only contains one
Harkins, Carrel [Page 19]
INTERNET DRAFT July 1997
transform-- the selected AH transform. Upon receipt, the initiator
can provide the key engine with the negotiated security association
and the keying material. As a check against replay attacks, the
responder waits until receipt of the next message.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ISAKMP Header with XCHG of Quick Mode, ~
~ Next Payload of ISA_HASH and the encryption bit set ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! 0 ! RESERVED ! Payload Length !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ hash data ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where the contents of the hash are described in 5.4 above.
5.9 Perfect Forward Secrecy Example
This protocol can provide PFS of both keys and identities. The
identies of both the ISAKMP negotiating peer and, if applicable, the
identities for whom the peers are negotiating can be protected with
PFS.
To provide Perfect Forward Secrecy of both keys and all identities,
two parties would perform the following:
o A Main Mode Exchange to protect the identities of the ISAKMP
peers.
This establishes an ISAKMP SA.
o A Quick Mode Exchange to negotiate other security protocol
protection.
This establishes a SA on each end for this protocol.
o Delete the ISAKMP SA and its associated state.
Since the key for use in the non-ISAKMP SA was derived from the
single ephemeral Diffie-Hellman exchange PFS is preserved.
To provide Perfect Forward Secrecy of merely the keys of a non-ISAKMP
security association, it in not necessary to do a phase 1 exchange if
an ISAKMP SA exists between the two peers. A single Quick Mode in
which the optional KE payload is passed, and an additional Diffie-
Hellman exchange is performed, is all that is required. At this point
the state derived from this Quick Mode must be deleted from the
ISAKMP SA as described in section 5.4.
Harkins, Carrel [Page 20]
INTERNET DRAFT July 1997
6. Implementation Hints
Using a single ISAKMP Phase 1 negotiation makes subsequent Phase 2
negotiations extremely quick. As long as the Phase 1 state remains
cached, and PFS is not needed, Phase 2 can proceed without any
exponentiation. How many Phase 2 negotiations can be performed for a
single Phase 1 is a local policy issue. The decision will depend on
the strength of the algorithms being used and level of trust in the
peer system.
An implementation may wish to negotiate a range of SAs when
performing Quick Mode. By doing this they can speed up the "re-
keying". Quick Mode defines how KEYMAT is defined for a range of SAs.
When one peer feels it is time to change SAs they simply use the next
one within the stated range. A range of SAs can be established by
negotiating multiple SAs (identical attributes, different SPIs) with
one Quick Mode.
An optimization that is often useful is to establish Security
Associations with peers before they are needed so that when they
become needed they are already in place. This ensures there would be
no delays due to key management before initial data transmission.
This optimization is easily implemented by setting up more than one
Security Association with a peer for each requested Security
Association and caching those not immediately used.
Also, if an ISAKMP implementation is alerted that a SA will soon be
needed (e.g. to replace an existing SA that will expire in the near
future), then it can establish the new SA before that new SA is
needed.
The base ISAKMP specification describes conditions in which one party
of the protocol may inform the other party of some activity-- either
deletion of a security association or in response to some error in
the protocol such as a signature verification failed or a payload
failed to decrypt. It is strongly suggested that these Informational
exchanges not be responded to under any circumstances. Such a
condition may result in a "notify war" in which failure to understand
a message results in a notify to the peer who cannot understand it
and sends his own notify back which is also not understood.
7. Security Considerations
This entire draft discusses a hybrid protocol, combining Oakley with
ISAKMP, to negotiate, and derive keying material for, security
associations in a secure and authenticated manner.
Confidentiality is assured by the use of a negotiated encryption
Harkins, Carrel [Page 21]
INTERNET DRAFT July 1997
algorithm. Authentication is assured by the use of a negotiated
method: a digital signature algorithm; a public key algorithm which
supports encryption; or, a pre-shared key. The confidentiality and
authentication of this exchange is only as good as the attributes
negotiated as part of the ISAKMP security association.
Repeated re-keying using Quick Mode can consume the entropy of the
Diffie- Hellman shared secret. Implementors should take note of this
fact and set a limit on Quick Mode Exchanges between exponentiations.
This draft does not prescribe such a limit.
Perfect Forward Secrecy (PFS) of both keying material and identities
is possible with this protocol. By specifying a Diffie-Hellman group,
and passing public values in KE payloads, ISAKMP peers can establish
PFS of keys-- the identities would be protected by SKEYID_e from the
ISAKMP SA and would therefore not be protected by PFS. If PFS of both
keying material and identities is desired, an ISAKMP peer MUST
establish only one non-ISAKMP security association (e.g. IPsec
Security Association) per ISAKMP SA. PFS for keys and identities is
accomplished by deleting the ISAKMP SA (and optionally issuing a
DELETE message) upon establishment of the single non-ISAKMP SA. In
this way a phase one negotiation is uniquely tied to a single phase
two negotiation, and the ISAKMP SA established during phase one
negotiation is never used again.
The strength of a key derived from a MODP Diffie-Hellman exchange
depends on the size of the prime used and also the inherent strength
of the group. The first default Oakley group for Diffie-Hellman
exchanges defined in this document provides enough strength for DES--
56 bits-- with an exponent no less than 160 bits. The second default
Oakley group for Diffie-Hellman exchanges defined in this document
provides around 80 bits of strength with an exponent no less than 160
bits. Implementations should make note of these conservative
estimates when establishing policy and negotiating security
parameters.
Note that these limitations are on the Diffie-Hellman groups
themselves. There is nothing in ISAKMP/Oakley which prohibits using
stronger groups nor is there anything which will dilute the strength
obtained from stronger groups. In fact, the extensible framework of
ISAKMP/Oakley encourages the definition of more groups; use of
elliptical curve groups will greatly increase strength using much
smaller numbers. At the time of this writing there were no Elliptical
Curve groups to use with ISAKMP/Oakley.
For situations where defined groups provide insufficient strength New
Group Mode can be used to exchange a Diffie-Hellman group which
provides the necessary strength. In is incumbent upon implementations
Harkins, Carrel [Page 22]
INTERNET DRAFT July 1997
to check the primality in groups being offered and independently
arrive at strength estimates.
It is assumed that the Diffie-Hellman exponents in this exchange are
erased from memory after use. In particular, these exponents must not
be derived from long-lived secrets like the seed to a pseudo-random
generator.
8. Acknowledgements
This document is the result of close consultation with Hugo Krawczyk,
Douglas Maughan, Hilarie Orman, Mark Schertler, Mark Schneider, and
Jeff Turner. It relies on protocols which were written by them.
Without their interest and dedication, this would not have been
written.
We would also like to thank Cheryl Madson, Harry Varnis, and Elfed
Weaver for technical input.
9. References
[Acm97] Adams, C.M., "Constructing Symmetric Ciphers Using the CAST
Design Procedure", Designs, Codes and Cryptorgraphy (to appear).
[Bra97] Bradner, S., "Key Words for use in RFCs to indicate
Requirement Levels", RFC2119, March 1997.
[KBC96] Krawczyk, H., Bellare, M., Canetti, R., "HMAC: Keyed-Hashing
for Message Authentication", RFC 2104, February 1997.
[Kra96] Krawczyk, H., "SKEME: A Versatile Secure Key Exchange
Mechanism for Internet", from IEEE Proceedings of the 1996 Symposium
on Network and Distributed Systems Security.
[MSST96] Maughhan, D., Schertler, M., Schneider, M., and Turner, J.,
"Internet Security Association and Key Management Protocol (ISAKMP)",
version 8, draft-ietf-ipsec-isakmp-08.{ps,txt}.
[Orm96] Orman, H., "The Oakley Key Determination Protocol", version
1, TR97-92, Department of Computer Science Technical Report,
University of Arizona.
[Pip96] Piper, D., "The Internet IP Security Domain Of Interpretation
for ISAKMP", version 3, draft-ietf-ipsec-ipsec-doi-03.txt.
[Sch94] Schneier, B., "Applied Cryptography, Protocols, Algorithms,
and Source Code in C", 2nd edition.
Harkins, Carrel [Page 23]
INTERNET DRAFT July 1997
Appendix A
This is a list of DES Weak and Semi-Weak keys. The keys come from
[Sch94]. All keys are listed in hexidecimal.
DES Weak Keys
0101 0101 0101 0101
1F1F 1F1F E0E0 E0E0
E0E0 E0E0 1F1F 1F1F
FEFE FEFE FEFE FEFE
DES Semi-Weak Keys
01FE 01FE 01FE 01FE
1FE0 1FE0 0EF1 0EF1
01E0 01E0 01F1 01F1
1FFE 1FFE 0EFE 0EFE
011F 011F 010E 010E
E0FE E0FE F1FE F1FE
FE01 FE01 FE01 FE01
E01F E01F F10E F10E
E001 E001 F101 F101
FE1F FE1F FE0E FE0E
1F01 1F01 0E01 0E01
FEE0 FEE0 FEF1 FEF1
Attribute Assigned Numbers
Attributes negotiated during phase one use the following definitions.
Phase two attributes are defined in the applicable DOI specification
(for example, IPsec attributes are defined in the IPsec DOI), with
the exception of a group description when Quick Mode includes an
ephemeral Diffie-Hellman exchange. Attribute types can be either
Basic (B) or Variable-length (V). Encoding of these attributes is
defined in the base ISAKMP specification.
Harkins, Carrel [Page 24]
INTERNET DRAFT July 1997
Attribute Classes
class value type
-------------------------------------------------------------------
Encryption Algorithm 1 B
Hash Algorithm 2 B
Authentication Method 3 B
Group Description 4 B
Group Type 5 B
Group Prime 6 V
Group Generator One 7 V
Group Generator Two 8 V
Group Curve A 9 V
Group Curve B 10 V
Life Type 11 B
Life Duration 12 B/V
PRF 13 B
Key Length 14 B
Class Values
- Encryption Algorithm
DEC-CBC 1
IDEA-CBC 2
Blowfish-CBC 3
RC5-R16-B64-CBC 4
3DES-CBC 5
CAST-CBC 6
values 7-65000 are reserved. Values 65001-65535 are for private use
among mutually consenting parties.
- Hash Algorithm
MD5 1
SHA 2
Tiger 3
values 4-65000 are reserved. Values 65001-65535 are for private use
among mutually consenting parties.
- Authentication Method
pre-shared key 1
DSS signatures 2
RSA signatures 3
RSA encryption 4
values 5-65000 are reserved. Values 65001-65535 are for private use
Harkins, Carrel [Page 25]
INTERNET DRAFT July 1997
among mutually consenting parties.
- Group Description
default group (section 5.7.1) 1
values 2-32767 are reserved. Values 32768-65535 are for private use
among mutually consenting parties.
- Group Type
MODP (modular exponentiation group) 1
ECP (elliptic curve group over GF[P]) 2
EC2N (elliptic curve group over GF[2^N]) 3
values 4-65000 are reserved. Values 65001-65535 are for private use
among mutually consenting parties.
- Life Type
seconds 1
kilobytes 2
values 3-65000 are reserved. Values 65001-65535 are for private use
among mutually consenting parties. For a given "Life Type" the
value of the "Life Duration" attribute defines the actual length of
the SA life-- either a number of seconds, or a number of kbytes
protected.
- PRF
3DES-CBC-MAC 1
values 2-65000 are reserved. Values 65001-65535 are for private use
among mutually consenting parties
- Key Length
When using an Encryption Algorithm that has a variable length key,
this attribute specifies the key length in bits. (MUST use network
byte order).
Additional Exchanges Defined-- XCHG values
Quick Mode 32
New Group Mode 33
Harkins, Carrel [Page 26]
INTERNET DRAFT July 1997
Appendix B
This appendix describes encryption details to be used ONLY when
encrypting ISAKMP messages. When a service (such as an IPSEC
transform) utilizes ISAKMP to generate keying material, all
encryption algorithm specific details (such as key and IV generation,
padding, etc...) MUST be defined by that service. ISAKMP does not
purport to ever produce keys that are suitable for any encryption
algorithm. ISAKMP produces the requested amount of keying material
from which the service MUST generate a suitable key. Details, such
as weak key checks, are the responsibility of the service.
Use of negotiated PRFs may require the PRF output to be expanded. For
instance, 3DES-CBC-MAC produces 8 bytes of output which must be used
as a key to another 3DES-CBC-MAC function call. The output of a PRF
is expanded by feeding back the results of the PRF into itself to
generate successive blocks. These blocks are concatenated until the
requisite number of bytes has been acheived. For example, for pre-
shared key authentication with 3DES-CBC-MAC as the negotiated PRF:
BLOCK1-8 = prf(pre-shared-key, Ni | Nr)
BLOCK9-16 = prf(pre-shared-key, BLOCK1-8 | Ni | Nr)
BLOCK17-24 = prf(pre-shared-key, BLOCK9-16 | Ni | Nr)
and
SKEYID = BLOCK1-8 | BLOCK9-16 | BLOCK17-24
so therefore to derive SKEYID_d:
BLOCK1-8 = prf(SKEYID, g^xy | CKY-I | CKY-R)
BLOCK9-16 = prf(SKEYID, BLOCK1-8 | g^xy | CKY-I | CKY-R)
BLOCK17-24 = prf(SKEYID, BLOCK9-16 | g^xy | CKY-I | CKY-R)
and
SKEYID_d = BLOCK1-8 | BLOCK9-16 | BLOCK17-24
Subsequent PRF derivations are done similarly.
Encryption keys used to protect the ISAKMP SA are derived from
SKEYID_e in an algorithm-specific manner. When SKEYID_e is not long
enough to supply all the necessary keying material an algorithm
requires, the key is derived from feeding the results of a pseudo-
random function into itself, concatenating the results, and taking
the highest necessary bits.
For example, if (ficticious) algorithm AKULA requires 320-bits of key
(and has no weak key check) and the prf used to generate SKEYID_e
only generates 120 bits of material, the key for AKULA, would be the
first 320-bits of Ka, where:
Harkins, Carrel [Page 27]
INTERNET DRAFT July 1997
Ka = K1 | K2 | K3
and
K1 = prf(SKEYID_e, 0)
K2 = prf(SKEYID_e, K1)
K3 = prf(SKEYID_e, K2)
where prf is the HMAC version of the negotiated hash function or the
negotiated prf. and 0 is represented by a single octet. Each result
of the prf provides 120 bits of material for a total of 360 bits.
AKULA would use the first 320 bits of that 360 bit string.
In phase 1, material for the initialization vector (IV material) for
CBC mode encryption algorithms is derived from a hash of a
concatenation of the initiator's public Diffie-Hellman value and the
responder's public Diffie-Hellman value using the negotiated hash
algorithm. This is used for the first message only. Each message
should be padded up to the nearest block size using bytes containing
0x00. The message length in the header MUST include the length of the
pad since this reflects the size of the cyphertext. Subsequent
messages MUST use the last CBC encryption block from the previous
message as their initialization vector.
In phase 2, material for the initialization vector for CBC mode
encryption of the first message of a Quick Mode exchange is derived
from a hash of a concatenation of the last phase 1 CBC output block
and the phase 2 message id using the negotiated hash algorithm. The
IV for subsequent messages within a Quick Mode exchange is the CBC
output block from the previous message. Padding and IVs for
subsequent messages are done as in phase 1.
Note that the final phase 1 CBC output block, the result of
encryption/decryption of the last phase 1 message, must be retained
in the ISAKMP SA state to allow for generation of unique IVs for each
Quick Mode. Each phase 2 exchange generates IVs independantly to
prevent IVs from getting out of sync when two different Quick Modes
are started simultaneously.
The key for DES-CBC is derived from the first eight (8) non-weak and
non-semi-weak (see Appendix A) bytes of SKEYID_e. The IV is the first
8 bytes of the IV material derived above.
The key for IDEA-CBC is derived from the first sixteen (16) bytes of
SKEYID_e. The IV is the first eight (8) bytes of the IV material
derived above.
The key for Blowfish-CBC is either the negotiated key size, or the
first fifty-six (56) bytes of a key (if no key size is negotiated)
derived in the aforementioned pseudo-random function feedback method.
Harkins, Carrel [Page 28]
INTERNET DRAFT July 1997
The IV is the first eight (8) bytes of the IV material derived above.
The key for RC5-R16-B64-CBC is the negotiated key length, or the
first sixteen (16) bytes of a key (if no key size is negotiated)
derived from the aforementioned pseudo-random function feedback
method if necessary. The IV is the first eight (8) bytes of the IV
material derived above. The number of rounds MUST be 16 and the block
size MUST be 64.
The key for 3DES-CBC is the first twenty-four (24) bytes of a key
derived in the aforementioned pseudo-random function feedback method.
3DES-CBC is an encrypt-decrypt-encrypt operation using the first,
middle, and last eight (8) bytes of the entire 3DES-CBC key. The IV
is the first eight (8) bytes of the IV material derived above.
The key for CAST-CBC is either the negotiated key size, or the first
sixteen (16) bytes of a key derived in the aforementioned pseudo-
random function feedback method. The IV is the first eight (8) bytes
of the IV material derived above.
Support for algorithms other than DES-CBC is purely optional. Some
optional algorithms may be subject to intellectual property claims.
Harkins, Carrel [Page 29]
INTERNET DRAFT July 1997
Authors' Addresses:
Dan Harkins <dharkins@cisco.com>
cisco Systems
170 W. Tasman Dr.
San Jose, California, 95134-1706
United States of America
+1 408 526 4000
Dave Carrel <carrel@ipsec.org>
76 Lippard Ave.
San Francisco, CA 94131-2947
United States of America
+1 415 337 8469
Authors' Note:
The authors encourage independent implementation, and
interoperability testing, of this hybrid protocol.
Harkins, Carrel [Page 30]