Internet Engineering Task Force (IETF)                        R. Housley
Request for Comments: 9690                                Vigil Security
Obsoletes: 5990                                                S. Turner
Category: Standards Track                                          sn3rd
ISSN: 2070-1721                                            February 2025
        
Use of the RSA-KEM Algorithm in the Cryptographic Message Syntax (CMS)
暗号化メッセージ構文(CMS)でのRSA-KEMアルゴリズムの使用
Abstract
概要

The RSA Key Encapsulation Mechanism (RSA-KEM) algorithm is a one-pass (store-and-forward) cryptographic mechanism for an originator to securely send keying material to a recipient using the recipient's RSA public key. The RSA-KEM algorithm is specified in Clause 11.5 of ISO/IEC: 18033-2:2006. This document specifies the conventions for using the RSA-KEM algorithm as a standalone KEM algorithm and the conventions for using the RSA-KEM algorithm with the Cryptographic Message Syntax (CMS) using KEMRecipientInfo as specified in RFC 9629. This document obsoletes RFC 5990.

RSAキーカプセル化メカニズム(RSA-KEM)アルゴリズムは、受信者のRSA公開キーを使用して受信者にキーイン素材を安全に送信するためのワンパス(ストアアンドフォワード)暗号化メカニズムです。RSA-KEMアルゴリズムは、ISO/IEC:18033-2:2006の条項11.5で指定されています。このドキュメントは、RSA-KEMアルゴリズムをスタンドアロンKEMアルゴリズムとして使用するための規則と、RSA-KEMアルゴリズムを暗号化メッセージの構文(CMS)で使用するための規則を指定します。RFC9629で指定されたKemcipientInfoを使用して、このドキュメントObsoletes RFC 590。

Status of This Memo
本文書の位置付け

This is an Internet Standards Track document.

これは、インターネット標準トラックドキュメントです。

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 7841.

このドキュメントは、インターネットエンジニアリングタスクフォース(IETF)の製品です。IETFコミュニティのコンセンサスを表しています。公開レビューを受けており、インターネットエンジニアリングステアリンググループ(IESG)からの出版が承認されています。インターネット標準の詳細については、RFC 7841のセクション2で入手できます。

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

このドキュメントの現在のステータス、任意のERRATA、およびそのフィードバックを提供する方法に関する情報は、https://www.rfc-editor.org/info/rfc9690で取得できます。

著作権表示

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

著作権(c)2025 IETF Trustおよび文書著者として特定された人。無断転載を禁じます。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.

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

Table of Contents
目次
   1.  Introduction
     1.1.  RSA-KEM Algorithm Rationale
     1.2.  RSA-KEM Algorithm Summary
     1.3.  CMS KEMRecipientInfo Processing Summary
     1.4.  Conventions and Definitions
     1.5.  ASN.1
     1.6.  Changes Since RFC 5990
   2.  Use of the RSA-KEM Algorithm in CMS
     2.1.  Mandatory To Implement
     2.2.  RecipientInfo Conventions
     2.3.  Certificate Conventions
     2.4.  SMIMECapabilities Attribute Conventions
   3.  Security Considerations
   4.  IANA Considerations
   5.  References
     5.1.  Normative References
     5.2.  Informative References
   Appendix A.  RSA-KEM Algorithm
     A.1.  Originator's Operations: RSA-KEM Encapsulate()
     A.2.  Recipient's Operations: RSA-KEM Decapsulate()
   Appendix B.  ASN.1 Syntax
     B.1.  Underlying Components
     B.2.  ASN.1 Module
   Appendix C.  SMIMECapabilities Examples
   Appendix D.  RSA-KEM CMS Enveloped-Data Example
     D.1.  Originator RSA-KEM Encapsulate() Processing
     D.2.  Originator CMS Processing
     D.3.  Recipient RSA-KEM Decapsulate() Processing
     D.4.  Recipient CMS Processing
   Acknowledgements
   Authors' Addresses
        
1. Introduction
1. はじめに

The RSA Key Encapsulation Mechanism (RSA-KEM) algorithm is a one-pass (store-and-forward) cryptographic mechanism for an originator to securely send keying material to a recipient using the recipient's RSA public key. The RSA-KEM algorithm is specified in Clause 11.5 of [ISO18033-2].

RSAキーカプセル化メカニズム(RSA-KEM)アルゴリズムは、受信者のRSA公開キーを使用して受信者にキーイン素材を安全に送信するためのワンパス(ストアアンドフォワード)暗号化メカニズムです。RSA-KEMアルゴリズムは、[ISO18033-2]の条項11.5で指定されています。

The RSA-KEM algorithm takes a different approach than other RSA key transport mechanisms [RFC8017] with the goal of providing higher security assurance while also satisfying the KEM interface. The RSA-KEM algorithm encrypts a random integer with the recipient's RSA public key and derives a shared secret from the random integer. The originator and recipient can derive a symmetric key from the shared secret. For example, a key-encryption key (KEK) can be derived from the shared secret to wrap a content-encryption key (CEK).

RSA-KEMアルゴリズムは、KEMインターフェイスを満たしながらより高いセキュリティ保証を提供することを目的として、他のRSAキートランスポートメカニズム[RFC8017]とは異なるアプローチを採用しています。RSA-KEMアルゴリズムは、受信者のRSA公開キーを使用したランダム整数を暗号化し、ランダム整数から共有された秘密を導き出します。発信者と受信者は、共有秘密から対称キーを導き出すことができます。たとえば、キー暗号化キー(KEK)を共有秘密から導き出して、コンテンツ圧力キー(CEK)をラップできます。

In the Cryptographic Message Syntax (CMS) [RFC5652] using KEMRecipientInfo [RFC9629], the shared-secret value is input to a key derivation function (KDF) to compute a key-encryption key and wrap a symmetric content-encryption key with the key-encryption key. In this way, the originator and the recipient end up with the same content-encryption key.

暗号化メッセージの構文(CMS)[RFC5652]では、KemrecipientInfo [RFC9629]を使用して、共有分泌値はキー派生関数(KDF)に入力して、キー暗号化キーを計算し、対称的なコンテンツエンクリプト画キーをキーと巻き付けます。- 暗号化キー。このようにして、発信者と受信者は同じコンテンツ圧力キーになります。

For completeness, a specification of the RSA-KEM algorithm is given in Appendix A of this document. ASN.1 syntax is given in Appendix B.

完全性のために、このドキュメントの付録AにRSA-KEMアルゴリズムの指定を示します。ASN.1構文は付録Bに記載されています

1.1. RSA-KEM Algorithm Rationale
1.1. RSA-KEMアルゴリズムの根拠

The RSA-KEM algorithm provides higher security assurance than other variants of the RSA cryptosystem for two reasons. First, the input to the underlying RSA operation is a string-encoded random integer between 0 and n-1, where n is the RSA modulus, so it does not have any structure that could be exploited by an adversary. Second, the input is independent of the keying material, so the result of the RSA decryption operation is not directly available to an adversary. As a result, the RSA-KEM algorithm enjoys a "tight" security proof in the random oracle model. (In other padding schemes, such as PKCS #1 v1.5 [RFC8017], the input has structure and depends on the keying material. Additionally, the provable security assurances are not as strong.)

RSA-KEMアルゴリズムは、2つの理由でRSA暗号システムの他のバリエーションよりも高いセキュリティ保証を提供します。まず、基礎となるRSA操作への入力は、0からN-1の間の文字列エンコードランダム整数であり、nはRSAモジュラスであるため、敵が搾取できる構造はありません。第二に、入力はキーイング材料に依存しないため、RSA復号化操作の結果は敵が直接利用できません。その結果、RSA-KEMアルゴリズムは、ランダムオラクルモデルで「タイトな」セキュリティ証明を享受しています。(PKCS#1 v1.5 [RFC8017]などの他のパディングスキームでは、入力には構造があり、キーイング材料に依存します。さらに、証明可能なセキュリティ保証はそれほど強力ではありません。)

The approach is also architecturally convenient because the public-key operations are separate from the symmetric operations on the keying material. Another benefit is that the length of the keying material is determined by the symmetric algorithms, not the size of the RSA modulus.

また、パブリックキー操作はキーイング材料の対称操作とは別のため、このアプローチは建築的に便利です。別の利点は、キーイング材料の長さが、RSAモジュラスのサイズではなく、対称アルゴリズムによって決定されることです。

1.2. RSA-KEM Algorithm Summary
1.2. RSA-KEMアルゴリズムの要約

All KEM algorithms provide three functions: KeyGen(), Encapsulate(), and Decapsulate().

すべてのKEMアルゴリズムは、keygen()、cankapsulate()、およびdecapsulate()の3つの関数を提供します。

The following summarizes these three functions for the RSA-KEM algorithm:

以下は、RSA-KEMアルゴリズムのこれら3つの関数をまとめたものです。

KeyGen() -> (pk, sk):

keygen() - >(pk、sk):

Generate the public key (pk) and a private key (sk) as described in Section 3 of [RFC8017].

[RFC8017]のセクション3で説明されているように、公開キー(PK)と秘密鍵(SK)を生成します。

Encapsulate(pk) -> (ct, SS):

cancapsulate(pk) - >(ct、ss):

Given the recipient's public key (pk), produce a ciphertext (ct) to be passed to the recipient and a shared secret (SS) for use by the originator as follows:

受信者の公開キー(PK)を考えると、次のように、オリジネーターが使用するためにレシピエントに渡される暗号文(CT)と共有秘密(SS)を生成します。

1. Generate a random integer z between 0 and n-1.

1. 0からn-1の間のランダム整数zを生成します。

2. Encrypt the integer z with the recipient's RSA public key to obtain the ciphertext:

2. 整数Zを受信者のRSA公開キーで暗号化して、暗号文を取得します。

           ct = z^e mod n
        

3. Derive a shared secret from the integer z using a Key Derivation Function (KDF):

3. キー派生関数(KDF)を使用して、整数Zから共有秘密を導き出します。

           SS = KDF(Z, ssLen)
        

4. The ciphertext and the shared secret are returned by the function. The originator sends the ciphertext to the recipient.

4. 暗号文と共有秘密は、関数によって返されます。オリジネーターは、ciphertextを受信者に送信します。

Decapsulate(sk, ct) -> SS:

Decapsulate(SK、CT) - > SS:

Given the private key (sk) and the ciphertext (ct), produce the shared secret (SS) for the recipient as follows:

秘密鍵(SK)と暗号文(CT)を考えると、次のようにレシピエントの共有秘密(SS)を生成します。

1. Decrypt the ciphertext with the recipient's RSA private key to obtain the random integer z:

1. ランダム整数Zを取得するために、受信者のRSA秘密キーで暗号文を復号化します。

           z = ct^d mod n
        

2. Derive a shared secret from the integer z:

2. 整数Zから共有秘密を導き出します。

           SS = KDF(Z, ssLen)
        

3. The shared secret is returned by the function.

3. 共有秘密は関数によって返されます。

1.3. CMS KEMRecipientInfo Processing Summary
1.3. CMS KEMRECIPIENTINFO処理概要

To support the RSA-KEM algorithm, the CMS originator MUST implement Encapsulate().

RSA-KEMアルゴリズムをサポートするには、CMSオリジネーターはEncapsulate()を実装する必要があります。

Given a content-encryption key CEK, the RSA-KEM algorithm processing by the originator to produce the values that are carried in the CMS KEMRecipientInfo can be summarized as follows:

コンテンツの暗号化のキーCEKが与えられた場合、CMS KemrecipientInfoで運ばれる値を作成するためのOriginatorによるRSA-KEMアルゴリズムの処理は、次のように要約できます。

1. Obtain the shared secret using the Encapsulate() function of the RSA-KEM algorithm and the recipient's RSA public key:

1. RSA-KEMアルゴリズムと受信者のRSA公開キーのcapsulate()関数を使用して共有秘密を取得します。

          (ct, SS) = Encapsulate(pk)
        

2. Derive a key-encryption key KEK from the shared secret:

2. 共有された秘密からキー暗号化キーケクを導き出す:

          KEK = KDF(SS, kekLength, otherInfo)
        

3. Wrap the CEK with the KEK to obtain wrapped keying material WK:

3. CEKをKEKで包み、包まれたキーイング材料wkを取得します。

          WK = WRAP(KEK, CEK)
        

4. The originator sends the ciphertext and WK to the recipient in the CMS KEMRecipientInfo structure.

4. オリジネーターは、CMS KemrecipientInfo構造のCiphertextとWKを受信者に送信します。

To support the RSA-KEM algorithm, the CMS recipient MUST implement Decapsulate().

RSA-KEMアルゴリズムをサポートするには、CMSレシピエントはDecapsulate()を実装する必要があります。

The RSA-KEM algorithm recipient processing of the values obtained from the KEMRecipientInfo structure is summarized as follows:

KemrecipientInfo構造から得られた値のRSA-KEMアルゴリズムレシピエント処理は、次のように要約されています。

1. Obtain the shared secret using the Decapsulate() function of the RSA-KEM algorithm and the recipient's RSA private key:

1. RSA-KEMアルゴリズムと受信者のRSA秘密キーのDecapsulate()関数を使用して共有秘密を取得します。

          SS = Decapsulate(sk, ct)
        

2. Derive a key-encryption key KEK from the shared secret:

2. 共有された秘密からキー暗号化キーケクを導き出す:

          KEK = KDF(SS, kekLength, otherInfo)
        

3. Unwrap the WK with the KEK to obtain the content-encryption key CEK:

3. コンテンツ暗号化キーCEKを取得するために、wkをKEKで描く:

          CEK = UNWRAP(KEK, WK)
        

Note that the KDF used to process the KEMRecipientInfo structure MAY be different from the KDF used to derive the shared secret in the RSA-KEM algorithm.

KemrecipientInfo構造の処理に使用されるKDFは、RSA-KEMアルゴリズムの共有秘密を導き出すために使用されるKDFとは異なる場合があることに注意してください。

1.4. Conventions and Definitions
1.4. 慣習と定義

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 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

このドキュメント内のキーワード「MUST」、「MUST NOT」、「REQUIRED」、「SHALL」、「SHALL NOT」、「SHOULD」、「SHOULD NOT」、「RECOMMENDED」、「NOT RECOMMENDED」、「MAY」、および「OPTIONAL」は、ここに示すようにすべて大文字で表示されている場合にのみ、BCP 14 [RFC2119] [RFC8174] で説明されているように解釈されます。

1.5. ASN.1
1.5. ASN.1

CMS values are generated using ASN.1 [X.680], which uses the Basic Encoding Rules (BER) and the Distinguished Encoding Rules (DER) [X.690].

CMS値は、asn.1 [x.680]を使用して生成されます。これは、基本的なエンコーディングルール(BER)と識別式エンコードルール(der)[x.690]を使用します。

1.6. Changes Since RFC 5990
1.6. RFC 5990以降の変更

RFC 5990 [RFC5990] specified the conventions for using the RSA-KEM algorithm in CMS as a key transport algorithm. That is, it used KeyTransRecipientInfo [RFC5652] for each recipient. Since the publication of RFC 5990, a new KEMRecipientInfo structure [RFC9629] has been defined to support KEM algorithms. When the id-rsa-kem algorithm identifier appears in the SubjectPublicKeyInfo field of a certificate, the complex parameter structure defined in RFC 5990 can be omitted; however, the parameters are allowed for backward compatibility. Also, to avoid visual confusion with id-kem-rsa, id-rsa-kem-spki is introduced as an alias for id-rsa-kem.

RFC 5990 [RFC5990]は、CMSのRSA-KEMアルゴリズムを重要な輸送アルゴリズムとして使用するための規則を指定しました。つまり、各受信者にkeytransrecipientinfo [rfc5652]を使用しました。RFC 5990の公開以来、KEMアルゴリズムをサポートするために新しいKemrecipientInfo構造[RFC9629]が定義されています。ID-RSA-KEMアルゴリズム識別子が証明書の件名PublicKeyInfoフィールドに表示されると、RFC 5990で定義されている複雑なパラメーター構造を省略できます。ただし、パラメーターは後方互換性のために許可されています。また、ID-KEM-RSAとの視覚的な混乱を避けるために、ID-RSA-KEM-SPKIがID-RSA-KEMのエイリアスとして紹介されています。

RFC 5990 used EK as the EncryptedKey, which is the concatenation of the ciphertext C and the wrapped key WK, EK = (C || WK). The use of EK was necessary to align with the KeyTransRecipientInfo structure. In this document, the ciphertext and the wrapped key are sent in separate fields of the KEMRecipientInfo structure. In particular, the ciphertext is carried in the kemct field, and the wrapped key is carried in the encryptedKey field. See Appendix A for details about the computation of the ciphertext.

RFC 5990は、EKを暗号化されたキーとして使用しました。これは、暗号文CとラップされたキーWK、EK =(C || WK)の連結です。EKの使用は、KeyTransrecipientInfo構造に合わせるために必要でした。このドキュメントでは、暗号文とラップキーがKemrecipientInfo構造の別々のフィールドに送信されます。特に、暗号文はKEMCTフィールドに運ばれ、ラップキーは暗号化されたキーフィールドに運ばれます。暗号文の計算に関する詳細については、付録Aを参照してください。

RFC 5990 included support for Camellia and Triple-DES block ciphers; discussion of these block ciphers does not appear in this document, but the algorithm identifiers remain in the ASN.1 module (see Appendix B.2).

RFC 5990には、CamelliaとTriple-Desブロック暗号のサポートが含まれていました。これらのブロック暗号の議論はこのドキュメントには表示されませんが、アルゴリズム識別子はASN.1モジュールに残ります(付録B.2を参照)。

RFC 5990 included support for SHA-1 hash function; discussion of this hash function does not appear this document, but the algorithm identifier remains in the ASN.1 module (see Appendix B.2).

RFC 5990には、SHA-1ハッシュ機能のサポートが含まれています。このハッシュ関数の説明はこのドキュメントではありませんが、アルゴリズム識別子はASN.1モジュールに残ります(付録B.2を参照)。

RFC 5990 required support for the KDF3 key derivation function [ANS-X9.44]; this document continues to require support for the KDF3 key derivation function, but it requires support for SHA-256 [SHS] as the hash function.

RFC 5990は、KDF3キー派生関数[ANS-X9.44]のサポートが必要です。このドキュメントでは、KDF3キー派生関数のサポートが引き続き必要ですが、ハッシュ関数としてSHA-256 [SHS]のサポートが必要です。

RFC 5990 recommended support for alternatives to KDF3 and AES-Wrap-128; this document simply states that other key derivation functions and other key-encryption algorithms MAY be supported.

RFC 5990 KDF3およびAES-Rap-128の代替案の推奨サポート。このドキュメントは、他のキー派生関数や他のキー暗号化アルゴリズムがサポートされる可能性があることを単に述べています。

RFC 5990 supported the future definition of additional KEM algorithms that use RSA; this document supports only one, and it is identified by the id-kem-rsa object identifier.

RFC 5990は、RSAを使用する追加のKEMアルゴリズムの将来の定義をサポートしました。このドキュメントは1つだけをサポートし、ID-KEM-RSAオブジェクト識別子によって識別されます。

RFC 5990 included an ASN.1 module; this document provides an alternative ASN.1 module that follows the conventions established in [RFC5911], [RFC5912], and [RFC6268]. The new ASN.1 module (Appendix B.2) produces the same bits-on-the-wire as the one in RFC 5990.

RFC 5990にはASN.1モジュールが含まれていました。このドキュメントは、[RFC5911]、[RFC5912]、および[RFC6268]で確立された規則に従う代替ASN.1モジュールを提供します。新しいASN.1モジュール(付録B.2)は、RFC 5990のものと同じビットワイヤーを生成します。

2. Use of the RSA-KEM Algorithm in CMS
2. CMSでのRSA-KEMアルゴリズムの使用

The RSA-KEM algorithm MAY be employed for one or more recipients in the CMS enveloped-data content type [RFC5652], the CMS authenticated-data content type [RFC5652], or the CMS authenticated-enveloped-data content type [RFC5083]. In each case, the KEMRecipientInfo [RFC9629] is used with the RSA-KEM algorithm to securely transfer the content-encryption key from the originator to the recipient.

RSA-KEMアルゴリズムは、CMSエンベロープDATAコンテンツタイプ[RFC5652]、CMS認証型DATAコンテンツタイプ[RFC5652]、またはCMS認証装置型DATAコンテンツタイプ[RFC5083]の1人以上の受信者に使用できます。いずれの場合も、KemrecipientInfo [RFC9629]をRSA-KEMアルゴリズムとともに使用して、コンテンツ暗号化キーをオリジネーターから受信者に安全に転送します。

2.1. Mandatory To Implement
2.1. 実装するのに必須

A CMS implementation that supports the RSA-KEM algorithm MUST support at least the following underlying components:

RSA-KEMアルゴリズムをサポートするCMS実装では、少なくとも次の基礎コンポーネントをサポートする必要があります。

* For the key derivation function, an implementation MUST support KDF3 [ANS-X9.44] with SHA-256 [SHS].

* キー導出関数の場合、実装はSHA-256 [SHS]を使用してKDF3 [ANS-X9.44]をサポートする必要があります。

* For key-wrapping, an implementation MUST support the AES-Wrap-128 [RFC3394] key-encryption algorithm.

* キーワラップの場合、実装はAES-Rap-128 [RFC3394]キー暗号化アルゴリズムをサポートする必要があります。

An implementation MAY also support other key derivation functions and other key-encryption algorithms.

実装は、他のキー派生関数や他のキー暗号化アルゴリズムをサポートする場合があります。

2.2. RecipientInfo Conventions
2.2. ReciontientInfoコンベンション

When the RSA-KEM algorithm is employed for a recipient, the RecipientInfo alternative for that recipient MUST be OtherRecipientInfo using the KEMRecipientInfo structure [RFC9629]. The fields of the KEMRecipientInfo MUST have the following values:

RSA-KEMアルゴリズムが受信者に採用されている場合、その受信者のレシピエントインフォの代替品は、KemrecipientInfo構造[RFC9629]を使用して他のRecipientInfoでなければなりません。Kemrecipientinfoのフィールドには、次の値が必要です。

* version is the syntax version number; it MUST be 0.

* バージョンは構文バージョン番号です。0でなければなりません。

* rid identifies the recipient's certificate or public key.

* RIDは、受信者の証明書または公開キーを識別します。

* kem identifies the KEM algorithm; it MUST contain id-kem-rsa.

* KEMはKEMアルゴリズムを識別します。ID-KEM-RSAを含める必要があります。

* kemct is the ciphertext produced for this recipient; it contains C from steps 1 and 2 of Originator's Operations in Appendix A.

* Kemctは、この受信者向けに作成された暗号文です。付録Aのオリジネーターの操作の手順1と2のCが含まれています。

* kdf identifies the key derivation function (KDF). Note that the KDF used for CMS RecipientInfo process MAY be different than the KDF used within the RSA-KEM algorithm.

* KDFは、キー派生関数(KDF)を識別します。CMS RecipientINFOプロセスに使用されるKDFは、RSA-KEMアルゴリズム内で使用されるKDFとは異なる場合があることに注意してください。

* kekLength is the size of the key-encryption key in octets.

* keklengthは、オクテットのキー暗号化キーのサイズです。

* ukm is an optional random input to the key derivation function.

* UKMは、キー導出関数へのオプションのランダム入力です。

* wrap identifies a key-encryption algorithm used to encrypt the keying material.

* wrapは、キーイング材料の暗号化に使用されるキー暗号化アルゴリズムを識別します。

* encryptedKey is the result of encrypting the keying material with the key-encryption key. When used with the CMS enveloped-data content type [RFC5652], the keying material is a content-encryption key. When used with the CMS authenticated-data content type [RFC5652], the keying material is a message-authentication key. When used with the CMS authenticated-enveloped-data content type [RFC5083], the keying material is a content-authenticated-encryption key (CAEK).

* 暗号化されたキーは、キーインクリクトキーを使用してキーイング素材を暗号化した結果です。CMSエンベロープDATAコンテンツタイプ[RFC5652]で使用する場合、キーイング材料はコンテンツ暗号化キーです。CMS認証データコンテンツタイプ[RFC5652]で使用する場合、キーイング素材はメッセージ認証キーです。CMS認証エンベロープDATAコンテンツタイプ[RFC5083]で使用すると、キーイング材料はコンテンツを認識した暗号化キー(CAEK)です。

NOTE: For backward compatibility, implementations MAY also support the RSA-KEM Key Transport algorithm, identified by id-rsa-kem-spki, which uses KeyTransRecipientInfo as specified in [RFC5990].

注:後方互換性のために、実装は、[RFC5990]で指定されているKeyTransrecipientInfoを使用するID-RSA-KEM-SPKIによって識別されるRSA-KEMキートランスポートアルゴリズムをサポートする場合があります。

2.3. Certificate Conventions
2.3. 証明書の規則

The conventions specified in this section augment RFC 5280 [RFC5280].

このセクションで指定された規則は、RFC 5280 [RFC5280]を強化します。

A recipient who employs the RSA-KEM algorithm MAY identify the public key in a certificate by the same AlgorithmIdentifier as for PKCS #1 v1.5, that is, using the rsaEncryption object identifier [RFC8017]. The fact that the recipient will accept the RSA-KEM algorithm with this public key is not indicated by the use of this object identifier. The willingness to accept the RSA-KEM algorithm MAY be signaled by the use of the SMIMECapabilities Attribute as specified in Section 2.5.2 of [RFC8551] or the SMIMECapabilities certificate extension as specified in [RFC4262].

RSA-KEMアルゴリズムを採用している受信者は、PKCS#1 V1.5と同じアルゴリズムIdentidifierの証明書の公開鍵を識別することができます。受信者がこの公開キーでRSA-KEMアルゴリズムを受け入れるという事実は、このオブジェクト識別子の使用によっては示されません。RSA-KEMアルゴリズムを受け入れる意欲は、[RFC8551]のセクション2.5.2または[RFC4262]で指定されているSmimeCapabilities証明書延長拡張を使用することにより、[RFC4262]で指定されているSmimeCapability属性の使用によって信号を受けることができます。

If the recipient wishes only to employ the RSA-KEM algorithm with a given public key, the recipient MUST identify the public key in the certificate using the id-rsa-kem-spki object identifier; see Appendix B. The use of the id-rsa-kem-spki object identifier allows certificates that were issued to be compatible with the RSA-KEM Key Transport algorithm to also be used with this specification. When the id-rsa-kem-spki object identifier appears in the SubjectPublicKeyInfo algorithm field of the certificate, the parameters field from AlgorithmIdentifier SHOULD be absent. That is, the AlgorithmIdentifier SHOULD be a SEQUENCE of one component, the id-rsa-kem-spki object identifier. With absent parameters, the KDF3 key derivation function [ANS-X9.44] with SHA-256 [SHS] are used to derive the shared secret.

受信者が特定の公開キーを使用してRSA-KEMアルゴリズムを使用することのみを希望する場合、受信者はID-RSA-KEM-SPKIオブジェクト識別子を使用して証明書の公開キーを識別する必要があります。付録Bを参照してください。ID-RSA-KEM-SPKIオブジェクト識別子の使用により、RSA-KEMキートランスポートアルゴリズムと互換性があることが発行された証明書も、この仕様に使用することを許可します。ID-RSA-KEM-SPKIオブジェクト識別子が証明書の件名PublicKeyInfoアルゴリズムフィールドに表示される場合、AlgorithMidentifierのパラメーターフィールドが存在しないはずです。つまり、Algorithmidentifierは、1つのコンポーネントのシーケンスであるID-RSA-KEM-SPKIオブジェクト識別子である必要があります。パラメーターがない場合、SHA-256 [SHS]を使用したKDF3キー導出関数[ANS-X9.44]を使用して共有秘密を導き出します。

When the AlgorithmIdentifier parameters are present, the GenericHybridParameters MUST be used. Within the kem element, the algorithm identifier MUST be set to id-kem-rsa, and RsaKemParameters MUST be included. As described in Section 2.4, the GenericHybridParameters constrain the values that can be used with the RSA public key for the kdf, kekLength, and wrap fields of the KEMRecipientInfo structure.

Algorithmidentifierパラメーターが存在する場合、GenerichybridParametersを使用する必要があります。KEM要素内では、アルゴリズム識別子をID-KEM-RSAに設定する必要があり、RsakemParametersを含める必要があります。セクション2.4で説明されているように、GenerichybridParametersは、KemrecipientInfo構造のKDF、Keklength、およびWrapフィールドのRSA公開鍵で使用できる値を制約します。

Regardless of the AlgorithmIdentifier used, the RSA public key MUST be carried in the subjectPublicKey BIT STRING within the SubjectPublicKeyInfo field of the certificate using the RSAPublicKey type defined in [RFC8017].

使用されるアルゴリズムのIdentifierに関係なく、RSAの公開キーは、[RFC8017]で定義されたRSAPublicKeyタイプを使用して、証明書の件名PublicKeyInfoフィールド内の件名PublicKeyビット文字列に携帯する必要があります。

The intended application for the public key MAY be indicated in the key usage certificate extension as specified in Section 4.2.1.3 of [RFC5280]. If the keyUsage extension is present in a certificate that conveys an RSA public key with the id-rsa-kem-spki object identifier as discussed above, then the key usage extension MUST contain only the following value:

[RFC5280]のセクション4.2.1.3で指定されているように、公開キーの意図したアプリケーションは、キー使用証明書延長に示される場合があります。KeyUSAGE拡張機能が、上記のID-RSA-KEM-SPKIオブジェクト識別子を使用してRSAの公開キーを伝える証明書に存在する場合、キーの使用拡張機能には次の値のみを含める必要があります。

keyEncipherment

KeyEncipherment

Other keyUsage extension values MUST NOT be present. That is, a public key intended to be employed only with the RSA-KEM algorithm MUST NOT also be employed for data encryption or for digital signatures. Good cryptographic practice employs a given RSA key pair in only one scheme. This practice avoids the risk that vulnerability in one scheme may compromise the security of the other and may be essential to maintain provable security.

他のキーセージ拡張値が存在してはなりません。つまり、RSA-KEMアルゴリズムでのみ採用されることを目的とした公開キーは、データ暗号化やデジタル署名にも使用してはなりません。優れた暗号化の実践は、1つのスキームでのみ特定のRSAキーペアを採用しています。このプラクティスは、あるスキームの脆弱性が他のスキームのセキュリティを損なう可能性があり、証明可能なセキュリティを維持するために不可欠である可能性があるというリスクを回避します。

2.4. SMIMECapabilities Attribute Conventions
2.4. SmimeCapabilities属性の規則

Section 2.5.2 of [RFC8551] defines the SMIMECapabilities attribute to announce a partial list of algorithms that an S/MIME implementation can support. When constructing a CMS signed-data content type [RFC5652], a compliant implementation MAY include the SMIMECapabilities attribute that announces support for the RSA-KEM algorithm.

[RFC8551]のセクション2.5.2では、SmimeCapabilities属性を定義して、S/MIMEの実装がサポートできるアルゴリズムの部分的なリストを発表します。CMS署名されたDATAコンテンツタイプ[RFC5652]を構築する場合、準拠した実装には、RSA-KEMアルゴリズムのサポートを発表するSmimeCapabilities属性が含まれる場合があります。

The SMIMECapability SEQUENCE representing the RSA-KEM algorithm MUST include the id-rsa-kem-spki object identifier in the capabilityID field; see Appendix B for the object identifier value and Appendix C for examples. When the id-rsa-kem-spki object identifier appears in the capabilityID field and the parameters are present, then the parameters field MUST use the GenericHybridParameters type.

RSA-KEMアルゴリズムを表すSmimeCapabilityシーケンスには、機能IDフィールドにID-RSA-KEM-SPKIオブジェクト識別子を含める必要があります。オブジェクト識別子値については、例については付録Cについては付録Bを参照してください。ID-RSA-KEM-SPKIオブジェクト識別子が機能フィールドに表示され、パラメーターが存在する場合、パラメータフィールドはGenerichyBridParametersタイプを使用する必要があります。

     GenericHybridParameters ::= SEQUENCE {
       kem  KeyEncapsulationMechanism,
       dem  DataEncapsulationMechanism }
        

The fields of the GenericHybridParameters type have the following meanings:

GenerichybridParametersタイプのフィールドには、次の意味があります。

* kem is an AlgorithmIdentifer. The algorithm field MUST be set to id-kem-rsa, and the parameters field MUST be RsaKemParameters, which is a SEQUENCE of an AlgorithmIdentifier that identifies the supported key derivation function and a positive INTEGER that identifies the length of the key-encryption key in octets.

* KemはAlgorithmidentiferです。アルゴリズムフィールドはID-KEM-RSAに設定する必要があり、パラメーターフィールドはrsakemparametersでなければなりません。これは、サポートされているキー誘導関数を識別するアルゴリズム誘導体のシーケンスであり、キー暗号化キーの長さを識別する正の整数である必要があります。オクテット。

* dem is an AlgorithmIdentifier. The algorithm field MUST be present, and it identifies the key-encryption algorithm. The parameters are optional. If the GenericHybridParameters are present, then the provided dem value MUST be used in the wrap field of KEMRecipientInfo.

* DEMはアルゴリズムIdentidifierです。アルゴリズムフィールドが存在する必要があり、キー暗号化アルゴリズムを識別します。パラメーターはオプションです。GenerichyBridParametersが存在する場合、提供されたDEM値はKemrecipientInfoのラップフィールドで使用する必要があります。

If the GenericHybridParameters are present, then the provided kem value MUST be used as the key derivation function in the kdf field of KEMRecipientInfo and the provided key length MUST be used in the kekLength of KEMRecipientInfo.

GenerichyBridParametersが存在する場合、提供されたKEM値をKemrecipientInfoのKDFフィールドのキー導入関数として使用する必要があり、提供されたキー長はKemrecipientInfoのkeklengentで使用する必要があります。

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

The RSA-KEM algorithm should be considered as a replacement for the key transport portion of the widely implemented PKCS #1 v1.5 [RFC8017] for new applications that use CMS to avoid potential vulnerabilities to chosen-ciphertext attacks and gain a tighter security proof. However, the RSA-KEM algorithm has the disadvantage of slightly longer encrypted keying material. With PKCS #1 v1.5, the originator encrypts the key-encryption key directly with the recipient's RSA public key. With the RSA-KEM algorithm, the key-encryption key is encrypted separately.

RSA-KEMアルゴリズムは、CMSを使用する新しいアプリケーションの広く実装されているPKCS#1 v1.5 [RFC8017]の主要な輸送部分の代替品と見なされるべきです。。ただし、RSA-KEMアルゴリズムには、暗号化されたキーイング素材がわずかに長くなるという欠点があります。PKCS#1 V1.5を使用すると、オリジネーターは、受信者のRSA公開キーでキー暗号化キーを直接暗号化します。RSA-KEMアルゴリズムを使用すると、キー暗号化キーが個別に暗号化されます。

The security of the RSA-KEM algorithm can be shown to be tightly related to the difficulty of either solving the RSA problem or breaking the underlying symmetric key-encryption algorithm if the underlying key derivation function is modeled as a random oracle, assuming that the symmetric key-encryption algorithm satisfies the properties of a data encapsulation mechanism [SHOUP]. While in practice a random-oracle result does not provide an actual security proof for any particular key derivation function, the result does provide assurance that the general construction is reasonable; a key derivation function would need to be particularly weak to lead to an attack that is not possible in the random-oracle model.

RSA-KEMアルゴリズムのセキュリティは、RSA問題を解決するか、基礎となる対称キー暗号化アルゴリズムを破壊することの難しさに密接に関連していることが示されます。Key-Incryptionアルゴリズムは、データカプセル化メカニズム[Shoup]のプロパティを満たします。実際には、ランダムオラクルの結果は特定のキー派生関数の実際のセキュリティ証明を提供しませんが、結果は一般的な構造が合理的であるという保証を提供します。主要な派生関数は、ランダムオラクルモデルでは不可能な攻撃につながるために特に弱い必要があります。

The RSA key size and the underlying components need to be selected consistent with the desired security level. Several security levels have been identified in the NIST SP 800-57 Part 1 [NISTSP800-57pt1r5]. For example, one way to achieve 128-bit security, the RSA key size would be at least 3072 bits, the key derivation function would be SHA-256, and the symmetric key-encryption algorithm would be AES Key Wrap with a 128-bit key.

RSAキーサイズと基礎となるコンポーネントは、目的のセキュリティレベルと一致して選択する必要があります。NIST SP 800-57パート1 [NISSSP800-57PT1R5]でいくつかのセキュリティレベルが特定されています。たとえば、128ビットのセキュリティを実現する1つの方法であるRSAキーサイズは、少なくとも3072ビット、キー導入関数はSHA-256であり、対称的なキー暗号化アルゴリズムは128ビットでAESキーラップになります。鍵。

Implementations MUST protect the RSA private key, the key-encryption key, the content-encryption key, message-authentication key, and the content-authenticated-encryption key. Disclosure of the RSA private key could result in the compromise of all messages protected with that key. Disclosure of the key-encryption key, the content-encryption key, or the content-authenticated-encryption key could result in compromise of the associated encrypted content. Disclosure of the key-encryption key, the message-authentication key, or the content-authenticated-encryption key could allow modification of the associated authenticated content.

実装は、RSAの秘密鍵、キー暗号化キー、コンテンツ暗号化キー、メッセージ認証キー、およびコンテンツ認証の暗号化キーを保護する必要があります。RSAの秘密鍵の開示は、そのキーで保護されているすべてのメッセージの妥協をもたらす可能性があります。キー暗号化キー、コンテンツ暗号化キー、またはコンテンツの認識誘発キーの開示により、関連する暗号化されたコンテンツが妥協する可能性があります。キー暗号化キー、メッセージ認証キー、またはコンテンツ因果関係キーの開示により、関連する認証されたコンテンツの変更が可能になります。

Additional considerations related to key management may be found in [NISTSP800-57pt1r5].

主要な管理に関連する追加の考慮事項は、[nistsp800-57pt1r5]に記載されている場合があります。

The security of the RSA-KEM algorithm depends on a quality random number generator. For further discussion on random number generation, see [RFC4086].

RSA-KEMアルゴリズムのセキュリティは、品質乱数ジェネレーターに依存します。乱数生成に関する詳細については、[RFC4086]を参照してください。

The RSA-KEM algorithm does not use an explicit padding scheme. Instead, an encoded random value (z) between zero and the RSA modulus minus one (n-1) is directly encrypted with the recipient's RSA public key. The IntegerToString(z, nLen) encoding produces a string that is the full length of the RSA modulus. In addition, the random value is passed through a KDF to reduce possible harm from a poorly implemented random number source or a maliciously chosen random value (z). Implementations MUST NOT use z directly for any purpose.

RSA-KEMアルゴリズムは、明示的なパディングスキームを使用しません。代わりに、ゼロとRSAモジュラスマイナス1(n-1)の間のエンコードされたランダム値(z)は、受信者のRSA公開キーで直接暗号化されます。IntegertString(Z、NLEN)エンコードは、RSAモジュラスの全長である文字列を生成します。さらに、ランダム値はKDFを通過して、実装されていない乱数ソースまたは悪意のあるランダム値(z)からの害の可能性を軽減します。実装は、いかなる目的でもZを直接使用してはなりません。

As long as a fresh random integer z is chosen as part of each invocation of the Encapsulate() function, the RSA-KEM algorithm does not degrade as the number of ciphertexts increases. Since RSA encryption provides a bijective map, a collision in the KDF is the only way that the RSA-KEM algorithm can produce more than one ciphertext that encapsulates the same shared secret.

capsulate()関数の各呼び出しの一部として新鮮なランダム整数zが選択されている限り、rsa-kemアルゴリズムは、ciphertextsの数が増えるにつれて劣化しません。RSA暗号化は生物観察マップを提供するため、KDFでの衝突は、RSA-KEMアルゴリズムが同じ共有秘密をカプセル化する複数の暗号文を生成できる唯一の方法です。

The RSA-KEM algorithm provides a fixed-length ciphertext. The recipient MUST check that the received byte string is the expected length and the length corresponds to an integer in the expected range prior to attempting decryption with their RSA private key as described in Steps 1 and 2 of Appendix A.2.

RSA-KEMアルゴリズムは、固定長さの暗号文を提供します。受信者は、受信したバイト文字列が予想される長さであり、付録A.2のステップ1および2で説明されているRSA秘密キーで復号化を試みる前に、予想範囲の整数に長さが対応することを確認する必要があります。

Implementations SHOULD NOT reveal information about intermediate values or calculations, whether by timing or other "side channels"; otherwise, an opponent may be able to determine information about the keying data and/or the recipient's private key. Although not all intermediate information may be useful to an opponent, it is preferable to conceal as much information as is practical, unless analysis specifically indicates that the information would not be useful to an opponent.

実装は、タイミングまたは他の「サイドチャネル」であろうと、中間値や計算に関する情報を明らかにしないでください。それ以外の場合、対戦相手は、キーイングデータおよび/または受信者の秘密鍵に関する情報を決定できる場合があります。すべての中間情報が対戦相手に役立つとは限りませんが、分析が情報が対戦相手に役立たないことを明確に示していない限り、実用的な限り多くの情報を隠すことが望ましいです。

Generally, good cryptographic practice employs a given RSA key pair in only one scheme. This practice avoids the risk that vulnerability in one scheme may compromise the security of the other, and may be essential to maintain provable security. RSA public keys have often been employed for multiple purposes such as key transport and digital signature without any known bad interactions; however, such combined use of an RSA key pair is NOT RECOMMENDED in the future (unless the different schemes are specifically designed to be used together).

一般的に、優れた暗号化の実践は、1つのスキームのみで特定のRSAキーペアを採用しています。このプラクティスは、あるスキームの脆弱性が他のスキームのセキュリティを損なう可能性があるというリスクを回避し、証明可能なセキュリティを維持するために不可欠である可能性があります。RSAのパブリックキーは、既知の悪い相互作用なしに、主要な輸送やデジタル署名などの複数の目的で採用されていることがよくあります。ただし、RSAキーペアのこのような使用は、将来的には推奨されません(異なるスキームが一緒に使用するように特別に設計されていない限り)。

Accordingly, an RSA key pair used for the RSA-KEM algorithm SHOULD NOT also be used for digital signatures. Indeed, the Accredited Standards Committee X9 (ASC X9) requires such a separation between key pairs used for key establishment and key pairs used for digital signature [ANS-X9.44]. Continuing this principle of key separation, a key pair used for the RSA-KEM algorithm SHOULD NOT be used with other key establishment schemes, or for data encryption, or with more than one set of underlying algorithm components.

したがって、RSA-KEMアルゴリズムに使用されるRSAキーペアは、デジタル署名にも使用しないでください。実際、認定された標準委員会X9(ASC X9)は、主要な設立に使用される重要なペアとデジタル署名に使用される主要ペア[ANS-X9.44]の間のこのような分離を必要とします。この重要な分離の原則を継続すると、RSA-KEMアルゴリズムに使用される重要なペアは、他の重要な確立スキーム、データ暗号化、または基礎となるアルゴリズムコンポーネントの複数のセットで使用しないでください。

It is acceptable to use the same RSA key pair for the RSA-KEM Key Transport algorithm as specified in [RFC5990] and this specification. This is acceptable because the operations involving the RSA public key and the RSA private key are identical in the two specifications.

[RFC5990]およびこの仕様で指定されているRSA-KEMキートランスポートアルゴリズムに、同じRSAキーペアを使用することは許容できます。これは、RSAの公開キーとRSA秘密キーが関与する操作が2つの仕様で同一であるため、許容されます。

Parties can gain assurance that implementations are correct through formal implementation validation, such as the NIST Cryptographic Module Validation Program (CMVP) [CMVP].

当事者は、NIST暗号化モジュール検証プログラム(CMVP)[CMVP]などの正式な実装検証を通じて実装が正しいという保証を取得できます。

4. IANA Considerations
4. IANAの考慮事項

For the ASN.1 Module in Appendix B.2, IANA has assigned an object identifier (OID) for the module identifier. The OID for the module has been allocated in the "SMI Security for S/MIME Module Identifier" registry (1.2.840.113549.1.9.16.0), and the Description for the new OID has been set to "id-mod-cms-rsa-kem-2023".

付録B.2のASN.1モジュールの場合、IANAはモジュール識別子にオブジェクト識別子(OID)を割り当てました。モジュールのOIDは、「S/MIMEモジュール識別子のSMIセキュリティ」レジストリ(1.2.840.113549.1.9.16.0)に割り当てられており、新しいOIDの説明は「ID-Mod-CMS-RSAに設定されています。-KEM-2023 "。

IANA has updated the id-alg-rsa-kem entry in the "SMI Security for S/ MIME Algorithms (1.2.840.113549.1.9.16.3)" repository to refer to this document. In addition, IANA has added the following note to the registry:

IANAは、「S/ MIMEアルゴリズムのSMIセキュリティ(1.2.840.113549.1.9)」のID-Alg-RSA-KEMエントリを更新しました。このドキュメントを参照するリポジトリ。さらに、IANAは次のメモをレジストリに追加しました。

Value 14, "id-alg-rsa-kem," is also referred to as "id-rsa-kem-spki."

値14、「ID-Alg-RSA-KEM」は「ID-RSA-KEM-SPKI」とも呼ばれます。

5. References
5. 参考文献
5.1. Normative References
5.1. 引用文献
   [ANS-X9.44]
              American National Standards Institute, "Public Key
              Cryptography for the Financial Services Industry -- Key
              Establishment Using Integer Factorization Cryptography",
              ANSI X9.44-2007 (R2017), 2007,
              <https://webstore.ansi.org/standards/ascx9/
              ansix9442007r2017>.
        
   [ISO18033-2]
              ISO/IEC, "Information technology -- Security techniques --
              Encryption algorithms -- Part 2: Asymmetric ciphers", ISO/
              IEC 18033-2:2006, 2006,
              <https://www.iso.org/standard/37971.html>.
        
   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.
        
   [RFC3394]  Schaad, J. and R. Housley, "Advanced Encryption Standard
              (AES) Key Wrap Algorithm", RFC 3394, DOI 10.17487/RFC3394,
              September 2002, <https://www.rfc-editor.org/info/rfc3394>.
        
   [RFC5083]  Housley, R., "Cryptographic Message Syntax (CMS)
              Authenticated-Enveloped-Data Content Type", RFC 5083,
              DOI 10.17487/RFC5083, November 2007,
              <https://www.rfc-editor.org/info/rfc5083>.
        
   [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,
              <https://www.rfc-editor.org/info/rfc5280>.
        
   [RFC5652]  Housley, R., "Cryptographic Message Syntax (CMS)", STD 70,
              RFC 5652, DOI 10.17487/RFC5652, September 2009,
              <https://www.rfc-editor.org/info/rfc5652>.
        
   [RFC5911]  Hoffman, P. and J. Schaad, "New ASN.1 Modules for
              Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911,
              DOI 10.17487/RFC5911, June 2010,
              <https://www.rfc-editor.org/info/rfc5911>.
        
   [RFC5912]  Hoffman, P. and J. Schaad, "New ASN.1 Modules for the
              Public Key Infrastructure Using X.509 (PKIX)", RFC 5912,
              DOI 10.17487/RFC5912, June 2010,
              <https://www.rfc-editor.org/info/rfc5912>.
        
   [RFC6268]  Schaad, J. and S. Turner, "Additional New ASN.1 Modules
              for the Cryptographic Message Syntax (CMS) and the Public
              Key Infrastructure Using X.509 (PKIX)", RFC 6268,
              DOI 10.17487/RFC6268, July 2011,
              <https://www.rfc-editor.org/info/rfc6268>.
        
   [RFC8017]  Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch,
              "PKCS #1: RSA Cryptography Specifications Version 2.2",
              RFC 8017, DOI 10.17487/RFC8017, November 2016,
              <https://www.rfc-editor.org/info/rfc8017>.
        
   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.
        
   [RFC8551]  Schaad, J., Ramsdell, B., and S. Turner, "Secure/
              Multipurpose Internet Mail Extensions (S/MIME) Version 4.0
              Message Specification", RFC 8551, DOI 10.17487/RFC8551,
              April 2019, <https://www.rfc-editor.org/info/rfc8551>.
        
   [RFC9629]  Housley, R., Gray, J., and T. Okubo, "Using Key
              Encapsulation Mechanism (KEM) Algorithms in the
              Cryptographic Message Syntax (CMS)", RFC 9629,
              DOI 10.17487/RFC9629, August 2024,
              <https://www.rfc-editor.org/info/rfc9629>.
        
   [SHS]      National Institute of Standards and Technology, "Secure
              Hash Standard", NIST FIPS PUB 180-4,
              DOI 10.6028/NIST.FIPS.180-4, July 2015,
              <https://doi.org/10.6028/NIST.FIPS.180-4>.
        
   [X.680]    ITU-T, "Information technology - Abstract Syntax Notation
              One (ASN.1): Specification of basic notation", ITU-T
              Recommendation X.680, ISO/IEC 8824-1:2021, February 2021,
              <https://www.itu.int/rec/T-REC-X.680>.
        
   [X.690]    ITU-T, "Information technology - ASN.1 encoding rules:
              Specification of Basic Encoding Rules (BER), Canonical
              Encoding Rules (CER) and Distinguished Encoding Rules
              (DER)", ITU-T Recommendation X.690, ISO/IEC 8825-1:2021,
              February 2021, <https://www.itu.int/rec/T-REC-X.690>.
        
5.2. Informative References
5.2. 参考引用
   [CMVP]     National Institute of Standards and Technology,
              "Cryptographic Module Validation Program", 2016,
              <https://csrc.nist.gov/projects/cryptographic-module-
              validation-program>.
        
   [NISTSP800-57pt1r5]
              Barker, E., "Recommendation for Key Management: Part 1 -
              General", NIST SP 800-57, Part 1, Revision 5,
              DOI 10.6028/nist.sp.800-57pt1r5, May 2020,
              <https://doi.org/10.6028/nist.sp.800-57pt1r5>.
        
   [RFC4086]  Eastlake 3rd, D., Schiller, J., and S. Crocker,
              "Randomness Requirements for Security", BCP 106, RFC 4086,
              DOI 10.17487/RFC4086, June 2005,
              <https://www.rfc-editor.org/info/rfc4086>.
        
   [RFC4262]  Santesson, S., "X.509 Certificate Extension for Secure/
              Multipurpose Internet Mail Extensions (S/MIME)
              Capabilities", RFC 4262, DOI 10.17487/RFC4262, December
              2005, <https://www.rfc-editor.org/info/rfc4262>.
        
   [RFC5990]  Randall, J., Kaliski, B., Brainard, J., and S. Turner,
              "Use of the RSA-KEM Key Transport Algorithm in the
              Cryptographic Message Syntax (CMS)", RFC 5990,
              DOI 10.17487/RFC5990, September 2010,
              <https://www.rfc-editor.org/info/rfc5990>.
        
   [RFC6194]  Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security
              Considerations for the SHA-0 and SHA-1 Message-Digest
              Algorithms", RFC 6194, DOI 10.17487/RFC6194, March 2011,
              <https://www.rfc-editor.org/info/rfc6194>.
        
   [SHOUP]    Shoup, V., "A Proposal for an ISO Standard for Public Key
              Encryption", Cryptology ePrint Archive Paper 2001/112,
              2001, <https://eprint.iacr.org/2001/112>.
        
Appendix A. RSA-KEM Algorithm
付録A. RSA-KEMアルゴリズム

The RSA-KEM algorithm is a one-pass (store-and-forward) cryptographic mechanism for an originator to securely send keying material to a recipient using the recipient's RSA public key.

RSA-KEMアルゴリズムは、受信者のRSA公開キーを使用して受信者にキーイン素材を安全に送信するためのワンパス(ストアアンドフォワード)暗号化メカニズムです。

With the RSA-KEM algorithm, an originator encrypts a random integer (z) with the recipient's RSA public key to produce a ciphertext (ct), and the originator derives a shared secret (SS) from the random integer (z). The originator then sends the ciphertext (ct) to the recipient. The recipient decrypts the ciphertext (ct) using their private key to recover the random integer (z), and the recipient derives a shared secret (SS) from the random integer (z). In this way, the originator and recipient obtain the same shared secret (SS).

RSA-KEMアルゴリズムを使用すると、オリジネーターはレシピエントのRSA公開キーとランダム整数(z)を暗号化して暗号文(CT)を作成し、オリジネーターはランダム整数(Z)から共有秘密(SS)を導き出します。オリジネーターは、ciphertext(CT)を受信者に送信します。受信者は、秘密鍵を使用して暗号文(CT)を復号化してランダム整数(z)を回復し、受信者はランダム整数(z)から共有秘密(SS)を導き出します。このようにして、創始者と受信者は同じ共有秘密(SS)を取得します。

The RSA-KEM algorithm depends on a key derivation function (KDF), which is used to derive the shared secret (SS). Many key derivation functions support the inclusion of other information in addition to the shared secret (SS) in the input to the function; however, no other information is included as an input to the KDF by the RSA-KEM algorithm.

RSA-KEMアルゴリズムは、共有秘密(SS)を導出するために使用されるキー導出関数(KDF)に依存します。多くの重要な派生関数は、関数への入力に共有された秘密(SS)に加えて、他の情報を含めることをサポートしています。ただし、RSA-KEMアルゴリズムによるKDFへの入力として他の情報は含まれていません。

A.1. Originator's Operations: RSA-KEM Encapsulate()
A.1. オリジネーターの操作:rsa-kem cankapsulate()

Let (n,e) be the recipient's RSA public key; see [RFC8017] for details.

(n、e)を受信者のRSA公開キーとします。詳細については、[RFC8017]を参照してください。

Let nLen denote the length in bytes of the modulus n, i.e., the least integer such that 2^(8*nLen) > n.

nlenは、弾性nのバイトの長さ、つまり2^(8*nlen)> nのような最小整数を示します。

The originator performs the following operations:

オリジネーターは次の操作を実行します。

1. Generate a random integer z between 0 and n-1 (see NOTE below), and convert z to a byte string Z of length nLen, most significant byte first:

1. 0からn-1の間のランダム整数zを生成し(以下の注を参照)、zを長さnlenのバイト文字列zに変換します。

        z = RandomInteger (0, n-1)

        Z = IntegerToString (z, nLen)
        

2. Encrypt the random integer z using the recipient's RSA public key (n,e) and convert the resulting integer c to a ciphertext C, a byte string of length nLen:

2. 受信者のRSA公開キー(n、e)を使用してランダム整数zを暗号化し、結果の整数Cをnlenのバイト文字列である暗号文Cに変換します。

        c = z^e mod n

        ct = IntegerToString (c, nLen)
        

3. Derive a symmetric shared secret SS of length ssLen bytes (which MUST be the length of the key-encryption key) from the byte string Z using the underlying key derivation function:

3. 基礎となるキー誘導関数を使用して、バイト文字列zから長さのsslenバイト(キー暗号化キーの長さである必要があります)の対称共有秘密ssを導き出します。

        SS = KDF (Z, ssLen)
        

4. Output the shared secret SS and the ciphertext ct. Send the ciphertext ct to the recipient.

4. 共有シークレットSSと暗号文CTを出力します。ciphertext CTを受信者に送信します。

NOTE: The random integer z MUST be generated independently at random for different encryption operations, whether for the same or different recipients.

注:ランダムな整数Zは、同じまたは異なる受信者であろうと、異なる暗号化操作について、独立してランダムに生成する必要があります。

A.2. Recipient's Operations: RSA-KEM Decapsulate()
A.2. 受信者の操作:rsa-kem decapsulate()

Let (n,d) be the recipient's RSA private key; see [RFC8017] for details, but other private key formats are allowed.

(n、d)を受信者のRSA秘密鍵とします。詳細については[RFC8017]を参照してくださいが、他の秘密キー形式が許可されています。

Let ct be the ciphertext received from the originator.

CTをオリジネーターから受信した暗号文とします。

Let nLen denote the length in bytes of the modulus n.

nlenが弾性率nのバイトの長さを示します。

The recipient performs the following operations:

受信者は次の操作を実行します。

1. If the length of the encrypted keying material is less than nLen bytes, output "decryption error", and stop.

1. 暗号化されたキーイング材料の長さがNLENバイト未満の場合、「復号化誤差」を出力し、停止します。

2. Convert the ciphertext ct to an integer c, most significant byte first (see NOTE below):

2. 暗号文CTを整数Cに変換します。最初に最も重要なバイト(以下の注を参照):

        c = StringToInteger (ct)
        

If the integer c is not between 0 and n-1, output "decryption error", and stop.

整数Cが0〜N-1の間でない場合、出力「復号化誤差」を停止します。

3. Decrypt the integer c using the recipient's private key (n,d) to recover an integer z (see NOTE below):

3. 受信者の秘密鍵(n、d)を使用して整数Cを復号化して、整数zを回復します(以下の注を参照):

        z = c^d mod n
        

4. Convert the integer z to a byte string Z of length nLen, most significant byte first (see NOTE below):

4. 整数zを長さnlenのバイト文字列zに変換します。最初に最も重要なバイト(以下の注を参照):

        Z = IntegerToString (z, nLen)
        

5. Derive a shared secret SS of length ssLen bytes from the byte string Z using the key derivation function (see NOTE below):

5. キー派生関数を使用して、バイト文字列zから長さのsslenバイトの共有秘密のssを導き出します(以下の注を参照):

        SS = KDF (Z, ssLen)
        

6. Output the shared secret SS.

6. 共有秘密のssを出力します。

NOTE: Implementations SHOULD NOT reveal information about the integer z, the string Z, or about the calculation of the exponentiation in Step 2, the conversion in Step 3, or the key derivation in Step 4, whether by timing or other "side channels". The observable behavior of the implementation SHOULD be the same at these steps for all ciphertexts C that are in range. For example, IntegerToString conversion should take the same amount of time regardless of the actual value of the integer z. The integer z, the string Z, and other intermediate results MUST be securely deleted when they are no longer needed.

注:実装は、整数Z、文字列Z、またはステップ2の指数の計算、ステップ3の変換、またはステップ4のキー導出に関する情報を明らかにしないでください。。実装の観察可能な動作は、範囲にあるすべての暗号文Cについて、これらのステップで同じでなければなりません。たとえば、Integertostringの変換は、整数zの実際の値に関係なく、同じ時間を要するはずです。整数Z、文字列Z、およびその他の中間結果は、不要になったときに安全に削除する必要があります。

Appendix B. ASN.1 Syntax
付録B. ASN.1構文

The ASN.1 syntax for identifying the RSA-KEM algorithm is an extension of the syntax for the "generic hybrid cipher" in ANS X9.44 [ANS-X9.44].

RSA-KEMアルゴリズムを識別するためのASN.1構文は、ANS X9.44 [ANS-X9.44]の「ジェネリックハイブリッド暗号」の構文の拡張です。

The ASN.1 Module is unchanged from RFC 5990. The id-rsa-kem-spki object identifier is used in a backward compatible manner in certificates [RFC5280] and SMIMECapabilities [RFC8551]. Of course, the use of the id-kem-rsa object identifier in the new KEMRecipientInfo structure [RFC9629] was not yet defined at the time that RFC 5990 was written.

ASN.1モジュールはRFC 5990から変更されていません。ID-RSA-KEM-SPKIオブジェクト識別子は、証明書[RFC5280]およびSmimeCapability [RFC8551]の後方互換方法で使用されます。もちろん、新しいKemrecipientInfo構造[RFC9629]でのID-KEM-RSAオブジェクト識別子の使用は、RFC 5990が書かれた時点ではまだ定義されていませんでした。

B.1. Underlying Components
B.1. 基礎となるコンポーネント

Implementations that conform to this specification MUST support the KDF3 [ANS-X9.44] key derivation function using SHA-256 [SHS].

この仕様に準拠する実装は、SHA-256 [SHS]を使用したKDF3 [ANS-X9.44]キー導入関数をサポートする必要があります。

KDF2 [ANS-X9.44] and KDF3 are both key derivation functions based on a hash function. The only difference between KDF2 and KDF3 is the order of the components to be hashed.

KDF2 [ANS-X9.44]とKDF3はどちらもハッシュ関数に基づいて重要な導出関数です。KDF2とKDF3の唯一の違いは、ハッシュするコンポーネントの順序です。

      KDF2 calculates T as:   T = T || Hash (Z || D || otherInfo)

      KDF3 calculates T as:   T = T || Hash (D || Z || otherInfo)
        

The object identifier for KDF3 is:

KDF3のオブジェクト識別子は次のとおりです。

      id-kdf-kdf3 OBJECT IDENTIFIER ::= { x9-44-components kdf3(2) }
        

The KDF3 parameters identify the underlying hash function. For alignment with ANS X9.44, the hash function MUST be an ASC X9-approved hash function. While the SHA-1 hash algorithm is included in the ASN.1 definitions, SHA-1 MUST NOT be used. SHA-1 is considered to be obsolete; see [RFC6194]. SHA-1 remains in the ASN.1 module for compatibility with RFC 5990. In addition, other hash functions MAY be used with CMS.

KDF3パラメーターは、基礎となるハッシュ関数を識別します。ANS x9.44とのアライメントのために、ハッシュ関数はASC X9承認のハッシュ関数でなければなりません。SHA-1ハッシュアルゴリズムはASN.1定義に含まれていますが、SHA-1を使用してはなりません。SHA-1は時代遅れであると考えられています。[RFC6194]を参照してください。SHA-1は、RFC 5990との互換性のためにASN.1モジュールのままです。さらに、CMSで他のハッシュ関数を使用できます。

      kda-kdf3 KEY-DERIVATION ::= {
         IDENTIFIER id-kdf-kdf3
         PARAMS TYPE KDF3-HashFunction ARE required
         -- No S/MIME caps defined -- }

      KDF3-HashFunction ::=
         AlgorithmIdentifier { DIGEST-ALGORITHM, {KDF3-HashFunctions} }

      KDF3-HashFunctions DIGEST-ALGORITHM ::= { X9-HashFunctions, ... }

      X9-HashFunctions DIGEST-ALGORITHM ::= {
         mda-sha1 | mda-sha224 | mda-sha256 | mda-sha384 |
         mda-sha512, ... }
        

Implementations that conform to this specification MUST support the AES Key Wrap [RFC3394] key-encryption algorithm with a 128-bit key. There are three object identifiers for the AES Key Wrap, one for each permitted size of the key-encryption key. There are three object identifiers imported from [RFC5912], and none of these algorithm identifiers have associated parameters:

この仕様に準拠する実装は、128ビットキーを使用してAESキーラップ[RFC3394]キー暗号化アルゴリズムをサポートする必要があります。AESキーラップには3つのオブジェクト識別子があり、1つはキー暗号化キーの許可されたサイズごとに1つあります。[RFC5912]からインポートされた3つのオブジェクト識別子があり、これらのアルゴリズム識別子に関連するパラメーターはありません。

      kwa-aes128-wrap KEY-WRAP ::= {
          IDENTIFIER id-aes128-wrap
          PARAMS ARE absent
          SMIME-CAPS { IDENTIFIED BY id-aes128-wrap } }

      kwa-aes192-wrap KEY-WRAP ::= {
          IDENTIFIER id-aes192-wrap
          PARAMS ARE absent
          SMIME-CAPS { IDENTIFIED BY id-aes192-wrap } }

      kwa-aes256-wrap KEY-WRAP ::= {
          IDENTIFIER id-aes256-wrap
          PARAMS ARE absent
          SMIME-CAPS { IDENTIFIED BY id-aes256-wrap } }
        
B.2. ASN.1 Module
B.2. ASN.1モジュール
   CMS-RSA-KEM-2023
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
        pkcs-9(9) smime(16) modules(0) id-mod-cms-rsa-kem-2023(79) }

      DEFINITIONS EXPLICIT TAGS ::= BEGIN

   -- EXPORTS ALL

   IMPORTS

     KEM-ALGORITHM
       FROM KEMAlgorithmInformation-2023  -- [RFC9629]
          { iso(1) identified-organization(3) dod(6) internet(1)
            security(5) mechanisms(5) pkix(7) id-mod(0)
            id-mod-kemAlgorithmInformation-2023(109) }

     AlgorithmIdentifier{}, PUBLIC-KEY, DIGEST-ALGORITHM,
     KEY-DERIVATION, KEY-WRAP, SMIME-CAPS
       FROM AlgorithmInformation-2009  -- [RFC5912]
         { iso(1) identified-organization(3) dod(6) internet(1)
           security(5) mechanisms(5) pkix(7) id-mod(0)
           id-mod-algorithmInformation-02(58) }

     kwa-aes128-wrap, kwa-aes192-wrap, kwa-aes256-wrap
       FROM CMSAesRsaesOaep-2009  -- [RFC5911]
         { iso(1) member-body(2) us(840) rsadsi(113549)
           pkcs(1) pkcs-9(9) smime(16) modules(0)
           id-mod-cms-aes-02(38) }

     kwa-3DESWrap
       FROM CryptographicMessageSyntaxAlgorithms-2009  -- [RFC5911]
         { iso(1) member-body(2) us(840) rsadsi(113549)
           pkcs(1) pkcs-9(9) smime(16) modules(0)
           id-mod-cmsalg-2001-02(37) }

     id-camellia128-wrap, id-camellia192-wrap, id-camellia256-wrap
       FROM CamelliaEncryptionAlgorithmInCMS  -- [RFC3657]
         { iso(1) member-body(2) us(840) rsadsi(113549)
           pkcs(1) pkcs9(9) smime(16) modules(0)
           id-mod-cms-camellia(23) }

     mda-sha1, pk-rsa, RSAPublicKey
       FROM PKIXAlgs-2009  -- [RFC5912]
         { iso(1) identified-organization(3) dod(6) internet(1)
           security(5) mechanisms(5) pkix(7) id-mod(0)
           id-mod-pkix1-algorithms2008-02(56) }

     mda-sha224, mda-sha256, mda-sha384, mda-sha512
       FROM PKIX1-PSS-OAEP-Algorithms-2009  -- [RFC5912]
         { iso(1) identified-organization(3) dod(6) internet(1)
           security(5) mechanisms(5) pkix(7) id-mod(0)
           id-mod-pkix1-rsa-pkalgs-02(54) } ;


   -- Useful types and definitions

   OID ::= OBJECT IDENTIFIER  -- alias

   NullParms ::= NULL

   -- ISO/IEC 18033-2 arc

   is18033-2 OID ::= { iso(1) standard(0) is18033(18033) part2(2) }

   -- NIST algorithm arc

   nistAlgorithm OID ::= { joint-iso-itu-t(2) country(16) us(840)
      organization(1) gov(101) csor(3) nistAlgorithm(4) }

   -- PKCS #1 arc

   pkcs-1 OID ::= { iso(1) member-body(2) us(840) rsadsi(113549)
      pkcs(1) pkcs-1(1) }

   -- X9.44 arc

   x9-44 OID ::= { iso(1) identified-organization(3) tc68(133)
      country(16) x9(840) x9Standards(9) x9-44(44) }

   x9-44-components OID ::= { x9-44 components(1) }

   -- RSA-KEM algorithm

   id-rsa-kem OID ::= { iso(1) member-body(2) us(840) rsadsi(113549)
      pkcs(1) pkcs-9(9) smime(16) alg(3) 14 }

   id-rsa-kem-spki OID ::= id-rsa-kem

   GenericHybridParameters ::= SEQUENCE {
      kem  KeyEncapsulationMechanism,
      dem  DataEncapsulationMechanism }

   KeyEncapsulationMechanism ::=
      AlgorithmIdentifier { KEM-ALGORITHM, {KEMAlgorithms} }

   KEMAlgorithms KEM-ALGORITHM ::= { kema-kem-rsa | kema-rsa-kem, ... }

   kema-rsa-kem KEM-ALGORITHM ::= {
      IDENTIFIER id-rsa-kem-spki
      PARAMS TYPE GenericHybridParameters ARE optional
      PUBLIC-KEYS { pk-rsa | pk-rsa-kem }
      UKM ARE optional
      SMIME-CAPS { TYPE GenericHybridParameters
         IDENTIFIED BY id-rsa-kem-spki } }

   kema-kem-rsa KEM-ALGORITHM ::= {
      IDENTIFIER id-kem-rsa
      PARAMS TYPE RsaKemParameters ARE optional
      PUBLIC-KEYS { pk-rsa | pk-rsa-kem }
      UKM ARE optional
      SMIME-CAPS { TYPE GenericHybridParameters
         IDENTIFIED BY id-rsa-kem-spki } }

   id-kem-rsa OID ::= { is18033-2 key-encapsulation-mechanism(2)
      rsa(4) }

   RsaKemParameters ::= SEQUENCE {
      keyDerivationFunction  KeyDerivationFunction,
      keyLength              KeyLength }

   pk-rsa-kem PUBLIC-KEY ::= {
     IDENTIFIER id-rsa-kem-spki
     KEY RSAPublicKey
     PARAMS TYPE GenericHybridParameters ARE preferredAbsent
     -- Private key format is not specified here --
     CERT-KEY-USAGE {keyEncipherment} }

   KeyDerivationFunction ::=
      AlgorithmIdentifier { KEY-DERIVATION, {KDFAlgorithms} }

   KDFAlgorithms KEY-DERIVATION ::= { kda-kdf2 | kda-kdf3, ... }

   KeyLength ::= INTEGER (1..MAX)

   DataEncapsulationMechanism ::=
      AlgorithmIdentifier { KEY-WRAP, {DEMAlgorithms} }

   DEMAlgorithms KEY-WRAP ::= {
      X9-SymmetricKeyWrappingSchemes |
      Camellia-KeyWrappingSchemes, ... }

   X9-SymmetricKeyWrappingSchemes KEY-WRAP ::= {
      kwa-aes128-wrap | kwa-aes192-wrap | kwa-aes256-wrap |
      kwa-3DESWrap, ... }

   X9-SymmetricKeyWrappingScheme ::=
      AlgorithmIdentifier { KEY-WRAP, {X9-SymmetricKeyWrappingSchemes} }

   Camellia-KeyWrappingSchemes KEY-WRAP ::= {
      kwa-camellia128-wrap | kwa-camellia192-wrap |
      kwa-camellia256-wrap, ... }

   Camellia-KeyWrappingScheme ::=
      AlgorithmIdentifier { KEY-WRAP, {Camellia-KeyWrappingSchemes} }

   kwa-camellia128-wrap KEY-WRAP ::= {
      IDENTIFIER id-camellia128-wrap
      PARAMS ARE absent
      SMIME-CAPS { IDENTIFIED BY id-camellia128-wrap } }

   kwa-camellia192-wrap KEY-WRAP ::= {
      IDENTIFIER id-camellia192-wrap
      PARAMS ARE absent
      SMIME-CAPS { IDENTIFIED BY id-camellia192-wrap } }

   kwa-camellia256-wrap KEY-WRAP ::= {
      IDENTIFIER id-camellia256-wrap
      PARAMS ARE absent
      SMIME-CAPS { IDENTIFIED BY id-camellia256-wrap } }

   -- Key Derivation Functions

   id-kdf-kdf2 OID ::= { x9-44-components kdf2(1) }

   kda-kdf2 KEY-DERIVATION ::= {
      IDENTIFIER id-kdf-kdf2
      PARAMS TYPE KDF2-HashFunction ARE required
      -- No S/MIME caps defined -- }

   KDF2-HashFunction ::=
      AlgorithmIdentifier { DIGEST-ALGORITHM, {KDF2-HashFunctions} }

   KDF2-HashFunctions DIGEST-ALGORITHM ::= { X9-HashFunctions, ... }

   id-kdf-kdf3 OID ::= { x9-44-components kdf3(2) }

   kda-kdf3 KEY-DERIVATION ::= {
      IDENTIFIER id-kdf-kdf3
      PARAMS TYPE KDF3-HashFunction ARE required
      -- No S/MIME caps defined -- }

   KDF3-HashFunction ::=
      AlgorithmIdentifier { DIGEST-ALGORITHM, {KDF3-HashFunctions} }

   KDF3-HashFunctions DIGEST-ALGORITHM ::= { X9-HashFunctions, ... }

   -- Hash Functions

   X9-HashFunctions DIGEST-ALGORITHM ::= {
      mda-sha1 | mda-sha224 | mda-sha256 | mda-sha384 |
      mda-sha512, ... }

   -- Updates for the SMIME-CAPS Set from RFC 5911

   SMimeCapsSet SMIME-CAPS ::= {
      kema-kem-rsa.&smimeCaps |
      kwa-aes128-wrap |
      kwa-aes192-wrap |
      kwa-aes256-wrap |
      kwa-camellia128-wrap.&smimeCaps |
      kwa-camellia192-wrap.&smimeCaps |
      kwa-camellia256-wrap.&smimeCaps,
      ... }

   END
        
Appendix C. SMIMECapabilities Examples
付録C. SmimeCapabilityの例

To indicate support for the RSA-KEM algorithm coupled with the KDF3 key derivation function with SHA-256 and the AES Key Wrap symmetric key-encryption algorithm 128-bit key-encryption key, the SMIMECapabilities will include the following entry:

SHA-256およびAESキーラップ対称キー暗号化アルゴリズム128ビットキー暗号化キーを備えたKDF3キー誘導関数と組み合わせたRSA-KEMアルゴリズムのサポートを示すために、SmimeCapabilityには次のエントリが含まれます。

   SEQUENCE {
      id-rsa-kem-spki,                           -- RSA-KEM algorithm
      SEQUENCE {                           -- GenericHybridParameters
         SEQUENCE {                    -- key encapsulation mechanism
            id-kem-rsa,                                    -- RSA-KEM
            SEQUENCE {                            -- RsaKemParameters
               SEQUENCE {                  -- key derivation function
                  id-kdf-kdf3,                                -- KDF3
                  SEQUENCE {                     -- KDF3-HashFunction
                     id-sha256  -- SHA-256; no parameters (preferred)
                  },
               16                              -- KEK length in bytes
               },
         SEQUENCE {                   -- data encapsulation mechanism
            id-aes128-Wrap             -- AES-128 Wrap; no parameters
         }
      }
   }
        

This SMIMECapability value has the following DER encoding (in hexadecimal):

このスミメキセビリティ値には、次のderエンコードがあります(16進数)。

   30 47
     06 0b 2a 86 48 86 f7 0d 01 09 10 03 0e          -- id-rsa-kem-spki
     30 38
        30 29
           06 07 28 81 8c 71 02 02 04                -- id-kem-rsa
           30 1e
              30 19
                 06 0a 2b 81 05 10 86 48 09 2c 01 02 -- id-kdf-kdf3
                 30 0b
                    06 09 60 86 48 01 65 03 04 02 01 -- id-sha256
                    02 01 10                         -- 16 bytes
         30 0b
            06 09 60 86 48 01 65 03 04 01 05         -- id-aes128-Wrap
        

To indicate support for the RSA-KEM algorithm coupled with the KDF3 key derivation function with SHA-384 and the AES Key Wrap symmetric key-encryption algorithm 192-bit key-encryption key, the SMIMECapabilities will include the following SMIMECapability value (in hexadecimal):

SHA-384およびAESキーラップ対称キー暗号化アルゴリズム192ビットキー暗号化キーを備えたKDF3キー誘導関数と組み合わせたRSA-KEMアルゴリズムのサポートを示すために、SmimeCapabilityには、SmimimeCapability値(河川)が含まれます。:

     30 47 06 0b 2a 86 48 86 f7 0d 01 09 10 03 0e 30
     38 30 29 06 07 28 81 8c 71 02 02 04 30 1e 30 19
     06 0a 2b 81 05 10 86 48 09 2c 01 02 30 0b 06 09
     60 86 48 01 65 03 04 02 02 02 01 18 30 0b 06 09
     60 86 48 01 65 03 04 01 19
        

To indicate support for the RSA-KEM algorithm coupled with the KDF3 key derivation function with SHA-512 and the AES Key Wrap symmetric key-encryption algorithm 256-bit key-encryption key, the SMIMECapabilities will include the following SMIMECapability value (in hexadecimal):

SHA-512およびAESキーラップ対称キー暗号化アルゴリズム256ビットキー暗号化キーを備えたKDF3キー誘導関数と組み合わせたRSA-KEMアルゴリズムのサポートを示すために、SmimeCapabilityには、SmimimeCapability値(河川)が含まれます。:

     30 47 06 0b 2a 86 48 86 f7 0d 01 09 10 03 0e 30
     38 30 29 06 07 28 81 8c 71 02 02 04 30 1e 30 19
     06 0a 2b 81 05 10 86 48 09 2c 01 02 30 0b 06 09
     60 86 48 01 65 03 04 02 03 02 01 20 30 0b 06 09
     60 86 48 01 65 03 04 01 2d
        
Appendix D. RSA-KEM CMS Enveloped-Data Example
付録D. RSA-KEM CMSエンベロープデータの例

This example shows the establishment of an AES-128 content-encryption key using:

この例は、以下を使用してAES-128コンテンツ暗号化キーの確立を示しています。

* RSA-KEM with a 3072-bit key and KDF3 with SHA-256;

* 3072ビットキーを備えたRSA-KEM、SHA-256を搭載したKDF3。

* KEMRecipientInfo key derivation using KDF3 with SHA-256; and

* KemrecipientInfo SHA-256を使用したKDF3を使用したキー派生。そして

* KEMRecipientInfo Key Wrap using AES-128-KEYWRAP.

* AES-128-KeyWrapを使用したKemrecipientInfoキーラップ。

In real-world use, the originator would encrypt the content-encryption key in a manner that would allow decryption with their own private key as well as the recipient's private key. This is omitted in an attempt to simplify the example.

実際の使用では、オリジネーターは、自分の秘密鍵と受信者の秘密鍵で復号化できるようにする方法でコンテンツ暗号化キーを暗号化します。これは、例を簡素化するために省略されています。

D.1. Originator RSA-KEM Encapsulate() Processing
D.1. オリジネーターrsa-kem cankapsulate()処理

Alice obtains Bob's public key:

アリスはボブの公開鍵を手に入れます:

      -----BEGIN PUBLIC KEY-----
      MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA3ocW14cxncPJ47fnEjBZ
      AyfC2lqapL3ET4jvV6C7gGeVrRQxWPDwl+cFYBBR2ej3j3/0ecDmu+XuVi2+s5JH
      Keeza+itfuhsz3yifgeEpeK8T+SusHhn20/NBLhYKbh3kiAcCgQ56dpDrDvDcLqq
      vS3jg/VO+OPnZbofoHOOevt8Q/roahJe1PlIyQ4udWB8zZezJ4mLLfbOA9YVaYXx
      2AHHZJevo3nmRnlgJXo6mE00E/6qkhjDHKSMdl2WG6mO9TCDZc9qY3cAJDU6Ir0v
      SH7qUl8/vN13y4UOFkn8hM4kmZ6bJqbZt5NbjHtY4uQ0VMW3RyESzhrO02mrp39a
      uLNnH3EXdXaV1tk75H3qC7zJaeGWMJyQfOE3YfEGRKn8fxubji716D8UecAxAzFy
      FL6m1JiOyV5acAiOpxN14qRYZdHnXOM9DqGIGpoeY1UuD4Mo05osOqOUpBJHA9fS
      whSZG7VNf+vgNWTLNYSYLI04KiMdulnvU6ds+QPz+KKtAgMBAAE=
      -----END PUBLIC KEY-----
        

Bob's RSA public key has the following key identifier:

ボブのRSA公開キーには、次のキー識別子があります。

      9eeb67c9b95a74d44d2f16396680e801b5cba49c
        

Alice randomly generates integer z between 0 and n-1:

アリスは、0からn-1の間で整数zをランダムに生成します。

      9c126102a5c1c0354672a3c2f19fc9ddea988f815e1da812c7bd4f8eb082bdd1
      4f85a7f7c2f1af11d5333e0d6bcb375bf855f208da72ba27e6fb0655f2825aa6
      2b93b1f9bbd3491fed58f0380fa0de36430e3a144d569600bd362609be5b9481
      0875990b614e406fa6dff500043cbca95968faba61f795096a7fb3687a51078c
      4ca2cb663366b0bea0cd9cccac72a25f3f4ed03deb68b4453bba44b943f4367b
      67d6cd10c8ace53f545aac50968fc3c6ecc80f3224b64e37038504e2d2c0e2b2
      9d45e46c62826d96331360e4c17ea3ef89a9efc5fac99eda830e81450b6534dc
      0bdf042b8f3b706649c631fe51fc2445cc8d447203ec2f41f79cdfea16de1ce6
      abdfdc1e2ef2e5d5d8a65e645f397240ef5a26f5e4ff715de782e30ecf477293
      e89e13171405909a8e04dd31d21d0c57935fc1ceea8e1033e31e1bc8c56da0f3
      d79510f3f380ff58e5a61d361f2f18e99fbae5663172e8cd1f21deaddc5bbbea
      060d55f1842b93d1a9c888d0bf85d0af9947fe51acf940c7e7577eb79cabecb3
        

Alice encrypts integer z using the Bob's RSA public key. The result is called ct:

アリスは、ボブのRSA公開キーを使用して整数Zを暗号化します。結果はCTと呼ばれます:

      c071fc273af8e7bdb152e06bf73310361074154a43abcf3c93c13499d2065344
      3eed9ef5d3c0685e4aa76a6854815bb97691ff9f8dac15eea7d74f452bf350a6
      46163d68288e978cbf7a73089ee52712f9a4f49e06ace7bbc85ab14d4e336c97
      c5728a2654138c7b26e8835c6b0a9fbed26495c4eadf745a2933be283f6a88b1
      6695fc06666873cfb6d36718ef3376cefc100c3941f3c494944078325807a559
      186b95ccabf3714cfaf79f83bd30537fdd9aed5a4cdcbd8bd0486faed73e9d48
      6b3087d6c806546b6e2671575c98461e441f65542bd95de26d0f53a64e7848d7
      31d9608d053e8d345546602d86236ffe3704c98ad59144f3089e5e6d527b5497
      ba103c79d62e80d0235410b06f71a7d9bd1c38000f910d6312ea2f20a3557535
      ad01b3093fb5f7ee507080d0f77d48c9c3b3796f6b7dd3786085fb895123f04c
      a1f1c1be22c747a8dface32370fb0d570783e27dbb7e74fca94ee39676fde3d8
      a9553d878224736e37e191dab953c7e228c07ad5ca3122421c14debd072a9ab6
        

Alice derives the shared secret (SS) using KDF3 with SHA-256:

アリスは、KDF3を使用してSHA-256を使用して共有秘密(SS)を導き出します。

      3cf82ec41b54ed4d37402bbd8f805a52
        
D.2. Originator CMS Processing
D.2. オリジネーターCMS処理

Alice encodes the CMSORIforKEMOtherInfo structure with the algorithm identifier for AES-128-KEYWRAP and a key length of 16 octets. The DER encoding of CMSORIforKEMOtherInfo produces 18 octets:

Aliceは、AES-128-KeyWrapのアルゴリズム識別子と16オクテットのキー長を使用して、CMSORIFORKEMOTHEMOTHERINFO構造をエンコードします。CMSORIFORKEMOTHERINFOのderエンコードは18オクターを生成します。

      3010300b0609608648016503040105020110
        

The CMSORIforKEMOtherInfo structure contains:

CMSORIFORKEMOTHERINFO構造には以下が含まれています。

     0  16: SEQUENCE {
     2  11:  SEQUENCE {
     4   9:   OBJECT IDENTIFIER aes128-wrap (2 16 840 1 101 3 4 1 5)
          :    }
    15   1:  INTEGER 16
          :   }
        

Alice derives the key-encryption key from shared secret produced by RSA-KEM Encapsulate() and the CMSORIforKEMOtherInfo structure with KDF3 and SHA-256. The KEK is:

Aliceは、RSA-KEM Encapsulate()によって生成された共有秘密のキー暗号化キーと、KDF3およびSHA-256を搭載したCMSORIFORKEMOTHERINFO構造から導き出します。ケックは次のとおりです。

      e6dc9d62ff2b469bef604c617b018718
        

Alice randomly generates a 128-bit content-encryption key:

アリスは128ビットのコンテンツ暗号化キーをランダムに生成します。

      77f2a84640304be7bd42670a84a1258b
        

Alice uses AES-128-KEYWRAP to encrypt the 128-bit content-encryption key with the derived key-encryption key:

AliceはAES-128-KeyWrapを使用して、派生キー暗号化キーを使用して128ビットコンテンツ暗号化キーを暗号化します。

      28782e5d3d794a7616b863fbcfc719b78f12de08cf286e09
        

Alice encrypts the padded content using AES-128-CBC with the content-encryption key. The 16-octet IV used is:

Aliceは、AES-128-CBCを使用してコンテンツ誘引キーを使用してパッド入りコンテンツを暗号化します。使用される16-OCTET IVは次のとおりです。

      480ccafebabefacedbaddecaf8887781
        

The padded content plaintext is:

パッド付きコンテンツプレーンテキストは次のとおりです。

      48656c6c6f2c20776f726c6421030303
        

The resulting ciphertext is:

結果の暗号文は次のとおりです。

      c6ca65db7bdd76b0f37e2fab6264b66d
        

Alice encodes the EnvelopedData (using KEMRecipientInfo) and ContentInfo, and then sends the result to Bob. The Base64-encoded result is:

アリスは封筒(KemrecipientInfoを使用)とContentInfoをエンコードしてから、結果をBOBに送信します。Base64エンコードの結果は次のとおりです。

      MIICXAYJKoZIhvcNAQcDoIICTTCCAkkCAQMxggIEpIICAAYLKoZIhvcNAQkQDQMw
      ggHvAgEAgBSe62fJuVp01E0vFjlmgOgBtcuknDAJBgcogYxxAgIEBIIBgMBx/Cc6
      +Oe9sVLga/czEDYQdBVKQ6vPPJPBNJnSBlNEPu2e9dPAaF5Kp2poVIFbuXaR/5+N
      rBXup9dPRSvzUKZGFj1oKI6XjL96cwie5ScS+aT0ngas57vIWrFNTjNsl8VyiiZU
      E4x7JuiDXGsKn77SZJXE6t90Wikzvig/aoixZpX8BmZoc8+202cY7zN2zvwQDDlB
      88SUlEB4MlgHpVkYa5XMq/NxTPr3n4O9MFN/3ZrtWkzcvYvQSG+u1z6dSGswh9bI
      BlRrbiZxV1yYRh5EH2VUK9ld4m0PU6ZOeEjXMdlgjQU+jTRVRmAthiNv/jcEyYrV
      kUTzCJ5ebVJ7VJe6EDx51i6A0CNUELBvcafZvRw4AA+RDWMS6i8go1V1Na0Bswk/
      tffuUHCA0Pd9SMnDs3lva33TeGCF+4lRI/BMofHBviLHR6jfrOMjcPsNVweD4n27
      fnT8qU7jlnb949ipVT2HgiRzbjfhkdq5U8fiKMB61coxIkIcFN69ByqatjAbBgor
      gQUQhkgJLAECMA0GCWCGSAFlAwQCAQUAAgEQMAsGCWCGSAFlAwQBBQQYKHguXT15
      SnYWuGP7z8cZt48S3gjPKG4JMDwGCSqGSIb3DQEHATAdBglghkgBZQMEAQIEEEgM
      yv66vvrO263eyviId4GAEMbKZdt73Xaw834vq2Jktm0=
        

This result decodes to:

この結果は次のとおりです。

     0 604: SEQUENCE {
     4   9:  OBJECT IDENTIFIER envelopedData (1 2 840 113549 1 7 3)
    15 589:  [0] {
    19 585:   SEQUENCE {
    23   1:    INTEGER 3
    26 516:    SET {
    30 512:     [4] {
    34  11:      OBJECT IDENTIFIER
          :       KEMRecipientInfo (1 2 840 113549 1 9 16 13 3)
    47 495:      SEQUENCE {
    51   1:       INTEGER 0
    54  20:       [0]
          :       9E EB 67 C9 B9 5A 74 D4 4D 2F 16 39 66 80 E8 01
          :       B5 CB A4 9C
    76   9:       SEQUENCE {
    78   7:        OBJECT IDENTIFIER kemRSA (1 0 18033 2 2 4)
          :         }
    87 384:       OCTET STRING
          :       C0 71 FC 27 3A F8 E7 BD B1 52 E0 6B F7 33 10 36
          :       10 74 15 4A 43 AB CF 3C 93 C1 34 99 D2 06 53 44
          :       3E ED 9E F5 D3 C0 68 5E 4A A7 6A 68 54 81 5B B9
          :       76 91 FF 9F 8D AC 15 EE A7 D7 4F 45 2B F3 50 A6
          :       46 16 3D 68 28 8E 97 8C BF 7A 73 08 9E E5 27 12
          :       F9 A4 F4 9E 06 AC E7 BB C8 5A B1 4D 4E 33 6C 97
          :       C5 72 8A 26 54 13 8C 7B 26 E8 83 5C 6B 0A 9F BE
          :       D2 64 95 C4 EA DF 74 5A 29 33 BE 28 3F 6A 88 B1
          :       66 95 FC 06 66 68 73 CF B6 D3 67 18 EF 33 76 CE
          :       FC 10 0C 39 41 F3 C4 94 94 40 78 32 58 07 A5 59
          :       18 6B 95 CC AB F3 71 4C FA F7 9F 83 BD 30 53 7F
          :       DD 9A ED 5A 4C DC BD 8B D0 48 6F AE D7 3E 9D 48
          :       6B 30 87 D6 C8 06 54 6B 6E 26 71 57 5C 98 46 1E
          :       44 1F 65 54 2B D9 5D E2 6D 0F 53 A6 4E 78 48 D7
          :       31 D9 60 8D 05 3E 8D 34 55 46 60 2D 86 23 6F FE
          :       37 04 C9 8A D5 91 44 F3 08 9E 5E 6D 52 7B 54 97
          :       BA 10 3C 79 D6 2E 80 D0 23 54 10 B0 6F 71 A7 D9
          :       BD 1C 38 00 0F 91 0D 63 12 EA 2F 20 A3 55 75 35
          :       AD 01 B3 09 3F B5 F7 EE 50 70 80 D0 F7 7D 48 C9
          :       C3 B3 79 6F 6B 7D D3 78 60 85 FB 89 51 23 F0 4C
          :       A1 F1 C1 BE 22 C7 47 A8 DF AC E3 23 70 FB 0D 57
          :       07 83 E2 7D BB 7E 74 FC A9 4E E3 96 76 FD E3 D8
          :       A9 55 3D 87 82 24 73 6E 37 E1 91 DA B9 53 C7 E2
          :       28 C0 7A D5 CA 31 22 42 1C 14 DE BD 07 2A 9A B6
   475  27:       SEQUENCE {
   477  10:        OBJECT IDENTIFIER
          :         kdf3 (1 3 133 16 840 9 44 1 2)
   489  13:        SEQUENCE {
   491   9:         OBJECT IDENTIFIER
          :          sha-256 (2 16 840 1 101 3 4 2 1)
   502   0:         NULL
          :          }
          :         }
   504   1:       INTEGER 16
   507  11:       SEQUENCE {
   509   9:        OBJECT IDENTIFIER
          :         aes128-wrap (2 16 840 1 101 3 4 1 5)
          :         }
   520  24:       OCTET STRING
          :       28 78 2E 5D 3D 79 4A 76 16 B8 63 FB CF C7 19 B7
          :       8F 12 DE 08 CF 28 6E 09
          :        }
          :       }
          :      }
   546  60:    SEQUENCE {
   548   9:     OBJECT IDENTIFIER data (1 2 840 113549 1 7 1)
   559  29:     SEQUENCE {
   561   9:      OBJECT IDENTIFIER
          :       aes128-CBC (2 16 840 1 101 3 4 1 2)
   572  16:      OCTET STRING
          :      48 0C CA FE BA BE FA CE DB AD DE CA F8 88 77 81
          :       }
   590  16:     [0] C6 CA 65 DB 7B DD 76 B0 F3 7E 2F AB 62 64 B6 6D
          :      }
          :     }
          :    }
          :   }
        
D.3. Recipient RSA-KEM Decapsulate() Processing
D.3. 受信者rsa-kem decapsulate()処理

Bob's private key:

ボブの秘密鍵:

      -----BEGIN PRIVATE KEY-----
      MIIG5AIBAAKCAYEA3ocW14cxncPJ47fnEjBZAyfC2lqapL3ET4jvV6C7gGeVrRQx
      WPDwl+cFYBBR2ej3j3/0ecDmu+XuVi2+s5JHKeeza+itfuhsz3yifgeEpeK8T+Su
      sHhn20/NBLhYKbh3kiAcCgQ56dpDrDvDcLqqvS3jg/VO+OPnZbofoHOOevt8Q/ro
      ahJe1PlIyQ4udWB8zZezJ4mLLfbOA9YVaYXx2AHHZJevo3nmRnlgJXo6mE00E/6q
      khjDHKSMdl2WG6mO9TCDZc9qY3cAJDU6Ir0vSH7qUl8/vN13y4UOFkn8hM4kmZ6b
      JqbZt5NbjHtY4uQ0VMW3RyESzhrO02mrp39auLNnH3EXdXaV1tk75H3qC7zJaeGW
      MJyQfOE3YfEGRKn8fxubji716D8UecAxAzFyFL6m1JiOyV5acAiOpxN14qRYZdHn
      XOM9DqGIGpoeY1UuD4Mo05osOqOUpBJHA9fSwhSZG7VNf+vgNWTLNYSYLI04KiMd
      ulnvU6ds+QPz+KKtAgMBAAECggGATFfkSkUjjJCjLvDk4aScpSx6+Rakf2hrdS3x
      jwqhyUfAXgTTeUQQBs1HVtHCgxQd+qlXYn3/qu8TeZVwG4NPztyi/Z5yB1wOGJEV
      3k8N/ytul6pJFFn6p48VM01bUdTrkMJbXERe6g/rr6dBQeeItCaOK7N5SIJH3Oqh
      9xYuB5tH4rquCdYLmt17Tx8CaVqU9qPY3vOdQEOwIjjMV8uQUR8rHSO9KkSj8AGs
      Lq9kcuPpvgJc2oqMRcNePS2WVh8xPFktRLLRazgLP8STHAtjT6SlJ2UzkUqfDHGK
      q/BoXxBDu6L1VDwdnIS5HXtL54ElcXWsoOyKF8/ilmhRUIUWRZFmlS1ok8IC5IgX
      UdL9rJVZFTRLyAwmcCEvRM1asbBrhyEyshSOuN5nHJi2WVJ+wSHijeKl1qeLlpMk
      HrdIYBq4Nz7/zXmiQphpAy+yQeanhP8O4O6C8e7RwKdpxe44su4Z8fEgA5yQx0u7
      8yR1EhGKydX5bhBLR5Cm1VM7rT2BAoHBAP/+e5gZLNf/ECtEBZjeiJ0VshszOoUq
      haUQPA+9Bx9pytsoKm5oQhB7QDaxAvrn8/FUW2aAkaXsaj9F+/q30AYSQtExai9J
      fdKKook3oimN8/yNRsKmhfjGOj8hd4+GjX0qoMSBCEVdT+bAjjry8wgQrqReuZnu
      oXU85dmb3jvv0uIczIKvTIeyjXE5afjQIJLmZFXsBm09BG87Ia5EFUKly96BOMJh
      /QWEzuYYXDqOFfzQtkAefXNFW21Kz4Hw2QKBwQDeiGh4lxCGTjECvG7fauMGlu+q
      DSdYyMHif6t6mx57eS16EjvOrlXKItYhIyzW8Kw0rf/CSB2j8ig1GkMLTOgrGIJ1
      0322o50FOr5oOmZPueeR4pOyAP0fgQ8DD1L3JBpY68/8MhYbsizVrR+Ar4jM0f96
      W2bF5Xj3h+fQTDMkx6VrCCQ6miRmBUzH+ZPs5n/lYOzAYrqiKOanaiHy4mjRvlsy
      mjZ6z5CG8sISqcLQ/k3Qli5pOY/v0rdBjgwAW/UCgcEAqGVYGjKdXCzuDvf9EpV4
      mpTWB6yIV2ckaPOn/tZi5BgsmEPwvZYZt0vMbu28Px7sSpkqUuBKbzJ4pcy8uC3I
      SuYiTAhMiHS4rxIBX3BYXSuDD2RD4vG1+XM0h6jVRHXHh0nOXdVfgnmigPGz3jVJ
      B8oph/jD8O2YCk4YCTDOXPEi8Rjusxzro+whvRR+kG0gsGGcKSVNCPj1fNISEte4
      gJId7O1mUAAzeDjn/VaS/PXQovEMolssPPKn9NocbKbpAoHBAJnFHJunl22W/lrr
      ppmPnIzjI30YVcYOA5vlqLKyGaAsnfYqP1WUNgfVhq2jRsrHx9cnHQI9Hu442PvI
      x+c5H30YFJ4ipE3eRRRmAUi4ghY5WgD+1hw8fqyUW7E7l5LbSbGEUVXtrkU5G64T
      UR91LEyMF8OPATdiV/KD4PWYkgaqRm3tVEuCVACDTQkqNsOOi3YPQcm270w6gxfQ
      SOEy/kdhCFexJFA8uZvmh6Cp2crczxyBilR/yCxqKOONqlFdOQKBwFbJk5eHPjJz
      AYueKMQESPGYCrwIqxgZGCxaqeVArHvKsEDx5whI6JWoFYVkFA8F0MyhukoEb/2x
      2qB5T88Dg3EbqjTiLg3qxrWJ2OxtUo8pBP2I2wbl2NOwzcbrlYhzEZ8bJyxZu5i1
      sYILC8PJ4Qzw6jS4Qpm4y1WHz8e/ElW6VyfmljZYA7f9WMntdfeQVqCVzNTvKn6f
      hg6GSpJTzp4LV3ougi9nQuWXZF2wInsXkLYpsiMbL6Fz34RwohJtYA==
      -----END PRIVATE KEY-----
        

Bob checks that the length of the ciphertext is less than nLen bytes.

ボブは、暗号文の長さがnlenバイト未満であることを確認します。

Bob checks that the ciphertext is greater than zero and is less than his RSA modulus.

ボブは、暗号文がゼロよりも大きく、彼のRSAモジュラスよりも小さいことをチェックします。

Bob decrypts the ciphertext with his RSA private key to obtain the integer z:

ボブは、整数Zを取得するために、RSAの秘密鍵で暗号文を復号化します。

      9c126102a5c1c0354672a3c2f19fc9ddea988f815e1da812c7bd4f8eb082bdd1
      4f85a7f7c2f1af11d5333e0d6bcb375bf855f208da72ba27e6fb0655f2825aa6
      2b93b1f9bbd3491fed58f0380fa0de36430e3a144d569600bd362609be5b9481
      0875990b614e406fa6dff500043cbca95968faba61f795096a7fb3687a51078c
      4ca2cb663366b0bea0cd9cccac72a25f3f4ed03deb68b4453bba44b943f4367b
      67d6cd10c8ace53f545aac50968fc3c6ecc80f3224b64e37038504e2d2c0e2b2
      9d45e46c62826d96331360e4c17ea3ef89a9efc5fac99eda830e81450b6534dc
      0bdf042b8f3b706649c631fe51fc2445cc8d447203ec2f41f79cdfea16de1ce6
      abdfdc1e2ef2e5d5d8a65e645f397240ef5a26f5e4ff715de782e30ecf477293
      e89e13171405909a8e04dd31d21d0c57935fc1ceea8e1033e31e1bc8c56da0f3
      d79510f3f380ff58e5a61d361f2f18e99fbae5663172e8cd1f21deaddc5bbbea
      060d55f1842b93d1a9c888d0bf85d0af9947fe51acf940c7e7577eb79cabecb3
        

Bob checks that the integer z is greater than zero and is less than his RSA modulus.

ボブは、整数Zがゼロよりも大きく、彼のRSAモジュラスよりも小さいことをチェックします。

Bob derives the shared secret (SS) using KDF3 with SHA-256:

ボブは、SHA-256を使用してKDF3を使用して共有秘密(SS)を導き出します。

      3cf82ec41b54ed4d37402bbd8f805a52
        
D.4. Recipient CMS Processing
D.4. 受信者CMS処理

Bob encodes the CMSORIforKEMOtherInfo structure with the algorithm identifier for AES-128-KEYWRAP and a key length of 16 octets. The DER encoding of CMSORIforKEMOtherInfo is not repeated here.

Bobは、AES-128-KeyWrapのアルゴリズム識別子と16オクテットのキー長を使用して、CMSORIFORKEMOTHEMOTHERINFO構造をエンコードします。CMSORIFORKEMOTHERINFOのDERエンコーディングはここで繰り返されません。

Bob derives the key-encryption key from shared secret and the CMSORIforKEMOtherInfo structure with KDF3 and SHA-256, the KEK is:

Bobは、共有SecretとCMSORIFORKEMOTHERINFO構造からKDF3とSHA-256を使用して、KMSORIFORKEMOTHERINFO構造からキー暗号化キーを導き出します。KEKは次のとおりです。

      e6dc9d62ff2b469bef604c617b018718
        

Bob uses AES-KEY-WRAP to decrypt the content-encryption key with the key-encryption key. The content-encryption key is:

BobはAES-Key-Wrapを使用して、キー暗号化キーを使用してコンテンツ暗号化キーを復号化します。コンテンツの暗号化キーは次のとおりです。

      77f2a84640304be7bd42670a84a1258b
        

Bob decrypts the content using AES-128-CBC with the content-encryption key. The 16-octet IV used is:

Bobは、AES-128-CBCを使用してコンテンツ - 誘引キーを使用してコンテンツを復号化します。使用される16-OCTET IVは次のとおりです。

      480ccafebabefacedbaddecaf8887781
        

The received ciphertext content is:

受信したciphertextコンテンツは次のとおりです。

      c6ca65db7bdd76b0f37e2fab6264b66d
        

The resulting padded plaintext content is:

結果のパッド入りのプレーンテキストコンテンツは次のとおりです。

      48656c6c6f2c20776f726c6421030303
        

After stripping the AES-CBC padding, the plaintext content is:

AES-CBCパディングを剥がした後、平文コンテンツは次のとおりです。

      Hello, world!
        
Acknowledgements
謝辞

We thank James Randall, Burt Kaliski, and John Brainard as the original authors of [RFC5990]; this document is based on their work.

[RFC5990]の元の著者として、ジェームズ・ランドール、バート・カリスキ、ジョン・ブレイナードに感謝します。このドキュメントは彼らの仕事に基づいています。

We thank the members of the ASC X9F1 working group for their contributions to drafts of ANS X9.44, which led to [RFC5990].

ASC X9F1ワーキンググループのメンバーに、[RFC5990]につながったANS X9.44のドラフトへの貢献について感謝します。

We thank Blake Ramsdell, Jim Schaad, Magnus Nystrom, Bob Griffin, and John Linn for helping bring [RFC5990] to fruition.

Blake Ramsdell、Jim Schaad、Magnus Nystrom、Bob Griffin、およびJohn Linnに感謝します。

We thank Burt Kaliski, Alex Railean, Joe Mandel, Mike Ounsworth, Peter Campbell, Daniel Van Geest, and David Ireland for careful review and thoughtful comments that greatly improved this document.

この文書を大幅に改善した慎重なレビューと思慮深いコメントについて、バート・カリスキ、アレックス・レール人、ジョー・マンデル、マイク・オンスワース、ピーター・キャンベル、ダニエル・ヴァン・ジスト、デビッド・アイルランドに感謝します。

Authors' Addresses
著者のアドレス
   Russ Housley
   Vigil Security, LLC
   516 Dranesville Road
   Herndon, VA 20170
   United States of America
   Email: housley@vigilsec.com
        
   Sean Turner
   sn3rd
   Email: sean@sn3rd.com