[要約] RFC 7638は、JSON Web Key (JWK)の指紋を計算するための方法を定義しています。目的は、JWKの指紋を使用して、JWKを一意に識別し、検証することです。

Internet Engineering Task Force (IETF)                          M. Jones
Request for Comments: 7638                                     Microsoft
Category: Standards Track                                    N. Sakimura
ISSN: 2070-1721                                Nomura Research Institute
                                                          September 2015
        

JSON Web Key (JWK) Thumbprint

JSON Web Key(JWK)サムプリント

Abstract

概要

This specification defines a method for computing a hash value over a JSON Web Key (JWK). It defines which fields in a JWK are used in the hash computation, the method of creating a canonical form for those fields, and how to convert the resulting Unicode string into a byte sequence to be hashed. The resulting hash value can be used for identifying or selecting the key represented by the JWK that is the subject of the thumbprint.

この仕様では、JSON Web Key(JWK)でハッシュ値を計算する方法を定義しています。 JWKのどのフィールドがハッシュ計算で使用されるか、それらのフィールドの正規フォームを作成する方法、および結果のUnicode文字列をハッシュされるバイトシーケンスに変換する方法を定義します。結果のハッシュ値は、拇印の対象であるJWKによって表されるキーを識別または選択するために使用できます。

Status of This Memo

本文書の状態

This is an Internet Standards Track document.

これはInternet Standards Trackドキュメントです。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

このドキュメントは、IETF(Internet Engineering Task Force)の製品です。これは、IETFコミュニティのコンセンサスを表しています。公開レビューを受け、インターネットエンジニアリングステアリンググループ(IESG)による公開が承認されました。インターネット標準の詳細については、RFC 5741のセクション2をご覧ください。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7638.

このドキュメントの現在のステータス、エラータ、およびフィードバックの提供方法に関する情報は、http://www.rfc-editor.org/info/rfc7638で入手できます。

Copyright Notice

著作権表示

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.

Copyright(c)2015 IETF Trustおよびドキュメントの作成者として識別された人物。全著作権所有。

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.

この文書は、BCP 78およびIETF文書に関するIETFトラストの法的規定(http://trustee.ietf.org/license-info)の対象であり、この文書の発行日に有効です。これらのドキュメントは、このドキュメントに関するあなたの権利と制限を説明しているため、注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、Trust Legal Provisionsのセクション4.eに記載されているSimplified BSD Licenseのテキストが含まれている必要があり、Simplified BSD Licenseに記載されているように保証なしで提供されます。

Table of Contents

目次

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  JSON Web Key (JWK) Thumbprint . . . . . . . . . . . . . . . .   3
     3.1.  Example JWK Thumbprint Computation  . . . . . . . . . . .   4
     3.2.  JWK Members Used in the Thumbprint Computation  . . . . .   6
       3.2.1.  JWK Thumbprint of a Private Key . . . . . . . . . . .   6
       3.2.2.  Why Not Include Optional Members? . . . . . . . . . .   7
     3.3.  Order and Representation of Members in Hash Input . . . .   7
     3.4.  Selection of Hash Function  . . . . . . . . . . . . . . .   8
     3.5.  JWK Thumbprints of Keys Not in JWK Format . . . . . . . .   8
   4.  Practical JSON and Unicode Considerations . . . . . . . . . .   8
   5.  Relationship to Digests of X.509 Values . . . . . . . . . . .   9
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  10
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  11
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  11
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  12
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  13
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  13
        
1. Introduction
1. はじめに

This specification defines a method for computing a hash value (a.k.a. digest) over a JSON Web Key (JWK) [JWK]. It defines which fields in a JWK are used in the hash computation, the method of creating a canonical form for those fields, and how to convert the resulting Unicode string into a byte sequence to be hashed. The resulting hash value can be used for identifying or selecting the key represented by the JWK that is the subject of the thumbprint, for instance, by using the base64url-encoded JWK Thumbprint value as a "kid" (key ID) value.

この仕様は、JSON Web Key(JWK)[JWK]でハッシュ値(別名ダイジェスト)を計算する方法を定義します。 JWKのどのフィールドがハッシュ計算で使用されるか、それらのフィールドの正規フォームを作成する方法、および結果のUnicode文字列をハッシュされるバイトシーケンスに変換する方法を定義します。結果のハッシュ値は、たとえば、base64urlでエンコードされたJWKサムプリント値を「キッド」(キーID)値として使用することにより、サムプリントの対象であるJWKによって表されるキーを識別または選択するために使用できます。

1.1. Notational Conventions
1.1. 表記規則

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119]. The interpretation should only be applied when the terms appear in all capital letters.

キーワード「MUST」、「MUST NOT」、「REQUIRED」、「SHALL」、「SHALL NOT」、「SHOULD」、「SHOULD NOT」、「RECOMMENDED」、「NOT RECOMMENDED」、「MAY」、「OPTIONALこのドキュメントの「は、「RFCで使用して要件レベルを示すためのキーワード」[RFC2119]で説明されているように解釈されます。解釈が適用されるのは、用語がすべて大文字である場合のみです。

2. Terminology
2. 用語

This specification uses the same terminology as the "JSON Web Key (JWK)" [JWK], "JSON Web Signature (JWS)" [JWS], and "JSON Web Algorithms (JWA)" [JWA] specifications.

この仕様では、「JSON Web Key(JWK)」[JWK]、「JSON Web Signature(JWS)」[JWS]、および「JSON Web Algorithms(JWA)」[JWA]仕様と同じ用語を使用しています。

This term is defined by this specification:

この用語は、この仕様で定義されています。

JWK Thumbprint The digest value for a JWK.

JWKサムプリントJWKのダイジェスト値。

3. JSON Web Key (JWK) Thumbprint
3. JSON Web Key(JWK)サムプリント

The thumbprint of a JSON Web Key (JWK) is computed as follows:

JSON Web Key(JWK)の拇印は、次のように計算されます。

1. Construct a JSON object [RFC7159] containing only the required members of a JWK representing the key and with no whitespace or line breaks before or after any syntactic elements and with the required members ordered lexicographically by the Unicode [UNICODE] code points of the member names. (This JSON object is itself a legal JWK representation of the key.)

1. キーを表すJWKの必要なメンバーのみを含み、構文要素の前後に空白や改行を含まず、メンバー名のUnicode [UNICODE]コードポイントによって辞書順に順序付けされた必要なメンバーを含むJSONオブジェクト[RFC7159]を作成します。 (このJSONオブジェクト自体は、キーの正当なJWK表現です。)

2. Hash the octets of the UTF-8 representation of this JSON object with a cryptographic hash function H. For example, SHA-256 [SHS] might be used as H. See Section 3.4 for a discussion on the choice of hash function.

2. このJSONオブジェクトのUTF-8表現のオクテットを暗号化ハッシュ関数Hでハッシュします。たとえば、SHA-256 [SHS]をHとして使用できます。ハッシュ関数の選択については、3.4項を参照してください。

The resulting value is the JWK Thumbprint with H of the JWK. The details of this computation are further described in subsequent sections.

結果の値は、JWKのHが付いたJWKサムプリントです。この計算の詳細については、後続のセクションで詳しく説明します。

3.1. Example JWK Thumbprint Computation
3.1. JWKサムプリント計算の例

This section demonstrates the JWK Thumbprint computation for the JWK below (with the long line broken for display purposes only):

このセクションでは、以下のJWKのJWKサムプリント計算を示します(長い行は表示のみを目的として改行しています)。

     {
      "kty": "RSA",
      "n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAt
            VT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn6
            4tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FD
            W2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n9
            1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINH
            aQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw",
      "e": "AQAB",
      "alg": "RS256",
      "kid": "2011-04-29"
     }
        

As defined in "JSON Web Key (JWK)" [JWK] and "JSON Web Algorithms (JWA)" [JWA], the required members for an RSA public key are:

「JSON Web Key(JWK)」[JWK]および「JSON Web Algorithms(JWA)」[JWA]で定義されているように、RSA公開鍵に必要なメンバーは次のとおりです。

o "kty" o "n" o "e"

o ”kty” お ”ん” お ”え”

Therefore, these are the members used in the thumbprint computation.

したがって、これらは拇印の計算で使用されるメンバーです。

Their lexicographic order, per Section 3.3, is:

セクション3.3の辞書順は次のとおりです。

o "e" o "kty" o "n"

o ”え” お ”kty” お ”ん”

Therefore, the JSON object constructed as an intermediate step in the computation is as follows (with the line broken for display purposes only):

したがって、計算の中間ステップとして構築されたJSONオブジェクトは次のようになります(表示目的でのみ改行されています)。

{"e":"AQAB","kty":"RSA","n":"0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2 aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCi FV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65Y GjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n 91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_x BniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw"}

{ "E": "AQAB"、 "KTY": "RSA"、 "N": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2 aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCi FV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65Y GjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n 91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_x BniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw"}

The octets of the UTF-8 representation of this JSON object are:

このJSONオブジェクトのUTF-8表現のオクテットは次のとおりです。

[123, 34, 101, 34, 58, 34, 65, 81, 65, 66, 34, 44, 34, 107, 116, 121, 34, 58, 34, 82, 83, 65, 34, 44, 34, 110, 34, 58, 34, 48, 118, 120, 55, 97, 103, 111, 101, 98, 71, 99, 81, 83, 117, 117, 80, 105, 76, 74, 88, 90, 112, 116, 78, 57, 110, 110, 100, 114, 81, 109, 98, 88, 69, 112, 115, 50, 97, 105, 65, 70, 98, 87, 104, 77, 55, 56, 76, 104, 87, 120, 52, 99, 98, 98, 102, 65, 65, 116, 86, 84, 56, 54, 122, 119, 117, 49, 82, 75, 55, 97, 80, 70, 70, 120, 117, 104, 68, 82, 49, 76, 54, 116, 83, 111, 99, 95, 66, 74, 69, 67, 80, 101, 98, 87, 75, 82, 88, 106, 66, 90, 67, 105, 70, 86, 52, 110, 51, 111, 107, 110, 106, 104, 77, 115, 116, 110, 54, 52, 116, 90, 95, 50, 87, 45, 53, 74, 115, 71, 89, 52, 72, 99, 53, 110, 57, 121, 66, 88, 65, 114, 119, 108, 57, 51, 108, 113, 116, 55, 95, 82, 78, 53, 119, 54, 67, 102, 48, 104, 52, 81, 121, 81, 53, 118, 45, 54, 53, 89, 71, 106, 81, 82, 48, 95, 70, 68, 87, 50, 81, 118, 122, 113, 89, 51, 54, 56, 81, 81, 77, 105, 99, 65, 116, 97, 83, 113, 122, 115, 56, 75, 74, 90, 103, 110, 89, 98, 57, 99, 55, 100, 48, 122, 103, 100, 65, 90, 72, 122, 117, 54, 113, 77, 81, 118, 82, 76, 53, 104, 97, 106, 114, 110, 49, 110, 57, 49, 67, 98, 79, 112, 98, 73, 83, 68, 48, 56, 113, 78, 76, 121, 114, 100, 107, 116, 45, 98, 70, 84, 87, 104, 65, 73, 52, 118, 77, 81, 70, 104, 54, 87, 101, 90, 117, 48, 102, 77, 52, 108, 70, 100, 50, 78, 99, 82, 119, 114, 51, 88, 80, 107, 115, 73, 78, 72, 97, 81, 45, 71, 95, 120, 66, 110, 105, 73, 113, 98, 119, 48, 76, 115, 49, 106, 70, 52, 52, 45, 99, 115, 70, 67, 117, 114, 45, 107, 69, 103, 85, 56, 97, 119, 97, 112, 74, 122, 75, 110, 113, 68, 75, 103, 119, 34, 125]

[123, 34, 101, 34, 58, 34, 65, 81, 65, 66, 34, 44, 34, 107, 116, 121, 34, 58, 34, 82, 83, 65, 34, 44, 34, 110, 34, 58, 34, 48, 118, 120, 55, 97, 103, 111, 101, 98, 71, 99, 81, 83, 117, 117, 80, 105, 76, 74, 88, 90, 112, 116, 78, 57, 110, 110, 100, 114, 81, 109, 98, 88, 69, 112, 115, 50, 97, 105, 65, 70, 98, 87, 104, 77, 55, 56, 76, 104, 87, 120, 52, 99, 98, 98, 102, 65, 65, 116, 86, 84, 56, 54, 122, 119, 117, 49, 82, 75, 55, 97, 80, 70, 70, 120, 117, 104, 68, 82, 49, 76, 54, 116, 83, 111, 99, 95, 66, 74, 69, 67, 80, 101, 98, 87, 75, 82, 88, 106, 66, 90, 67, 105, 70, 86, 52, 110, 51, 111, 107, 110, 106, 104, 77, 115, 116, 110, 54, 52, 116, 90, 95, 50, 87, 45, 53, 74, 115, 71, 89, 52, 72, 99, 53, 110, 57, 121, 66, 88, 65, 114, 119, 108, 57, 51, 108, 113, 116, 55, 95, 82, 78, 53, 119, 54, 67, 102, 48, 104, 52, 81, 121, 81, 53, 118, 45, 54, 53, 89, 71, 106, 81, 82, 48, 95, 70, 68, 87, 50, 81, 118, 122, 113, 89, 51, 54, 56, 81, 81, 77, 105, 99, 65, 116, 97, 83, 113, 122, 115, 56, 75, 74, 90, 103, 110, 89, 98, 57, 99, 55, 100, 48, 122, 103, 100, 65, 90, 72, 122, 117, 54, 113, 77, 81, 118, 82, 76, 53, 104, 97, 106, 114, 110, 49, 110, 57, 49, 67, 98, 79, 112, 98, 73, 83, 68, 48, 56, 113, 78, 76, 121, 114, 100, 107, 116, 45, 98, 70, 84, 87, 104, 65, 73, 52, 118, 77, 81, 70, 104, 54, 87, 101, 90, 117, 48, 102, 77, 52, 108, 70, 100, 50, 78, 99, 82, 119, 114, 51, 88, 80, 107, 115, 73, 78, 72, 97, 81, 45, 71, 95, 120, 66, 110, 105, 73, 113, 98, 119, 48, 76, 115, 49, 106, 70, 52, 52, 45, 99, 115, 70, 67, 117, 114, 45, 107, 69, 103, 85, 56, 97, 119, 97, 112, 74, 122, 75, 110, 113, 68, 75, 103, 119, 34, 125]

Using SHA-256 [SHS] as the hash function H, the JWK SHA-256 Thumbprint value is the SHA-256 hash of these octets, specifically:

ハッシュ関数HとしてSHA-256 [SHS]を使用すると、JWK SHA-256サムプリント値はこれらのオクテットのSHA-256ハッシュです。具体的には、次のとおりです。

[55, 54, 203, 177, 120, 124, 184, 48, 156, 119, 238, 140, 55, 5, 197, 225, 111, 251, 158, 133, 151, 21, 144, 31, 30, 76, 89, 177, 17, 130, 245, 123]

「55、 54、 203、 177、 120、 124、 184、 48、 156、 119、 238、 140、 55、 5、 197、 225、 111、 251、 158、 133、 151、 21、 144、 31、 30、 76、 89、 177、 17、 130、 245、 123」

The base64url encoding [JWS] of this JWK SHA-256 Thumbprint value (which might, for instance, be used as a "kid" (key ID) value) is:

このJWK SHA-256サムプリント値のbase64urlエンコーディング[JWS](たとえば、「子供」(キーID)値として使用される場合があります)は次のとおりです。

NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs

NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs

3.2. JWK Members Used in the Thumbprint Computation
3.2. 拇印計算で使用されるJWKメンバー

Only the required members of a key's representation are used when computing its JWK Thumbprint value. As defined in "JSON Web Key (JWK)" [JWK] and "JSON Web Algorithms (JWA)" [JWA], the required members for an elliptic curve public key for the curves specified in Section 6.2.1.1 of RFC 7518 [JWA], in lexicographic order, are:

JWKサムプリント値を計算するときは、キーの表現の必要なメンバーのみが使用されます。 「JSON Web Key(JWK)」[JWK]および「JSON Web Algorithms(JWA)」[JWA]で定義されているように、RFC 7518 [JWA]のセクション6.2.1.1で指定された曲線の楕円曲線公開鍵に必要なメンバー]は、辞書式順序で、次のとおりです。

   o  "crv"
   o  "kty"
   o  "x"
   o  "y"
        

The required members for an RSA public key, in lexicographic order, are:

RSA公開鍵に必要なメンバーは、辞書式順序で、次のとおりです。

o "e" o "kty" o "n"

o ”え” お ”kty” お ”ん”

The required members for a symmetric key, in lexicographic order, are:

対称キーに必要なメンバーは、辞書式順序で、次のとおりです。

o "k" o "kty"

o ”k” お ”kty”

As other "kty" (key type) values are defined, the specifications defining them should be similarly consulted to determine which members, in addition to "kty", are required.

他の「kty」(キータイプ)値が定義されているので、それらを定義する仕様を同様に調べて、「kty」に加えてどのメンバーが必要かを決定する必要があります。

3.2.1. JWK Thumbprint of a Private Key
3.2.1. 秘密鍵のJWKサムプリント

The JWK Thumbprint of a JWK representing a private key is computed as the JWK Thumbprint of a JWK representing the corresponding public key. This has the intentional benefit that the same JWK Thumbprint value can be computed both by parties using either the public or private key. The JWK Thumbprint can then be used to refer to both keys of the key pair. Application context can be used to determine if the public or private key is the one being referred to by the JWK Thumbprint.

秘密鍵を表すJWKのJWKサムプリントは、対応する公開鍵を表すJWKのJWKサムプリントとして計算されます。これには、公開鍵または秘密鍵のいずれかを使用する当事者が同じJWKサムプリント値を計算できるという意図的な利点があります。その後、JWKサムプリントを使用して、キーペアの両方のキーを参照できます。アプリケーションコンテキストを使用して、公開鍵または秘密鍵がJWKサムプリントによって参照されているものであるかどうかを判断できます。

This specification defines the method of computing JWK Thumbprints of JWKs representing private keys for interoperability reasons -- so that different implementations computing JWK Thumbprints of private keys will produce the same result.

この仕様は、相互運用性の理由で秘密鍵を表すJWKのJWKサムプリントを計算する方法を定義しているため、異なる実装で秘密鍵のJWKサムプリントを計算しても同じ結果が得られます。

3.2.2. Why Not Include Optional Members?
3.2.2. オプションのメンバーを含めないのはなぜですか?

Optional members of JWKs are intentionally not included in the JWK Thumbprint computation so that their absence or presence in the JWK does not alter the resulting value. The JWK Thumbprint value is a digest of the members required to represent the key as a JWK -- not of additional data that may also accompany the key.

JWKのオプションメンバーは、意図的にJWK Thumbprintの計算に含まれないため、JWKにメンバーが存在しない場合でも結果の値は変更されません。 JWK Thumbprint値は、キーをJWKとして表すために必要なメンバーのダイジェストであり、キーに付随する可能性のある追加データのダイジェストではありません。

Optional members are not included so that the JWK Thumbprint refers to a key -- not a key with an associated set of key attributes. Different application contexts might or might not include different subsets of optional attributes about the key in the JWK. If these were included in the calculation of the JWK thumbprint, the values would be different for those JWKs, even though the keys are the same. The benefit of including only the JWK required members is that the JWK Thumbprint of any JWK representing the key remains the same, regardless of any other attributes that are present.

オプションのメンバーは含まれていないため、JWKサムプリントはキーを参照します。関連付けられたキー属性のセットを持つキーではありません。異なるアプリケーションコンテキストには、JWKのキーに関するオプション属性の異なるサブセットが含まれる場合と含まれない場合があります。これらがJWKサムプリントの計算に含まれている場合、キーが同じであっても、これらのJWKの値は異なります。 JWK必須メンバーのみを含めることの利点は、他の存在する属性に関係なく、キーを表すJWKのJWKサムプリントが同じままであることです。

Different kinds of thumbprints could be defined by other specifications that might include some or all additional JWK members, if use cases arise where such different kinds of thumbprints would be useful. See Section 9.1 of RFC 7517 [JWK] for notes on some ways to cryptographically bind attributes to a key.

さまざまな種類の拇印が役立つユースケースが発生した場合、さまざまな種類の拇印を、JWKメンバーの一部またはすべてを含む他の仕様で定義できます。属性をキーに暗号でバインドするいくつかの方法については、RFC 7517 [JWK]のセクション9.1を参照してください。

3.3. Order and Representation of Members in Hash Input
3.3. ハッシュ入力でのメンバーの順序と表現

The required members in the input to the hash function are ordered lexicographically by the Unicode code points of the member names.

ハッシュ関数への入力に必要なメンバーは、メンバー名のUnicodeコードポイントによって辞書順に並べられます。

Characters in member names and member values MUST be represented without being escaped. This means that thumbprints of JWKs that require such characters are not defined by this specification. (This is not expected to limit the applicability of this specification, in practice, as the members of JWK representations are not expected to use any of these characters.) The characters specified as requiring escaping by Section 7 of [RFC7159] are quotation mark, reverse solidus (a.k.a. backslash), and the control characters U+0000 through U+001F.

メンバー名とメンバー値の文字は、エスケープせずに表す必要があります。つまり、そのような文字を必要とするJWKの拇印は、この仕様では定義されていません。 (実際には、JWK表現のメンバーがこれらの文字を使用することは想定されていないため、この仕様の適用範囲を制限することは想定されていません。)[RFC7159]のセクション7でエスケープが必要と指定された文字は引用符です。逆ソリダス(別名バックスラッシュ)、および制御文字U + 0000からU + 001F。

If the JWK key type uses members whose values are themselves JSON objects, then the members of those objects MUST likewise be lexicographically ordered. (As of the time of this writing, none are defined that do.)

JWKキータイプが値自体がJSONオブジェクトであるメンバーを使用する場合、それらのオブジェクトのメンバーも同様に辞書順に並べる必要があります。 (これを書いている時点では、そのように定義されているものはありません。)

If the JWK key type uses members whose values are JSON numbers, and if those numbers are integers, then they MUST be represented as a JSON number as defined in Section 6 of [RFC7159] without including a fraction part or exponent part. For instance, the value "1.024e3" MUST be represented as "1024". This means that thumbprints of JWKs using numbers that are not integers are not defined by this specification. Also, as noted in "The I-JSON Message Format" [RFC7493], implementations cannot expect an integer whose absolute value is greater than 9007199254740991 (i.e., that is outside the range [-(2**53)+1, (2**53)-1]) to be treated as an exact value. (As of the time of this writing, none are defined that use JSON numbers.)

JWKキータイプが値がJSON番号であるメンバーを使用し、それらの番号が整数である場合、小数部や指数部を含めずに、[RFC7159]のセクション6で定義されているJSON番号として表現する必要があります。たとえば、値「1.024e3」は「1024」として表現する必要があります。つまり、整数ではない数値を使用するJWKの拇印は、この仕様では定義されていません。また、「I-JSONメッセージ形式」[RFC7493]に記載されているように、実装では、絶対値が9007199254740991より大きい整数(つまり、[-(2 ** 53)+1、(2 ** 53)-1])は正確な値として扱われます。 (この記事の執筆時点では、JSON番号を使用するものは定義されていません。)

See Section 4 for a discussion of further practical considerations pertaining to the representation of the hash input.

ハッシュ入力の表現に関するさらに実用的な考慮事項については、セクション4を参照してください。

3.4. Selection of Hash Function
3.4. ハッシュ関数の選択

A specific hash function must be chosen by an application to compute the hash value of the hash input. For example, SHA-256 [SHS] might be used as the hash function by the application. While SHA-256 is a good default choice at the time of this writing, the hash function of choice can be expected to change over time as the cryptographic landscape evolves.

ハッシュ入力のハッシュ値を計算するには、アプリケーションで特定のハッシュ関数を選択する必要があります。たとえば、アプリケーションではハッシュ関数としてSHA-256 [SHS]を使用できます。この記事の執筆時点ではSHA-256が適切なデフォルトの選択ですが、選択するハッシュ関数は、暗号化ランドスケープが進化するにつれて、時間とともに変化することが予想されます。

Note that in many cases, only the party that creates a key will need to know the hash function used. A typical usage is for the producer of the key to use the base64url-encoded JWK Thumbprint value as a "kid" (key ID) value. In this case, the consumer of the "kid" treats it as an opaque value that it uses to select the key.

多くの場合、キーを作成する当事者のみが、使用されるハッシュ関数を知る必要があることに注意してください。典型的な使用法は、キーのプロデューサーがbase64urlでエンコードされたJWKサムプリント値を「キッド」(キーID)値として使用することです。この場合、「子供」のコンシューマーは、キーを選択するために使用する不透明な値として扱います。

However, in some cases, multiple parties will be reproducing the JWK Thumbprint calculation and comparing the results. In these cases, the parties will need to know which hash function was used and use the same one.

ただし、場合によっては、複数の関係者がJWK拇印の計算を再現して結果を比較することがあります。これらの場合、当事者はどのハッシュ関数が使用されたかを知り、同じハッシュ関数を使用する必要があります。

3.5. JWK Thumbprints of Keys Not in JWK Format
3.5. JWK形式ではないキーのJWKサムプリント

Note that a key need not be in JWK format to create a JWK Thumbprint of it. The only prerequisites are that the JWK representation of the key be defined and the party creating the JWK Thumbprint be in possession of the necessary key material. These are sufficient to create the hash input from the JWK representation of the key, as described in Section 3.3.

キーのJWKサムプリントを作成するために、キーがJWK形式である必要はないことに注意してください。唯一の前提条件は、キーのJWK表現を定義し、JWKサムプリントを作成する当事者が必要なキーマテリアルを所有していることです。セクション3.3で説明するように、これらは、キーのJWK表現からハッシュ入力を作成するのに十分です。

4. Practical JSON and Unicode Considerations
4. JSONおよびUnicodeに関する実用的な考慮事項

Implementations will almost certainly use functionality provided by the platform's JSON support when parsing the JWK and emitting the JSON object used as the hash input. As a practical consideration, future JWK member names and values should be avoided for which different platforms or libraries might emit different representations. As of the time of this writing, all defined JWK member names and values use only printable ASCII characters, which should not exhibit this problem. Note however, that JSON.stringify() cannot be counted on to lexicographically sort the members of JSON objects, so while it could be used to emit some kinds of member values, different code is likely to be needed to perform the sorting.

実装は、JWKを解析してハッシュ入力として使用されるJSONオブジェクトを出力するときに、プラットフォームのJSONサポートによって提供される機能をほぼ確実に使用します。実際的な考慮事項として、将来のJWKメンバーの名前と値は、異なるプラットフォームまたはライブラリが異なる表現を生成する可能性があるため、避ける必要があります。この記事の執筆時点では、定義されているすべてのJWKメンバーの名前と値は、印刷可能なASCII文字のみを使用しているため、この問題は発生しません。ただし、JSON.stringify()はJSONオブジェクトのメンバーを辞書式にソートするために使用できないので、ある種のメンバー値を出力するために使用することはできますが、ソートを実行するには別のコードが必要になる可能性があります。

In particular, while the operation of lexicographically ordering member names by their Unicode code points is well defined, different platform sort functions may produce different results for non-ASCII characters, in ways that may not be obvious to developers. If writers of future specifications defining new JWK key type values choose to restrict themselves to printable ASCII member names and values (which are for machine and not human consumption anyway), some future interoperability problems might be avoided.

特に、Unicodeコードポイントによってメンバー名を辞書式に順序付ける操作は明確に定義されていますが、プラットフォームのソート関数が異なると、非ASCII文字に対して異なる結果が生成される可能性があります。新しいJWKキータイプ値を定義する将来の仕様の作成者が、印刷可能なASCIIメンバー名と値(いずれにせよ、マシン用であり、人間による消費ではない)に制限することを選択した場合、将来の相互運用性の問題が回避される可能性があります。

However, if new JWK members are defined that use non-ASCII member names or values, their definitions should specify the exact Unicode code point sequences used to represent them. This is particularly important in cases in which Unicode normalization could result in the transformation of one set of code points into another under any circumstances.

ただし、ASCII以外のメンバー名または値を使用する新しいJWKメンバーが定義されている場合、それらの定義では、それらを表すために使用される正確なUnicodeコードポイントシーケンスを指定する必要があります。これは、Unicodeの正規化によって、ある状況下でコードポイントのセットが別のセットに変換される可能性がある場合に特に重要です。

Use of escaped characters in JWKs for which JWK Thumbprints will be computed should be avoided. Use of escaped characters in the hash input JWKs derived from these original JWKs is prohibited.

JWKサムプリントが計算されるJWKでのエスケープ文字の使用は避けてください。これらの元のJWKから派生したハッシュ入力JWKでのエスケープ文字の使用は禁止されています。

There is a natural representation to use for numeric values that are integers. However, this specification does not attempt to define a standard representation for numbers that are not integers or that contain an exponent component. This is not expected to be a problem in practice, as the required members of JWK representations are expected to use only numbers that are integers.

整数である数値に使用する自然な表現があります。ただし、この仕様は、整数ではない、または指数コンポーネントを含む数値の標準表現を定義しようとするものではありません。 JWK表現の必要なメンバーは整数である数値のみを使用することが期待されているため、これは実際には問題とはなりません。

Use of number representations containing fraction or exponent parts in JWKs for which JWK Thumbprints will be computed should be avoided.

JWKサムプリントが計算されるJWKで、小数部または指数部を含む数値表現の使用は避けてください。

All of these practical considerations are really an instance of Jon Postel's principle: "Be liberal in what you accept, and conservative in what you send."

これらの実際的な考慮事項はすべて、ジョンポステルの原則の実例です。「受け入れるものは寛大に、送信するものは保守的にしてください」。

5. Relationship to Digests of X.509 Values
5. X.509値のダイジェストとの関係

JWK Thumbprint values are computed on the JWK members required to represent a key, rather than all members of a JWK that the key is represented in. Thus, they are more analogous to applications that use digests of X.509 Subject Public Key Info (SPKI) values, which are defined in Section 4.1.2.7 of [RFC5280], than to applications that use digests of complete certificate values, as the "x5t" (X.509 certificate SHA-1 thumbprint) [JWS] value defined for X.509 certificate objects does. While logically equivalent to a digest of the SPKI representation of the key, a JWK Thumbprint is computed over a JSON representation of that key, rather than over an ASN.1 representation of it.

JWK Thumbprint値は、キーが表されるJWKのすべてのメンバーではなく、キーを表すために必要なJWKメンバーで計算されます。したがって、X.509サブジェクト公開キー情報(SPKI)のダイジェストを使用するアプリケーションにより類似しています)[RFC5280]のセクション4.1.2.7で定義されている値。Xに定義されている「x5t」(X.509証明書SHA-1サムプリント)[JWS]値として、完全な証明書値のダイジェストを使用するアプリケーションよりも509証明書オブジェクトにはあります。 JWKサムプリントは、キーのSPKI表現のダイジェストと論理的に同等ですが、ASN.1表現ではなく、そのキーのJSON表現で計算されます。

6. IANA Considerations
6. IANAに関する考慮事項

This specification adds to the instructions for the Designated Experts of the following IANA registries, all of which are in the "JSON Object Signing and Encryption (JOSE)" registry [IANA.JOSE]:

この仕様は、次のIANAレジストリのDesignated Expertsの指示に追加されます。これらのすべては、「JSON Object Signing and Encryption(JOSE)」レジストリ[IANA.JOSE]にあります。

o JSON Web Key Types o JSON Web Key Elliptic Curve o JSON Web Key Parameters

o JSON Webキーのタイプo JSON Webキーの楕円曲線o JSON Webキーのパラメーター

IANA has added a link to this specification in the Reference sections of these registries.

IANAは、これらのレジストリのリファレンスセクションにこの仕様へのリンクを追加しました。

For these registries, because of the practical JSON and Unicode considerations described in Section 4, the Designated Experts must either:

これらのレジストリについては、セクション4で説明されているJSONおよびUnicodeの実用的な考慮事項のため、Designated Expertsは次のいずれかを行う必要があります。

(a) require that JWK member names and values being registered use only printable ASCII characters excluding double quote ('"') and backslash ('\') (the Unicode characters with code points U+0021, U+0023 through U+005B, and U+005D through U+007E), or

(a)登録されるJWKメンバーの名前と値に、二重引用符( '"')とバックスラッシュ( '\')を除く印刷可能なASCII文字のみを使用することを要求する(コードポイントがU + 0021、U + 0023からU + 005BのUnicode文字) 、およびU + 005D〜U + 007E)、または

(b) if new JWK members or values are defined that use other code points, require that their definitions specify the exact Unicode code point sequences used to represent them. Furthermore, proposed registrations that use Unicode code points that can only be represented in JSON strings as escaped characters must not be accepted.

(b)他のコードポイントを使用する新しいJWKメンバーまたは値が定義されている場合、それらの定義は、それらを表すために使用される正確なUnicodeコードポイントシーケンスを指定する必要があります。さらに、エスケープ文字としてJSON文字列でのみ表現できるUnicodeコードポイントを使用する登録案は受け入れられません。

7. Security Considerations
7. セキュリティに関する考慮事項

The JSON Security Considerations and Unicode Comparison Security Considerations described in Sections 10.12 and 10.13 of "JSON Web Signature (JWS)" [JWS] also apply to this specification.

「JSON Web Signature(JWS)」[JWS]のセクション10.12および10.13で説明されているJSONセキュリティの考慮事項とUnicode比較のセキュリティの考慮事項も、この仕様に適用されます。

Also, as described in Section 4, some implementations may produce incorrect results if esoteric or escaped characters are used in the member names. The security implications of this appear to be limited for JWK Thumbprints of public keys, because while it may result in implementations failing to identify the intended key, it should not leak information. The information in a public key is already public in nature, by definition.

また、セクション4で説明されているように、メンバー名に難解な文字またはエスケープ文字が使用されている場合、一部の実装では誤った結果が生成されることがあります。実装が目的のキーの識別に失敗する可能性がある一方で、情報が漏洩してはならないため、これのセキュリティへの影響は、公開キーのJWKサムプリントでは制限されているようです。定義上、公開鍵の情報はすでに公開されています。

A hash of a symmetric key has the potential to leak information about the key value. Thus, the JWK Thumbprint of a symmetric key should typically be concealed from parties not in possession of the symmetric key, unless in the application context, the cryptographic hash used, such as SHA-256, is known to provide sufficient protection against disclosure of the key value.

対称鍵のハッシュは、鍵の値に関する情報を漏らす可能性があります。したがって、対称鍵のJWKサムプリントは通常、対称鍵を所有していない当事者から隠すべきです。ただし、アプリケーションのコンテキストで、SHA-256などの使用される暗号化ハッシュが、キー値。

A JWK Thumbprint will only uniquely identify a particular key if a single unambiguous JWK representation for that key is defined and used when computing the JWK Thumbprint. (Such representations are defined for all the key types defined in "JSON Web Algorithms (JWA)" [JWA].) For example, if an RSA key were to use "e":"AAEAAQ" (representing [0, 1, 0, 1]) rather than the specified correct representation of "e":"AQAB" (representing [1, 0, 1]), then a different thumbprint value would be produced for what could be effectively the same key, at least for implementations that are lax in validating the JWK values that they accept. Thus, JWK Thumbprint values can only be relied upon to be unique for a given key if the implementation also validates that the correct representation of the key is used.

JWKサムプリントは、そのキーの単一の明確なJWK表現がJWKサムプリントの計算時に定義および使用される場合にのみ、特定のキーを一意に識別します。 (このような表現は、「JSON Web Algorithms(JWA)」[JWA]で定義されているすべての鍵タイプに対して定義されています。)たとえば、RSA鍵が「e」を使用する場合:「AAEAAQ」([0、1、0 、1]) "e": "AQAB"([1、0、1]を表す)の指定された正しい表現ではなく、少なくとも実装では、実質的に同じキーである可能性のあるものに対して異なる拇印値が生成されますそれらは、それらが受け入れるJWK値を検証する際に緩やかです。したがって、実装がキーの正しい表現が使用されていることも検証する場合、JWK Thumbprint値は、特定のキーに対して一意であることにのみ依存できます。

Even more insidious is that an attacker may supply a key that is a transformation of a legal key in order to have it appear to be a different key. For instance, if a legitimate RSA key uses a modulus value N and an attacker supplies a key with modulus 3*N, the modified key would still work about 1/3 of the time, but would appear to be a different key. Thus, while thumbprint values are valuable for identifying legitimate keys, comparing thumbprint values is not a reliable means of excluding (blacklisting) the use of particular keys (or transformations thereof).

さらに巧妙なのは、攻撃者が合法的なキーを別のキーに見せるために、そのキーを変換したキーを提供する可能性があることです。たとえば、正当なRSA鍵が係数値Nを使用し、攻撃者が鍵に係数3 * Nを指定した場合、変更された鍵は、約1/3の時間で機能しますが、別の鍵のように見えます。したがって、サムプリント値は正当なキーを識別するのに役立ちますが、サムプリント値を比較することは、特定のキー(またはその変換)の使用を除外(ブラックリスト)する信頼できる方法ではありません。

8. References
8. 参考文献
8.1. Normative References
8.1. 引用文献

[IANA.JOSE] IANA, "JSON Object Signing and Encryption (JOSE)", <http://www.iana.org/assignments/jose>.

[IANA.JOSE] IANA、「JSON Object Signing and Encryption(JOSE)」、<http://www.iana.org/assignments/jose>。

[JWA] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, May 2015, <http://www.rfc-editor.org/info/rfc7518>.

[JWA]ジョーンズ、M。、「JSON Web Algorithms(JWA)」、RFC 7518、DOI 10.17487 / RFC7518、2015年5月、<http://www.rfc-editor.org/info/rfc7518>。

[JWK] Jones, M., "JSON Web Key (JWK)", RFC 7517, DOI 10.17487/RFC7517, May 2015, <http://www.rfc-editor.org/info/rfc7517>.

[JWK]ジョーンズ、M。、「JSON Web Key(JWK)」、RFC 7517、DOI 10.17487 / RFC7517、2015年5月、<http://www.rfc-editor.org/info/rfc7517>。

[JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 2015, <http://www.rfc-editor.org/info/rfc7515>.

[JWS]ジョーンズ、M。、ブラッドリー、J.、N。崎村、「JSON Web Signature(JWS)」、RFC 7515、DOI 10.17487 / RFC7515、2015年5月、<http://www.rfc-editor.org / info / rfc7515>。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するキーワード」、BCP 14、RFC 2119、DOI 10.17487 / RFC2119、1997年3月、<http://www.rfc-editor.org/info/ rfc2119>。

[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2014, <http://www.rfc-editor.org/info/rfc7159>.

[RFC7159]ブレイ、T。、編、「JavaScriptオブジェクト表記(JSON)データ交換フォーマット」、RFC 7159、DOI 10.17487 / RFC7159、2014年3月、<http://www.rfc-editor.org/info/ rfc7159>。

[SHS] National Institute of Standards and Technology, "Secure Hash Standard (SHS)", FIPS PUB 180-4, March 2012, <http://csrc.nist.gov/publications/fips/fips180-4/ fips-180-4.pdf>.

[SHS]米国国立標準技術研究所、「Secure Hash Standard(SHS)」、FIPS PUB 180-4、2012年3月、<http://csrc.nist.gov/publications/fips/fips180-4/ fips-180 -4.pdf>。

[UNICODE] The Unicode Consortium, "The Unicode Standard", <http://www.unicode.org/versions/latest/>.

[UNICODE] Unicodeコンソーシアム、「The Unicode Standard」、<http://www.unicode.org/versions/latest/>。

8.2. Informative References
8.2. 参考引用

[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, <http://www.rfc-editor.org/info/rfc5280>.

[RFC5280] Cooper、D.、Santesson、S.、Farrell、S.、Boeyen、S.、Housley、R。、およびW. Polk、「Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List(CRL)Profile "、RFC 5280、DOI 10.17487 / RFC5280、2008年5月、<http://www.rfc-editor.org/info/rfc5280>。

[RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015, <http://www.rfc-editor.org/info/rfc7493>.

[RFC7493]ブレイ、T。、編、「I-JSONメッセージ形式」、RFC 7493、DOI 10.17487 / RFC7493、2015年3月、<http://www.rfc-editor.org/info/rfc7493>。

Acknowledgements

謝辞

James Manger and John Bradley participated in discussions that led to the creation of this specification. Thanks also to Joel Halpern, Barry Leiba, Adam Montville, Kathleen Moriarty, and Jim Schaad for their reviews of this specification.

James MangerとJohn Bradleyは、この仕様の作成につながった議論に参加しました。この仕様をレビューしてくれたJoel Halpern、Barry Leiba、Adam Montville、Kathleen Moriarty、およびJim Schaadにも感謝します。

Authors' Addresses

著者のアドレス

Michael B. Jones Microsoft

マイケルB.ジョーンズマイクロソフト

   Email: mbj@microsoft.com
   URI:   http://self-issued.info/
        

Nat Sakimura Nomura Research Institute

崎村ナット野村総合研究所

   Email: n-sakimura@nri.co.jp
   URI:   http://nat.sakimura.org/