Network Working Group                                        V. Torvinen
Request for Comments: 4169                             Turku Polytechnic
Category: Informational                                         J. Arkko
                                                              M. Naslund
                                                                Ericsson
                                                           November 2005
        
Network Working Group                                        V. Torvinen
Request for Comments: 4169                             Turku Polytechnic
Category: Informational                                         J. Arkko
                                                              M. Naslund
                                                                Ericsson
                                                           November 2005
        

Hypertext Transfer Protocol (HTTP) Digest Authentication Using Authentication and Key Agreement (AKA) Version-2

使用身份验证和密钥协议(AKA)的超文本传输协议(HTTP)摘要身份验证版本2

Status of This Memo

关于下段备忘

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2005).

版权所有(C)互联网协会(2005年)。

Abstract

摘要

HTTP Digest, as specified in RFC 2617, is known to be vulnerable to man-in-the-middle attacks if the client fails to authenticate the server in TLS, or if the same passwords are used for authentication in some other context without TLS. This is a general problem that exists not just with HTTP Digest, but also with other IETF protocols that use tunneled authentication. This document specifies version 2 of the HTTP Digest AKA algorithm (RFC 3310). This algorithm can be implemented in a way that it is resistant to the man-in-the-middle attack.

RFC 2617中指定的HTTP摘要,如果客户端无法在TLS中对服务器进行身份验证,或者如果在没有TLS的某些其他上下文中使用相同的密码进行身份验证,则很容易受到中间人攻击。这是一个普遍存在的问题,不仅存在于HTTP摘要中,也存在于使用隧道身份验证的其他IETF协议中。本文档指定了HTTP摘要AKA算法(RFC 3310)的版本2。该算法的实现方式可以抵抗中间人攻击。

Table of Contents

目录

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
       1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . .  4
   2.  HTTP Digest AKAv2  . . . . . . . . . . . . . . . . . . . . . .  5
       2.1.  Password generation  . . . . . . . . . . . . . . . . . .  6
       2.2.  Session keys . . . . . . . . . . . . . . . . . . . . . .  6
   3.  Example Digest AKAv2 Operation . . . . . . . . . . . . . . . .  7
   4.  Security Considerations  . . . . . . . . . . . . . . . . . . .  7
       4.1.  Multiple Authentication Schemes and Algorithms . . . . .  7
       4.2.  Session Protection . . . . . . . . . . . . . . . . . . .  7
       4.3.  Man-in-the-middle attacks  . . . . . . . . . . . . . . .  8
       4.4.  Entropy  . . . . . . . . . . . . . . . . . . . . . . . .  9
   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
       5.1.  Registration Information . . . . . . . . . . . . . . . . 10
   6.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
       6.1.  Normative References . . . . . . . . . . . . . . . . . . 11
       6.2.  Informative References . . . . . . . . . . . . . . . . . 11
        
   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
       1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . .  4
   2.  HTTP Digest AKAv2  . . . . . . . . . . . . . . . . . . . . . .  5
       2.1.  Password generation  . . . . . . . . . . . . . . . . . .  6
       2.2.  Session keys . . . . . . . . . . . . . . . . . . . . . .  6
   3.  Example Digest AKAv2 Operation . . . . . . . . . . . . . . . .  7
   4.  Security Considerations  . . . . . . . . . . . . . . . . . . .  7
       4.1.  Multiple Authentication Schemes and Algorithms . . . . .  7
       4.2.  Session Protection . . . . . . . . . . . . . . . . . . .  7
       4.3.  Man-in-the-middle attacks  . . . . . . . . . . . . . . .  8
       4.4.  Entropy  . . . . . . . . . . . . . . . . . . . . . . . .  9
   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
       5.1.  Registration Information . . . . . . . . . . . . . . . . 10
   6.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
       6.1.  Normative References . . . . . . . . . . . . . . . . . . 11
       6.2.  Informative References . . . . . . . . . . . . . . . . . 11
        
1. Introduction
1. 介绍

The Hypertext Transfer Protocol (HTTP) Digest Authentication, described in [4], has been extended in [6] to support the Authentication and Key Agreement (AKA) mechanism [7]. The AKA mechanism performs authentication and session key agreement in Universal Mobile Telecommunications System (UMTS) networks. HTTP Digest AKA enables the usage of AKA as a one-time password generation mechanism for Digest authentication.

[4]中描述的超文本传输协议(HTTP)摘要身份验证在[6]中进行了扩展,以支持身份验证和密钥协商(AKA)机制[7]。AKA机制在通用移动通信系统(UMTS)网络中执行身份验证和会话密钥协商。HTTP摘要AKA允许使用AKA作为摘要身份验证的一次性密码生成机制。

HTTP Digest is known to be vulnerable to man-in-the-middle attacks, even when run inside TLS, if the same HTTP Digest authentication credentials are used in some other context without TLS. The attacker may initiate a TLS session with a server, and when the server challenges the attacker with HTTP Digest, the attacker masquerades the server to the victim. If the victim responds to the challenge, the attacker is able to use this response towards the server in HTTP Digest. Note that this attack is an instance of a general attack that affects a number of IETF protocols, such as PIC. The general problem is discussed in [8] and [9].

已知HTTP摘要易受中间人攻击,即使在TLS内运行,如果在没有TLS的其他上下文中使用相同的HTTP摘要身份验证凭据。攻击者可以启动与服务器的TLS会话,当服务器使用HTTP摘要向攻击者发起挑战时,攻击者将服务器伪装成受害者。如果受害者对质询做出响应,则攻击者可以在HTTP摘要中使用此响应来攻击服务器。请注意,此攻击是影响许多IETF协议(如PIC)的一般攻击的一个实例。一般问题在[8]和[9]中讨论。

Because of the vulnerability described above, the use of HTTP Digest "AKAv1" should be limited to the situations in which the client is able to demonstrate that, in addition to the AKA response, it possesses the AKA session keys. This is possible, for example, if the underlying security protocol uses the AKA-generated session keys to protect the authentication response. This is the case, for example, in the 3GPP IP Multimedia Core Network Subsystem (IMS), where HTTP Digest "AKAv1" is currently applied. However, HTTP Digest

由于上述漏洞,HTTP摘要“AKAv1”的使用应限于客户端能够证明,除了AKA响应之外,它还拥有AKA会话密钥的情况。例如,如果基础安全协议使用AKA生成的会话密钥来保护身份验证响应,则这是可能的。例如,在3GPP IP多媒体核心网络子系统(IMS)中就是这种情况,其中当前应用了HTTP摘要“AKAv1”。然而,HTTP摘要

"AKAv1" should not be used with tunnelled security protocols that do not utilize the AKA session keys. For example, the use of HTTP Digest "AKAv1" is not necessarily secure with TLS if the server side is authenticated using certificates and the client side is authenticated using HTTP Digest AKA.

“AKAv1”不应与不使用AKA会话密钥的隧道安全协议一起使用。例如,如果服务器端使用证书进行身份验证,而客户端使用HTTP摘要AKA进行身份验证,则使用HTTP摘要“AKAv1”不一定对TLS安全。

There are at least four potential solutions to the problem:

该问题至少有四种可能的解决方案:

1. The use of the authentication credentials is limited to one application only. In general, this approach is good and can be recommended from the security point of view. However, this will increase the total number of authentication credentials for an end-user, and may cause scalability problems in the server side.

1. 身份验证凭据的使用仅限于一个应用程序。一般来说,这种方法是好的,从安全角度来看,可以推荐使用。但是,这将增加最终用户的身份验证凭据总数,并可能导致服务器端的可伸缩性问题。

2. The keys used in the underlying security protocols are somehow bound to the keys used in the tunneled authentication protocol. However, this would cause problems with the current implementations of underlying security protocols. For example, it is not possible to use the session keys from TLS at the application layer. Furthermore, this solution would only solve the problem when HTTP Digest is used over one hop, and would leave the problem of using HTTP Digest via multiple hops (e.g., via proxy servers) unsolved.

2. 底层安全协议中使用的密钥以某种方式绑定到隧道身份验证协议中使用的密钥。然而,这将导致底层安全协议的当前实现出现问题。例如,不可能在应用层使用来自TLS的会话密钥。此外,此解决方案仅能解决在一个跃点上使用HTTP摘要时的问题,并且将无法解决通过多个跃点(例如,通过代理服务器)使用HTTP摘要的问题。

3. Authentication credentials are used in a cryptographically different way for each media and/or access network. However, it may be difficult to know which underlying media is used below the application.

3. 对于每个媒体和/或访问网络,身份验证凭据以不同的加密方式使用。但是,可能很难知道应用程序下面使用的是哪种底层介质。

4. Authentication credentials are used in a cryptographically different way for each application.

4. 每个应用程序都以不同的加密方式使用身份验证凭据。

This document specifies a new algorithm version for HTTP Digest AKA (i.e., "AKAv2"). "AKAv2" specifies a cryptographically different way to use AKA credentials in use cases that are based on either HTTP Digest authentication or UMTS authentication (cf. approach 4 above). The only difference to "AKAv1" is that, in addition to an AKA response RES, the AKA related session keys, IK and CK, are also used as the password for HTTP Digest. AKAv2 is immune to the man-in-the-middle attack described above. However, if AKAv2 is used in some environment, both with and without some underlying security, such as TLS, the problem still exists.

本文档指定了HTTP摘要AKA(即“AKAv2”)的新算法版本。“AKAv2”指定了在基于HTTP摘要身份验证或UMTS身份验证的用例中使用AKA凭证的不同加密方式(参见上面的方法4)。与“AKAv1”的唯一区别在于,除了AKA响应RES之外,与AKA相关的会话密钥IK和CK也被用作HTTP摘要的密码。AKAv2对上述中间人攻击免疫。但是,如果在某些环境中使用AKAv2,无论是否有一些底层安全性,例如TLS,问题仍然存在。

New HTTP Digest AKA algorithm versions can be registered with IANA, based on Expert Review. Documentation of new algorithm versions is not mandated as RFCs. However, "AKAv2" is documented as an RFC because the use of different AKA algorithm versions includes security implications of which the implementors should be aware. The

根据专家评审,可以向IANA注册新的HTTP摘要AKA算法版本。新算法版本的文档不是强制要求的RFC。然而,“AKAv2”被记录为RFC,因为不同AKA算法版本的使用包括实现者应该知道的安全含义。这个

extension version and security implications are presented in this document.

本文档介绍了扩展版本和安全含义。

1.1. Terminology
1.1. 术语

This chapter explains the terminology used in this document.

本章解释了本文件中使用的术语。

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 [3].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[3]中所述进行解释。

AKA

又称作

Authentication and Key Agreement.

身份验证和密钥协商。

AKA is a challenge-response based mechanism that uses symmetric cryptography. AKA can be run in a UMTS IM Services Identity Module (ISIM) or in UMTS Subscriber Identity Module (USIM), which reside on a smart-card-like device that also provides tamper resistant storage of shared secrets.

AKA是一种基于质询-响应的机制,使用对称加密技术。AKA可以在UMTS IM服务标识模块(ISIM)或UMTS用户标识模块(USIM)中运行,该模块位于智能卡类设备上,该设备还提供共享机密的防篡改存储。

CK

CK

Cipher Key. An AKA session key for encryption.

密码钥匙。用于加密的AKA会话密钥。

CK'

CK'

Cipher Key. HTTP Digest AKAv2 session key for encryption. CK' is derived from CK using a pseudo-random function.

密码钥匙。用于加密的HTTP摘要AKAv2会话密钥。CK'是使用伪随机函数从CK推导而来的。

IK

IK

Integrity Key. An AKA session key for integrity check.

完整性密钥。用于完整性检查的AKA会话密钥。

IK'

IK'

Integrity Key. HTTP Digest AKAv2 session key for integrity check. IK' is derived from IK using a pseudo-random function.

完整性密钥。完整性检查的HTTP摘要AKAv2会话密钥。IK'是使用伪随机函数从IK派生的。

ISIM

伊斯兰国

IP Multimedia Services Identity Module. Sometimes ISIM is implemented using USIM.

IP多媒体服务识别模块。有时ISIM是使用USIM实现的。

RES

皇家经济学会

Authentication Response. Generated by the ISIM.

身份验证响应。由ISIM生成。

PRF

PRF

Pseudo-random function that is used to construct the AKAv2 password and related session keys IK' and CK'. In this document, PRF is presented in the format KD(secret, data), denoting a keyed digest algorithm (KD) performed to the data ("data") with the secret ("secret").

用于构造AKAv2密码和相关会话密钥IK'和CK'的伪随机函数。在本文档中,PRF以KD(secret,data)格式表示,表示对数据(“data”)执行的密钥摘要算法(KD),该算法使用secret(“secret”)。

SIM

模拟

Subscriber Identity Module. GSM counter part for ISIM and USIM.

用户识别模块。用于ISIM和USIM的GSM计数器部件。

UMTS

城市轨道交通

Universal Mobile Telecommunications System.

通用移动通信系统。

USIM

乌西姆

UMTS Subscriber Identity Module. UMTS counter part for ISIM and SIM.

UMTS用户识别模块。用于ISIM和SIM的UMTS计数器部件。

XRES

XRES

Expected Authentication Response. In a successful authentication, this is equal to RES.

预期的身份验证响应。在成功的身份验证中,这等于RES。

2. HTTP Digest AKAv2
2. HTTP摘要AKAv2

In general, the Digest AKAv2 operation is identical to the Digest AKAv1 operation described in [6]. This chapter specifies the parts in which Digest AKAv2 is different from Digest AKAv1 operation. The notation used in the Augmented BNF definitions for the new and modified syntax elements in this section is as used in SIP [5], and any elements not defined in this section are as defined in [6].

通常,摘要AKAv2操作与[6]中描述的摘要AKAv1操作相同。本章规定了摘要AKAv2不同于摘要AKAv1操作的部分。本节新增和修改的语法元素的扩充BNF定义中使用的符号与SIP[5]中使用的符号相同,本节中未定义的任何元素与[6]中的定义相同。

In order to direct the client into using AKAv2 for authentication instead of other AKA versions or other HTTP Digest algorithms, the AKA version directive of [6] shall have the following new value:

为了指导客户端使用AKAv2进行身份验证,而不是使用其他AKA版本或其他HTTP摘要算法,[6]的AKA版本指令应具有以下新值:

      aka-version         =  "AKAv2"
        
      aka-version         =  "AKAv2"
        

The AKA version directive is used as a part of the algorithm field as defined in [6].

AKA版本指令用作[6]中定义的算法字段的一部分。

Example: algorithm=AKAv2-MD5

示例:算法=AKAv2-MD5

2.1. Password Generation
2.1. 密码生成

The client shall use base64 encoded [1] parameters PRF(RES||IK||CK, "http-digest-akav2-password") as a "password" when calculating the HTTP Digest response directive for AKAv2.

在计算akav2的http摘要响应指令时,客户端应使用base64编码的[1]参数PRF(RES | | IK | | CK,“http-digest-akav2-password”)作为“密码”。

The server shall use base64 encoded [1] parameters PRF(XRES||IK||CK, "http-digest-akav2-password") as a "password" when checking the HTTP Digest response or when calculating the "response-auth" of the "Authentication-Info" header.

在检查http摘要响应或计算“身份验证信息”标头的“响应验证”时,服务器应使用base64编码的[1]参数PRF(XRES | IK | CK,“http-digest-akav2-password”)作为“密码”。

The pseudo-random function (PRF) used to construct the HTTP Digest password is equal to HMAC [2] using the hash algorithm that is used in producing the digest and the checksum. For example, if the algorithm is AKAv2-MD5, then the PRF is HMAC_MD5.

用于构造HTTP摘要密码的伪随机函数(PRF)等于使用哈希算法生成摘要和校验和的HMAC[2]。例如,如果算法为AKAv2-MD5,则PRF为HMAC_MD5。

The string "http-digest-akav2-password" included in the key derivation is case sensitive.

密钥派生中包含的字符串“http-digest-akav2-password”区分大小写。

2.2. Session keys
2.2. 会话密钥

Even though the HTTP Digest AKA framework does not specify the use of the session keys IK and CK for confidentiality and integrity protection, the keys may be used for creating additional security within HTTP authentication or some other security mechanism. However, the original session keys IK and CK MUST NOT be directly re-used for such additional security in "AKAv2". Instead, session keys IK' and CK' are derived from the original keys IK and CK in the following way:

即使HTTP摘要AKA框架没有指定使用会话密钥IK和CK进行机密性和完整性保护,这些密钥也可以用于在HTTP认证或某些其他安全机制中创建额外的安全性。但是,原始会话密钥IK和CK不得直接用于“AKAv2”中的此类附加安全性。相反,会话关键点IK'和CK'是通过以下方式从原始关键点IK和CK派生的:

IK' = PRF(IK, "http-digest-akav2-integritykey")

IK'=PRF(IK,“http-digest-akav2-integritykey”)

CK' = PRF(CK, "http-digest-akav2-cipherkey")

CK'=PRF(CK,“http-digest-akav2-cipherkey”)

Any application using the HTTP authentication framework is allowed to use these masked session keys. The unmasked session keys MAY also be re-used in some other context if application-specific strings other than "http-digest-akav2-integritykey" or "http-digest-akav2-cipherkey" are used to mask the original session keys.

任何使用HTTP身份验证框架的应用程序都可以使用这些屏蔽会话密钥。如果使用“http-digest-akav2-integritykey”或“http-digest-akav2-cipherkey”以外的特定于应用程序的字符串来屏蔽原始会话密钥,则未屏蔽的会话密钥也可以在某些其他上下文中重复使用。

The pseudo-random function (PRF) used to construct the HTTP Digest session keys is equal to HMAC [2] using the hash algorithm that is used in producing the digest and the checksum. For example, if the algorithm is AKAv2-MD5, then the PRF is HMAC_MD5. The algorithm MUST be used in the HMAC format, as defined in [2].

用于构造HTTP摘要会话密钥的伪随机函数(PRF)等于使用哈希算法生成摘要和校验和的HMAC[2]。例如,如果算法为AKAv2-MD5,则PRF为HMAC_MD5。该算法必须采用[2]中定义的HMAC格式。

The strings "http-digest-akav2-integritykey" and "http-digest-akav2- cipherkey" included in the key derivation are case sensitive.

密钥派生中包含的字符串“http-digest-akav2-integritykey”和“http-digest-akav2-cipherkey”区分大小写。

3. Example Digest AKAv2 Operation
3. AKAv2操作示例

This document does not introduce any changes to the operations of HTTP Digest or HTTP Digest AKA. Examples defined in [6] apply directly to AKAv2 with the following two exceptions:

本文档不对HTTP摘要或HTTP摘要的操作进行任何更改。[6]中定义的示例直接适用于AKAv2,但以下两个例外:

1. The algorithm directive has a prefix "AKAv2" instead of "AKAv1".

1. 算法指令的前缀为“AKAv2”,而不是“AKAv1”。

2. The HTTP Digest password is derived from base64 encoded PRF(RES|| IK||CK, "http-digest-akav2-password") or PRF(XRES||IK||CK, "http-digest-akav2-password") instead of (RES) or (XRES) respectively.

2. HTTP摘要密码源于base64编码的PRF(RES | IK | CK,“HTTP-Digest-akav2-password”)或PRF(XRES | IK | CK,“HTTP-Digest-akav2-password”),而不是(RES)或(XRES)。

3. The optional session keys are derived from PRF(IK, "http-digest-akav2-integritykey") and PRF(CK, "http-digest-akav2-cipherkey") instead of IK and CK respectively.

3. 可选会话密钥分别来自PRF(IK,“http-digest-akav2-integritykey”)和PRF(CK,“http-digest-akav2-cipherkey”),而不是IK和CK。

Note that the password in "AKAv1" is in binary format. The "AKAv2" password is base64 encoded [1].

请注意,“AKAv1”中的密码是二进制格式的。“AKAv2”密码是base64编码的[1]。

4. Security Considerations
4. 安全考虑
4.1. Multiple Authentication Schemes and Algorithms
4.1. 多认证方案和算法

The rules for a user agent for choosing among multiple authentication schemes and algorithms are as defined in [6], except that the user agent MUST choose "AKAv2" if both "AKAv1" and "AKAv2" are present.

用户代理在多个身份验证方案和算法中进行选择的规则如[6]所述,但如果同时存在“AKAv1”和“AKAv2”,则用户代理必须选择“AKAv2”。

Since HTTP Digest is known to be vulnerable for bidding-down attacks in environments where multiple authentication schemes and/or algorithms are used, the system implementors should pay special attention to scenarios in which both "AKAv1" and "AKAv2" are used. The use of both AKA algorithm versions should be avoided, especially if the AKA generated sessions keys or some other additional security measures to authenticate the clients (e.g., client certificates) are not used.

由于已知HTTP摘要在使用多个身份验证方案和/或算法的环境中易受攻击,因此系统实现人员应特别注意同时使用“AKAv1”和“AKAv2”的场景。应避免使用两种AKA算法版本,尤其是如果未使用AKA生成的会话密钥或其他一些附加安全措施来验证客户端(例如,客户端证书)。

4.2. Session Protection
4.2. 会话保护

Even though "AKAv2" uses the additional integrity (IK) and confidentiality (CK) keys as a part of the HTTP Digest AKA password, these session keys may still be used for creating additional security within HTTP authentication or some other security mechanism. This recommendation is based on the assumption that algorithms used in HTTP Digest, such as MD5, are sufficiently strong one-way functions, and, consequently, HTTP Digest responses leak no or very little

即使“AKAv2”使用额外的完整性(IK)和机密性(CK)密钥作为HTTP摘要AKA密码的一部分,这些会话密钥仍可用于在HTTP身份验证或某些其他安全机制中创建额外的安全性。此建议基于这样的假设:HTTP摘要中使用的算法(如MD5)是足够强的单向函数,因此HTTP摘要响应不会泄漏或泄漏很少

computational information about IK and CK. Furthermore, the session keys are masked into IK' and CK' before they can be used for session protection.

有关IK和CK的计算信息。此外,会话密钥在用于会话保护之前被掩蔽为IK'和CK'。

4.3. Man-in-the-Middle Attacks
4.3. 中间人攻击

Reference [8] describes a "man-in-the-middle" attack related to tunnelled authentication protocols. The attack can occur in an EAP context or any similar contexts where tunnelled authentication is used and where the same authentication credentials are used without protection in some other context or the client fails to authenticate the server.

参考文献[8]描述了与隧道身份验证协议相关的“中间人”攻击。攻击可能发生在EAP上下文或任何类似上下文中,其中使用了隧道身份验证,并且在某些其他上下文中使用了相同的身份验证凭据而没有保护,或者客户端无法对服务器进行身份验证。

For example, the use of TLS with HTTP Digest authentication (i.e., TLS for server authentication, and subsequent use of HTTP Digest for client authentication) is an instance of such scenario. HTTP challenges and responses can be fetched from and to different TLS tunnels without noticing their origin. The attack is especially easy to perform if the client fails to authenticate the server. If the same HTTP credentials are used with an unsecured connection, the attack is also easy to perform.

例如,将TLS与HTTP摘要身份验证一起使用(即,TLS用于服务器身份验证,随后将HTTP摘要用于客户端身份验证)就是此类场景的一个实例。HTTP质询和响应可以从不同的TLS隧道获取,也可以从不同的TLS隧道获取,而不必注意它们的来源。如果客户端无法对服务器进行身份验证,则攻击尤其容易执行。如果将相同的HTTP凭据用于不安全的连接,则攻击也很容易执行。

This is how the "man-in-the-middle" attack works with HTTP Digest and TLS if the victim (i.e., the client) fails to authenticate the server:

这就是“中间人”攻击在受害者(即客户机)无法对服务器进行身份验证时如何使用HTTP摘要和TLS的方式:

1. The victim contacts the attacker using TLS. If the attacker has a valid server certificate, the client may continue talking to the attacker and use some HTTP authentication compatible protocol, such as the Session Initiation Protocol (SIP).

1. 受害者使用TLS与攻击者联系。如果攻击者拥有有效的服务器证书,则客户端可能会继续与攻击者对话,并使用一些HTTP身份验证兼容协议,如会话启动协议(SIP)。

2. The attacker contacts a real proxy/server also using TLS and an HTTP-authentication-compatible protocol. The proxy/server responds to the attacker with the HTTP Authentication challenge.

2. 攻击者还使用TLS和HTTP身份验证兼容协议联系真实的代理/服务器。代理/服务器通过HTTP身份验证质询响应攻击者。

3. The attacker forwards the HTTP Authentication challenge from the proxy/server to the victim. If the victim is not careful, and does not check whether the identity in the server certificate in TLS matches the realm in the HTTP authentication challenge, it may send a new request that carries a valid response to the HTTP Authentication challenge.

3. 攻击者将HTTP身份验证质询从代理/服务器转发给受害者。如果受害者不小心,并且没有检查TLS中服务器证书中的标识是否与HTTP身份验证质询中的域匹配,则它可能会发送一个新请求,该请求包含对HTTP身份验证质询的有效响应。

4. The attacker may use the response with the victims HTTP Digest username and password to authenticate itself to the proxy/server.

4. 攻击者可以使用带有受害者HTTP摘要用户名和密码的响应向代理/服务器进行身份验证。

The man-in-the-middle attack is not possible if the client compares the identities in the TLS server certificate and the HTTP Digest authentication challenge. Note that with HTTP Basic, the client would send the password to the attacker.

如果客户端比较TLS服务器证书和HTTP摘要身份验证质询中的身份,则中间人攻击是不可能的。请注意,使用HTTP Basic,客户端将向攻击者发送密码。

Another variant of the "man-in-the-middle" attack is the so-called "interleaving attack". This attack is possible if the HTTP Digest authentication credentials are used in several contexts, and in one of them without protection.

“中间人”攻击的另一个变体是所谓的“交错攻击”。如果HTTP摘要身份验证凭据在多个上下文中使用,并且在其中一个上下文中没有保护,则可能发生此攻击。

This is how the attack could proceed:

这就是攻击的方式:

1. The attacker establishes a TLS tunnel to the proxy/server using one-way server authentication. The attacker sends a request to the proxy/server.

1. 攻击者使用单向服务器身份验证建立到代理/服务器的TLS隧道。攻击者向代理/服务器发送请求。

2. The proxy/server challenges the attacker with the HTTP Digest challenge.

2. 代理/服务器通过HTTP摘要质询向攻击者发起质询。

3. The attacker challenges the victim in some other context using the challenge carried in the HTTP Digest challenge. The HTTP Digest challenge needs to be modified to the format used in the protocol of this other context.

3. 攻击者使用HTTP摘要质询中携带的质询在其他上下文中质询受害者。HTTP摘要质询需要修改为其他上下文的协议中使用的格式。

4. The victim responds with a response.

4. 受害者做出了回应。

5. The attacker uses the response from the other context for authentication in HTTP Digest.

5. 攻击者使用来自其他上下文的响应在HTTP摘要中进行身份验证。

6. The proxy/server accepts the response, and delivers the service to the attacker.

6. 代理/服务器接受响应,并向攻击者提供服务。

In some circumstances, HTTP Digest AKAv1 may be vulnerable for the interleaving attack. In particular, if ISIM is implemented using USIM, the HTTP Digest AKAv1 should not be used with tunneled security protocols unless the AKA-related session keys, IK and CK, are somehow used with the solution.

在某些情况下,HTTP摘要AKAv1可能容易受到交错攻击。特别是,如果使用USIM实现ISIM,则HTTP摘要AKAv1不应与隧道安全协议一起使用,除非与AKA相关的会话密钥IK和CK以某种方式与解决方案一起使用。

HTTP Digest AKAv2 is not vulnerable to this interleaving attack, and it can be used with tunneled security protocols without using the related AKA session keys.

HTTP摘要AKAv2不易受到这种交叉攻击,并且可以与隧道安全协议一起使用,而无需使用相关的AKA会话密钥。

4.4. Entropy
4.4. 熵

AKAv1 passwords should only be used as one-time passwords if the entropy of the used RES value is limited (e.g., only 32 bits). For this reason, the re-use of the same RES value in authenticating subsequent requests and responses is not recommended. Furthermore,

如果使用的RES值的熵有限(例如,仅32位),则只能将AKAv1密码用作一次性密码。因此,不建议在验证后续请求和响应时重复使用相同的RES值。此外

algorithms such as "MD5-sess", which limit the amount of material hashed with a single key by producing a session key for authentication, should not be used with AKAv1.

诸如“MD5 sess”之类的算法,通过生成用于身份验证的会话密钥来限制使用单个密钥散列的内容量,不应与AKAv1一起使用。

Passwords generated using AKAv2 can more securely be used for authenticating subsequent requests and responses because the concatenation of AKA credentials (i.e., RES||IK||CK) makes the passwords significantly longer, and the pseudo-random function heuristically provides an entropy equal to the length of this string, or the length of the PRF output, whichever is the shortest. The user agent does not need to assume that AKAv2 passwords are limited to one-time use only, and it may try to re-use the AKAv2 passwords with the server. However, note that AKAv2 passwords cannot be re-used with the HTTP Digest AKAv2 algorithm because such an authentication challenge will automatically generate a fresh password. AKAv2 passwords can be used with other HTTP Digest algorithms, such as "MD5".

使用AKAv2生成的密码可以更安全地用于验证后续请求和响应,因为AKA凭证(即RES | | IK | CK)的串联使密码显著更长,并且伪随机函数试探性地提供了等于此字符串长度的熵,或PRF输出的长度,以最短者为准。用户代理不需要假定AKAv2密码仅限于一次性使用,它可以尝试在服务器上重复使用AKAv2密码。但是,请注意,不能将AKAv2密码与HTTP摘要AKAv2算法一起重新使用,因为这样的身份验证质询将自动生成新密码。AKAv2密码可用于其他HTTP摘要算法,如“MD5”。

The underlying AKA protocol (e.g., UMTS AKA) has been designed to keep CK and IK confidential, but will typically send RES in the clear. We note that, even if (by some unfortunate misuse of AKA) RES values were revealed, the inclusion of RES in PRF(RES||IK||CK) is still beneficial, as it makes pre-calculated dictionaries of IK||CK values rather useless (though such dictionaries are infeasible for typical sizes of IK and CK).

基础AKA协议(例如UMTS AKA)旨在对CK和IK保密,但通常会以明文形式发送RES。我们注意到,即使(通过一些不幸的AKA误用)RES值被揭示,在PRF(RES | | IK | CK)中包含RES仍然是有益的,因为它使预先计算的IK | | CK值字典变得毫无用处(尽管这种字典对于典型的IK和CK大小是不可行的)。

5. IANA Considerations
5. IANA考虑

This document specifies a new aka-version, "AKAv2", to the aka-version namespace maintained by IANA. The procedure for allocation of new aka-versions is defined in [6].

本文档为IANA维护的aka版本名称空间指定了一个新的aka版本“AKAv2”。[6]中定义了分配新aka版本的程序。

5.1. Registration Information
5.1. 注册信息

To: ietf-digest-aka@iana.org

致:ietf文摘-aka@iana.org

Subject: Registration of a new AKA version

主题:注册新的AKA版本

Version identifier: "AKAv2"

版本标识符:“AKAv2”

   Contacts for further information: Vesa.Torvinen@turkuamk.fi,
   jari.arkko@ericsson.com, or mats.naslund@ericsson.com
        
   Contacts for further information: Vesa.Torvinen@turkuamk.fi,
   jari.arkko@ericsson.com, or mats.naslund@ericsson.com
        
6. References
6. 工具书类
6.1. Normative References
6.1. 规范性引用文件

[1] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

[1] Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第一部分:互联网邮件正文格式”,RFC 20451996年11月。

[2] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.

[2] Krawczyk,H.,Bellare,M.和R.Canetti,“HMAC:用于消息身份验证的键控哈希”,RFC 2104,1997年2月。

[3] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[3] Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[4] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999.

[4] Franks,J.,Hallam Baker,P.,Hostetler,J.,Lawrence,S.,Leach,P.,Lootonen,A.,和L.Stewart,“HTTP认证:基本和摘要访问认证”,RFC 26171999年6月。

[5] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.

[5] Rosenberg,J.,Schulzrinne,H.,Camarillo,G.,Johnston,A.,Peterson,J.,Sparks,R.,Handley,M.,和E.Schooler,“SIP:会话启动协议”,RFC 3261,2002年6月。

[6] Niemi, A., Arkko, J., and V. Torvinen, "Hypertext Transfer Protocol (HTTP) Digest Authentication Using Authentication and Key Agreement (AKA)", RFC 3310, September 2002.

[6] Niemi,A.,Arkko,J.,和V.Torvinen,“使用身份验证和密钥协议(AKA)的超文本传输协议(HTTP)摘要身份验证”,RFC33102002年9月。

6.2. Informative References
6.2. 资料性引用

[7] 3rd Generation Partnership Project, "Security Architecture (Release 4)", TS 33.102, December 2001.

[7] 第三代合作项目,“安全体系结构(版本4)”,TS 33.102,2001年12月。

[8] Asokan, N., Niemi, V., and K. Nyberg, "Man-in-the-Middle in Tunnelled Authentication Protocols", Cryptology ePrint Archive, http://eprint.iacr.org Report 2002/163, October 2002.

[8] Asokan,N.,Niemi,V.,和K.Nyberg,“隧道认证协议中的中间人”,密码学EPRIT存档,http://eprint.iacr.org 2002/163号报告,2002年10月。

[9] Puthenkulam, J., Lortz, V., Palekar, A., and D. Simon, "The Compound Authentication Binding Problem", Work in Progress, March 2003.

[9] Puthenkulam,J.,Lortz,V.,Palekar,A.,和D.Simon,“复合认证绑定问题”,正在进行的工作,2003年3月。

Authors' Addresses

作者地址

Vesa Torvinen Turku Polytechnic Ylhaistentie 2 Salo FIN 24130 Finland

芬兰萨罗州维萨托维宁图尔库理工学院

   Phone: +358 10 5536210
   EMail: vesa.torvinen@turkuamk.fi
        
   Phone: +358 10 5536210
   EMail: vesa.torvinen@turkuamk.fi
        

Jari Arkko Ericsson Hirsalantie 1 Jorvas FIN 02420 Finland

雅丽爱立信Hirsalantie 1 Jorvas FIN 02420芬兰

   Phone: +358 40 5079256
   EMail: jari.arkko@ericsson.com
        
   Phone: +358 40 5079256
   EMail: jari.arkko@ericsson.com
        

Mats Naeslund Ericsson Torshamnsgatan 23 Stockholm SE 16480 Sweden

Mats Naeslund Ericsson Torshamnsgatan 23斯德哥尔摩东南16480瑞典

   Phone: +46 8 58533739
   EMail: mats.naslund@ericsson.com
        
   Phone: +46 8 58533739
   EMail: mats.naslund@ericsson.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2005).

版权所有(C)互联网协会(2005年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件及其包含的信息是按“原样”提供的,贡献者、他/她所代表或赞助的组织(如有)、互联网协会和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。