[要約] RFC 4757は、Microsoft Windows環境のKerberos認証で使用されている「RC4-HMAC」暗号化タイプの実装詳細をまとめたドキュメントです。古いNTLMハッシュとの互換性を維持しつつ、Kerberosプロトコル内でRC4ストリーム暗号とHMAC認証を組み合わせて使用する際の手順を規定しています。異なるプラットフォーム間の相互運用性を確保し、Windowsベースの認証システムと連携するための技術的な基準を提供することを目的としています。
Network Working Group K. Jaganathan
Request for Comments: 4757 L. Zhu
Category: Informational J. Brezak
Microsoft Corporation
December 2006
The RC4-HMAC Kerberos Encryption Types Used by Microsoft Windows
Microsoft Windowsが使用するRC4-HMAC Kerberos暗号化タイプ
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 (C) The IETF Trust (2006).
This document documents the RC4 Kerberos encryption types first introduced in Microsoft Windows 2000. Since then, these encryption types have been implemented in a number of Kerberos implementations. The IETF Kerberos community supports publishing this specification as an informational document in order to describe this widely implemented technology. However, while these encryption types provide the operations necessary to implement the base Kerberos specification [RFC4120], they do not provide all the required operations in the Kerberos cryptography framework [RFC3961]. As a result, it is not generally possible to implement potential extensions to Kerberos using these encryption types. The Kerberos encryption type negotiation mechanism [RFC4537] provides one approach for using such extensions even when a Kerberos infrastructure uses long-term RC4 keys. Because this specification does not implement operations required by RFC 3961 and because of security concerns with the use of RC4 and MD4 discussed in Section 8, this specification is not appropriate for publication on the standards track.
このドキュメントは、Microsoft Windows 2000で最初に導入されたRC4 Kerberos暗号化タイプをドキュメントしています。それ以来、これらの暗号化タイプは多くのKerberosの実装で実装されています。IETF Kerberos Communityは、この広く実装されているテクノロジーを説明するために、この仕様を情報文書として公開することをサポートしています。ただし、これらの暗号化タイプは、Base Kerberos仕様[RFC4120]を実装するために必要な操作を提供しますが、Kerberos暗号化フレームワーク[RFC3961]で必要なすべての操作を提供するわけではありません。その結果、これらの暗号化タイプを使用してKerberosに潜在的な拡張を実装することは一般に不可能です。Kerberos暗号化タイプの交渉メカニズム[RFC4537]は、Kerberosインフラが長期のRC4キーを使用している場合でも、このような拡張機能を使用するための1つのアプローチを提供します。この仕様はRFC 3961で必要な操作を実装しておらず、セクション8で説明したRC4とMD4の使用に関するセキュリティ上の懸念のために、この仕様は標準トラックでの公開には適していません。
The Microsoft Windows 2000 implementation of Kerberos introduces a new encryption type based on the RC4 encryption algorithm and using an MD5 HMAC for checksum. This is offered as an alternative to using the existing DES-based encryption types.
KerberosのMicrosoft Windows 2000の実装では、RC4暗号化アルゴリズムに基づいて新しい暗号化タイプを導入し、チェックサムにMD5 HMACを使用します。これは、既存のDESベースの暗号化タイプを使用する代わりに提供されます。
The RC4-HMAC encryption types are used to ease upgrade of existing Windows NT environments, provide strong cryptography (128-bit key lengths), and provide exportable (meet United States government export restriction requirements) encryption. This document describes the implementation of those encryption types.
RC4-HMAC暗号化型は、既存のWindows NT環境からのアップグレードを容易にし、強力な暗号(128ビットの鍵長)と、輸出可能な暗号(米国政府の輸出制限要件を満たすもの)を提供するために使用します。本文書では、これらの暗号化型の実装を説明します。
1. Introduction ....................................................3 1.1. Conventions Used in This Document ..........................3 2. Key Generation ..................................................3 3. Basic Operations ................................................4 4. Checksum Types ..................................................5 5. Encryption Types ................................................6 6. Key Strength Negotiation ........................................8 7. GSS-API Kerberos V5 Mechanism Type ..............................8 7.1. Mechanism Specific Changes .................................8 7.2. GSS-API MIC Semantics ......................................9 7.3. GSS-API WRAP Semantics ....................................11 8. Security Considerations ........................................15 9. IANA Considerations ............................................15 10. Acknowledgements ..............................................15 11. References ....................................................16 11.1. Normative References .....................................16 11.2. Informative References ...................................16
1. Introduction ....................................................3
1. はじめに ........................................................3
1.1. Conventions Used in This Document ..........................3
1.1. このドキュメントで使用されている規則 .......................3
2. Key Generation ..................................................3
2. キー生成 ........................................................3
3. Basic Operations ................................................4
3. 基本操作 ........................................................4
4. Checksum Types ..................................................5
4. チェックサムタイプ ..............................................5
5. Encryption Types ................................................6
5. 暗号化タイプ ....................................................6
6. Key Strength Negotiation ........................................8
6. 主要な強さの交渉 ................................................8
7. GSS-API Kerberos V5 Mechanism Type ..............................8
7. GSS-API Kerberos V5メカニズムタイプ .............................8
7.1. Mechanism Specific Changes .................................8
7.1. メカニズム固有の変化 .......................................8
7.2. GSS-API MIC Semantics ......................................9
7.2. GSS-API MICセマンティクス ..................................9
7.3. GSS-API WRAP Semantics ....................................11
7.3. GSS-APIラップセマンティクス ...............................11
8. Security Considerations ........................................15
8. セキュリティに関する考慮事項 ...................................15
9. IANA Considerations ............................................15
9. IANAの考慮事項 .................................................15
10. Acknowledgements ..............................................15
10. 謝辞 ..........................................................15
11. References ....................................................16
11. 参考文献 ......................................................16
11.1. Normative References .....................................16
11.1. 引用文献 .................................................16
11.2. Informative References ...................................16
11.2. 参考引用 .................................................16
The Microsoft Windows 2000 implementation of Kerberos contains new encryption and checksum types for two reasons. First, for export reasons early in the development process, 56-bit DES encryption could not be exported, and, second, upon upgrade from Windows NT 4.0 to Windows 2000, accounts will not have the appropriate DES keying material to do the standard DES encryption. Furthermore, 3DES was not available for export when Windows 2000 was released, and there was a desire to use a single flavor of encryption in the product for both US and international products.
Microsoft Windows 2000のKerberos実装に、新しい暗号化型とチェックサム型が含まれる理由は2つあります。第1に、開発初期には、輸出上の理由で56ビットのDES暗号を輸出できませんでした。第2に、Windows NT 4.0からWindows 2000にアップグレードする際、アカウントには、標準的なDES暗号化を行うための適切なDES鍵素材がありません。さらに、Windows 2000のリリース時には3DESを輸出できず、米国向け製品と国際向け製品で、1種類の暗号を使用したいという意向がありました。
As a result, there are two new encryption types and one new checksum type introduced in Microsoft Windows 2000.
その結果、Microsoft Windows 2000に導入された2つの新しい暗号化タイプと1つの新しいチェックサムタイプがあります。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in [RFC2119].
このドキュメントのキーワード "MUST"、"MUST NOT"、"REQUIRED"、"SHALL"、"SHALL NOT"、"SHOULD"、"SHOULD NOT"、"RECOMMENDED"、"MAY"、および "OPTIONAL" は、[RFC2119] で説明されているように解釈されるものとします。
On upgrade from existing Windows NT domains, the user accounts would not have a DES-based key available to enable the use of DES base encryption types specified in [RFC4120] and [RFC3961]. The key used for RC4-HMAC is the same as the existing Windows NT key (NT Password Hash) for compatibility reasons. Once the account password is changed, the DES-based keys are created and maintained. Once the DES keys are available, DES-based encryption types can be used with Kerberos.
The RC4-HMAC string to key function is defined as follows:
キー関数へのRC4-HMAC文字列は、次のように定義されます。
String2Key(password)
K = MD4(UNICODE(password))
The RC4-HMAC keys are generated by using the Windows UNICODE version of the password. Each Windows UNICODE character is encoded in little-endian format of 2 octets each. Then an MD4 [RFC1320] hash operation is performed on just the UNICODE characters of the password (not including the terminating zero octets).
RC4-HMACキーは、パスワードのWindows Unicodeバージョンを使用して生成されます。各Windows Unicode文字は、それぞれ2オクテットのリトルエンディアン形式でエンコードされています。次に、MD4 [RFC1320]ハッシュ操作が、パスワードのUnicode文字のみで実行されます(終端ゼロオクテットは含まれません)。
For an account with a password of "foo", this String2Key("foo") will return:
「foo」のパスワードがあるアカウントの場合、このString2Key( "foo")が返されます。
0xac, 0x8e, 0x65, 0x7f, 0x83, 0xdf, 0x82, 0xbe,
0xea, 0x5d, 0x43, 0xbd, 0xaf, 0x78, 0x00, 0xcc
The basic MD5 hash operation is used in this encryption type and defined in [RFC1321]. In this document, this function is referred to as MD5(Data) returning the checksum of the data.
この暗号化型では、[RFC1321]で定義する基本的なMD5ハッシュ演算を使用します。本文書では、この関数をMD5(Data) と表記し、データのチェックサムを返します。
RC4 is a stream cipher licensed by RSA Data Security. In this document, the function is referred to as RC4(Key, Data) returning the encrypted data using the specified key on the data.
RC4は、RSAデータセキュリティによってライセンスされているストリーム暗号です。このドキュメントでは、関数は、データの指定されたキーを使用して暗号化されたデータを返すRC4(キー、データ)と呼ばれます。
These encryption types use key derivation. With each message, the message type (T) is used as a component of the keying material. The following table summarizes the different key derivation values used in the various operations. Note that these differ from the key derivations used in other Kerberos encryption types. T = the message type, encoded as a little-endian four-byte integer.
これらの暗号化タイプは、キー派生を使用します。各メッセージで、メッセージタイプ(t)はキーイング素材のコンポーネントとして使用されます。次の表は、さまざまな操作で使用されるさまざまなキー派生値をまとめたものです。これらは、他のKerberos暗号化タイプで使用される重要な派生物とは異なることに注意してください。t =小さなエンディアンの4バイト整数としてエンコードされたメッセージタイプ。
1. AS-REQ PA-ENC-TIMESTAMP padata timestamp, encrypted with the
client key (T=1)
2. AS-REP Ticket and TGS-REP Ticket (includes TGS session key or
application session key), encrypted with the service key (T=2)
3. AS-REP encrypted part (includes TGS session key or application
session key), encrypted with the client key (T=8)
4. TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the TGS
session key (T=4)
5. TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the TGS
authenticator subkey (T=5)
6. TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator cksum, keyed
with the TGS session key (T=6)
7. TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator (includes TGS
authenticator subkey), encrypted with the TGS session key T=7)
8. TGS-REP encrypted part (includes application session key),
encrypted with the TGS session key (T=8)
9. TGS-REP encrypted part (includes application session key),
encrypted with the TGS authenticator subkey (T=8)
10. AP-REQ Authenticator cksum, keyed with the application session
key (T=10)
11. AP-REQ Authenticator (includes application authenticator
subkey), encrypted with the application session key (T=11)
12. AP-REP encrypted part (includes application session subkey),
encrypted with the application session key (T=12)
13. KRB-PRIV encrypted part, encrypted with a key chosen by the
application. Also for data encrypted with GSS Wrap (T=13)
14. KRB-CRED encrypted part, encrypted with a key chosen by the
application (T=14)
15. KRB-SAFE cksum, keyed with a key chosen by the application.
Also for data signed in GSS MIC (T=15)
Relative to RFC-1964 key uses:
T = 0 in the generation of sequence number for the MIC token
T = 0 in the generation of sequence number for the WRAP token
T = 0 in the generation of encrypted data for the WRAPPED token
All strings in this document are ASCII unless otherwise specified. The lengths of ASCII-encoded character strings include the trailing terminator character (0). The concat(a,b,c,...) function will return the logical concatenation (left to right) of the values of the arguments. The nonce(n) function returns a pseudo-random number of "n" octets.
このドキュメントのすべての文字列は、特に指定されていない限りASCIIです。Ascii-Enecoded文字列の長さには、後期ターミネーター文字(0)が含まれます。concat(a、b、c、...)関数は、引数の値の論理的連結(左から右)を返します。NonCe(n)関数は、「n」オクテットの擬似ランダム数を返します。
There is one checksum type used in this encryption type. The Kerberos constant for this type is:
この暗号化タイプで使用されるチェックサムタイプが1つあります。このタイプのkerberos定数は次のとおりです。
#define KERB_CHECKSUM_HMAC_MD5 (-138)
The function is defined as follows:
関数は次のように定義されています。
K = the Key
T = the message type, encoded as a little-endian four-byte integer
CHKSUM(K, T, data)
Ksign = HMAC(K, "signaturekey") //includes zero octet at end
tmp = MD5(concat(T, data))
CHKSUM = HMAC(Ksign, tmp)
There are two encryption types used in these encryption types. The Kerberos constants for these types are:
これらの暗号化タイプで使用される2つの暗号化タイプがあります。これらのタイプのKerberos定数は次のとおりです。
#define KERB_ETYPE_RC4_HMAC 23
#define KERB_ETYPE_RC4_HMAC_EXP 24
The basic encryption function is defined as follows:
基本的な暗号化関数は、次のように定義されています。
T = the message type, encoded as a little-endian four-byte integer.
OCTET L40[14] = "fortybits";
The header field on the encrypted data in KDC messages is:
KDCメッセージの暗号化されたデータのヘッダーフィールドは次のとおりです。
typedef struct _RC4_MDx_HEADER {
OCTET Checksum[16];
OCTET Confounder[8];
} RC4_MDx_HEADER, *PRC4_MDx_HEADER;
ENCRYPT (K, export, T, data)
{
struct EDATA {
struct HEADER {
OCTET Checksum[16];
OCTET Confounder[8];
} Header;
OCTET Data[0];
} edata;
if (export){
*((DWORD *)(L40+10)) = T;
K1 = HMAC(K, L40); // where the length of L40 in
// octets is 14
}
else
{
K1 = HMAC(K, &T); // where the length of T in octets
// is 4
}
memcpy (K2, K1, 16);
if (export) memset (K1+7, 0xAB, 9);
nonce (edata.Confounder, 8);
memcpy (edata.Data, data);
edata.Checksum = HMAC (K2, edata);
K3 = HMAC (K1, edata.Checksum);
RC4 (K3, edata.Confounder);
RC4 (K3, data.Data);
}
DECRYPT (K, export, T, edata)
{
// edata looks like
struct EDATA {
struct HEADER {
OCTET Checksum[16];
OCTET Confounder[8];
} Header;
OCTET Data[0];
} edata;
if (export){
*((DWORD *)(L40+10)) = T;
HMAC (K, L40, 14, K1);
}
else
{
HMAC (K, &T, 4, K1);
}
memcpy (K2, K1, 16);
if (export) memset (K1+7, 0xAB, 9);
K3 = HMAC (K1, edata.Checksum);
RC4 (K3, edata.Confounder);
RC4 (K3, edata.Data);
// verify generated and received checksums
checksum = HMAC (K2, concat(edata.Confounder, edata.Data));
if (checksum != edata.Checksum)
printf("CHECKSUM ERROR !!!!!!\n");
}
The KDC message is encrypted using the ENCRYPT function not including the Checksum in the RC4_MDx_HEADER.
KDCメッセージは、RC4_MDx_HEADERにチェックサムを含まない暗号化機能を使用して暗号化されます。
The character constant "fortybits" evolved from the time when a 40-bit key length was all that was exportable from the United States. It is now used to recognize that the key length is of "exportable" length. In this description, the key size is actually 56 bits.
キャラクターの一定の「40ビット」は、40ビットのキー長が米国から輸出可能だったときから進化しました。現在、キーの長さが「エクスポート可能な」長さであることを認識するために使用されています。この説明では、キーサイズは実際には56ビットです。
The pseudo-random operation [RFC3961] for both enctypes above is defined as follows:
上記の両方の暗号化型について、疑似乱数演算 [RFC3961]を次のように定義します:
pseudo-random(K, S) = HMAC-SHA1(K, S)
where K is the protocol key and S is the input octet string. HMAC-SHA1 is defined in [RFC2104] and the output of HMAC-SHA1 is the 20-octet digest.
ここで、Kはプロトコルキーであり、Sは入力オクテット文字列です。HMAC-SHA1は[RFC2104]で定義されており、HMAC-SHA1の出力は20オクテットのダイジェストです。
A Kerberos client and server can negotiate over key length if they are using mutual authentication. If the client is unable to perform full-strength encryption, it may propose a key in the "subkey" field of the authenticator, using a weaker encryption type. The server must then either return the same key or suggest its own key in the subkey field of the AP reply message. The key used to encrypt data is derived from the key returned by the server. If the client is able to perform strong encryption but the server is not, it may propose a subkey in the AP reply without first being sent a subkey in the authenticator.
Kerberosのクライアントとサーバーは、相互認証を使用している場合、キーの長さを超えてネゴシエートできます。クライアントがフルストレングの暗号化を実行できない場合、より弱い暗号化タイプを使用して、認証器の「サブキー」フィールドにキーを提案する場合があります。サーバーは、同じキーを返すか、AP Replyメッセージのサブキーフィールドに独自のキーを提案する必要があります。データを暗号化するために使用されるキーは、サーバーによって返されるキーから派生します。クライアントが強力な暗号化を実行できますが、サーバーがそうでない場合、APの返信でサブキーを最初に認証者に送信することなく提案する場合があります。
The Generic Security Service Application Program Interface (GSS-API) per-message tokens also require new checksum and encryption types. The GSS-API per-message tokens are adapted to support these new encryption types. See [RFC1964] Section 1.2.2.
ジェネリックセキュリティサービスアプリケーションプログラムインターフェイス(GSS-API)1回のトークンには、新しいチェックサムと暗号化の種類も必要です。GSS-APIメッセージごとのトークンは、これらの新しい暗号化タイプをサポートするために適合しています。[RFC1964]セクション1.2.2を参照してください。
The only support quality of protection is:
サポートする保護品質は、次のものだけです:
#define GSS_KRB5_INTEG_C_QOP_DEFAULT 0x0
When using this RC4-based encryption type, the sequence number is always sent in big-endian rather than little-endian order.
このRC4に基づく暗号化型を使用する場合、シーケンス番号は、リトルエンディアンではなく、常にビッグエンディアンで送信します。
The Windows 2000 implementation also defines new GSS-API flags in the initial token passed when initializing a security context. These flags are passed in the checksum field of the authenticator. See [RFC1964] Section 1.1.1.
Windows 2000の実装は、セキュリティコンテキストを初期化するときに渡された最初のトークンの新しいGSS-APIフラグも定義します。これらのフラグは、認証機のチェックサムフィールドに渡されます。[RFC1964]セクション1.1.1を参照してください。
GSS_C_DCE_STYLE - This flag was added for use with Microsoft's implementation of Distributed Computing Environment Remote Procedure Call (DCE RPC), which initially expected three legs of authentication. Setting this flag causes an extra AP reply to be sent from the client back to the server after receiving the server's AP reply. In addition, the context negotiation tokens do not have GSS-API per-message tokens -- they are raw AP messages that do not include object identifiers.
GSS_C_DCE_STYLE - このフラグは、MicrosoftのDistributed Computing Environment Remote Procedure Call(DCE RPC)実装で使用するために追加しました。この実装は、当初、3段階の認証を想定していました。このフラグを設定すると、クライアントは、サーバーのAP応答を受信した後、追加のAP応答をサーバーに送り返します。さらに、コンテキストのネゴシエーショントークンには、GSS-APIのメッセージごとのトークンを使用しません。オブジェクト識別子を含まない、生のAPメッセージを使用します。
#define GSS_C_DCE_STYLE 0x1000
GSS_C_IDENTIFY_FLAG - This flag allows the client to indicate to the server that it should only allow the server application to identify the client by name and ID, but not to impersonate the client.
GSS_C_IDENTIFY_FLAG-このフラグにより、クライアントはサーバーに、サーバーアプリケーションが名前とIDでクライアントを識別できるようにする必要があることをサーバーに示すことができますが、クライアントになりすましません。
#define GSS_C_IDENTIFY_FLAG 0x2000
GSS_C_EXTENDED_ERROR_FLAG - Setting this flag indicates that the client wants to be informed of extended error information. In particular, Windows 2000 status codes may be returned in the data field of a Kerberos error message. This allows the client to understand a server failure more precisely. In addition, the server may return errors to the client that are normally handled at the application layer in the server, in order to let the client try to recover. After receiving an error message, the client may attempt to resubmit an AP request.
GSS_C_EXTENDED_ERROR_FLAG - このフラグの設定は、クライアントが拡張エラー情報の通知を希望することを示します。特に、Kerberosエラーメッセージのデータフィールドで、Windows 2000の状態コードを返すことができます。これにより、クライアントは、サーバーの障害をより正確に把握できます。また、クライアントに回復を試みさせるため、サーバーは、通常はサーバー内のアプリケーション層で処理するエラーを、クライアントに返すこともできます。エラーメッセージの受信後、クライアントは、AP要求の再送信を試みることができます。
#define GSS_C_EXTENDED_ERROR_FLAG 0x4000
These flags are only used if a client is aware of these conventions when using the Security Support Provider Interface (SSPI) on the Windows platform; they are not generally used by default.
これらのフラグは、Windowsプラットフォームでセキュリティサポートプロバイダーインターフェイス(SSPI)を使用する際に、クライアントがこれらの規則を認識している場合にのみ使用されます。通常、デフォルトでは使用されません。
When NetBIOS addresses are used in the GSS-API, they are identified by the GSS_C_AF_NETBIOS value. This value is defined as:
GSS-APIでNetBIOSアドレスを使用する場合は、GSS_C_AF_NETBIOS値で識別します。この値は、次のように定義します:
#define GSS_C_AF_NETBIOS 0x14
NetBios addresses are 16-octet addresses typically composed of 1 to 15 characters, trailing blank (ASCII char 20) filled, with a 16th octet of 0x0.
NetBiosアドレスは、通常1〜15文字で構成される16オクテットアドレスで、トレーニングブランク(ASCII Char 20)が16番目のオクテットで0x0です。
The GSS-API checksum type and algorithm are defined in Section 5. Only the first 8 octets of the checksum are used. The resulting checksum is stored in the SGN_CKSUM field. See [RFC1964] Section 1.2 for GSS_GetMIC() and GSS_Wrap(conf_flag=FALSE).
GSS-APIチェックサムのタイプとアルゴリズムは、セクション5で定義されています。チェックサムの最初の8オクテットのみが使用されます。結果のチェックサムは、SGN_CKSUMフィールドに保存されます。[rfc1964] GSS_GetMIC()およびGSS_Wrap(conf_flag=FALSE)については、[rfc1964]セクション1.2を参照してください。
The GSS_GetMIC token has the following format:
GSS_GetMICトークンには次の形式があります。
Byte no Name Description
0..1 TOK_ID Identification field.
Tokens emitted by GSS_GetMIC() contain
the hex value 01 01 in this field.
2..3 SGN_ALG Integrity algorithm indicator.
11 00 - HMAC
4..7 Filler Contains ff ff ff ff
8..15 SND_SEQ Sequence number field.
16..23 SGN_CKSUM Checksum of "to-be-signed data",
calculated according to algorithm
specified in SGN_ALG field.
The MIC mechanism used for GSS-MIC-based messages is as follows:
GSS-MICベースのメッセージに使用されるMICメカニズムは次のとおりです。
GetMIC(Kss, direction, export, seq_num, data)
{
struct Token {
struct Header {
OCTET TOK_ID[2];
OCTET SGN_ALG[2];
OCTET Filler[4];
};
OCTET SND_SEQ[8];
OCTET SGN_CKSUM[8];
} Token;
Token.TOK_ID = 01 01;
Token.SGN_SLG = 11 00;
Token.Filler = ff ff ff ff;
// Create the sequence number
if (direction == sender_is_initiator)
{
memset(Token.SEND_SEQ+4, 0xff, 4)
}
else if (direction == sender_is_acceptor)
{
memset(Token.SEND_SEQ+4, 0, 4)
}
Token.SEND_SEQ[0] = (seq_num & 0xff000000) >> 24;
Token.SEND_SEQ[1] = (seq_num & 0x00ff0000) >> 16;
Token.SEND_SEQ[2] = (seq_num & 0x0000ff00) >> 8;
Token.SEND_SEQ[3] = (seq_num & 0x000000ff);
// Derive signing key from session key
Ksign = HMAC(Kss, "signaturekey");
// length includes terminating null
// Generate checksum of message - SGN_CKSUM
// Key derivation salt = 15
Sgn_Cksum = MD5((int32)15, Token.Header, data);
// Save first 8 octets of HMAC Sgn_Cksum
Sgn_Cksum = HMAC(Ksign, Sgn_Cksum);
memcpy(Token.SGN_CKSUM, Sgn_Cksum, 8);
// Encrypt the sequence number
// Derive encryption key for the sequence number
// Key derivation salt = 0
if (exportable)
{
Kseq = HMAC(Kss, "fortybits", (int32)0);
// len includes terminating null
memset(Kseq+7, 0xab, 7)
}
else
{
Kseq = HMAC(Kss, (int32)0);
}
Kseq = HMAC(Kseq, Token.SGN_CKSUM);
// Encrypt the sequence number
RC4(Kseq, Token.SND_SEQ);
}
There are two encryption keys for GSS-API message tokens, one that is 128 bits in strength and one that is 56 bits in strength as defined in Section 6.
GSS-APIメッセージトークンには2つの暗号化キーがあり、1つは強度が128ビット、もう1つはセクション6で定義されているように強度が56ビットです。
All padding is rounded up to 1 byte. One byte is needed to say that there is 1 byte of padding. The DES-based mechanism type uses 8-byte padding. See [RFC1964] Section 1.2.2.3.
パディングは、すべて1バイト単位に切り上げます。1バイトのパディングがあることを示すために、1バイトが必要です。DESに基づくメカニズム型は、8バイトのパディングを使用します。[RFC1964]のセクション1.2.2.3を参照してください。
The RC4-HMAC GSS_Wrap() token has the following format:
RC4-HMAC GSS_Wrap()トークンには次の形式があります。
Byte no Name Description
0..1 TOK_ID Identification field.
Tokens emitted by GSS_Wrap() contain
the hex value 02 01 in this field.
2..3 SGN_ALG Checksum algorithm indicator.
11 00 - HMAC
4..5 SEAL_ALG ff ff - none
00 00 - DES-CBC
10 00 - RC4
6..7 Filler Contains ff ff
8..15 SND_SEQ Encrypted sequence number field.
16..23 SGN_CKSUM Checksum of plaintext padded data,
calculated according to algorithm
specified in SGN_ALG field.
24..31 Confounder Random confounder.
32..last Data Encrypted or plaintext padded data.
The encryption mechanism used for GSS-wrap-based messages is as follows:
GSS-Wrapベースのメッセージに使用される暗号化メカニズムは次のとおりです。
WRAP(Kss, encrypt, direction, export, seq_num, data)
{
struct Token { // 32 octets
struct Header {
OCTET TOK_ID[2];
OCTET SGN_ALG[2];
OCTET SEAL_ALG[2];
OCTET Filler[2];
};
OCTET SND_SEQ[8];
OCTET SGN_CKSUM[8];
OCTET Confounder[8];
} Token;
Token.TOK_ID = 02 01;
Token.SGN_SLG = 11 00;
Token.SEAL_ALG = (no_encrypt)? ff ff : 10 00;
Token.Filler = ff ff;
// Create the sequence number
if (direction == sender_is_initiator)
{
memset(&Token.SEND_SEQ[4], 0xff, 4)
}
else if (direction == sender_is_acceptor)
{
memset(&Token.SEND_SEQ[4], 0, 4)
}
Token.SEND_SEQ[0] = (seq_num & 0xff000000) >> 24;
Token.SEND_SEQ[1] = (seq_num & 0x00ff0000) >> 16;
Token.SEND_SEQ[2] = (seq_num & 0x0000ff00) >> 8;
Token.SEND_SEQ[3] = (seq_num & 0x000000ff);
// Generate random confounder
nonce(&Token.Confounder, 8);
// Derive signing key from session key
Ksign = HMAC(Kss, "signaturekey");
// Generate checksum of message -
// SGN_CKSUM + Token.Confounder
// Key derivation salt = 15
Sgn_Cksum = MD5((int32)15, Token.Header,
Token.Confounder);
// Derive encryption key for data
// Key derivation salt = 0
for (i = 0; i < 16; i++) Klocal[i] = Kss[i] ^ 0xF0;
// XOR
if (exportable)
{
Kcrypt = HMAC(Klocal, "fortybits", (int32)0);
// len includes terminating null
memset(Kcrypt+7, 0xab, 7);
}
else
{
Kcrypt = HMAC(Klocal, (int32)0);
}
// new encryption key salted with seq
Kcrypt = HMAC(Kcrypt, (int32)seq);
// Encrypt confounder (if encrypting)
if (encrypt)
RC4(Kcrypt, Token.Confounder);
// Sum the data buffer
Sgn_Cksum += MD5(data); // Append to checksum
// Encrypt the data (if encrypting)
if (encrypt)
RC4(Kcrypt, data);
// Save first 8 octets of HMAC Sgn_Cksum
Sgn_Cksum = HMAC(Ksign, Sgn_Cksum);
memcpy(Token.SGN_CKSUM, Sgn_Cksum, 8);
// Derive encryption key for the sequence number
// Key derivation salt = 0
if (exportable)
{
Kseq = HMAC(Kss, "fortybits", (int32)0);
// len includes terminating null
memset(Kseq+7, 0xab, 7)
}
else
{
Kseq = HMAC(Kss, (int32)0);
}
Kseq = HMAC(Kseq, Token.SGN_CKSUM);
// Encrypt the sequence number
RC4(Kseq, Token.SND_SEQ);
// Encrypted message = Token + Data
}
The character constant "fortybits" evolved from the time when a 40-bit key length was all that was exportable from the United States. It is now used to recognize that the key length is of "exportable" length. In this description, the key size is actually 56 bits.
キャラクターの一定の「40ビット」は、40ビットのキー長が米国から輸出可能だったときから進化しました。現在、キーの長さが「エクスポート可能な」長さであることを認識するために使用されています。この説明では、キーサイズは実際には56ビットです。
Care must be taken in implementing these encryption types because they use a stream cipher. If a different IV is not used in each direction when using a session key, the encryption is weak. By using the sequence number as an IV, this is avoided.
これらの暗号化タイプは、ストリーム暗号を使用するため、これらの暗号化タイプを実装することに注意する必要があります。セッションキーを使用するときに、それぞれの方向に別のIVが使用されない場合、暗号化は弱いです。シーケンス番号をIVとして使用することにより、これは回避されます。
There are two classes of attack on RC4 described in [MIRONOV]. Strong distinguishers distinguish an RC4 keystream from randomness at the start of the stream. Weak distinguishers can operate on any part of the keystream, and the best ones, described in [FMcG] and [MANTIN05], can exploit data from multiple, different keystreams. A consequence of these is that encrypting the same data (for instance, a password) sufficiently many times in separate RC4 keystreams can be sufficient to leak information to an adversary. The encryption types defined in this document defend against these by constructing a new keystream for every message. However, it is RECOMMENDED not to use the RC4 encryption types defined in this document for high-volume connections.
[MIRONOV]では、RC4に対する2種類の攻撃を説明しています。強い識別器は、ストリームの先頭で、RC4鍵ストリームをランダム列と区別します。弱い識別器は、鍵ストリームの任意の部分に作用し、最も優れたものは、[FMcG]および[MANTIN05]で説明するとおり、複数の異なる鍵ストリームから得たデータを利用できます。その結果、同じデータ(パスワードなど)を、別々のRC4鍵ストリームで十分な回数暗号化すると、それだけで敵対者に情報が漏れる可能性があります。本文書で定義する暗号化型は、メッセージごとに新しい鍵ストリームを構築することで、これらの攻撃に対処します。ただし、通信量の多い接続では、本文書で定義するRC4暗号化型を使用しないようにすることが推奨されます (RECOMMENDED)。
Weaknesses in MD4 [BOER91] were demonstrated by den Boer and Bosselaers in 1991. In August 2004, Xiaoyun Wang, et al., reported MD4 collisions generated using hand calculation [WANG04]. Implementations based on Wang's algorithm can find collisions in real time. However, the intended usage of MD4 described in this document does not rely on the collision-resistant property of MD4. Furthermore, MD4 is always used in the context of a keyed hash in this document. Although no evidence has suggested keyed MD4 hashes are vulnerable to collision-based attacks, no study has directly proved that the HMAC-MD4 is secure: the existing study simply assumed that the hash function used in HMAC is collision proof. It is thus RECOMMENDED not to use the RC4 encryption types defined in this document if alternative stronger encryption types, such as aes256-cts-hmac-sha1-96 [RFC3962], are available.
MD4の弱点 [BOER91]は、1991年にden BoerとBosselaersによって示されました。2004年8月には、Xiaoyun Wangらが、手計算で生成したMD4の衝突を報告しました [WANG04]。Wangのアルゴリズムに基づく実装は、リアルタイムで衝突を見つけられます。ただし、本文書で説明するMD4の使用方法は、MD4の衝突耐性に依存しません。さらに、本文書では、MD4を常に鍵付きハッシュの文脈で使用します。鍵付きMD4ハッシュが衝突を利用する攻撃に脆弱であることを示す証拠はありませんが、HMAC-MD4の安全性を直接証明した研究もありません。既存の研究は、HMACで使用するハッシュ関数に衝突が生じないと仮定しただけです。したがって、aes256-cts-hmac-sha1-96 [RFC3962]など、より強力な他の暗号化型が利用できる場合は、本文書で定義するRC4暗号化型を使用しないようにすることが推奨されます (RECOMMENDED)。
Section 5 of this document defines two Kerberos encryption types rc4-hmac (23) and rc4-hmac-exp (24). The Kerberos parameters registration page at <http://www.iana.org/assignments/kerberos-parameters> has been updated to reference this document for these two encryption types.
本文書のセクション5では、2つのKerberos暗号化型、rc4-hmac(23)とrc4-hmac-exp(24)を定義します。<http://www.iana.org/assignments/kerberos-parameters>にあるKerberosパラメーターの登録ページは、これら2つの暗号化型について本文書を参照するよう更新されています。
The authors wish to thank Sam Hartman, Ken Raeburn, and Qunli Li for their insightful comments.
著者は、サム・ハートマン、ケン・レーバーン、Qunli Liの洞察に満ちたコメントに感謝したいと考えています。
[RFC1320] Rivest, R., "The MD4 Message-Digest Algorithm", RFC 1320, April 1992.
[RFC1320] Rivest, R.、「The MD4 Message-Digest Algorithm」、RFC 1320、1992年4月。
[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.
[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.
[RFC1964] Linn, J., "The Kerberos Version 5 GSS-API Mechanism", RFC 1964, June 1996.
[RFC1964] Linn, J., "The Kerberos Version 5 GSS-API Mechanism", RFC 1964, June 1996.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti、「HMAC:メッセージ認証のためのキー付きハッシング」、RFC 2104、1997年2月。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3961] Raeburn, K., "Encryption and Checksum Specifications for Kerberos 5", RFC 3961, February 2005.
[RFC3961] Raeburn, K., "Encryption and Checksum Specifications for Kerberos 5", RFC 3961, February 2005.
[RFC3962] Raeburn, K., "Advanced Encryption Standard (AES) Encryption for Kerberos 5", RFC 3962, February 2005.
[RFC3962] Raeburn, K.、「高度な暗号化標準(AES)Kerberos 5の暗号化」、RFC 3962、2005年2月。
[RFC4120] Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The Kerberos Network Authentication Service (V5)", RFC 4120, July 2005.
[RFC4120] Neuman, C., Yu, T., Hartman, S., and K. Raeburn、「The Kerberos Network認証サービス(V5)」、RFC 4120、2005年7月。
[RFC4537] Zhu, L., Leach, P., and K. Jaganathan, "Kerberos Cryptosystem Negotiation Extension", RFC 4537, June 2006.
[RFC4537] Zhu, L., Leach, P., and K. Jaganathan、「Kerberos Cryptosystem Negotiation Extension」、RFC 4537、2006年6月。
[BOER91] den Boer, B. and A. Bosselaers, "An Attack on the Last Two Rounds of MD4", Proceedings of the 11th Annual International Cryptology Conference on Advances in Cryptology, pages: 194 - 203, 1991.
[BOER91] den Boer, B. and A. Bosselaers, "An Attack on the Last Two Rounds of MD4", Proceedings of the 11th Annual International Cryptology Conference on Advances in Cryptology, pages: 194 - 203, 1991.
[FMcG] Fluhrer, S. and D. McGrew, "Statistical Analysis of the Alleged RC4 Keystream Generator", Fast Software Encryption: 7th International Workshop, FSE 2000, April 2000, <http://www.mindspring.com/~dmcgrew/rc4-03.pdf>.
[FMcG] Fluhrer, S. and D. McGrew、「疑わしいRC4キーストリームジェネレーターの統計分析」、高速ソフトウェア暗号化:第7回国際ワークショップ、FSE 2000、2000年4月、<http://www.mindspring.com/~dmcgrew/rc4-03.pdf>。
[MANTIN05] Mantin, I., "Predicting and Distinguishing Attacks on RC4 Keystream Generator", Advances in Cryptology -- EUROCRYPT 2005: 24th Annual International Conference on the Theory and Applications of Cryptographic Techniques, May 2005.
[MANTIN05] Mantin, I., "Predicting and Distinguishing Attacks on RC4 Keystream Generator", Advances in Cryptology -- EUROCRYPT 2005: 24th Annual International Conference on the Theory and Applications of Cryptographic Techniques, May 2005.
[MIRONOV] Mironov, I., "(Not So) Random Shuffles of RC4", Advances in Cryptology -- CRYPTO 2002: 22nd Annual International Cryptology Conference, August 2002, <http://eprint.iacr.org/2002/067.pdf>.
[MIRONOV] Mironov, I.、「(そうではない)RC4のランダムシャッフル」、暗号学の進歩 - Crypto 2002:22nd Annulational Cryptology Conference、2002年8月、<http://eprint.iacr.org/2002/067.pdf>。
[WANG04] Wang, X., Lai, X., Feng, D., Chen, H., and X. Yu, "Cryptanalysis of Hash functions MD4 and RIPEMD", August 2004, <http://www.infosec.sdu.edu.cn/paper/md4-ripemd-attck.pdf>.
[WANG04] Wang, X., Lai, X., Feng, D., Chen, H., and X. Yu, "Cryptanalysis of Hash functions MD4 and RIPEMD", August 2004, <http://www.infosec.sdu.edu.cn/paper/md4-ripemd-attck.pdf>.
Authors' Addresses
著者のアドレス
Karthik Jaganathan Microsoft Corporation One Microsoft Way Redmond, WA 98052 US
EMail: karthikj@microsoft.com
Larry Zhu Microsoft Corporation One Microsoft Way Redmond, WA 98052 US
Larry Zhu Microsoft Corporation One Microsoft Way Redmond、WA 98052 US
EMail: lzhu@microsoft.com
John Brezak Microsoft Corporation One Microsoft Way Redmond, WA 98052 US
John Brezak Microsoft Corporation One Microsoft Way Redmond、WA 98052 US
EMail: jbrezak@microsoft.com
Copyright (C) The IETF Trust (2006).
Copyright(c)The IETF Trust(2006)。
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, THE IETF TRUST, 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.
本文書およびここに含まれる情報は、「現状のまま」提供されます。貢献者、貢献者が代表する、またはスポンサーとなっている組織(存在する場合)、Internet Society、IETF Trust、およびInternet Engineering Task Forceは、明示的か黙示的かを問わず、いかなる保証も行いません。これには、ここに含まれる情報の使用がいかなる権利も侵害しないという保証、および商品性または特定目的への適合性に関する黙示的な保証が含まれますが、これらに限定されません。
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事務局に行われたIPR開示のコピーと、利用可能にするライセンスの保証、またはこの仕様の実装者またはユーザーによるそのような独自の権利の使用のための一般的なライセンスまたは許可を取得するための試みの結果を取得できます。http://www.ietf.org/iprのIETFオンライン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-ipr@ietf.orgのIETFへの情報をお問い合わせください。
Acknowledgement
謝辞
Funding for the RFC Editor function is currently provided by the Internet Society.
RFCエディター機能の資金は現在、インターネット協会によって提供されています。