NIST SP 800-38C 日本語訳
英語タイトル : Recommendation for Block Cipher Modes of Operation: the CCM Mode for Authentication and Confidentiality日本語タイトル : 認証と機密性のためのCCMモード
公開日 : 2007-07-20
原文URL : https://csrc.nist.gov/pubs/sp/800/38/c/upd1/final
翻訳編集 : 自動生成(有志による非公式の日本語訳), 原文取得日 : 2026-10-01, 訳文 : 333 / 333 ブロック
[要約] SP 800-38C は、共通鍵ブロック暗号アルゴリズムの動作モードとして CCM を定義する勧告です。CCM は、カウンター(CTR)モードと暗号ブロック連鎖メッセージ認証コード(CBC-MAC)の技法を組み合わせ、データの機密性と真正性を保証するために使用でき、入力形式や生成・暗号化、復号・検証の各プロセスを規定します。付録では、フォーマット関数とカウンター生成関数の例、MACの長さの選択、例示ベクトルを示します。
Recommendation for Block Cipher Modes of Operation: The CCM Mode for Authentication and Confidentiality
ブロック暗号の運用モードに関する勧告:認証と機密性のためのCCMモード
NIST Special Publication 800-38C
NIST Special Publication 800-38C
[NIST のロゴ。公的な標章のため、この非公式サイトには掲載していません。原本 PDF を参照してください。]
Morris Dworkin
Morris Dworkin
C O M P U T E R S E C U R I T Y
コンピューター・セキュリティ
Recommendation for Block Cipher Modes of Operation: The CCM Mode for Authentication and Confidentiality
ブロック暗号の運用モードに関する勧告:認証と機密性のためのCCMモード
NIST Special Publication 800-38C
NIST Special Publication 800-38C
Morris Dworkin
Morris Dworkin
C O M P U T E R S E C U R I T Y
コンピューター・セキュリティ
Computer Security Division Information Technology Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899-8930
コンピューター・セキュリティ部門 情報技術研究所 米国国立標準技術研究所 メリーランド州ゲイサーズバーグ 20899-8930
May 2004 (errata update 07-20-2007; corrected value of parameter B on p.19)
2004年5月(正誤表更新 2007-07-20;19ページのパラメーターBの値を訂正)
[米国商務省の紋章。公的な標章のため、この非公式サイトには掲載していません。原本 PDF を参照してください。]
U.S. Department of Commerce Donald L. Evans, Secretary
米国商務省 Donald L. Evans、長官
Technology Administration Phillip J. Bond, Under Secretary of Commerce for Technology
技術局 Phillip J. Bond、商務技術担当次官
National Institute of Standards and Technology Arden L. Bement, Jr., Director
米国国立標準技術研究所 Arden L. Bement, Jr.、所長
Reports on Information Security Technology
情報セキュリティ技術に関する報告書
The Information Technology Laboratory (ITL) at the National Institute of Standards and Technology (NIST) promotes the U.S. economy and public welfare by providing technical leadership for the Nation’s measurement and standards infrastructure. ITL develops tests, test methods, reference data, proof of concept implementations, and technical analyses to advance the development and productive use of information technology. ITL’s responsibilities include the development of technical, physical, administrative, and management standards and guidelines for the cost-effective security and privacy of sensitive unclassified information in Federal computer systems. This Special Publication 800-series reports on ITL’s research, guidance, and outreach efforts in computer security, and its collaborative activities with industry, government, and academic organizations.
米国国立標準技術研究所(NIST)の情報技術研究所(ITL)は、国家の計測・標準基盤に技術的リーダーシップを発揮し、米国経済と公共の福祉を促進します。ITLは情報技術の発展と生産的な利用を推進するため、試験、試験方法、参照データ、概念実証実装、技術分析を開発します。ITLの責務には、連邦コンピューター・システム内の機微な非機密情報の費用対効果に優れたセキュリティとプライバシーのため、技術的、物理的、管理的、マネジメント上の標準およびガイドラインを策定することが含まれます。このSpecial Publication 800シリーズは、コンピューター・セキュリティに関するITLの研究、ガイダンス、普及活動、および産業界、政府、学術機関との協働活動について報告します。
Certain commercial entities, equipment, or materials may be identified in this document in order to describe an experimental procedure or concept adequately. Such identification is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that the entities, materials, or equipment are necessarily the best available for the purpose.
実験手順または概念を適切に説明するため、本書では特定の商業組織、機器、または材料を特定する場合があります。これらの特定は、米国国立標準技術研究所による推奨または保証を示すものではなく、また、当該組織、材料、機器が目的に必ずしも最適な入手可能品であることを示すものでもありません。
National Institute of Standards and Technology Special Publication 800-38C Natl. Inst. Stand. Technol. Spec. Publ. 800-38C 25 pages (May 2004)
米国国立標準技術研究所 Special Publication 800-38C Natl. Inst. Stand. Technol. Spec. Publ. 800-38C 25ページ(2004年5月)
CODEN: NSPUE2
CODEN: NSPUE2
Abstract
概要
This Recommendation defines a mode of operation, called CCM, for a symmetric key block cipher algorithm. CCM may be used to provide assurance of the confidentiality and the authenticity of computer data by combining the techniques of the Counter (CTR) mode and the Cipher Block Chaining-Message Authentication Code (CBC-MAC) algorithm.
本勧告は、共通鍵ブロック暗号アルゴリズムの動作モードとしてCCMと呼ばれる方式を定義します。CCMは、カウンター(CTR)モードと暗号ブロック連鎖メッセージ認証コード(CBC-MAC)アルゴリズムの技法を組み合わせることで、コンピューター・データの機密性と真正性を保証するために使用できます。
KEY WORDS: authenticated encryption; authentication; block cipher; confidentiality; cryptography; encryption; information security; message authentication code; mode of operation.
キーワード:認証付き暗号化;認証;ブロック暗号;機密性;暗号;暗号化;情報セキュリティ;メッセージ認証コード;動作モード。
Table of Contents
目次
Table of Figures
図一覧
Table 1: Formatting of the Flags Octet in B0 — 13
表1:B0内のフラグ・オクテットのフォーマット — 13
Table 2: Formatting of B0 — 13
表2:B0のフォーマット — 13
Table 3: Formatting of Ctri — 14
表3:Ctriのフォーマット — 14
Table 4: Formatting of the Flags Field in Ctri — 14
表4:Ctri内のフラグ・フィールドのフォーマット — 14
1 Purpose
1 目的
This publication is the third Part in a series of Recommendations regarding modes of operation of symmetric key block cipher algorithms.
本刊行物は、共通鍵ブロック暗号アルゴリズムの動作モードに関する一連の勧告の第3部です。
2 Authority
2 権限
This document has been developed by the National Institute of Standards and Technology (NIST) in furtherance of its statutory responsibilities under the Federal Information Security Management Act (FISMA) of 2002, Public Law 107-347.
本書は、2002年連邦情報セキュリティ管理法(FISMA)(公法107-347)に基づく法定責務を遂行するため、米国国立標準技術研究所(NIST)が作成しました。
NIST is responsible for developing standards and guidelines, including minimum requirements, for providing adequate information security for all agency operations and assets, but such standards and guidelines shall not apply to national security systems. This guideline is consistent with the requirements of the Office of Management and Budget (OMB) Circular A-130, Section 8b(3), Securing Agency Information Systems, as analyzed in A-130, Appendix IV: Analysis of Key Sections. Supplemental information is provided in A-130, Appendix III.
NISTは、すべての機関の業務と資産に十分な情報セキュリティを提供するための最低要件を含む標準およびガイドラインを策定する責任を負いますが、これらの標準およびガイドラインは国家安全保障システムには適用しないものとします。本ガイドラインは、Office of Management and Budget (OMB) Circular A-130のSection 8b(3), Securing Agency Information Systemsの要件と整合しており、A-130 Appendix IV: Analysis of Key Sectionsで分析されています。補足情報はA-130 Appendix IIIに記載されています。
This guideline has been prepared for use by federal agencies. It may be used by nongovernmental organizations on a voluntary basis and is not subject to copyright. (Attribution would be appreciated by NIST.)
本ガイドラインは連邦機関が使用するために作成されました。非政府組織は任意で使用してもよく、著作権の対象ではありません。(NISTは出典の明記を歓迎します。)
Nothing in this document should be taken to contradict standards and guidelines made mandatory and binding on federal agencies by the Secretary of Commerce under statutory authority. Nor should these guidelines be interpreted as altering or superseding the existing authorities of the Secretary of Commerce, Director of the OMB, or any other federal official.
本書のいかなる記述も、法的権限に基づき商務長官が連邦機関に義務付け拘束力を持たせた標準およびガイドラインと矛盾するものと解釈すべきではありません。また、本ガイドラインは商務長官、OMB長官、またはその他の連邦職員の既存の権限を変更または置き換えるものと解釈すべきではありません。
Conformance testing for implementations of the mode of operation that is specified in this Part of the Recommendation will be conducted within the framework of the Cryptographic Module Validation Program (CMVP), a joint effort of NIST and the Communications Security Establishment of the Government of Canada. An implementation of a mode of operation must adhere to the requirements in this Recommendation in order to be validated under the CMVP. The requirements of this Recommendation are indicated by the word “shall.”
本勧告の本パートで規定する動作モードの実装に対する適合性試験は、NISTとカナダ政府のCommunications Security Establishmentが共同で実施するCryptographic Module Validation Program (CMVP)の枠組み内で行われます。動作モードの実装は、CMVPの下で検証を受けるために、本勧告の要件に従わなければなりません。本勧告の要件は“shall”という語で示されます。
3 Introduction
3 はじめに
This Recommendation specifies an algorithm, Counter with Cipher Block Chaining-Message Authentication Code [1], abbreviated CCM, that can provide assurance of the confidentiality and authenticity of data. CCM is based on an approved symmetric key block cipher algorithm whose block size is 128 bits, such as the Advanced Encryption Standard (AES) algorithm currently specified in Federal Information Processing Standard (FIPS) Pub. 197 [2]; thus, CCM cannot be used with the Triple Data Encryption Algorithm [3], whose block size is 64 bits. CCM can be considered a mode of operation of the block cipher algorithm. As with other modes of operation, a single key to the block cipher must be established beforehand among the parties to the data; thus, CCM should be implemented within a well-designed key management structure. The security properties of CCM depend, at a minimum, on the secrecy of the key.
本勧告は、データの機密性と真正性を保証できるアルゴリズムであるCounter with Cipher Block Chaining-Message Authentication Code [1](略称CCM)を規定します。CCMは、ブロック長が128ビットの承認済み共通鍵ブロック暗号アルゴリズムに基づきます。例えば、現在Federal Information Processing Standard (FIPS) Pub. 197 [2]で規定されているAdvanced Encryption Standard (AES)アルゴリズムがあります。したがって、ブロック長が64ビットのTriple Data Encryption Algorithm [3]にはCCMを使用できません。CCMはブロック暗号アルゴリズムの動作モードとみなすことができます。他の動作モードと同様に、データの関係者間で事前にブロック暗号用の単一鍵を確立しなければなりません。したがって、CCMは適切に設計された鍵管理構造の中で実装すべきです。CCMのセキュリティ特性は、少なくとも鍵の秘密性に依存します。
CCM is intended for use in a packet environment, i.e., when all of the data is available in storage before CCM is applied; CCM is not designed to support partial processing or stream processing. The input to CCM includes three elements: 1) data that will be both authenticated and encrypted, called the payload; 2) associated data, e.g., a header, that will be authenticated but not encrypted; and 3) a unique value, called a nonce, that is assigned to the payload and the associated data.
CCMはパケット環境、すなわちCCMを適用する前にすべてのデータが記憶領域にそろっている状況での使用を意図しています。CCMは部分処理やストリーム処理を支援するよう設計されていません。CCMへの入力は3つの要素からなります。1) 認証と暗号化の両方を行うデータ(ペイロードと呼ぶ)、2) ヘッダーなど、認証は行うが暗号化しない関連データ、3) ペイロードおよび関連データに割り当てる一意の値(ノンスと呼びます)。
CCM consists of two related processes: generation-encryption and decryption-verification, which combine two cryptographic primitives: counter mode encryption and cipher block chaining-based authentication. Only the forward cipher function of the block cipher algorithm is used within these primitives.
CCMは、生成・暗号化と復号・検証という関連する2つのプロセスからなり、カウンター・モード暗号化と暗号ブロック連鎖に基づく認証という2つの暗号プリミティブを組み合わせます。これらのプリミティブ内では、ブロック暗号アルゴリズムの順方向暗号関数のみを使用します。
In generation-encryption, cipher block chaining is applied to the payload, the associated data, and the nonce to generate a message authentication code (MAC); then, counter mode encryption is applied to the MAC and the payload to transform them into an unreadable form, called the ciphertext. Thus, CCM generation-encryption expands the size of the payload by the size of the MAC. In decryption-verification, counter mode decryption is applied to the purported ciphertext to recover the MAC and the corresponding payload; then, cipher block chaining is applied to the payload, the received associated data, and the received nonce to verify the correctness of the MAC. Successful verification provides assurance that the payload and the associated data originated from a source with access to the key.
生成・暗号化では、暗号ブロック連鎖をペイロード、関連データ、ノンスに適用してメッセージ認証コード(MAC)を生成します。次に、カウンター・モード暗号化をMACとペイロードに適用し、暗号文と呼ばれる判読不能な形式に変換します。したがって、CCMによる生成・暗号化では、MACの長さ分だけペイロードのサイズが増えます。復号・検証では、暗号文とされるデータにカウンター・モード復号を適用し、MACと対応するペイロードを復元します。次に、ペイロード、受信した関連データ、受信したノンスに暗号ブロック連鎖を適用して、MACの正しさを検証します。検証に成功すると、ペイロードと関連データが鍵へのアクセス権を持つ送信元に由来することが保証されます。
A MAC provides stronger assurance of authenticity than a checksum or an error detecting code. The verification of a (non-cryptographic) checksum or an error detecting code is designed to detect only accidental modifications of the data, while the verification of a MAC, as occurs in CCM, is designed to detect intentional, unauthorized modifications of the data, as well as accidental modifications.
MACは、チェックサムや誤り検出符号より強い真正性保証を提供します。チェックサム(非暗号学的)または誤り検出符号の検証は、データの偶発的な変更のみを検出するよう設計されています。一方、CCMで用いられるMACの検証は、データの意図的かつ未認可の変更と偶発的な変更の両方を検出するよう設計されています。
This specification of CCM is intended to be compatible with the use of CCM within the draft amendment [4] to the IEEE Standard 802.11 for wireless local area networks [5].
このCCM仕様は、改訂案[4](無線ローカル・エリア・ネットワーク向けIEEE Standard 802.11 [5])内でCCMを使用する場合との互換性を意図しています。
4 Definitions, Abbreviations, and Symbols
4 定義、略語、および記号
4.1 Definitions and Abbreviations
4.1 定義および略語
| Approved | FIPS approved or NIST recommended: an algorithm or technique that is either 1) specified in a FIPS or NIST Recommendation, or 2) adopted in a FIPS or NIST Recommendation. |
| Associated Data | Input data to the CCM generation-encryption process that is authenticated but not encrypted. |
原本PDFの抜粋画像

| 承認済み(Approved) | FIPS承認済みまたはNIST推奨:1) FIPSまたはNIST勧告で規定された、または2) FIPSまたはNIST勧告に採用されたアルゴリズムまたは技法。 |
| 関連データ(Associated Data) | CCM生成・暗号化プロセスへの入力データであり、認証されるが暗号化されません。 |
| Authenticity | The property that data originated from its purported source. |
| Bit | A binary digit: 0 or 1. |
| Bit Length | The number of bits in a bit string. |
| Bit String | An ordered sequence of bits. |
| Block | A bit string whose length is the block size of the block cipher algorithm. |
| Block Cipher Algorithm | A family of functions and their inverses that is parameterized by cryptographic keys; the functions map bit strings of a fixed length to bit strings of the same length. |
| Block Size | The bit length of an input (or output) block of the block cipher. |
| CBC-MAC | Cipher Block Chaining-Message Authentication Code |
| CCM | Counter with Cipher Block Chaining-Message Authentication Code. |
| Ciphertext | The output of the CCM encryption-generation process. |
| Cryptographic Key | A parameter used in the block cipher algorithm that determines the forward cipher function. |
| CTR | Counter. |
| Decryption-Verification | The process of CCM in which a purported ciphertext is decrypted and the authenticity of the resulting payload and the associated data is verified. |
| Exclusive-OR | The bitwise addition, modulo 2, of two bit strings of equal length. |
| FIPS | Federal Information Processing Standard. |
| Formatting Function | The function that transforms the payload, associated data, and nonce into a sequence of complete blocks. |
| Forward Cipher Function | One of the two functions of the block cipher algorithm that is determined by the choice of a cryptographic key. |
| Generation-Encryption | The process of CCM in which a MAC is generated on the payload and the associated data, and encryption is applied to the payload and the MAC. |
原本PDFの抜粋画像

| 真正性(Authenticity) | データが、そのデータの出所とされる送信元から発生したという特性。 |
| ビット(Bit) | 2進数字:0または1。 |
| ビット長(Bit Length) | ビット列のビット数。 |
| ビット列(Bit String) | 順序付けられたビットの列。 |
| ブロック(Block) | ブロック暗号アルゴリズムのブロック・サイズと同じ長さのビット列。 |
| ブロック暗号アルゴリズム(Block Cipher Algorithm) | 暗号鍵によってパラメーター化された関数とその逆関数の族。各関数は、固定長のビット列を同じ長さのビット列に写像します。 |
| ブロック・サイズ(Block Size) | ブロック暗号の入力(または出力)ブロックのビット長。 |
| CBC-MAC | Cipher Block Chaining-Message Authentication Code(暗号ブロック連鎖メッセージ認証コード) |
| CCM | Counter with Cipher Block Chaining-Message Authentication Code(カウンターと暗号ブロック連鎖メッセージ認証コード) |
| 暗号文(Ciphertext) | CCMの暗号化・生成プロセスの出力。 |
| 暗号鍵(Cryptographic Key) | ブロック暗号アルゴリズムで使用され、順方向暗号関数を決定するパラメーター。 |
| CTR | Counter(カウンター)。 |
| 復号・検証(Decryption-Verification) | CCMのプロセスの一つ。暗号文とされるデータを復号し、復元されたペイロードと関連データの真正性を検証します。 |
| 排他的論理和(Exclusive-OR) | 等しい長さの2つのビット列を法2でビット単位に加算する演算。 |
| FIPS | Federal Information Processing Standard(連邦情報処理標準)。 |
| フォーマット関数(Formatting Function) | ペイロード、関連データ、ノンスを、完全なブロックの列に変換する関数。 |
| 順方向暗号関数(Forward Cipher Function) | 暗号鍵の選択によって決定される、ブロック暗号アルゴリズムの2つの関数のうちの一つ。 |
| 生成・暗号化(Generation-Encryption) | ペイロードと関連データに対するMACを生成し、ペイロードとMACを暗号化するCCMのプロセス。 |
| IEEE | Institute of Electrical and Electronics Engineers |
| Inverse Cipher Function | The inverse function of the forward cipher function for a given cryptographic key. |
| Least Significant Bit(s) | The right-most bit(s) of a bit string. |
| Message Authentication Code (MAC) | A cryptographic checksum on data that is designed to reveal both accidental errors and intentional modifications of the data. |
| Mode of Operation (Mode) | An algorithm for the cryptographic transformation of data that features a symmetric key block cipher algorithm. |
| Most Significant Bit(s) | The left-most bit(s) of a bit string. |
| Nonce | A value that is used only once within a specified context. |
| Octet | A string of eight bits. |
| Octet Length | The number of octets in an octet string. |
| Octet String | An ordered sequence of octets. |
| Payload | The input data to the CCM generation-encryption process that is both authenticated and encrypted. |
| Valid Data Element | A payload, an associated data string, or a nonce that satisfies the restrictions of the formatting function. |
原本PDFの抜粋画像

| IEEE | Institute of Electrical and Electronics Engineers(電気電子技術者協会) |
| 逆方向暗号関数(Inverse Cipher Function) | 所与の暗号鍵に対する順方向暗号関数の逆関数。 |
| 最下位ビット(Least Significant Bit(s)) | ビット列の最も右側のビット。 |
| メッセージ認証コード(Message Authentication Code (MAC)) | 偶発的な誤りと意図的なデータ改変の両方を明らかにするよう設計された、データに対する暗号学的チェックサム。 |
| 動作モード(Mode of Operation (Mode)) | 共通鍵ブロック暗号アルゴリズムを用いてデータを暗号変換するアルゴリズム。 |
| 最上位ビット(Most Significant Bit(s)) | ビット列の最も左側のビット。 |
| ノンス(Nonce) | 指定されたコンテキスト内で一度だけ使用される値。 |
| オクテット(Octet) | 8ビットの列。 |
| オクテット長(Octet Length) | オクテット列に含まれるオクテット数。 |
| オクテット列(Octet String) | 順序付けられたオクテットの列。 |
| ペイロード(Payload) | CCM生成・暗号化プロセスへの入力データであり、認証と暗号化の両方を受けます。 |
| 有効なデータ要素(Valid Data Element) | フォーマット関数の制約を満たすペイロード、関連データ列、またはノンス。 |
4.2 Symbols
4.2 記号
4.2.1 Variables
4.2.1 変数
a — The octet length of the associated data.
a — 関連データのオクテット長。
A — The associated data string.
A — 関連データ文字列。
Alen — The bit length of the associated data.
Alen — 関連データのビット長。
\(B_i\) — The ith block of the formatted input.
\(B_i\) — フォーマット済み入力の第 i ブロック。
C — The ciphertext.
C — 暗号文。
Clen — The bit length of the ciphertext.
Clen — 暗号文のビット長。
\(Ctr_i\) — The ith counter block.
\(Ctr_i\) — 第 i カウンター・ブロック。
K — The block cipher key.
K — ブロック暗号の鍵。
Klen — The bit length of the block cipher key.
Klen — ブロック暗号の鍵のビット長。
m — The number of blocks in the formatted payload.
m — フォーマット済みペイロード内のブロック数。
\(\mathit{MaxErrs}\) The maximum number of times that the output of any implementation of the decryption-verification process can be INVALID before the key is retired.
\(\mathit{MaxErrs}\) 鍵が廃棄されるまでに、復号・検証プロセスの任意の実装の出力がINVALIDとなり得る最大回数。
n — The octet length of the nonce.
n — ノンスのオクテット長。
N — The nonce.
N — ノンス。
Nlen — The bit length of the nonce.
Nlen — ノンスのビット長。
P — The payload.
P — ペイロード。
Plen — The bit length of the payload.
Plen — ペイロードのビット長。
q — The octet length of the binary representation of the octet length of the payload.
q — ペイロードのオクテット長の2進表現のオクテット長。
Q — A bit string representation of the octet length of P.
Q — P のオクテット長のビット列表現。
r — The number of blocks in the formatted input data (N, A, P).
r — フォーマット済み入力データ(N、A、P)内のブロック数。
Risk — The highest acceptable probability for an inauthentic message to pass the decryption-verification process.
Risk — 真正でないメッセージが復号・検証プロセスを通過する確率として許容できる最大値。
t — The octet length of the MAC.
t — MAC のオクテット長。
T — The MAC that is generated as an internal variable in the CCM processes.
T — CCM のプロセス内で内部変数として生成される MAC。
Tlen — The bit length of the MAC.
Tlen — MAC のビット長。
4.2.2 Operations and Functions
4.2.2 演算と関数
0x — The prefix to a bit string that is represented in hexadecimal characters.
0x — 16進文字で表したビット列の接頭辞。
\([x]_s\) — The binary representation of the non-negative integer x, in s bits, where \(x<2^s\).
\([x]_s\) — 非負整数 x の s ビットによる2進表現。ただし \(x<2^s\) とします。
\(\lceil x \rceil\): The least integer that is not less than the real number \(x\).
\(\lceil x \rceil\):実数\(x\)以上である最小の整数。
\(X \parallel Y\): The concatenation of two bit strings \(X\) and \(Y\).
\(X \parallel Y\):2つのビット列\(X\)および\(Y\)の連結。
\(X \oplus Y\) The bitwise exclusive-OR of two bit strings \(X\) and \(Y\) of the same length.
\(X \oplus Y\) 同じ長さの2つのビット列\(X\)および\(Y\)のビット単位排他的論理和。
\(\mathrm{CIPH}_K(X)\): The output of the forward cipher function of the block cipher algorithm under the key \(K\) applied to the data block \(X\).
\(\mathrm{CIPH}_K(X)\):鍵\(K\)の下でブロック暗号アルゴリズムの順方向暗号関数をデータ・ブロック\(X\)に適用した出力。
\(\mathrm{LSB}_s(X)\) The bit string consisting of the \(s\) right-most bits of the bit string \(X\).
\(\mathrm{LSB}_s(X)\) 右端の\(s\)ビットをビット列\(X\)から取り出したビット列。
\(\mathrm{MSB}_s(X)\) — The bit string consisting of the s left-most bits of the bit string X.
\(\mathrm{MSB}_s(X)\) — ビット列 X の左端の s ビットからなるビット列。
lg(x) — The base 2 logarithm of the positive real number x.
lg(x) — 正の実数 x の2を底とする対数。
5 Preliminaries
5 予備事項
The selection of a block cipher algorithm and secret key are discussed in Section 5.1. The two cryptographic primitives that CCM requires for its operation are discussed in Section 5.2. The data elements of CCM are discussed in Section 5.3. The formatting of valid data elements is discussed in Section 5.4. Examples of operations and functions are given in Section 5.5.
ブロック暗号アルゴリズムと共通鍵の選択については5.1節で述べます。CCMの動作に必要な2つの暗号プリミティブについては5.2節で述べます。CCMのデータ要素については5.3節で述べます。有効なデータ要素のフォーマットについては5.4節で述べます。演算と関数の例は5.5節に示します。
5.1 Underlying Block Cipher Algorithm
5.1 基礎となるブロック暗号アルゴリズム
The CCM algorithm depends on the choice of an underlying symmetric key block cipher algorithm. The CCM algorithm is thus a mode of operation (mode, for short) of the symmetric key block cipher. The underlying block cipher algorithm shall be approved, and a secret key for the block cipher algorithm shall be generated uniformly at random, or close to uniformly at random, i.e., so that each possible key is (nearly) equally likely to be generated. Moreover, the key should be established for the parties to the information by an approved key establishment method. The key shall be kept secret and shall only be used for the CCM mode. The total number of invocations of the block cipher algorithm during the lifetime of the key shall be limited to \(2^{61}\). Key establishment and key management are outside the scope of this Recommendation.
CCMアルゴリズムは、基礎となる共通鍵ブロック暗号アルゴリズムの選択に依存します。したがってCCMアルゴリズムは、共通鍵ブロック暗号の動作モード(略してモード)です。基礎となるブロック暗号アルゴリズムは承認済みでなければならず、ブロック暗号アルゴリズムの秘密鍵は一様ランダム、またはほぼ一様ランダムに生成しなければなりません。すなわち、可能な各鍵が(ほぼ)同じ確率で生成されるようにします。さらに、情報の関係者間で承認済みの鍵確立方法を用いて鍵を確立すべきです。鍵は秘密に保持し、CCMモードにのみ使用しなければなりません。鍵の有効期間中にブロック暗号アルゴリズムを呼び出す総回数は\(2^{61}\)に制限しなければなりません。鍵確立と鍵管理は本勧告の適用範囲外です。
For any given key, the underlying block cipher algorithm of the mode consists of two functions that are inverses of each other. As part of the choice of the block cipher algorithm, one of the two functions of the block cipher algorithm is designated as the forward cipher function. ∗ The inverse of this process is called the inverse cipher function; however, the CCM mode does not require the inverse cipher function.
任意の鍵に対し、モードの基礎となるブロック暗号アルゴリズムは、互いに逆関数となる2つの関数からなります。ブロック暗号アルゴリズムの選択の一部として、その2つの関数のうち一方を順方向暗号関数として指定します。∗ この処理の逆を逆方向暗号関数と呼びますが、CCMモードは逆方向暗号関数を必要としません。
The forward cipher function is a function on bit strings of a fixed bit length; the strings are called blocks, and their length is called the block size. For CCM, the block size of the block cipher algorithm shall be 128 bits; currently, the AES algorithm is the only approved block cipher algorithm with this block size.
順方向暗号関数は、固定ビット長のビット列に作用する関数です。これらのビット列をブロックと呼び、その長さをブロック・サイズと呼びます。CCMでは、ブロック暗号アルゴリズムのブロック・サイズは128ビットでなければなりません。現時点で、このブロック・サイズを持つ承認済みブロック暗号アルゴリズムはAESアルゴリズムのみです。 (shall)
The CCM key, denoted \(K\), is the block cipher key; the forward cipher function of the block cipher with this key is denoted \(\mathrm{CIPH}_K\). The bit length of \(K\) is denoted \(\mathit{Klen}\).
CCM鍵は\(K\)と表記し、ブロック暗号鍵です。この鍵を用いるブロック暗号の順方向暗号関数は\(\mathrm{CIPH}_K\)と表記します。\(K\)のビット長は\(\mathit{Klen}\)と表記します。
5.2 Cryptographic Primitives
5.2 暗号プリミティブ
The CCM specification essentially combines two cryptographic mechanisms that are based on the forward cipher function. One mechanism is the Counter (CTR) mode for confidentiality, which is specified for general use in the first Part of this Recommendation [6]. The CTR mode requires the generation of a sufficiently long sequence of blocks called the counter blocks. The counter blocks must be distinct within a single invocation and across all other invocations of the CTR mode under any given key, but they need not be secret. This requirement on the counter blocks extends to the CCM mode. See [6] for further discussion of the generation of counter blocks; see Section 5.4 below for an additional requirement on the counter blocks in CCM.
CCM仕様は、基本的に順方向暗号関数に基づく2つの暗号機構を組み合わせます。一方は機密性を提供するカウンター(CTR)モードであり、本勧告の第1部[6]で一般用途向けに規定されています。CTRモードでは、カウンター・ブロックと呼ばれる十分に長いブロック列を生成する必要があります。カウンター・ブロックは、単一の呼出し内および所与の鍵の下での他のすべてのCTRモード呼出し間で互いに異ならなければなりませんが、秘密である必要はありません。このカウンター・ブロックに関する要件はCCMモードにも適用されます。カウンター・ブロックの生成に関する詳細は[6]を参照し、CCMのカウンター・ブロックに対する追加要件については以下の5.4節を参照します。 (must)
The other cryptographic mechanism within CCM is an adaptation of the cipher block chaining (CBC) technique from [6] to provide assurance of authenticity. Specifically, the CBC technique with an initialization vector of zero is applied to the data to be authenticated; the final block of the resulting CBC output, possibly truncated, serves as a message authentication code (MAC) of the data. The algorithm for generating a MAC in this fashion is commonly called CBC-MAC. This Recommendation does not approve CBC-MAC as an authentication mode outside of the context of the CCM specification; however, a variation of CBC-MAC is proposed for general use in the second Part of this Recommendation [7].
CCMにおけるもう一つの暗号機構は、真正性を保証するために[6]の暗号ブロック連鎖(CBC)技法を適用したものです。具体的には、認証対象データに対し、初期化ベクトルをゼロとしてCBC技法を適用します。得られるCBC出力の最終ブロックは、場合によっては切り詰められ、データのメッセージ認証コード(MAC)として機能します。この方法でMACを生成するアルゴリズムは、一般にCBC-MACと呼ばれます。本勧告は、CCM仕様の範囲外でCBC-MACを認証モードとして承認しません。ただし、CBC-MACの変形方式は、本勧告の第2部[7]で一般用途向けに提案されています。
The same key, \(K\), is used for both the CTR and CBC-MAC mechanisms within CCM.
CCM内のCTR機構とCBC-MAC機構の両方で同じ鍵\(K\)を使用します。
5.3 Data Elements
5.3 データ要素
The data that CCM protects consists of a message, i.e., a bit string, called the payload, denoted \(P\), of bit length denoted \(\mathit{Plen}\), and a bit string, called the associated data, denoted \(A\). The associated data is optional, i.e., \(A\) may be the empty string.** CCM provides assurance of the confidentiality of \(P\) and assurance of the authenticity of the origin of both \(A\) and \(P\); confidentiality is not provided for \(A\).
CCMが保護するデータは、ペイロードと呼ぶメッセージ(すなわちビット列)\(P\)(そのビット長を\(\mathit{Plen}\)と表記する)と、関連データと呼ぶビット列\(A\)からなります。関連データは任意であり、\(A\)は空文字列であってもよいです。** CCMは\(P\)の機密性と、\(A\)および\(P\)の両方の送信元の真正性を保証します。\(A\)の機密性は提供しません。
A bit string called the nonce, denoted N, is assigned to the data pair to be protected, i.e., the payload and its associated data. The nonce shall be non-repeating in the sense that any two distinct data pairs to be protected by CCM during the lifetime of the key shall be assigned distinct nonces. In effect, the nonce determines an invocation of CCM. The nonce is not required to be random.
保護対象のデータ・ペア、すなわちペイロードとその関連データに、ノンスと表記するビット列Nを割り当てます。ノンスは、鍵の有効期間中にCCMで保護される異なるデータ・ペアの任意の2組に異なるノンスが割り当てられるという意味で、重複してはなりません。実質的に、ノンスはCCMの呼出しを決定します。ノンスをランダムにする必要はありません。 (shall) (shall)
The MAC that is generated within CCM is an internal variable, denoted \(T\). The bit length of \(T\), denoted \(\mathit{Tlen}\), is a parameter of the mode that shall be fixed for all invocations of CCM with the given key. The requirements for the selection of \(\mathit{Tlen}\) are discussed in Appendix B.
CCM内で生成されるMACは内部変数であり、\(T\)と表記します。\(T\)のビット長は\(\mathit{Tlen}\)と表記し、所与の鍵を用いるCCMのすべての呼出しについて固定しなければならないモードのパラメーターです。\(\mathit{Tlen}\)の選択要件は付録Bで説明します。
5.4 Input Formatting
5.4 入力フォーマット
The CCM data elements N, P, and A shall be formatted into a non-empty sequence of complete data blocks, denoted B0, B1, …, Br for some non-negative integer r, in accordance with a function called the formatting function (in [8], the formatting function is called the encoding function, β). The value of r depends on the formatting function and the input elements. For any given key, the following three properties shall hold for the formatting function:
CCMデータ要素N、P、Aは、書式設定関数([8]では符号化関数βと呼ばれる)に従い、非負整数rに対する完全なデータ・ブロックからなる空でない列B0, B1, …, Brに書式設定しなければなりません。rの値は書式設定関数と入力要素に依存します。任意の鍵について、書式設定関数は次の3つの特性を満たさなければならない:
1. The first block, \(B_0\), uniquely determines the nonce \(N\).
1. 最初のブロック\(B_0\)はノンス\(N\)を一意に決定します。
2. The formatted data uniquely determines \(P\) and \(A\); moreover, if \((N, P, A)\) and \((N, P', A')\) are distinct input triples whose formatting is \(B_0, B_1, \ldots, B_r\) and \(B_0', B_1', \ldots, B_{r'}'\), then \(B_i\) is distinct from \(B_i'\) for some index \(i\) such that \(i \le r\) and \(i \le r'\).*
2. フォーマット済みデータは\(P\)および\(A\)を一意に決定します。さらに、\((N, P, A)\)と\((N, P', A')\)が異なる入力三つ組であり、そのフォーマット結果がそれぞれ\(B_0, B_1, \ldots, B_r\)と\(B_0', B_1', \ldots, B_{r'}'\)である場合、\(B_i\)は\(B_i'\)と異なります。ここで\(i\)は、\(i \le r\)かつ\(i \le r'\)を満たすある添字です。*
3. The first block, \(B_0\), is distinct from any counter blocks that are used across all invocations of CCM under the key.
3. 最初のブロック\(B_0\)は、その鍵の下でCCMのすべての呼出しにわたって使用されるどのカウンター・ブロックとも異なります。
The third property suggests that the formatting function and the counter generation function should not be selected or constructed independently of each other.
3番目の特性は、フォーマット関数とカウンター生成関数を互いに独立に選択または構成すべきではないことを示唆しています。 (should)
The formatting function may impose restrictions on the contents and the bit lengths of the input data \(N\), \(P\), and \(A\), as well as the parameter \(\mathit{Tlen}\). For example, the bit lengths may be restricted to multiples of eight and to a given range of values. Values that satisfy the restrictions of the formatting function are called valid. No value of \(\mathit{Tlen}\) smaller than 32 shall be valid.
フォーマット関数は、入力データ\(N\)、\(P\)、\(A\)の内容とビット長、およびパラメーター\(\mathit{Tlen}\)に制約を課す場合があります。例えば、ビット長を8の倍数および所定の値の範囲内に制限する場合があります。フォーマット関数の制約を満たす値を有効と呼びます。32未満の\(\mathit{Tlen}\)の値は有効としてはなりません。
An example of a formatting function and counter generation function that together satisfy these requirements is given in Appendix A. Alternative formatting functions may be developed in the future.
これらの要件をともに満たすフォーマット関数およびカウンター生成関数の例を付録Aに示します。代替のフォーマット関数が将来開発される可能性があります。 (may)
5.5 Examples of Operations and Functions
5.5 演算および関数の例
Given a positive integer s and a non-negative integer x that is less than 2s, the binary representation of x in s bits is denoted [x]s. For example, for the (base 10) integer 45, the binary representation (base 2) is 101101, so [45]8 = 00101101.
正の整数sおよび2s未満の非負整数xについて、xをsビットで表した2進表現を[x]sと表記します。例えば、(10進)整数45の2進表現は101101であるため、[45]8 = 00101101です。
The concatenation operation on bit strings is denoted \(\parallel\); for example, \(001 \parallel 10111 = 00110111\).
ビット列の連結演算は\(\parallel\)と表記します。例えば、\(001 \parallel 10111 = 00110111\)です。
∗ This property deals with the case that a nonce is repeated within two distinct input triples. Although the legitimate source/sender of the data is already required to assign distinct nonces to different input triples, the security model in [8] takes into account that the recipient of purported ciphertexts might not monitor whether a nonce is repeated.
∗ この特性は、2つの異なる入力三つ組でノンスが繰り返される場合を扱います。正当なデータ送信元/送信者には、異なる入力三つ組に異なるノンスを割り当てることがすでに求められていますが、[8]のセキュリティ・モデルでは、暗号文とされるデータの受信者がノンスの重複を監視しない可能性を考慮しています。 (might)
Given bit strings of equal length, the exclusive-OR operation, denoted \(\oplus\), specifies the addition, modulo 2, of the bits in each bit position, i.e., without carries. For example, \(10011 \oplus 10101 = 00110\).
等しい長さのビット列に対して、排他的論理和演算(\(\oplus\)と表記する)は、各ビット位置のビットを桁上がりなしで法2加算することを表します。例えば、\(10011 \oplus 10101 = 00110\)です。
The functions \(\mathrm{LSB}_s\) and \(\mathrm{MSB}_s\) return the \(s\) least significant (i.e., right-most) bits and the \(s\) most significant (i.e., left-most) bits of their arguments, respectively. For example, \(\mathit{LSB}_3(111011010) = 010\), and \(\mathit{MSB}_4(111011010) = 1110\).
関数\(\mathrm{LSB}_s\)および\(\mathrm{MSB}_s\)は、それぞれ引数の最下位(すなわち右端)の\(s\)ビットと最上位(すなわち左端)の\(s\)ビットを返します。例えば、\(\mathit{LSB}_3(111011010) = 010\)、および\(\mathit{MSB}_4(111011010) = 1110\)です。
Given a positive real number \(x\), the base 2 logarithm \(x\) is denoted \(\lg(\mathrm{x})\). For example, \(\lg(2^{10}) = 10\).
正の実数\(x\)について、底2の対数\(x\)を\(\lg(\mathrm{x})\)と表記します。例えば、\(\lg(2^{10}) = 10\)です。
6 CCM Specification
6 CCM仕様
The two CCM processes are called generation-encryption and decryption-verification. The prerequisites, inputs, outputs, steps, and summaries for the execution of the two CCM processes are specified in Sections 6.1 and 6.2 below. The prerequisites are inputs that are typically fixed across many invocations of CCM. The prerequisites and inputs shall meet the requirements in Section 5.
CCMの2つのプロセスを生成・暗号化および復号・検証と呼びます。2つのCCMプロセスを実行するための前提条件、入力、出力、手順、要約を、以下の6.1節および6.2節で規定します。前提条件とは、通常、CCMの多数の呼出しにわたって固定される入力です。前提条件と入力は5節の要件を満たさなければなりません。 (shall)
There is some flexibility in the order of the steps of the two processes. For example, the generation of the counter blocks can occur at any time before they are used; in fact, the counter blocks may be generated in advance and be considered as inputs to the processes.
2つのプロセスの手順の順序には一定の柔軟性があります。例えば、カウンター・ブロックの生成は、それらを使用する前であればいつでも行うことができます。実際、カウンター・ブロックを事前に生成してプロセスへの入力とみなすこともできます。 (may) (can)
6.1 Generation-Encryption Process
6.1 生成・暗号化プロセス
The following is a specification of the generation-encryption process of CCM:
以下に、CCMの生成・暗号化プロセスを規定する:
Prerequisites: block cipher algorithm; key \(K\); counter generation function; formatting function; MAC length \(\mathit{Tlen}\).
前提条件:ブロック暗号アルゴリズム;鍵\(K\);カウンター生成関数;フォーマット関数;MAC長\(\mathit{Tlen}\)。
Input: valid nonce \(N\); valid payload \(P\) of length \(\mathit{Plen}\) bits; valid associated data \(A\);
入力:有効なノンス\(N\);有効なペイロード\(P\)(長さ\(\mathit{Plen}\)ビット);有効な関連データ\(A\);
Output: ciphertext \(C\).
出力:暗号文\(C\)。
Steps:
手順:
1.Apply the formatting function to (N, A, P) to produce the blocks B0, B1, …, Br.
1.フォーマット関数を(N, A, P)に適用し、ブロックB0, B1, …, Brを生成します。
2. Set \(Y_0 = \mathrm{CIPH}_K(B_0)\).
2. \(Y_0 = \mathrm{CIPH}_K(B_0)\)に設定します。
3. For \(i = 1\) to \(r\), do \(Y_i = \mathrm{CIPH}_K(B_i \oplus Y_{i-1})\).
3. \(i = 1\)から\(r\)まで、\(Y_i = \mathrm{CIPH}_K(B_i \oplus Y_{i-1})\)を実行します。
4. Set \(T = \mathrm{MSB}_{\mathit{Tlen}}(Y_r)\).
4. \(T = \mathrm{MSB}_{\mathit{Tlen}}(Y_r)\)に設定します。
5. Apply the counter generation function to generate the counter blocks \(\mathit{Ctr}_0, \mathit{Ctr}_1, \ldots, \mathit{Ctr}_m\), where \(m = \lceil \mathit{Plen}/128 \rceil\).
5. カウンター生成関数を適用し、カウンター・ブロック\(\mathit{Ctr}_0, \mathit{Ctr}_1, \ldots, \mathit{Ctr}_m\)を生成します。ここで\(m = \lceil \mathit{Plen}/128 \rceil\)です。
6. For \(j = 0\) to \(m\), do \(S_j = \mathrm{CIPH}_K(\mathit{Ctr}_j)\).
6. \(j = 0\)から\(m\)まで、\(S_j = \mathrm{CIPH}_K(\mathit{Ctr}_j)\)を実行します。
7. Set \(\mathrm{S} = S_1 \parallel S_2 \parallel \ldots \parallel S_m\).
7. \(\mathrm{S} = S_1 \parallel S_2 \parallel \ldots \parallel S_m\)に設定します。
8. Return \(C = (P \oplus \mathrm{MSB}_{\mathit{Plen}}(S)) \parallel (T \oplus \mathrm{MSB}_{\mathit{Tlen}}(S_0))\).
8. \(C = (P \oplus \mathrm{MSB}_{\mathit{Plen}}(S)) \parallel (T \oplus \mathrm{MSB}_{\mathit{Tlen}}(S_0))\)を返します。
The input data to the generation-encryption process are a valid nonce, a valid payload string, and a valid associated data string, which are formatted according to the formatting function. The CBC-MAC mechanism is applied to the formatted data to generate a MAC, whose length is a prerequisite. Counter mode encryption, which requires a sufficiently long sequence of counter blocks as input, is applied to the payload string and separately to the MAC. The resulting data, called the ciphertext, denoted \(C\), is the output of the generation-encryption process.
生成・暗号化プロセスへの入力データは、有効なノンス、有効なペイロード列、有効な関連データ列であり、フォーマット関数に従ってフォーマットされます。フォーマット済みデータにCBC-MAC機構を適用してMACを生成します。MAC長は前提条件です。入力として十分に長いカウンター・ブロック列を必要とするカウンター・モード暗号化を、ペイロード列とMACにそれぞれ適用します。暗号文と呼ばれ、\(C\)と表記される生成データが、生成・暗号化プロセスの出力です。
6.2 Decryption-Verification Process
6.2 復号・検証プロセス
Prerequisites: block cipher algorithm; key \(K\); counter generation function; formatting function; valid MAC length \(\mathit{Tlen}\).
前提条件:ブロック暗号アルゴリズム;鍵\(K\);カウンター生成関数;フォーマット関数;有効なMAC長\(\mathit{Tlen}\)。
Input: nonce \(N\); associated data \(A\); purported ciphertext \(C\) of length \(\mathit{Clen}\) bits;
入力:ノンス\(N\);関連データ\(A\);暗号文とされるデータ\(C\)(長さ\(\mathit{Clen}\)ビット);
Output: either the payload \(P\) or INVALID.
出力:ペイロード\(P\)またはINVALIDのいずれか。
Steps:
手順:
1. If \(\mathit{Clen} \le \mathit{Tlen}\), then return INVALID.
1. \(\mathit{Clen} \le \mathit{Tlen}\)の場合、INVALIDを返します。
2. Apply the counter generation function to generate the counter blocks \(\mathit{Ctr}_0\), \(\mathit{Ctr}_1\), \(\ldots\), \(\mathit{Ctr}_m\), where \(m = \lceil (\mathit{Clen} - \mathit{Tlen})/128 \rceil\).
2. カウンター生成関数を適用し、カウンター・ブロック\(\mathit{Ctr}_0\), \(\mathit{Ctr}_1\), \(\ldots\), \(\mathit{Ctr}_m\)を生成します。ここで\(m = \lceil (\mathit{Clen} - \mathit{Tlen})/128 \rceil\)です。
3. For \(j=0\) to \(m\), do \(S_j = \mathrm{CIPH}_K(\mathit{Ctr}_j)\).
3. \(j=0\)から\(m\)まで、\(S_j = \mathrm{CIPH}_K(\mathit{Ctr}_j)\)を実行します。
4. Set \(\mathrm{S} = S_1 \parallel S_2 \parallel \ldots \parallel S_m\).
4. \(\mathrm{S} = S_1 \parallel S_2 \parallel \ldots \parallel S_m\)に設定します。
5. Set \(P=\mathrm{MSB}_{\mathit{Clen}-\mathit{Tlen}}(C) \oplus \mathrm{MSB}_{\mathit{Clen}-\mathit{Tlen}}(S)\).
5. \(P=\mathrm{MSB}_{\mathit{Clen}-\mathit{Tlen}}(C) \oplus \mathrm{MSB}_{\mathit{Clen}-\mathit{Tlen}}(S)\)に設定します。
6. Set \(T=\mathrm{LSB}_{\mathit{Tlen}}(C) \oplus \mathrm{MSB}_{\mathit{Tlen}}(S_0)\).
6. \(T=\mathrm{LSB}_{\mathit{Tlen}}(C) \oplus \mathrm{MSB}_{\mathit{Tlen}}(S_0)\)に設定します。
7.If N, A, or P is not valid, as discussed in Section 5.4, then return INVALID; else apply the formatting function to (N, A, P) to produce the blocks B0, B1, …, Br.
7.第5.4節で説明するとおりN、A、Pのいずれかが無効であればINVALIDを返します。それ以外の場合、書式設定関数を(N, A, P)に適用し、ブロックB0, B1, …, Brを生成します。
8. Set \(Y_0 = \mathrm{CIPH}_K(B_0)\).
8. \(Y_0 = \mathrm{CIPH}_K(B_0)\)に設定します。
9. For \(i = 1\) to \(r\), do \(Y_j = \mathrm{CIPH}_K(B_i \oplus Y_{i-1})\).
9. \(i = 1\)から\(r\)まで、\(Y_j = \mathrm{CIPH}_K(B_i \oplus Y_{i-1})\)を実行します。
10. If \(T \ne \mathrm{MSB}_{\mathit{Tlen}}(Y_r)\), then return INVALID, else return \(P\).
10. \(T \ne \mathrm{MSB}_{\mathit{Tlen}}(Y_r)\)の場合はINVALIDを返し、それ以外の場合は\(P\)を返します。
The input to the decryption-verification process is a purported ciphertext, an associated data string, and the nonce that was purportedly used in the generation of the purported ciphertext. Counter mode decryption is applied to the purported ciphertext to produce the corresponding MAC and payload. If the nonce, the associated data string, and the payload are valid, as discussed in Section 5.4, then these strings are formatted into blocks according to the formatting function, and the CBC-MAC mechanism is applied to verify the MAC. If verification succeeds, the decryption-verification process returns the payload as output; otherwise, only the error message INVALID is returned.
復号・検証プロセスへの入力は、暗号文とされるデータ、関連データ列、およびその暗号文とされるデータの生成に使用されたとされるノンスです。カウンター・モード復号を暗号文とされるデータに適用し、対応するMACおよびペイロードを生成します。第5.4節で説明するように、ノンス、関連データ列、およびペイロードが有効であれば、これらの列を書式設定関数に従ってブロックに書式設定し、CBC-MAC機構を適用してMACを検証します。検証に成功した場合、復号・検証プロセスはペイロードを出力として返します。それ以外の場合は、エラーメッセージINVALIDのみを返します。
When the error message INVALID is returned, the payload \(P\) and the MAC \(T\) shall not be revealed. Moreover, the implementation shall ensure that an unauthorized party cannot distinguish whether the error message results from Step 7 or from Step 10, for example, from the timing of the error message.
エラーメッセージINVALIDが返された場合、ペイロード\(P\)およびMAC \(T\)を明らかにしてはなりません。さらに、エラーメッセージがステップ7とステップ10のどちらに起因するかを、例えばエラーメッセージが返されるまでの時間から、権限のない者が判別できないよう実装で確保しなければなりません。
Appendix A: Example of a Formatting and Counter Generation Function
付録A:書式設定関数およびカウンター生成関数の例
In this appendix, a formatting function for the input data and a counter generation function are specified that together satisfy the requirements of Section 5.4. With these functions, this specification of CCM is essentially equivalent to the specification of CCM in the draft amendment [4] to the IEEE Standard 802.11 for wireless local area networks [5].
本付録では、入力データの書式設定関数とカウンター生成関数を規定します。これらを組み合わせることで、第5.4節の要件を満たします。これらの関数を用いる本CCM仕様は、IEEE無線ローカルエリアネットワーク標準802.11 [5]の改訂草案[4]にあるCCM仕様と実質的に同等です。
The requirements that this particular formatting function imposes on the lengths of the variables in CCM are given in Section A.1; the formatting of the input data is specified in Section A.2; the counter generation function is specified in Section A.3.
この特定の書式設定関数がCCMの変数の長さに課す要件をA.1節に示し、入力データの書式設定をA.2節に、カウンター生成関数をA.3節に規定します。
A.1 Length Requirements
A.1 長さ要件
The bit length of each input string, i.e., \(N\), \(A\), and \(P\), shall be a multiple of 8 bits, i.e., each input string shall be an octet string. The octet lengths of these strings are denoted \(n\), \(a\), and \(p\); thus, \(n\), \(a\) and \(p\) are integers. Similarly, the parameter \(t\) denotes the octet length of \(T\). The octet length of \(P\) (i.e., the integer \(p\)) is represented within the first block of the formatted data as an octet string denoted \(Q\). The octet length of \(Q\), denoted \(q\), is a parameter of the formatting function. Thus, \(Q\) is equivalent to \([p]_{8q}\), the binary representation of \(p\) in \(q\) octets. For example, if \(q = 3\) and \(P\) is a string that consists of 4096 bits, i.e., \(p = 512\), then \(Q\) is the string 00000000 00000010 00000000.
各入力文字列、すなわち\(N\)、\(A\)、\(P\)のビット長は8の倍数でなければならず、すなわち各入力文字列はオクテット列でなければなりません。これらの文字列のオクテット長を\(n\)、\(a\)、\(p\)と表し、したがって\(n\)、\(a\)、\(p\)は整数です。同様に、パラメーター\(t\)は\(T\)のオクテット長を表します。\(P\)のオクテット長(すなわち整数\(p\))は、フォーマット済みデータの最初のブロック内で\(Q\)と表すオクテット列として表現します。\(Q\)のオクテット長は\(q\)と表し、フォーマット関数のパラメーターです。したがって、\(Q\)は\([p]_{8q}\)、すなわち\(p\)を\(q\)オクテットで表した二進表現に相当します。例えば、\(q = 3\)で\(P\)が4096ビットからなる文字列、すなわち\(p = 512\)の場合、\(Q\)は文字列00000000 00000010 00000000です。
The formatting in this appendix imposes the following length conditions:
本付録の書式設定では、次の長さ条件を課します。
• \(t\) is an element of \(\{4, 6, 8, 10, 12, 14, 16\}\);
• \(t\)は\(\{4, 6, 8, 10, 12, 14, 16\}\)の要素です。
• \(q\) is an element of \(\{2, 3, 4, 5, 6, 7, 8\}\);
• \(q\)は\(\{2, 3, 4, 5, 6, 7, 8\}\)の要素です。
• \(n\) is an element of \(\{7, 8, 9, 10, 11, 12, 13\}\)
• \(n\)は\(\{7, 8, 9, 10, 11, 12, 13\}\)の要素です。
• \(n+q=15\);
• \(n+q=15\)。
• \(a<2^{64}\).
• \(a<2^{64}\)。
The parameter \(q\) determines the maximum length of the payload: by definition, \(p<2^{8q}\), so \(P\) consists of fewer than \(2^{8q}\) octets, i.e., fewer than \(2^{8q-4}\) 128-bit blocks. The fourth condition implies that a choice for \(q\) determines the value of \(n\), namely, \(n=15-q\). (Equivalently, the nonce length, \(n\), may be considered as the parameter of the formatting function that determines the value of \(q\).) The value of \(n\), in turn, determines the maximum number of distinct nonces, namely, \(2^{8n}\). Thus, the fourth condition amounts to a tradeoff between the maximum number of invocations of CCM under a given key and the maximum payload length for those invocations.
パラメーター\(q\)はペイロードの最大長を決定します。定義により\(p<2^{8q}\)であるため、\(P\)は\(2^{8q}\)オクテット未満、すなわち\(2^{8q-4}\)個未満の128ビット・ブロックからなります。第4の条件により、\(q\)を選ぶと\(n\)の値が決まります。すなわち、\(n=15-q\)です。(同等に、ノンス長\(n\)を、\(q\)の値を決める書式設定関数のパラメーターとみなしてもよいです。)さらに\(n\)の値は、異なるノンスの最大数、すなわち\(2^{8n}\)を決定します。したがって第4の条件は、所与の鍵の下でCCMを呼び出せる最大回数と、各呼出しで扱えるペイロードの最大長とのトレードオフとなります。
A.2 Formatting of the Input Data
A.2 入力データの書式設定
The formatting of the input data (N, A, P) into a sequence of blocks B0, B1, …, Br is presented in the following three sections: in Section A.2.1, the formatting of the nonce and control information such as length indicators is specified; in Section A.2.2, the formatting of A is specified; in Section A.2.3, the formatting of P is specified.
入力データ(N, A, P)をブロック列B0, B1, …, Brに書式設定する方法を以下の3節で説明します。A.2.1節ではノンスと、長さ指標などの制御情報の書式設定を、A.2.2節ではAの書式設定を、A.2.3節ではPの書式設定を規定します。
A.2.1 Formatting of the Control Information and the Nonce
A.2.1 制御情報およびノンスの書式設定
The leading octet of the first block of the formatting, \(B_0\), contains four flags for control information: two single bits, called \(\mathit{Reserved}\) and \(\mathit{Adata}\), and two strings of three bits, to encode the values \(t\) and \(q\). The encoding of \(t\) is \([(t-2)/2]_3\), and the encoding of \(q\) is \([q-1]_3\). Thus, for example, if the MAC length is 8 octets, then \(t\) is encoded as 011. Note that the encoding 000 in both cases does not correspond to a permitted value of \(t\) or \(q\). The \(\mathit{Reserved}\) bit is reserved to enable future extensions of the formatting; it shall be set to ‘0’. The \(\mathit{Adata}\) bit is ‘0’ if \(a=0\) and ‘1’ if \(a>0\). The ordering of the flags within the octet is given in Table 1.
書式設定の最初のブロック\(B_0\)の先頭オクテットには、制御情報用の4つのフラグが含まれます。\(\mathit{Reserved}\)および\(\mathit{Adata}\)と呼ぶ単一ビットが2つ、ならびに\(t\)と\(q\)の値を符号化する3ビット列が2つです。\(t\)の符号化は\([(t-2)/2]_3\)、\(q\)の符号化は\([q-1]_3\)です。したがって例えば、MAC長が8オクテットの場合、\(t\)は011として符号化されます。いずれの場合も符号000は\(t\)または\(q\)の許容値に対応しないことに注意します。\(\mathit{Reserved}\)ビットは将来の書式拡張を可能にするために予約されており、‘0’に設定しなければなりません。\(\mathit{Adata}\)ビットは\(a=0\)なら‘0’、\(a>0\)なら‘1’です。オクテット内のフラグの順序を表1に示します。
Table 1: Formatting of the Flags Octet in B0
表1:B0内のフラグ・オクテットのフォーマット
| Bit number | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Contents | Reserved | \(\mathit{Adata}\) | \([(t-2)/2]_3\) | \([q-1]_3\) | ||||
| ビット番号 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 内容 | Reserved | \(\mathit{Adata}\) | \([(t-2)/2]_3\) | \([q-1]_3\) | ||||
The remaining 15 octets of the first block of the formatting are devoted to the nonce and the binary representation of the message length in \(q\) octets, as given in Table 2.
フォーマットにおける最初のブロックの残り15オクテットは、表2に示すように、ノンスおよびメッセージ長の\(q\)オクテット二進表現に充てられます。
Table 2: Formatting of B0
表2:B0のフォーマット
| Octet number | 0 | \(1 \ldots 15-q\) | \(16-q \ldots 15\) |
| Contents | Flags | \(N\) | \(Q\) |
| オクテット番号 | 0 | \(1 \ldots 15-q\) | \(16-q \ldots 15\) |
| 内容 | フラグ | \(N\) | \(Q\) |
For example, if B0 is
例えば、B0が次のとおりである場合
01101110 00010011 11010100 10100011 01011101 01110001 10100101 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01000100 00000001:
01101110 00010011 11010100 10100011 01011101 01110001 10100101 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01000100 00000001:
• The associated data will not be empty (because \(\mathit{Adata}=1\)).
• 関連データは空ではありません(\(\mathit{Adata}=1\)のため)。
• The MAC will consist of 12 octets (because \([(t-2)/2]_3=101\)).
• MACは12オクテットからなります(\([(t-2)/2]_3=101\)のため)。
• The octet length of \(Q\) is 7 (because \([q-1]_3=110\)), so \(Q\) is 00000000 000000000 00000000 00000000 00000000 01000100 00000001.
• \(Q\)のオクテット長は7です(\([q-1]_3=110\)のため)。したがって\(Q\)は00000000 000000000 00000000 00000000 00000000 01000100 00000001です。
• The payload will consist of 17,409 octets (because \(Q=[17409]_{56}\)).
• ペイロードは17,409オクテットからなります(\(Q=[17409]_{56}\)のため)。
• The octet length of \(N\) is 8 (because \(n=15-q\) and \(q=7\)), so \(N=\)00010011 11010100 10100011 01011101 01110001 10100101 00000000 00000000.
• \(N\)のオクテット長は8です(\(n=15-q\)かつ\(q=7\)であるため)。したがって\(N=\)00010011 11010100 10100011 01011101 01110001 10100101 00000000 00000000です。
A.2.2 Formatting of the Associated Data
A.2.2 関連データのフォーマット
If \(a=0\), as indicated by the \(\mathit{Adata}\) field in the first octet of \(B_0\), then there are no blocks devoted to the associated data in the formatted data. If \(a>0\), then \(a\) is encoded as described below, and the encoding of \(a\) is concatenated with the associated data \(A\), followed by the minimum number of ‘0’ bits, possibly none, such that the resulting string can be partitioned into 16-octet blocks. These blocks are denoted in the formatted data as \(B_1\), \(B_2\), \(\ldots\) \(B_u\) for some positive integer \(u\) that depends on \(a\). The value \(a\) is encoded according to the following three cases:
\(a=0\)の場合、\(\mathit{Adata}\)フィールド(\(B_0\)の最初のオクテットにある)が示すとおり、フォーマット済みデータに関連データ用のブロックはありません。\(a>0\)の場合、以下のとおり\(a\)を符号化し、\(a\)の符号化を関連データ\(A\)と連結します。その後ろに、結果の文字列を16オクテットのブロックに分割できるよう、必要最小限の‘0’ビット(0個の場合もある)を加えます。これらのブロックは、フォーマット済みデータ中で\(B_1\), \(B_2\), \(\ldots\) \(B_u\)と表します。ここで\(u\)は\(a\)に依存する正の整数です。値\(a\)は以下の3つの場合に従って符号化します。
• If \(0 < a < 2^{16}-2^{8}\), then \(a\) is encoded as \([a]_{16}\), i.e., two octets.
• \(0 < a < 2^{16}-2^{8}\)の場合、\(a\)は\([a]_{16}\)として符号化されます。すなわち2オクテットです。
• If \(2^{16}-2^{8} \le a < 2^{32}\), then \(a\) is encoded as \(\mathrm{0xff} \parallel \mathrm{0xfe} \parallel [a]_{32}\), i.e., six octets.
• \(2^{16}-2^{8} \le a < 2^{32}\)の場合、\(a\)は\(\mathrm{0xff} \parallel \mathrm{0xfe} \parallel [a]_{32}\)として符号化されます。すなわち6オクテットです。
• If \(2^{32} \le a < 2^{64}\), then \(a\) is encoded as \(\mathrm{0xff} \parallel \mathrm{0xff} \parallel [a]_{64}\), i.e., ten octets.
• \(2^{32} \le a < 2^{64}\)の場合、\(a\)は\(\mathrm{0xff} \parallel \mathrm{0xff} \parallel [a]_{64}\)として符号化されます。すなわち10オクテットです。
For example, if \(a=2^{16}\), the encoding of \(a\) is 11111111 11111110 00000000 00000001 00000000 00000000.
例えば\(a=2^{16}\)の場合、\(a\)の符号化は11111111 11111110 00000000 00000001 00000000 00000000です。
The formatting of distinct sets of associated data will not overlap, because for distinct values of \(a\), the leading bits of the encodings of \(a\) are distinct: in the first case, the first octet will not be 0xff as it will for the second and third cases; the second and third cases can be distinguished by the second octet. Encodings that are not specified in these three cases are reserved, e.g., when the first two octets are 0x0000, 0xff00, 0xff01, etc.
関連データの異なる集合の書式設定は重複しません。\(a\)の異なる値に対して、\(a\)の符号化の先頭ビットが異なるためです。第1の場合、第2および第3の場合と異なり、第1オクテットは0xffになりません。第2の場合と第3の場合は第2オクテットで区別できます。これら3つの場合で指定されていない符号化は予約されています。例えば、最初の2オクテットが0x0000、0xff00、0xff01などの場合です。
A.2.3 Formatting of the Payload
A.2.3 ペイロードのフォーマット
The associated data blocks, if any, are followed in the sequence of formatted blocks by the payload blocks. The payload is concatenated with the minimum number of ‘0’ bits, possibly none, such that the result can be partitioned into 16-octet blocks. These blocks are denoted in the formatted data as \(B_{u+1}\), \(B_{u+2}\) \(\ldots\) \(B_r\), where \(r=u+\lceil p/16 \rceil\).
関連データのブロックがある場合、フォーマット済みブロック列ではその後にペイロード・ブロックが続きます。ペイロードには、結果を16オクテットのブロックに分割できるよう、必要最小限の‘0’ビット(0個の場合もある)を連結します。これらのブロックはフォーマット済みデータ中で\(B_{u+1}\), \(B_{u+2}\) \(\ldots\) \(B_r\)と表し、ここで\(r=u+\lceil p/16 \rceil\)です。
A.3 Formatting of the Counter Blocks
A.3 カウンター・ブロックのフォーマット
The counter generation function in this section is equivalent to formatting the counter index i into a complete data block. The counter blocks Ctri are formatted as shown in Table 3 below.
本節のカウンター生成関数は、カウンター添字iを完全なデータ・ブロックに書式設定することと等価です。カウンター・ブロックCtriは以下の表3に示すとおりに書式設定します。
| Octet number: | 0 | \(1 \ldots 15-q\) | \(16-q \ldots 15\) |
| Contents: | Flags | \(N\) | \([i]_{8q}\) |
| オクテット番号: | 0 | \(1 \ldots 15-q\) | \(16-q \ldots 15\) |
| 内容: | Flags | \(N\) | \([i]_{8q}\) |
Within each block Ctri, the Flags field is formatted as shown in Table 4 below.
各ブロックCtri内では、Flagsフィールドを以下の表4に示すとおりに書式設定します。
Table 4: Formatting of the Flags Field in Ctri
表4:Ctri内のFlagsフィールドのフォーマット
| Bit number | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Contents | Reserved | Reserved | 0 | 0 | 0 | \([q-1]_3\) | ||
| ビット番号 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 内容 | 予約 | 予約 | 0 | 0 | 0 | \([q-1]_3\) | ||
The Reserved bits are reserved for future expansions and shall be set to 0. Bits 3, 4, and 5 shall also be set to 0, to ensure that all the counter blocks are distinct from B0 (as specified in A.2.1 above). Bits 0, 1, and 2 contain the same encoding of q as in B0.
Reservedビットは将来の拡張用に予約されており、0に設定しなければなりません。ビット3、4、5も、すべてのカウンター・ブロックがB0と異なることを保証するため(上記A.2.1の規定)、0に設定しなければなりません。ビット0、1、2にはB0内と同じqの符号化が含まれます。
Appendix B: Length of the MAC
付録B:MACの長さ
The length, \(\mathit{Tlen}\), of the MAC within CCM is an important security parameter. The role of this parameter in providing authentication assurance is outlined in Section B.1, and guidance in the selection of \(\mathit{Tlen}\) is given in Section B.2.
CCM内のMACの長さ\(\mathit{Tlen}\)は重要なセキュリティ・パラメーターです。認証保証を提供するうえでこのパラメーターが果たす役割をB.1節で概説し、\(\mathit{Tlen}\)の選択に関する指針をB.2節に示します。
B.1 Authentication Assurance
B.1 認証保証
The decryption-verification process determines whether a purported ciphertext input is, in fact, a ciphertext, i.e., the output of the generation-encryption process with the given key, associated data string, and nonce. The basis of the CCM authentication assurance is the scarcity of ciphertexts, which suggests that an attacker, i.e., a party without access to the key or to the generation-encryption process, cannot easily generate a ciphertext. Therefore, any purported ciphertext that passes the decryption-verification process was probably generated legitimately.
復号・検証プロセスは、暗号文とされる入力が実際に暗号文であるか、すなわち所与の鍵、関連データ列、ノンスを用いた生成・暗号化プロセスの出力であるかを判定します。CCMの認証保証は、暗号文が希少であることを根拠とします。これは、攻撃者(すなわち鍵または生成・暗号化プロセスにアクセスできない当事者)が暗号文を容易に生成できないことを示唆します。したがって、復号・検証プロセスを通過した暗号文とされるデータは、正当に生成された可能性が高いです。
For any purported ciphertext that is at least \(\mathit{Tlen}\) bits long, the rightmost \(\mathit{Tlen}\) bits correspond to an encrypted MAC, and the remaining bits correspond to an encrypted payload. The decryption-verification process checks the correctness of the MAC for the payload, the associated data string, and the nonce. Depending on the result, the output is either the error message INVALID or the payload. The nature of the authentication assurance, in turn, depends on the output:
\(\mathit{Tlen}\)ビット以上の長さを持つ暗号文とされるデータでは、右端の\(\mathit{Tlen}\)ビットが暗号化MACに相当し、残りのビットは暗号化ペイロードに相当します。復号・検証プロセスは、ペイロード、関連データ列、ノンスについてMACの正しさを検査します。その結果に応じて、出力はエラー・メッセージINVALIDまたはペイロードのいずれかとなります。認証保証の性質は、さらに出力に依存する:
•If the output is INVALID, then the payload and the associated data string cannot both be authentic, i.e., they cannot have originated from a source that executed the generation-encryption process on them with the given nonce to produce the purported ciphertext.
•出力がINVALIDの場合、ペイロードと関連データ列の両方が真正であることはあり得ません。すなわち、所与のノンスを使って生成・暗号化プロセスを実行し、暗号文とされるデータを生成した送信元に由来するものではありません。
•If the output is the payload, then the design of the mode provides assurance that the payload and the associated data are authentic. This assurance, however, is not absolute: an attacker can generate a ciphertext with a certain probability.
•出力がペイロードの場合、モードの設計によって、ペイロードおよび関連データが真正であるという保証が提供されます。ただし、この保証は絶対ではありません。攻撃者が一定の確率で暗号文を生成できる場合があります。
In the second case, the scarcity of ciphertexts and, thus, the expected probability that an attacker can guess a ciphertext, is regulated by the size of \(\mathit{Tlen}\). In particular, the probability is no greater than 1 in \(2^{\mathit{Tlen}}\) that a single inauthentic purported ciphertext will pass the decryption-verification process with a given associated data string and nonce. Of course, an attacker may attempt to present many purported ciphertexts to the decryption-verification process and thereby increase the probability that at least one of them will turn out to be a true ciphertext.
第2の場合、暗号文の希少性、したがって攻撃者が暗号文を推測できると期待される確率は、\(\mathit{Tlen}\)のサイズによって制御されます。特に、所与の関連データ列とノンスを用いたとき、真正でない暗号文とされる単一のデータが復号・検証プロセスを通過する確率は\(2^{\mathit{Tlen}}\)分の1以下です。もちろん、攻撃者は多数の暗号文とされるデータを復号・検証プロセスに提示し、そのうち少なくとも1つが本物の暗号文となる確率を高めようとする場合があります。
Moreover, an attacker may be able to choose the purported ciphertext in such a way as to control every bit of the corresponding payload, as described in [9].* Therefore, if the output of the decryption-verification process is a payload, the contents of the payload do not constitute evidence for its authenticity beyond the assurance that the mode already provides.
さらに、[9]で説明するとおり、攻撃者は対応するペイロードのすべてのビットを制御するように暗号文とされるデータを選べる場合があります。* したがって、復号・検証プロセスの出力がペイロードである場合、その内容はモードがすでに提供する保証を超える真正性の証拠とはなりません。
Also, an attacker may be able to intercept a legitimate ciphertext and “replay” it for verification at a later time. To defend against such an event, the controlling protocol or application should typically provide the receiver with a means to detect replayed messages, out-of-sequence messages, and missing messages, for example, by numbering legitimate messages sequentially.
また、攻撃者は正当な暗号文を傍受し、後刻の検証時にそれを「再送」できる場合があります。このような事象を防ぐため、制御するプロトコルまたはアプリケーションは通常、正当なメッセージに連番を付けるなどして、受信者が再送メッセージ、順序が前後したメッセージ、および欠落したメッセージを検出する手段を提供すべきです。
B.2 Selection of the MAC Length
B.2 MAC長の選択
Larger values of \(\mathit{Tlen}\) provide greater authentication assurance, as described in Section B.1. The performance tradeoff is that larger values of \(\mathit{Tlen}\) require more bandwidth/storage for the ciphertext.
B.1節で説明したように、\(\mathit{Tlen}\)の値が大きいほど、認証の保証が強くなります。性能面のトレードオフとして、\(\mathit{Tlen}\)の値が大きいほど、暗号文に必要な帯域幅またはストレージが増加します。
Although the formatting function in Appendix A permits \(\mathit{Tlen}\) to be any integer multiple of 16 between 32 and 128, inclusive, a value of \(\mathit{Tlen}\) that is less than 64 shall not be used without a careful analysis of the risks of accepting inauthentic data as authentic.
付録Aの書式設定関数では、\(\mathit{Tlen}\)を32以上128以下の16の任意の整数倍にできますが、\(\mathit{Tlen}\)が64未満の値は、不真正なデータを真正なものとして受け入れるリスクを慎重に分析せずに使用してはなりません。
In particular, a value of \(\mathit{Tlen}\) smaller than 64 should not be used unless the controlling protocol or application environment sufficiently restricts the number of times that the decryption-verification process can return INVALID, across all implementations under any given key. For example, the short duration of a session or, more generally, the low bandwidth of the communication channel may preclude many repeated trials.
特に、制御するプロトコルまたはアプリケーション環境が、任意の所与の鍵の下にあるすべての実装にわたり、復号・検証プロセスがINVALIDを返し得る回数を十分に制限しない限り、\(\mathit{Tlen}\)が64未満の値を使用すべきではありません。例えば、セッション時間が短いこと、またはより一般的には通信チャネルの帯域幅が小さいことにより、多数回の試行が行えなくなる場合があります。
Similarly, for larger values of \(\mathit{Tlen}\), the controlling protocol or the application environment should limit the number of inauthentic input sets that may be presented to the decryption-verification process to a number commensurate with the value of the protected data.
同様に、\(\mathit{Tlen}\) の値が大きい場合、制御するプロトコルまたはアプリケーション環境は、復号・検証プロセスに提示され得る不真正な入力セットの数を、保護対象データの価値に見合う数に制限すべきです。
This guidance can be quantified in terms of the following two bounds: 1) the highest acceptable probability for an inauthentic message to pass the decryption-verification process, and 2) a limit on the number of times that the output is the error message INVALID before the key is retired, across all implementations of the decryption-verification process under the key. Given estimates of these quantities, denoted \(\mathit{Risk}\) and \(\mathit{MaxErrs}\), respectively, \(\mathit{Tlen}\) should satisfy the following inequality:
この指針は、次の2つの上限によって定量化できます。1) 不真正なメッセージが復号・検証プロセスを通過する許容可能な最大確率、2) 鍵を廃棄するまでに、当該鍵の下にある復号・検証プロセスのすべての実装にわたり、出力がエラーメッセージ INVALID となる回数の上限。これらの量の推定値をそれぞれ \(\mathit{Risk}\) および \(\mathit{MaxErrs}\) と表記すると、\(\mathit{Tlen}\) は次の不等式を満たすべきです。
For example, suppose that a system will not output INVALID for more than 1024 messages before retiring the key (i.e., \(\mathit{MaxErrs}=2^{10}\)), and that the users can tolerate about a one in a million chance that the system will accept an inauthentic message (i.e., \(\mathit{Risk}=2^{-20}\)). In this case, \(\mathit{Tlen}\) may be as low as 32. On the other hand, if \(\mathit{MaxErrs}=2^{32}\) and \(\mathit{Risk}=2^{-32}\), then \(\mathit{Tlen}\) should be at least 64.
例えば、システムが鍵を廃棄するまでに INVALID を出力するメッセージが1024個を超えない(すなわち、\(\mathit{MaxErrs}=2^{10}\))とし、かつ、利用者が、システムが不真正なメッセージを受け入れる確率を約100万分の1まで許容できる(すなわち、\(\mathit{Risk}=2^{-20}\))とします。この場合、\(\mathit{Tlen}\) は32まで小さくしてもよいです。一方、\(\mathit{MaxErrs}=2^{32}\) かつ \(\mathit{Risk}=2^{-32}\) の場合、\(\mathit{Tlen}\) は少なくとも64とするべきです。
Appendix C: Example Vectors
付録C:例示ベクトル
In this appendix, four examples are provided for the encryption-generation process of CCM with the formatting and counter generation functions that are specified in Appendix A. The underlying block cipher algorithm is the AES algorithm [2] under a key of 128 bits. The MACs, the nonces, the associated data strings, and the payload strings have different lengths in each example, including a very long, repetitive string of associated data in Example 4. The bit strings are represented in hexadecimal notation.
本付録では、付録Aで規定する書式設定関数およびカウンター生成関数を用いたCCMの暗号化・生成プロセスについて、4つの例を示します。基礎となるブロック暗号アルゴリズムは、128ビット鍵を使用するAESアルゴリズム [2] です。各例では、MAC、ノンス、関連データ列、およびペイロード列の長さが異なり、例4には非常に長く反復する関連データ列が含まれます。ビット列は16進表記で示します。
From each example, a corresponding example of the decryption-verification process of CCM is straightforward to construct.
各例から、対応するCCMの復号・検証プロセスの例を容易に構成できます。
C.1 Example 1
C.1 例1
In the following example, \(\mathit{Klen} = 128\), \(\mathit{Tlen}=32\), \(\mathit{Nlen} = 56\), \(\mathit{Alen} = 64\), and \(\mathit{Plen} = 32\).
以下の例では、\(\mathit{Klen} = 128\)、\(\mathit{Tlen}=32\)、\(\mathit{Nlen} = 56\)、\(\mathit{Alen} = 64\)、\(\mathit{Plen} = 32\)です。
K:
K:
40414243 44454647 48494a4b 4c4d4e4f
40414243 44454647 48494a4b 4c4d4e4f
N:
N:
10111213 141516
10111213 141516
A:
A:
00010203 04050607
00010203 04050607
P:
P:
20212223
20212223
B:
B:
4f101112 13141516 00000000 00000004 00080001 02030405 06070000 00000000 20212223 00000000 00000000 00000000
4f101112 13141516 00000000 00000004 00080001 02030405 06070000 00000000 20212223 00000000 00000000 00000000
T:
T:
6084341b
6084341b
Ctr0:
Ctr0:
07101112 13141516 00000000 00000000
07101112 13141516 00000000 00000000
S0:
S0:
2d281146 10676c26 32bad748 559a679a
2d281146 10676c26 32bad748 559a679a
Ctr1:
Ctr1:
07101112 13141516 00000000 00000001
07101112 13141516 00000000 00000001
S1:
S1:
51432378 e474b339 71318484 103cddfb
51432378 e474b339 71318484 103cddfb
C:
C:
7162015b 4dac255d
7162015b 4dac255d
C.2 Example 2
C.2 例2
In the following example, \(\mathit{Klen} = 128\), \(\mathit{Tlen}=48\), \(\mathit{Nlen} = 64\), \(\mathit{Alen} = 128\), and \(\mathit{Plen} = 128\).
以下の例では、\(\mathit{Klen} = 128\)、\(\mathit{Tlen}=48\)、\(\mathit{Nlen} = 64\)、\(\mathit{Alen} = 128\)、\(\mathit{Plen} = 128\)です。
K:
K:
40414243 44454647 48494a4b 4c4d4e4f
40414243 44454647 48494a4b 4c4d4e4f
N:
N:
10111213 14151617
10111213 14151617
A:
A:
00010203 04050607 08090a0b 0c0d0e0f
00010203 04050607 08090a0b 0c0d0e0f
P:
P:
20212223 24252627 28292a2b 2c2d2e2f
20212223 24252627 28292a2b 2c2d2e2f
B: 56101112 13141516 17000000 00000010 00100001 02030405 06070809 0a0b0c0d 0e0f0000 00000000 00000000 00000000 20212223 24252627 28292a2b 2c2d2e2f
B: 56101112 13141516 17000000 00000010 00100001 02030405 06070809 0a0b0c0d 0e0f0000 00000000 00000000 00000000 20212223 24252627 28292a2b 2c2d2e2f
T: 7f479ffc a464
T: 7f479ffc a464
\(Ctr_0\): 06101112 13141516 17000000 00000000
\(Ctr_0\): 06101112 13141516 17000000 00000000
\(S_0\): 6081d043 08a97dcc 20cdcc60 bf947b78
\(S_0\): 6081d043 08a97dcc 20cdcc60 bf947b78
\(Ctr_1\): 06101112 13141516 17000000 00000001
\(Ctr_1\): 06101112 13141516 17000000 00000001
\(S_1\): f280d2c3 75cf7945 20335db9 2b107712
\(S_1\): f280d2c3 75cf7945 20335db9 2b107712
C: d2a1f0e0 51ea5f62 081a7792 073d593d 1fc64fbf accd
C: d2a1f0e0 51ea5f62 081a7792 073d593d 1fc64fbf accd
C.3 Example 3
C.3 例3
In the following example, \(\mathit{Klen} = 128\), \(\mathit{Tlen}=64\), \(\mathit{Nlen} = 96\), \(\mathit{Alen} = 160\), and \(\mathit{Plen} = 192\).
以下の例では、\(\mathit{Klen} = 128\)、\(\mathit{Tlen}=64\)、\(\mathit{Nlen} = 96\)、\(\mathit{Alen} = 160\)、\(\mathit{Plen} = 192\)です。
K: 40414243 44454647 48494a4b 4c4d4e4f
K: 40414243 44454647 48494a4b 4c4d4e4f
N: 10111213 14151617 18191a1b
N: 10111213 14151617 18191a1b
A: 00010203 04050607 08090a0b 0c0d0e0f 10111213
A: 00010203 04050607 08090a0b 0c0d0e0f 10111213
P: 20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637
P: 20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637
B: 5a101112 13141516 1718191a 1b000018 00140001 02030405 06070809 0a0b0c0d 0e0f1011 12130000 00000000 00000000 20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637 00000000 00000000
B: 5a101112 13141516 1718191a 1b000018 00140001 02030405 06070809 0a0b0c0d 0e0f1011 12130000 00000000 00000000 20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637 00000000 00000000
T: 67c99240 c7d51048
T: 67c99240 c7d51048
\(Ctr_0\): 02101112 13141516 1718191a 1b000000
\(Ctr_0\): 02101112 13141516 1718191a 1b000000
\(S_0\): 2f8a00bb 06658919 c3a040a6 eaed1a7f
\(S_0\): 2f8a00bb 06658919 c3a040a6 eaed1a7f
\(Ctr_1\): 02101112 13141516 1718191a 1b000001
\(Ctr_1\): 02101112 13141516 1718191a 1b000001
\(S_1\): c393238a d1923c5d b335c0c7 e1bac924
\(S_1\): c393238a d1923c5d b335c0c7 e1bac924
\(Ctr_2\): 02101112 13141516 1718191a 1b000002
\(Ctr_2\): 02101112 13141516 1718191a 1b000002
\(S_2\): 514798ea 9077bc92 6c22ebef 2ac732dc
\(S_2\): 514798ea 9077bc92 6c22ebef 2ac732dc
C: e3b201a9 f5b71a7a 9b1ceaec cd97e70b 6176aad9 a4428aa5 484392fb c1b09951
C: e3b201a9 f5b71a7a 9b1ceaec cd97e70b 6176aad9 a4428aa5 484392fb c1b09951
C.4 Example 4
C.4 例4
In the following example, \(\mathit{Klen} = 128\), \(\mathit{Tlen}=112\), \(\mathit{Nlen} = 104\), \(\mathit{Alen} = 524288\), and \(\mathit{Plen} = 256\). The associated data string is too large to comfortably present in its entirety; therefore, the given string of the first sixteen blocks of the associated data string is concatenated with itself repeatedly to form a string of 524288 bits. Similarly, only the beginning and the end of the resulting formatted data string \(B\) are presented.
以下の例では、\(\mathit{Klen} = 128\)、\(\mathit{Tlen}=112\)、\(\mathit{Nlen} = 104\)、\(\mathit{Alen} = 524288\)、\(\mathit{Plen} = 256\)です。関連データ列は全体を無理なく提示するには大きすぎるため、提示した関連データ列の先頭16ブロックの文字列を繰り返し自身と連結し、524288ビットの文字列を形成します。同様に、結果のフォーマット済みデータ列\(B\)についても、冒頭部分と末尾部分のみを示します。
K:
K:
40414243 44454647 48494a4b 4c4d4e4f
40414243 44454647 48494a4b 4c4d4e4f
N:
N:
10111213 14151617 18191a1b 1c
10111213 14151617 18191a1b 1c
A:
A:
00010203 04050607 08090a0b 0c0d0e0f 10111213 14151617 18191a1b 1c1d1e1f 20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637 38393a3b 3c3d3e3f 40414243 44454647 48494a4b 4c4d4e4f 50515253 54555657 58595a5b 5c5d5e5f 60616263 64656667 68696a6b 6c6d6e6f 70717273 74757677 78797a7b 7c7d7e7f 80818283 84858687 88898a8b 8c8d8e8f 90919293 94959697 98999a9b 9c9d9e9f a0a1a2a3 a4a5a6a7 a8a9aaab acadaeaf b0b1b2b3 b4b5b6b7 b8b9babb bcbdbebf c0c1c2c3 c4c5c6c7 c8c9cacb cccdcecf d0d1d2d3 d4d5d6d7 d8d9dadb dcdddedf e0e1e2e3 e4e5e6e7 e8e9eaeb ecedeeef f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff ...
00010203 04050607 08090a0b 0c0d0e0f 10111213 14151617 18191a1b 1c1d1e1f 20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637 38393a3b 3c3d3e3f 40414243 44454647 48494a4b 4c4d4e4f 50515253 54555657 58595a5b 5c5d5e5f 60616263 64656667 68696a6b 6c6d6e6f 70717273 74757677 78797a7b 7c7d7e7f 80818283 84858687 88898a8b 8c8d8e8f 90919293 94959697 98999a9b 9c9d9e9f a0a1a2a3 a4a5a6a7 a8a9aaab acadaeaf b0b1b2b3 b4b5b6b7 b8b9babb bcbdbebf c0c1c2c3 c4c5c6c7 c8c9cacb cccdcecf d0d1d2d3 d4d5d6d7 d8d9dadb dcdddedf e0e1e2e3 e4e5e6e7 e8e9eaeb ecedeeef f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff ...
P:
P:
20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637 38393a3b 3c3d3e3f
20212223 24252627 28292a2b 2c2d2e2f 30313233 34353637 38393a3b 3c3d3e3f
B:
B:
例4のフォーマット済みデータB(印刷されたキャプションはない)。「B:」のラベルに続いて16進数の語が並ぶ。71101112 13141516 1718191a 1b1c0020 / fffe0001 00000001 02030405 06070809 / 0a0b0c0d 0e0f1011 12131415 16171819 / 1a1b1c1d 1e1f2021 22232425 26272829 / … / dadbdcdd dedfe0e1 e2e3e4e5 e6e7e8e9 / eaebeced eeeff0f1 f2f3f4f5 f6f7f8f9 / fafbfcfd feff0000 00000000 00000000 / 20212223 24252627 28292a2b 2c2d2e2f / 30313233 34353637 38393a3b 3c3d3e3f。右側に赤字の注記があるが、描画したページで読めるのは最後の2行の横にある「2021...2e2f」と「3031...3e3f」だけで、その他の赤字は点の散らばりとして表示される。
T: f4dd5d0e e4046172 25ffe34f ce91
T: f4dd5d0e e4046172 25ffe34f ce91
\(Ctr_0\): 01101112 13141516 1718191a 1b1c0000
\(Ctr_0\): 01101112 13141516 1718191a 1b1c0000
\(S_0\): 407136e2 77ec38fc 5af24ef3 24ca1178
\(S_0\): 407136e2 77ec38fc 5af24ef3 24ca1178
\(Ctr_1\): 01101112 13141516 1718191a 1b1c0001
\(Ctr_1\): 01101112 13141516 1718191a 1b1c0001
\(S_1\): 49b07f8e 3aa1e010 4241e8bd 5260854e
\(S_1\): 49b07f8e 3aa1e010 4241e8bd 5260854e
\(Ctr_2\): 01101112 13141516 1718191a 1b1c0002
\(Ctr_2\): 01101112 13141516 1718191a 1b1c0002
\(S_2\): 6ad1cf2c 9af17af3 bcbbbf12 7a01f14d
\(S_2\): 6ad1cf2c 9af17af3 bcbbbf12 7a01f14d
C: 69915dad 1e84c637 6a68c296 7e4dab61 5ae0fd1f aec44cc4 84828529 463ccf72 b4ac6bec 93e8598e 7f0dadbc ea5b
C: 69915dad 1e84c637 6a68c296 7e4dab61 5ae0fd1f aec44cc4 84828529 463ccf72 b4ac6bec 93e8598e 7f0dadbc ea5b
Appendix D: References
付録D:参考文献
[1] D. Whiting, R. Housley, N. Ferguson, Counter with CBC-MAC (CCM). Available at http://csrc.nist.gov/CryptoToolkit/modes/proposedmodes/.
[1] D. Whiting、R. Housley、N. Ferguson, Counter with CBC-MAC (CCM)。入手先:http://csrc.nist.gov/CryptoToolkit/modes/proposedmodes/。
[2] FIPS Publication 197, Advanced Encryption Standard (AES). U.S. DoC/NIST, November 26, 2001. Available at http://csrc.nist.gov/publications/.
[2] FIPS Publication 197, Advanced Encryption Standard (AES)。米国商務省/NIST、2001年11月26日。入手先:http://csrc.nist.gov/publications/。
[3] FIPS Publication 46-3, Data Encryption Standard (DES). U.S. DoC/NIST, October 25, 1999. Available at http://csrc.nist.gov/publications/.
[3] FIPS Publication 46-3, Data Encryption Standard (DES)。米国商務省/NIST、1999年10月25日。入手先:http://csrc.nist.gov/publications/。
[4] Institute of Electrical and Electronics Engineers, Inc., IEEE Std. 802.11i/D7.0, Draft Amendment to Standard for Telecommunications and Information Exchange Between Systems – LAN/MAN Specific Requirements – Part 11: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications: Medium Access Control (MAC) Security Enhancements, October 2003.
[4] Institute of Electrical and Electronics Engineers, Inc., IEEE Std. 802.11i/D7.0, Draft Amendment to Standard for Telecommunications and Information Exchange Between Systems – LAN/MAN Specific Requirements – Part 11: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications: Medium Access Control (MAC) Security Enhancements、2003年10月。
[5] Institute of Electrical and Electronics Engineers, Inc., IEEE Std. 802.11-1999, IEEE Standard for Telecommunications and Information Exchange Between Systems – LAN/MAN Specific Requirements – Part 11: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications, New York: IEEE Press, 1999.
[5] Institute of Electrical and Electronics Engineers, Inc., IEEE Std. 802.11-1999, IEEE Standard for Telecommunications and Information Exchange Between Systems – LAN/MAN Specific Requirements – Part 11: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications, New York: IEEE Press、1999年。
[6] NIST Special Publication 800-38A, Recommendation for Block Cipher Modes of Operation – Methods and Techniques. U.S. DoC/NIST, December 2001. Available at http://csrc.nist.gov/publications/.
[6] NIST Special Publication 800-38A, Recommendation for Block Cipher Modes of Operation – Methods and Techniques。米国商務省/NIST、2001年12月。入手先:http://csrc.nist.gov/publications/。
[7] Draft NIST Special Publication 800-38B, Recommendation for Block Cipher Modes of Operation: the CMAC Authentication Mode. U.S. DoC/NIST, October 2003. Available at http://csrc.nist.gov/CryptoToolkit/modes.
[7] Draft NIST Special Publication 800-38B, Recommendation for Block Cipher Modes of Operation: the CMAC Authentication Mode。米国商務省/NIST、2003年10月。入手先:http://csrc.nist.gov/CryptoToolkit/modes。
[8] J. Jonsson, On the Security of CTR + CBC-MAC, in Proceedings of Selected Areas in Cryptography – SAC, 2002, K. Nyberg, H. Heys, Eds., Lecture Notes in Computer Science, Vol. 2595, pp. 76–93, Berlin: Springer, 2002.
[8] J. Jonsson, On the Security of CTR + CBC-MAC, in Proceedings of Selected Areas in Cryptography – SAC, 2002, K. Nyberg、H. Heys編, Lecture Notes in Computer Science, Vol. 2595, pp. 76–93, Berlin: Springer, 2002。
[9] P. Rogaway and D. Wagner, A Critique of CCM. Cryptology ePrint Archive: Report 2003/070, April 2003. Available at http://eprint.iacr.org/2003/070/.
[9] P. Rogaway、D. Wagner, A Critique of CCM。Cryptology ePrint Archive: Report 2003/070、2003年4月。入手先:http://eprint.iacr.org/2003/070/。
