Page 1 Seite 1
NIST Special Publication 800-38C NIST Special Publica 800-38C
Recommendation for Block Empfehlung für Block
Cipher Modes of Operation: Chiffre Betriebsmodi:
The CCM Mode for Die CCM-Modus für
Authentication and Authentifizierung und
Confidentiality Vertraulichkeit
Morris Dworkin Morris Dworkin
COMPUTERSECURITY COMPUTERSECURITY

Page 2 Seite 2

Page 3 Seite 3
Computer Security Division Computer Security Division
Information Technology Laboratory Laboratorium für Informationstechnologie
National Institute of Standards and Technology National Institute of Standards and Technology
Gaithersburg, MD 20899-8930 Gaithersburg, MD 20899-8930
May 2004 Mai 2004
US Department of Commerce US Department of Commerce
Donald L. Evans, Secretary Donald L. Evans, Generalsekretär
Technology Administration Technologie Verwaltung
Phillip J. Bond, Under Secretary of Commerce for Technology Phillip J. Bond, Under Secretary of Commerce for Technology
National Institute of Standards and Technology National Institute of Standards and Technology
Arden L. Bement, Jr., Director Arden L. Bement, Jr., Direktor
NIST Special Publication 800-38C NIST Special Publica 800-38C
Recommendation for Block Empfehlung für Block
Cipher Modes of Operation: The Chiffre Betriebsarten: Der
CCM Mode for Authentication CCM-Modus für die Authentifizierung
and Confidentiality und Vertraulichkeit
Morris Dworkin Morris Dworkin
COMPUTERSECURITY COMPUTERSECURITY

Page 4 Seite 4
Reports on Information Security Technology Berichte über Sicherheit in der Informationstechnik
The Information Technology Laboratory (ITL) at the National Institute of Standards and Die Information Technology Laboratory (ITL) am National Institute of Standards and
Technology (NIST) promotes the US economy and public welfare by providing technical Technologie (NIST) fördert die US-Wirtschaft und der öffentlichen Wohlfahrt durch die Bereitstellung technischer
leadership for the Nation's measurement and standards infrastructure. Führung für die Messung und Standards Infrastruktur des Landes. ITL develops tests, test ITL entwickelt Tests, Test
methods, reference data, proof of concept implementations, and technical analyses to advance the Methoden, Referenzdaten, Proof of Concept Implementierungen und technische Analysen, den Vormarsch
development and productive use of information technology. Entwicklung und produktive Nutzung der Informationstechnologie. ITL's responsibilities include the Verantwortlichkeiten ITL gehören die
development of technical, physical, administrative, and management standards and guidelines for Entwicklung von technischen, physikalischen, administrative und Management-Standards und Richtlinien für
the cost-effective security and privacy of sensitive unclassified information in Federal computer Die wirtschaftliche Sicherheit und Privatsphäre von sensiblen Informationen in nicht klassifiziert Bundes Computer
systems. Systemen. This Special Publication 800-series reports on ITL's research, guidance, and outreach Diese Sonderveröffentlichung 800-Serie Berichte über ITL-Forschung, Beratung und Öffentlichkeitsarbeit
efforts in computer security, and its collaborative activities with industry, government, and Bemühungen in der Computersicherheit und seine Kooperationen mit der Industrie, Regierung und
academic organizations. Wissenschaftsorganisationen.
Certain commercial entities, equipment, or materials may be identified in this document in order to describe Bestimmte gewerbliche Einrichtungen, Geräten oder Materialien können in diesem Dokument, um zu beschreiben, identifiziert werden
an experimental procedure or concept adequately. ein experimentelles Verfahren oder Konzept ausreichend. Such identification is not intended to imply Eine solche Identifizierung ist nicht beabsichtigt, zu implizieren,
recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended Empfehlung oder Billigung durch das National Institute of Standards and Technology, ist auch nicht so
to imply that the entities, materials, or equipment are necessarily the best available for the purpose. zu implizieren, dass die Unternehmen, Materialien oder Geräte sind unbedingt die beste zur Verfügung für den Zweck.
National Institute of Standards and Technology Special Publication 800-38C National Institute of Standards and Technology Special Publica 800-38C
Natl. Natl. Inst. Inst. Stand. Stehen. Technol. Technol. Spec. Spec. Publ. Publ. 800-38C 25 pages (May 2004) 800-38C 25 Seiten (Mai 2004)
CODEN: NSPUE2 CODEN: NSPUE2

Page 5 Seite 5
Abstract Abstrakt
This Recommendation defines a mode of operation, called CCM, for a symmetric key block Diese Empfehlung definiert einen Betriebsmodus namens CCM, für einen symmetrischen Schlüsselblock
cipher algorithm. Verschlüsselungsalgorithmus. CCM may be used to provide assurance of the confidentiality and the CCM verwendet werden, um Sicherheit für die Vertraulichkeit und die bieten
authenticity of computer data by combining the techniques of the Counter (CTR) mode and the Echtheit von Computerdaten durch Kombinieren der Techniken des Zählers (CTR) und der Modus
Cipher Block Chaining-Message Authentication Code (CBC-MAC) algorithm. Cipher Block Chaining Message Authentication Code-(CBC-MAC)-Algorithmus.
KEY WORDS: authenticated encryption; STICHWORTE: authentifizierte Verschlüsselung; authentication; Authentifizierung; block cipher; Blockchiffre; confidentiality; Vertraulichkeit;
cryptography; Kryptographie; encryption; Verschlüsselung; information security; Informationssicherheit; message authentication code; Message Authentication Code; mode of operation. Betriebsart.
iii iii

Page 6 Seite 6
Table of Contents Inhaltsverzeichnis
1 1
PURPOSE...........................................................................................................................................................1
2 2
AUTHORITY.....................................................................................................................................................1
3 3
INTRODUCTION..............................................................................................................................................1
4 4
DEFINITIONS, ABBREVIATIONS, AND SYMBOLS.................................................................................2 DEFINITIONEN, Abkürzungen und Symbole ............................................ ..................................... 2
4.1 4.1
D D
EFINITIONS AND EFINITIONEN UND
A Ein
BBREVIATIONS BKÜRZUNGEN
.............................................................................................................2
4.2 4.2
S S
YMBOLS YMBOLE
....................................................................................................................................................4
4.2.1 4.2.1
Variables................................................................................................................................................4
4.2.2 4.2.2
Operations and Functions Vorgänge und Funktionen .....................................................................................................................6
5 5
PRELIMINARIES.............................................................................................................................................6
5.1 5.1
U U
NDERLYING NDERLYING
B B
LOCK LOCK
C C
IPHER Ipher
A Ein
LGORITHM LGORITHM
.................................................................................................6 .................................................. ............................................... 6
5.2 5.2
C C
RYPTOGRAPHIC RYPTOGRAPHIC
P P
RIMITIVES RIMITIVES
......................................................................................................................7
5.3 5.3
D D
ATA ATA
E E
LEMENTS LEMENTE
.........................................................................................................................................7
5.4 5.4
I Ich
NPUT NPUT
F F
ORMATTING ORMATTING
....................................................................................................................................8
5.5 5.5
E E
XAMPLES OF EISPIELE DER
O O
PERATIONS AND Arbeitsvorgänge und
F F
UNCTIONS UNKTIONEN
..............................................................................................8 .................................................. ............................................ 8
6 6
CCM SPECIFICATION CCM DATEN ...................................................................................................................................9
6.1 6.1
G G
ENERATION Eneration
-E -E
NCRYPTION NCRYPTION
P P
ROCESS ROZESS
..........................................................................................................9
6.2 6.2
D D
ECRYPTION Ecryption
-V V
ERIFICATION RÜFUNG
P P
ROCESS ROZESS
......................................................................................................10
APPENDIX A: EXAMPLE OF A FORMATTING AND COUNTER GENERATION FUNCTION.............12 ANHANG A: Beispiel einer Formatierung und COUNTER Erzeugungsfunktion ............. 12
A.1 A.1
L L
ENGTH Ength
R R
EQUIREMENTS NFORDERUNGEN
...........................................................................................................................12
A.2 A.2
F F
ORMATTING OF THE ORMATTING DER
I Ich
NPUT NPUT
D D
ATA ATA
............................................................................................................12
A.2.1 A.2.1
Formatting of the Control Information and the Nonce........................................................................13 Formatierung der Steuerinformationen und die Nonce .......................................... .............................. 13
A.2.2 A.2.2
Formatting of the Associated Formatierung von Associated Data......................................................................................................13
A.2.3 A.2.3
Formatting of the Formatierung der Payload...................................................................................................................14
A.3 A.3
F F
ORMATTING OF THE ORMATTING DER
C C
OUNTER Ounter
B B
LOCKS SCHLÖSSER
...................................................................................................14
APPENDIX B: LENGTH OF THE ANHANG B: Länge des MAC..............................................................................................................15
B.1 B.1
A Ein
UTHENTICATION Uthentifizierung
A Ein
SSURANCE SSURANCE
.................................................................................................................15
B.2 B.2
S S
ELECTION OF THE Wahl des
MAC L MAC L
ENGTH Ength
.............................................................................................................16
APPENDIX C: EXAMPLE VECTORS ANHANG C: Beispielvektoren .................................................................................................................17
C.1 C.1
E E
XAMPLE EISPIEL
1................................................................................................................................................17
C.2 C.2
E E
XAMPLE EISPIEL
2................................................................................................................................................17
C.3 C.3
E E
XAMPLE EISPIEL
3................................................................................................................................................18
C.4 C.4
E E
XAMPLE EISPIEL
4................................................................................................................................................19
APPENDIX D: Anhang D: REFERENCES...............................................................................................................................21
Table of Figures Abbildungsverzeichnis
Table 1: Formatting of the Flags Octet in B Tabelle 1: Die Formatierung der Flaggen Oktett in B
0 0
...............................................................................................................13
Table 2: Formatting of B Tabelle 2: Formatieren von B
0 0
............................................................................................................................................13
Table 3: Formatting of Ctr Tabelle 3: Formatieren von Ctr
i ich
..........................................................................................................................................14
Table 4: Formatting of the Flags Field in Ctr Tabelle 4: Formatieren des Flags-Feld in Ctr
i ich
.............................................................................................................14
iv iv

Page 7 Seite 7
1 Purpose 1 Zweck
This publication is the third Part in a series of Recommendations regarding modes of operation Diese Publikation ist der dritte Teil einer Serie von Empfehlungen zur Betriebsarten
of symmetric key block cipher algorithms. von symmetrischen Blockchiffre Schlüsselalgorithmen.
2 Authority 2 Behörde
This document has been developed by the National Institute of Standards and Technology Dieses Dokument wurde von der National Institute of Standards and Technology entwickelt
(NIST) in furtherance of its statutory responsibilities under the Federal Information Security (NIST) zur Förderung seiner gesetzlichen Aufgaben nach dem Bundesinformationssicherheit
Management Act (FISMA) of 2002, Public Law 107-347. Management Act (FISMA) 2002, Public Law 107-347.
NIST is responsible for developing standards and guidelines, including minimum requirements, NIST ist für die Entwicklung von Standards und Richtlinien, einschließlich der Mindestanforderungen verantwortlich,
for providing adequate information security for all agency operations and assets, but such für eine angemessene Informationssicherheit für alle Agentur Operationen und Vermögenswerte, aber solche
standards and guidelines shall not apply to national security systems. Normen und Richtlinien gelten nicht für die nationale Sicherheit gelten Systeme. This guideline is consistent Diese Richtlinie steht im Einklang
with the requirements of the Office of Management and Budget (OMB) Circular A-130, Section mit den Anforderungen des Office of Management and Budget (OMB) Circular A-130, Abschnitt
8b(3), Securing Agency Information Systems, as analyzed in A-130, Appendix IV: Analysis of 8b (3), Absichern Agentur Information Systems, als in A-130, Anhang IV analysiert: Die Analyse der
Key Sections. Wesentliche Abschnitte. Supplemental information is provided in A-130, Appendix III. Ergänzende Informationen sind in A-130, Anhang III.
This guideline has been prepared for use by federal agencies. Diese Richtlinie ist für den Einsatz von Bundesbehörden erstellt. It may be used by Es kann genutzt werden,
nongovernmental organizations on a voluntary basis and is not subject to copyright. Nicht-Regierungsorganisationen auf freiwilliger Basis und unterliegt dem Urheberrecht. (Attribution (Namensnennung
would be appreciated by NIST.) würde durch NIST geschätzt.)
Nothing in this document should be taken to contradict standards and guidelines made Nichts in diesem Dokument werden sollten, um Normen und Richtlinien vorgenommen werden widersprechen
mandatory and binding on federal agencies by the Secretary of Commerce under statutory Pflicht und bindend für Bundesstellen von der Handelsminister im Rahmen der gesetzlichen
authority. Autorität. Nor should these guidelines be interpreted as altering or superseding the existing Auch sollten diese Richtlinien als Veränderung oder verdrängen die vorhandene interpretiert werden
authorities of the Secretary of Commerce, Director of the OMB, or any other federal official. Behörden der Handelsminister, Direktor des OMB, oder jede andere Bundesbeamte.
Conformance testing for implementations of the mode of operation that is specified in this Part Konformitätstests für Implementierungen des Betriebsmodus, der in diesem Teil festgelegt ist
of the Recommendation will be conducted within the framework of the Cryptographic Module der Empfehlung wird im Rahmen des Cryptographic Module durchgeführt werden
Validation Program (CMVP), a joint effort of NIST and the Communications Security Validation Program (CMVP), eine gemeinsame Anstrengung von NIST und der Kommunikationssicherheit
Establishment of the Government of Canada. Einsetzung der Regierung von Kanada. An implementation of a mode of operation must Eine Implementierung eines Betriebsmodus muss
adhere to the requirements in this Recommendation in order to be validated under the CMVP. sich an die Anforderungen in dieser Empfehlung, um unter dem CMVP validiert werden.
The requirements of this Recommendation are indicated by the word “shall.” Die Anforderungen dieser Empfehlung werden durch das Wort "soll".
3 Introduction 3 Einführung
This Recommendation specifies an algorithm, Counter with Cipher Block Chaining-Message Diese Empfehlung gibt einen Algorithmus, Zähler mit Cipher Block Chaining-Nachricht
Authentication Code [1], abbreviated CCM, that can provide assurance of the confidentiality and Authentication Code [1], kurz CCM, dass Sicherheit für die Vertraulichkeit und
authenticity of data. Authentizität der Daten. CCM is based on an approved symmetric key block cipher algorithm whose CCM wird auf einer genehmigten symmetrischen Schlüssel Blockchiffre-Algorithmus basiert, deren
block size is 128 bits, such as the Advanced Encryption Standard (AES) algorithm currently Blockgröße 128 Bits, wie der Advanced Encryption Standard (AES) Algorithmus aktuell
specified in Federal Information Processing Standard (FIPS) Pub. in Federal Information Processing Standard (FIPS) Pub angegeben. 197 [2]; 197 [2]; thus, CCM cannot be Somit kann CCM nicht
used with the Triple Data Encryption Algorithm [3], whose block size is 64 bits. mit dem Triple Data Encryption Algorithm [3], dessen Blockgröße beträgt 64 Bits verwendet. CCM can be CCM kann
considered a mode of operation of the block cipher algorithm. als Betriebsmodus der Blockchiffre-Algorithmus. As with other modes of operation, Wie bei anderen Betriebsarten,
1 1

Page 8 Seite 8
a single key to the block cipher must be established beforehand among the parties to the data; ein einzelner Schlüssel für die Blockchiffre muss vorher unter den Parteien der Daten ermittelt werden;
thus, CCM should be implemented within a well-designed key management structure. daher sollten CCM in einer gut gestalteten Schlüssel-Management-Struktur umgesetzt werden. The Die
security properties of CCM depend, at a minimum, on the secrecy of the key. Sicherheitseigenschaften der CCM hängt zumindest von der Geheimhaltung des Schlüssels.
CCM is intended for use in a packet environment, ie, when all of the data is available in storage CCM ist zur Verwendung in einem Paket Umgebung, dh, bestimmt, wenn alle Daten in den Speicher
before CCM is applied; vor CCM angewendet wird; CCM is not designed to support partial processing or stream processing. CCM ist nicht zum Teil der Verarbeitung oder Stromverarbeitung zu unterstützen.
The input to CCM includes three elements: 1) data that will be both authenticated and encrypted, Die Eingabe in CCM beinhaltet drei Elemente: 1) Daten, die sowohl authentifiziert und verschlüsselt werden,
called the payload; bezeichnet die Nutzlast; 2) associated data, eg, a header, that will be authenticated but not encrypted; 2) zugeordnete Daten, beispielsweise eine Kopfzeile, die authentifiziert werden sollen, jedoch nicht verschlüsselt;
and 3) a unique value, called a nonce, that is assigned to the payload and the associated data. und 3) einem eindeutigen Wert, eine so genannte Nonce, die an der Nutzlast und der zugehörigen Daten zugeordnet.
CCM consists of two related processes: generation-encryption and decryption-verification, which CCM besteht aus zwei verbundenen Prozesse: Generation-Verschlüsselung und Entschlüsselung-Überprüfung, die
combine two cryptographic primitives: counter mode encryption and cipher block chaining- kombinieren zwei kryptographischen Grund: Zählermodus Verschlüsselung und Schlüsselblock chaining-
based authentication. basierte Authentifizierung. Only the forward cipher function of the block cipher algorithm is used Nur der vordere Verschlüsselungsfunktion der Blockchiffre-Algorithmus verwendet
within these primitives. innerhalb dieser Primitiven.
In generation-encryption, cipher block chaining is applied to the payload, the associated data, In Generation-Verschlüsselung wird Cipher Block Chaining auf die Nutzlast angewendet wird, die zugeordneten Daten,
and the nonce to generate a message authentication code (MAC); und die Nonce, um einen Nachrichtenauthentifizierungscode (MAC) zu erzeugen; then, counter mode encryption dann, Zählermodus Verschlüsselung
is applied to the MAC and the payload to transform them into an unreadable form, called the wird an die MAC-und die Nutzlast angewendet, um sie in einer nicht lesbaren Form umzuwandeln, die sogenannte
ciphertext. Geheimtext. Thus, CCM generation-encryption expands the size of the payload by the size of the Damit erweitert CCM-Verschlüsselung Generation die Größe der Nutzlast von der Größe des
MAC. Mac. In decryption-verification, counter mode decryption is applied to the purported ciphertext In Entschlüsselung-Verifizierung wird Zählermodus Entschlüsselung über die angebliche Geheimtext angewendet
to recover the MAC and the corresponding payload; um die MAC-und die entsprechende Nutzlast erholen; then, cipher block chaining is applied to the dann wird Cipher Block Chaining auf die angelegte
payload, the received associated data, and the received nonce to verify the correctness of the Nutzlast der empfangenen Daten zugeordnet ist, und die empfangene Nonce, um die Korrektheit des Überprüfungs
MAC. Mac. Successful verification provides assurance that the payload and the associated data Erfolgreicher Prüfung gewährleistet, dass die Nutzlast und die zugehörigen Daten
originated from a source with access to the key. stammt aus einer Quelle mit Zugriff auf den Schlüssel.
A MAC provides stronger assurance of authenticity than a checksum or an error detecting code. Eine MAC bietet eine stärkere Sicherung der Authentizität als eine Prüfsumme oder einen Fehlererkennungscode.
The verification of a (non-cryptographic) checksum or an error detecting code is designed to Die Verifikation einer (nicht-kryptographischen) Prüfsumme oder ein Fehlererfassungscode zu gestalten
detect only accidental modifications of the data, while the verification of a MAC, as occurs in erkennen nur versehentliche Änderungen der Daten, während der Verifikation eines MAC, wie auftritt
CCM, is designed to detect intentional, unauthorized modifications of the data, as well as CCM, ist entworfen, um vorsätzliche, unbefugte Änderungen der Daten, als auch erkennen
accidental modifications. versehentlichen Änderungen.
This specification of CCM is intended to be compatible with the use of CCM within the draft Diese Spezifikation der CCM soll bei der Verwendung von CCM im Entwurf kompatibel ist
amendment [4] to the IEEE Standard 802.11 for wireless local area networks [5]. Änderung [4] mit dem IEEE-Standard 802.11 für drahtlose lokale Netzwerke. [5]
4 Definitions, Abbreviations, and Symbols 4 Definitionen, Abkürzungen und Symbole
4.1 Definitions and Abbreviations 4.1 Definitionen und Abkürzungen
Approved Genehmigt
FIPS approved or NIST recommended: an algorithm or technique that FIPS genehmigt oder NIST empfohlen: einen Algorithmus oder Technik, die
is either 1) specified in a FIPS or NIST Recommendation, or 2) wird entweder 1) in einer FIPS oder NIST Empfehlung oder bestimmte 2)
adopted in a FIPS or NIST Recommendation. in einer FIPS oder NIST Empfehlung angenommen.
Associated Data Associated Data
Input data to the CCM generation-encryption process that is Eingangsdaten für die CCM-Generation, die Verschlüsselungsverfahren ist
authenticated but not encrypted. authentifiziert, aber nicht verschlüsselt.
2 2

Page 9 Seite 9
Authenticity Authentizität
The property that data originated from its purported source. Die Eigenschaft, die Daten aus seinem angeblichen Quelle stammen.
Bit Bit
A binary digit: 0 or 1. Eine binäre Ziffer 0 oder 1 ist.
Bit Length Bit Länge
The number of bits in a bit string. Die Anzahl von Bits in einer Bitfolge.
Bit String Bit-String
An ordered sequence of bits. Eine geordnete Folge von Bits.
Block Block
A bit string whose length is the block size of the block cipher Eine Bitfolge, deren Länge der Blockgröße der Blockchiffre
algorithm. Algorithmus.
Block Cipher Block Cipher
Algorithm Algorithmus
A family of functions and their inverses that is parameterized by Eine Familie von Funktionen und deren Inverse, die durch parametriert wird
cryptographic keys; kryptographischen Schlüssel; the functions map bit strings of a fixed length to die Funktionen der Karte Bitfolgen mit einer festen Länge, um
bit strings of the same length. Bit-Zeichenketten der gleichen Länge.
Block Size Blockgröße
The bit length of an input (or output) block of the block cipher. Die Bitlänge einem Eingang (oder Ausgang) Block des Blockchiffre.
CBC-MAC CBC-MAC
Cipher Block Chaining-Message Authentication Code Cipher Block Chaining Message Authentication Code-
CCM CCM
Counter with Cipher Block Chaining-Message Authentication Code. Zähler mit Cipher Block Chaining Message Authentication Code-.
Ciphertext Chiffretext
The output of the CCM encryption-generation process. Der Ausgang des CCM-Verschlüsselungserzeugungsprozess.
Cryptographic Key Cryptographic Key
A parameter used in the block cipher algorithm that determines the Ein Parameter in dem Block-Verschlüsselungsalgorithmus verwendet, der die fest
forward cipher function. mitteln Verschlüsselungsfunktion.
CTR CTR
Counter. Zähler.
Decryption-Verification The process of CCM in which a purported ciphertext is decrypted and Entschlüsselung-Verification Der Prozess der CCM, in dem ein angeblicher Geheimtext entschlüsselt und
the authenticity of the resulting payload and the associated data is die Authentizität der erhaltenen Nutzdaten, und die zugehörigen Daten
verified. prüft.
Exclusive-OR Exklusiv-Oder-
The bitwise addition, modulo 2, of two bit strings of equal length. Das bitweise hinaus Modulo 2, von zwei Bit-Strings gleich lang.
FIPS FIPS
Federal Information Processing Standard. Federal Information Processing Standard.
Formatting Function Formatierungsfunktion
The function that transforms the payload, associated data, and nonce Die Funktion, die die Nutzlast zugeordneten Daten und wandelt Nonce
into a sequence of complete blocks. in einer Folge von vollständigen Blöcken.
Forward Cipher Vorwärts Cipher
Function Funktion
One of the two functions of the block cipher algorithm that is Eine der beiden Funktionen der Blockchiffre-Algorithmus, ist
determined by the choice of a cryptographic key. Durch die Wahl eines kryptographischen Schlüssels bestimmt.
Generation-Encryption The process of CCM in which a MAC is generated on the payload Generation-Verschlüsselung Der Prozess der CCM, in dem ein MAC auf der Nutzlast erzeugt
and the associated data, and encryption is applied to the payload and und die zugeordneten Daten und Verschlüsselung auf die Nutzlast angewendet und
the MAC. den Mac.
3 3

Page 10 Seite 10
IEEE IEEE
Institute of Electrical and Electronics Engineers Institut of Electrical und Electronics Engineers
Inverse Cipher Function The inverse function of the forward cipher function for a given Inversen Verschlüsselungsfunktion die Umkehrfunktion des Vorwärtsverschlüsselungsfunktion für eine gegebene
cryptographic key. kryptographischen Schlüssel.
Least Significant Bit(s) Niedrigstwertige Bit (s)
The right-most bit(s) of a bit string. Die äußerste rechte Bit (s) einer Bit-Kette.
Message Nachricht
Authentication Code Authentication Code
(MAC) (Mac)
A cryptographic checksum on data that is designed to reveal both Ein kryptografische Prüfsumme auf Daten, die dazu bestimmt ist, sowohl zu offenbaren
accidental errors and intentional modifications of the data. zufällige Fehler und absichtliche Änderungen der Daten.
Mode of Operation Arbeitsweise
(Mode) (Mode)
An algorithm for the cryptographic transformation of data that Ein Algorithmus für die kryptographische Umwandlung von Daten,
features a symmetric key block cipher algorithm. verfügt über einen symmetrischen Schlüssel Blockchiffre-Algorithmus.
Most Significant Bit(s) Höchstwertige Bit (s)
The left-most bit(s) of a bit string. Das Bit ganz links (s) einer Bit-Kette.
Nonce Nonce
A value that is used only once within a specified context. Ein Wert, der nur einmal innerhalb eines bestimmten Kontext verwendet wird.
Octet Oktett
A string of eight bits. Eine Reihe von acht Bits.
Octet Length Oktett Länge
The number of octets in an octet string. Die Anzahl von Bytes in einem Oktett-String.
Octet String Octet String
An ordered sequence of octets. Eine geordnete Abfolge von Bytes.
Payload Nutzlast
The input data to the CCM generation-encryption process that is both Die Eingabedaten an den CCM-Generation Verschlüsselungsprozess, der sowohl ist
authenticated and encrypted. authentifiziert und verschlüsselt.
Valid Data Element Gültige Datenelement
A payload, an associated data string, or a nonce that satisfies the Eine Nutzlast, eine zugehörige Daten-String oder ein Nonce, die das erfüllt
restrictions of the formatting function. Einschränkungen der Formatierungsfunktion.
4.2 Symbols 4.2 Symbole
4.2.1 4.2.1
Variables Variablen
a ein
The octet length of the associated data. Das Oktett Länge der zugehörigen Daten.
A Ein
The associated data string. Die zugehörigen Daten-String.
Alen Alen
The bit length of the associated data. Die Bit-Länge des zugeordneten Daten.
B B
B B
i ich
The i th block of the formatted input. Das i-te Block von der formatierten Eingabe.
C C
The ciphertext. Der Geheimtext.
4 4

Page 11 Seite 11
Clen Clen
The bit length of the ciphertext. Die Bit-Länge des Chiffretextes.
Ctr Ctr
i ich
The i th counter block. Das i-te Zählerblock.
K K
The block cipher key. Die Blockchiffre-Taste.
Klen Klen
The bit length of the block cipher key. Die Bit-Länge des Blocks Chiffrierschlüssel.
m m
The number of blocks in the formatted payload. Die Anzahl der Blöcke in dem formatierten Nutzlast.
MaxErrs MaxErrs
The maximum number of times that the output of any implementation of the Die maximale Anzahl von Malen, die die Ausgabe von der Anwendung der
decryption-verification process can be INVALID before the key is retired. Entschlüsselung Prüfungsvorgangs kann ungültig sein, bevor der Schlüssel ist im Ruhestand.
n n
The octet length of the nonce. Das Oktett Länge der Nonce.
N N
The nonce. Die Nonce.
Nlen NLen
The bit length of the nonce. Das Bit Länge der Nonce.
P P
The payload. Die Nutzlast.
Plen Plen
The bit length of the payload. Die Bit-Länge der Nutzdaten.
q q
The octet length of the binary representation of the octet length of the payload. Das Oktett Länge der binären Darstellung der Oktettlänge der Nutzlast.
Q Q
A bit string representation of the octet length of P . Ein bisschen String-Darstellung des Oktett Länge von P.
r r
The number of blocks in the formatted input data ( N , A , P ). Die Anzahl der Blöcke in der formatierten Eingangsdaten (N, A, P).
Risk Risiko
The highest acceptable probability for an inauthentic message to pass the Die höchste Wahrscheinlichkeit für einen akzeptablen unecht Nachricht an die weitergeben
decryption-verification process. Entschlüsselung Prüfungsvorgangs.
t t
The octet length of the MAC. Das Oktett Länge des MAC.
T T
The MAC that is generated as an internal variable in the CCM Die MAC, die als eine interne Variable in der CCM erzeugt wird
processes. Prozesse.
Tlen Tlen
The bit length of the MAC. Die Bitlänge des MAC.
5 5

Page 12 Seite 12
4.2.2 4.2.2
Operations and Functions Vorgänge und Funktionen
0x 0x
The prefix to a bit string that is represented in hexadecimal characters. Das Präfix zu einem Bit-String, der in hexadezimalen Zeichen dargestellt wird.
[ x ] [X]
s s
The binary representation of the non-negative integer x , in s bits, where x <2 Die binäre Darstellung des nicht-negative ganze Zahl x in n Bits, wobei x <2
s s
. .
⎡ ⎤ ⎡ ⎤
x x
The least integer that is not less than the real number x. Die kleinste ganze Zahl, die nicht kleiner als der reale Zahl x ist.
X || Y X Y ||
The concatenation of two bit strings X and Y . Die Verkettung von zwei Bitfolgen x und y.
XY XY
The bitwise exclusive-OR of two bit strings X and Y of the same length. Das bitweise Exklusiv-ODER von zwei Bit-Strings X und Y die gleiche Länge.
CIPH CIPH
K K
( X ) (X)
The output of the forward cipher function of the block cipher algorithm under the Der Ausgang des Vorwärts-Verschlüsselungsfunktion des Blockverschlüsselungsalgorithmus unter der
key K applied to the data block X . Schlüssel K angewendet, um den Datenblock X.
LSB LSB
s s
( X ) (X)
The bit string consisting of the s right-most bits of the bit string X . Die Bit-String, der aus den n am weitesten rechts Bits der Bitkette X.
MSB MSB
s s
( X ) (X)
The bit string consisting of the s left-most bits of the bit string X . Die Bit-String, bestehend aus den s am weitesten links Bits der Bit-String X.
lg( x ) lg (x)
The base 2 logarithm of the positive real number x . Der Logarithmus zur Basis 2 der positiven reellen Zahl x ist.
5 Preliminaries 5 Vorbemerkungen
The selection of a block cipher algorithm and secret key are discussed in Section 5.1. Die Auswahl einer Blockchiffre-Algorithmus und geheimen Schlüssel werden in Abschnitt 5.1 diskutiert. The two Die beiden
cryptographic primitives that CCM requires for its operation are discussed in Section 5.2. kryptografische Grundelemente, die CCM benötigt für seinen Betrieb werden in Abschnitt 5.2 diskutiert. The Die
data elements of CCM are discussed in Section 5.3. Datenelemente des CCM sind in Abschnitt 5.3 diskutiert. The formatting of valid data elements is Die Formatierung der gültigen Datenelemente ist
discussed in Section 5.4. in Abschnitt 5.4 diskutiert. Examples of operations and functions are given in Section 5.5. Beispiele für Operationen und Funktionen sind in Abschnitt 5.5 angegeben.
5.1 Underlying Block Cipher Algorithm 5.1 Basis Block Cipher Algorithm
The CCM algorithm depends on the choice of an underlying symmetric key block cipher Die CCM-Algorithmus hängt von der Wahl des zugrundeliegenden symmetrischen Schlüsselblockchiffre
algorithm. Algorithmus. The CCM algorithm is thus a mode of operation (mode, for short) of the symmetric Die CCM-Algorithmus ist also eine Betriebsart (Modus abgekürzt) des symmetrischen
key block cipher. Schlüssel-Block-Chiffre. The underlying block cipher algorithm shall be approved, and a secret key for Die zugrunde liegende Blockchiffre-Algorithmus wird zugelassen, und ein geheimer Schlüssel zur
the block cipher algorithm shall be generated uniformly at random, or close to uniformly at die Blockchiffre-Algorithmus ist gleichverteilt, oder in der Nähe erzeugt werden gleichmäßig auf
random, ie, so that each possible key is (nearly) equally likely to be generated. random, dh so, dass jede mögliche Schlüssel (fast) gleicher Wahrscheinlichkeit erzeugt werden. Moreover, the Darüber hinaus ist die
key should be established for the parties to the information by an approved key establishment Schlüssel sollte für die Parteien auf die Informationen von einem zugelassenen Schlüsselerstellung festgelegt werden
method. Methode. The key shall be kept secret and shall only be used for the CCM mode. Der Schlüssel muss geheim gehalten werden und dürfen nur für die CCM-Modus verwendet werden. The total Die Gesamt
number of invocations of the block cipher algorithm during the lifetime of the key shall be Anzahl der Aufrufe der Blockchiffre-Algorithmus während der Laufzeit des Schlüssels sind
limited to 2 begrenzt auf 2
61 61
. . Key establishment and key management are outside the scope of this Schlüsselerstellung und Schlüsselverwaltung nicht in den Geltungsbereich dieser
Recommendation. Empfehlung.
For any given key, the underlying block cipher algorithm of the mode consists of two functions Für jeden gegebenen Schlüssel, die zugrunde liegende Blockchiffre-Algorithmus des Modus besteht aus zwei Funktionen
that are inverses of each other. , die invers zueinander sind. As part of the choice of the block cipher algorithm, one of the two Im Rahmen der Auswahl der Blockverschlüsselungsalgorithmus, eine der beiden
6 6

Page 13 Seite 13
functions of the block cipher algorithm is designated as the forward cipher function. Funktionen des Blockchiffre-Algorithmus wird als Vorwärtsverschlüsselungsfunktion bezeichnet.
*
The Die
inverse of this process is called the inverse cipher function; Inverse dieser Vorgang wird als das Inversverschlüsselungsfunktion; however, the CCM mode does not Allerdings ist die CCM-Modus nicht
require the inverse cipher function. erfordern die inverse Verschlüsselungsfunktion.
The forward cipher function is a function on bit strings of a fixed bit length; Die Vorwärtsverschlüsselungsfunktion ist eine Funktion eines Bit-Strings fester Bitlänge; the strings are called die Saiten genannt werden
blocks, and their length is called the block size. Blöcke, und ihre Länge wird als die Blockgröße. For CCM, the block size of the block cipher CCM, die Blockgröße der Blockchiffre
algorithm shall be 128 bits; Algorithmus ist 128 Bit betragen; currently, the AES algorithm is the only approved block cipher Derzeit ist der AES-Algorithmus die einzige zugelassene Blockchiffre
algorithm with this block size. Algorithmus mit dieser Blockgröße.
The CCM key, denoted K , is the block cipher key; Die CCM-Schlüssel, bezeichnet mit K, ist die Blockchiffre Schlüssel; the forward cipher function of the block die Vorwärtsverschlüsselungsfunktion des Blocks
cipher with this key is denoted CIPH Chiffre mit diesem Schlüssel bezeichnet CIPH
K K
. . The bit length of K is denoted Klen . Die Bitlänge K bezeichnet Klen.
5.2 Cryptographic Primitives 5.2 kryptographischen Grund
The CCM specification essentially combines two cryptographic mechanisms that are based on Die CCM-Spezifikation vereint im Wesentlichen zwei kryptographische Mechanismen, die auf Basis von
the forward cipher function. die Vorwärtsverschlüsselungsfunktion. One mechanism is the Counter (CTR) mode for confidentiality, Ein Mechanismus wird der Zähler (CTR)-Modus für Vertraulichkeit,
which is specified for general use in the first Part of this Recommendation [6]. die für die allgemeine Verwendung in den ersten Teil dieser Empfehlung [6] festgelegt ist. The CTR mode Die CTR-Modus
requires the generation of a sufficiently long sequence of blocks called the counter blocks. erfordert die Erzeugung eines ausreichend langen Folge von Blöcken genannt die Zählerblöcke. The Die
counter blocks must be distinct within a single invocation and across all other invocations of the Zählerblöcke müssen innerhalb einer einzigen Aufruf und in allen anderen Aufrufen der deutlich sein
CTR mode under any given key, but they need not be secret. CTR-Modus unter einem bestimmten Schlüssel, aber sie müssen nicht geheim sein. This requirement on the counter Diese Anforderung auf der Theke
blocks extends to the CCM mode. Blöcke erstreckt sich auf die CCM-Modus. See [6] for further discussion of the generation of counter Siehe [6] für die weitere Diskussion der Generation der Zähler
blocks; Blöcke; see Section 5.4 below for an additional requirement on the counter blocks in CCM. siehe Abschnitt 5.4 unten für eine zusätzliche Anforderung an die Zählerblöcke in CCM.
The other cryptographic mechanism within CCM is an adaptation of the cipher block chaining Die andere kryptographische Mechanismus innerhalb CCM ist eine Anpassung des Cipher Block Chaining
(CBC) technique from [6] to provide assurance of authenticity. (CBC)-Technik aus [6] Sicherung von Authentizität zu schaffen. Specifically, the CBC technique Insbesondere ist die CBC-Technik
with an initialization vector of zero is applied to the data to be authenticated; authentifiziert werden mit einem Initialisierungsvektor von Null auf die Daten angewendet; the final block of der letzte Block der
the resulting CBC output, possibly truncated, serves as a message authentication code (MAC) of das resultierende Ausgangs CBC, möglicherweise abgeschnitten, dient als ein Nachrichtenauthentifizierungscode (MAC) von
the data. die Daten. The algorithm for generating a MAC in this fashion is commonly called CBC-MAC. Der Algorithmus zum Erzeugen eines MAC in dieser Weise wird allgemein als CBC-MAC.
This Recommendation does not approve CBC-MAC as an authentication mode outside of the Diese Empfehlung gilt nicht CBC-MAC genehmigen als Authentifizierungsmodus außerhalb des
context of the CCM specification; Rahmen der CCM-Spezifikation; however, a variation of CBC-MAC is proposed for general jedoch ist eine Variation der CBC-MAC für allgemeine vorgeschlagenen
use in the second Part of this Recommendation [7]. verwenden im zweiten Teil dieser Empfehlung [7].
The same key, K , is used for both the CTR and CBC-MAC mechanisms within CCM. Der gleiche Schlüssel, K, wird sowohl für die CTR und CBC-MAC Mechanismen innerhalb CCM verwendet.
5.3 Data Elements 5.3 Datenelemente
The data that CCM protects consists of a message, ie, a bit string, called the payload, denoted P , Die Daten, die CCM schützt besteht aus einer Nachricht, das heißt, eine Bitfolge, die so genannte Nutzlast bezeichnet P,
of bit length denoted Plen , and a bit string, called the associated data, denoted A . der Bit-Länge bezeichnet Plen, und ein bisschen Schnur, rief die zugehörigen Daten, mit A bezeichnet. The associated Die zugehörige
data is optional, ie, A may be the empty string. Daten ist optional, dh, kann ein leerer String sein.
** **
CCM provides assurance of the CCM bietet Sicherung der
confidentiality of P and assurance of the authenticity of the origin of both A and P ; Vertraulichkeit P und Sicherung der Echtheit des Ursprungs von A und P;
confidentiality is not provided for A . Vertraulichkeit ist nicht für A vorgesehen.
A bit string called the nonce, denoted N , is assigned to the data pair to be protected, ie, the Eine Bitfolge genannte Nonce N bezeichnet, ist mit dem Datenpaar zugeordnet zu schützen, das heißt die
*
For the AES algorithm, the forward cipher is explicitly identified in [2]. Für den AES-Algorithmus wird der Vorwärtsverschlüsselungs explizit in [2] identifiziert.
** **
The payload may also be empty, in which case the specification degenerates to an authentication mode on the Die Nutzlast kann auch leer sein, wobei in diesem Fall die Angabe degeneriert an einen Authentifizierungsmodus auf die
associated data. zugehörigen Daten.
7 7

Page 14 Seite 14
payload and its associated data. Nutzlast und die zugehörigen Daten. The nonce shall be non-repeating in the sense that any two Die Nonce muss sich nicht wiederhole in dem Sinne, dass zwei beliebige
distinct data pairs to be protected by CCM during the lifetime of the key shall be assigned verschiedene Datenpaare, die von CCM während der Laufzeit der Schlüssel geschützt werden zugeordnet werden
distinct nonces. deutliche Nonces. In effect, the nonce determines an invocation of CCM. In der Tat, bestimmt die Nonce einen Aufruf von CCM. The nonce is not Die Nonce ist nicht
required to be random. erforderlich zufällig zu sein.
The MAC that is generated within CCM is an internal variable, denoted T . Die MAC, die in CCM erzeugt wird, ist eine interne Variable, bezeichnet mit T. The bit length of T , Die Bitlänge T,
denoted Tlen , is a parameter of the mode that shall be fixed for all invocations of CCM with the Bezeichnetes Tlen, ist ein Parameter für den Modus, für alle Aufrufe von CCM mit der festsetzt
given key. gegebenen Schlüssel. The requirements for the selection of Tlen are discussed in Appendix B. Die Anforderungen für die Auswahl der Tlen sind in Anhang B erläutert
5.4 Input Formatting 5.4 Input-Formatierung
The CCM data elements N , P , and A shall be formatted into a non-empty sequence of complete Die CCM-Datenelemente N, P und A wird in eine nicht-leere Folge von kompletten formatiert werden
data blocks, denoted B Datenblöcke, bezeichnet B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
for some non-negative integer r , in accordance with a function einige nicht-negative ganze Zahl r in Übereinstimmung mit einer Funktion
called the formatting function (in [8], the formatting function is called the encoding function, β ). rief die Formatierungsfunktion (in [8], wird die Formatierung Funktion namens der Codierungsfunktion, β).
The value of r depends on the formatting function and the input elements. Der Wert von R hängt von der Formatierungsfunktion und die Eingabeelemente. For any given key, the Für jede gegebene Taste die
following three properties shall hold for the formatting function: folgenden drei Eigenschaften werden für die Formatierungsfunktion halten:
1. The first block, B 1. Der erste Block, B
B B
0 0
, uniquely determines the nonce N . , Bestimmt die Nonce N einzigartig.
2. The formatted data uniquely determines P and A ; 2. Die formatierten Daten bestimmt, P und A eindeutig; moreover, if ( N , P, A ) and ( N , P ', A ') Außerdem, wenn (N, P, A) und (N, P ', A')
are distinct input triples whose formatting is B sind verschiedene Eingangs verdreifacht, deren Formatierung ist B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
and B und B
0 0
B B
', B ', B
B B
1 1
', …, B ', ..., B
r ' r '
B B
', then B ', Dann B
B B
i ich
is ist
distinct from B verschieden von B
i ich
B B
' for some index i such that ir and i≤ r '. 'Seit einiger Index i, so dass ir und i≤ r'.
*
3. The first block, B 3. Der erste Block, B
B B
0 0
, is distinct from any counter blocks that are used across all invocations , Ist sich von allen Zählerblöcke, die von allen Aufrufen verwendet werden
of CCM under the key. von CCM unter dem Schlüssel.
The third property suggests that the formatting function and the counter generation function Die dritte Eigenschaft legt nahe, dass die Formatierungsfunktion und der Zähler Erzeugungsfunktion
should not be selected or constructed independently of each other. sollte nicht ausgewählt oder unabhängig voneinander konstruiert werden.
The formatting function may impose restrictions on the contents and the bit lengths of the input Die Formatierungsfunktion können Einschränkungen auf den Inhalt und die Bit-Längen der Eingangs verhängen
data N , P, and A , as well as the parameter Tlen . Daten N, P und A, sowie die Parameter Tlen. For example, the bit lengths may be restricted to Beispielsweise kann die Bit-Längen zu beschränken
multiples of eight and to a given range of values. ein Vielfaches von acht und einem vorgegebenen Bereich von Werten. Values that satisfy the restrictions of the Werte, die die Einschränkungen der befriedigen
formatting function are called valid. Formatierungsfunktion gelten genannt. No value of Tlen smaller than 32 shall be valid. Kein Wert von kleiner als 32 Tlen gelten.
An example of a formatting function and counter generation function that together satisfy these Ein Beispiel für eine Formatierungsfunktion und Gegenfunktion Generation, die zusammen erfüllen diese
requirements is given in Appendix A. Alternative formatting functions may be developed in the Anforderungen ist in Anhang A Alternative Formatierungsfunktionen können in der gegebenen entwickelt werden
future. Zukunft.
5.5 Examples of Operations and Functions 5.5 Beispiele für Vorgänge und Funktionen
Given a positive integer s and a non-negative integer x that is less than 2 Bei einer positive ganze Zahl s und eine nicht-negative ganze Zahl x, die kleiner als 2 ist
s s
, the binary Die binären
representation of x in s bits is denoted [ x ] Darstellung von x in n Bits bezeichnet [X]
s s
. . For example, for the (base 10) integer 45, the binary Beispielsweise für die (Basis 10) Ganzzahl 45, die binäre
representation (base 2) is 101101, so [45] Darstellung (Basis 2) ist 101101, so [45]
8 8
= 00101101. = 00101101.
The concatenation operation on bit strings is denoted ||; Die Verkettung Operation auf Bit-Strings wird bezeichnet ||; for example, 001 || 10111 = 00110111. beispielsweise 001 || 10111 = 00110111.
*
This property deals with the case that a nonce is repeated within two distinct input triples. Diese Eigenschaft beschäftigt sich mit dem Fall, dass eine Zufallszahl innerhalb von zwei getrennten Eingangs verdreifacht wiederholt. Although the legitimate Obwohl die legitime
source/sender of the data is already required to assign distinct nonces to different input triples, the security model in Quelle / Absender der Daten bereits benötigt, um verschiedene Nonces auf unterschiedliche Eingabe verdreifacht zuzuordnen, die Sicherheitsmodell in
[8] takes into account that the recipient of purported ciphertexts might not monitor whether a nonce is repeated. [8] berücksichtigt, dass der Empfänger der angeblichen Geheimtexte vielleicht nicht überwachen, ob ein Nonce wird wiederholt.
8 8

Page 15 Seite 15
Given bit strings of equal length, the exclusive-OR operation, denoted ⊕, specifies the addition, Gegeben Bitfolgen von gleicher Länge, die Exklusiv-ODER-Operation bezeichnet ⊕, gibt die zusätzlich
modulo 2, of the bits in each bit position, ie, without carries. modulo 2 der Bits in jeder Bit-Position, also ohne trägt. For example, 10011 ⊕ 10101 = B. 10011 10101 ⊕ =
00110. 00110.
The functions LSB Die Funktionen LSB
s s
and MSB und MSB
s s
return the s least significant (ie, right-most) bits and the s most kehren die am wenigsten signifikante (dh rechte) Bits und die meist
significant (ie, left-most) bits of their arguments, respectively. signifikant (dh ganz links) Bits ihrer Argumente sind. For example, LSB Beispielsweise LSB
3 3
(111011010) (111011010)
= 010, and MSB = 010, und MSB
4 4
(111011010) = 1110. (111011010) = 1110.
Given a positive real number x , the base 2 logarithm x is denoted lg(x). Bei einer positiven reellen Zahl x ist der Logarithmus zur Basis 2 bezeichnet x lg (x). For example, lg(2 Zum Beispiel, lg (2
10 10
)=10. ) = 10.
6 CCM Specification 6 CCM-Spezifikation
The two CCM processes are called generation-encryption and decryption-verification. Die beiden CCM Prozesse Generation-Verschlüsselung und Entschlüsselung-Prüfung genannt. The Die
prerequisites, inputs, outputs, steps, and summaries for the execution of the two CCM processes Voraussetzungen, Eingänge, Ausgänge, Schritte und Zusammenfassungen für die Ausführung der beiden CCM Prozesse
are specified in Sections 6.1 and 6.2 below. werden in den Abschnitten angegeben 6.1 und 6.2 unten. The prerequisites are inputs that are typically fixed Die Voraussetzungen sind Eingänge, die typischerweise behoben werden
across many invocations of CCM. über viele Aufrufe von CCM. The prerequisites and inputs shall meet the requirements in Die Voraussetzungen und die Eingänge müssen den Anforderungen in treffen
Section 5. Abschnitt 5.
There is some flexibility in the order of the steps of the two processes. Es besteht eine gewisse Flexibilität in der Reihenfolge der Schritte der beiden Prozesse. For example, the Zum Beispiel kann die
generation of the counter blocks can occur at any time before they are used; Erzeugung der Zählerblöcke können jederzeit auftreten, bevor sie verwendet werden; in fact, the counter Tatsächlich wird der Zähler
blocks may be generated in advance and be considered as inputs to the processes. Blöcke können im Voraus erzeugt werden und als Eingänge an die Prozesse in Betracht gezogen werden.
6.1 Generation-Encryption Process 6.1-Generation-Verschlüsselungsprozess
The following is a specification of the generation-encryption process of CCM: Das folgende ist eine Spezifikation der Generation-Verschlüsselungsprozess von CCM:
Prerequisites: Voraussetzungen:
block cipher algorithm; Blockchiffre-Algorithmus;
key K ; Schlüssel K;
counter generation function; Zähler-Generation-Funktion;
formatting function; Formatierungsfunktion;
MAC length Tlen . MAC Länge Tlen.
Input : Input:
valid nonce N ; gültig Nonce N;
valid payload P of length Plen bits; gültig Nutzlast P der Länge Plen Bits;
valid associated data A ; gültig zugehörigen Daten A;
Output : Ausgang:
ciphertext C. Chiffretext C
Steps : Schritte aus:
1. 1.
Apply the formatting function to ( N , A , P ) to produce the blocks B Übernehmen Sie die Formatierungsfunktion zu (N, A, P), um die Blöcke B produzieren
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
. .
2. 2.
Set Y Y gesetzt
0 0
= CIPH = CIPH
K K
( B (B
B B
0 0
). ).
3. 3.
For i = 1 to r , do Y Für i = 1 bis r, Y tun
i ich
= CIPH = CIPH
K K
( B (B
B B
i ich
Y Y
i -1 i-1
). ).
9 9

Page 16 Seite 16
4. 4.
Set T =MSB Gesetzt T = MSB
Tlen Tlen
( Y (Y
r r
). ).
5. 5.
Apply the counter generation function to generate the counter blocks Ctr Übernehmen Sie die Zähler-Generation-Funktion, um die Zählerblöcke Ctr erzeugen
0 0
, Ctr CTR
1 1
, ,
…, Ctr ..., Ctr
m m
, where Gegebenen
128 128
Plen Plen
m = m =
. .
6. 6.
For j =0 to m , do S Für j = 0 bis m, tun S
j j
= CIPH = CIPH
K K
( Ctr (CTR
j j
). ).
7. 7.
Set S= S Set S = S
1 1
|| S || S
2 2
|| …|| S || ... || S
m m
. .
8. 8.
Return C =( P ⊕ MSB Rück C = (P ⊕ MSB
Plen Plen
( S )) || ( T ⊕ MSB (S)) || (T ⊕ MSB
Tlen Tlen
( S (S
0 0
)). )).
The input data to the generation-encryption process are a valid nonce, a valid payload string, and Die Eingangsdaten zur Erzeugung Umschlüsselung eine gültige Nonce eine gültige Nutzlast Zeichenfolge und
a valid associated data string, which are formatted according to the formatting function. eine gültige Datenfolge zugeordnet, die entsprechend der Formatierungsfunktion formatiert sind. The Die
CBC-MAC mechanism is applied to the formatted data to generate a MAC, whose length is a CBC-MAC-Mechanismus um die formatierten Daten angewendet, um einen MAC, dessen Länge A zu erzeugen
prerequisite. Voraussetzung. Counter mode encryption, which requires a sufficiently long sequence of counter Zählermodus Verschlüsselung, die eine ausreichend lange Sequenz von Gegen erfordert
blocks as input, is applied to the payload string and separately to the MAC. Blöcke als Eingangssignal an die Nutzlast-String und getrennt zu der MAC aufgebracht. The resulting data, Die resultierenden Daten,
called the ciphertext, denoted C , is the output of the generation-encryption process. genannt verschlüsselten Text C bezeichnet, ist das Ausgangssignal der Erzeugungs-Verschlüsselungsprozess.
6.2 Decryption-Verification Process 6.2 Entschlüsselung Prüfungsvorgangs
Prerequisites : Voraussetzungen:
block cipher algorithm; Blockchiffre-Algorithmus;
key K ; Schlüssel K;
counter generation function; Zähler-Generation-Funktion;
formatting function; Formatierungsfunktion;
valid MAC length Tlen . gültige MAC-Länge Tlen.
Input : Input:
nonce N ; Nonce N;
associated data A ; zugehörigen Daten A;
purported ciphertext C of length Clen bits; angebliche Geheimtext C der Länge Clen Bits;
Output : Ausgang:
either the payload P or INVALID . entweder die Nutzlast P oder ungültig.
Steps : Schritte aus:
1. 1.
If ClenTlen , then return INVALID. Wenn ClenTlen, dann wieder INVALID.
2. 2.
Apply the counter generation function to generate the counter blocks Ctr Übernehmen Sie die Zähler-Generation-Funktion, um die Zählerblöcke Ctr erzeugen
0 0
, Ctr CTR
1 1
, ,
…, Ctr ..., Ctr
m m
, where Gegebenen
128 128
) )
( (
Tlen Tlen
Clen Clen
m m
-
= =
. .
3. 3.
For j =0 to m , do S Für j = 0 bis m, tun S
j j
= CIPH = CIPH
K K
( Ctr (CTR
j j
). ).
4. 4.
Set S= S Set S = S
1 1
|| S || S
2 2
|| …|| S || ... || S
m m
. .
5. 5.
Set P =MSB Stellen P = MSB
Clen - Tlen Clen - Tlen
( C ) ⊕ MSB (C) ⊕ MSB
Clen - Tlen Clen - Tlen
( S ). (S).
6. 6.
Set T =LSB Gesetzt T = LSB
Tlen Tlen
( C ) ⊕ MSB (C) ⊕ MSB
B B
Tlen Tlen
( S (S
0 0
). ).
7. 7.
If N , A , or P is not valid, as discussed in Section 5.4, then return INVALID, else Wenn N, A, P oder nicht gültig ist, wie in Abschnitt 5.4 diskutiert, dann wieder INVALID, sonst
apply the formatting function to ( N , A , P ) to produce the blocks B gelten die Formatierungsfunktion zu (N, A, P), um die Blöcke B produzieren
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
. .
8. 8.
Set Y Y gesetzt
0 0
= CIPH = CIPH
K K
( B (B
B B
0 0
). ).
9. 9.
For i = 1 to r , do Y Für i = 1 bis r, Y tun
j j
= CIPH = CIPH
K K
( B (B
B B
i ich
Y Y
i -1 i-1
). ).
10. 10.
If T ≠ MSB Wenn T ≠ MSB
Tlen Tlen
( Y (Y
r r
), then return INVALID, else return P . ), Dann wieder INVALID, sonst Rück P.
10 10

Page 17 Seite 17
The input to the decryption-verification process is a purported ciphertext, an associated data Das Eingangssignal zu dem Entschlüsselungs-Verifizierungsprozess ist eine angebliche Geheimtext, eine zugeordnete Daten
string, and the nonce that was purportedly used in the generation of the purported ciphertext. Zeichenfolge und die Nonce, die angeblich bei der Erzeugung des vorgegebenen Geheimtext verwendet wurde.
Counter mode decryption is applied to the purported ciphertext to produce the corresponding Zählermodus Entschlüsselung an den verschlüsselten Text angebliche um die entsprechende Anwendung
MAC and payload. MAC und Nutzlast. If the nonce, the associated data string, and the payload are valid, as Wenn die Nonce, die zugehörigen Daten-String, und die Nutzlast gültig sind, wie
discussed in Section 5.4, then these strings are formatted into blocks according to the formatting in Abschnitt diskutiert 5.4, dann werden diese Strings in Blöcke nach der Formatierung formatiert
function, and the CBC-MAC mechanism is applied to verify the MAC. Funktion und der CBC-MAC-Mechanismus angewendet wird, um die MAC überprüfen. If verification succeeds, Wenn die Registrierung erfolgreich ist,
the decryption-verification process returns the payload as output; die Entschlüsselungsprüfungsvorgangs gibt die Nutzlast als Ausgabe; otherwise, only the error Andernfalls wird nur der Fehler
message INVALID is returned. Nachricht INVALID zurückgegeben.
When the error message INVALID is returned, the payload P and the MAC T shall not be Wenn die Fehlermeldung INVALID zurückgegeben wird, wird die Nutzlast P und die MAC-T nicht
revealed. offenbart. Moreover, the implementation shall ensure that an unauthorized party cannot Darüber hinaus soll die Umsetzung zu gewährleisten, dass eine unberechtigte Partei kann nicht
distinguish whether the error message results from Step 7 or from Step 10, for example, from the zu unterscheiden, ob die Fehlermeldung resultiert aus Schritt 7 oder Schritt 10, beispielsweise aus der
timing of the error message. Zeitpunkt der Fehlermeldung.
11 11

Page 18 Seite 18
Appendix A: Example of a Formatting and Counter Generation Function Anhang A: Beispiel einer Formatierung und Gegenerzeugungsfunktion
In this appendix, a formatting function for the input data and a counter generation function are In dieser Anlage wird eine Formatierungsfunktion für die Eingangsdaten und eine Zählererzeugungsfunktion
specified that together satisfy the requirements of Section 5.4. angegeben, die zusammen die Anforderungen von Abschnitt 5.4 zu erfüllen. With these functions, this Mit diesen Funktionen dieses
specification of CCM is essentially equivalent to the specification of CCM in the draft Spezifikation der CCM entspricht im wesentlichen der Beschreibung in dem Entwurf CCM
amendment [4] to the IEEE Standard 802.11 for wireless local area networks [5]. Änderung [4] mit dem IEEE-Standard 802.11 für drahtlose lokale Netzwerke. [5]
The requirements that this particular formatting function imposes on the lengths of the variables Die Anforderungen, die diese bestimmte Formatierungsfunktion enthält für die Längen der Variablen
in CCM are given in Section A.1; in CCM sind in Abschnitt A.1; the formatting of the input data is specified in Section A.2; die Formatierung der Eingangsdaten in Abschnitt A.2 angegeben; the die
counter generation function is specified in Section A.3. Gegenerzeugungsfunktion wird in Abschnitt A.3.
A.1 A.1
Length Requirements Länge Anforderungen
The bit length of each input string, ie, N , A , and P , shall be a multiple of 8 bits, ie, each input Die Bitlänge jedes Eingangszeichenkette, dh, N, A und P, wird ein Vielfaches von 8 Bits, das heißt, jeweils eingegeben werden
string shall be an octet string. String wird ein Oktett String sein. The octet lengths of these strings are denoted n , a , and p ; Das Oktett Längen dieser Saiten n bezeichnet, a und p; thus, n , a Somit n, a
and p are integers. und p ganze Zahlen sind. Similarly, the parameter t denotes the octet length of T . In ähnlicher Weise wird der Parameter t die Oktettlänge T. The octet length of P Das Oktett Länge von P
(ie, the integer p ) is represented within the first block of the formatted data as an octet string (Dh die ganze Zahl p) in dem ersten Block von formatierten Daten als ein Byte-String dargestellt
denoted Q . Bezeichnetes Q. The octet length of Q , denoted q , is a parameter of the formatting function. Das Oktett Länge von Q, bezeichnet mit q, ist ein Parameter, der Formatierungsfunktion. Thus, Q is Somit ist Q
equivalent to [ p ] äquivalent zu [p]
8 q 8 q
, the binary representation of p in q octets. Die binäre Darstellung von p in q Bytes. For example, if q = 3 and P is a Wenn beispielsweise q = 3 und P ein
string that consists of 4096 bits, ie, p = 512, then Q is the string 00000000 00000010 00000000. String, der von 4096 Bits besteht, dh, p = 512, ist Q die Zeichenfolge 00000000 00000010 00000000.
The formatting in this appendix imposes the following length conditions: Die Formatierung in diesem Anhang jedoch die folgende Länge Bedingungen:
t is an element of T ist ein Element
{ {
4, 6, 8, 10, 12, 14, 16}; 4, 6, 8, 10, 12, 14, 16};
q is an element of {2, 3, 4, 5, 6, 7, 8}; q ein Element {2, 3, 4, 5, 6, 7, 8};
n is an element of {7, 8, 9, 10, 11, 12, 13} n ein Element ist, {7, 8, 9, 10, 11, 12, 13}
n + q =15; n + q = 15;
a <2 a <2
64 64
. .
The parameter q determines the maximum length of the payload: by definition, p <2 Der Parameter q bestimmt die maximale Länge der Nutzdaten: definitions p <2
8 q 8 q
, so P , Also P
consists of fewer than 2 besteht aus weniger als 2
8 q 8 q
octets, ie, fewer than 2 Bytes, dh weniger als 2
8 q -4 8 q -4
128-bit blocks. 128-Bit-Blöcken. The fourth condition Die vierte Bedingung
implies that a choice for q determines the value of n , namely, n =15- q . bedeutet, daß eine Wahl für Q bestimmt den Wert von n, dh n = 15 bis q. (Equivalently, the nonce (Gleichwertig, die Nonce
length, n , may be considered as the parameter of the formatting function that determines the Länge, n, kann als Parameter der Funktion, die die Formatierung bestimmt angesehen werden
value of q .) The value of n , in turn, determines the maximum number of distinct nonces, namely, Wert von q.) Der Wert von n, der wiederum bestimmt die maximale Anzahl von verschiedenen nonces, nämlich
2 2
8 n 8 N
. . Thus, the fourth condition amounts to a tradeoff between the maximum number of Somit beträgt der vierten Zustand zu einem Kompromiß zwischen der maximalen Anzahl von
invocations of CCM under a given key and the maximum payload length for those invocations. Aufrufe von CCM unter einem bestimmten Schlüssel und die maximale Nutzlast Länge für diese Aufrufe.
A.2 A.2
Formatting of the Input Data Formatierung der Eingabedaten
The formatting of the input data ( N , A , P ) into a sequence of blocks B Die Formatierung der Eingangsdaten (N, A, P) in eine Folge von Blöcken B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
is presented in wird vorgelegt
the following three sections: in Section A.2.1, the formatting of the nonce and control die folgenden drei Abschnitte: in Abschnitt A.2.1, die Formatierung der Nonce und Kontrolle
information such as length indicators is specified; Informationen wie Länge Indikatoren angegeben; in Section A.2.2, the formatting of A is in Abschnitt A.2.2, die Formatierung von A
specified; angegeben; in Section A.2.3, the formatting of P is specified. in Abschnitt A.2.3, die Formatierung von P angegeben wird.
12 12

Page 19 Seite 19
A.2.1 A.2.1
Formatting of the Control Information and the Nonce Formatierung der Steuerinformationen und die Nonce
The leading octet of the first block of the formatting, B Der führende Oktett des ersten Blocks des Forma, B
B B
0 0
, contains four flags for control Enthält vier Flaggen für Steuer
information: two single bits, called Reserved and Adata , and two strings of three bits, to encode Informationen: zwei einzelne Bits, genannt reserviert und Adata und zwei Saiten aus drei Bits, zu kodieren
the values t and q . die Werte t und q. The encoding of t is [( t -2)/2] Die Codierung von T [(t-2) / 2]
3 3
, and the encoding of q is [ q -1] Und die Codierung von q [q -1]
3 3
. . Thus, for So kann
example, if the MAC length is 8 octets, then t is encoded as 011. Note that the encoding 000 in Wenn beispielsweise der MAC-Länge 8 Bytes, wird t als 011. Bemerkung codiert, dass die Codierung 000
both cases does not correspond to a permitted value of t or q . beide Fälle nicht zu einem zulässigen Wert von t oder q entsprechen. The Reserved bit is reserved to Die reservierten Bit ist reserviert
enable future extensions of the formatting; können auch zukünftige Erweiterungen der Formatierung; it shall be set to '0'. es wird auf "0" gesetzt werden. The Adata bit is '0' if a =0 and Die Adata-Bit "0", wenn a = 0 und
'1' if a >0. "1", wenn a> 0. The ordering of the flags within the octet is given in Table 1. Die Anordnung der Fahnen im Oktett ist in Tabelle 1 angegeben.
Table 1: Formatting of the Flags Octet in B Tabelle 1: Die Formatierung der Flaggen Oktett in B
B B
0 0
Bit number Bit-Zahl
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
Contents Inhalt
Reserved Adata Adata vorbehalten
[( t -2)/2] [(T-2) / 2]
3 3
[ q -1] [Q -1]
3 3
The remaining 15 octets of the first block of the formatting are devoted to the nonce and the Die verbleibenden 15 Bytes des ersten Blocks der Formatierung auf die Nonce und der gewidmet
binary representation of the message length in q octets, as given in Table 2. binäre Darstellung der Nachrichtenlänge in Bytes q, wie in Tabelle 2 angegeben.
Table 2: Formatting of B Tabelle 2: Formatieren von B
B B
0 0
Octet number Oktett Nummer
0 0
1 ... 15- q 1 ... 15-q
16- q ... 15 16 q ... 15
Contents Inhalt
Flags Flaggen
N N
Q Q
For example, if B Wenn zum Beispiel B
B B
0 0
is ist
01101110 00010011 11010100 10100011 01011101 01110001 10100101 00000000 01101110 00010011 11010100 10100011 01011101 01110001 10100101 00000000
00000000 00000000 00000000 00000000 00000000 00000000 01000100 00000001: 00000000 00000000 00000000 00000000 00000000 00000000 01000100 00000001:
• The associated data will not be empty (because Adata =1). • Die zugehörigen Daten werden nicht leer sein (weil Adata = 1).
• The MAC will consist of 12 octets (because [( t -2)/2] • Der MAC wird aus 12 Bytes bestehen (da [(t-2) / 2]
3 3
=101). = 101).
• The octet length of Q is 7 (because [ q -1] • Das Oktett Länge von Q 7 (weil [q -1]
3 3
=110), so Q is 00000000 000000000 00000000 = 110), so dass Q 00000000 000000000 00000000
00000000 00000000 01000100 00000001. 00000000 00000000 01000100 00000001.
• The payload will consist of 17,409 octets (because Q =[17409] • Die Nutzlast wird von 17.409 Bytes bestehen (weil Q = [17409]
56 56
). ).
• The octet length of N is 8 (because n =15- q and q =7), so N =00010011 11010100 • Die Oktettlänge von n 8 (weil n = 15-Q und Q = 7), so dass N = 00010011 11010100
10100011 01011101 01110001 10100101 00000000 00000000. 10100011 01011101 01110001 10100101 00000000 00000000.
A.2.2 A.2.2
Formatting of the Associated Data Formatierung des zugehörigen Daten
If a =0, as indicated by the Adata field in the first octet of B Wenn a = 0, wie durch das Feld AData im ersten Oktett B angegeben
B B
0 0
, then there are no blocks devoted to , Dann gibt es keine Blöcke gewidmet
the associated data in the formatted data. die zugehörigen Daten in der formatierten Daten. If a >0, then a is encoded as described below, and the Wenn a> 0, dann a codiert, wie unten beschrieben, und die
encoding of a is concatenated with the associated data A , followed by the minimum number of Codierung eines mit dem zugeordneten Daten A verkettet, gefolgt von der minimalen Anzahl von
'0' bits, possibly none, such that the resulting string can be partitioned into 16-octet blocks. "0"-Bits, gegebenenfalls keine, so dass die resultierende Zeichenkette kann in 16-Byte-Blöcke aufgeteilt werden.
These blocks are denoted in the formatted data as B Diese Blöcke werden in den formatierten Daten als B bezeichnet
1 1
B B
, B , B
B B
2 2
, … B , ... B
u u
B B
for some positive integer u that für einige positive ganze Zahl u, dass
depends on a . a abhängt.
The value a is encoded according to the following three cases: Der Wert a wird nach den folgenden drei Fällen codiert:
13 13

Page 20 Seite 20
• If 0 < a < 2 • Wenn 0 <a <2
16 16
-2 -2
8 8
, then a is encoded as [ a ] , Dann wird codiert als [a]
16 16
, ie, two octets. , Also zwei Oktette.
• If 2 • Wenn 2
16 16
-2 -2
8 8
a < 2 a <2
32 32
, then a is encoded as 0xff || 0xfe || [ a ] , Dann wird codiert als 0xff || 0xfe || [a]
32 32
, ie, six octets. , Das heißt, sechs Bytes.
• If 2 • Wenn 2
32 32
a < 2 a <2
64 64
, then a is encoded as 0xff || 0xff || [ a ] , Dann wird codiert als 0xff 0xff || || [a]
64, 64,
ie, ten octets. dh zehn Bytes.
For example, if a =2 Zum Beispiel, wenn a = 2
16 16
, the encoding of a is 11111111 11111110 00000000 00000001 00000000 Die Codierung von a 11111111 11111110 00000000 00000001 00000000
00000000. 00000000.
The formatting of distinct sets of associated data will not overlap, because for distinct values of Die Formatierung der unterschiedlichen Sätze assoziierter Daten nicht überlappen, weil für verschiedene Werte von
a , the leading bits of the encodings of a are distinct: in the first case, the first octet will not be a, die führenden Bits der Codierungen eine unterscheiden: Im ersten Fall wird das erste Oktett nicht
0xff as it will for the second and third cases; 0xff wie es für den zweiten und dritten Fall; the second and third cases can be distinguished by die zweiten und dritten Fall kann unterschieden werden,
the second octet. das zweite Oktett. Encodings that are not specified in these three cases are reserved, eg, when Codierungen, die nicht in diesen drei Fällen angegeben sind, sind reserviert, beispielsweise wenn
the first two octets are 0x0000, 0xff00, 0xff01, etc. die ersten beiden Zahlen sind 0x0000, 0xFF00, 0xFF01 usw.
A.2.3 A.2.3
Formatting of the Payload Formatierung der Payload
The associated data blocks, if any, are followed in the sequence of formatted blocks by the Die zugehörigen Datenblöcke, falls vorhanden, werden in der Reihenfolge der formatierten Blöcke, die durch die folgen
payload blocks. Nutzsignalblöcke. The payload is concatenated with the minimum number of '0' bits, possibly Die Nutzlast mit der minimalen Anzahl von "0" Bits verkettet, gegebenen
none, such that the result can be partitioned into 16-octet blocks. keine, so dass das Ergebnis in 16-Byte-Blöcke aufgeteilt werden. These blocks are denoted in the Diese Blöcke werden in die bezeichnete
formatted data as B formatierten Daten als B
B B
u +1 u +1
, B , B
B B
u +2 u +2
B B ...
B B
r r
, where r = u + , Wobei r = u +
16 16
p p
. .
A.3 A.3
Formatting of the Counter Blocks Formatierung der Zählerblöcke
The counter generation function in this section is equivalent to a formatting of the counter index i Der Zähler Erzeugungsfunktion in diesem Abschnitt entspricht einer Formatierung des Zählers Index i
into a complete data block. zu einem kompletten Datenblock. The counter blocks Ctr Die Zählerblöcke Ctr
i ich
are formatted as shown in Table 3 below. formatiert sind, wie in Tabelle 3 unten gezeigt.
Table 3: Formatting of Ctr Tabelle 3: Formatieren von Ctr
i ich
Octet number: Oktett Nummer:
0 0
1 ... 15- q 1 ... 15-q
16- q ... 15 16 q ... 15
Contents: Inhalt:
Flags Flaggen
N N
[ i ] [I]
8q 8Q
Within each block Ctr Innerhalb jedes Blocks Ctr
i ich
, the Flags field is formatted as shown in Table 4 below. Das Flags-Feld wird so formatiert, wie in Tabelle 4 unten gezeigt.
Table 4: Formatting of the Flags Field in Ctr Tabelle 4: Formatieren des Flags-Feld in Ctr
i ich
Bit number Bit-Zahl
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
Contents Inhalt
Reserved Reserviert
Reserved Reserviert
0 0
0 0
0 0
[ q -1] [Q -1]
3 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 B
B B
0 0
(as specified in A.2.1
above). Bits 0, 1, and 2 contain the same encoding of q as in B
0 0
B B
. .
14 14

Page 21 Seite 21
Appendix B: Length of the MAC
The length, 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 Tlen is given in Section B.2.
B.1
Authentication Assurance
The decryption-verification process determines whether a purported ciphertext input is, in fact, a
ciphertext, ie, 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, ie, 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.
For any purported ciphertext that is at least Tlen bits long, the rightmost 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:
• If the output is INVALID, then the payload and the associated data string cannot both be
authentic, ie, they cannot have originated from a source that executed the generation-
encryption process on them with the given nonce to produce the purported ciphertext.
• 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 Tlen . In particular, the probability is no greater
than 1 in 2
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.
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
* *
In particular, given a single valid ciphertext, and the corresponding payload and nonce, the attacker chooses any set
of bits to flip in the payload and flips the corresponding set of bits in the ciphertext. The attacker then tries to induce
the decryption-verification process to reuse the associated counter blocks with the altered ciphertext. When the Wenn die
counter blocks are generated as in Appendix A, this step is equivalent to inducing the decryption-verification
process to reuse the nonce. In principle, a system could monitor the nonces that are presented to the decryption-
verification process to facilitate some defense against this attack, but such monitoring may not be feasible in
practice. Praxis.
15 15

Page 22 Seite 22
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.
Also, an attacker may be able to intercept a legitimate ciphertext and “replay” it for verification
at a later time. zu einem späteren Zeitpunkt. 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
Larger values of Tlen provide greater authentication assurance, as described in Section B.1. The Die
performance tradeoff is that larger values of Tlen require more bandwidth/storage for the
ciphertext.
Although the formatting function in Appendix A permits Tlen to be any integer multiple of 16
between 32 and 128, inclusive, a value of Tlen that is less than 64 shall not be used without a
careful analysis of the risks of accepting inauthentic data as authentic.
In particular, a value of 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 Für
example, the short duration of a session or, more generally, the low bandwidth of the
communication channel may preclude many repeated trials.
Similarly, for larger values of 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.
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 Risk and MaxErrs , respectively, Tlen should satisfy the following
inequality:
. .
) )
/ /
lg( lg (
Risk Risiko
MaxErrs
Tlen
For example, suppose that a system will not output INVALID for more than 1024 messages
before retiring the key (ie, MaxErrs =2
10 10
), and that the users can tolerate about a one in a million
chance that the system will accept an inauthentic message (ie, Risk =2
-20 -20
). ). In this case, Tlen may
be as low as 32. On the other hand, if MaxErrs =2
32 32
and Risk= 2
-32 -32
, then Tlen should be at least
64. 64.
16 16

Page 23 Seite 23
Appendix C: Example Vectors
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.
From each example, a corresponding example of the decryption-verification process of CCM is
straightforward to construct.
C.1
Example 1 Beispiel 1
In the following example, Klen = 128, Tlen =32, Nlen = 56, Alen = 64, and Plen = 32.
K :
40414243 44454647 48494a4b 4c4d4e4f
N :
10111213 141516
A : A:
00010203 04050607
P : P:
20212223
B :
4f101112 13141516 00000000 00000004
00080001 02030405 06070000 00000000
20212223 00000000 00000000 00000000
T :
6084341b
Ctr
0 0
: :
07101112 13141516 00000000 00000000
S S
0 0
: :
2d281146 10676c26 32bad748 559a679a
Ctr
1 1
: :
07101112 13141516 00000000 00000001
S S
1 1
: :
51432378 e474b339 71318484 103cddfb
C : C:
7162015b 4dac255d
C.2
Example 2
In the following example, Klen = 128, Tlen =48, Nlen = 64, Alen = 128, and Plen = 128.
K :
40414243 44454647 48494a4b 4c4d4e4f
N :
10111213 14151617
A : A:
00010203 04050607 08090a0b 0c0d0e0f
P : P:
20212223 24252627 28292a2b 2c2d2e2f
17 17

Page 24 Seite 24
B :
56101112 13141516 17000000 00000010
00100001 02030405 06070809 0a0b0c0d
0e0f0000 00000000 00000000 00000000
20212223 24252627 28292a2b 2c2d2e2f
T :
7f479ffc a464
Ctr
0 0
: :
06101112 13141516 17000000 00000000
S S
0 0
: :
6081d043 08a97dcc 20cdcc60 bf947b78
Ctr
1 1
: :
06101112 13141516 17000000 00000001
S S
1 1
: :
f280d2c3 75cf7945 20335db9 2b107712
C : C:
d2a1f0e0 51ea5f62 081a7792 073d593d
1fc64fbf accd
C.3
Example 3
In the following example, Klen = 128, Tlen =64, Nlen = 96, Alen = 160, and Plen = 192.
K :
40414243 44454647 48494a4b 4c4d4e4f
N :
10111213 14151617 18191a1b
A : A:
00010203 04050607 08090a0b 0c0d0e0f
10111213
P : P:
20212223 24252627 28292a2b 2c2d2e2f
30313233 34353637
B: B:
5a101112 13141516 1718191a 1b000018
00140001 02030405 06070809 0a0b0c0d
0e0f1011 12130000 00000000 00000000
20212223 24252627 28292a2b 2c2d2e2f
30313233 34353637 00000000 00000000
T :
67c99240 c7d51048
Ctr
0 0
: :
02101112 13141516 1718191a 1b000000
S S
0 0
: :
2f8a00bb 06658919 c3a040a6 eaed1a7f
Ctr
1 1
: :
02101112 13141516 1718191a 1b000001
S S
1 1
: :
c393238a d1923c5d b335c0c7 e1bac924
Ctr
2 2
: :
02101112 13141516 1718191a 1b000002
S S
2 2
: :
514798ea 9077bc92 6c22ebef 2ac732dc
C : C:
e3b201a9 f5b71a7a 9b1ceaec cd97e70b
18 18

Page 25 Seite 25
6176aad9 a4428aa5 484392fb c1b09951
C.4
Example 4
In the following example, Klen = 128, Tlen =112, Nlen = 104, Alen = 524288, and 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.
K :
40414243 44454647 48494a4b 4c4d4e4f
N :
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
... ...
P : P:
20212223 24252627 28292a2b 2c2d2e2f
30313233 34353637 38393a3b 3c3d3e3f
B :
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
19 19

Page 26 Seite 26
T :
f4dd5d0e e4046172 25ffe34f ce91
Ctr
0 0
: :
01101112 13141516 1718191a 1b1c0000
S S
0 0
: :
407136e2 77ec38fc 5af24ef3 24ca1178
Ctr
1 1
: :
01101112 13141516 1718191a 1b1c0001
S S
1 1
: :
49b07f8e 3aa1e010 4241e8bd 5260854e
Ctr
2 2
: :
01101112 13141516 1718191a 1b1c0002
S S
2 2
: :
6ad1cf2c 9af17af3 bcbbbf12 7a01f14d
C : C:
69915dad 1e84c637 6a68c296 7e4dab61
5ae0fd1f aec44cc4 84828529 463ccf72
b4ac6bec 93e8598e 7f0dadbc ea5b
20 20

Page 27 Seite 27
Appendix D: References
[1] [1]
D. Whiting, R. Housley, N. Ferguson, Counter with CBC-MAC (CCM) . Available at Erhältlich bei
http://csrc.nist.gov/ CryptoToolkit/modes/proposedmodes/.
[2] [2]
FIPS Publication 197, Advanced Encryption Standard (AES) . US DoC/NIST, November
26, 2001. Available at http://csrc.nist.gov/publications/.
[3] [3]
FIPS Publication 46-3, Data Encryption Standard (DES) . US DoC/NIST, October 25,
1999. Available at 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.
[5] [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] [6]
NIST Special Publication 800-38A, Recommendation for Block Cipher Modes of
OperationMethods and Techniques . US DoC/NIST, December 2001. Available at
http://csrc.nist.gov/publications/.
[7] [7]
Draft NIST Special Publication 800-38B, Recommendation for Block Cipher Modes of
Operation: the CMAC Authentication Mode . US DoC/NIST, October 2003. Available
at http://csrc.nist.gov/CryptoToolkit/modes.
[8] [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.
[9] [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/.
21 21