Network Working Group | D. Kuegler |
Internet-Draft | Bundesamt fuer Sicherheit in der Informationstechnik (BSI) |
Intended status: Experimental Protocol | Y. Sheffer |
Expires: September 30, 2011 | Porticor |
March 29, 2011 |
Password Authenticated Connection Establishment with IKEv2
draft-kuegler-ipsecme-pace-ikev2-06
IKEv2 does not allow secure peer authentication when using short credential strings, i.e. passwords. Several proposals have been made to integrate password-authentication protocols into IKE. This document provides an adaptation of PACE (Password Authenticated Connection Establishment) to the setting of IKEv2 and demonstrates the advantages of this integration.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/.
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 inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 30, 2011.
Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
PACE [TR03110] is a security protocol that establishes a mutually authenticated (and encrypted) channel between two parties based on weak (short) passwords. PACE provides strong session keys that are independent of the strength of the password. This draft describes the integration of PACE into IKEv2 [RFC5996] as a new authentication mode, analogous to the existing certificate and PSK authentication modes.
Some of the advantages of our approach, compared to the existing IKEv2, include: [PACEsec]. The PACE protocol is currently used in an international standard for digital travel documents [ICAO].
Compared to other protocols aiming at similar goals, PACE has several advantages. PACE was designed to be free of patents, and to allow for a high level of flexibility with respect to cryptographic algorithms, e.g. it can be implemented based on standard Diffie Hellman as well as Elliptic Curve Diffie Hellman without any restrictions on the mathematical group to be used other than the requirement that the group is cryptographically secure. The protocol itself is also proven to be cryptographically secure
The integration aims at keeping as much as possible of IKEv2 unchanged, e.g. the mechanisms used to establish Child SAs as provided by IKEv2 are maintained with no change.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
E() Symmetric encryption D() Symmetric decryption KA() Key agreement Map() Mapping function Pwd Shared password SPwd Stored password KPwd Symmetric key derived from a password Pwd G Static group generator GE Ephemeral group generator ENONCE Encrypted nonce PKEi Ephemeral public key of the initiator SKEi Ephemeral secret key of the initiator PKEr Ephemeral public key of the responder SKEr Ephemeral secret key of the responder AUTH Authentication payload
The following notation is used in this draft:
Any other notation used here is defined in [RFC5996].
At a high level the following steps are performed by the initiator and the responder. They result in exchanges IKE_PACE and IKE_PACE_AUTH as described in Section 3 that are performed directly after IKE_SA_INIT and fully replace IKE_AUTH.
The protocol consists of three exchanges, IKE_SA_INIT, IKE_PACE, and IKE_PACE_AUTH as follows:
Initiator Responder --------- --------- IKE_SA_INIT: HDR, SAi1, KEi, Ni, N(PACE_SUPPORTED) -> <- HDR, SAr1, KEr, Nr, N(PACE_SUPPORTED) IKE_PACE: HDR, SK{IDi, [IDr,], SAi2, TSi, TSr, ENONCE, PKEi} -> <- HDR, SK{IDr, PKEr} IKE_PACE_AUTH: HDR, SK{AUTH} -> <- HDR, SK{AUTH, SAr2, TSi, TSr}
The initiator sends a PACE_SUPPORTED notification to indicate its support of this extension, and its wish to authenticate using a password. If the responder accepts, it responds with the same notification. Otherwise, it omits the notification to indicate a preference for a regular IKE exchange. In the case of anti-DOS cookies (Sec. 2.6 of [RFC5996]), the notification MUST be resent by each peer every time it sends its IKE_SA_INIT message.
If PACE is supported, the algorithms negotiated in SAi1 and SAr1 are also used for the execution of PACE, i.e. the key agreement protocol (standard Diffie Hellman or Elliptic Curve Diffie Hellman), the group to be used, and the encryption algorithm.
This new exchange (number TBD by IANA) is the first part of the PACE authentication of the peers.
This exchange MUST NOT be used unless both peers indicated support of this protocol. On the other hand, to allow for future extensibility, the initiator MAY choose to proceed with IKE_AUTH instead of IKE_PACE, in which case the peers revert to a normal IKE exchange.
The initiator selects a random nonce s and encrypts it to form ENONCE using the password Pwd, as described in Section 4.1. Then the initiator maps the nonce to an ephemeral generator GE of the group as described in Section 4.2, chooses randomly and uniformly an ephemeral key pair (SKEi,PKEi) based on the ephemeral generator and finally generates the payloads ENONCE containing the encrypted nonce and PKEi containing the ephemeral public key.
The responder decrypts the received encrypted nonce s = D(KPwd, ENONCE), performs the mapping and randomly and uniformly chooses an ephemeral key pair (SKEr,PKEr) based on the ephemeral generator GE. The responder generates the PKEr payload containing the ephemeral public key.
During the Diffie-Hellman key agreement, each party MUST check that the two public keys PKEi and PKEr differ. Otherwise, it MUST abort the protocol.
The IKE_PACE request is equivalent to the IKE_AUTH request in a normal IKEv2 exchange, i.e. any payload which is valid in an IKE_AUTH request is valid (with the same semantics) in the IKE_PACE request. In particular, certificate-related payloads are allowed, even though their use may not be practical within this mode.
This new exchange (number TBD by IANA) is the second part of the PACE authentication of the peers.
The initiator and the responder calculate the shared secret PACESharedSecret:
where KA denotes the Diffie Hellman key agreement, e.g. (for MODP groups) modular exponentiation. Then they calculate the authentication tokens AUTHi and AUTHr.
The initiator calculates:
See Sec. 2.15 of [RFC5996] for the definition of signed octets.
The responder calculates:
Both AUTH payloads MUST indicate the new PACE authentication method, whose value is TBD by IANA. The authentication tokens are exchanged and each of them MUST be verified by the other party. The behavior when this verification fails is unchanged from [RFC5996].
The IKE_PACE_AUTH response is equivalent to the IKE_AUTH response in a normal IKEv2 exchange, i.e. any payload which is valid in an IKE_AUTH response is valid (with the same semantics) in the IKE_PACE_AUTH response.
Following authentication, all temporary values MUST be deleted by the peers, including in particular s, the ephemeral generator, the ephemeral key pairs, and PACESharedSecret.
The shared password is not used as-is. Instead, it SHOULD be converted into a "stored password" SPwd, so that the plaintext password does not need to be stored for long periods. SPwd is defined as:
where the literal string consists of ASCII characters with no zero terminator. If the negotiated prf requires a fixed-size key, the literal string is as needed either truncated or padded with zero octets on the right.
where Ni and Nr are the regular IKE nonces, stripped of any headers. If the negotiated prf takes a fixed-length key and the lengths of Ni and Nr do not add up to that length, half the bits must come from Ni and half from Nr, taking the first bits of each. "prf+" is defined in Sec. 2.13 of [RFC5996]. The length of KPwd is determined by the key length of the negotiated encryption algorithm.
A nonce s is randomly selected by the initiator (see Section 6.4 for additional considerations). The length of s MUST be exactly 32 octets.
Note: Padding MUST NOT be used when encrypting the nonce. The size of the nonce has been chosen such that is can be encrypted with block ciphers having block sizes of 32, 64, and 128 bit without any padding.
If an authenticated encryption cipher [RFC5282] has been negotiated for the IKE SA, it MUST NOT be used as-is because such use would be vulnerable to dictionary attacks. Instead, the corresponding unauthenticated mode MUST be used. For example, if the negotiated encryption algorithm (Transform Type 1) is "AES-GCM with a 8 octet ICV", then ENCR_AES_CTR (with the same key length) is used to encrypt the nonce.
KPwd is now used with the encryption transform to encrypt the nonce:
If an Initialization Vector (IV) is required by the cipher, it MUST be included in the ENONCE payload. It is RECOMMENDED to choose the IV randomly and uniformly distributed, even though this condition is not necessary for the cryptographic security of the protocol.
The mapping is based on a second anonymous Diffie-Hellman key agreement protocol to create a shared secret which is used together with the exchanged nonce to calculate a common secret generator of the group.
While in [TR03110] the generation of the shared secret is part of the mapping, in the setting of IKEv2 a shared secret SASharedSecret has already been generated as part of the IKE_SA_INIT step. Using the notation of [RFC5996],
Let G and GE be the generator of the negotiated DH group, and the calculated ephemeral generator, respectively. The following subsections describe the mapping for different Diffie Hellman variants.
The function Map:G->GE is defined as GE = G^s * SASharedSecret.
Note that the protocol will fail if G^s = 1/SASharedSecret. If s is chosen randomly, this event occurs with negligible probability. In implementations that detect such a failure, the initiator SHOULD choose s again.
The function Map:G->GE is defined as GE = s*G + SASharedSecret.
Note that the protocol will fail if s*G = -SharedSecret. If s is chosen randomly, this event occurs with negligible probability. In implementations that detect such a failure, the initiator SHOULD choose s again.
Implementations MUST verify that the shared secrets SASharedSecret and PACESharedSecret are elements of the group generated by G to prevent small subgroup attacks.
It is RECOMMENDED to use the public key validation method or the compatible cofactor exponentiation described in Section 3.1 and Section 3.4, respectively, of [RFC2785]. The Elliptic Curve equivalents of those methods are described in more detail in [TR03111].
Any failure in the validation MUST be interpreted as an attack, and the protocol SHALL be aborted.
The input password string SHOULD be processed according to the rules of the [RFC4013] profile of [RFC3454]. A password SHOULD be considered a "stored string" per [RFC3454] and unassigned code points are therefore prohibited. The output is the binary representation of the processed UTF-8 character string. Prohibited output and unassigned codepoints encountered in SASLprep preprocessing SHOULD cause a preprocessing failure and the output SHOULD NOT be used.
This protocol defines a new PACE_SUPPORTED notification, with type number TBD by IANA. This is an empty notification: The Protocol ID and SPI size fields are set to zero, and there is no additional data associated with this notification.
This protocol defines a new ENONCE (encrypted nonce) payload, with payload type TBD by IANA. Its format is as follows:
0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Payload |C| RESERVED | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Initialization Vector | | (optional, length depends on the encryption algorithm) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encrypted Nonce ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
See Section 4.1 for further details about the encrypted nonce. Note that the protocol, and in particular this payload's format, does not support any padding of the encrypted data.
These payloads have an identical format to the IKEv2 KE payload. However, this protocol defines a new payload type named PKE (Public Key - Ephemeral), whose value is TBD by IANA. Since only one Diffie Hellman group is negotiated, the group denoted by these payloads MUST be identical to the one used in the KE payloads.
A session resumption [RFC5723] ticket may be requested during the IKE_PACE/IKE_PACE_AUTH exchanges. The request MUST be sent in the IKE_PACE request, and any response MUST be sent in the IKE_PACE_AUTH response.
PACE should be considered an "authentication method", in the sense of Sec. 5 of [RFC5723], which means that its use MUST be noted in the protected ticket.
Note that even if the initial authentication used PACE and its new exchange types, session resumption will still include the normal IKE_AUTH exchange.
A major goal of this protocol has been to maintain the level of security provided by IKEv2. What follows is an analysis of this protocol. The reader is referred to [RFC5996] for the generic IKEv2 security considerations.
This protocol makes no assumption on the strength of the shared credential. Best common practices regarding minimal password length, use of multiple character classes etc. SHOULD be followed.
The protocol is secure against both passive and active attackers. See Section 6.8 for a security proof.
While not attacking the cryptography, an attacker can still perform a standard password guessing attack. To mitigate such attacks, an implementation MUST include standard protections, such as rate limiting the number of allowed password guessing attempts, possibly locking identities out after a certain number of failed attempts etc. Note that the protocol is symmetric and therefore this guidance applies to client-side implementations as well.
The key derivation for the IKE SA and any Child SAs is performed as part of IKEv2 and remains unchanged. It directly follows that perfect forward security is provided independent of the authentication additionally performed by PACE.
The security of this protocol depends on the quality generation of random quantities, and see Sec. 5 of [RFC5996] for more details. Specifically, any deviation from randomness of the nonce s might compromise the password. Therefore, it is strongly RECOMMENDED that the initiator passes the raw random material through a strong prf to ensure the statistical qualities of the nonce.
This protocol is identical to IKEv2 in the quality of identity protection it provides. Both peers' identities are secure from passive attackers, and both peers' identities are exposed to active, man-in-the-middle attackers.
We are not aware of any new denial-of-service attack vector enabled by this protocol.
Any transforms negotiated for IKEv2 may be used by this protocol.
PACE is cryptographically proven secure in [PACEsec] in the model of Bellare, Pointcheval, and Rogaway [BPRmodel]. The setting in which PACE is proven secure is however slightly different from the setting used in IKEv2. The differences are described in the following:
The differences in the setting therefore have no impact on the validity of the proof.
This protocol does not require peers to store the plaintext password. Instead, the value KPwd SHOULD be stored by both peers.
It has been suggested to generate a "long" shared secret after the initial authentication, such that the peers can use it later for standard preshared-secret authentication, in lieu of the short password. We have not been able to identify sufficient security benefits with this approach that would justify the added complexity.
IANA is requested to allocate (has allocated) the following values:
This document does not define any new registries.
We would like to thank Dan Harkins for pointing out a security issue with our use of combined-mode algorithms, in a previous version of the protocol.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC2785] | Zuccherato, R., "Methods for Avoiding the "Small-Subgroup" Attacks on the Diffie-Hellman Key Agreement Method for S/MIME", RFC 2785, March 2000. |
[RFC3454] | Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("stringprep")", RFC 3454, December 2002. |
[RFC4013] | Zeilenga, K., "SASLprep: Stringprep Profile for User Names and Passwords", RFC 4013, February 2005. |
[RFC5996] | Kaufman, C., Hoffman, P., Nir, Y. and P. Eronen, "Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 5996, September 2010. |
To support the selection of a password-based protocol for inclusion in IKEv2, a number of criteria are provided in [I-D.harkins-ipsecme-pake-criteria]. In the following sections, those criteria are applied to the PACE protocol.
Note to RFC Editor: please remove this appendix before publication.
Defined how autheticated-encryption algorithms can be used. Updated references.
Editorial corrections.
Editorial corrections.
Completed the security considerations (security proof). Reordered some sections for clarity.
Added security considerations. Changed encryption of the nonce. Simplified the derivation of the AUTH payloads.
Formalized the protocol: added payload formats, error behavior etc.