[要約] RFC 2630は、暗号メッセージ構文(CMS)に関する仕様であり、暗号化、署名、認証などのセキュリティ機能を提供します。その目的は、セキュアなメッセージの交換を可能にするための標準化と指針を提供することです。

Network Working Group                                        R. Housley
Request for Comments: 2630                                       SPYRUS
Category: Standards Track                                     June 1999
        

Cryptographic Message Syntax

暗号化メッセージの構文

Status of this Memo

本文書の状態

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

このドキュメントは、インターネットコミュニティのインターネット標準トラックプロトコルを指定し、改善のための議論と提案を要求します。このプロトコルの標準化状態とステータスについては、「インターネット公式プロトコル標準」(STD 1)の最新版を参照してください。このメモの配布は無制限です。

Copyright Notice

著作権表示

Copyright (C) The Internet Society (1999). All Rights Reserved.

Copyright(C)The Internet Society(1999)。全著作権所有。

Abstract

概要

This document describes the Cryptographic Message Syntax. This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary messages.

このドキュメントでは、暗号化メッセージの構文について説明します。この構文は、任意のメッセージのデジタル署名、ダイジェスト、認証、または暗号化に使用されます。

The Cryptographic Message Syntax is derived from PKCS #7 version 1.5 as specified in RFC 2315 [PKCS#7]. Wherever possible, backward compatibility is preserved; however, changes were necessary to accommodate attribute certificate transfer and key agreement techniques for key management.

暗号化メッセージ構文は、RFC 2315 [PKCS#7]で指定されているPKCS#7バージョン1.5から派生しています。可能な限り、下位互換性は維持されます。ただし、属性証明書の転送とキー管理のキー合意技術に対応するために変更が必要でした。

Table of Contents

目次

   1   Introduction .................................................  4
   2   General Overview .............................................  4
   3   General Syntax ...............................................  5
   4   Data Content Type ............................................  5
   5   Signed-data Content Type .....................................  6
       5.1  SignedData Type .........................................  7
       5.2  EncapsulatedContentInfo Type ............................  8
       5.3  SignerInfo Type .........................................  9
       5.4  Message Digest Calculation Process ...................... 11
       5.5  Message Signature Generation Process .................... 12
       5.6  Message Signature Verification Process .................. 12
   6   Enveloped-data Content Type .................................. 12
       6.1  EnvelopedData Type ...................................... 14
       6.2  RecipientInfo Type ...................................... 15
            6.2.1  KeyTransRecipientInfo Type ....................... 16
            6.2.2  KeyAgreeRecipientInfo Type ....................... 17
            6.2.3  KEKRecipientInfo Type ............................ 19
       6.3  Content-encryption Process .............................. 20
       6.4  Key-encryption Process .................................. 20
   7   Digested-data Content Type ................................... 21
   8   Encrypted-data Content Type .................................. 22
   9   Authenticated-data Content Type .............................. 23
       9.1  AuthenticatedData Type .................................. 23
       9.2  MAC Generation .......................................... 25
       9.3  MAC Verification ........................................ 26
   10  Useful Types ................................................. 27
       10.1  Algorithm Identifier Types ............................. 27
             10.1.1  DigestAlgorithmIdentifier ...................... 27
             10.1.2  SignatureAlgorithmIdentifier ................... 27
             10.1.3  KeyEncryptionAlgorithmIdentifier ............... 28
             10.1.4  ContentEncryptionAlgorithmIdentifier ........... 28
             10.1.5  MessageAuthenticationCodeAlgorithm ............. 28
       10.2  Other Useful Types ..................................... 28
             10.2.1  CertificateRevocationLists ..................... 28
             10.2.2  CertificateChoices ............................. 29
             10.2.3  CertificateSet ................................. 29
             10.2.4  IssuerAndSerialNumber .......................... 30
             10.2.5  CMSVersion ..................................... 30
             10.2.6  UserKeyingMaterial ............................. 30
             10.2.7  OtherKeyAttribute .............................. 30
        
   11  Useful Attributes ............................................ 31
       11.1  Content Type ........................................... 31
       11.2  Message Digest ......................................... 32
       11.3  Signing Time ........................................... 32
       11.4  Countersignature ....................................... 34
   12  Supported Algorithms ......................................... 35
       12.1  Digest Algorithms ...................................... 35
             12.1.1  SHA-1 .......................................... 35
             12.1.2  MD5 ............................................ 35
       12.2  Signature Algorithms ................................... 36
             12.2.1  DSA ............................................ 36
             12.2.2  RSA ............................................ 36
       12.3  Key Management Algorithms .............................. 36
             12.3.1  Key Agreement Algorithms ....................... 36
                     12.3.1.1  X9.42 Ephemeral-Static Diffie-Hellman. 37
             12.3.2  Key Transport Algorithms ....................... 38
                     12.3.2.1  RSA .................................. 39
             12.3.3  Symmetric Key-Encryption Key Algorithms ........ 39
                     12.3.3.1  Triple-DES Key Wrap .................. 40
                     12.3.3.2  RC2 Key Wrap ......................... 41
      12.4  Content Encryption Algorithms ........................... 41
            12.4.1  Triple-DES CBC .................................. 42
            12.4.2  RC2 CBC ......................................... 42
      12.5  Message Authentication Code Algorithms .................. 42
            12.5.1  HMAC with SHA-1 ................................. 43
      12.6  Triple-DES and RC2 Key Wrap Algorithms .................. 43
            12.6.1  Key Checksum .................................... 44
            12.6.2  Triple-DES Key Wrap ............................. 44
            12.6.3  Triple-DES Key Unwrap ........................... 44
            12.6.4  RC2 Key Wrap .................................... 45
            12.6.5  RC2 Key Unwrap .................................. 46
   Appendix A:  ASN.1 Module ........................................ 47
   References ....................................................... 55
   Security Considerations .......................................... 56
   Acknowledgments .................................................. 58
   Author's Address ................................................. 59
   Full Copyright Statement ......................................... 60
        

1 Introduction

1はじめに

This document describes the Cryptographic Message Syntax. This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary messages.

このドキュメントでは、暗号化メッセージの構文について説明します。この構文は、任意のメッセージのデジタル署名、ダイジェスト、認証、または暗号化に使用されます。

The Cryptographic Message Syntax describes an encapsulation syntax for data protection. It supports digital signatures, message authentication codes, and encryption. The syntax allows multiple encapsulation, so one encapsulation envelope can be nested inside another. Likewise, one party can digitally sign some previously encapsulated data. It also allows arbitrary attributes, such as signing time, to be signed along with the message content, and provides for other attributes such as countersignatures to be associated with a signature.

暗号化メッセージ構文では、データ保護のためのカプセル化構文について説明しています。デジタル署名、メッセージ認証コード、暗号化をサポートしています。この構文では複数のカプセル化が可能であるため、1つのカプセル化エンベロープを別のカプセル化の中にネストできます。同様に、一方の当事者は、以前にカプセル化されたデータにデジタル署名することができます。また、署名時間などの任意の属性をメッセージコンテンツとともに署名することを許可し、副署名などの他の属性を署名に関連付けることができます。

The Cryptographic Message Syntax can support a variety of architectures for certificate-based key management, such as the one defined by the PKIX working group.

暗号化メッセージ構文は、PKIXワーキンググループによって定義されたものなど、証明書ベースのキー管理のためのさまざまなアーキテクチャをサポートできます。

The Cryptographic Message Syntax values are generated using ASN.1 [X.208-88], using BER-encoding [X.209-88]. Values are typically represented as octet strings. While many systems are capable of transmitting arbitrary octet strings reliably, it is well known that many electronic-mail systems are not. This document does not address mechanisms for encoding octet strings for reliable transmission in such environments.

暗号化メッセージ構文の値は、BERエンコード[X.209-88]を使用して、ASN.1 [X.208-88]を使用して生成されます。値は通常、オクテット文字列として表されます。多くのシステムは任意のオクテット文字列を確実に送信できますが、多くの電子メールシステムはそうではないことはよく知られています。このドキュメントでは、そのような環境での信頼性の高い伝送のためにオクテット文字列をエンコードするメカニズムについては扱いません。

2 General Overview

2一般的な概要

The Cryptographic Message Syntax (CMS) is general enough to support many different content types. This document defines one protection content, ContentInfo. ContentInfo encapsulates a single identified content type, and the identified type may provide further encapsulation. This document defines six content types: data, signed-data, enveloped-data, digested-data, encrypted-data, and authenticated-data. Additional content types can be defined outside this document.

暗号化メッセージ構文(CMS)は、多くの異なるコンテンツタイプをサポートするのに十分一般的です。このドキュメントでは、1つの保護コンテンツであるContentInfoを定義しています。 ContentInfoは単一の識別されたコンテンツタイプをカプセル化し、識別されたタイプはさらにカプセル化を提供する場合があります。このドキュメントでは、データ、署名済みデータ、エンベロープデータ、ダイジェストデータ、暗号化データ、および認証データの6つのコンテンツタイプを定義しています。このドキュメントの外部で追加のコンテンツタイプを定義できます。

An implementation that conforms to this specification must implement the protection content, ContentInfo, and must implement the data, signed-data, and enveloped-data content types. The other content types may be implemented if desired.

この仕様に準拠する実装は、保護コンテンツContentInfoを実装する必要があり、データ、署名付きデータ、およびエンベロープデータコンテンツタイプを実装する必要があります。必要に応じて、他のコンテンツタイプを実装できます。

As a general design philosophy, each content type permits single pass processing using indefinite-length Basic Encoding Rules (BER) encoding. Single-pass operation is especially helpful if content is large, stored on tapes, or is "piped" from another process. Single- pass operation has one significant drawback: it is difficult to perform encode operations using the Distinguished Encoding Rules (DER) [X.509-88] encoding in a single pass since the lengths of the various components may not be known in advance. However, signed attributes within the signed-data content type and authenticated attributes within the authenticated-data content type require DER encoding. Signed attributes and authenticated attributes must be transmitted in DER form to ensure that recipients can verify a content that contains one or more unrecognized attributes. Signed attributes and authenticated attributes are the only CMS data types that require DER encoding.

一般的な設計哲学として、各コンテンツタイプは、不定長のBasic Encoding Rules(BER)エンコーディングを使用したシングルパス処理を許可します。シングルパス操作は、コンテンツが大きい、テープに保存されている、または別のプロセスから「パイプ」されている場合に特に役立ちます。シングルパス操作には大きな欠点が1つあります。さまざまなコンポーネントの長さが事前にわからない場合があるため、シングルパスでDistinguished Encoding Rules(DER)[X.509-88]エンコーディングを使用してエンコード操作を実行することは困難です。ただし、signed-dataコンテンツタイプ内の署名済み属性とauthentication-dataコンテンツタイプ内の認証済み属性には、DERエンコードが必要です。署名された属性と認証された属性は、受信者が1つ以上の認識されない属性を含むコンテンツを検証できるように、DER形式で送信する必要があります。署名された属性と認証された属性は、DERエンコードが必要な唯一のCMSデータ型です。

3 General Syntax

3一般的な構文

The Cryptographic Message Syntax (CMS) associates a content type identifier with a content. The syntax shall have ASN.1 type ContentInfo:

暗号化メッセージ構文(CMS)は、コンテンツタイプ識別子をコンテンツに関連付けます。構文は、ASN.1タイプContentInfoを持つ必要があります。

      ContentInfo ::= SEQUENCE {
        contentType ContentType,
        content [0] EXPLICIT ANY DEFINED BY contentType }
        
      ContentType ::= OBJECT IDENTIFIER
        

The fields of ContentInfo have the following meanings:

ContentInfoのフィールドには次の意味があります。

contentType indicates the type of the associated content. It is an object identifier; it is a unique string of integers assigned by an authority that defines the content type.

contentTypeは、関連付けられたコンテンツのタイプを示します。これはオブジェクト識別子です。これは、コンテンツタイプを定義する機関によって割り当てられた整数の一意の文字列です。

content is the associated content. The type of content can be determined uniquely by contentType. Content types for data, signed-data, enveloped-data, digested-data, encrypted-data, and authenticated-data are defined in this document. If additional content types are defined in other documents, the ASN.1 type defined should not be a CHOICE type.

contentは関連するコンテンツです。コンテンツのタイプは、contentTypeによって一意に決定できます。このドキュメントでは、データ、署名付きデータ、エンベロープデータ、ダイジェストデータ、暗号化データ、および認証済みデータのコンテンツタイプを定義します。追加のコンテンツタイプが他のドキュメントで定義されている場合、定義されたASN.1タイプはCHOICEタイプであってはなりません。

4 Data Content Type

4データコンテンツタイプ

The following object identifier identifies the data content type:

次のオブジェクト識別子は、データコンテンツタイプを識別します。

      id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1 }
        

The data content type is intended to refer to arbitrary octet strings, such as ASCII text files; the interpretation is left to the application. Such strings need not have any internal structure (although they could have their own ASN.1 definition or other structure).

データコンテンツタイプは、ASCIIテキストファイルなどの任意のオクテット文字列を参照することを目的としています。解釈はアプリケーションに委ねられます。このような文字列は、内部構造を持つ必要はありません(独自のASN.1定義または他の構造を持つこともできます)。

The data content type is generally encapsulated in the signed-data, enveloped-data, digested-data, encrypted-data, or authenticated-data content type.

データコンテンツタイプは通常、署名済みデータ、エンベロープデータ、ダイジェストデータ、暗号化データ、または認証済みデータのコンテンツタイプにカプセル化されます。

5 Signed-data Content Type

5署名付きデータコンテンツタイプ

The signed-data content type consists of a content of any type and zero or more signature values. Any number of signers in parallel can sign any type of content.

署名付きデータのコンテンツタイプは、任意のタイプのコンテンツと0個以上の署名値で構成されます。並行して任意の数の署名者が任意のタイプのコンテンツに署名できます。

The typical application of the signed-data content type represents one signer's digital signature on content of the data content type. Another typical application disseminates certificates and certificate revocation lists (CRLs).

署名付きデータコンテンツタイプの一般的なアプリケーションは、データコンテンツタイプのコンテンツに対する1人の署名者のデジタル署名を表します。別の典型的なアプリケーションは、証明書と証明書失効リスト(CRL)を配布します。

The process by which signed-data is constructed involves the following steps:

署名付きデータが構築されるプロセスには、次の手順が含まれます。

1. For each signer, a message digest, or hash value, is computed on the content with a signer-specific message-digest algorithm. If the signer is signing any information other than the content, the message digest of the content and the other information are digested with the signer's message digest algorithm (see Section 5.4), and the result becomes the "message digest."

1. 署名者ごとに、メッセージダイジェストまたはハッシュ値が、署名者固有のメッセージダイジェストアルゴリズムを使用してコンテンツで計算されます。署名者がコンテンツ以外の情報に署名している場合、コンテンツのメッセージダイジェストとその他の情報は署名者のメッセージダイジェストアルゴリズム(5.4節を参照)でダイジェストされ、結果は「メッセージダイジェスト」になります。

2. For each signer, the message digest is digitally signed using the signer's private key.

2. 署名者ごとに、メッセージダイジェストは署名者の秘密鍵を使用してデジタル署名されます。

3. For each signer, the signature value and other signer-specific information are collected into a SignerInfo value, as defined in Section 5.3. Certificates and CRLs for each signer, and those not corresponding to any signer, are collected in this step.

3. セクション5.3で定義されているように、署名者ごとに、署名値およびその他の署名者固有の情報がSignerInfo値に収集されます。この手順では、各署名者の証明書とCRL、およびどの署名者にも対応しないものを収集します。

4. The message digest algorithms for all the signers and the SignerInfo values for all the signers are collected together with the content into a SignedData value, as defined in Section 5.1.

4. セクション5.1で定義されているように、すべての署名者のメッセージダイジェストアルゴリズムとすべての署名者のSignerInfo値が、コンテンツとともにSignedData値に収集されます。

A recipient independently computes the message digest. This message digest and the signer's public key are used to verify the signature value. The signer's public key is referenced either by an issuer distinguished name along with an issuer-specific serial number or by a subject key identifier that uniquely identifies the certificate containing the public key. The signer's certificate may be included in the SignedData certificates field.

受信者は独自にメッセージダイジェストを計算します。このメッセージダイジェストと署名者の公開鍵は、署名値を検証するために使用されます。署名者の公開鍵は、発行者の識別名と発行者固有のシリアル番号、または公開鍵を含む証明書を一意に識別するサブジェクトキー識別子によって参照されます。署名者の証明書は、SignedData証明書フィールドに含めることができます。

This section is divided into six parts. The first part describes the top-level type SignedData, the second part describes EncapsulatedContentInfo, the third part describes the per-signer information type SignerInfo, and the fourth, fifth, and sixth parts describe the message digest calculation, signature generation, and signature verification processes, respectively.

このセクションは6つのパートに分かれています。最初の部分はトップレベルタイプSignedDataを説明し、2番目の部分はEncapsulatedContentInfoを説明し、3番目の部分は署名者ごとの情報タイプSignerInfoを説明し、4番目、5番目、6番目の部分はメッセージダイジェスト計算、署名生成、および署名検証を説明しますそれぞれプロセス。

5.1 SignedData Type
5.1 SignedDataタイプ

The following object identifier identifies the signed-data content type:

次のオブジェクト識別子は、署名済みデータのコンテンツタイプを識別します。

      id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
        

The signed-data content type shall have ASN.1 type SignedData:

署名済みデータのコンテンツタイプは、ASN.1タイプSignedDataを持つ必要があります。

      SignedData ::= SEQUENCE {
        version CMSVersion,
        digestAlgorithms DigestAlgorithmIdentifiers,
        encapContentInfo EncapsulatedContentInfo,
        certificates [0] IMPLICIT CertificateSet OPTIONAL,
        crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
        signerInfos SignerInfos }
        
      DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
        
      SignerInfos ::= SET OF SignerInfo
        

The fields of type SignedData have the following meanings:

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

version is the syntax version number. If no attribute certificates are present in the certificates field, the encapsulated content type is id-data, and all of the elements of SignerInfos are version 1, then the value of version shall be 1. Alternatively, if attribute certificates are present, the encapsulated content type is other than id-data, or any of the elements of SignerInfos are version 3, then the value of version shall be 3.

versionは構文のバージョン番号です。証明書フィールドに属性証明書が存在せず、カプセル化されたコンテンツタイプがid-dataであり、SignerInfosのすべての要素がバージョン1である場合、バージョンの値は1になります。または、属性証明書が存在する場合、カプセル化されたコンテンツタイプがid-data以外の場合、またはSignerInfosのいずれかの要素がバージョン3の場合、バージョンの値は3になります。

digestAlgorithms is a collection of message digest algorithm identifiers. There may be any number of elements in the collection, including zero. Each element identifies the message digest algorithm, along with any associated parameters, used by one or more signer. The collection is intended to list the message digest algorithms employed by all of the signers, in any order, to facilitate one-pass signature verification. The message digesting process is described in Section 5.4.

digestAlgorithmsは、メッセージダイジェストアルゴリズム識別子のコレクションです。コレクションには、0を含む任意の数の要素が含まれる場合があります。各要素は、1つ以上の署名者が使用するメッセージダイジェストアルゴリズムと、関連するパラメーターを識別します。コレクションは、ワンパス署名検証を容易にするために、すべての署名者が使用するメッセージダイジェストアルゴリズムを任意の順序でリストすることを目的としています。メッセージダイジェストプロセスについては、セクション5.4で説明します。

encapContentInfo is the signed content, consisting of a content type identifier and the content itself. Details of the EncapsulatedContentInfo type are discussed in section 5.2.

encapContentInfoは、コンテンツタイプ識別子とコンテンツ自体で構成される署名付きコンテンツです。 EncapsulatedContentInfoタイプの詳細については、セクション5.2で説明します。

certificates is a collection of certificates. It is intended that the set of certificates be sufficient to contain chains from a recognized "root" or "top-level certification authority" to all of the signers in the signerInfos field. There may be more certificates than necessary, and there may be certificates sufficient to contain chains from two or more independent top-level certification authorities. There may also be fewer certificates than necessary, if it is expected that recipients have an alternate means of obtaining necessary certificates (e.g., from a previous set of certificates). As discussed above, if attribute certificates are present, then the value of version shall be 3.

証明書は証明書のコレクションです。証明書のセットは、認識された「ルート」または「トップレベルの証明機関」から、signerInfosフィールドのすべての署名者へのチェーンを含めるのに十分であることを意図しています。必要以上の証明書が存在する可能性があり、2つ以上の独立したトップレベルの証明機関からのチェーンを含めるのに十分な証明書が存在する可能性があります。受信者が必要な証明書を取得する別の手段を持っていることが予想される場合(たとえば、以前の証明書のセットから)、証明書の数が必要よりも少ない場合もあります。上記のように、属性証明書が存在する場合、バージョンの値は3になります。

crls is a collection of certificate revocation lists (CRLs). It is intended that the set contain information sufficient to determine whether or not the certificates in the certificates field are valid, but such correspondence is not necessary. There may be more CRLs than necessary, and there may also be fewer CRLs than necessary.

crlsは、証明書失効リスト(CRL)のコレクションです。セットには、証明書フィールドの証明書が有効かどうかを判断するのに十分な情報が含まれていますが、このような対応は必要ありません。必要以上に多くのCRLが存在する可能性があり、必要以上に少ないCRLも存在する可能性があります。

signerInfos is a collection of per-signer information. There may be any number of elements in the collection, including zero. The details of the SignerInfo type are discussed in section 5.3.

signerInfosは、署名者ごとの情報のコレクションです。コレクションには、0を含む任意の数の要素が含まれる場合があります。 SignerInfoタイプの詳細については、セクション5.3で説明します。

5.2 EncapsulatedContentInfo Type
5.2 EncapsulatedContentInfoタイプ

The content is represented in the type EncapsulatedContentInfo:

コンテンツは、EncapsulatedContentInfoタイプで表されます。

      EncapsulatedContentInfo ::= SEQUENCE {
        eContentType ContentType,
        eContent [0] EXPLICIT OCTET STRING OPTIONAL }
        
      ContentType ::= OBJECT IDENTIFIER
        

The fields of type EncapsulatedContentInfo have the following meanings:

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

eContentType is an object identifier that uniquely specifies the content type.

eContentTypeは、コンテンツタイプを一意に指定するオブジェクト識別子です。

eContent is the content itself, carried as an octet string. The eContent need not be DER encoded.

eContentはコンテンツ自体であり、オクテット文字列として伝送されます。 eContentをDERでエンコードする必要はありません。

The optional omission of the eContent within the EncapsulatedContentInfo field makes it possible to construct "external signatures." In the case of external signatures, the content being signed is absent from the EncapsulatedContentInfo value included in the signed-data content type. If the eContent value within EncapsulatedContentInfo is absent, then the signatureValue is calculated and the eContentType is assigned as though the eContent value was present.

EncapsulatedContentInfoフィールド内のeContentの省略可能なオプションにより、「外部署名」を構築できます。外部署名の場合、署名されるコンテンツは、signed-dataコンテンツタイプに含まれるEncapsulatedContentInfo値に含まれません。 EncapsulatedContentInfo内のeContent値が存在しない場合、signatureValueが計算され、eContent値が存在するかのようにeContentTypeが割り当てられます。

In the degenerate case where there are no signers, the EncapsulatedContentInfo value being "signed" is irrelevant. In this case, the content type within the EncapsulatedContentInfo value being "signed" should be id-data (as defined in section 4), and the content field of the EncapsulatedContentInfo value should be omitted.

署名者がいない縮退した場合、「署名」されているEncapsulatedContentInfo値は無関係です。この場合、「署名」されるEncapsulatedContentInfo値内のコンテンツタイプはid-data(セクション4で定義)である必要があり、EncapsulatedContentInfo値のコンテンツフィールドは省略される必要があります。

5.3 SignerInfo Type
5.3 SignerInfoタイプ

Per-signer information is represented in the type SignerInfo:

署名者ごとの情報は、SignerInfoタイプで表されます。

      SignerInfo ::= SEQUENCE {
        version CMSVersion,
        sid SignerIdentifier,
        digestAlgorithm DigestAlgorithmIdentifier,
        signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
        signatureAlgorithm SignatureAlgorithmIdentifier,
        signature SignatureValue,
        unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
        
      SignerIdentifier ::= CHOICE {
        issuerAndSerialNumber IssuerAndSerialNumber,
        subjectKeyIdentifier [0] SubjectKeyIdentifier }
        
      SignedAttributes ::= SET SIZE (1..MAX) OF Attribute
        
      UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute
        
      Attribute ::= SEQUENCE {
        attrType OBJECT IDENTIFIER,
        attrValues SET OF AttributeValue }
        
      AttributeValue ::= ANY
        
      SignatureValue ::= OCTET STRING
        

The fields of type SignerInfo have the following meanings:

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

version is the syntax version number. If the SignerIdentifier is the CHOICE issuerAndSerialNumber, then the version shall be 1. If the SignerIdentifier is subjectKeyIdentifier, then the version shall be 3.

versionは構文のバージョン番号です。 SignerIdentifierがCHOICE issuerAndSerialNumberの場合、バージョンは1になります。SignerIdentifierがsubjectKeyIdentifierの場合、バージョンは3になります。

sid specifies the signer's certificate (and thereby the signer's public key). The signer's public key is needed by the recipient to verify the signature. SignerIdentifier provides two alternatives for specifying the signer's public key. The issuerAndSerialNumber alternative identifies the signer's certificate by the issuer's distinguished name and the certificate serial number; the subjectKeyIdentifier identifies the signer's certificate by the X.509 subjectKeyIdentifier extension value.

sidは、署名者の証明書(および署名者の公開鍵)を指定します。署名者の公開鍵は、受信者が署名を検証するために必要です。 SignerIdentifierは、署名者の公開鍵を指定するための2つの選択肢を提供します。 issuerAndSerialNumber代替は、発行者の識別名と証明書のシリアル番号によって署名者の証明書を識別します。 subjectKeyIdentifierは、X.509 subjectKeyIdentifier拡張値によって署名者の証明書を識別します。

digestAlgorithm identifies the message digest algorithm, and any associated parameters, used by the signer. The message digest is computed on either the content being signed or the content together with the signed attributes using the process described in section 5.4. The message digest algorithm should be among those listed in the digestAlgorithms field of the associated SignerData.

digestAlgorithmは、メッセージダイジェストアルゴリズム、および署名者が使用する関連パラメータを識別します。メッセージダイジェストは、署名されているコンテンツ、または5.4で説明されているプロセスを使用して、署名された属性と一緒にコンテンツのいずれかで計算されます。メッセージダイジェストアルゴリズムは、関連するSignerDataのdigestAlgorithmsフィールドにリストされているものの1つでなければなりません。

signedAttributes is a collection of attributes that are signed. The field is optional, but it must be present if the content type of the EncapsulatedContentInfo value being signed is not id-data. Each SignedAttribute in the SET must be DER encoded. Useful attribute types, such as signing time, are defined in Section 11. If the field is present, it must contain, at a minimum, the following two attributes:

signedAttributesは、署名された属性のコレクションです。このフィールドはオプションですが、署名されるEncapsulatedContentInfo値のコンテンツタイプがid-dataでない場合は存在する必要があります。 SETの各SignedAttributeは、DERエンコードする必要があります。署名時刻などの有用な属性タイプは、セクション11で定義されています。フィールドが存在する場合、少なくとも次の2つの属性が含まれている必要があります。

A content-type attribute having as its value the content type of the EncapsulatedContentInfo value being signed. Section 11.1 defines the content-type attribute. The content-type attribute is not required when used as part of a countersignature unsigned attribute as defined in section 11.4.

値として、署名されるEncapsulatedContentInfo値のコンテンツタイプを持つコンテンツタイプ属性。セクション11.1はcontent-type属性を定義しています。セクション11.4で定義されているように、副署名未署名属性の一部として使用される場合、content-type属性は必要ありません。

A message-digest attribute, having as its value the message digest of the content. Section 11.2 defines the message-digest attribute.

コンテンツのメッセージダイジェストを値として持つメッセージダイジェスト属性。セクション11.2は、message-digest属性を定義しています。

signatureAlgorithm identifies the signature algorithm, and any associated parameters, used by the signer to generate the digital signature.

signatureAlgorithmは、デジタル署名を生成するために署名者が使用する署名アルゴリズムと関連パラメーターを識別します。

signature is the result of digital signature generation, using the message digest and the signer's private key.

署名は、メッセージダイジェストと署名者の秘密鍵を使用してデジタル署名を生成した結果です。

unsignedAttributes is a collection of attributes that are not signed. The field is optional. Useful attribute types, such as countersignatures, are defined in Section 11.

unsignedAttributesは、署名されていない属性のコレクションです。このフィールドはオプションです。副署名などの有用な属性タイプは、セクション11で定義されています。

The fields of type SignedAttribute and UnsignedAttribute have the following meanings:

タイプSignedAttributeおよびUnsignedAttributeのフィールドには、次の意味があります。

attrType indicates the type of attribute. It is an object identifier.

attrTypeは属性のタイプを示します。オブジェクト識別子です。

attrValues is a set of values that comprise the attribute. The type of each value in the set can be determined uniquely by attrType.

attrValuesは、属性を構成する値のセットです。セット内の各値のタイプは、attrTypeによって一意に決定できます。

5.4 Message Digest Calculation Process
5.4 メッセージダイジェストの計算プロセス

The message digest calculation process computes a message digest on either the content being signed or the content together with the signed attributes. In either case, the initial input to the message digest calculation process is the "value" of the encapsulated content being signed. Specifically, the initial input is the encapContentInfo eContent OCTET STRING to which the signing process is applied. Only the octets comprising the value of the eContent OCTET STRING are input to the message digest algorithm, not the tag or the length octets.

メッセージダイジェスト計算プロセスは、署名されているコンテンツ、または署名された属性と一緒にコンテンツのいずれかでメッセージダイジェストを計算します。どちらの場合でも、メッセージダイジェスト計算プロセスへの最初の入力は、署名されているカプセル化されたコンテンツの「値」です。具体的には、初期入力は、署名プロセスが適用されるencapContentInfo eContent OCTET STRINGです。 eContent OCTET STRINGの値を構成するオクテットのみがメッセージダイジェストアルゴリズムに入力され、タグや長さオクテットは入力されません。

The result of the message digest calculation process depends on whether the signedAttributes field is present. When the field is absent, the result is just the message digest of the content as described above. When the field is present, however, the result is the message digest of the complete DER encoding of the SignedAttributes value contained in the signedAttributes field. Since the SignedAttributes value, when present, must contain the content type and the content message digest attributes, those values are indirectly included in the result. The content type attribute is not required when used as part of a countersignature unsigned attribute as defined in section 11.4. A separate encoding of the signedAttributes field is performed for message digest calculation. The IMPLICIT [0] tag in the signedAttributes field is not used for the DER encoding, rather an EXPLICIT SET OF tag is used. That is, the DER encoding of the SET OF tag, rather than of the IMPLICIT [0] tag, is to be included in the message digest calculation along with the length and content octets of the SignedAttributes value.

メッセージダイジェストの計算プロセスの結果は、signedAttributesフィールドが存在するかどうかによって異なります。フィールドが存在しない場合、結果は上記のコンテンツのメッセージダイジェストのみになります。ただし、フィールドが存在する場合、結果は、signedAttributesフィールドに含まれるSignedAttributes値の完全なDERエンコードのメッセージダイジェストになります。 SignedAttributes値は、存在する場合、コンテンツタイプとコンテンツメッセージダイジェスト属性を含む必要があるため、これらの値は間接的に結果に含まれます。セクション11.4で定義されているように、副署名未署名属性の一部として使用される場合、コンテンツタイプ属性は必要ありません。メッセージダイジェストの計算のために、signedAttributesフィールドの個別のエンコーディングが実行されます。 signedAttributesフィールドのIMPLICIT [0]タグはDERエンコーディングには使用されず、EXPLICIT SET OFタグが使用されます。つまり、IMPLICIT [0]タグではなく、SET OFタグのDERエンコードが、SignedAttributes値の長さとコンテンツのオクテットとともにメッセージダイジェストの計算に含まれます。

When the signedAttributes field is absent, then only the octets comprising the value of the signedData encapContentInfo eContent OCTET STRING (e.g., the contents of a file) are input to the message digest calculation. This has the advantage that the length of the content being signed need not be known in advance of the signature generation process.

signedAttributesフィールドが存在しない場合、signedData encapContentInfo eContent OCTET STRING(たとえば、ファイルのコンテンツ)の値を構成するオクテットのみがメッセージダイジェストの計算に入力されます。これは、署名されているコンテンツの長さが署名生成プロセスの前に既知である必要がないという利点があります。

Although the encapContentInfo eContent OCTET STRING tag and length octets are not included in the message digest calculation, they are still protected by other means. The length octets are protected by the nature of the message digest algorithm since it is computationally infeasible to find any two distinct messages of any length that have the same message digest.

encapContentInfo eContent OCTET STRINGタグと長さのオクテットはメッセージダイジェストの計算に含まれていませんが、それらは引き続き他の方法で保護されています。同じメッセージダイジェストを持つ任意の長さの2つの異なるメッセージを見つけることは計算上不可能であるため、長さのオクテットはメッセージダイジェストアルゴリズムの性質によって保護されています。

5.5 Message Signature Generation Process
5.5 メッセージ署名生成プロセス

The input to the signature generation process includes the result of the message digest calculation process and the signer's private key. The details of the signature generation depend on the signature algorithm employed. The object identifier, along with any parameters, that specifies the signature algorithm employed by the signer is carried in the signatureAlgorithm field. The signature value generated by the signer is encoded as an OCTET STRING and carried in the signature field.

署名生成プロセスへの入力には、メッセージダイジェスト計算プロセスの結果と署名者の秘密鍵が含まれます。署名生成の詳細は、使用される署名アルゴリズムによって異なります。署名者が使用する署名アルゴリズムを指定するオブジェクト識別子とパラメーターは、signatureAlgorithmフィールドに格納されます。署名者によって生成された署名値は、OCTET STRINGとしてエンコードされ、署名フィールドに入れられます。

5.6 Message Signature Verification Process
5.6 メッセージ署名検証プロセス

The input to the signature verification process includes the result of the message digest calculation process and the signer's public key. The recipient may obtain the correct public key for the signer by any means, but the preferred method is from a certificate obtained from the SignedData certificates field. The selection and validation of the signer's public key may be based on certification path validation (see [PROFILE]) as well as other external context, but is beyond the scope of this document. The details of the signature verification depend on the signature algorithm employed.

署名検証プロセスへの入力には、メッセージダイジェスト計算プロセスの結果と署名者の公開鍵が含まれます。受信者は任意の方法で署名者の正しい公開鍵を取得できますが、推奨される方法は、SignedData証明書フィールドから取得した証明書からです。署名者の公開鍵の選択と検証は、証明書パスの検証([PROFILE]を参照)や他の外部コンテキストに基づく場合がありますが、このドキュメントの範囲外です。署名検証の詳細は、使用される署名アルゴリズムによって異なります。

The recipient may not rely on any message digest values computed by the originator. If the signedData signerInfo includes signedAttributes, then the content message digest must be calculated as described in section 5.4. For the signature to be valid, the message digest value calculated by the recipient must be the same as the value of the messageDigest attribute included in the signedAttributes of the signedData signerInfo.

受信者は、発信者が計算したメッセージダイジェスト値に依存しない場合があります。 signedData signerInfoにsignedAttributesが含まれている場合は、コンテンツメッセージダイジェストをセクション5.4の説明に従って計算する必要があります。署名を有効にするには、受信者が計算するメッセージダイジェストの値が、signedData signerInfoのsignedAttributesに含まれるmessageDigest属性の値と同じである必要があります。

6 Enveloped-data Content Type

6エンベロープデータコンテンツタイプ

The enveloped-data content type consists of an encrypted content of any type and encrypted content-encryption keys for one or more recipients. The combination of the encrypted content and one encrypted content-encryption key for a recipient is a "digital envelope" for that recipient. Any type of content can be enveloped for an arbitrary number of recipients using any of the three key management techniques for each recipient.

エンベロープデータコンテンツタイプは、任意のタイプの暗号化コンテンツと1人以上の受信者用の暗号化コンテンツ暗号化キーで構成されます。暗号化されたコンテンツと受信者用の1つの暗号化されたコンテンツ暗号化キーの組み合わせは、その受信者の「デジタルエンベロープ」です。各受信者の3つのキー管理手法のいずれかを使用して、任意のタイプのコンテンツを任意の数の受信者にエンベロープできます。

The typical application of the enveloped-data content type will represent one or more recipients' digital envelopes on content of the data or signed-data content types.

エンベロープデータコンテンツタイプの一般的なアプリケーションは、データのコンテンツまたは署名付きデータコンテンツタイプに対する1人以上の受信者のデジタルエンベロープを表します。

Enveloped-data is constructed by the following steps:

Enveloped-dataは、次の手順で作成されます。

1. A content-encryption key for a particular content-encryption algorithm is generated at random.

1. 特定のコンテンツ暗号化アルゴリズムのコンテンツ暗号化キーはランダムに生成されます。

2. The content-encryption key is encrypted for each recipient. The details of this encryption depend on the key management algorithm used, but three general techniques are supported:

2. コンテンツ暗号化キーは、受信者ごとに暗号化されます。この暗号化の詳細は、使用される鍵管理アルゴリズムによって異なりますが、3つの一般的な手法がサポートされています。

key transport: the content-encryption key is encrypted in the recipient's public key;

キートランスポート:コンテンツ暗号化キーは受信者の公開キーで暗号化されます。

key agreement: the recipient's public key and the sender's private key are used to generate a pairwise symmetric key, then the content-encryption key is encrypted in the pairwise symmetric key; and

鍵合意:受信者の公開鍵と送信者の秘密鍵を使用してペアワイズ対称鍵が生成され、次にコンテンツ暗号化鍵がペアワイズ対称鍵で暗号化されます。そして

symmetric key-encryption keys: the content-encryption key is encrypted in a previously distributed symmetric key-encryption key.

対称キー暗号化キー:コンテンツ暗号化キーは、以前に配布された対称キー暗号化キーで暗号化されます。

3. For each recipient, the encrypted content-encryption key and other recipient-specific information are collected into a RecipientInfo value, defined in Section 6.2.

3. 受信者ごとに、暗号化されたコンテンツ暗号化キーと他の受信者固有の情報が、セクション6.2で定義されているRecipientInfo値に収集されます。

4. The content is encrypted with the content-encryption key. Content encryption may require that the content be padded to a multiple of some block size; see Section 6.3.

4. コンテンツはコンテンツ暗号化キーで暗号化されます。コンテンツの暗号化では、コンテンツをいくつかのブロックサイズの倍数に埋め込む必要がある場合があります。セクション6.3を参照してください。

5. The RecipientInfo values for all the recipients are collected together with the encrypted content to form an EnvelopedData value as defined in Section 6.1.

5. すべての受信者のRecipientInfo値は、暗号化されたコンテンツとともに収集され、セクション6.1で定義されているEnvelopedData値を形成します。

A recipient opens the digital envelope by decrypting one of the encrypted content-encryption keys and then decrypting the encrypted content with the recovered content-encryption key.

受信者は、暗号化されたコンテンツ暗号化キーの1つを復号化し、復元されたコンテンツ暗号化キーで暗号化されたコンテンツを復号化して、デジタルエンベロープを開きます。

This section is divided into four parts. The first part describes the top-level type EnvelopedData, the second part describes the per-recipient information type RecipientInfo, and the third and fourth parts describe the content-encryption and key-encryption processes.

このセクションは4つのパートに分かれています。最初の部分はトップレベルタイプのEnvelopedDataを説明し、2番目の部分は受信者ごとの情報タイプRecipientInfoを説明し、3番目と4番目の部分はコンテンツの暗号化とキー暗号化のプロセスを説明します。

6.1 EnvelopedData Type
6.1 EnvelopedData Type

The following object identifier identifies the enveloped-data content type:

次のオブジェクト識別子は、エンベロープデータコンテンツタイプを識別します。

      id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
        

The enveloped-data content type shall have ASN.1 type EnvelopedData:

エンベロープデータコンテンツタイプは、ASN.1タイプEnvelopedDataを持つ必要があります。

      EnvelopedData ::= SEQUENCE {
        version CMSVersion,
        originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
        recipientInfos RecipientInfos,
        encryptedContentInfo EncryptedContentInfo,
        unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
        
      OriginatorInfo ::= SEQUENCE {
        certs [0] IMPLICIT CertificateSet OPTIONAL,
        crls [1] IMPLICIT CertificateRevocationLists OPTIONAL }
        
      RecipientInfos ::= SET OF RecipientInfo
        
      EncryptedContentInfo ::= SEQUENCE {
        contentType ContentType,
        contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
        encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }
        
      EncryptedContent ::= OCTET STRING
        
      UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
        

The fields of type EnvelopedData have the following meanings:

EnvelopedData型のフィールドには次の意味があります。

version is the syntax version number. If originatorInfo is present, then version shall be 2. If any of the RecipientInfo structures included have a version other than 0, then the version shall be 2. If unprotectedAttrs is present, then version shall be 2. If originatorInfo is absent, all of the RecipientInfo structures are version 0, and unprotectedAttrs is absent, then version shall be 0.

versionは構文のバージョン番号です。 originatorInfoが存在する場合、バージョンは2になります。含まれるRecipientInfo構造のいずれかのバージョンが0以外の場合、バージョンは2になります。unprotectedAttrsが存在する場合、バージョンは2になります。originatorInfoが存在しない場合、すべてのRecipientInfo構造はバージョン0であり、unprotectedAttrsが存在しない場合、バージョンは0になります。

originatorInfo optionally provides information about the originator. It is present only if required by the key management algorithm. It may contain certificates and CRLs:

originatorInfoは、オプションで発信者に関する情報を提供します。これは、鍵管理アルゴリズムで必要な場合にのみ存在します。証明書とCRLが含まれている場合があります。

certs is a collection of certificates. certs may contain originator certificates associated with several different key management algorithms. certs may also contain attribute certificates associated with the originator. The certificates contained in certs are intended to be sufficient to make chains from a recognized "root" or "top-level certification authority" to all recipients. However, certs may contain more certificates than necessary, and there may be certificates sufficient to make chains from two or more independent top-level certification authorities. Alternatively, certs may contain fewer certificates than necessary, if it is expected that recipients have an alternate means of obtaining necessary certificates (e.g., from a previous set of certificates).

certsは、証明書のコレクションです。証明書には、いくつかの異なる鍵管理アルゴリズムに関連付けられた発信者証明書が含まれる場合があります。証明書には、発信者に関連付けられた属性証明書も含まれる場合があります。証明書に含まれる証明書は、認識された「ルート」または「トップレベルの証明機関」からすべての受信者へのチェーンを作成するのに十分であることを目的としています。ただし、証明書には必要以上の証明書が含まれる場合があり、2つ以上の独立したトップレベルの証明機関からチェーンを作成するのに十分な証明書が存在する場合があります。あるいは、受信者が必要な証明書を取得する別の手段を持っていることが予想される場合(たとえば、以前の証明書のセットから)、証明書に必要な数よりも少ない証明書が含まれる場合があります。

crls is a collection of CRLs. It is intended that the set contain information sufficient to determine whether or not the certificates in the certs field are valid, but such correspondence is not necessary. There may be more CRLs than necessary, and there may also be fewer CRLs than necessary.

crlsはCRLのコレクションです。セットには、certsフィールドの証明書が有効かどうかを判断するのに十分な情報が含まれていますが、このような対応は必要ありません。必要以上に多くのCRLが存在する可能性があり、必要以上に少ないCRLも存在する可能性があります。

recipientInfos is a collection of per-recipient information. There must be at least one element in the collection.

recipientInfosは、受信者ごとの情報のコレクションです。コレクションには少なくとも1つの要素が必要です。

encryptedContentInfo is the encrypted content information.

encryptedContentInfoは、暗号化されたコンテンツ情報です。

unprotectedAttrs is a collection of attributes that are not encrypted. The field is optional. Useful attribute types are defined in Section 11.

unprotectedAttrsは、暗号化されていない属性のコレクションです。このフィールドはオプションです。有用な属性タイプはセクション11で定義されています。

The fields of type EncryptedContentInfo have the following meanings:

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

contentType indicates the type of content.

contentTypeは、コンテンツのタイプを示します。

contentEncryptionAlgorithm identifies the content-encryption algorithm, and any associated parameters, used to encrypt the content. The content-encryption process is described in Section 6.3. The same content-encryption algorithm and content-encryption key is used for all recipients.

contentEncryptionAlgorithmは、コンテンツの暗号化に使用されるコンテンツ暗号化アルゴリズムと関連するパラメータを識別します。コンテンツの暗号化プロセスについては、セクション6.3で説明しています。同じコンテンツ暗号化アルゴリズムとコンテンツ暗号化キーがすべての受信者に使用されます。

encryptedContent is the result of encrypting the content. The field is optional, and if the field is not present, its intended value must be supplied by other means.

encryptedContentは、コンテンツを暗号化した結果です。フィールドはオプションであり、フィールドが存在しない場合、その意図された値は他の方法で提供する必要があります。

The recipientInfos field comes before the encryptedContentInfo field so that an EnvelopedData value may be processed in a single pass.

RecipientInfosフィールドは、encryptedContentInfoフィールドの前にあるため、EnvelopedData値を1回のパスで処理できます。

6.2 RecipientInfo Type
6.2 RecipientInfoタイプ

Per-recipient information is represented in the type RecipientInfo. RecipientInfo has a different format for the three key management techniques that are supported: key transport, key agreement, and previously distributed symmetric key-encryption keys. Any of the three key management techniques can be used for each recipient of the same encrypted content. In all cases, the content-encryption key is transferred to one or more recipient in encrypted form.

受信者ごとの情報は、RecipientInfoタイプで表されます。 RecipientInfoは、サポートされている3つの鍵管理手法(鍵転送、鍵合意、および以前に配布された対称鍵暗号鍵)に対して異なるフォーマットを持っています。同じ暗号化されたコンテンツの各受信者に対して、3つのキー管理手法のいずれかを使用できます。すべての場合において、コンテンツ暗号化キーは暗号化された形式で1人以上の受信者に転送されます。

      RecipientInfo ::= CHOICE {
        ktri KeyTransRecipientInfo,
        kari [1] KeyAgreeRecipientInfo,
        kekri [2] KEKRecipientInfo }
        
      EncryptedKey ::= OCTET STRING
        
6.2.1 KeyTransRecipientInfo Type
6.2.1 KeyTransRecipientInfoタイプ

Per-recipient information using key transport is represented in the type KeyTransRecipientInfo. Each instance of KeyTransRecipientInfo transfers the content-encryption key to one recipient.

キー転送を使用する受信者ごとの情報は、KeyTransRecipientInfoタイプで表されます。 KeyTransRecipientInfoの各インスタンスは、コンテンツ暗号化キーを1人の受信者に転送します。

      KeyTransRecipientInfo ::= SEQUENCE {
        version CMSVersion,  -- always set to 0 or 2
        rid RecipientIdentifier,
        keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
        encryptedKey EncryptedKey }
        
      RecipientIdentifier ::= CHOICE {
        issuerAndSerialNumber IssuerAndSerialNumber,
        subjectKeyIdentifier [0] SubjectKeyIdentifier }
        

The fields of type KeyTransRecipientInfo have the following meanings:

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

version is the syntax version number. If the RecipientIdentifier is the CHOICE issuerAndSerialNumber, then the version shall be 0. If the RecipientIdentifier is subjectKeyIdentifier, then the version shall be 2.

versionは構文のバージョン番号です。 RecipientIdentifierがCHOICE issuerAndSerialNumberの場合、バージョンは0になります。RecipientIdentifierがsubjectKeyIdentifierの場合、バージョンは2になります。

rid specifies the recipient's certificate or key that was used by the sender to protect the content-encryption key. The RecipientIdentifier provides two alternatives for specifying the recipient's certificate, and thereby the recipient's public key. The recipient's certificate must contain a key transport public key. The content-encryption key is encrypted with the recipient's public key. The issuerAndSerialNumber alternative identifies the recipient's certificate by the issuer's distinguished name and the certificate serial number; the subjectKeyIdentifier identifies the recipient's certificate by the X.509 subjectKeyIdentifier extension value.

ridは、コンテンツ暗号化キーを保護するために送信者が使用した受信者の証明書またはキーを指定します。 RecipientIdentifierは、受信者の証明書を指定するための2つの代替手段を提供し、それによって受信者の公開鍵を指定します。受信者の証明書には、キートランスポートの公開キーが含まれている必要があります。コンテンツ暗号化キーは、受信者の公開キーで暗号化されます。 issuerAndSerialNumber代替では、発行者の識別名と証明書のシリアル番号によって受信者の証明書を識別します。 subjectKeyIdentifierは、X.509 subjectKeyIdentifier拡張値によって受信者の証明書を識別します。

keyEncryptionAlgorithm identifies the key-encryption algorithm, and any associated parameters, used to encrypt the content-encryption key for the recipient. The key-encryption process is described in Section 6.4.

keyEncryptionAlgorithmは、受信者のコンテンツ暗号化キーを暗号化するために使用されるキー暗号化アルゴリズムと関連するパラメータを識別します。鍵暗号化プロセスについては、セクション6.4で説明します。

encryptedKey is the result of encrypting the content-encryption key for the recipient.

encryptedKeyは、受信者のコンテンツ暗号化キーを暗号化した結果です。

6.2.2 KeyAgreeRecipientInfo Type
6.2.2 KeyAgreeRecipientInfoタイプ

Recipient information using key agreement is represented in the type KeyAgreeRecipientInfo. Each instance of KeyAgreeRecipientInfo will transfer the content-encryption key to one or more recipient that uses the same key agreement algorithm and domain parameters for that algorithm.

鍵合意を使用した受信者情報は、KeyAgreeRecipientInfoタイプで表されます。 KeyAgreeRecipientInfoの各インスタンスは、コンテンツ暗号化キーを、そのアルゴリズムに同じキー合意アルゴリズムとドメインパラメータを使用する1人以上の受信者に転送します。

      KeyAgreeRecipientInfo ::= SEQUENCE {
        version CMSVersion,  -- always set to 3
        originator [0] EXPLICIT OriginatorIdentifierOrKey,
        ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
        keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
        recipientEncryptedKeys RecipientEncryptedKeys }
        
      OriginatorIdentifierOrKey ::= CHOICE {
        issuerAndSerialNumber IssuerAndSerialNumber,
        subjectKeyIdentifier [0] SubjectKeyIdentifier,
        originatorKey [1] OriginatorPublicKey }
        
      OriginatorPublicKey ::= SEQUENCE {
        algorithm AlgorithmIdentifier,
        publicKey BIT STRING }
        
      RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey
        
      RecipientEncryptedKey ::= SEQUENCE {
        rid KeyAgreeRecipientIdentifier,
        encryptedKey EncryptedKey }
        
      KeyAgreeRecipientIdentifier ::= CHOICE {
        issuerAndSerialNumber IssuerAndSerialNumber,
        rKeyId [0] IMPLICIT RecipientKeyIdentifier }
        
      RecipientKeyIdentifier ::= SEQUENCE {
        subjectKeyIdentifier SubjectKeyIdentifier,
        date GeneralizedTime OPTIONAL,
        other OtherKeyAttribute OPTIONAL }
        
      SubjectKeyIdentifier ::= OCTET STRING
        

The fields of type KeyAgreeRecipientInfo have the following meanings:

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

version is the syntax version number. It shall always be 3.

versionは構文のバージョン番号です。常に3です。

originator is a CHOICE with three alternatives specifying the sender's key agreement public key. The sender uses the corresponding private key and the recipient's public key to generate a pairwise key. The content-encryption key is encrypted in the pairwise key. The issuerAndSerialNumber alternative identifies the sender's certificate, and thereby the sender's public key, by the issuer's distinguished name and the certificate serial number. The subjectKeyIdentifier alternative identifies the sender's certificate, and thereby the sender's public key, by the X.509 subjectKeyIdentifier extension value. The originatorKey alternative includes the algorithm identifier and sender's key agreement public key. Permitting originator anonymity since the public key is not certified.

オリジネーターは、送信者の鍵合意公開鍵を指定する3つの選択肢を持つ選択肢です。送信者は、対応する秘密キーと受信者の公開キーを使用して、ペアワイズキーを生成します。コンテンツ暗号化キーはペアワイズキーで暗号化されます。 issuerAndSerialNumber代替は、発行者の識別名と証明書のシリアル番号によって、送信者の証明書を識別し、それによって送信者の公開鍵を識別します。 subjectKeyIdentifierの代替は、X.509 subjectKeyIdentifier拡張値によって送信者の証明書、したがって送信者の公開鍵を識別します。 originatorKey代替には、アルゴリズム識別子と送信者の鍵合意公開鍵が含まれます。公開鍵が認証されていないため、発信者の匿名性を許可します。

ukm is optional. With some key agreement algorithms, the sender provides a User Keying Material (UKM) to ensure that a different key is generated each time the same two parties generate a pairwise key.

ukmはオプションです。一部の鍵合意アルゴリズムでは、送信者はユーザーキーイングマテリアル(UKM)を提供して、同じ2つのパーティがペアワイズキーを生成するたびに異なるキーが生成されるようにします。

keyEncryptionAlgorithm identifies the key-encryption algorithm, and any associated parameters, used to encrypt the content-encryption key in the key-encryption key. The key-encryption process is described in Section 6.4.

keyEncryptionAlgorithmは、キー暗号化アルゴリズムのコンテンツと、キー暗号化キーのコンテンツ暗号化キーを暗号化するために使用される関連パラメータを識別します。鍵暗号化プロセスについては、セクション6.4で説明します。

recipientEncryptedKeys includes a recipient identifier and encrypted key for one or more recipients. The KeyAgreeRecipientIdentifier is a CHOICE with two alternatives specifying the recipient's certificate, and thereby the recipient's public key, that was used by the sender to generate a pairwise key-encryption key. The recipient's certificate must contain a key agreement public key. The content-encryption key is encrypted in the pairwise key-encryption key. The issuerAndSerialNumber alternative identifies the recipient's certificate by the issuer's distinguished name and the certificate serial number; the RecipientKeyIdentifier is described below. The encryptedKey is the result of encrypting the content-encryption key in the pairwise key-encryption key generated using the key agreement algorithm.

recipientEncryptedKeysには、1人以上の受信者の受信者識別子と暗号化キーが含まれています。 KeyAgreeRecipientIdentifierは、受信者の証明書を指定する2つの選択肢のある選択肢であり、これにより、ペアワイズキー暗号化キーを生成するために送信者が使用した受信者の公開キーを指定します。受信者の証明書には、鍵合意公開鍵が含まれている必要があります。コンテンツ暗号化キーは、ペアワイズキー暗号化キーで暗号化されます。 issuerAndSerialNumber代替では、発行者の識別名と証明書のシリアル番号によって受信者の証明書を識別します。 RecipientKeyIdentifierについては以下で説明します。 encryptedKeyは、キー合意アルゴリズムを使用して生成されたペアワイズキー暗号化キーのコンテンツ暗号化キーを暗号化した結果です。

The fields of type RecipientKeyIdentifier have the following meanings:

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

subjectKeyIdentifier identifies the recipient's certificate by the X.509 subjectKeyIdentifier extension value.

subjectKeyIdentifierは、X.509 subjectKeyIdentifier拡張値によって受信者の証明書を識別します。

date is optional. When present, the date specifies which of the recipient's previously distributed UKMs was used by the sender.

日付はオプションです。存在する場合、日付は、受信者が以前に配布したUKMのうち、送信者が使用したものを示します。

other is optional. When present, this field contains additional information used by the recipient to locate the public keying material used by the sender.

その他はオプションです。存在する場合、このフィールドには、受信者が送信者が使用する公開鍵情報を見つけるために使用する追加情報が含まれます。

6.2.3 KEKRecipientInfo Type
6.2.3 KEKRecipientInfoタイプ

Recipient information using previously distributed symmetric keys is represented in the type KEKRecipientInfo. Each instance of KEKRecipientInfo will transfer the content-encryption key to one or more recipients who have the previously distributed key-encryption key.

以前に配布された対称鍵を使用した受信者情報は、タイプKEKRecipientInfoで表されます。 KEKRecipientInfoの各インスタンスは、コンテンツ暗号化キーを、以前に配布されたキー暗号化キーを持つ1人以上の受信者に転送します。

      KEKRecipientInfo ::= SEQUENCE {
        version CMSVersion,  -- always set to 4
        kekid KEKIdentifier,
        keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
        encryptedKey EncryptedKey }
        
      KEKIdentifier ::= SEQUENCE {
        keyIdentifier OCTET STRING,
        date GeneralizedTime OPTIONAL,
        other OtherKeyAttribute OPTIONAL }
        

The fields of type KEKRecipientInfo have the following meanings:

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

version is the syntax version number. It shall always be 4.

versionは構文のバージョン番号です。常に4です。

kekid specifies a symmetric key-encryption key that was previously distributed to the sender and one or more recipients.

kekidは、送信者と1人以上の受信者に以前に配布された対称鍵暗号鍵を指定します。

keyEncryptionAlgorithm identifies the key-encryption algorithm, and any associated parameters, used to encrypt the content-encryption key with the key-encryption key. The key-encryption process is described in Section 6.4.

keyEncryptionAlgorithmは、コンテンツ暗号化キーをキー暗号化キーで暗号化するために使用されるキー暗号化アルゴリズムおよび関連するパラメーターを識別します。鍵暗号化プロセスについては、セクション6.4で説明します。

encryptedKey is the result of encrypting the content-encryption key in the key-encryption key.

encryptedKeyは、キー暗号化キーのコンテンツ暗号化キーを暗号化した結果です。

The fields of type KEKIdentifier have the following meanings:

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

keyIdentifier identifies the key-encryption key that was previously distributed to the sender and one or more recipients.

keyIdentifierは、送信者と1人以上の受信者に以前に配布されたキー暗号化キーを識別します。

date is optional. When present, the date specifies a single key-encryption key from a set that was previously distributed.

日付はオプションです。存在する場合、日付は、以前に配布されたセットからの単一の鍵暗号鍵を指定します。

other is optional. When present, this field contains additional information used by the recipient to determine the key-encryption key used by the sender.

その他はオプションです。存在する場合、このフィールドには、送信者が使用する鍵暗号鍵を決定するために受信者が使用する追加情報が含まれます。

6.3 Content-encryption Process
6.3 コンテンツ暗号化プロセス

The content-encryption key for the desired content-encryption algorithm is randomly generated. The data to be protected is padded as described below, then the padded data is encrypted using the content-encryption key. The encryption operation maps an arbitrary string of octets (the data) to another string of octets (the ciphertext) under control of a content-encryption key. The encrypted data is included in the envelopedData encryptedContentInfo encryptedContent OCTET STRING.

目的のコンテンツ暗号化アルゴリズムのコンテンツ暗号化キーがランダムに生成されます。保護対象のデータは、以下に説明するようにパディングされ、パディングされたデータはコンテンツ暗号化キーを使用して暗号化されます。暗号化操作は、コンテンツ暗号化キーの制御下で、オクテットの任意の文字列(データ)を別のオクテットの文字列(暗号文)にマッピングします。暗号化されたデータはenvelopedData encryptedContentInfo encryptedContent OCTET STRINGに含まれています。

The input to the content-encryption process is the "value" of the content being enveloped. Only the value octets of the envelopedData encryptedContentInfo encryptedContent OCTET STRING are encrypted; the OCTET STRING tag and length octets are not encrypted.

コンテンツ暗号化プロセスへの入力は、エンベロープされるコンテンツの「価値」です。 EnvelopedData encryptedContentInfo encryptedContent OCTET STRINGの値オクテットのみが暗号化されます。 OCTET STRINGタグと長さのオクテットは暗号化されません。

Some content-encryption algorithms assume the input length is a multiple of k octets, where k is greater than one. For such algorithms, the input shall be padded at the trailing end with k-(lth mod k) octets all having value k-(lth mod k), where lth is the length of the input. In other words, the input is padded at the trailing end with one of the following strings:

一部のコンテンツ暗号化アルゴリズムは、入力の長さがkオクテットの倍数であると想定しています。ここで、kは1より大きい値です。このようなアルゴリズムの場合、入力の末尾にk-(lth mod k)オクテットが埋め込まれ、値はすべてk-(lth mod k)になります。lthは入力の長さです。つまり、入力の末尾に次の文字列のいずれかが埋め込まれます。

01 -- if lth mod k = k-1 02 02 -- if lth mod k = k-2 . . . k k ... k k -- if lth mod k = 0

01-lth mod k = k-1の場合02 02-lth mod k = k-2の場合。 。 k k ... k k-lth mod k = 0の場合

The padding can be removed unambiguously since all input is padded, including input values that are already a multiple of the block size, and no padding string is a suffix of another. This padding method is well defined if and only if k is less than 256.

既にブロックサイズの倍数である入力値を含め、すべての入力がパディングされ、パディング文字列が別のサフィックスではないため、パディングを明確に削除できます。このパディング方法は、kが256未満の場合にのみ適切に定義されます。

6.4 Key-encryption Process
6.4 鍵暗号化プロセス

The input to the key-encryption process -- the value supplied to the recipient's key-encryption algorithm -- is just the "value" of the content-encryption key.

キー暗号化プロセスへの入力(受信者のキー暗号化アルゴリズムに提供される値)は、コンテンツ暗号化キーの単なる「値」です。

Any of the three key management techniques can be used for each recipient of the same encrypted content.

同じ暗号化されたコンテンツの各受信者に対して、3つのキー管理手法のいずれかを使用できます。

7 Digested-data Content Type

7ダイジェストデータコンテンツタイプ

The digested-data content type consists of content of any type and a message digest of the content.

ダイジェストデータコンテンツタイプは、任意のタイプのコンテンツとコンテンツのメッセージダイジェストで構成されます。

Typically, the digested-data content type is used to provide content integrity, and the result generally becomes an input to the enveloped-data content type.

通常、ダイジェストデータコンテンツタイプはコンテンツの整合性を提供するために使用され、結果は通常、エンベロープデータコンテンツタイプへの入力になります。

The following steps construct digested-data:

次の手順でダイジェストデータを作成します。

1. A message digest is computed on the content with a message-digest algorithm.

1. メッセージダイジェストは、メッセージダイジェストアルゴリズムを使用してコンテンツに対して計算されます。

2. The message-digest algorithm and the message digest are collected together with the content into a DigestedData value.

2. メッセージダイジェストアルゴリズムとメッセージダイジェストは、コンテンツとともにDigestedData値に収集されます。

A recipient verifies the message digest by comparing the message digest to an independently computed message digest.

受信者は、メッセージダイジェストを個別に計算されたメッセージダイジェストと比較することにより、メッセージダイジェストを検証します。

The following object identifier identifies the digested-data content type:

次のオブジェクト識別子は、ダイジェストデータコンテンツタイプを識別します。

      id-digestedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 5 }
        

The digested-data content type shall have ASN.1 type DigestedData:

ダイジェストデータコンテンツタイプは、ASN.1タイプのDigestedDataを持つ必要があります。

      DigestedData ::= SEQUENCE {
        version CMSVersion,
        digestAlgorithm DigestAlgorithmIdentifier,
        encapContentInfo EncapsulatedContentInfo,
        digest Digest }
        
      Digest ::= OCTET STRING
        

The fields of type DigestedData have the following meanings:

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

version is the syntax version number. If the encapsulated content type is id-data, then the value of version shall be 0; however, if the encapsulated content type is other than id-data, then the value of version shall be 2.

versionは構文のバージョン番号です。カプセル化されたコンテンツタイプがid-dataの場合、versionの値は0になります。ただし、カプセル化されたコンテンツタイプがid-data以外の場合、versionの値は2になります。

digestAlgorithm identifies the message digest algorithm, and any associated parameters, under which the content is digested. The message-digesting process is the same as in Section 5.4 in the case when there are no signed attributes.

digestAlgorithmは、メッセージダイジェストアルゴリズム、およびコンテンツがダイジェストされる関連パラメーターを識別します。署名された属性がない場合のメッセージダイジェストプロセスは、セクション5.4と同じです。

encapContentInfo is the content that is digested, as defined in section 5.2.

encapContentInfoは、セクション5.2で定義されているように、ダイジェストされたコンテンツです。

digest is the result of the message-digesting process.

ダイジェストは、メッセージダイジェストプロセスの結果です。

The ordering of the digestAlgorithm field, the encapContentInfo field, and the digest field makes it possible to process a DigestedData value in a single pass.

digestAlgorithmフィールド、encapContentInfoフィールド、およびダイジェストフィールドの順序により、DigestedData値を1回のパスで処理できます。

8 Encrypted-data Content Type

8暗号化データコンテンツタイプ

The encrypted-data content type consists of encrypted content of any type. Unlike the enveloped-data content type, the encrypted-data content type has neither recipients nor encrypted content-encryption keys. Keys must be managed by other means.

暗号化されたデータのコンテンツタイプは、任意のタイプの暗号化されたコンテンツで構成されます。エンベロープデータコンテンツタイプとは異なり、暗号化データコンテンツタイプには、受信者も暗号化コンテンツ暗号化キーもありません。キーは他の方法で管理する必要があります。

The typical application of the encrypted-data content type will be to encrypt the content of the data content type for local storage, perhaps where the encryption key is a password.

暗号化データコンテンツタイプの一般的なアプリケーションは、ローカルストレージのデータコンテンツタイプのコンテンツを暗号化することです。暗号化キーはおそらくパスワードです。

The following object identifier identifies the encrypted-data content type:

次のオブジェクト識別子は、暗号化されたデータのコンテンツタイプを識別します。

      id-encryptedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6 }
        

The encrypted-data content type shall have ASN.1 type EncryptedData:

暗号化されたデータのコンテンツタイプは、ASN.1タイプのEncryptedDataを持つ必要があります。

      EncryptedData ::= SEQUENCE {
        version CMSVersion,
        encryptedContentInfo EncryptedContentInfo,
        unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
        

The fields of type EncryptedData have the following meanings:

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

version is the syntax version number. If unprotectedAttrs is present, then version shall be 2. If unprotectedAttrs is absent, then version shall be 0.

versionは構文のバージョン番号です。 unprotectedAttrsが存在する場合、バージョンは2になります。unprotectedAttrsが存在しない場合、バージョンは0になります。

encryptedContentInfo is the encrypted content information, as defined in Section 6.1.

encryptedContentInfoは、セクション6.1で定義されている暗号化されたコンテンツ情報です。

unprotectedAttrs is a collection of attributes that are not encrypted. The field is optional. Useful attribute types are defined in Section 11.

unprotectedAttrsは、暗号化されていない属性のコレクションです。このフィールドはオプションです。有用な属性タイプはセクション11で定義されています。

9 Authenticated-data Content Type

9認証済みデータコンテンツタイプ

The authenticated-data content type consists of content of any type, a message authentication code (MAC), and encrypted authentication keys for one or more recipients. The combination of the MAC and one encrypted authentication key for a recipient is necessary for that recipient to verify the integrity of the content. Any type of content can be integrity protected for an arbitrary number of recipients.

認証データコンテンツタイプは、任意のタイプのコンテンツ、メッセージ認証コード(MAC)、および1人以上の受信者用の暗号化された認証キーで構成されます。受信者がコンテンツの整合性を検証するには、MACと受信者用の1つの暗号化された認証キーの組み合わせが必要です。どのタイプのコンテンツでも、任意の数の受信者に対して完全性を保護できます。

The process by which authenticated-data is constructed involves the following steps:

authentication-dataが構築されるプロセスには、以下のステップが含まれます。

1. A message-authentication key for a particular message-authentication algorithm is generated at random.

1. 特定のメッセージ認証アルゴリズムのメッセージ認証キーはランダムに生成されます。

2. The message-authentication key is encrypted for each recipient. The details of this encryption depend on the key management algorithm used.

2. メッセージ認証キーは、受信者ごとに暗号化されます。この暗号化の詳細は、使用される鍵管理アルゴリズムによって異なります。

3. For each recipient, the encrypted message-authentication key and other recipient-specific information are collected into a RecipientInfo value, defined in Section 6.2.

3. 受信者ごとに、暗号化されたメッセージ認証キーとその他の受信者固有の情報が、セクション6.2で定義されているRecipientInfo値に収集されます。

4. Using the message-authentication key, the originator computes a MAC value on the content. If the originator is authenticating any information in addition to the content (see Section 9.2), a message digest is calculated on the content, the message digest of the content and the other information are authenticated using the message-authentication key, and the result becomes the "MAC value."

4. 発信者はメッセージ認証キーを使用して、コンテンツのMAC値を計算します。発信者がコンテンツに加えて何らかの情報を認証している場合(セクション9.2を参照)、メッセージダイジェストがコンテンツで計算され、コンテンツのメッセージダイジェストと他の情報がメッセージ認証キーを使用して認証され、結果は次のようになります。 「MAC値」。

9.1 AuthenticatedData Type
9.1 認証済みデータ型

The following object identifier identifies the authenticated-data content type:

次のオブジェクト識別子は、authenticated-dataコンテンツタイプを識別します。

      id-ct-authData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
          ct(1) 2 }
        

The authenticated-data content type shall have ASN.1 type AuthenticatedData:

authentication-dataコンテンツタイプは、ASN.1タイプAuthenticatedDataを持つ必要があります。

      AuthenticatedData ::= SEQUENCE {
        version CMSVersion,
        originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
        recipientInfos RecipientInfos,
        macAlgorithm MessageAuthenticationCodeAlgorithm,
        digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
        encapContentInfo EncapsulatedContentInfo,
        authenticatedAttributes [2] IMPLICIT AuthAttributes OPTIONAL,
        mac MessageAuthenticationCode,
        unauthenticatedAttributes [3] IMPLICIT UnauthAttributes OPTIONAL }
        
      AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
        
      UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
        
      MessageAuthenticationCode ::= OCTET STRING
        

The fields of type AuthenticatedData have the following meanings:

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

version is the syntax version number. It shall be 0.

versionは構文のバージョン番号です。 0とする。

originatorInfo optionally provides information about the originator. It is present only if required by the key management algorithm. It may contain certificates, attribute certificates, and CRLs, as defined in Section 6.1.

originatorInfoは、オプションで発信者に関する情報を提供します。これは、鍵管理アルゴリズムで必要な場合にのみ存在します。セクション6.1で定義されているように、証明書、属性証明書、およびCRLを含めることができます。

recipientInfos is a collection of per-recipient information, as defined in Section 6.1. There must be at least one element in the collection.

recipientInfosは、セクション6.1で定義されている、受信者ごとの情報のコレクションです。コレクションには少なくとも1つの要素が必要です。

macAlgorithm is a message authentication code (MAC) algorithm identifier. It identifies the MAC algorithm, along with any associated parameters, used by the originator. Placement of the macAlgorithm field facilitates one-pass processing by the recipient.

macAlgorithmは、メッセージ認証コード(MAC)アルゴリズムの識別子です。発信者が使用するMACアルゴリズムと、関連するパラメータを識別します。 macAlgorithmフィールドを配置すると、受信者によるワンパス処理が容易になります。

digestAlgorithm identifies the message digest algorithm, and any associated parameters, used to compute a message digest on the encapsulated content if authenticated attributes are present. The message digesting process is described in Section 9.2. Placement of the digestAlgorithm field facilitates one-pass processing by the recipient. If the digestAlgorithm field is present, then the authenticatedAttributes field must also be present.

digestAlgorithmは、認証された属性が存在する場合に、カプセル化されたコンテンツのメッセージダイジェストを計算するために使用されるメッセージダイジェストアルゴリズムおよび関連するパラメーターを識別します。メッセージダイジェストプロセスについては、セクション9.2で説明します。 digestAlgorithmフィールドを配置すると、受信者によるワンパス処理が容易になります。 digestAlgorithmフィールドが存在する場合、authenticationAttributesフィールドも存在する必要があります。

encapContentInfo is the content that is authenticated, as defined in section 5.2.

encapContentInfoは、セクション5.2で定義されているように、認証されるコンテンツです。

authenticatedAttributes is a collection of authenticated attributes. The authenticatedAttributes structure is optional, but it must be present if the content type of the EncapsulatedContentInfo value being authenticated is not id-data. If the authenticatedAttributes field is present, then the digestAlgorithm field must also be present. Each AuthenticatedAttribute in the SET must be DER encoded. Useful attribute types are defined in Section 11. If the authenticatedAttributes field is present, it must contain, at a minimum, the following two attributes:

authenticationAttributesは、認証された属性のコレクションです。 authenticationAttributes構造はオプションですが、認証されるEncapsulatedContentInfo値のコンテンツタイプがid-dataでない場合は存在する必要があります。 authenticationAttributesフィールドが存在する場合は、digestAlgorithmフィールドも存在する必要があります。 SETの各AuthenticatedAttributeは、DERエンコードする必要があります。有用な属性タイプはセクション11で定義されています。authenticationAttributesフィールドが存在する場合、少なくとも次の2つの属性が含まれている必要があります。

A content-type attribute having as its value the content type of the EncapsulatedContentInfo value being authenticated. Section 11.1 defines the content-type attribute.

認証されるEncapsulatedContentInfo値のコンテンツタイプを値として持つコンテンツタイプ属性。セクション11.1はcontent-type属性を定義しています。

A message-digest attribute, having as its value the message digest of the content. Section 11.2 defines the message-digest attribute.

コンテンツのメッセージダイジェストを値として持つメッセージダイジェスト属性。セクション11.2は、message-digest属性を定義しています。

mac is the message authentication code.

macはメッセージ認証コードです。

unauthenticatedAttributes is a collection of attributes that are not authenticated. The field is optional. To date, no attributes have been defined for use as unauthenticated attributes, but other useful attribute types are defined in Section 11.

unauthenticatedAttributesは、認証されていない属性のコレクションです。このフィールドはオプションです。これまでのところ、認証されていない属性として使用するための属性は定義されていませんが、その他の有用な属性タイプはセクション11で定義されています。

9.2 MAC Generation
9.2 MAC生成

The MAC calculation process computes a message authentication code (MAC) on either the message being authenticated or a message digest of message being authenticated together with the originator's authenticated attributes.

MAC計算プロセスは、認証されているメッセージ、または認証されているメッセージのメッセージダイジェストと、発信者の認証された属性を組み合わせて、メッセージ認証コード(MAC)を計算します。

If authenticatedAttributes field is absent, the input to the MAC calculation process is the value of the encapContentInfo eContent OCTET STRING. Only the octets comprising the value of the eContent OCTET STRING are input to the MAC algorithm; the tag and the length octets are omitted. This has the advantage that the length of the content being authenticated need not be known in advance of the MAC generation process.

authenticationAttributesフィールドが存在しない場合、MAC計算プロセスへの入力は、encapContentInfo eContent OCTET STRINGの値です。 eContent OCTET STRINGの値を構成するオクテットのみがMACアルゴリズムに入力されます。タグと長さのオクテットは省略されています。これには、認証されるコンテンツの長さがMAC生成プロセスの前に既知である必要がないという利点があります。

If authenticatedAttributes field is present, the content-type attribute (as described in Section 11.1) and the message-digest attribute (as described in section 11.2) must be included, and the input to the MAC calculation process is the DER encoding of authenticatedAttributes. A separate encoding of the authenticatedAttributes field is performed for message digest calculation. The IMPLICIT [2] tag in the authenticatedAttributes field is not used for the DER encoding, rather an EXPLICIT SET OF tag is used. That is, the DER encoding of the SET OF tag, rather than of the IMPLICIT [2] tag, is to be included in the message digest calculation along with the length and content octets of the authenticatedAttributes value.

authenticationAttributesフィールドが存在する場合、コンテンツタイプ属性(セクション11.1で説明)とメッセージダイジェスト属性(セクション11.2で説明)を含める必要があり、MAC計算プロセスへの入力は、authenticationAttributesのDERエンコーディングです。メッセージダイジェストの計算では、authenticatedAttributesフィールドの個別のエンコーディングが実行されます。 authenticationAttributesフィールドのIMPLICIT [2]タグはDERエンコーディングには使用されず、EXPLICIT SET OFタグが使用されます。つまり、IMPLICIT [2]タグではなく、SET OFタグのDERエンコードが、authenticationAttributes値の長さとコンテンツのオクテットとともにメッセージダイジェストの計算に含まれます。

The message digest calculation process computes a message digest on the content being authenticated. The initial input to the message digest calculation process is the "value" of the encapsulated content being authenticated. Specifically, the input is the encapContentInfo eContent OCTET STRING to which the authentication process is applied. Only the octets comprising the value of the encapContentInfo eContent OCTET STRING are input to the message digest algorithm, not the tag or the length octets. This has the advantage that the length of the content being authenticated need not be known in advance. Although the encapContentInfo eContent OCTET STRING tag and length octets are not included in the message digest calculation, they are still protected by other means. The length octets are protected by the nature of the message digest algorithm since it is computationally infeasible to find any two distinct messages of any length that have the same message digest.

メッセージダイジェスト計算プロセスは、認証されるコンテンツのメッセージダイジェストを計算します。メッセージダイジェスト計算プロセスへの最初の入力は、認証されるカプセル化されたコンテンツの「値」です。具体的には、入力は、認証プロセスが適用されるencapContentInfo eContent OCTET STRINGです。 encapContentInfo eContent OCTET STRINGの値を構成するオクテットのみがメッセージダイジェストアルゴリズムに入力され、タグや長さのオクテットは入力されません。これには、認証されるコンテンツの長さが事前にわかっている必要がないという利点があります。 encapContentInfo eContent OCTET STRINGタグと長さのオクテットはメッセージダイジェストの計算に含まれていませんが、それらは引き続き他の方法で保護されています。同じメッセージダイジェストを持つ任意の長さの2つの異なるメッセージを見つけることは計算上不可能であるため、長さのオクテットはメッセージダイジェストアルゴリズムの性質によって保護されています。

The input to the MAC calculation process includes the MAC input data, defined above, and an authentication key conveyed in a recipientInfo structure. The details of MAC calculation depend on the MAC algorithm employed (e.g., HMAC). The object identifier, along with any parameters, that specifies the MAC algorithm employed by the originator is carried in the macAlgorithm field. The MAC value generated by the originator is encoded as an OCTET STRING and carried in the mac field.

MAC計算プロセスへの入力には、上記で定義されたMAC入力データと、recipientInfo構造体で伝達される認証キーが含まれます。 MAC計算の詳細は、使用するMACアルゴリズム(HMACなど)によって異なります。発信者が使用するMACアルゴリズムを指定するオブジェクト識別子とパラメーターは、macAlgorithmフィールドに格納されます。発信者によって生成されたMAC値は、OCTET STRINGとしてエンコードされ、macフィールドに入れられます。

9.3 MAC Verification
9.3 MAC検証

The input to the MAC verification process includes the input data (determined based on the presence or absence of the authenticatedAttributes field, as defined in 9.2), and the authentication key conveyed in recipientInfo. The details of the MAC verification process depend on the MAC algorithm employed.

MAC検証プロセスへの入力には、入力データ(9.2で定義されているauthenticationAttributesフィールドの有無に基づいて決定されます)、およびrecipientInfoで伝達される認証キーが含まれます。 MAC検証プロセスの詳細は、使用するMACアルゴリズムによって異なります。

The recipient may not rely on any MAC values or message digest values computed by the originator. The content is authenticated as described in section 9.2. If the originator includes authenticated attributes, then the content of the authenticatedAttributes is authenticated as described in section 9.2. For authentication to succeed, the message MAC value calculated by the recipient must be the same as the value of the mac field. Similarly, for authentication to succeed when the authenticatedAttributes field is present, the content message digest value calculated by the recipient must be the same as the message digest value included in the authenticatedAttributes message-digest attribute.

受信者は、発信者が計算したMAC値またはメッセージダイジェスト値に依存しない場合があります。コンテンツは、セクション9.2で説明されているように認証されます。発信者に認証済み属性が含まれている場合、セクション9.2で説明されているように、authenticationAttributesのコンテンツが認証されます。認証が成功するためには、受信者によって計算されたメッセージMAC値がmacフィールドの値と同じである必要があります。同様に、authenticationAttributesフィールドが存在するときに認証が成功するためには、受信者によって計算されるコンテンツメッセージダイジェスト値が、authenticationAttributesメッセージダイジェスト属性に含まれるメッセージダイジェスト値と同じである必要があります。

10 Useful Types

10便利なタイプ

This section is divided into two parts. The first part defines algorithm identifiers, and the second part defines other useful types.

このセクションは2つの部分に分かれています。最初の部分はアルゴリズム識別子を定義し、2番目の部分は他の有用なタイプを定義します。

10.1 Algorithm Identifier Types
10.1 アルゴリズム識別子のタイプ

All of the algorithm identifiers have the same type: AlgorithmIdentifier. The definition of AlgorithmIdentifier is imported from X.509 [X.509-88].

アルゴリズム識別子はすべて同じタイプです:AlgorithmIdentifier。 AlgorithmIdentifierの定義はX.509 [X.509-88]からインポートされます。

There are many alternatives for each type of algorithm listed. For each of these five types, Section 12 lists the algorithms that must be included in a CMS implementation.

リストされているアルゴリズムのタイプごとに多くの選択肢があります。これらの5つのタイプのそれぞれについて、セクション12では、CMS実装に含める必要があるアルゴリズムをリストしています。

10.1.1 DigestAlgorithmIdentifier
10.1.1 DigestAlgorithmIdentifier

The DigestAlgorithmIdentifier type identifies a message-digest algorithm. Examples include SHA-1, MD2, and MD5. A message-digest algorithm maps an octet string (the message) to another octet string (the message digest).

DigestAlgorithmIdentifierタイプは、メッセージダイジェストアルゴリズムを識別します。例には、SHA-1、MD2、およびMD5が含まれます。メッセージダイジェストアルゴリズムは、オクテット文字列(メッセージ)を別のオクテット文字列(メッセージダイジェスト)にマッピングします。

      DigestAlgorithmIdentifier ::= AlgorithmIdentifier
        
10.1.2 SignatureAlgorithmIdentifier
10.1.2 SignatureAlgorithmIdentifier

The SignatureAlgorithmIdentifier type identifies a signature algorithm. Examples include DSS and RSA. A signature algorithm supports signature generation and verification operations. The signature generation operation uses the message digest and the signer's private key to generate a signature value. The signature verification operation uses the message digest and the signer's public key to determine whether or not a signature value is valid. Context determines which operation is intended.

SignatureAlgorithmIdentifierタイプは、署名アルゴリズムを識別します。例としては、DSSおよびRSAがあります。署名アルゴリズムは、署名の生成と検証の操作をサポートしています。署名生成操作では、メッセージダイジェストと署名者の秘密鍵を使用して署名値を生成します。署名検証操作では、メッセージダイジェストと署名者の公開鍵を使用して、署名値が有効かどうかを判断します。コンテキストは、意図する操作を決定します。

      SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
        
10.1.3 KeyEncryptionAlgorithmIdentifier
10.1.3 KeyEncryptionAlgorithmIdentifier

The KeyEncryptionAlgorithmIdentifier type identifies a key-encryption algorithm used to encrypt a content-encryption key. The encryption operation maps an octet string (the key) to another octet string (the encrypted key) under control of a key-encryption key. The decryption operation is the inverse of the encryption operation. Context determines which operation is intended.

KeyEncryptionAlgorithmIdentifierタイプは、コンテンツ暗号化キーの暗号化に使用されるキー暗号化アルゴリズムを識別します。暗号化操作は、キー暗号化キーの制御下で、オクテット文字列(キー)を別のオクテット文字列(暗号化キー)にマッピングします。復号化操作は、暗号化操作の逆です。コンテキストは、意図する操作を決定します。

The details of encryption and decryption depend on the key management algorithm used. Key transport, key agreement, and previously distributed symmetric key-encrypting keys are supported.

暗号化と復号化の詳細は、使用する鍵管理アルゴリズムによって異なります。鍵転送、鍵合意、および以前に配布された対称鍵暗号鍵がサポートされています。

      KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
        
10.1.4 ContentEncryptionAlgorithmIdentifier
10.1.4 ContentEncryptionAlgorithmIdentifier

The ContentEncryptionAlgorithmIdentifier type identifies a content-encryption algorithm. Examples include Triple-DES and RC2. A content-encryption algorithm supports encryption and decryption operations. The encryption operation maps an octet string (the message) to another octet string (the ciphertext) under control of a content-encryption key. The decryption operation is the inverse of the encryption operation. Context determines which operation is intended.

ContentEncryptionAlgorithmIdentifierタイプは、コンテンツ暗号化アルゴリズムを識別します。例には、Triple-DESおよびRC2が含まれます。コンテンツ暗号化アルゴリズムは、暗号化および復号化操作をサポートします。暗号化操作は、コンテンツ暗号化キーの制御下で、オクテット文字列(メッセージ)を別のオクテット文字列(暗号文)にマッピングします。復号化操作は、暗号化操作の逆です。コンテキストは、意図する操作を決定します。

      ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
        
10.1.5 MessageAuthenticationCodeAlgorithm
10.1.5 MessageAuthenticationCodeAlgorithm

The MessageAuthenticationCodeAlgorithm type identifies a message authentication code (MAC) algorithm. Examples include DES-MAC and HMAC. A MAC algorithm supports generation and verification operations. The MAC generation and verification operations use the same symmetric key. Context determines which operation is intended.

MessageAuthenticationCodeAlgorithmタイプは、メッセージ認証コード(MAC)アルゴリズムを識別します。例には、DES-MACおよびHMACが含まれます。 MACアルゴリズムは、生成および検証操作をサポートします。 MAC生成および検証操作では、同じ対称鍵を使用します。コンテキストは、意図する操作を決定します。

      MessageAuthenticationCodeAlgorithm ::= AlgorithmIdentifier
        
10.2 Other Useful Types
10.2 その他の便利なタイプ

This section defines types that are used other places in the document. The types are not listed in any particular order.

このセクションでは、ドキュメントの他の場所で使用されるタイプを定義します。タイプは特定の順序でリストされていません。

10.2.1 CertificateRevocationLists
10.2.1 CertificateRevocationLists

The CertificateRevocationLists type gives a set of certificate revocation lists (CRLs). It is intended that the set contain information sufficient to determine whether the certificates and attribute certificates with which the set is associated are revoked or not. However, there may be more CRLs than necessary or there may be fewer CRLs than necessary.

CertificateRevocationListsタイプは、証明書失効リスト(CRL)のセットを提供します。セットには、セットが関連付けられている証明書および属性証明書が取り消されているかどうかを判断するのに十分な情報が含まれていることが意図されています。ただし、CRLが必要以上に多い場合や、CRLが必要以下の場合があります。

The CertificateList may contain a CRL, an Authority Revocation List (ARL), a Delta Revocation List, or an Attribute Certificate Revocation List. All of these lists share a common syntax.

CertificateListには、CRL、Authority Revocation List(ARL)、Delta Revocation List、またはAttribute Certificate Revocation Listを含めることができます。これらのリストはすべて、共通の構文を共有しています。

CRLs are specified in X.509 [X.509-97], and they are profiled for use in the Internet in RFC 2459 [PROFILE].

CRLはX.509 [X.509-97]で指定されており、RFC 2459 [PROFILE]でインターネットで使用するためにプロファイルされています。

The definition of CertificateList is imported from X.509.

CertificateListの定義はX.509からインポートされます。

      CertificateRevocationLists ::= SET OF CertificateList
        
10.2.2 CertificateChoices
10.2.2 CertificateChoices

The CertificateChoices type gives either a PKCS #6 extended certificate [PKCS#6], an X.509 certificate, or an X.509 attribute certificate [X.509-97]. The PKCS #6 extended certificate is obsolete. PKCS #6 certificates are included for backward compatibility, and their use should be avoided. The Internet profile of X.509 certificates is specified in the "Internet X.509 Public Key Infrastructure: Certificate and CRL Profile" [PROFILE].

CertificateChoicesタイプは、PKCS#6拡張証明書[PKCS#6]、X.509証明書、またはX.509属性証明書[X.509-97]のいずれかを提供します。 PKCS#6拡張証明書は廃止されました。 PKCS#6証明書は下位互換性のために含まれており、その使用は避けてください。 X.509証明書のインターネットプロファイルは、「インターネットX.509公開鍵インフラストラクチャ:証明書とCRLプロファイル」[プロファイル]で指定されています。

The definitions of Certificate and AttributeCertificate are imported from X.509.

CertificateおよびAttributeCertificateの定義はX.509からインポートされます。

      CertificateChoices ::= CHOICE {
         certificate Certificate,                 -- See X.509
         extendedCertificate [0] IMPLICIT ExtendedCertificate,
                                                  -- Obsolete
         attrCert [1] IMPLICIT AttributeCertificate }
                                                  -- See X.509 and X9.57
        
10.2.3 CertificateSet
10.2.3 CertificateSet

The CertificateSet type provides a set of certificates. It is intended that the set be sufficient to contain chains from a recognized "root" or "top-level certification authority" to all of the sender certificates with which the set is associated. However, there may be more certificates than necessary, or there may be fewer than necessary.

CertificateSetタイプは、証明書のセットを提供します。セットは、認識された「ルート」または「トップレベルの証明機関」から、セットが関連付けられているすべての送信者証明書までのチェーンを含めるのに十分であることを意図しています。ただし、必要以上に多くの証明書がある場合や、必要な数より少ない場合があります。

The precise meaning of a "chain" is outside the scope of this document. Some applications may impose upper limits on the length of a chain; others may enforce certain relationships between the subjects and issuers of certificates within a chain.

「チェーン」の正確な意味は、このドキュメントの範囲外です。一部のアプリケーションでは、チェーンの長さに上限を課す場合があります。チェーン内のサブジェクトと証明書の発行者の間の特定の関係を強制するものもあります。

      CertificateSet ::= SET OF CertificateChoices
        
10.2.4 IssuerAndSerialNumber
10.2.4 IssuerAndSerialNumber

The IssuerAndSerialNumber type identifies a certificate, and thereby an entity and a public key, by the distinguished name of the certificate issuer and an issuer-specific certificate serial number.

IssuerAndSerialNumberタイプは、証明書を識別し、証明書の発行者の識別名と発行者固有の証明書のシリアル番号によって、証明書とエンティティおよび公開キーを識別します。

The definition of Name is imported from X.501 [X.501-88], and the definition of CertificateSerialNumber is imported from X.509 [X.509-97].

Nameの定義はX.501 [X.501-88]からインポートされ、CertificateSerialNumberの定義はX.509 [X.509-97]からインポートされます。

      IssuerAndSerialNumber ::= SEQUENCE {
        issuer Name,
        serialNumber CertificateSerialNumber }
        
      CertificateSerialNumber ::= INTEGER
        
10.2.5 CMSVersion
10.2.5 CMSVersion

The Version type gives a syntax version number, for compatibility with future revisions of this document.

バージョンタイプは、このドキュメントの将来のリビジョンとの互換性のために、構文のバージョン番号を提供します。

      CMSVersion ::= INTEGER  { v0(0), v1(1), v2(2), v3(3), v4(4) }
        
10.2.6 UserKeyingMaterial
10.2.6 UserKeyingMaterial

The UserKeyingMaterial type gives a syntax for user keying material (UKM). Some key agreement algorithms require UKMs to ensure that a different key is generated each time the same two parties generate a pairwise key. The sender provides a UKM for use with a specific key agreement algorithm.

UserKeyingMaterialタイプは、ユーザーキー素材(UKM)の構文を提供します。一部の鍵合意アルゴリズムでは、UKMが同じ2つのパーティがペアワイズ鍵を生成するたびに異なる鍵が生成されるようにする必要があります。送信者は、特定の鍵合意アルゴリズムで使用するUKMを提供します。

      UserKeyingMaterial ::= OCTET STRING
        
10.2.7 OtherKeyAttribute
10.2.7 OtherKeyAttribute

The OtherKeyAttribute type gives a syntax for the inclusion of other key attributes that permit the recipient to select the key used by the sender. The attribute object identifier must be registered along with the syntax of the attribute itself. Use of this structure should be avoided since it may impede interoperability.

OtherKeyAttributeタイプは、受信者が送信者が使用するキーを選択できるようにする他のキー属性を含めるための構文を提供します。属性オブジェクト識別子は、属性自体の構文とともに登録する必要があります。この構造は相互運用性を妨げる可能性があるため、使用しないでください。

      OtherKeyAttribute ::= SEQUENCE {
        keyAttrId OBJECT IDENTIFIER,
        keyAttr ANY DEFINED BY keyAttrId OPTIONAL }
        

11 Useful Attributes

11便利な属性

This section defines attributes that may be used with signed-data, enveloped-data, encrypted-data, or authenticated-data. The syntax of Attribute is compatible with X.501 [X.501-88] and RFC 2459 [PROFILE]. Some of the attributes defined in this section were originally defined in PKCS #9 [PKCS#9], others were not previously defined. The attributes are not listed in any particular order.

このセクションでは、signed-data、enveloped-data、encrypted-data、またはauthentication-dataで使用できる属性を定義します。属性の構文は、X.501 [X.501-88]およびRFC 2459 [PROFILE]と互換性があります。このセクションで定義されている属性には、元々PKCS#9 [PKCS#9]で定義されていたものと、以前に定義されていなかったものがあります。属性は特定の順序でリストされていません。

Additional attributes are defined in many places, notably the S/MIME Version 3 Message Specification [MSG] and the Enhanced Security Services for S/MIME [ESS], which also include recommendations on the placement of these attributes.

S / MIMEバージョン3メッセージ仕様[MSG]やS / MIMEのセキュリティ強化サービス[ESS]など、多くの場所で追加の属性が定義されています。これらの属性には、これらの属性の配置に関する推奨事項も含まれています。

11.1 Content Type
11.1 コンテンツタイプ

The content-type attribute type specifies the content type of the ContentInfo value being signed in signed-data. The content-type attribute type is required if there are any authenticated attributes present.

content-type属性タイプは、signed-dataで署名されるContentInfo値のコンテンツタイプを指定します。認証された属性が存在する場合は、content-type属性タイプが必要です。

The content-type attribute must be a signed attribute or an authenticated attribute; it cannot be an unsigned attribute, an unauthenticated attribute, or an unprotectedAttribute.

content-type属性は、署名された属性または認証された属性でなければなりません。署名されていない属性、認証されていない属性、またはunprotectedAttributeであってはなりません。

The following object identifier identifies the content-type attribute:

次のオブジェクト識別子はcontent-type属性を識別します。

      id-contentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs9(9) 3 }
        

Content-type attribute values have ASN.1 type ContentType:

Content-type属性値には、ASN.1タイプContentTypeがあります。

      ContentType ::= OBJECT IDENTIFIER
        

A content-type attribute must have a single attribute value, even though the syntax is defined as a SET OF AttributeValue. There must not be zero or multiple instances of AttributeValue present.

構文がSET OF AttributeValueとして定義されている場合でも、コンテンツタイプの属性には単一の属性値が必要です。ゼロまたは複数のAttributeValueのインスタンスが存在していてはなりません。

The SignedAttributes and AuthAttributes syntaxes are each defined as a SET OF Attributes. The SignedAttributes in a signerInfo must not include multiple instances of the content-type attribute. Similarly, the AuthAttributes in an AuthenticatedData must not include multiple instances of the content-type attribute.

SignedAttributesおよびAuthAttributes構文はそれぞれ、SET OF属性として定義されます。 signerInfoのSignedAttributesには、content-type属性の複数のインスタンスを含めることはできません。同様に、AuthenticatedDataのAuthAttributesには、content-type属性の複数のインスタンスを含めることはできません。

11.2 Message Digest
11.2 メッセージダイジェスト

The message-digest attribute type specifies the message digest of the encapContentInfo eContent OCTET STRING being signed in signed-data (see section 5.4) or authenticated in authenticated-data (see section 9.2). For signed-data, the message digest is computed using the signer's message digest algorithm. For authenticated-data, the message digest is computed using the originator's message digest algorithm.

message-digest属性タイプは、signed-data(セクション5.4を参照)で署名されているか、authenticated-data(セクション9.2を参照)で認証されているencapContentInfo eContent OCTET STRINGのメッセージダイジェストを指定します。署名付きデータの場合、メッセージダイジェストは、署名者のメッセージダイジェストアルゴリズムを使用して計算されます。認証データの場合、メッセージダイジェストは発信者のメッセージダイジェストアルゴリズムを使用して計算されます。

Within signed-data, the message-digest signed attribute type is required if there are any attributes present. Within authenticated-data, the message-digest authenticated attribute type is required if there are any attributes present.

signed-data内で、属性が存在する場合は、メッセージダイジェストの署名済み属性タイプが必要です。 authentication-data内で、属性が存在する場合は、message-digest認証済み属性タイプが必要です。

The message-digest attribute must be a signed attribute or an authenticated attribute; it cannot be an unsigned attribute or an unauthenticated attribute.

message-digest属性は、署名された属性または認証された属性でなければなりません。署名されていない属性または認証されていない属性であってはなりません。

The following object identifier identifies the message-digest attribute:

次のオブジェクト識別子は、メッセージダイジェスト属性を識別します。

      id-messageDigest OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs9(9) 4 }
        

Message-digest attribute values have ASN.1 type MessageDigest:

メッセージダイジェスト属性値には、ASN.1タイプのMessageDigestがあります。

      MessageDigest ::= OCTET STRING
        

A message-digest attribute must have a single attribute value, even though the syntax is defined as a SET OF AttributeValue. There must not be zero or multiple instances of AttributeValue present.

構文がSET OF AttributeValueとして定義されている場合でも、メッセージダイジェスト属性には単一の属性値が必要です。ゼロまたは複数のAttributeValueのインスタンスが存在していてはなりません。

The SignedAttributes syntax is defined as a SET OF Attributes. The SignedAttributes in a signerInfo must not include multiple instances of the message-digest attribute.

SignedAttributes構文は、SET OF属性として定義されます。 signerInfoのSignedAttributesには、メッセージダイジェスト属性の複数のインスタンスを含めることはできません。

11.3 Signing Time
11.3 署名時間

The signing-time attribute type specifies the time at which the signer (purportedly) performed the signing process. The signing-time attribute type is intended for use in signed-data.

signing-time属性タイプは、署名者が(意図的に)署名プロセスを実行した時間を指定します。 signing-time属性タイプは、signed-dataで使用するためのものです。

The signing-time attribute may be a signed attribute; it cannot be an unsigned attribute, an authenticated attribute, or an unauthenticated attribute.

signing-time属性は、signed属性である場合があります。署名されていない属性、認証された属性、または認証されていない属性であってはなりません。

The following object identifier identifies the signing-time attribute:

次のオブジェクト識別子は、署名時属性を識別します。

      id-signingTime OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs9(9) 5 }
        

Signing-time attribute values have ASN.1 type SigningTime:

Signing-time属性値には、ASN.1タイプSigningTimeがあります。

      SigningTime ::= Time
        
      Time ::= CHOICE {
        utcTime          UTCTime,
        generalizedTime  GeneralizedTime }
        

Note: The definition of Time matches the one specified in the 1997 version of X.509 [X.509-97].

注:Timeの定義は、1997バージョンのX.509 [X.509-97]で指定されたものと一致します。

Dates between 1 January 1950 and 31 December 2049 (inclusive) must be encoded as UTCTime. Any dates with year values before 1950 or after 2049 must be encoded as GeneralizedTime.

1950年1月1日から2049年12月31日までの日付は、UTCTimeとしてエンコードする必要があります。 1950年より前または2049年より後の年の値を持つ日付は、GeneralizedTimeとしてエンコードする必要があります。

UTCTime values must be expressed in Greenwich Mean Time (Zulu) and must include seconds (i.e., times are YYMMDDHHMMSSZ), even where the number of seconds is zero. Midnight (GMT) must be represented as "YYMMDD000000Z". Century information is implicit, and the century must be determined as follows:

UTCTime値はグリニッジ標準時(Zulu)で表す必要があり、秒数がゼロの場合でも秒を含める必要があります(つまり、時間はYYMMDDHHMMSSZです)。深夜(GMT)は "YYMMDD000000Z"と表記する必要があります。世紀の情報は暗黙的であり、世紀は次のように決定する必要があります。

Where YY is greater than or equal to 50, the year shall be interpreted as 19YY; and

YYが50以上の場合、年は19YYと解釈されます。そして

Where YY is less than 50, the year shall be interpreted as 20YY.

YYが50未満の場合、年は20YYと解釈されます。

GeneralizedTime values shall be expressed in Greenwich Mean Time (Zulu) and must include seconds (i.e., times are YYYYMMDDHHMMSSZ), even where the number of seconds is zero. GeneralizedTime values must not include fractional seconds.

GeneralizedTime値はグリニッジ標準時(ズールー語)で表され、秒数がゼロの場合でも秒を含める必要があります(つまり、時間はYYYYMMDDHHMMSSZです)。 GeneralizedTime値に小数秒を含めることはできません。

A signing-time attribute must have a single attribute value, even though the syntax is defined as a SET OF AttributeValue. There must not be zero or multiple instances of AttributeValue present.

構文がSET OF AttributeValueとして定義されている場合でも、署名時属性には単一の属性値が必要です。ゼロまたは複数のAttributeValueのインスタンスが存在していてはなりません。

The SignedAttributes syntax is defined as a SET OF Attributes. The SignedAttributes in a signerInfo must not include multiple instances of the signing-time attribute.

SignedAttributes構文は、SET OF属性として定義されます。 signerInfoのSignedAttributesには、signing-time属性の複数のインスタンスを含めることはできません。

No requirement is imposed concerning the correctness of the signing time, and acceptance of a purported signing time is a matter of a recipient's discretion. It is expected, however, that some signers, such as time-stamp servers, will be trusted implicitly.

署名時刻の正確性に関して要件は課せられておらず、署名時刻の主張の受け入れは受信者の裁量の問題です。ただし、タイムスタンプサーバーなどの一部の署名者は暗黙的に信頼されることが予想されます。

11.4 Countersignature
11.4 副署

The countersignature attribute type specifies one or more signatures on the contents octets of the DER encoding of the signatureValue field of a SignerInfo value in signed-data. Thus, the countersignature attribute type countersigns (signs in serial) another signature.

countersignature属性タイプは、signed-dataのSignerInfo値のsignatureValueフィールドのDERエンコーディングのコンテンツオクテットに1つ以上の署名を指定します。したがって、副署属性タイプは別の署名に副署(連番で署名)します。

The countersignature attribute must be an unsigned attribute; it cannot be a signed attribute, an authenticated attribute, or an unauthenticated attribute.

副署名属性は、署名されていない属性でなければなりません。署名付き属性、認証済み属性、または非認証属性にすることはできません。

The following object identifier identifies the countersignature attribute:

次のオブジェクト識別子は、副署名属性を識別します。

      id-countersignature OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs9(9) 6 }
        

Countersignature attribute values have ASN.1 type Countersignature:

副署属性値には、ASN.1タイプの副署があります。

      Countersignature ::= SignerInfo
        

Countersignature values have the same meaning as SignerInfo values for ordinary signatures, except that:

副署名の値は、以下の点を除いて、通常の署名のSignerInfo値と同じ意味を持っています。

1. The signedAttributes field must contain a message-digest attribute if it contains any other attributes, but need not contain a content-type attribute, as there is no content type for countersignatures.

1. 署名にはコンテンツタイプがないため、signedAttributesフィールドには、他の属性が含まれている場合はmessage-digest属性を含める必要がありますが、content-type属性を含める必要はありません。

2. The input to the message-digesting process is the contents octets of the DER encoding of the signatureValue field of the SignerInfo value with which the attribute is associated.

2. メッセージダイジェストプロセスへの入力は、属性が関連付けられているSignerInfo値のsignatureValueフィールドのDERエンコーディングのコンテンツオクテットです。

A countersignature attribute can have multiple attribute values. The syntax is defined as a SET OF AttributeValue, and there must be one or more instances of AttributeValue present.

副署名属性は、複数の属性値を持つことができます。構文はSET OF AttributeValueとして定義され、AttributeValueの1つ以上のインスタンスが存在する必要があります。

The UnsignedAttributes syntax is defined as a SET OF Attributes. The UnsignedAttributes in a signerInfo may include multiple instances of the countersignature attribute.

UnsignedAttributes構文は、SET OF属性として定義されます。 signerInfoのUnsignedAttributesには、副署名属性の複数のインスタンスが含まれる場合があります。

A countersignature, since it has type SignerInfo, can itself contain a countersignature attribute. Thus it is possible to construct arbitrarily long series of countersignatures.

副署は、SignerInfoタイプであるため、それ自体が副署属性を含むことができます。したがって、任意の長さの一連の副署名を構築することが可能です。

12 Supported Algorithms

12サポートされているアルゴリズム

This section lists the algorithms that must be implemented. Additional algorithms that should be implemented are also included.

このセクションでは、実装する必要があるアルゴリズムを示します。実装する必要がある追加のアルゴリズムも含まれています。

12.1 Digest Algorithms
12.1 ダイジェストアルゴリズム

CMS implementations must include SHA-1. CMS implementations should include MD5.

CMSの実装にはSHA-1を含める必要があります。 CMSの実装にはMD5を含める必要があります。

Digest algorithm identifiers are located in the SignedData digestAlgorithms field, the SignerInfo digestAlgorithm field, the DigestedData digestAlgorithm field, and the AuthenticatedData digestAlgorithm field.

ダイジェストアルゴリズムの識別子は、SignedData digestAlgorithmsフィールド、SignerInfo digestAlgorithmフィールド、DigestedData digestAlgorithmフィールド、およびAuthenticatedData digestAlgorithmフィールドにあります。

Digest values are located in the DigestedData digest field, and digest values are located in the Message Digest authenticated attribute. In addition, digest values are input to signature algorithms.

ダイジェスト値はDigestedDataダイジェストフィールドにあり、ダイジェスト値はMessage Digest認証済み属性にあります。さらに、ダイジェスト値は署名アルゴリズムに入力されます。

12.1.1 SHA-1
12.1.1 シャー1

The SHA-1 digest algorithm is defined in FIPS Pub 180-1 [SHA1]. The algorithm identifier for SHA-1 is:

SHA-1ダイジェストアルゴリズムは、FIPS Pub 180-1 [SHA1]で定義されています。 SHA-1のアルゴリズム識別子は次のとおりです。

      sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
          oiw(14) secsig(3) algorithm(2) 26 }
        

The AlgorithmIdentifier parameters field is optional. If present, the parameters field must contain an ASN.1 NULL. Implementations should accept SHA-1 AlgorithmIdentifiers with absent parameters as well as NULL parameters. Implementations should generate SHA-1 AlgorithmIdentifiers with NULL parameters.

AlgorithmIdentifierパラメータフィールドはオプションです。存在する場合、パラメータフィールドにはASN.1 NULLが含まれている必要があります。実装では、パラメーターが存在しないSHA-1 AlgorithmIdentifierとNULLパラメーターを受け入れる必要があります。実装では、NULLパラメータを持つSHA-1 AlgorithmIdentifiersを生成する必要があります。

12.1.2 MD5
12.1.2 スモーキー

The MD5 digest algorithm is defined in RFC 1321 [MD5]. The algorithm identifier for MD5 is:

MD5ダイジェストアルゴリズムはRFC 1321 [MD5]で定義されています。 MD5のアルゴリズム識別子は次のとおりです。

      md5 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
          rsadsi(113549) digestAlgorithm(2) 5 }
        

The AlgorithmIdentifier parameters field must be present, and the parameters field must contain NULL. Implementations may accept the MD5 AlgorithmIdentifiers with absent parameters as well as NULL parameters.

AlgorithmIdentifierパラメータフィールドが存在し、パラメータフィールドにNULLが含まれている必要があります。実装は、パラメータが存在しないMD5 AlgorithmIdentifiersとNULLパラメータを受け入れる場合があります。

12.2 Signature Algorithms
12.2 署名アルゴリズム

CMS implementations must include DSA. CMS implementations may include RSA.

CMS実装にはDSAを含める必要があります。 CMSの実装にはRSAが含まれる場合があります。

Signature algorithm identifiers are located in the SignerInfo signatureAlgorithm field. Also, signature algorithm identifiers are located in the SignerInfo signatureAlgorithm field of countersignature attributes.

署名アルゴリズム識別子は、SignerInfoのsignatureAlgorithmフィールドにあります。また、署名アルゴリズム識別子は、副署名属性のSignerInfo signatureAlgorithmフィールドにあります。

Signature values are located in the SignerInfo signature field. Also, signature values are located in the SignerInfo signature field of countersignature attributes.

署名の値は、SignerInfo署名フィールドにあります。また、署名値は、副署名属性のSignerInfo署名フィールドにあります。

12.2.1 DSA
12.2.1 DSA

The DSA signature algorithm is defined in FIPS Pub 186 [DSS]. DSA is always used with the SHA-1 message digest algorithm. The algorithm identifier for DSA is:

DSA署名アルゴリズムは、FIPS Pub 186 [DSS]で定義されています。 DSAは常にSHA-1メッセージダイジェストアルゴリズムで使用されます。 DSAのアルゴリズム識別子は次のとおりです。

      id-dsa-with-sha1 OBJECT IDENTIFIER ::=  { iso(1) member-body(2)
          us(840) x9-57 (10040) x9cm(4) 3 }
        

The AlgorithmIdentifier parameters field must not be present.

AlgorithmIdentifierパラメーターフィールドが存在してはなりません。

12.2.2 RSA
12.2.2 RSA

The RSA signature algorithm is defined in RFC 2347 [NEWPKCS#1]. RFC 2347 specifies the use of the RSA signature algorithm with the SHA-1 and MD5 message digest algorithms. The algorithm identifier for RSA is:

RSA署名アルゴリズムはRFC 2347 [NEWPKCS#1]で定義されています。 RFC 2347は、SHA-1およびMD5メッセージダイジェストアルゴリズムでのRSA署名アルゴリズムの使用を指定しています。 RSAのアルゴリズム識別子は次のとおりです。

      rsaEncryption OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 1 }
        
12.3 Key Management Algorithms
12.3 鍵管理アルゴリズム

CMS accommodates three general key management techniques: key agreement, key transport, and previously distributed symmetric key-encryption keys.

CMSは、3つの一般的な鍵管理手法に対応します。それは、鍵合意、鍵転送、および以前に配布された対称鍵暗号鍵です。

12.3.1 Key Agreement Algorithms
12.3.1 鍵合意アルゴリズム

CMS implementations must include key agreement using X9.42 Ephemeral-Static Diffie-Hellman.

CMSの実装には、X9.42 Ephemeral-Static Diffie-Hellmanを使用した主要な合意を含める必要があります。

Any symmetric encryption algorithm that a CMS implementation includes as a content-encryption algorithm must also be included as a key- encryption algorithm. CMS implementations must include key agreement of Triple-DES pairwise key-encryption keys and Triple-DES wrapping of Triple-DES content-encryption keys. CMS implementations should include key agreement of RC2 pairwise key-encryption keys and RC2 wrapping of RC2 content-encryption keys. The key wrap algorithm for Triple-DES and RC2 is described in section 12.3.3.

CMS実装にコンテンツ暗号化アルゴリズムとして含まれている対称暗号化アルゴリズムは、キー暗号化アルゴリズムとしても含まれている必要があります。 CMS実装には、Triple-DESペアワイズキー暗号化キーのキー合意と、Triple-DESコンテンツ暗号化キーのTriple-DESラッピングを含める必要があります。 CMSの実装には、RC2ペアワイズキー暗号化キーのキーアグリーメントとRC2コンテンツ暗号化キーのRC2ラッピングを含める必要があります。 Triple-DESおよびRC2のキーラップアルゴリズムについては、セクション12.3.3で説明します。

A CMS implementation may support mixed key-encryption and content-encryption algorithms. For example, a 128-bit RC2 content-encryption key may be wrapped with 168-bit Triple-DES key-encryption key. Similarly, a 40-bit RC2 content-encryption key may be wrapped with 128-bit RC2 key-encryption key.

CMS実装は、キー暗号化アルゴリズムとコンテンツ暗号化アルゴリズムの混合をサポートする場合があります。たとえば、128ビットのRC2コンテンツ暗号化キーは、168ビットのTriple-DESキー暗号化キーでラップできます。同様に、40ビットのRC2コンテンツ暗号化キーは、128ビットのRC2キー暗号化キーでラップできます。

For key agreement of RC2 key-encryption keys, 128 bits must be generated as input to the key expansion process used to compute the RC2 effective key [RC2].

RC2キー暗号化キーのキー合意では、RC2有効キーの計算に使用されるキー拡張プロセスへの入力として128ビットを生成する必要があります[RC2]。

Key agreement algorithm identifiers are located in the EnvelopedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithm and AuthenticatedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithm fields.

鍵合意アルゴリズム識別子は、EnvelopedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithmおよびAuthenticatedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithmフィールドにあります。

Key wrap algorithm identifiers are located in the KeyWrapAlgorithm parameters within the EnvelopedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithm and AuthenticatedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithm fields.

キーラップアルゴリズム識別子は、EnvelopedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithmおよびAuthenticatedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithmフィールド内のKeyWrapAlgorithmパラメータにあります。

Wrapped content-encryption keys are located in the EnvelopedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKey field. Wrapped message-authentication keys are located in the AuthenticatedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKey field.

ラップされたコンテンツ暗号化キーは、EnvelopedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKeyフィールドにあります。ラップされたメッセージ認証キーは、AuthenticatedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKeyフィールドにあります。

12.3.1.1 X9.42 Ephemeral-Static Diffie-Hellman
12.3.1.1 X9.42一時的静的Diffie-Hellman

Ephemeral-Static Diffie-Hellman key agreement is defined in RFC 2631 [DH-X9.42]. When using Ephemeral-Static Diffie-Hellman, the EnvelopedData RecipientInfos KeyAgreeRecipientInfo and AuthenticatedData RecipientInfos KeyAgreeRecipientInfo fields are used as follows:

Ephemeral-Static Diffie-Hellman鍵合意は、RFC 2631 [DH-X9.42]で定義されています。 Ephemeral-Static Diffie-Hellmanを使用する場合、EnvelopedData RecipientInfos KeyAgreeRecipientInfoおよびAuthenticatedData RecipientInfos KeyAgreeRecipientInfoフィールドは次のように使用されます。

version must be 3.

バージョンは3でなければなりません。

originator must be the originatorKey alternative. The originatorKey algorithm fields must contain the dh-public-number object identifier with absent parameters. The originatorKey publicKey field must contain the sender's ephemeral public key. The dh-public-number object identifier is:

originatorはoriginatorKeyの代替である必要があります。 originatorKeyアルゴリズムフィールドには、パラメーターのないdh-public-numberオブジェクト識別子が含まれている必要があります。 originatorKey publicKeyフィールドには、送信者の一時的な公開鍵を含める必要があります。 dh-public-numberオブジェクト識別子は次のとおりです。

         dh-public-number OBJECT IDENTIFIER ::= { iso(1) member-body(2)
             us(840) ansi-x942(10046) number-type(2) 1 }
        

ukm may be absent. When present, the ukm is used to ensure that a different key-encryption key is generated when the ephemeral private key might be used more than once.

ukmが存在しない可能性があります。存在する場合、ukmは、一時的な秘密鍵が複数回使用される可能性がある場合に、別の鍵暗号鍵が確実に生成されるようにするために使用されます。

keyEncryptionAlgorithm must be the id-alg-ESDH algorithm identifier. The algorithm identifier parameter field for id-alg-ESDH is KeyWrapAlgorihtm, and this parameter must be present. The KeyWrapAlgorithm denotes the symmetric encryption algorithm used to encrypt the content-encryption key with the pairwise key-encryption key generated using the Ephemeral-Static Diffie-Hellman key agreement algorithm. Triple-DES and RC2 key wrap algorithms are discussed in section 12.3.3. The id-alg-ESDH algorithm identifier and parameter syntax is:

keyEncryptionAlgorithmは、id-alg-ESDHアルゴリズム識別子である必要があります。 id-alg-ESDHのアルゴリズム識別子パラメーターフィールドはKeyWrapAlgorihtmであり、このパラメーターが存在する必要があります。 KeyWrapAlgorithmは、Ephemeral-Static Diffie-Hellmanキー合意アルゴリズムを使用して生成されたペアワイズキー暗号化キーでコンテンツ暗号化キーを暗号化するために使用される対称暗号化アルゴリズムを示します。 Triple-DESおよびRC2キーラップアルゴリズムについては、セクション12.3.3で説明します。 id-alg-ESDHアルゴリズムの識別子とパラメーターの構文は次のとおりです。

       id-alg-ESDH OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
           rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 5 }
        
       KeyWrapAlgorithm ::= AlgorithmIdentifier
        

recipientEncryptedKeys contains an identifier and an encrypted key for each recipient. The RecipientEncryptedKey KeyAgreeRecipientIdentifier must contain either the issuerAndSerialNumber identifying the recipient's certificate or the RecipientKeyIdentifier containing the subject key identifier from the recipient's certificate. In both cases, the recipient's certificate contains the recipient's static public key. RecipientEncryptedKey EncryptedKey must contain the content-encryption key encrypted with the Ephemeral-Static Diffie-Hellman generated pairwise key-encryption key using the algorithm specified by the KeyWrapAlgortihm.

recipientEncryptedKeysには、各受信者の識別子と暗号化されたキーが含まれています。 RecipientEncryptedKey KeyAgreeRecipientIdentifierには、受信者の証明書を識別するissuerAndSerialNumberまたは受信者の証明書のサブジェクトキー識別子を含むRecipientKeyIdentifierのいずれかが含まれている必要があります。どちらの場合も、受信者の証明書には受信者の静的公開鍵が含まれています。 RecipientEncryptedKey EncryptedKeyには、KeyWrapAlgortihmで指定されたアルゴリズムを使用して、Ephemeral-Static Diffie-Hellmanが生成したペアワイズキー暗号化キーで暗号化されたコンテンツ暗号化キーが含まれている必要があります。

12.3.2 Key Transport Algorithms
12.3.2 主要な転送アルゴリズム

CMS implementations should include key transport using RSA. RSA implementations must include key transport of Triple-DES content-encryption keys. RSA implementations should include key transport of RC2 content-encryption keys.

CMSの実装には、RSAを使用したキー転送を含める必要があります。 RSA実装には、Triple-DESコンテンツ暗号化キーのキー転送を含める必要があります。 RSA実装には、RC2コンテンツ暗号化キーのキートランスポートを含める必要があります。

Key transport algorithm identifiers are located in the EnvelopedData RecipientInfos KeyTransRecipientInfo keyEncryptionAlgorithm and AuthenticatedData RecipientInfos KeyTransRecipientInfo keyEncryptionAlgorithm fields.

鍵転送アルゴリズムの識別子は、EnvelopedData RecipientInfos KeyTransRecipientInfo keyEncryptionAlgorithmおよびAuthenticatedData RecipientInfos KeyTransRecipientInfo keyEncryptionAlgorithmフィールドにあります。

Key transport encrypted content-encryption keys are located in the EnvelopedData RecipientInfos KeyTransRecipientInfo encryptedKey field. Key transport encrypted message-authentication keys are located in the AuthenticatedData RecipientInfos KeyTransRecipientInfo encryptedKey field.

キートランスポートで暗号化されたコンテンツ暗号化キーは、EnvelopedData RecipientInfos KeyTransRecipientInfo encryptedKeyフィールドにあります。鍵転送暗号化メッセージ認証鍵は、AuthenticatedData RecipientInfos KeyTransRecipientInfo encryptedKeyフィールドにあります。

12.3.2.1 RSA
12.3.2.1 RSA

The RSA key transport algorithm is the RSA encryption scheme defined in RFC 2313 [PKCS#1], block type is 02, where the message to be encrypted is the content-encryption key. The algorithm identifier for RSA is:

RSAキートランスポートアルゴリズムは、RFC 2313 [PKCS#1]で定義されたRSA暗号化スキームであり、ブロックタイプは02です。ここで、暗号化されるメッセージはコンテンツ暗号化キーです。 RSAのアルゴリズム識別子は次のとおりです。

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

The AlgorithmIdentifier parameters field must be present, and the parameters field must contain NULL.

AlgorithmIdentifierパラメータフィールドが存在し、パラメータフィールドにNULLが含まれている必要があります。

When using a Triple-DES content-encryption key, adjust the parity bits for each DES key comprising the Triple-DES key prior to RSA encryption.

Triple-DESコンテンツ暗号化キーを使用する場合、RSA暗号化の前に、Triple-DESキーを構成する各DESキーのパリティビットを調整します。

The use of RSA encryption, as defined in RFC 2313 [PKCS#1], to provide confidentiality has a known vulnerability concerns. The vulnerability is primarily relevant to usage in interactive applications rather than to store-and-forward environments. Further information and proposed countermeasures are discussed in the Security Considerations section of this document.

RFC 2313 [PKCS#1]で定義されているRSA暗号化を使用して機密性を提供することには、既知の脆弱性の懸念があります。この脆弱性は、ストアアンドフォワード環境ではなく、主にインタラクティブアプリケーションでの使用に関連しています。詳細情報と提案された対策は、このドキュメントの「セキュリティに関する考慮事項」セクションで説明されています。

Note that the same encryption scheme is also defined in RFC 2437 [NEWPKCS#1]. Within RFC 2437, this scheme is called RSAES-PKCS1-v1_5.

同じ暗号化スキームがRFC 2437 [NEWPKCS#1]でも定義されていることに注意してください。 RFC 2437では、このスキームはRSAES-PKCS1-v1_5と呼ばれています。

12.3.3 Symmetric Key-Encryption Key Algorithms
12.3.3 対称鍵暗号鍵アルゴリズム

CMS implementations may include symmetric key-encryption key management. Such CMS implementations must include Triple-DES key-encryption keys wrapping Triple-DES content-encryption keys, and such CMS implementations should include RC2 key-encryption keys wrapping RC2 content-encryption keys. Only 128-bit RC2 keys may be used as key-encryption keys, and they must be used with the RC2ParameterVersion parameter set to 58. A CMS implementation may support mixed key-encryption and content-encryption algorithms. For example, a 40-bit RC2 content-encryption key may be wrapped with 168-bit Triple-DES key-encryption key or with a 128-bit RC2 key-encryption key.

CMSの実装には、対称キー暗号化キー管理が含まれる場合があります。このようなCMS実装には、Triple-DESコンテンツ暗号化キーをラップするTriple-DESキー暗号化キーを含める必要があり、そのようなCMS実装には、RC2コンテンツ暗号化キーをラップするRC2キー暗号化キーを含める必要があります。鍵暗号化鍵として使用できるのは128ビットのRC2鍵のみであり、RC2ParameterVersionパラメーターを58に設定して使用する必要があります。CMS実装では、鍵暗号化アルゴリズムとコンテンツ暗号化アルゴリズムの混合がサポートされる場合があります。たとえば、40ビットのRC2コンテンツ暗号化キーは、168ビットのTriple-DESキー暗号化キーまたは128ビットのRC2キー暗号化キーでラップできます。

Key wrap algorithm identifiers are located in the EnvelopedData RecipientInfos KEKRecipientInfo keyEncryptionAlgorithm and AuthenticatedData RecipientInfos KEKRecipientInfo keyEncryptionAlgorithm fields.

キーラップアルゴリズム識別子は、EnvelopedData RecipientInfos KEKRecipientInfo keyEncryptionAlgorithmおよびAuthenticatedData RecipientInfos KEKRecipientInfo keyEncryptionAlgorithmフィールドにあります。

Wrapped content-encryption keys are located in the EnvelopedData RecipientInfos KEKRecipientInfo encryptedKey field. Wrapped message-authentication keys are located in the AuthenticatedData RecipientInfos KEKRecipientInfo encryptedKey field.

ラップされたコンテンツ暗号化キーは、EnvelopedData RecipientInfos KEKRecipientInfo encryptedKeyフィールドにあります。ラップされたメッセージ認証キーは、AuthenticatedData RecipientInfos KEKRecipientInfo encryptedKeyフィールドにあります。

The output of a key agreement algorithm is a key-encryption key, and this key-encryption key is used to encrypt the content-encryption key. In conjunction with key agreement algorithms, CMS implementations must include encryption of content-encryption keys with the pairwise key-encryption key generated using a key agreement algorithm. To support key agreement, key wrap algorithm identifiers are located in the KeyWrapAlgorithm parameter of the EnvelopedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithm and AuthenticatedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithm fields. Wrapped content-encryption keys are located in the EnvelopedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKey field, wrapped message-authentication keys are located in the AuthenticatedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKey field.

鍵合意アルゴリズムの出力は鍵暗号鍵であり、この鍵暗号鍵はコンテンツ暗号鍵の暗号化に使用されます。鍵合意アルゴリズムと組み合わせて、CMS実装には、鍵合意アルゴリズムを使用して生成されたペアワイズ鍵暗号鍵によるコンテンツ暗号鍵の暗号化を含める必要があります。鍵合意をサポートするために、鍵ラップアルゴリズム識別子は、EnvelopedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithmおよびAuthenticatedData RecipientInfos KeyAgreeRecipientInfo keyEncryptionAlgorithmフィールドのKeyWrapAlgorithmパラメーターにあります。ラップされたコンテンツ暗号化キーはEnvelopedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKeyフィールドにあり、ラップされたメッセージ認証キーはAuthenticatedData RecipientInfos KeyAgreeRecipientInfo RecipientEncryptedKeys encryptedKeyフィールドにあります。

12.3.3.1 Triple-DES Key Wrap
12.3.3.1 Triple-DESキーラップ

Triple-DES key encryption has the algorithm identifier:

Triple-DESキー暗号化には、アルゴリズム識別子があります。

      id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 }
        

The AlgorithmIdentifier parameter field must be NULL.

AlgorithmIdentifierパラメーターフィールドはNULLでなければなりません。

The key wrap algorithm used to encrypt a Triple-DES content-encryption key with a Triple-DES key-encryption key is specified in section 12.6.

Triple-DESコンテンツ暗号化キーをTriple-DESキー暗号化キーで暗号化するために使用されるキーラップアルゴリズムは、セクション12.6で指定されています。

Out-of-band distribution of the Triple-DES key-encryption key used to encrypt the Triple-DES content-encryption key is beyond of the scope of this document.

Triple-DESコンテンツ暗号化キーの暗号化に使用されるTriple-DESキー暗号化キーの帯域外配布は、このドキュメントの範囲外です。

12.3.3.2 RC2 Key Wrap
12.3.3.2 RC2キーラップ

RC2 key encryption has the algorithm identifier:

RC2キー暗号化には、アルゴリズム識別子があります。

      id-alg-CMSRC2wrap OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 7 }
        

The AlgorithmIdentifier parameter field must be RC2wrapParameter:

AlgorithmIdentifierパラメーターフィールドはRC2wrapParameterである必要があります。

      RC2wrapParameter ::= RC2ParameterVersion
        
      RC2ParameterVersion ::= INTEGER
        

The RC2 effective-key-bits (key size) greater than 32 and less than 256 is encoded in the RC2ParameterVersion. For the effective-key-bits of 40, 64, and 128, the rc2ParameterVersion values are 160, 120, and 58 respectively. These values are not simply the RC2 key length. Note that the value 160 must be encoded as two octets (00 A0), because the one octet (A0) encoding represents a negative number.

RC2ParameterVersionでは、32より大きく256より小さいRC2有効キービット(キーサイズ)がエンコードされます。 40、64、および128の有効キービットの場合、rc2ParameterVersion値はそれぞれ160、120、および58です。これらの値は、単にRC2キーの長さではありません。 1オクテット(A0)エンコードは負の数を表すため、値160は2オクテット(00 A0)としてエンコードする必要があることに注意してください。

Only 128-bit RC2 keys may be used as key-encryption keys, and they must be used with the RC2ParameterVersion parameter set to 58.

鍵暗号鍵として使用できるのは128ビットのRC2鍵のみであり、RC2ParameterVersionパラメーターを58に設定して使用する必要があります。

The key wrap algorithm used to encrypt a RC2 content-encryption key with a RC2 key-encryption key is specified in section 12.6.

RC2コンテンツ暗号化キーをRC2キー暗号化キーで暗号化するために使用されるキーラップアルゴリズムは、セクション12.6で指定されています。

Out-of-band distribution of the RC2 key-encryption key used to encrypt the RC2 content-encryption key is beyond of the scope of this document.

RC2コンテンツ暗号化キーの暗号化に使用されるRC2キー暗号化キーの帯域外配布は、このドキュメントの範囲外です。

12.4 Content Encryption Algorithms
12.4 コンテンツ暗号化アルゴリズム

CMS implementations must include Triple-DES in CBC mode. CMS implementations should include RC2 in CBC mode.

CMSの実装には、CBCモードのTriple-DESを含める必要があります。 CMS実装には、CBCモードのRC2を含める必要があります。

Content encryption algorithms identifiers are located in the EnvelopedData EncryptedContentInfo contentEncryptionAlgorithm and the EncryptedData EncryptedContentInfo contentEncryptionAlgorithm fields.

コンテンツ暗号化アルゴリズムの識別子は、EnvelopedData EncryptedContentInfo contentEncryptionAlgorithmおよびEncryptedData EncryptedContentInfo contentEncryptionAlgorithmフィールドにあります。

Content encryption algorithms are used to encipher the content located in the EnvelopedData EncryptedContentInfo encryptedContent field and the EncryptedData EncryptedContentInfo encryptedContent field.

コンテンツ暗号化アルゴリズムは、EnvelopedData EncryptedContentInfo encryptedContentフィールドとEncryptedData EncryptedContentInfo encryptedContentフィールドにあるコンテンツを暗号化するために使用されます。

12.4.1 Triple-DES CBC
12.4.1 Triple-DES CBC

The Triple-DES algorithm is described in ANSI X9.52 [3DES]. The Triple-DES is composed from three sequential DES [DES] operations: encrypt, decrypt, and encrypt. Three-Key Triple-DES uses a different key for each DES operation. Two-Key Triple-DES uses one key for the two encrypt operations and different key for the decrypt operation. The same algorithm identifiers are used for Three-Key Triple-DES and Two-Key Triple-DES. The algorithm identifier for Triple-DES in Cipher Block Chaining (CBC) mode is:

Triple-DESアルゴリズムは、ANSI X9.52 [3DES]で説明されています。 Triple-DESは、暗号化、復号化、および暗号化の3つの順次DES [DES]操作で構成されています。 Three-Key Triple-DESは、DES操作ごとに異なるキーを使用します。 Two-Key Triple-DESは、2つの暗号化操作に1つのキーを使用し、復号化操作に異なるキーを使用します。 Three-Key Triple-DESおよびTwo-Key Triple-DESにも同じアルゴリズム識別子が使用されます。暗号ブロック連鎖(CBC)モードのTriple-DESのアルゴリズム識別子は次のとおりです。

      des-ede3-cbc OBJECT IDENTIFIER ::= { iso(1) member-body(2)
          us(840) rsadsi(113549) encryptionAlgorithm(3) 7 }
        

The AlgorithmIdentifier parameters field must be present, and the parameters field must contain a CBCParameter:

AlgorithmIdentifierパラメータフィールドが存在し、パラメータフィールドにCBCParameterが含まれている必要があります。

      CBCParameter ::= IV
        
      IV ::= OCTET STRING  -- exactly 8 octets
        
12.4.2 RC2 CBC
12.4.2 RC2 CBC

The RC2 algorithm is described in RFC 2268 [RC2]. The algorithm identifier for RC2 in CBC mode is:

RC2アルゴリズムはRFC 2268 [RC2]で説明されています。 CBCモードのRC2のアルゴリズム識別子は次のとおりです。

      rc2-cbc OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
          rsadsi(113549) encryptionAlgorithm(3) 2 }
        

The AlgorithmIdentifier parameters field must be present, and the parameters field must contain a RC2CBCParameter:

AlgorithmIdentifierパラメーターフィールドが存在している必要があり、パラメーターフィールドにはRC2CBCParameterが含まれている必要があります。

      RC2CBCParameter ::= SEQUENCE {
        rc2ParameterVersion INTEGER,
        iv OCTET STRING  }  -- exactly 8 octets
        

The RC2 effective-key-bits (key size) greater than 32 and less than 256 is encoded in the rc2ParameterVersion. For the effective-key-bits of 40, 64, and 128, the rc2ParameterVersion values are 160, 120, and 58 respectively. These values are not simply the RC2 key length. Note that the value 160 must be encoded as two octets (00 A0), since the one octet (A0) encoding represents a negative number.

RC2ParameterVersionには、32より大きく256未満のRC2有効キービット(キーサイズ)がエンコードされています。 40、64、および128の有効キービットの場合、rc2ParameterVersion値はそれぞれ160、120、および58です。これらの値は、単にRC2キーの長さではありません。 1オクテット(A0)エンコードは負の数を表すため、値160は2オクテット(00 A0)としてエンコードする必要があることに注意してください。

12.5 Message Authentication Code Algorithms
12.5 メッセージ認証コードアルゴリズム

CMS implementations that support authenticatedData must include HMAC with SHA-1.

authenticationDataをサポートするCMS実装には、SHA-1を備えたHMACを含める必要があります。

MAC algorithm identifiers are located in the AuthenticatedData macAlgorithm field.

MACアルゴリズム識別子は、AuthenticatedData macAlgorithmフィールドにあります。

MAC values are located in the AuthenticatedData mac field.

MAC値は、AuthenticatedData macフィールドにあります。

12.5.1 HMAC with SHA-1
12.5.1 SHA-1を備えたHMAC

The HMAC with SHA-1 algorithm is described in RFC 2104 [HMAC]. The algorithm identifier for HMAC with SHA-1 is:

SHA-1アルゴリズムを使用したHMACは、RFC 2104 [HMAC]で説明されています。 SHA-1を使用するHMACのアルゴリズム識別子は次のとおりです。

      hMAC-SHA1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
          dod(6) internet(1) security(5) mechanisms(5) 8 1 2 }
        

The AlgorithmIdentifier parameters field must be absent.

AlgorithmIdentifierパラメータフィールドは存在しない必要があります。

12.6 Triple-DES and RC2 Key Wrap Algorithms
12.6 Triple-DESおよびRC2キーラップアルゴリズム

CMS implementations must include encryption of a Triple-DES content-encryption key with a Triple-DES key-encryption key using the algorithm specified in Sections 12.6.2 and 12.6.3. CMS implementations should include encryption of a RC2 content-encryption key with a RC2 key-encryption key using the algorithm specified in Sections 12.6.4 and 12.6.5. Triple-DES and RC2 content-encryption keys are encrypted in Cipher Block Chaining (CBC) mode [MODES].

CMSの実装には、セクション12.6.2および12.6.3で指定されたアルゴリズムを使用して、トリプルDESコンテンツ暗号化キーをトリプルDESキー暗号化キーで暗号化する必要があります。 CMSの実装には、セクション12.6.4および12.6.5で指定されたアルゴリズムを使用して、RC2コンテンツ暗号化キーをRC2キー暗号化キーで暗号化する必要があります。 Triple-DESおよびRC2コンテンツ暗号化キーは、暗号ブロックチェーン(CBC)モード[モード]で暗号化されます。

Key Transport algorithms allow for the content-encryption key to be directly encrypted; however, key agreement and symmetric key-encryption key algorithms encrypt the content-encryption key with a second symmetric encryption algorithm. This section describes how the Triple-DES or RC2 content-encryption key is formatted and encrypted.

キー転送アルゴリズムでは、コンテンツ暗号化キーを直接暗号化できます。ただし、キー合意と対称キー暗号化キーアルゴリズムは、2番目の対称暗号化アルゴリズムでコンテンツ暗号化キーを暗号化します。このセクションでは、Triple-DESまたはRC2コンテンツ暗号化キーがどのようにフォーマットおよび暗号化されるかについて説明します。

Key agreement algorithms generate a pairwise key-encryption key, and a key wrap algorithm is used to encrypt the content-encryption key with the pairwise key-encryption key. Similarly, a key wrap algorithm is used to encrypt the content-encryption key in a previously distributed key-encryption key.

キー合意アルゴリズムはペアワイズキー暗号化キーを生成し、キーラップアルゴリズムはペアワイズキー暗号化キーでコンテンツ暗号化キーを暗号化するために使用されます。同様に、キーラップアルゴリズムは、以前に配布されたキー暗号化キーのコンテンツ暗号化キーを暗号化するために使用されます。

The key-encryption key is generated by the key agreement algorithm or distributed out of band. For key agreement of RC2 key-encryption keys, 128 bits must be generated as input to the key expansion process used to compute the RC2 effective key [RC2].

鍵暗号化鍵は、鍵合意アルゴリズムによって生成されるか、帯域外で配布されます。 RC2キー暗号化キーのキー合意では、RC2有効キーの計算に使用されるキー拡張プロセスへの入力として128ビットを生成する必要があります[RC2]。

The same algorithm identifier is used for both 2-key and 3-key Triple-DES. When the length of the content-encryption key to be wrapped is a 2-key Triple-DES key, a third key with the same value as the first key is created. Thus, all Triple-DES content-encryption keys are wrapped like 3-key Triple-DES keys.

2キーと3キーのTriple-DESの両方に同じアルゴリズム識別子が使用されます。ラップされるコンテンツ暗号化キーの長さが2キーのTriple-DESキーである場合、最初のキーと同じ値を持つ3番目のキーが作成されます。したがって、すべてのTriple-DESコンテンツ暗号化キーは、3キーのTriple-DESキーのようにラップされます。

12.6.1 Key Checksum
12.6.1 キーチェックサム

The CMS Checksum Algorithm is used to provide a content-encryption key integrity check value. The algorithm is:

CMSチェックサムアルゴリズムは、コンテンツ暗号化キーの整合性チェック値を提供するために使用されます。アルゴリズムは次のとおりです。

1. Compute a 20 octet SHA-1 [SHA1] message digest on the content-encryption key. 2. Use the most significant (first) eight octets of the message digest value as the checksum value.

1. コンテンツ暗号化キーで20オクテットのSHA-1 [SHA1]メッセージダイジェストを計算します。 2.チェックサム値として、メッセージダイジェスト値の最も重要な(最初の)8オクテットを使用します。

12.6.2 Triple-DES Key Wrap
12.6.2 Triple-DESキーラップ

The Triple-DES key wrap algorithm encrypts a Triple-DES content-encryption key with a Triple-DES key-encryption key. The Triple-DES key wrap algorithm is:

Triple-DESキーラップアルゴリズムは、Triple-DESコンテンツ暗号化キーをTriple-DESキー暗号化キーで暗号化します。 Triple-DES鍵ラップアルゴリズムは次のとおりです。

1. Set odd parity for each of the DES key octets comprising the content-encryption key, call the result CEK. 2. Compute an 8 octet key checksum value on CEK as described above in Section 12.6.1, call the result ICV. 3. Let CEKICV = CEK || ICV. 4. Generate 8 octets at random, call the result IV. 5. Encrypt CEKICV in CBC mode using the key-encryption key. Use the random value generated in the previous step as the initialization vector (IV). Call the ciphertext TEMP1. 6. Let TEMP2 = IV || TEMP1. 7. Reverse the order of the octets in TEMP2. That is, the most significant (first) octet is swapped with the least significant (last) octet, and so on. Call the result TEMP3. 8. Encrypt TEMP3 in CBC mode using the key-encryption key. Use an initialization vector (IV) of 0x4adda22c79e82105. The ciphertext is 40 octets long.

1. コンテンツ暗号化キーを構成する各DESキーオクテットに奇数パリティを設定し、結果のCEKを呼び出します。 2.上記の12.6.1で説明したように、CEKで8オクテットのキーチェックサム値を計算し、結果をICVと呼びます。 3. CEKICV = CEK ||としますICV。 4.ランダムに8オクテットを生成し、結果をIVと呼びます。 5.鍵暗号鍵を使用して、CBCモードでCEKICVを暗号化します。前のステップで生成されたランダムな値を初期化ベクトル(IV)として使用します。暗号文TEMP1を呼び出します。 6. TEMP2 = IV ||としますTEMP1。 7. TEMP2のオクテットの順序を逆にします。つまり、最上位(最初)のオクテットが最下位(最後)のオクテットと交換されます。結果TEMP3を呼び出します。 8.キー暗号化キーを使用して、CBCモードでTEMP3を暗号化します。 0x4adda22c79e82105の初期化ベクトル(IV)を使用します。暗号文の長さは40オクテットです。

Note: When the same content-encryption key is wrapped in different key-encryption keys, a fresh initialization vector (IV) must be generated for each invocation of the key wrap algorithm.

注:同じコンテンツ暗号化キーが異なるキー暗号化キーでラップされる場合、キーラップアルゴリズムの呼び出しごとに新しい初期化ベクトル(IV)を生成する必要があります。

12.6.3 Triple-DES Key Unwrap
12.6.3 Triple-DES鍵のアンラップ

The Triple-DES key unwrap algorithm decrypts a Triple-DES content-encryption key using a Triple-DES key-encryption key. The Triple-DES key unwrap algorithm is:

Triple-DESキーアンラップアルゴリズムは、Triple-DESキー暗号化キーを使用してTriple-DESコンテンツ暗号化キーを復号化します。 Triple-DES鍵アンラップアルゴリズムは次のとおりです。

1. If the wrapped content-encryption key is not 40 octets, then error. 2. Decrypt the wrapped content-encryption key in CBC mode using the key-encryption key. Use an initialization vector (IV) of 0x4adda22c79e82105. Call the output TEMP3.

1. ラップされたコンテンツ暗号化キーが40オクテットでない場合、エラーになります。 2.キー暗号化キーを使用して、ラップされたコンテンツ暗号化キーをCBCモードで復号化します。 0x4adda22c79e82105の初期化ベクトル(IV)を使用します。出力TEMP3を呼び出します。

3. Reverse the order of the octets in TEMP3. That is, the most significant (first) octet is swapped with the least significant (last) octet, and so on. Call the result TEMP2. 4. Decompose the TEMP2 into IV and TEMP1. IV is the most significant (first) 8 octets, and TEMP1 is the least significant (last) 32 octets. 5. Decrypt TEMP1 in CBC mode using the key-encryption key. Use the IV value from the previous step as the initialization vector. Call the ciphertext CEKICV. 6. Decompose the CEKICV into CEK and ICV. CEK is the most significant (first) 24 octets, and ICV is the least significant (last) 8 octets. 7. Compute an 8 octet key checksum value on CEK as described above in Section 12.6.1. If the computed key checksum value does not match the decrypted key checksum value, ICV, then error. 8. Check for odd parity each of the DES key octets comprising CEK. If parity is incorrect, then there is an error. 9. Use CEK as the content-encryption key.

3. TEMP3のオクテットの順序を逆にします。つまり、最上位(最初)のオクテットが最下位(最後)のオクテットと交換されます。結果TEMP2を呼び出します。 4. TEMP2をIVとTEMP1に分解します。 IVは最も重要な(最初の)8オクテットで、TEMP1は最も重要でない(最後の)32オクテットです。 5.キー暗号化キーを使用して、CBCモードでTEMP1を復号化します。前のステップのIV値を初期化ベクトルとして使用します。暗号文CEKICVを呼び出します。 6. CEKICVをCEKとICVに分解します。 CEKは最も重要な(最初の)24オクテットで、ICVは最も重要でない(最後の)8オクテットです。 7.セクション12.6.1で説明したように、CEKで8オクテットのキーチェックサム値を計算します。計算されたキーチェックサム値が、復号化されたキーチェックサム値ICVと一致しない場合、エラーになります。 8. CEKを構成する各DES鍵オクテットの奇数パリティを確認します。パリティが正しくない場合は、エラーがあります。 9.コンテンツ暗号化キーとしてCEKを使用します。

12.6.4 RC2 Key Wrap
12.6.4 RC2キーラップ

The RC2 key wrap algorithm encrypts a RC2 content-encryption key with a RC2 key-encryption key. The RC2 key wrap algorithm is:

RC2キーラップアルゴリズムは、RC2コンテンツ暗号化キーをRC2キー暗号化キーで暗号化します。 RC2キーラップアルゴリズムは次のとおりです。

1. Let the content-encryption key be called CEK, and let the length of the content-encryption key in octets be called LENGTH. LENGTH is a single octet. 2. Let LCEK = LENGTH || CEK. 3. Let LCEKPAD = LCEK || PAD. If the length of LCEK is a multiple of 8, the PAD has a length of zero. If the length of LCEK is not a multiple of 8, then PAD contains the fewest number of random octets to make the length of LCEKPAD a multiple of 8. 4. Compute an 8 octet key checksum value on LCEKPAD as described above in Section 12.6.1, call the result ICV. 5. Let LCEKPADICV = LCEKPAD || ICV. 6. Generate 8 octets at random, call the result IV. 7. Encrypt LCEKPADICV in CBC mode using the key-encryption key. Use the random value generated in the previous step as the initialization vector (IV). Call the ciphertext TEMP1. 8. Let TEMP2 = IV || TEMP1. 9. Reverse the order of the octets in TEMP2. That is, the most significant (first) octet is swapped with the least significant (last) octet, and so on. Call the result TEMP3. 10. Encrypt TEMP3 in CBC mode using the key-encryption key. Use an initialization vector (IV) of 0x4adda22c79e82105.

1. コンテンツ暗号化キーをCEKと呼び、オクテット単位のコンテンツ暗号化キーの長さをLENGTHと呼びます。 LENGTHは単一のオクテットです。 2. LCEK = LENGTH ||としますCEK。 3. LCEKPAD = LCEK ||とします。パッド。 LCEKの長さが8の倍数の場合、PADの長さはゼロになります。 LCEKの長さが8の倍数ではない場合、PADにはランダムなオクテットの最小数が含まれており、LCEKPADの長さは8の倍数になります。4.セクション12.6で説明したように、LCEKPADで8オクテットのキーチェックサム値を計算します。 1、結果をICVと呼びます。 5. LCEKPADICV = LCEKPAD ||とします。 ICV。 6. 8オクテットをランダムに生成し、結果をIVと呼びます。 7.鍵暗号鍵を使用して、CBCモードでLCEKPADICVを暗号化します。前のステップで生成されたランダムな値を初期化ベクトル(IV)として使用します。暗号文TEMP1を呼び出します。 8. TEMP2 = IV ||としますTEMP1。 9. TEMP2のオクテットの順序を逆にします。つまり、最上位(最初)のオクテットが最下位(最後)のオクテットと交換されます。結果TEMP3を呼び出します。 10.キー暗号化キーを使用してCBCモードでTEMP3を暗号化します。 0x4adda22c79e82105の初期化ベクトル(IV)を使用します。

Note: When the same content-encryption key is wrapped in different key-encryption keys, a fresh initialization vector (IV) must be generated for each invocation of the key wrap algorithm.

注:同じコンテンツ暗号化キーが異なるキー暗号化キーでラップされる場合、キーラップアルゴリズムの呼び出しごとに新しい初期化ベクトル(IV)を生成する必要があります。

12.6.5 RC2 Key Unwrap
12.6.5 RC2キーアンラップ

The RC2 key unwrap algorithm decrypts a RC2 content-encryption key using a RC2 key-encryption key. The RC2 key unwrap algorithm is:

RC2キーアンラップアルゴリズムは、RC2キー暗号化キーを使用してRC2コンテンツ暗号化キーを復号化します。 RC2キーアンラップアルゴリズムは次のとおりです。

1. If the wrapped content-encryption key is not a multiple of 8 octets, then error. 2. Decrypt the wrapped content-encryption key in CBC mode using the key-encryption key. Use an initialization vector (IV) of 0x4adda22c79e82105. Call the output TEMP3. 3. Reverse the order of the octets in TEMP3. That is, the most significant (first) octet is swapped with the least significant (last) octet, and so on. Call the result TEMP2. 4. Decompose the TEMP2 into IV and TEMP1. IV is the most significant (first) 8 octets, and TEMP1 is the remaining octets.

1. ラップされたコンテンツ暗号化キーが8オクテットの倍数でない場合、エラーになります。 2.キー暗号化キーを使用して、ラップされたコンテンツ暗号化キーをCBCモードで復号化します。 0x4adda22c79e82105の初期化ベクトル(IV)を使用します。出力TEMP3を呼び出します。 3. TEMP3のオクテットの順序を逆にします。つまり、最上位(最初)のオクテットが最下位(最後)のオクテットと交換されます。結果TEMP2を呼び出します。 4. TEMP2をIVとTEMP1に分解します。 IVが最も重要な(最初の)8オクテットで、TEMP1が残りのオクテットです。

5. Decrypt TEMP1 in CBC mode using the key-encryption key. Use the IV value from the previous step as the initialization vector. Call the plaintext LCEKPADICV. 6. Decompose the LCEKPADICV into LCEKPAD, and ICV. ICV is the least significant (last) octet 8 octets. LCEKPAD is the remaining octets. 7. Compute an 8 octet key checksum value on LCEKPAD as described above in Section 12.6.1. If the computed key checksum value does not match the decrypted key checksum value, ICV, then error. 8. Decompose the LCEKPAD into LENGTH, CEK, and PAD. LENGTH is the most significant (first) octet. CEK is the following LENGTH octets. PAD is the remaining octets, if any. 9. If the length of PAD is more than 7 octets, then error. 10. Use CEK as the content-encryption key.

5. キー暗号化キーを使用してCBCモードでTEMP1を復号化します。前のステップのIV値を初期化ベクトルとして使用します。平文のLCEKPADICVを呼び出します。 6. LCEKPADICVをLCEKPADとICVに分解します。 ICVは、最下位(最後の)オクテット8オクテットです。 LCEKPADは残りのオクテットです。 7.上記のセクション12.6.1で説明したように、LCEKPADで8オクテットのキーチェックサム値を計算します。計算されたキーチェックサム値が、復号化されたキーチェックサム値ICVと一致しない場合、エラーになります。 8. LCEKPADをLENGTH、CEK、およびPADに分解します。 LENGTHは最も重要な(最初の)オクテットです。 CEKは、次のLENGTHオクテットです。 PADは、もしあれば、残りのオクテットです。 9. PADの長さが7オクテットを超える場合、エラーになります。 10.コンテンツ暗号化キーとしてCEKを使用します。

Appendix A: ASN.1 Module

付録A:ASN.1モジュール

CryptographicMessageSyntax
    { iso(1) member-body(2) us(840) rsadsi(113549)
      pkcs(1) pkcs-9(9) smime(16) modules(0) cms(1) }
        
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
        
-- EXPORTS All
-- The types and values defined in this module are exported for use in
-- the other ASN.1 modules.  Other applications may use them for their
-- own purposes.
        

IMPORTS

輸入

-- Directory Information Framework (X.501) Name FROM InformationFramework { joint-iso-itu-t ds(5) modules(1) informationFramework(1) 3 }

-Directory Information Framework(X.501)Name From InformationFramework {joint-iso-itu-t ds(5)modules(1)informationFramework(1)3}

-- Directory Authentication Framework (X.509) AlgorithmIdentifier, AttributeCertificate, Certificate, CertificateList, CertificateSerialNumber FROM AuthenticationFramework { joint-iso-itu-t ds(5) module(1) authenticationFramework(7) 3 } ;

-ディレクトリ認証フレームワーク(X.509)AlgorithmIdentifier、AttributeCertificate、Certificate、CertificateList、CertificateSerialNumber FROM AuthenticationFramework {joint-iso-itu-t ds(5)module(1)authenticationFramework(7)3};

-- Cryptographic Message Syntax

-暗号化メッセージの構文

ContentInfo ::= SEQUENCE {
  contentType ContentType,
  content [0] EXPLICIT ANY DEFINED BY contentType }
        
ContentType ::= OBJECT IDENTIFIER
        
SignedData ::= SEQUENCE {
  version CMSVersion,
  digestAlgorithms DigestAlgorithmIdentifiers,
  encapContentInfo EncapsulatedContentInfo,
  certificates [0] IMPLICIT CertificateSet OPTIONAL,
  crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
  signerInfos SignerInfos }
        
DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
        
SignerInfos ::= SET OF SignerInfo
EncapsulatedContentInfo ::= SEQUENCE {
  eContentType ContentType,
  eContent [0] EXPLICIT OCTET STRING OPTIONAL }
        
SignerInfo ::= SEQUENCE {
  version CMSVersion,
  sid SignerIdentifier,
  digestAlgorithm DigestAlgorithmIdentifier,
  signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
  signatureAlgorithm SignatureAlgorithmIdentifier,
  signature SignatureValue,
  unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
        
SignerIdentifier ::= CHOICE {
  issuerAndSerialNumber IssuerAndSerialNumber,
  subjectKeyIdentifier [0] SubjectKeyIdentifier }
        
SignedAttributes ::= SET SIZE (1..MAX) OF Attribute
        
UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute
        
Attribute ::= SEQUENCE {
  attrType OBJECT IDENTIFIER,
  attrValues SET OF AttributeValue }
        
AttributeValue ::= ANY
        
SignatureValue ::= OCTET STRING
        
EnvelopedData ::= SEQUENCE {
  version CMSVersion,
  originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
  recipientInfos RecipientInfos,
  encryptedContentInfo EncryptedContentInfo,
  unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
        
OriginatorInfo ::= SEQUENCE {
  certs [0] IMPLICIT CertificateSet OPTIONAL,
  crls [1] IMPLICIT CertificateRevocationLists OPTIONAL }
        
RecipientInfos ::= SET OF RecipientInfo
        
EncryptedContentInfo ::= SEQUENCE {
  contentType ContentType,
  contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
  encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }
        
EncryptedContent ::= OCTET STRING
UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
        
RecipientInfo ::= CHOICE {
  ktri KeyTransRecipientInfo,
  kari [1] KeyAgreeRecipientInfo,
  kekri [2] KEKRecipientInfo }
        
EncryptedKey ::= OCTET STRING
        
KeyTransRecipientInfo ::= SEQUENCE {
  version CMSVersion,  -- always set to 0 or 2
  rid RecipientIdentifier,
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  encryptedKey EncryptedKey }
        
RecipientIdentifier ::= CHOICE {
  issuerAndSerialNumber IssuerAndSerialNumber,
  subjectKeyIdentifier [0] SubjectKeyIdentifier }
        
KeyAgreeRecipientInfo ::= SEQUENCE {
  version CMSVersion,  -- always set to 3
  originator [0] EXPLICIT OriginatorIdentifierOrKey,
  ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  recipientEncryptedKeys RecipientEncryptedKeys }
        
OriginatorIdentifierOrKey ::= CHOICE {
  issuerAndSerialNumber IssuerAndSerialNumber,
  subjectKeyIdentifier [0] SubjectKeyIdentifier,
  originatorKey [1] OriginatorPublicKey }
        
OriginatorPublicKey ::= SEQUENCE {
  algorithm AlgorithmIdentifier,
  publicKey BIT STRING }
        
RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey
        
RecipientEncryptedKey ::= SEQUENCE {
  rid KeyAgreeRecipientIdentifier,
  encryptedKey EncryptedKey }
        
KeyAgreeRecipientIdentifier ::= CHOICE {
  issuerAndSerialNumber IssuerAndSerialNumber,
  rKeyId [0] IMPLICIT RecipientKeyIdentifier }
        
RecipientKeyIdentifier ::= SEQUENCE {
  subjectKeyIdentifier SubjectKeyIdentifier,
  date GeneralizedTime OPTIONAL,
  other OtherKeyAttribute OPTIONAL }
        
SubjectKeyIdentifier ::= OCTET STRING
        
KEKRecipientInfo ::= SEQUENCE {
  version CMSVersion,  -- always set to 4
  kekid KEKIdentifier,
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  encryptedKey EncryptedKey }
        
KEKIdentifier ::= SEQUENCE {
  keyIdentifier OCTET STRING,
  date GeneralizedTime OPTIONAL,
  other OtherKeyAttribute OPTIONAL }
        
DigestedData ::= SEQUENCE {
  version CMSVersion,
  digestAlgorithm DigestAlgorithmIdentifier,
  encapContentInfo EncapsulatedContentInfo,
  digest Digest }
        
Digest ::= OCTET STRING
        
EncryptedData ::= SEQUENCE {
  version CMSVersion,
  encryptedContentInfo EncryptedContentInfo,
  unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
        
AuthenticatedData ::= SEQUENCE {
  version CMSVersion,
  originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
  recipientInfos RecipientInfos,
  macAlgorithm MessageAuthenticationCodeAlgorithm,
  digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
  encapContentInfo EncapsulatedContentInfo,
  authenticatedAttributes [2] IMPLICIT AuthAttributes OPTIONAL,
  mac MessageAuthenticationCode,
  unauthenticatedAttributes [3] IMPLICIT UnauthAttributes OPTIONAL }
        
AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
        
UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
        
MessageAuthenticationCode ::= OCTET STRING
DigestAlgorithmIdentifier ::= AlgorithmIdentifier
        
SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
        
KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
        
ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
        
MessageAuthenticationCodeAlgorithm ::= AlgorithmIdentifier
        
CertificateRevocationLists ::= SET OF CertificateList
        
CertificateChoices ::= CHOICE {
  certificate Certificate,  -- See X.509
  extendedCertificate [0] IMPLICIT ExtendedCertificate,  -- Obsolete
  attrCert [1] IMPLICIT AttributeCertificate }  -- See X.509 & X9.57
        
CertificateSet ::= SET OF CertificateChoices
        
IssuerAndSerialNumber ::= SEQUENCE {
  issuer Name,
  serialNumber CertificateSerialNumber }
        
CMSVersion ::= INTEGER  { v0(0), v1(1), v2(2), v3(3), v4(4) }
        
UserKeyingMaterial ::= OCTET STRING
        
OtherKeyAttribute ::= SEQUENCE {
  keyAttrId OBJECT IDENTIFIER,
  keyAttr ANY DEFINED BY keyAttrId OPTIONAL }
        

-- CMS Attributes

-CMS属性

MessageDigest ::= OCTET STRING
        
SigningTime  ::= Time
        
Time ::= CHOICE {
  utcTime UTCTime,
  generalTime GeneralizedTime }
        
Countersignature ::= SignerInfo
        

-- Algorithm Identifiers

-アルゴリズム識別子

sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
    oiw(14) secsig(3) algorithm(2) 26 }
        
md5 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
    rsadsi(113549) digestAlgorithm(2) 5 }
        
id-dsa-with-sha1 OBJECT IDENTIFIER ::=  { iso(1) member-body(2)
    us(840) x9-57 (10040) x9cm(4) 3 }
        
rsaEncryption OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 1 }
        
dh-public-number OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) ansi-x942(10046) number-type(2) 1 }
        
id-alg-ESDH OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
    rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 5 }
        
id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 }
        
id-alg-CMSRC2wrap OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 7 }
        
des-ede3-cbc OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) encryptionAlgorithm(3) 7 }
        
rc2-cbc OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
    rsadsi(113549) encryptionAlgorithm(3) 2 }
        
hMAC-SHA1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
    dod(6) internet(1) security(5) mechanisms(5) 8 1 2 }
        

-- Algorithm Parameters

-アルゴリズムパラメータ

KeyWrapAlgorithm ::= AlgorithmIdentifier
        
RC2wrapParameter ::= RC2ParameterVersion
        
RC2ParameterVersion ::= INTEGER
        
CBCParameter ::= IV
        
IV ::= OCTET STRING  -- exactly 8 octets
RC2CBCParameter ::= SEQUENCE {
  rc2ParameterVersion INTEGER,
  iv OCTET STRING  }  -- exactly 8 octets
        

-- Content Type Object Identifiers

-コンテンツタイプオブジェクト識別子

id-ct-contentInfo OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
    ct(1) 6 }
        
id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1 }
        
id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
        
id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
        
id-digestedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs7(7) 5 }
        
id-encryptedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6 }
        
id-ct-authData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
    ct(1) 2 }
        

-- Attribute Object Identifiers

-属性オブジェクト識別子

id-contentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs9(9) 3 }
        
id-messageDigest OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs9(9) 4 }
        
id-signingTime OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs9(9) 5 }
        
id-countersignature OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs9(9) 6 }
        

-- Obsolete Extended Certificate syntax from PKCS#6

-PKCS#6から廃止された拡張証明書構文

ExtendedCertificate ::= SEQUENCE {
  extendedCertificateInfo ExtendedCertificateInfo,
  signatureAlgorithm SignatureAlgorithmIdentifier,
  signature Signature }
        
ExtendedCertificateInfo ::= SEQUENCE {
  version CMSVersion,
  certificate Certificate,
  attributes UnauthAttributes }
        
Signature ::= BIT STRING
        

END -- of CryptographicMessageSyntax  References

END-CryptographicMessageSyntaxリファレンス

3DES American National Standards Institute. ANSI X9.52-1998, Triple Data Encryption Algorithm Modes of Operation. 1998.

3DES American National Standards Institute。 ANSI X9.52-1998、トリプルデータ暗号化アルゴリズムの動作モード。 1998年

DES American National Standards Institute. ANSI X3.106, "American National Standard for Information Systems - Data Link Encryption". 1983.

DES American National Standards Institute。 ANSI X3.106、「情報システムの米国規格-データリンク暗号化」。 1983。

DH-X9.42 Rescorla, E., "Diffie-Hellman Key Agreement Method", RFC 2631, June 1999.

DH-X9.42 Rescorla、E。、「Diffie-Hellman Key Agreement Method」、RFC 2631、1999年6月。

DSS National Institute of Standards and Technology. FIPS Pub 186: Digital Signature Standard. 19 May 1994.

DSS国立標準技術研究所。 FIPS Pub 186:デジタル署名標準。 1994年5月19日。

ESS Hoffman, P., Editor, "Enhanced Security Services for S/MIME", RFC 2634, June 1999.

ESS Hoffman、P。、編集者、「S / MIMEのセキュリティ強化サービス」、RFC 2634、1999年6月。

HMAC Krawczyk, H., "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.

HMAC Krawczyk、H。、「HMAC:Keyed-Hashing for Message Authentication」、RFC 2104、1997年2月。

MD5 Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.

MD5 Rivest、R。、「The MD5 Message-Digest Algorithm」、RFC 1321、1992年4月。

MODES National Institute of Standards and Technology. FIPS Pub 81: DES Modes of Operation. 2 December 1980.

モード国立標準技術研究所。 FIPS Pub 81:DESの動作モード。 1980年12月2日。

MSG Ramsdell, B., Editor, "S/MIME Version 3 Message Specification", RFC 2633, June 1999.

MSG Ramsdell、B。、編集者、「S / MIMEバージョン3メッセージ仕様」、RFC 2633、1999年6月。

NEWPKCS#1 Kaliski, B., "PKCS #1: RSA Encryption, Version 2.0", RFC 2347, October 1998.

NEWPKCS#1 Kaliski、B。、「PKCS#1:RSA Encryption、Version 2.0」、RFC 2347、1998年10月。

PROFILE Housley, R., Ford, W., Polk, W. and D. Solo, "Internet X.509 Public Key Infrastructure: Certificate and CRL Profile", RFC 2459, January 1999.

PROFILE Housley、R.、Ford、W.、Polk、W. and D. Solo、 "Internet X.509 Public Key Infrastructure:Certificate and CRL Profile"、RFC 2459、January 1999。

PKCS#1 Kaliski, B., "PKCS #1: RSA Encryption, Version 1.5.", RFC 2313, March 1998.

PKCS#1 Kaliski、B。、「PKCS#1:RSA Encryption、Version 1.5。」、RFC 2313、1998年3月。

PKCS#6 RSA Laboratories. PKCS #6: Extended-Certificate Syntax Standard, Version 1.5. November 1993.

PKCS#6 RSA Laboratories。 PKCS#6:Extended-Certificate Syntax Standard、バージョン1.5。 1993年11月。

PKCS#7 Kaliski, B., "PKCS #7: Cryptographic Message Syntax, Version 1.5.", RFC 2315, March 1998.

PKCS#7 Kaliski、B。、「PKCS#7:Cryptographic Message Syntax、Version 1.5。」、RFC 2315、1998年3月。

PKCS#9 RSA Laboratories. PKCS #9: Selected Attribute Types, Version 1.1. November 1993.

PKCS#9 RSA Laboratories。 PKCS#9:選択された属性タイプ、バージョン1.1。 1993年11月。

RANDOM Eastlake, D., Crocker, S. and J. Schiller, "Randomness Recommendations for Security", RFC 1750, December 1994.

ランダムイーストレイク、D。、クロッカー、S。およびJ.シラー、「セキュリティのランダム性に関する推奨事項」、RFC 1750、1994年12月。

RC2 Rivest, R., "A Description of the RC2 (r) Encryption Algorithm", RFC 2268, March 1998.

RC2 Rivest、R。、「A Description of the RC2(r)Encryption Algorithm」、RFC 2268、March 1998。

SHA1 National Institute of Standards and Technology. FIPS Pub 180-1: Secure Hash Standard. 17 April 1995.

SHA1国立標準技術研究所。 FIPS Pub 180-1:Secure Hash Standard。 1995年4月17日。

X.208-88 CCITT. Recommendation X.208: Specification of Abstract Syntax Notation One (ASN.1). 1988.

X.208-88 CCITT。勧告X.208:抽象構文記法1(ASN.1)の仕様。 1988。

X.209-88 CCITT. Recommendation X.209: Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1). 1988.

X.209-88 CCITT。推奨事項X.209:抽象構文記法1(ASN.1)の基本的なエンコーディングルールの仕様。 1988。

X.501-88 CCITT. Recommendation X.501: The Directory - Models. 1988.

X.501-88 CCITT。推奨事項X.501:ディレクトリ-モデル。 1988。

X.509-88 CCITT. Recommendation X.509: The Directory - Authentication Framework. 1988.

X.509-88 CCITT。推奨事項X.509:ディレクトリ-認証フレームワーク。 1988。

X.509-97 ITU-T. Recommendation X.509: The Directory - Authentication Framework. 1997.

X.509-97 ITU-T。推奨事項X.509:ディレクトリ-認証フレームワーク。 1997年

Security Considerations

セキュリティに関する考慮事項

The Cryptographic Message Syntax provides a method for digitally signing data, digesting data, encrypting data, and authenticating data.

暗号化メッセージ構文は、データのデジタル署名、データのダイジェスト、データの暗号化、およびデータの認証を行う方法を提供します。

Implementations must protect the signer's private key. Compromise of the signer's private key permits masquerade.

実装では、署名者の秘密鍵を保護する必要があります。署名者の秘密鍵の侵害により、なりすましが許可されます。

Implementations must protect the key management private key, the key-encryption key, and the content-encryption key. Compromise of the key management private key or the key-encryption key may result in the disclosure of all messages protected with that key. Similarly, compromise of the content-encryption key may result in disclosure of the associated encrypted content.

実装では、キー管理秘密キー、キー暗号化キー、およびコンテンツ暗号化キーを保護する必要があります。キー管理の秘密キーまたはキー暗号化キーが侵害されると、そのキーで保護されているすべてのメッセージが漏洩する可能性があります。同様に、コンテンツ暗号化キーの侵害により、関連する暗号化コンテンツが開示される可能性があります。

Implementations must protect the key management private key and the message-authentication key. Compromise of the key management private key permits masquerade of authenticated data. Similarly, compromise of the message-authentication key may result in undetectable modification of the authenticated content.

実装では、鍵管理の秘​​密鍵とメッセージ認証鍵を保護する必要があります。鍵管理の秘​​密鍵の侵害により、認証されたデータのなりすましが許可されます。同様に、メッセージ認証キーの侵害は、認証されたコンテンツの検出不可能な変更をもたらす可能性があります。

Implementations must randomly generate content-encryption keys, message-authentication keys, initialization vectors (IVs), and padding. Also, the generation of public/private key pairs relies on a random numbers. The use of inadequate pseudo-random number generators (PRNGs) to generate cryptographic keys can result in little or no security. An attacker may find it much easier to reproduce the PRNG environment that produced the keys, searching the resulting small set of possibilities, rather than brute force searching the whole key space. The generation of quality random numbers is difficult. RFC 1750 [RANDOM] offers important guidance in this area, and Appendix 3 of FIPS Pub 186 [DSS] provides one quality PRNG technique.

実装では、コンテンツ暗号化キー、メッセージ認証キー、初期化ベクトル(IV)、およびパディングをランダムに生成する必要があります。また、公開鍵と秘密鍵のペアの生成は、乱数に依存しています。不十分な疑似乱数ジェネレーター(PRNG)を使用して暗号化キーを生成すると、セキュリティがほとんどまたはまったくなくなる可能性があります。攻撃者は、キースペース全体をブルートフォースで検索するよりも、キーを生成したPRNG環境を再現し、結果として生じる可能性の小さなセットを検索する方がはるかに簡単であることに気付くでしょう。高品質の乱数の生成は困難です。 RFC 1750 [ランダム]はこの分野で重要なガイダンスを提供し、FIPS Pub 186 [DSS]の付録3は1つの高品質なPRNG技術を提供します。

When using key agreement algorithms or previously distributed symmetric key-encryption keys, a key-encryption key is used to encrypt the content-encryption key. If the key-encryption and content-encryption algorithms are different, the effective security is determined by the weaker of the two algorithms. If, for example, a message content is encrypted with 168-bit Triple-DES and the Triple-DES content-encryption key is wrapped with a 40-bit RC2 key, then at most 40 bits of protection is provided. A trivial search to determine the value of the 40-bit RC2 key can recover Triple-DES key, and then the Triple-DES key can be used to decrypt the content. Therefore, implementers must ensure that key-encryption algorithms are as strong or stronger than content-encryption algorithms.

鍵合意アルゴリズムまたは以前に配布された対称鍵暗号鍵を使用する場合、鍵暗号鍵を使用してコンテンツ暗号鍵を暗号化します。キー暗号化アルゴリズムとコンテンツ暗号化アルゴリズムが異なる場合、効果的なセキュリティは2つのアルゴリズムのうち弱い方によって決定されます。たとえば、メッセージコンテンツが168ビットのTriple-DESで暗号化され、Triple-DESコンテンツ暗号化キーが40ビットのRC2キーでラップされている場合、最大40ビットの保護が提供されます。 40ビットのRC2鍵の値を判別するための簡単な検索で、Triple-DES鍵をリカバリーできます。次に、Triple-DES鍵を使用してコンテンツを暗号化解除できます。したがって、実装者は、キー暗号化アルゴリズムがコンテンツ暗号化アルゴリズムと同じかそれよりも強力であることを確認する必要があります。

Section 12.6 specifies key wrap algorithms used to encrypt a Triple-DES [3DES] content-encryption key with a Triple-DES key-encryption key or to encrypt a RC2 [RC2] content-encryption key with a RC2 key-encryption key. The key wrap algorithms make use of CBC mode [MODES]. These key wrap algorithms have been reviewed for use with Triple and RC2. They have not been reviewed for use with other cryptographic modes or other encryption algorithms. Therefore, if a CMS implementation wishes to support ciphers in addition to Triple-DES or RC2, then additional key wrap algorithms need to be defined to support the additional ciphers.

セクション12.6は、Triple-DES [3DES]コンテンツ暗号化キーをTriple-DESキー暗号化キーで暗号化するか、RC2 [RC2]コンテンツ暗号化キーをRC2キー暗号化キーで暗号化するために使用されるキーラップアルゴリズムを指定します。キーラップアルゴリズムは、CBCモード[モード]を利用します。これらのキーラップアルゴリズムは、TripleおよびRC2で使用するために確認されています。他の暗号化モードや他の暗号化アルゴリズムでの使用については確認されていません。したがって、CMS実装がTriple-DESまたはRC2に加えて暗号をサポートすることを望む場合、追加の暗号をサポートするために追加のキーラップアルゴリズムを定義する必要があります。

Implementers should be aware that cryptographic algorithms become weaker with time. As new cryptoanalysis techniques are developed and computing performance improves, the work factor to break a particular cryptographic algorithm will reduce. Therefore, cryptographic algorithm implementations should be modular allowing new algorithms to be readily inserted. That is, implementers should be prepared for the set of mandatory to implement algorithms to change over time.

実装者は、暗号化アルゴリズムが時間とともに弱くなることを認識する必要があります。新しい暗号分析技術が開発され、コンピューティングパフォーマンスが向上すると、特定の暗号化アルゴリズムを解読する作業要素が減少します。したがって、暗号化アルゴリズムの実装は、新しいアルゴリズムを簡単に挿入できるようにモジュール化する必要があります。つまり、実装者は、時間とともに変化するアルゴリズムを実装するための必須セットに備える必要があります。

The countersignature unauthenticated attribute includes a digital signature that is computed on the content signature value, thus the countersigning process need not know the original signed content.

副署名の非認証属性には、コンテンツ署名値で計算されるデジタル署名が含まれているため、副署名プロセスは元の署名されたコンテンツを知る必要はありません。

This structure permits implementation efficiency advantages; however, this structure may also permit the countersigning of an inappropriate signature value. Therefore, implementations that perform countersignatures should either verify the original signature value prior to countersigning it (this verification requires processing of the original content), or implementations should perform countersigning in a context that ensures that only appropriate signature values are countersigned.

この構造により、実装効率が向上します。ただし、この構造では、不適切な署名値の副署名も許可される場合があります。したがって、副署名を実行する実装は、元の署名値を副署名する前に検証する必要があります(この検証には元のコンテンツの処理が必要です)、または実装は適切な署名値のみが副署名されることを保証するコンテキストで副署名を実行する必要があります。

Users of CMS, particularly those employing CMS to support interactive applications, should be aware that PKCS #1 Version 1.5 as specified in RFC 2313 [PKCS#1] is vulnerable to adaptive chosen ciphertext attacks when applied for encryption purposes. Exploitation of this identified vulnerability, revealing the result of a particular RSA decryption, requires access to an oracle which will respond to a large number of ciphertexts (based on currently available results, hundreds of thousands or more), which are constructed adaptively in response to previously-received replies providing information on the successes or failures of attempted decryption operations. As a result, the attack appears significantly less feasible to perpetrate for store-and-forward S/MIME environments than for directly interactive protocols. Where CMS constructs are applied as an intermediate encryption layer within an interactive request-response communications environment, exploitation could be more feasible.

CMSのユーザー、特にインタラクティブアプリケーションをサポートするためにCMSを使用しているユーザーは、RFC 2313 [PKCS#1]で指定されているPKCS#1バージョン1.5が、暗号化の目的で適用される場合、適応型の選択された暗号文攻撃に対して脆弱であることを認識する必要があります。特定のRSA復号の結果を明らかにするこの特定された脆弱性の悪用には、多数の暗号文に応答するオラクルへのアクセスが必要です(現在利用可能な結果、数十万以上に基づいて)。以前に受信した応答で、解読操作の試行の成功または失敗に関する情報が提供されます。その結果、ストアアンドフォワードS / MIME環境では、直接対話型プロトコルよりも攻撃の実行可能性が大幅に低下します。 CMSの構成要素が、対話型の要求と応答の通信環境内の中間暗号化層として適用される場合、悪用はより現実的になる可能性があります。

An updated version of PKCS #1 has been published, PKCS #1 Version 2.0 [NEWPKCS#1]. This new document will supersede RFC 2313. PKCS #1 Version 2.0 preserves support for the encryption padding format defined in PKCS #1 Version 1.5 [PKCS#1], and it also defines a new alternative. To resolve the adaptive chosen ciphertext vulnerability, the PKCS #1 Version 2.0 specifies and recommends use of Optimal Asymmetric Encryption Padding (OAEP) when RSA encryption is used to provide confidentiality. Designers of protocols and systems employing CMS for interactive environments should either consider usage of OAEP, or should ensure that information which could reveal the success or failure of attempted PKCS #1 Version 1.5 decryption operations is not provided. Support for OAEP will likely be added to a future version of the CMS specification.

PKCS#1の更新バージョン、PKCS#1バージョン2.0 [NEWPKCS#1]が公開されました。この新しいドキュメントは、RFC 2313に取って代わります。PKCS#1バージョン2.0は、PKCS#1バージョン1.5 [PKCS#1]で定義された暗号化パディング形式のサポートを維持し、新しい代替も定義します。選択された適応暗号文の脆弱性を解決するために、PKCS#1バージョン2.0は、RSA暗号化を使用して機密性を提供するときに、最適な非対称暗号化パディング(OAEP)の使用を指定および推奨しています。対話型環境でCMSを使用するプロトコルとシステムの設計者は、OAEPの使用を検討するか、試行されたPKCS#1バージョン1.5復号化操作の成功または失敗を明らかにする情報が提供されないようにする必要があります。 OAEPのサポートは、CMS仕様の将来のバージョンに追加される可能性があります。

Acknowledgments

謝辞

This document is the result of contributions from many professionals. I appreciate the hard work of all members of the IETF S/MIME Working Group. I extend a special thanks to Rich Ankney, Tim Dean, Steve Dusse, Carl Ellison, Peter Gutmann, Bob Jueneman, Stephen Henson, Paul Hoffman, Scott Hollenbeck, Don Johnson, Burt Kaliski, John Linn, John Pawling, Blake Ramsdell, Francois Rousseau, Jim Schaad, and Dave Solo for their efforts and support.

このドキュメントは、多くの専門家からの寄稿の結果です。 IETF S / MIMEワーキンググループのすべてのメンバーのハードワークに感謝します。 Rich Ankney、Tim Dean、Steve Dusse、Carl Ellison、Peter Gutmann、Bob Jueneman、Stephen Henson、Paul Hoffman、Scott Hollenbeck、Don Johnson、Burt Kaliski、John Linn、John Pawling、Blake Ramsdell、Francois Rousseauに特に感謝します、Jim Schaad、Dave Soloの努力とサポートに感謝します。

Author's Address

著者のアドレス

Russell Housley SPYRUS 381 Elden Street Suite 1120 Herndon, VA 20170 USA

Russell Housley SPYRUS 381 Elden Street Suite 1120 Herndon、VA 20170 USA

   EMail: housley@spyrus.com
        

Full Copyright Statement

完全な著作権表示

Copyright (C) The Internet Society (1999). All Rights Reserved.

Copyright(C)The Internet Society(1999)。全著作権所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

このドキュメントとその翻訳はコピーして他のユーザーに提供することができ、コメントまたはその他の方法で説明したり、その実装を支援する派生物を、全体または一部を問わず、準備、コピー、公開、配布することができます。ただし、上記の著作権表示とこの段落は、そのようなすべてのコピーと派生物に含まれています。ただし、このドキュメント自体は、著作権に関する通知を削除したり、インターネットソサエティや他のインターネット組織への参照を削除したりするなど、いかなる方法でも変更できません。ただし、インターネット標準を開発する目的で必要な場合は除きます。インターネット標準のプロセスに従うか、または必要に応じて、それを英語以外の言語に翻訳する必要があります。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上記で付与された制限付きのアクセス許可は永続的であり、インターネットソサエティまたはその後継者または譲受人によって取り消されることはありません。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

このドキュメントとここに含まれる情報は「現状有姿」で提供され、インターネット社会およびインターネット技術タスクフォースは、明示または黙示を問わず、ここに記載されている情報の使用が保証するものに限定されない一切の保証を含みません。商品性または特定の目的への適合性に関する権利または黙示の保証を侵害すること。

Acknowledgement

謝辞

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

RFC Editor機能への資金提供は、現在Internet Societyから提供されています。