Page 1 Page 1
NIST Special Publication 800-38C NIST spécial 800-38C de publication
Recommendation for Block Recommandation pour le bloc
Cipher Modes of Operation: Cipher modes de fonctionnement:
The CCM Mode for Le mode de CCM pour
Authentication and Authentification et
Confidentiality Confidentialité
Morris Dworkin Morris Dworkin
COMPUTERSECURITY COMPUTERSECURITY

Page 2 Page 2

Page 3 Page 3
Computer Security Division Division de la sécurité informatique
Information Technology Laboratory Laboratoire de la technologie de l'information
National Institute of Standards and Technology Institut National des Standards et de la Technologie
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, Secrétaire
Technology Administration Technology Administration
Phillip J. Bond, Under Secretary of Commerce for Technology Phillip J. Bond, sous-secrétaire du Commerce pour la technologie
National Institute of Standards and Technology Institut National des Standards et de la Technologie
Arden L. Bement, Jr., Director Arden L. Bement Jr., Directeur
NIST Special Publication 800-38C NIST spécial 800-38C de publication
Recommendation for Block Recommandation pour le bloc
Cipher Modes of Operation: The Cipher Modes de fonctionnement: L'
CCM Mode for Authentication Mode CCM pour l'authentification
and Confidentiality et confidentialité
Morris Dworkin Morris Dworkin
COMPUTERSECURITY COMPUTERSECURITY

Page 4 Page 4
Reports on Information Security Technology Rapports sur la sécurité des technologies de l'information
The Information Technology Laboratory (ITL) at the National Institute of Standards and Le Laboratoire de la technologie de l'information (ITL) à l'Institut national des normes et
Technology (NIST) promotes the US economy and public welfare by providing technical Technology (NIST) favorise l'économie américaine et le bien-être du public en fournissant technique
leadership for the Nation's measurement and standards infrastructure. le leadership pour la mesure et des normes de l'infrastructure de la nation. ITL develops tests, test ITL développe des tests, le test
methods, reference data, proof of concept implementations, and technical analyses to advance the méthodes, les données de référence, la preuve de concept, les implémentations et les analyses techniques pour faire avancer le
development and productive use of information technology. le développement et l'utilisation productive des technologies de l'information. ITL's responsibilities include the Les responsabilités comprennent l'ITL
development of technical, physical, administrative, and management standards and guidelines for développement de,,, et les normes physiques administration et de gestion et des lignes directrices pour techniques
the cost-effective security and privacy of sensitive unclassified information in Federal computer la sécurité et la confidentialité des informations non classifiées sensible rentable en informatique fédérale
systems. systèmes. This Special Publication 800-series reports on ITL's research, guidance, and outreach Cette publication spéciale rapports 800 de la série sur la recherche, l'orientation et la sensibilisation de ITL
efforts in computer security, and its collaborative activities with industry, government, and efforts en matière de sécurité informatique, et ses activités de collaboration avec l'industrie, le gouvernement, et
academic organizations. organisations universitaires.
Certain commercial entities, equipment, or materials may be identified in this document in order to describe Certaines entités commerciales, des équipements ou matériaux peuvent être identifiées dans le présent document pour décrire
an experimental procedure or concept adequately. une procédure expérimentale ou d'un concept de manière adéquate. Such identification is not intended to imply Cette identification n'est pas destiné à impliquer
recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended recommandation ou une approbation par l'Institut National des Standards et de la technologie, ne sont pas destinés
to imply that the entities, materials, or equipment are necessarily the best available for the purpose. impliquer que les entités, les matériaux, ou de l'équipement ne sont pas nécessairement les meilleurs disponibles à cet effet.
National Institute of Standards and Technology Special Publication 800-38C Institut National des Standards et de la technologie spéciale 800-38C de publication
Natl. Natl. Inst. Inst. Stand. Stand. Technol. Technol. Spec. Spec. Publ. Publ. 800-38C 25 pages (May 2004) 800-38C 25 pages (mai 2004)
CODEN: NSPUE2 CODEN: NSPUE2

Page 5 Page 5
Abstract Résumé
This Recommendation defines a mode of operation, called CCM, for a symmetric key block Cette recommandation définit un mode de fonctionnement, appelé CCM, pour un bloc de clé symétrique
cipher algorithm. algorithme de chiffrement. CCM may be used to provide assurance of the confidentiality and the CCM peut être utilisé pour fournir l'assurance de la confidentialité et de la
authenticity of computer data by combining the techniques of the Counter (CTR) mode and the le mode et l'authenticité des données informatiques en combinant les techniques du compteur (CTR)
Cipher Block Chaining-Message Authentication Code (CBC-MAC) algorithm. Cipher Block Chaining-Message Authentication Code (CBC-MAC) algorithme.
KEY WORDS: authenticated encryption; MOTS CLÉS: chiffrement authentifié; authentication; authentification; block cipher; bloquer chiffrement; confidentiality; la confidentialité;
cryptography; cryptographie; encryption; le cryptage; information security; sécurité de l'information; message authentication code; le code d'authentification de message; mode of operation. mode de fonctionnement.
iii iii

Page 6 Page 6
Table of Contents Table des matières
1 1
PURPOSE...........................................................................................................................................................1
2 2
AUTHORITY.....................................................................................................................................................1
3 3
INTRODUCTION..............................................................................................................................................1
4 4
DEFINITIONS, ABBREVIATIONS, AND SYMBOLS.................................................................................2 Définitions, abréviations et les symboles ............................................ ..................................... 2
4.1 4.1
D Ré
EFINITIONS AND DEFINITIONS ET
A A
BBREVIATIONS BRÉVIATIONS
.............................................................................................................2
4.2 4.2
S S
YMBOLS YMBOLS
....................................................................................................................................................4
4.2.1 4.2.1
Variables................................................................................................................................................4
4.2.2 4.2.2
Operations and Functions Opérations et des fonctions .....................................................................................................................6
5 5
PRELIMINARIES.............................................................................................................................................6
5.1 5.1
U U
NDERLYING NDERLYING
B B
LOCK BLOCAGE
C C
IPHER IPHER
A A
LGORITHM LGORITHM
.................................................................................................6 .................................................. ............................................... 6
5.2 5.2
C C
RYPTOGRAPHIC RYPTOGRAPHIC
P P
RIMITIVES RIMITIVES
......................................................................................................................7
5.3 5.3
D Ré
ATA ATA
E E
LEMENTS ÉLÉMENTS
.........................................................................................................................................7
5.4 5.4
I Je
NPUT CAN PRÉFÉRÉ
F Fa
ORMATTING ORMATTING
....................................................................................................................................8
5.5 5.5
E E
XAMPLES OF EXEMPLES DE
O O
PERATIONS AND PERATIONS ET
F Fa
UNCTIONS ONCTIONS
..............................................................................................8 .................................................. ............................................ 8
6 6
CCM SPECIFICATION CCM TECHNIQUE ...................................................................................................................................9
6.1 6.1
G Sol
ENERATION GÉNÉRATION
-E -E
NCRYPTION NCRYPTION
P P
ROCESS PROCESSUS
..........................................................................................................9
6.2 6.2
D Ré
ECRYPTION Ecryption
-V -V
ERIFICATION ERIFICATION
P P
ROCESS PROCESSUS
......................................................................................................10
APPENDIX A: EXAMPLE OF A FORMATTING AND COUNTER GENERATION FUNCTION.............12 ANNEXE A: EXEMPLE DE MISE EN FORME ET CONTRE LA GÉNÉRATION FONCTION ............. 12
A.1 A.1
L L
ENGTH ONGUEUR
R R
EQUIREMENTS XIGENCES
...........................................................................................................................12
A.2 A.2
F Fa
ORMATTING OF THE ORMATTING DE L'
I Je
NPUT CAN PRÉFÉRÉ
D Ré
ATA ATA
............................................................................................................12
A.2.1 A.2.1
Formatting of the Control Information and the Nonce........................................................................13 Mise en forme à l'information de contrôle et le Nonce .......................................... .............................. 13
A.2.2 A.2.2
Formatting of the Associated Mise en forme de l'Associated Data......................................................................................................13
A.2.3 A.2.3
Formatting of the Formatage de la Payload...................................................................................................................14
A.3 A.3
F Fa
ORMATTING OF THE ORMATTING DE L'
C C
OUNTER Ontre
B B
LOCKS SERRURES
...................................................................................................14
APPENDIX B: LENGTH OF THE ANNEXE B: LONGUEUR DE LA MAC..............................................................................................................15
B.1 B.1
A A
UTHENTICATION UTHENTICATION
A A
SSURANCE SSURANCE
.................................................................................................................15
B.2 B.2
S S
ELECTION OF THE ELECTION DU
MAC L MAC L
ENGTH ONGUEUR
.............................................................................................................16
APPENDIX C: EXAMPLE VECTORS ANNEXE C: VECTEURS EXEMPLE .................................................................................................................17
C.1 C.1
E E
XAMPLE XEMPLE
1................................................................................................................................................17
C.2 C.2
E E
XAMPLE XEMPLE
2................................................................................................................................................17
C.3 C.3
E E
XAMPLE XEMPLE
3................................................................................................................................................18
C.4 C.4
E E
XAMPLE XEMPLE
4................................................................................................................................................19
APPENDIX D: D ANNEXE: REFERENCES...............................................................................................................................21
Table of Figures Table des figures
Table 1: Formatting of the Flags Octet in B Tableau 1: Mise en forme de l'Octuor de drapeaux dans B
0 0
...............................................................................................................13
Table 2: Formatting of B Tableau 2: Mise en forme de B
0 0
............................................................................................................................................13
Table 3: Formatting of Ctr Tableau 3: Mise en forme de Ctr
i Je
..........................................................................................................................................14
Table 4: Formatting of the Flags Field in Ctr Tableau 4: Mise en forme du champ Flags dans Ctr
i Je
.............................................................................................................14
iv iv

Page 7 Page 7
1 Purpose 1 But
This publication is the third Part in a series of Recommendations regarding modes of operation Cette publication est la troisième partie d'une série de recommandations concernant les modes de fonctionnement
of symmetric key block cipher algorithms. des algorithmes de chiffrement par bloc de clés symétriques.
2 Authority Autorité 2
This document has been developed by the National Institute of Standards and Technology Ce document a été élaboré par l'Institut National des Standards et de la Technologie
(NIST) in furtherance of its statutory responsibilities under the Federal Information Security (NIST) dans la poursuite de ses responsabilités légales en vertu de la sécurité de l'information fédérale
Management Act (FISMA) of 2002, Public Law 107-347. Loi sur la gestion (FISMA) de 2002, Public Law 107-347.
NIST is responsible for developing standards and guidelines, including minimum requirements, NIST est responsable des normes et des lignes directrices en développement, y compris les exigences minimales,
for providing adequate information security for all agency operations and assets, but such pour assurer la sécurité de l'information adéquate pour toutes les opérations et les actifs agence, mais comme
standards and guidelines shall not apply to national security systems. les normes et les lignes directrices ne s'appliquent pas aux systèmes de sécurité nationaux. This guideline is consistent Cette recommandation est conforme
with the requirements of the Office of Management and Budget (OMB) Circular A-130, Section avec les exigences de l'Office of Management and Budget (OMB) Circulaire A-130, Section
8b(3), Securing Agency Information Systems, as analyzed in A-130, Appendix IV: Analysis of 8b (3), des systèmes d'information Agence de fixation, comme analysé dans l'A-130, Annexe IV: Analyse des
Key Sections. Les articles clés. Supplemental information is provided in A-130, Appendix III. Informations supplémentaires sont fournies dans A-130, Annexe III.
This guideline has been prepared for use by federal agencies. Cette directive a été préparé à l'intention des organismes fédéraux. It may be used by Il peut être utilisé par
nongovernmental organizations on a voluntary basis and is not subject to copyright. des organisations non gouvernementales sur une base volontaire et n'est pas soumis au droit d'auteur. (Attribution (Attribution
would be appreciated by NIST.) serait apprécié par le NIST.)
Nothing in this document should be taken to contradict standards and guidelines made Rien dans ce document ne doit être prise pour contredire les normes et lignes directrices établies
mandatory and binding on federal agencies by the Secretary of Commerce under statutory obligatoire et contraignant sur ​​les organismes fédéraux par le secrétaire au Commerce sous la loi
authority. autorité. Nor should these guidelines be interpreted as altering or superseding the existing Ces lignes directrices ne devraient pas être interprétés comme une modification ou remplaçant le existant
authorities of the Secretary of Commerce, Director of the OMB, or any other federal official. autorités de la secrétaire au Commerce, Directeur de la CAMO, ou tout autre fonctionnaire fédéral.
Conformance testing for implementations of the mode of operation that is specified in this Part Les essais de conformité pour les implémentations du mode de fonctionnement qui est spécifiée dans la présente partie
of the Recommendation will be conducted within the framework of the Cryptographic Module de la Recommandation sera menée dans le cadre du module cryptographique
Validation Program (CMVP), a joint effort of NIST and the Communications Security Programme de validation (PVMC), une initiative conjointe du NIST et de la sécurité des télécommunications
Establishment of the Government of Canada. Mise en place du gouvernement du Canada. An implementation of a mode of operation must Une mise en œuvre d'un mode de fonctionnement doit
adhere to the requirements in this Recommendation in order to be validated under the CMVP. se conformer aux exigences de la présente Recommandation afin d'être validés sous le PVMC.
The requirements of this Recommendation are indicated by the word “shall.” Les exigences de la présente Recommandation sont indiquées par le mot «doit».
3 Introduction 3 Introduction
This Recommendation specifies an algorithm, Counter with Cipher Block Chaining-Message Cette Recommandation spécifie un algorithme, compteur avec Cipher Block Chaining-Message
Authentication Code [1], abbreviated CCM, that can provide assurance of the confidentiality and Code d'authentification [1], CCM abrégé, que peut fournir l'assurance de la confidentialité et
authenticity of data. l'authenticité des données. CCM is based on an approved symmetric key block cipher algorithm whose CCM est basé sur un algorithme à clé symétrique de chiffrement par bloc approuvé dont
block size is 128 bits, such as the Advanced Encryption Standard (AES) algorithm currently taille de bloc est de 128 bits, comme l'algorithme Advanced Encryption Standard (AES) actuellement
specified in Federal Information Processing Standard (FIPS) Pub. spécifiée dans Federal Information Processing Standard (FIPS) du Pub. 197 [2]; 197 [2]; thus, CCM cannot be ainsi, CCM ne peut pas être
used with the Triple Data Encryption Algorithm [3], whose block size is 64 bits. utilisé avec le Triple Data Encryption Algorithm [3], dont la taille bloc est 64 bits. CCM can be CCM peut être
considered a mode of operation of the block cipher algorithm. considéré comme un mode de fonctionnement de l'algorithme de chiffrement par bloc. As with other modes of operation, Comme avec d'autres modes de fonctionnement,
1 1

Page 8 Page 8
a single key to the block cipher must be established beforehand among the parties to the data; une seule clé de chiffrement par bloc doit être établie au préalable entre les parties à des données;
thus, CCM should be implemented within a well-designed key management structure. ainsi, CCM devrait être mis en œuvre au sein d'une structure de gestion de clé bien conçu. The La
security properties of CCM depend, at a minimum, on the secrecy of the key. propriétés de sécurité de CCM dépendent, au minimum, sur le secret de la clé.
CCM is intended for use in a packet environment, ie, when all of the data is available in storage CCM est destiné à être utilisé dans un environnement de paquet, c'est à dire lorsque l'ensemble des données est disponible dans le stockage
before CCM is applied; avant CCM est appliquée; CCM is not designed to support partial processing or stream processing. CCM n'est pas conçu pour soutenir le traitement ou flux traitement partiel.
The input to CCM includes three elements: 1) data that will be both authenticated and encrypted, L'entrée de CCM comprend trois éléments: 1) les données qui seront à la fois authentifié et chiffré,
called the payload; appelé la charge utile; 2) associated data, eg, a header, that will be authenticated but not encrypted; 2) des données associées, par exemple, un en-tête, qui sera authentifiée mais pas crypté;
and 3) a unique value, called a nonce, that is assigned to the payload and the associated data. et 3) une valeur unique, appelé un nonce, qui est associé à la charge utile et des données associées.
CCM consists of two related processes: generation-encryption and decryption-verification, which CCM se compose de deux processus connexes: génération cryptage et le décryptage de vérification, qui
combine two cryptographic primitives: counter mode encryption and cipher block chaining- combiner deux primitives cryptographiques: chiffrement de mode compteur et de chiffrement par bloc chaining-
based authentication. authentification basée. Only the forward cipher function of the block cipher algorithm is used Seule la fonction de chiffrement avant de l'algorithme de chiffrement par bloc est utilisé
within these primitives. à l'intérieur de ces primitives.
In generation-encryption, cipher block chaining is applied to the payload, the associated data, Dans la production de chiffrement, le chaînage de chiffrement par blocs est appliquée à la charge utile, les données associées,
and the nonce to generate a message authentication code (MAC); et le nonce pour générer un code d'authentification de message (MAC); then, counter mode encryption alors, le cryptage de mode compteur
is applied to the MAC and the payload to transform them into an unreadable form, called the est appliqué à la MAC et la charge utile de les transformer en une forme lisible, appelé
ciphertext. cryptogramme. Thus, CCM generation-encryption expands the size of the payload by the size of the Ainsi, CCM génération de cryptage augmente la taille de la charge utile par la taille de l'
MAC. Mac. In decryption-verification, counter mode decryption is applied to the purported ciphertext Dans le décryptage de vérification, le mode de décryptage compteur est appliqué à la prétendue texte chiffré
to recover the MAC and the corresponding payload; pour récupérer l'adresse MAC et la charge utile correspondante; then, cipher block chaining is applied to the ensuite, le chaînage de chiffrement par blocs est appliquée à l'
payload, the received associated data, and the received nonce to verify the correctness of the charge utile, les données associées reçu, et le nonce reçu de vérifier l'exactitude de la
MAC. Mac. Successful verification provides assurance that the payload and the associated data Une vérification réussie donne l'assurance que la charge utile et les données associées
originated from a source with access to the key. provenir d'une source ayant accès à la clé.
A MAC provides stronger assurance of authenticity than a checksum or an error detecting code. Un MAC fournit des garanties d'authenticité d'un contrôle ou d'un code de détection d'erreur.
The verification of a (non-cryptographic) checksum or an error detecting code is designed to La vérification d'un total de contrôle (non-cryptographique) ou un code de détection d'erreur est conçu pour
detect only accidental modifications of the data, while the verification of a MAC, as occurs in détecter que des modifications accidentelles de données, tandis que la vérification d'un MAC, comme cela se produit dans
CCM, is designed to detect intentional, unauthorized modifications of the data, as well as CCM, est conçu pour détecter intentionnelles, des modifications non autorisées de données, ainsi que
accidental modifications. des modifications accidentelles.
This specification of CCM is intended to be compatible with the use of CCM within the draft Cette spécification de CCM est conçue pour être compatible avec l'utilisation de la CCM à l'intérieur de l'ébauche
amendment [4] to the IEEE Standard 802.11 for wireless local area networks [5]. amendement [4] à la norme IEEE 802.11 pour les réseaux locaux sans fil [5].
4 Definitions, Abbreviations, and Symbols 4 Définitions, abréviations et symboles
4.1 Definitions and Abbreviations 4.1 Définitions et abréviations
Approved Approuvé
FIPS approved or NIST recommended: an algorithm or technique that FIPS approuvé ou NIST recommandé: un algorithme ou technique qui
is either 1) specified in a FIPS or NIST Recommendation, or 2) est soit 1) spécifiée dans FIPS ou NIST recommandation, ou 2)
adopted in a FIPS or NIST Recommendation. adopté dans un FIPS ou NIST recommandation.
Associated Data Données associées
Input data to the CCM generation-encryption process that is Les données d'entrée du processus de génération-chiffrement CCM qui est
authenticated but not encrypted. authentifié mais pas crypté.
2 2

Page 9 Page 9
Authenticity Authenticité
The property that data originated from its purported source. La propriété que les données proviennent de la source prétendue.
Bit Peu
A binary digit: 0 or 1. Un chiffre binaire: 0 ou 1.
Bit Length Longueur de bit
The number of bits in a bit string. Le nombre de bits dans une chaîne de bits.
Bit String Chaîne de bits
An ordered sequence of bits. Une séquence ordonnée de bits.
Block Bloquer
A bit string whose length is the block size of the block cipher Une chaîne de bits dont la longueur correspond à la taille de bloc du bloc de chiffrement
algorithm. algorithme.
Block Cipher Bloquer Cipher
Algorithm Algorithme
A family of functions and their inverses that is parameterized by Une famille de fonctions et leurs inverses qui est paramétré par
cryptographic keys; des clés cryptographiques; the functions map bit strings of a fixed length to les cordes fonctions de carte de bits de longueur fixe à
bit strings of the same length. des chaînes de bits de même longueur.
Block Size Taille de bloc
The bit length of an input (or output) block of the block cipher. La longueur en bits d'une entrée (ou de sortie) du bloc de chiffrement par bloc.
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. Compteur avec Cipher Block Chaining-Message Authentication Code.
Ciphertext Cryptogramme
The output of the CCM encryption-generation process. La sortie du processus de cryptage génération CCM.
Cryptographic Key Clés cryptographiques
A parameter used in the block cipher algorithm that determines the Un paramètre utilisé dans l'algorithme de chiffrement par bloc qui détermine l'
forward cipher function. transmettre fonction de chiffrement.
CTR CTR
Counter. Compteur.
Decryption-Verification The process of CCM in which a purported ciphertext is decrypted and Décryptage-Le processus de vérification de la CCM dans laquelle un texte chiffré supposé est décrypté et
the authenticity of the resulting payload and the associated data is l'authenticité de la charge résultante et les données associées sont
verified. vérifié.
Exclusive-OR OU exclusif
The bitwise addition, modulo 2, of two bit strings of equal length. L'addition au niveau du bit, modulo 2, de deux chaînes de bits de longueur égale.
FIPS FIPS
Federal Information Processing Standard. Federal Information Processing Standard.
Formatting Function Fonction de mise en forme
The function that transforms the payload, associated data, and nonce La fonction qui transforme la charge utile, des données associées, et nonce
into a sequence of complete blocks. en une séquence de blocs complets.
Forward Cipher Avant Cipher
Function Fonction
One of the two functions of the block cipher algorithm that is L'une des deux fonctions de l'algorithme de chiffrement par bloc qui est
determined by the choice of a cryptographic key. déterminé par le choix d'une clé cryptographique.
Generation-Encryption The process of CCM in which a MAC is generated on the payload Génération-Procédé de cryptage de CCM dans un MAC qui est généré sur la charge utile
and the associated data, and encryption is applied to the payload and et des données associées, et le cryptage est appliqué à la charge utile et
the MAC. le MAC.
3 3

Page 10 Page 10
IEEE IEEE
Institute of Electrical and Electronics Engineers Institut des ingénieurs électriciens et électroniciens
Inverse Cipher Function The inverse function of the forward cipher function for a given Inverse Cipher Fonction La fonction inverse de la fonction de chiffrement avant pour une donnée
cryptographic key. clé cryptographique.
Least Significant Bit(s) Least Significant Bit (s)
The right-most bit(s) of a bit string. Le bit (s) le plus à droite d'une chaîne de bits.
Message Message
Authentication Code Code d'Authentification
(MAC) (Mac)
A cryptographic checksum on data that is designed to reveal both Une somme de contrôle cryptographique sur des données qui est conçu pour révéler à la fois
accidental errors and intentional modifications of the data. erreurs accidentelles et intentionnelles modifications des données.
Mode of Operation Mode de fonctionnement
(Mode) (Mode)
An algorithm for the cryptographic transformation of data that Un algorithme pour la transformation cryptographique des données qui
features a symmetric key block cipher algorithm. dispose d'une clé algorithme de chiffrement par bloc symétrique.
Most Significant Bit(s) La plupart Bit (s) significative
The left-most bit(s) of a bit string. Le bit (s) le plus à gauche d'une chaîne de bits.
Nonce Nonce
A value that is used only once within a specified context. Une valeur qui est utilisé seulement une fois dans un contexte donné.
Octet Octuor
A string of eight bits. Une chaîne de huit bits.
Octet Length Octet Longueur
The number of octets in an octet string. Le nombre d'octets dans une chaîne d'octets.
Octet String Octet String
An ordered sequence of octets. Une séquence ordonnée d'octets.
Payload Charge utile
The input data to the CCM generation-encryption process that is both Les données d'entrée pour le processus de chiffrement de génération CCM qui est à la fois
authenticated and encrypted. authentifié et crypté.
Valid Data Element Valable élément de données
A payload, an associated data string, or a nonce that satisfies the Une charge utile, une chaîne de données associées, ou un nonce qui satisfait l'
restrictions of the formatting function. restrictions de la fonction de mise en forme.
4.2 Symbols 4.2 Symboles
4.2.1 4.2.1
Variables Variables
a un
The octet length of the associated data. La longueur de l'octet de données associé.
A A
The associated data string. La chaîne de données associée.
Alen Alen
The bit length of the associated data. La longueur en bits de la donnée associée.
B B
B B
i Je
The i th block of the formatted input. L'e bloc i de l'entrée formaté.
C C
The ciphertext. Le cryptogramme.
4 4

Page 11 Page 11
Clen Clen
The bit length of the ciphertext. La longueur en bits du chiffré.
Ctr Ctr
i Je
The i th counter block. Le i-ème bloc compteur.
K K
The block cipher key. La clé de chiffrement par bloc.
Klen Klen
The bit length of the block cipher key. La longueur en bits de la clé de chiffrement par bloc.
m m
The number of blocks in the formatted payload. Le nombre de blocs dans la charge utile en forme.
MaxErrs MaxErrs
The maximum number of times that the output of any implementation of the Le nombre maximum de fois où la sortie d'une mise en oeuvre de l'
decryption-verification process can be INVALID before the key is retired. processus de décryptage de vérification peut être invalide avant que la clé est à la retraite.
n n
The octet length of the nonce. La longueur de l'octet du nonce.
N N
The nonce. Le nonce.
Nlen NLen
The bit length of the nonce. La longueur en bits de la valeur à usage unique.
P P
The payload. La charge utile.
Plen Plen
The bit length of the payload. La longueur en bits de la charge utile.
q q
The octet length of the binary representation of the octet length of the payload. La longueur d'octet de la représentation binaire de la longueur de l'octet de la charge utile.
Q Q
A bit string representation of the octet length of P . Une représentation de chaîne de bits de la longueur d'octet de P.
r r
The number of blocks in the formatted input data ( N , A , P ). Le nombre de blocs dans les données d'entrée formatées (N, A, P).
Risk Risque
The highest acceptable probability for an inauthentic message to pass the La probabilité la plus élevée acceptable pour un message inauthentique pour passer le
decryption-verification process. processus de décryptage de vérification.
t t
The octet length of the MAC. La longueur d'octets de l'adresse MAC.
T T
The MAC that is generated as an internal variable in the CCM Le MAC qui est généré comme une variable interne au sein du CCM
processes. procédés.
Tlen Tlen
The bit length of the MAC. La longueur en bits de l'adresse MAC.
5 5

Page 12 Page 12
4.2.2 4.2.2
Operations and Functions Opérations et des fonctions
0x 0x
The prefix to a bit string that is represented in hexadecimal characters. Le préfixe d'une chaîne de bits qui est représentée en caractères hexadécimaux.
[ x ] [X]
s s
The binary representation of the non-negative integer x , in s bits, where x <2 La représentation binaire de l'entier non négatif x, s bits, dans lequel x <2
s s
. .
⎡ ⎤ ⎡ ⎤
x x
The least integer that is not less than the real number x. Le plus petit entier qui n'est pas inférieur au nombre réel x.
X || Y X || Y
The concatenation of two bit strings X and Y . La concaténation de deux chaînes de bits X et Y.
X ⊕ Y X ⊕ Y
The bitwise exclusive-OR of two bit strings X and Y of the same length. Le bit à bit OU exclusif de deux chaînes de bits X et Y de la même longueur.
CIPH ICPC
K K
( X ) (X)
The output of the forward cipher function of the block cipher algorithm under the La sortie de la fonction de chiffrement avant de l'algorithme de chiffrement par bloc sous la
key K applied to the data block X . clé K appliquée au bloc de données X.
LSB LSB
s s
( X ) (X)
The bit string consisting of the s right-most bits of the bit string X . La chaîne de bits composée des s les plus à droite des bouts de la chaîne de bits X.
MSB MSB
s s
( X ) (X)
The bit string consisting of the s left-most bits of the bit string X . La chaîne de bits constitué par les s bits de la chaîne de bits X plus à gauche.
lg( x ) lg (x)
The base 2 logarithm of the positive real number x . Le logarithme en base 2 du nombre réel x positif.
5 Preliminaries 5 Préliminaires
The selection of a block cipher algorithm and secret key are discussed in Section 5.1. Le choix d'un algorithme de chiffrement par bloc et clé secrète sont discutés dans la section 5.1. The two Les deux
cryptographic primitives that CCM requires for its operation are discussed in Section 5.2. primitives cryptographiques qui CCM a besoin pour son fonctionnement sont décrits dans la section 5.2. The La
data elements of CCM are discussed in Section 5.3. éléments de données du CCM sont discutés à la section 5.3. The formatting of valid data elements is La mise en forme d'éléments de données valides est
discussed in Section 5.4. discuté à la section 5.4. Examples of operations and functions are given in Section 5.5. Exemples d'opérations et fonctions sont donnés à la section 5.5.
5.1 Underlying Block Cipher Algorithm 5.1 sous-jacent de chiffrement par bloc Algorithme
The CCM algorithm depends on the choice of an underlying symmetric key block cipher L'algorithme de CCM dépend du choix d'un bloc de clé de chiffrement symétrique sous-jacent
algorithm. algorithme. The CCM algorithm is thus a mode of operation (mode, for short) of the symmetric L'algorithme de CCM est donc un mode de fonctionnement (mode, pour faire court) de la symétrique
key block cipher. clé de chiffrement de bloc. The underlying block cipher algorithm shall be approved, and a secret key for L'algorithme de chiffrement par bloc sous-jacente doit être approuvé, et une clé secrète pour
the block cipher algorithm shall be generated uniformly at random, or close to uniformly at l'algorithme de chiffrement par bloc est généré uniformément au hasard, ou tout près de façon uniforme, à
random, ie, so that each possible key is (nearly) equally likely to be generated. aléatoire, c'est à dire, de telle sorte que chaque touche est possible (ou presque) également susceptible de générer. Moreover, the En outre, le
key should be established for the parties to the information by an approved key establishment clé doit être établi pour les parties à l'information par un établissement agréé clé
method. Procédé. The key shall be kept secret and shall only be used for the CCM mode. La clé doit être tenue secrète et ne doit être utilisé pour le mode de CCM. The total Le total
number of invocations of the block cipher algorithm during the lifetime of the key shall be nombre d'invocations de l'algorithme de chiffrement par bloc pendant la durée de vie de la clé doit être
limited to 2 limité à 2
61 61
. . Key establishment and key management are outside the scope of this Établissement de clé et la gestion des clés sont hors de la portée de cette
Recommendation. Recommandation.
For any given key, the underlying block cipher algorithm of the mode consists of two functions Pour une touche donnée, l'algorithme de chiffrement par bloc sous-jacent de mode est constitué de deux fonctions
that are inverses of each other. qui sont inverses l'une de l'autre. As part of the choice of the block cipher algorithm, one of the two Dans le cadre du choix de l'algorithme de chiffrement par blocs, l'un des deux
6 6

Page 13 Page 13
functions of the block cipher algorithm is designated as the forward cipher function. fonctions de l'algorithme de chiffrement par bloc est désigné comme la fonction de chiffrement avant.
∗ *
The La
inverse of this process is called the inverse cipher function; inverse de ce processus est appelé la fonction de chiffrement inverse; however, the CCM mode does not Cependant, le mode de CCM ne
require the inverse cipher function. exiger la fonction de chiffrement inverse.
The forward cipher function is a function on bit strings of a fixed bit length; La fonction de chiffrement est une fonction de l'avant sur ​​les chaînes de bits de longueur de bits fixe; the strings are called les cordes sont appelés
blocks, and their length is called the block size. blocs, et leur longueur est appelée la taille de bloc. For CCM, the block size of the block cipher Par CCM, la taille de bloc du bloc de chiffrement
algorithm shall be 128 bits; algorithme doit être 128 bits; currently, the AES algorithm is the only approved block cipher actuellement, l'algorithme AES est le chiffrement par bloc approuvé seulement
algorithm with this block size. cet algorithme avec la taille de bloc.
The CCM key, denoted K , is the block cipher key; La clé de la CCM, noté K, est la clé de chiffrement par bloc; the forward cipher function of the block la fonction de chiffrement avant du bloc
cipher with this key is denoted CIPH chiffrement avec cette clé est notée ICPC
K K
. . The bit length of K is denoted Klen . La longueur en bits de K est notée Klen.
5.2 Cryptographic Primitives 5.2 Primitives cryptographiques
The CCM specification essentially combines two cryptographic mechanisms that are based on La spécification CCM combine essentiellement deux mécanismes cryptographiques qui reposent sur
the forward cipher function. la fonction de chiffrement avant. One mechanism is the Counter (CTR) mode for confidentiality, Un mécanisme est le mode compteur (CTR) de la confidentialité,
which is specified for general use in the first Part of this Recommendation [6]. qui est spécifiée pour une utilisation générale dans la première partie de la recommandation [6]. The CTR mode Le mode CTR
requires the generation of a sufficiently long sequence of blocks called the counter blocks. nécessite la génération d'une séquence suffisamment longue de blocs appelés blocs les contre. The La
counter blocks must be distinct within a single invocation and across all other invocations of the blocs compteurs doivent être distincts dans un seul appel et dans tous les autres appels de la
CTR mode under any given key, but they need not be secret. Mode CTR en vertu d'une clé donnée, mais ils ne doivent pas être secret. This requirement on the counter Cette exigence sur le comptoir
blocks extends to the CCM mode. blocs s'étendent au mode CCM. See [6] for further discussion of the generation of counter Voir [6] pour plus de détails sur la génération de compteur
blocks; blocs; see Section 5.4 below for an additional requirement on the counter blocks in CCM. voir la section 5.4 ci-dessous pour une exigence supplémentaire sur les demandes reconventionnelles blocs CCM.
The other cryptographic mechanism within CCM is an adaptation of the cipher block chaining L'autre mécanisme cryptographique à l'intérieur de CCM est une adaptation du bloc de chaînage de chiffrement
(CBC) technique from [6] to provide assurance of authenticity. (CBC) technique de [6] pour fournir une assurance d'authenticité. Specifically, the CBC technique Plus précisément, la technique de Radio-Canada
with an initialization vector of zero is applied to the data to be authenticated; avec un vecteur d'initialisation de zéro est appliqué aux données à authentifier; the final block of le dernier bloc d'
the resulting CBC output, possibly truncated, serves as a message authentication code (MAC) of la sortie SRC résultant, éventuellement tronqué, sert de code d'authentification de message (MAC) de
the data. les données. The algorithm for generating a MAC in this fashion is commonly called CBC-MAC. L'algorithme pour générer un MAC de cette façon est communément appelé CBC-MAC.
This Recommendation does not approve CBC-MAC as an authentication mode outside of the Cette recommandation n'approuve pas CBC-MAC comme un mode d'authentification en dehors de la
context of the CCM specification; contexte de la spécification CCM; however, a variation of CBC-MAC is proposed for general Cependant, une variation de CBC-MAC est proposé pour le grand
use in the second Part of this Recommendation [7]. utiliser dans la deuxième partie de la recommandation [7].
The same key, K , is used for both the CTR and CBC-MAC mechanisms within CCM. La même clé, K, est utilisé à la fois pour les mécanismes CTR et CBC-MAC au sein du CCM.
5.3 Data Elements 5.3 Éléments de données
The data that CCM protects consists of a message, ie, a bit string, called the payload, denoted P , Les données qui protège CCM est constitué d'un message, à savoir une chaîne de bits, dite charge utile, notée P,
of bit length denoted Plen , and a bit string, called the associated data, denoted A . de longueur de bits désignée Plén, et une chaîne de bits, appelés les données associées, notée A. The associated L'associé
data is optional, ie, A may be the empty string. données est facultative, c'est-A peut être une chaîne vide.
** **
CCM provides assurance of the CCM fournit une assurance de la
confidentiality of P and assurance of the authenticity of the origin of both A and P ; confidentialité des P et l'assurance de l'authenticité de l'origine de A et P;
confidentiality is not provided for A . la confidentialité n'est pas prévu pour un.
A bit string called the nonce, denoted N , is assigned to the data pair to be protected, ie, the Une chaîne de bits appelé le nonce, notée N, est affectée à la paire de données à protéger, c'est à dire, le
∗ *
For the AES algorithm, the forward cipher is explicitly identified in [2]. Pour l'algorithme AES, le chiffre avant est explicitement identifié dans [2].
** **
The payload may also be empty, in which case the specification degenerates to an authentication mode on the La charge utile peut également être vide, dans ce cas, la spécification dégénère à un mode d'authentification sur l'
associated data. les données associées.
7 7

Page 14 Page 14
payload and its associated data. charge utile et ses données associées. The nonce shall be non-repeating in the sense that any two Le nonce est non répétitif dans le sens que deux quelconques
distinct data pairs to be protected by CCM during the lifetime of the key shall be assigned paires de données distinctes pour être protégés par CCM au cours de la durée de vie de la clé doit être affecté
distinct nonces. nonces distinctes. In effect, the nonce determines an invocation of CCM. En effet, le nonce détermine une invocation de la CCM. The nonce is not Le nonce n'est pas
required to be random. nécessaire pour être aléatoire.
The MAC that is generated within CCM is an internal variable, denoted T . Le MAC qui est généré au sein du CCM est une variable interne, noté T. The bit length of T , La longueur en bits de T,
denoted Tlen , is a parameter of the mode that shall be fixed for all invocations of CCM with the notée Tlen, est un paramètre de la mode qui est fixé pour tous les appels de CCM avec la
given key. clé donnée. The requirements for the selection of Tlen are discussed in Appendix B. Les exigences pour la sélection de Tlen sont présentées à l'annexe B.
5.4 Input Formatting 5.4 Entrée formatage
The CCM data elements N , P , and A shall be formatted into a non-empty sequence of complete Les éléments de données de CCM N, P, et A doivent être formatées en une séquence non vide de complet
data blocks, denoted B des blocs de données, noté 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 pour un entier non négatif r, conformément à une fonction
called the formatting function (in [8], the formatting function is called the encoding function, β ). appelé la fonction de mise en forme (en [8], la fonction de mise en forme est appelée fonction de codage, β).
The value of r depends on the formatting function and the input elements. La valeur de r dépend de la fonction de mise en forme et les éléments d'entrée. For any given key, the Pour une clé donnée, la
following three properties shall hold for the formatting function: après trois propriétés doit être titulaire de la fonction de mise en forme:
1. The first block, B Le premier bloc 1, B
B B
0 0
, uniquely determines the nonce N . , Détermine de façon unique le nonce N.
2. The formatted data uniquely determines P and A ; 2 Les données formatées détermine uniquement P et A; moreover, if ( N , P, A ) and ( N , P ', A ') De plus, si (N, P, A) et (N, P ', A')
are distinct input triples whose formatting is B sont triples d'entrée distinctes dont la mise en forme est B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
and B et B
0 0
B B
', B ', B
B B
1 1
', …, B », ..., B
r ' r '
B B
', then B », Puis B
B B
i Je
is est
distinct from B distincte de B
i Je
B B
' for some index i such that i ≤ r and i≤ r '. »Pour un indice i tel que i ≤ r et i≤ r '.
∗ *
3. The first block, B Le premier bloc 3, B
B B
0 0
, is distinct from any counter blocks that are used across all invocations , Est distinct de tous les blocs de comptage qui sont utilisés dans toutes les invocations
of CCM under the key. de CCM sous la clé.
The third property suggests that the formatting function and the counter generation function La troisième propriété suggère que la fonction de mise en forme et la fonction de génération de compteur
should not be selected or constructed independently of each other. ne doit pas être construit ou choisi indépendamment l'un de l'autre.
The formatting function may impose restrictions on the contents and the bit lengths of the input La fonction de mise en forme peut imposer des restrictions sur le contenu et les longueurs de bit de l'entrée
data N , P, and A , as well as the parameter Tlen . données de N, P, et A, ainsi que le paramètre Tlen. For example, the bit lengths may be restricted to Par exemple, les longueurs de bits peuvent être croisées
multiples of eight and to a given range of values. des multiples de huit et à une plage donnée de valeurs. Values that satisfy the restrictions of the Valeurs qui satisfont les restrictions de la
formatting function are called valid. fonction de formatage sont appelés valide. No value of Tlen smaller than 32 shall be valid. Aucune valeur de Tlen inférieur à 32 est valable.
An example of a formatting function and counter generation function that together satisfy these Un exemple de fonction de la fonction de mise en forme et la génération compteur qui satisfait en même temps ces
requirements is given in Appendix A. Alternative formatting functions may be developed in the exigences est donnée de fonctions de formatage Annexe A. alternatives peuvent être développées dans le
future. avenir.
5.5 Examples of Operations and Functions 5.5 Exemples d'opérations et fonctions
Given a positive integer s and a non-negative integer x that is less than 2 Etant donné un nombre entier positif et s un nombre entier non-négatif x qui est inférieur à 2
s s
, the binary , Le binaire
representation of x in s bits is denoted [ x ] représentation de s bits en x est notée [x]
s s
. . For example, for the (base 10) integer 45, the binary Par exemple, pour le (base 10) 45 entier, le binaire
representation (base 2) is 101101, so [45] représentation (base 2) est 101101, si [45]
8 8
= 00101101. = 00101101.
The concatenation operation on bit strings is denoted ||; L'opération de concaténation sur les chaînes de bits est notée ||; for example, 001 || 10111 = 00110111. par exemple, 001 || 10111 = 00110111.
∗ *
This property deals with the case that a nonce is repeated within two distinct input triples. Cette propriété porte sur le cas où un nonce est répété dans les deux triplets d'entrée distinctes. Although the legitimate Bien que la légitime
source/sender of the data is already required to assign distinct nonces to different input triples, the security model in source / de l'expéditeur des données est déjà nécessaire d'attribuer des nonces distinctes pour différents triplets d'entrée, le modèle de sécurité dans
[8] takes into account that the recipient of purported ciphertexts might not monitor whether a nonce is repeated. [8] prend en compte que le destinataire de messages chiffrés prétendus peut pas vérifier si un nonce est répété.
8 8

Page 15 Page 15
Given bit strings of equal length, the exclusive-OR operation, denoted ⊕, specifies the addition, Compte tenu des chaînes de bits de longueur égale, l'opération OU exclusif, noté ⊕, spécifie l'addition,
modulo 2, of the bits in each bit position, ie, without carries. modulo 2 des bits dans chaque position de bit, c'est à dire, sans porte. For example, 10011 ⊕ 10101 = Par exemple, 10 011 10 101 = ⊕
00110. 00110.
The functions LSB Les fonctions LSB
s s
and MSB et MSB
s s
return the s least significant (ie, right-most) bits and the s most renvoyer les s moins importantes (c.-à-la plus à droite) bits et les s les plus
significant (ie, left-most) bits of their arguments, respectively. importantes (c.-à-plus à gauche) bits de leurs arguments, respectivement. For example, LSB Par exemple, LSB
3 3
(111011010) (111011010)
= 010, and MSB = 010, et MSB
4 4
(111011010) = 1110. (111011010) = 1110.
Given a positive real number x , the base 2 logarithm x is denoted lg(x). Lg donné un nombre réel positif x, le logarithme en base 2 x est notée (x). For example, lg(2 Par exemple, lg (2
10 10
)=10. ) = 10.
6 CCM Specification 6 CCM Spécifications
The two CCM processes are called generation-encryption and decryption-verification. Les deux processus de CCM sont appelés génération cryptage et le décryptage de vérification. The La
prerequisites, inputs, outputs, steps, and summaries for the execution of the two CCM processes préalables, entrées, sorties, marches, et des résumés pour l'exécution des deux processus de CCM
are specified in Sections 6.1 and 6.2 below. sont précisées dans les sections 6.1 et 6.2 ci-dessous. The prerequisites are inputs that are typically fixed Les conditions préalables sont entrées qui sont généralement fixés
across many invocations of CCM. dans de nombreux appels de CCM. The prerequisites and inputs shall meet the requirements in Les conditions préalables et les entrées doivent satisfaire aux exigences de
Section 5. Section 5.
There is some flexibility in the order of the steps of the two processes. Il existe une certaine flexibilité dans l'ordre des étapes des deux processus. For example, the Par exemple, l'
generation of the counter blocks can occur at any time before they are used; génération des blocs compteur peut se produire à tout moment avant qu'ils ne soient utilisés; in fact, the counter en fait, le compteur
blocks may be generated in advance and be considered as inputs to the processes. blocs peuvent être générés à l'avance et être considérés comme des contributions aux processus.
6.1 Generation-Encryption Process 6.1 Processus Generation-Encryption
The following is a specification of the generation-encryption process of CCM: Ce qui suit est une description du processus de génération-cryptage de CCM:
Prerequisites: Pré-requis:
block cipher algorithm; bloquer algorithme de chiffrement;
key K ; clé K;
counter generation function; la fonction de génération de compteur;
formatting function; la fonction de mise en forme;
MAC length Tlen . Longueur MAC Tlen.
Input : Entrée:
valid nonce N ; nonce N valide;
valid payload P of length Plen bits; valable charge P de longueur de bits Plen;
valid associated data A ; Un valide les données associées;
Output : Sortie:
ciphertext C. texte chiffré C.
Steps : Étapes:
1. 1.
Apply the formatting function to ( N , A , P ) to produce the blocks B Appliquer la fonction de formatage de (N, A, P) pour produire les blocs B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
. .
2. 2.
Set Y Réglez Y
0 0
= CIPH = ICPC
K K
( B (B
B B
0 0
). ).
3. 3.
For i = 1 to r , do Y Pour i = 1 à r, fais Y
i Je
= CIPH = ICPC
K K
( B (B
B B
i Je
⊕ Y ⊕ Y
i -1 i-1
). ).
9 9

Page 16 Page 16
4. 4.
Set T =MSB Réglez T = MSB
Tlen Tlen
( Y (Y
r r
). ).
5. 5.
Apply the counter generation function to generate the counter blocks Ctr Appliquer la fonction de génération de compteur pour générer les blocs de contre Ctr
0 0
, Ctr , Ctr
1 1
, ,
…, Ctr ..., Ctr
m m
, where Où
⎡ ⎡
⎤ ⎤
128 128
Plen Plen
m = m =
. .
6. 6.
For j =0 to m , do S Pour j = 0 à m, faire S
j j
= CIPH = ICPC
K K
( Ctr (Ctr
j j
). ).
7. 7.
Set S= S Réglez S = S
1 1
|| S || S
2 2
|| …|| S || ... || S
m m
. .
8. 8.
Return C =( P ⊕ MSB Retour 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 Les données d'entrée pour le processus génération de chiffrement sont un nonce valide, une chaîne de charge utile en cours de validité, et
a valid associated data string, which are formatted according to the formatting function. une chaîne valide associé de données, qui sont formatées en fonction de la fonction de formatage. The La
CBC-MAC mechanism is applied to the formatted data to generate a MAC, whose length is a Mécanisme CBC-MAC est appliquée sur les données mises en forme afin de générer un MAC, dont la longueur est un
prerequisite. préalable. Counter mode encryption, which requires a sufficiently long sequence of counter cryptage du mode de comptage, ce qui nécessite une assez longue séquence de compteur
blocks as input, is applied to the payload string and separately to the MAC. blocs en entrée, est appliqué à la chaîne de charge utile et séparément à la MAC. The resulting data, Les données ainsi obtenues,
called the ciphertext, denoted C , is the output of the generation-encryption process. appelé le texte chiffré, noté C, est la sortie du processus de génération de chiffrement.
6.2 Decryption-Verification Process Processus 6.2 Décryptage-vérification
Prerequisites : Pré-requis:
block cipher algorithm; bloquer algorithme de chiffrement;
key K ; clé K;
counter generation function; la fonction de génération de compteur;
formatting function; la fonction de mise en forme;
valid MAC length Tlen . valable longueur MAC Tlen.
Input : Entrée:
nonce N ; nonce N;
associated data A ; données associées A;
purported ciphertext C of length Clen bits; prétendue texte chiffré C de longueur de bits Clen;
Output : Sortie:
either the payload P or INVALID . soit la charge P ou invalides.
Steps : Étapes:
1. 1.
If Clen ≤ Tlen , then return INVALID. Si Clen ≤ Tlen, puis revenez VALIDE.
2. 2.
Apply the counter generation function to generate the counter blocks Ctr Appliquer la fonction de génération de compteur pour générer les blocs de contre Ctr
0 0
, Ctr , Ctr
1 1
, ,
…, Ctr ..., Ctr
m m
, where Où
⎡ ⎡
⎤ ⎤
128 128
) )
( (
Tlen Tlen
Clen Clen
m m
− -
= =
. .
3. 3.
For j =0 to m , do S Pour j = 0 à m, faire S
j j
= CIPH = ICPC
K K
( Ctr (Ctr
j j
). ).
4. 4.
Set S= S Réglez S = S
1 1
|| S || S
2 2
|| …|| S || ... || S
m m
. .
5. 5.
Set P =MSB Réglez P = MSB
Clen - Tlen Clen - Tlen
( C ) ⊕ MSB (C) ⊕ MSB
Clen - Tlen Clen - Tlen
( S ). (S).
6. 6.
Set T =LSB Réglez 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 Si N, A ou P n'est pas valide, tel que discuté à la section 5.4, puis revenez INVALID, d'autre
apply the formatting function to ( N , A , P ) to produce the blocks B appliquer la fonction de mise en forme de (N, A, P) pour produire les blocs B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
. .
8. 8.
Set Y Réglez Y
0 0
= CIPH = ICPC
K K
( B (B
B B
0 0
). ).
9. 9.
For i = 1 to r , do Y Pour i = 1 à r, fais Y
j j
= CIPH = ICPC
K K
( B (B
B B
i Je
⊕ Y ⊕ Y
i -1 i-1
). ).
10. 10.
If T ≠ MSB Si T ≠ MSB
Tlen Tlen
( Y (Y
r r
), then return INVALID, else return P . ), Puis retour VALIDE, sinon retour P.
10 10

Page 17 Page 17
The input to the decryption-verification process is a purported ciphertext, an associated data L'entrée dans le processus de décryptage de vérification est un texte chiffré supposé, une donnée associée
string, and the nonce that was purportedly used in the generation of the purported ciphertext. corde, et le nonce qui a été soi-disant utilisé dans la génération du cryptogramme prétendue.
Counter mode decryption is applied to the purported ciphertext to produce the corresponding le mode de comptage est appliqué au décryptage du texte chiffré pour produire le prétendu correspondant
MAC and payload. MAC et la charge utile. If the nonce, the associated data string, and the payload are valid, as Si la nonce, la chaîne de données associée, et la charge utile sont valables, en tant que
discussed in Section 5.4, then these strings are formatted into blocks according to the formatting discuté à la section 5.4, alors ces chaînes sont formatées en blocs selon la mise en forme
function, and the CBC-MAC mechanism is applied to verify the MAC. fonction, et le mécanisme CBC-MAC est utilisée pour vérifier les MAC. If verification succeeds, Si la vérification réussit,
the decryption-verification process returns the payload as output; le processus de déchiffrement de vérification renvoie la charge utile en tant que sortie; otherwise, only the error sinon, seul le message d'erreur
message INVALID is returned. Message non valide est renvoyé.
When the error message INVALID is returned, the payload P and the MAC T shall not be Lorsque le message d'erreur INVALID est retourné, la charge utile P et le MAC T ne doit pas être
revealed. révélé. Moreover, the implementation shall ensure that an unauthorized party cannot En outre, la mise en œuvre doit s'assurer qu'un tiers non autorisé ne peut pas
distinguish whether the error message results from Step 7 or from Step 10, for example, from the distinguer si le message d'erreur résultant de l'étape 7 ou à partir de l'étape 10, par exemple, à partir de la
timing of the error message. synchronisation du message d'erreur.
11 11

Page 18 Page 18
Appendix A: Example of a Formatting and Counter Generation Function Annexe A: Exemple d'une fonction de mise en forme et la lutte contre Generation
In this appendix, a formatting function for the input data and a counter generation function are Dans cette annexe, une fonction de mise en forme pour les données d'entrée et une fonction de génération de compteur sont
specified that together satisfy the requirements of Section 5.4. précisé que, ensemble, satisfont les exigences de l'article 5.4. With these functions, this Grâce à ces fonctions, ce
specification of CCM is essentially equivalent to the specification of CCM in the draft spécification de CCM est essentiellement équivalente à la spécification de CCM dans le projet
amendment [4] to the IEEE Standard 802.11 for wireless local area networks [5]. amendement [4] à la norme IEEE 802.11 pour les réseaux locaux sans fil [5].
The requirements that this particular formatting function imposes on the lengths of the variables Les exigences que cette fonction de mise en forme particulière impose aux longueurs des variables
in CCM are given in Section A.1; au sein du CCM sont donnés dans la section A.1; the formatting of the input data is specified in Section A.2; la mise en forme des données d'entrée est spécifiée dans la section A.2; the la
counter generation function is specified in Section A.3. fonction de génération de compteur est spécifié dans la section A.3.
A.1 A.1
Length Requirements Longueur requise
The bit length of each input string, ie, N , A , and P , shall be a multiple of 8 bits, ie, each input La longueur en bits de chaque chaîne d'entrée, c'est-à-N, A et P, doit être un multiple de 8 bits, c'est à dire, chaque entrée
string shall be an octet string. chaîne est une chaîne d'octets. The octet lengths of these strings are denoted n , a , and p ; Les longueurs de ces chaînes d'octets sont notés n, a, et p; thus, n , a Ainsi, n, a
and p are integers. et p sont des nombres entiers. Similarly, the parameter t denotes the octet length of T . De même, le paramètre t représente la longueur d'octet de T. The octet length of P La longueur de l'octet de P
(ie, the integer p ) is represented within the first block of the formatted data as an octet string (C'est à dire, l'entier p) est représenté dans le premier bloc des données formatées comme une chaîne d'octets
denoted Q . Q notée. The octet length of Q , denoted q , is a parameter of the formatting function. La longueur de l'octet de Q, noté Q, est un paramètre de la fonction de mise en forme. Thus, Q is Ainsi, Q est
equivalent to [ p ] équivalent à [p]
8 q 8 q
, the binary representation of p in q octets. , La représentation binaire de p à q octets. For example, if q = 3 and P is a Par exemple, si q = 3 et p est un
string that consists of 4096 bits, ie, p = 512, then Q is the string 00000000 00000010 00000000. chaîne qui se compose de 4096 bits, soit p = 512, Q est la chaîne 00000000 00000010 00000000.
The formatting in this appendix imposes the following length conditions: La mise en forme de cette annexe impose les conditions de longueur suivantes:
• t is an element of • t est un élément de
{ {
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 est un élément de {2, 3, 4, 5, 6, 7, 8};
• n is an element of {7, 8, 9, 10, 11, 12, 13} • n est un élément de {7, 8, 9, 10, 11, 12, 13}
• n + q =15; • n + q = 15;
• a <2 • un <2
64 64
. .
The parameter q determines the maximum length of the payload: by definition, p <2 Le paramètre q détermine la longueur maximale de la charge utile: par définition, p <2
8 q 8 q
, so P , De sorte que P
consists of fewer than 2 se compose de moins de 2
8 q 8 q
octets, ie, fewer than 2 octets, soit moins de 2
8 q -4 8 q -4
128-bit blocks. Blocs de 128 bits. The fourth condition La quatrième condition
implies that a choice for q determines the value of n , namely, n =15- q . qui implique un choix de q détermine la valeur de n, à savoir n = 15 q. (Equivalently, the nonce (Équivalente, le nonce
length, n , may be considered as the parameter of the formatting function that determines the longueur, n, peut être considérée comme le paramètre de la fonction de mise en forme qui détermine l'
value of q .) The value of n , in turn, determines the maximum number of distinct nonces, namely, La valeur de q.) La valeur de n, à son tour, détermine le nombre maximum de nonces distinctes, à savoir,
2 2
8 n 8 n
. . Thus, the fourth condition amounts to a tradeoff between the maximum number of Ainsi, la quatrième condition équivaut à un compromis entre le nombre maximal d'
invocations of CCM under a given key and the maximum payload length for those invocations. invocations de CCM sous une clé donnée et la longueur utile maximale pour les invocations.
A.2 A.2
Formatting of the Input Data Formatage des données d'entrée
The formatting of the input data ( N , A , P ) into a sequence of blocks B Le formatage des données d'entrée (N, A, P) en une séquence de blocs B
B B
0 0
, B , B
1 1
B B
, …, B , ..., B
B B
r r
is presented in est présenté dans
the following three sections: in Section A.2.1, the formatting of the nonce and control les trois sections suivantes: la section A.2.1, la mise en forme du nonce et de contrôle
information such as length indicators is specified; des informations telles que des indicateurs de longueur est spécifiée; in Section A.2.2, the formatting of A is dans la section A.2.2, la mise en forme de A est
specified; spécifié; in Section A.2.3, the formatting of P is specified. dans la section A.2.3, la mise en forme de P est spécifié.
12 12

Page 19 Page 19
A.2.1 A.2.1
Formatting of the Control Information and the Nonce Mise en forme à l'information de contrôle et le Nonce
The leading octet of the first block of the formatting, B Le premier octet du premier bloc de la mise en forme, B
B B
0 0
, contains four flags for control , Contient quatre drapeaux de contrôle
information: two single bits, called Reserved and Adata , and two strings of three bits, to encode informations: deux bits simples, appelés réservés et Adata, et deux chaînes de trois bits, à coder
the values t and q . les valeurs de t et q. The encoding of t is [( t -2)/2] Le codage de t est [(t-2) / 2]
3 3
, and the encoding of q is [ q -1] Et le codage de q est [q -1]
3 3
. . Thus, for Ainsi, par
example, if the MAC length is 8 octets, then t is encoded as 011. Note that the encoding 000 in Par exemple, si la longueur est de 8 octets MAC, alors t est codé comme 011 est à noter que le codage dans 000
both cases does not correspond to a permitted value of t or q . les deux cas ne correspond pas à une valeur permise de t ou q. The Reserved bit is reserved to Le bit est réservé réservés à
enable future extensions of the formatting; activer les extensions futures de la mise en forme; it shall be set to '0'. il doit être mis à «0». The Adata bit is '0' if a =0 and Le bit Adata est «0» si a = 0 et
'1' if a >0. "1" si a> 0. The ordering of the flags within the octet is given in Table 1. L'ordre des pavillons de l'octet est donnée dans le tableau 1.
Table 1: Formatting of the Flags Octet in B Tableau 1: Mise en forme de l'Octuor de drapeaux dans B
B B
0 0
Bit number nombre de bits
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
Contents Contenu
Reserved Adata Adata Réservé
[( 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 Les 15 octets restants de la première séquence de la mise en forme sont consacrés à la nonce et le
binary representation of the message length in q octets, as given in Table 2. la représentation binaire de la longueur du message en q octets, telle que donnée dans le tableau 2.
Table 2: Formatting of B Tableau 2: Mise en forme de B
B B
0 0
Octet number nombre d'octets
0 0
1 ... 15- q 1 ... 15 q
16- q ... 15 16 q ... 15
Contents Contenu
Flags Drapeaux
N N
Q Q
For example, if B Par exemple, si B
B B
0 0
is est
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). • Les données associées ne sera pas vide (parce Adata = 1).
• The MAC will consist of 12 octets (because [( t -2)/2] • Le MAC se compose de 12 octets (parce que [(t -2) / 2]
3 3
=101). = 101).
• The octet length of Q is 7 (because [ q -1] • La longueur de l'octet de Q est de 7 (parce que [q -1]
3 3
=110), so Q is 00000000 000000000 00000000 = 110), alors Q est 00000000 000000000 00000000
00000000 00000000 01000100 00000001. 00000000 00000000 01000100 00000001.
• The payload will consist of 17,409 octets (because Q =[17409] • La charge utile se compose de 17 409 octets (car Q = [17409]
56 56
). ).
• The octet length of N is 8 (because n =15- q and q =7), so N =00010011 11010100 • La longueur de l'octet de N est de 8 (car n = 15 q et q = 7), de sorte que 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 Mise en forme des données associées
If a =0, as indicated by the Adata field in the first octet of B Si a = 0, comme indiqué par le champ Adata dans le premier octet de B
B B
0 0
, then there are no blocks devoted to , Alors il n'y a pas de blocs consacrés à
the associated data in the formatted data. les données associées dans les données formatées. If a >0, then a is encoded as described below, and the Si a> 0, alors A est codée de la manière décrite ci-dessous, et l'
encoding of a is concatenated with the associated data A , followed by the minimum number of codage d'un est concaténé avec les données A associé, suivi par le nombre minimum d'
'0' bits, possibly none, such that the resulting string can be partitioned into 16-octet blocks. "0" bits, éventuellement nul, de sorte que la chaîne résultante peut être divisée en blocs de 16 octets.
These blocks are denoted in the formatted data as B Ces blocs sont indiqués dans les données formatées que B
1 1
B B
, B , B
B B
2 2
, … B , ... B
u u
B B
for some positive integer u that pour certains u entier positif
depends on a . dépend d'un.
The value a is encoded according to the following three cases: La valeur a est codée selon les trois cas suivants:
13 13

Page 20 Page 20
• If 0 < a < 2 • Si 0 <a <2
16 16
-2 -2
8 8
, then a is encoded as [ a ] , Puis un est codé comme [un]
16 16
, ie, two octets. , C'est à dire, deux octets.
• If 2 • Si 2
16 16
-2 -2
8 8
≤ a < 2 ≤ a <2
32 32
, then a is encoded as 0xff || 0xfe || [ a ] , Puis un est codé comme 0xff || 0xfe || [un]
32 32
, ie, six octets. , Soit six octets.
• If 2 • Si 2
32 32
≤ a < 2 ≤ a <2
64 64
, then a is encoded as 0xff || 0xff || [ a ] , Puis un est codé comme 0xff || 0xff || [un]
64, 64,
ie, ten octets. c'est-à-dix octets.
For example, if a =2 Par exemple, si a = 2
16 16
, the encoding of a is 11111111 11111110 00000000 00000001 00000000 , Le codage d'un est 11111111 11111110 00000000 00000001 00000000
00000000. 00000000.
The formatting of distinct sets of associated data will not overlap, because for distinct values of La mise en forme des ensembles distincts de données associées ne chevauchera pas, parce que, pour des valeurs distinctes de
a , the leading bits of the encodings of a are distinct: in the first case, the first octet will not be un, les principaux morceaux de l'encodage d'un sont distinctes: dans le premier cas, le premier octet ne sera pas
0xff as it will for the second and third cases; 0xFF comme il le sera pour les deuxième et troisième cas; the second and third cases can be distinguished by les deuxième et troisième cas peuvent être distingués par
the second octet. le deuxième octet. Encodings that are not specified in these three cases are reserved, eg, when Codages qui ne sont pas spécifiés dans ces trois cas sont réservés, par exemple, lorsque
the first two octets are 0x0000, 0xff00, 0xff01, etc. les deux premiers octets sont 0x0000, 0xFF00, 0xff01, etc
A.2.3 A.2.3
Formatting of the Payload Mise en forme de la charge utile
The associated data blocks, if any, are followed in the sequence of formatted blocks by the Les blocs de données associés, le cas échéant, sont suivies dans la séquence de blocs en forme par l'
payload blocks. blocs de charge utile. The payload is concatenated with the minimum number of '0' bits, possibly La charge utile est concaténé avec le nombre minimum de bits "0", le cas échéant
none, such that the result can be partitioned into 16-octet blocks. à défaut, de telle sorte que le résultat peut être partitionnée en blocs de 16 octets. These blocks are denoted in the Ces blocs sont annotées dans le
formatted data as B données formatées que B
B B
u +1 u 1
, B , B
B B
u +2 u 2
… B B ...
B B
r r
, where r = u + , Où r = u +
⎡ ⎡
⎤ ⎤
16 16
p p
. .
A.3 A.3
Formatting of the Counter Blocks Mise en forme des blocs compteur
The counter generation function in this section is equivalent to a formatting of the counter index i
into a complete data block. The counter blocks Ctr
i Je
are formatted as shown in Table 3 below.
Table 3: Formatting of Ctr
i Je
Octet number:
0 0
1 ... 15- q
16- q ... 15
Contents: Contenu:
Flags
N N
[ i ]
8q
Within each block Ctr
i Je
, the Flags field is formatted as shown in Table 4 below.
Table 4: Formatting of the Flags Field in Ctr
i Je
Bit number
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
Contents Contenu
Reserved
Reserved
0 0
0 0
0 0
[ 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 Page 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 Lorsque l'
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. pratique.
15 15

Page 22 Page 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. 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 La
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 Pour
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(
Risk Risque
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
). ). In this case, Tlen may
be as low as 32. On the other hand, if MaxErrs =2
32 32
and Risk= 2
-32
, then Tlen should be at least
64. 64.
16 16

Page 23 Page 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
In the following example, Klen = 128, Tlen =32, Nlen = 56, Alen = 64, and Plen = 32.
K :
40414243 44454647 48494a4b 4c4d4e4f
N :
10111213 141516
A :
00010203 04050607
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 :
7162015b 4dac255d
C.2
Example 2 Exemple 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 :
00010203 04050607 08090a0b 0c0d0e0f
P :
20212223 24252627 28292a2b 2c2d2e2f
17 17

Page 24 Page 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 :
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 :
00010203 04050607 08090a0b 0c0d0e0f
10111213
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 :
e3b201a9 f5b71a7a 9b1ceaec cd97e70b
18 18

Page 25 Page 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 :
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 :
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 Page 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 :
69915dad 1e84c637 6a68c296 7e4dab61
5ae0fd1f aec44cc4 84828529 463ccf72
b4ac6bec 93e8598e 7f0dadbc ea5b
20 20

Page 27 Page 27
Appendix D: References
[1] [1]
D. Whiting, R. Housley, N. Ferguson, Counter with CBC-MAC (CCM) . Available at Disponible à
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] [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
Operation – Methods 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]
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