FR2924550A1 - METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY. - Google Patents

METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY. Download PDF

Info

Publication number
FR2924550A1
FR2924550A1 FR0759464A FR0759464A FR2924550A1 FR 2924550 A1 FR2924550 A1 FR 2924550A1 FR 0759464 A FR0759464 A FR 0759464A FR 0759464 A FR0759464 A FR 0759464A FR 2924550 A1 FR2924550 A1 FR 2924550A1
Authority
FR
France
Prior art keywords
data
diversified
key
random
kdiv
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
FR0759464A
Other languages
French (fr)
Inventor
Pascal Manet
Olivier Faurax
Jean Baptiste Rigaud
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ENSMSE
Commissariat a lEnergie Atomique et aux Energies Alternatives CEA
Original Assignee
ENSMSE
Commissariat a lEnergie Atomique CEA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ENSMSE, Commissariat a lEnergie Atomique CEA filed Critical ENSMSE
Priority to FR0759464A priority Critical patent/FR2924550A1/en
Priority to PCT/EP2008/066454 priority patent/WO2009068658A1/en
Publication of FR2924550A1 publication Critical patent/FR2924550A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

Procédé de cryptage d'un message de données S comportant au moins une étape de calcul (102) d'au moins une clé aléatoire Kal,0 à partir d'au moins un nombre aléatoire Nbal et d'au moins une clé secrète Ksecret, et un chiffrement (105) des données S à partir de la clé aléatoire Kal,O et d'une pluralité de clés aléatoires diversifiées Kal,1 à Kal,N calculées à partir de la clé aléatoire Kal,0.A method of encrypting a data message S comprising at least one calculation step (102) of at least one random key Kal, 0 from at least one random number Nbal and at least one secret key Ksecret, and encrypting (105) the data S from the random key Kal, O and a plurality of diversified random keys Kal, 1 to Kal, N calculated from the random key Kal, 0.

Description

PROCEDES ET DISPOSITIFS DE CRYPTAGE ET DE DECRYPTAGE D'UN MESSAGE DE DONNEES A CLE SECRETE ALEATOIRE METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY

DESCRIPTION 5 DOMAINE TECHNIQUE L'invention concerne le domaine de la cryptographie de données à clé secrète. L'invention peut notamment être utilisée dans tout type de processeur de traitement de l'information, par exemple 10 une carte à puce. ÉTAT DE LA TECHNIQUE ANTÉRIEURE Des algorithmes de cryptage sont utilisés dans des processeurs de traitement de l'information par exemple pour protéger des informations confidentielles 15 (dossier médical), pour autoriser l'accès à des services particuliers (télévision à péage) ou encore pour permettre d'identifier les personnes (passeport électronique). Ces processeurs font l'objet de manipulations frauduleuses, appelées communément 20 attaques, pour obtenir les clefs utilisées par les algorithmes de cryptage, pour connaître et/ou corrompre les informations confidentielles, pour accéder gratuitement à des services ou encore pour se faire passer pour un tiers. 25 Pour réaliser un cryptage des données, il est connu d'utiliser un algorithme appelé AES ( Advanced Encryption Standard ). La figure 1 représente schématiquement les étapes de codage de données mises en oeuvre par un algorithme AES. TECHNICAL FIELD The invention relates to the field of secret key data cryptography. The invention may especially be used in any type of information processing processor, for example a smart card. STATE OF THE PRIOR ART Encryption algorithms are used in information processing processors for example to protect confidential information (medical file), to authorize access to particular services (pay television) or to identify people (ePassport). These processors are the subject of fraudulent manipulation, commonly called 20 attacks, to obtain the keys used by the encryption algorithms, to know and / or corrupt confidential information, to access services for free or to pose as a third. To perform data encryption, it is known to use an algorithm called AES (Advanced Encryption Standard). FIG. 1 schematically represents the data coding steps implemented by an AES algorithm.

Les données à crypter sont tout d'abord coupées en blocs de 128 bits, représentés sous forme d'une matrice 4 X 4 (référence 2 sur la figure 1) de mots de 8 bits. The data to be encrypted are first cut into blocks of 128 bits, represented as a 4 × 4 matrix (reference 2 in FIG. 1) of 8-bit words.

L'algorithme AES utilise une clé secrète 4 dont la taille peut être égale à 128 bits, 192 bits ou encore 256 bits. Sur l'exemple de la figure 1, la clé 4 comporte 128 bits représentés sous la forme d'une matrice de taille 4 X 4. The AES algorithm uses a secret key 4 whose size can be equal to 128 bits, 192 bits or even 256 bits. In the example of Figure 1, the key 4 comprises 128 bits represented in the form of a matrix size 4 X 4.

Lors de ce codage, l'algorithme exécute plusieurs ensembles d'étapes, appelés rondes, dont le nombre Nr dépend de la taille de la clé utilisée (Nr = 10 pour une clé de 128 bits, Nr = 12 pour une clé de 192 bits et Nr = 14 pour une clé de 256 bits). During this coding, the algorithm executes several sets of steps, called rounds, whose number Nr depends on the size of the key used (Nr = 10 for a key of 128 bits, Nr = 12 for a key of 192 bits and Nr = 14 for a 256-bit key).

Quelque soit la taille de la clé utilisée, l'algorithme réalise une ronde initiale consistant en une étape d'addition 6 d'une clé de ronde, qui est la clé secrète 4, avec des données 2. Cette étape d'addition 6 est appelée AddRoundKey et est réalisée par un OU Exclusif. Ensuite, on exécute (Nr-1) rondes réalisant les quatre fonctions suivantes : - SubBytes (étape 8 sur la figure 1) . chaque mot de la matrice de données obtenue à l'étape précédente est remplacé par un autre mot de taille similaire donné par un tableau de correspondance. Il s'agit d'une transformation non linéaire. - ShiftRows (étape 10 sur la figure 1) : il s'agit d'une transposition décalant cycliquement les mots des lignes de la matrice de données obtenue en sortie de SubBytes . Les mots des lignes de la matrice sont décalés suivant un décalage circulaire à gauche, le nombre de cases du décalage dépendant de la ligne : les mots de la première ligne de la matrice ne sont pas décalés, les mots de la seconde ligne sont décalés d'une case vers la gauche, les mots de la troisième ligne sont décalés de deux cases vers la gauche et les mots de la quatrième ligne sont décalés de trois cases vers la gauche. - MixColumns (étape 12 sur la figure 1) : il s'agit d'une multiplication matricielle entre une matrice constante et la matrice de données obtenue en sortie de ShiftRows . - AddRoundKey (étape 14 sur la figure 1) : il s'agit d'une addition (OU Exclusif) entre la matrice de données obtenue en sortie de MixColumns et une clé diversifiée 16, ou clé de ronde, obtenue après une opération de diversification de la clé de ronde précédente, appelée KeySchedule et réalisée à chaque ronde. Whatever the size of the key used, the algorithm performs an initial round consisting of a step 6 of adding a round key, which is the secret key 4, with data 2. This addition step 6 is called AddRoundKey and is performed by an Exclusive OR. Then, we run (Nr-1) rounds performing the following four functions: - SubBytes (step 8 in Figure 1). each word of the data matrix obtained in the preceding step is replaced by another word of similar size given by a correspondence table. It is a non-linear transformation. ShiftRows (step 10 in FIG. 1): this is a transposition that cyclically shifts the words of the lines of the data matrix obtained at the output of SubBytes. The words of the rows of the matrix are shifted with a left circular shift, the number of squares of the shift depending on the line: the words of the first line of the matrix are not shifted, the words of the second line are shifted by a box to the left, the words of the third line are shifted two boxes to the left and the words of the fourth line are shifted three squares to the left. MixColumns (step 12 in FIG. 1): this is a matrix multiplication between a constant matrix and the data matrix obtained at the output of ShiftRows. AddRoundKey (step 14 in FIG. 1): this is an addition (exclusive OR) between the data matrix obtained at the output of MixColumns and a diversified key 16, or round key, obtained after a diversification operation of the previous round key, called KeySchedule and performed at each round.

La fonction KeySchedule réalise une opération de diversification à partir d'une clé qui est soit la clé secrète 4 après la ronde initiale, soit une (i-1) ème clé de ronde 16 lorsque l'on exécute la ième ronde, avec i nombre entier naturel compris entre 2 et (N,-1). Après avoir répété (N,-1) fois ces fonctions, l'algorithme réalise une dernière ronde finale (l0eme ronde dans le cas d'une clé secrète 4 de 128 bits) consistant en la mise en oeuvre d'une fonction SubBytes (référence 18 sur la figure 1), d'une fonction ShiftRows (référence 20 sur la figure 1) et d'une fonction AddRoundKey (référence 22 sur la figure 1). On obtient en sortie de la fonction 22 une matrice 24, de taille égale à 4 X 4 de mots de taille similaire aux mots de la matrice 2, des données cryptées. Le décryptage de ces données peut ensuite être réalisé à partir des données codées en réalisant des fonctions inverses par rapport à celles réalisées pour le cryptage. La connaissance de la clé secrète est donc nécessaire pour réaliser le décryptage des données. Diverses solutions, appelées contre-mesures, ont été proposées pour rendre inopérants différents types d'attaques sur un tel algorithme. Par exemple, pour contrer les attaques de type à canaux cachés, il est connu d'ajouter du bruit artificiellement sur les signaux émis par la puce, leur corrélation avec les données manipulées étant ainsi réduite. Des contre-mesures logicielles ad hoc sont également introduites pour complexifier l'analyse des différents signaux extraits. Contre les attaques en faute, des techniques de détection et de correction d'erreurs ainsi que de la redondance des données sont également connues. Des contre-mesures physiques, se trouvant sur le composant électronique implémentant l'algorithme, permettant de se prémunir contre les attaques invasives ou par fautes sont également connues. Ces contre-mesures physiques, par exemple des capteurs de lumière, sont capables de détecter un fonctionnement anormal de la puce. En cas d'intrusion ou d'injection de fautes, différentes actions peuvent être prises allant d'une simple réinitialisation de la puce jusqu'à un effacement partiel ou intégral de toutes les informations stockées dans les mémoires de la puce. Des dispositifs plus spécifiques à la protection du circuit contre une phase d'ingénierie inverse peuvent également être intégrés (bouclier métallique, lignes fictives etc.). Toutefois, ces solutions impliquent généralement des surcoûts importants à la fois au niveau matériel (nombreuses fonctions logiques supplémentaires nécessaires à la mise en oeuvre du cryptage et du décryptage) et au niveau du temps d'exécution de l'algorithme, à la fois pour le cryptage et pour le décryptage. EXPOSÉ DE L'INVENTION Un but de la présente invention est de proposer un nouveau procédé et un nouveau dispositif de cryptage/décryptage offrant une meilleure protection des données, rendant inefficaces des attaques telles que celles réalisées sur un algorithme AES, et n'impliquant pas ou peu de surcoûts au niveau matériel et du temps d'exécution par rapport aux contre-mesures de l'art antérieur. The KeySchedule function performs a diversification operation from a key that is either the secret key 4 after the initial round, or an (i-1) th round key 16 when executing the ith round, with i number natural integer between 2 and (N, -1). After having repeated (N, -1) times these functions, the algorithm carries out a final final round (10th round in the case of a secret key 4 of 128 bits) consisting of the implementation of a function SubBytes (reference 18 in FIG. 1), a ShiftRows function (reference 20 in FIG. 1) and an AddRoundKey function (reference 22 in FIG. 1). At the output of the function 22 is obtained a matrix 24, of size equal to 4 × 4 of words of a size similar to the words of the matrix 2, encrypted data. The decryption of these data can then be performed from the coded data by performing functions that are opposite to those performed for encryption. Knowledge of the secret key is therefore necessary to achieve the decryption of the data. Various solutions, called countermeasures, have been proposed to render inoperative different types of attacks on such an algorithm. For example, to counter hidden channel type attacks, it is known to artificially add noise to the signals emitted by the chip, thus reducing their correlation with the manipulated data. Ad hoc software countermeasures are also introduced to make the analysis of the various extracted signals more complex. Against fault attacks, error detection and correction techniques as well as data redundancy are also known. Physical countermeasures, found on the electronic component implementing the algorithm, to guard against invasive attacks or faults are also known. These physical countermeasures, for example light sensors, are capable of detecting abnormal operation of the chip. In case of intrusion or injection of faults, various actions can be taken ranging from a simple reset of the chip to a partial or full erasure of all the information stored in the memories of the chip. Devices more specific to the protection of the circuit against a reverse engineering phase can also be integrated (metal shield, dummy lines, etc.). However, these solutions generally involve significant extra costs both at the hardware level (many additional logical functions necessary for the implementation of encryption and decryption) and at the time of execution of the algorithm, both for the encryption and decryption. DISCLOSURE OF THE INVENTION An object of the present invention is to propose a new method and a new encryption / decryption device offering better data protection, rendering ineffective attacks such as those carried out on an AES algorithm, and not involving or little material and overhead cost over the countermeasures of the prior art.

Pour cela, la présente invention propose un procédé de cryptage d'un message de données S comportant au moins une étape de calcul d'au moins une clé aléatoire Kat, o à partir d'au moins un nombre aléatoire Nbal et d'au moins une clé secrète Ksecret et un chiffrement des données S à partir de la clé aléatoire Kai,o et d'une pluralité de clés aléatoires diversifiées Kat, 1 à Ka1,N calculées à partir de la clé aléatoire Kat, o avec, par exemple, au moins une étape non linéaire. En ajoutant à la clé secrète Ksecret un nombre, ou une variable, aléatoire Nba1r toutes les informations sont chiffrées avec une clé différente, ce qui rend inefficace les attaques connues de l'art antérieur. Ce procédé permet donc d'améliorer la sécurité du dispositif électronique dans lequel est implanté ce procédé. For this purpose, the present invention proposes a method of encrypting a data message S comprising at least one step of calculating at least one random key Kat, o from at least one random number Nbal and at least one a secret key Ksecret and an encryption of the data S from the random key Kai, o and a plurality of diversified random keys Kat, 1 to Ka1, N calculated from the random key Kat, o with, for example, at least one non-linear step. By adding to the secret key Ksecret a random number, or variable, Nba1r all the information is encrypted with a different key, which renders ineffective the attacks known from the prior art. This method therefore makes it possible to improve the security of the electronic device in which this method is implanted.

La présente invention peut concerner également un procédé cryptographique pour un dispositif électronique, permettant de protéger des données contre des attaques réalisées sur le dispositif, consistant à calculer au moins une clé aléatoire Kat, o à partir d'au moins un nombre aléatoire Nba1 et d'au moins une clé secrète Ksecret, et à réaliser un chiffrement des données s à partir de la clé aléatoire Kat, o et d'une pluralité de clés aléatoires diversifiées Ka1,1 à Ka1,N calculées à partir de la clé aléatoire Kat, o . The present invention may also relate to a cryptographic method for an electronic device, for protecting data against attacks performed on the device, comprising calculating at least one random key Kat, o from at least one random number Nba1 and d at least one secret key Ksecret, and to perform an encryption of the data s from the random key Kat, o and a plurality of diversified random keys Ka1,1 to Ka1, N calculated from the random key Kat, o.

Le dispositif électronique peut comprendre une unité centrale équipée au moins d'une mémoire de travail utilisée pour exécuter les calculs et le chiffrement du procédé cryptographique, et d'une mémoire réinscriptible servant à stocker des données propres au dispositif et/ou propres à des commandes à exécuter pour mettre en oeuvre le procédé cryptographique. Le procédé cryptographique peut également être mis en oeuvre de façon matérielle en le programmant directement dans un FPGA, un ASIC (circuit intégré à application spécifique) ou dans une carte à puce, ou dans un crypto-processeur dédié au chiffrement des données. Les données cryptées obtenues peuvent donc être un signal pouvant être transmis de manière sécurisée sur un réseau à un autre dispositif électronique pour être décryptées. Le procédé de cryptage peut calculer N clés aléatoires diversifiées Ka1,1 à Ka1,N, N étant un nombre entier naturel strictement supérieur à 1 égal au nombre de rondes du procédé de cryptage. Les N clés aléatoires diversifiées Ka1,1 à Ka1,N peuvent être obtenues au moins par les étapes suivantes . - calcul d'une première clé aléatoire diversifiée Ka1,1 à partir de la clé aléatoire Ka1,o ; - calcul de chacune des N-1 clés aléatoires diversifiées Ka1,i, avec i nombre entier naturel tel que 2 <- i <- N, à partir d'une précédente clé aléatoire diversifiée Le chiffrement des données S peut être réalisé au moins par les étapes suivantes : - calcul de données codées Scod,o à partir de la clé aléatoire Kal,oet des données S à crypter ; - calcul de N données codées Scod,1 à Scod,N, chacune des N données codées Scod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données codées Scod,i_1 et de la lème clé aléatoire diversifiée Ka1,i ; les Nèmes données codées S cod,N pouvant être des données cryptées Z. The electronic device may comprise a central unit equipped with at least one working memory used to perform the cryptographic process calculations and encryption, and a rewritable memory used to store device-specific and / or command-specific data. to execute to implement the cryptographic method. The cryptographic method can also be implemented in a hardware way by programming it directly in an FPGA, an ASIC (specific application integrated circuit) or in a smart card, or in a crypto-processor dedicated to data encryption. The encrypted data obtained can therefore be a signal that can be transmitted securely over a network to another electronic device to be decrypted. The encryption method can calculate N diversified random keys Ka1,1 to Ka1, N, N being a natural number strictly greater than 1 equal to the number of rounds of the encryption method. The N random diversified keys Ka1,1 to Ka1, N can be obtained at least by the following steps. calculating a first diversified random key Ka1,1 from the random key Ka1, o; calculating each of the N-1 diversified random keys Ka1, i, with a natural integer such that 2 <- i <- N, from a previous diversified random key The encryption of the data S can be carried out at least by the following steps: calculation of coded data Scod, o from the random key Kal, and data S to be encrypted; calculation of N coded data Scod, 1 to Scod, N, each of the N coded data Scod, i, with i such that 1 <- i <- N, being calculated from previous coded data Scod, i_1 and lem diversified random key Ka1, i; the Nth coded data S cod, N can be encrypted data Z.

Le procédé de cryptage peut comporter en outre les étapes suivantes : -calcul d'au moins une première clé diversifiée Kdiv,1 à partir de la clé secrète Ksecret ; - calcul de N-1 clés diversifiées Kdiv, 2 à v, N, chacune des N-1 clés diversifiées Kdiv, r avec i tel que 2 <- i <-N, étant calculée à partir d'une précédente clé diversifiée Kdiv,i_1 ; -calcul d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et une mème clé diversifiée Kdiv,m, avec m nombre entier naturel tel que 1 <- m <- N. Le chiffrement de données S peut être réalisé par : a) une étape d'addition de la clé aléatoire Ka1,o à une matrice formée par les données S à crypter, formant des données codées Scod,o ; puis b) N-1 exécutions des étapes suivantes : - substitution de chaque mot d'une matrice formée par des (i-1)èmes données codées Scod,i 1, avec i tel que 1 <- i <- N-1 par un autre mot de taille similaire ; - transposition cyclique des mots d'une matrice formée par les données obtenues après l'étape 25 précédente de substitution - multiplication matricielle entre une matrice constante et une matrice formée par les données obtenues après l'étape précédente de transposition ; - addition entre une matrice formée par 30 les données obtenues après l'étape précédente de multiplication et une ième clé aléatoire diversifiée Ka1,i, avec i tel que 1 <- i <-N-1, les données obtenues étant des ièmes données codées S COd,i ; puis c) les étapes suivantes . - substitution de chaque mot d'une matrice formée par les (N-1)èmes données codées Scod,(N-1) par un autre mot de taille similaire ; - transposition cyclique des mots d'une matrice formée par les données obtenues après l'étape précédente de substitution ; - addition entre une matrice formée par les données obtenues après l'étape précédente de transposition et la Nème clé aléatoire diversifiée Ka1,N, les données obtenues étant des données cryptées Z. The encryption method may further comprise the following steps: calculation of at least one first diversified key Kdiv, 1 from the secret key Ksecret; - calculation of N-1 diversified keys Kdiv, 2 to v, N, each of the N-1 diversified keys Kdiv, r with i such that 2 <- i <-N, being calculated from a previous diversified key Kdiv, i_1; calculating a difference DifKm between a diversified random key meme Ka1, m and a diversified key meme Kdiv, m, with m natural integer such that 1 <- m <- N. The data encryption S can be achieved by: a) a step of adding the random key Ka1, o to a matrix formed by the data S to be encrypted, forming coded data Scod, o; then b) N-1 executions of the following steps: substitution of each word of a matrix formed by (i-1) th coded data Scod, i 1, with i such that 1 <- i <- N-1 by another word of similar size; cyclic transposition of the words of a matrix formed by the data obtained after the preceding substitution-matrix multiplication step between a constant matrix and a matrix formed by the data obtained after the previous transposition step; adding between a matrix formed by the data obtained after the preceding multiplication step and a diversified random key key Ka1, i, with i such that 1 <- i <-N-1, the data obtained being thi th coded data S COd, i; then c) the following steps. substituting each word of a matrix formed by the (N-1) coded Scod (N-1) data with another word of similar size; cyclic transposition of the words of a matrix formed by the data obtained after the preceding substitution step; adding between a matrix formed by the data obtained after the preceding transposition step and the Nth diversified random key Ka1, N, the data obtained being encrypted data Z.

La présente invention concerne également un dispositif de cryptage d'un message de données S comportant au moins des moyens de calcul d'au moins une clé aléatoire Ka1,o à partir d'au moins un nombre aléatoire Nba1 et d'au moins une clé secrète Ksecret, et des moyens de chiffrement des données S à partir d'une pluralité de clés aléatoires diversifiées Ka1,1 à Ka1,N calculées à partir de la clé aléatoire Ka1,o, avec N nombre entier naturel strictement supérieur à 1. N peut être égal au nombre de rondes réalisées par le dispositif de cryptage. Le dispositif de cryptage peut comporter en outre : - des moyens de calcul d'au moins une première clé aléatoire diversifiée Ka1,1 à partir de la clé aléatoire Kai,o ; - des moyens de calcul de chacune des N-1 clés aléatoires diversifiées Ka1,i, avec i nombre entier naturel tel que 2 <- i <- N, à partir d'une précédente clé aléatoire diversifiée Ka1,i-1• Les moyens de chiffrement des données S peuvent comporter au moins . - des moyens de calcul de données codées S d, 0 à partir de la clé aléatoire Ka1,o et des données S à crypter ; - des moyens de calcul de N données codées Scod, 1 à Scod,N, chacune des N données codées Scod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données codées Scod,i 1 et de la ième clé aléatoire diversifiée Ka1,i ; les Nèmes données codées Scod,N pouvant être des données cryptées Z. Le dispositif de cryptage peut comporter en outre : des moyens de calcul d'au moins une première clé diversifiée Kdiv, 1 à partir de la clé secrète Ksecret ; des moyens de calcul d'une mème clé diversifiée Kdiv,m à partir d'une (m-1) ème clé diversifiée Kdiv, (m-1) , avec m nombre entier naturel tel que 2 <- m <- N ; - des moyens de calcul d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et la mème clé diversifiée Kdiv,m• Les moyens de chiffrement des données S peuvent comporter : - des moyens d'addition de la clé aléatoire Ka1,o et des clés aléatoires diversifiées Kat, 1 a Kat, N à des matrices de données ; - des moyens de substitution de chaque mot 5 d'une matrice de données par un autre mot de taille similaire ; - des moyens de transposition cyclique des mots d'une matrice de données ; - des moyens de multiplication matricielle 10 entre une matrice de données et une matrice constante. La présente invention concerne aussi un procédé de décryptage d'un message de données cryptées Z comportant au moins une étape de calcul d'une Nème clé aléatoire diversifiée Ka1,N à partir d'une clé secrète 15 Ksecret et d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et une mème clé diversifiée Kdiv,m, une étape de diversification inverse réalisée à partir de la Nème clé aléatoire diversifiée Ka1,N calculant N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 20 et une clé aléatoire Ka1,o, et un déchiffrement des données Z à partir des N clés aléatoires diversifiées Kat, 1 à Ka1,N et de la clé aléatoire Kat, o, avec N nombre entier naturel strictement supérieur à 1 et m nombre entier naturel tel que 1 <- m <- N. 25 La présente invention peut concerner également un procédé cryptographique pour un dispositif électronique, permettant de décrypter des données protégées contre des attaques réalisées sur le dispositif, consistant à calculer une Nème clé aléatoire 30 diversifiée Ka1,N à partir d'une clé secrète Ksecret et d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et une mème clé diversifiée v, m, réaliser une diversification inverse à partir de la Nème clé aléatoire diversifiée Ka1,N calculant N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 et une clé 5 aléatoire Ka1,o, et réaliser un déchiffrement des données Z à partir des N clés aléatoires diversifiées Ka1,1 à Ka1,N et de la clé aléatoire Kat, o, avec N nombre entier naturel strictement supérieur à 1 et m nombre entier naturel tel que 1 <- m <- N. N peut être le nombre de rondes du procédé de décryptage. Le calcul de la Nème clé aléatoire diversifiée Ka1,N peut être obtenu au moins par les étapes suivantes . - calcul d'au moins une première clé diversifiée KdjV,1 à partir de la clé secrète Ksecret ; - calcul de m-1 clés diversifiées v,2 à Kdiv,m, chacune des m-1 clés diversifiées KdiV,i, avec i nombre entier naturel tel que 2 <- i <- m, étant calculée 20 à partir d'une précédente clé diversifiée KdiV,i_1 ; - addition de la mème clé diversifiée Kdiv,m calculée précédemment et de la différence DifKm entre la mème clé aléatoire diversifiée Ka1,m et la mème clé diversifiée Kdiv,m ; - calcul de (N-m+1) clés aléatoires diversifiées Ka1,m+1 a Ka1,N, chacune de ces clés aléatoires diversifiées Kat, , avec j nombre entier naturel tel que m+1 < j <- N, étant calculée à partir d'une précédente clé aléatoire diversifiée Kat, _1 . La diversification inverse peut réaliser le calcul de N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 10 15 25 30 et de la clé aléatoire Ka1,o, chacune de ces clés Ka1,i, avec i nombre entier naturel tel que 0 N-1, étant calculée à partir d'une précédente clé aléatoire diversifiée Kai,i+1• Le déchiffrement des données cryptées Z peut être réalisé au moins par les étapes suivantes : - calcul de données décodées Sdecod,O à partir de la Nème clé aléatoire diversifiée Ka1,N et des données cryptées Z ; - calcul de N données décodées Sdecod, l à Sdecod,N, chacune des N données décodées Sdecod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données décodées Sdecod,i-1 et de la (N-i+1)ème clé aléatoire diversifiée Ka1,N-i+1 ; les Nèmes données décodées Sdecod,N pouvant être des données décryptées S. Le déchiffrement de données peut être réalisé par : a) les étapes suivantes . - addition de la Nème clé aléatoire diversifiée Ka1,N à une matrice formée par les données cryptées Z, formant ainsi des données décodées Sdecod,O ; - transposition cyclique des mots d'une matrice formée par les données obtenues après l'étape 25 précédente d'addition ; - substitution de chaque mot d'une matrice formée par les données obtenues après l'étape précédente de transposition cyclique par un autre mot de taille similaire, formant ainsi des premières 30 données décodées Sdecod,l ; puis b) N-1 exécutions des étapes suivantes : 10 15 20 - addition entre une matrice formée par des (i-1) emee données décodées Sdecod,i-1 et une ieme clé aléatoire diversifiée Kaki, avec i tel que 2 <- i <- N ; - multiplication matricielle entre une matrice formée par les données obtenues après l'étape précédente d'addition et une matrice constante ; - transposition cyclique des mots d'une matrice formée par les données obtenues après l'étape précédente de multiplication ; - substitution de chaque mot d'une matrice formée par les données obtenues après l'étape précédente de transposition cyclique, les données obtenues étant des ièmes données décodées S decod,i ; puis c) une étape d'addition entre une matrice formée par les Nèmes données décodées Sdecod,N et la clé aléatoire Ka1,o, les données obtenues étant des données décryptées S. La présente invention concerne également un dispositif de décryptage d'un message de données cryptées comportant au moins des moyens de calcul d'une Nème clé aléatoire diversifiée Ka1,N à partir d'une clé secrète Ksecret et d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et une mème clé diversifiée Kdiv,m, des moyens de diversification inverse à partir de la Nème clé aléatoire diversifiée Ka1,N calculant N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 et la clé aléatoire Kat, o, et des moyens de déchiffrement des données Z à partir des N clés aléatoires diversifiées Ka1,1 à Ka1,N et de la clé aléatoire Ka1,o, avec N nombre entier naturel strictement supérieur à 1 et m nombre entier naturel tel que 1 <- m <- N. Les moyens de calcul de la Nème clé aléatoire diversifiée Ka1,N peuvent comporter au moins : - des moyens de calcul d'au moins une première clé diversifiée Kdiv,1 à partir de la clé secrète Ksecret ; - des moyens de calcul de m-1 clés diversifiées Kdiv,2 à Kdiv,m, chacune des m- 1 clés diversifiées Kdiv,i, avec i nombre entier naturel tel que 2 <- i <- m, étant calculée à partir d'une précédente clé diversifiée Kd v,i ; - des moyens d'addition de la mème clé diversifiée Kdiv,m calculée précédemment et de la différence DifKm entre la mème clé aléatoire diversifiée Ka1,m et la mème clé diversifiée Kdiv,m ; - des moyens de calcul de (N-m+1) clés aléatoires diversifiées Ka1,m+1 a Ka1,N, chacune de ces clés aléatoires diversifiées Ka1,~, avec j nombre entier naturel tel que m+1 < j <- N, étant calculée à partir d'une précédente clé aléatoire diversifiée Ka1,j-1 Les moyens de diversification inverse peuvent calculer N-1 clés aléatoires diversifiées Ka1,N-1 à Kat, 1 et la clé aléatoire Kat, o, chacune de ces clés Ka1,i, avec i nombre entier naturel tel que 0 N-1, étant calculée à partir d'une précédente clé aléatoire diversifiée Kai,i+1• Les moyens de déchiffrement des données peuvent comporter au moins . - des moyens de calcul de données décodées Sdecod,O à partir de la Neme clé aléatoire diversifiée Kal,N et des données cryptées Z ; - des moyens de calcul de N données décodées Sdecod,l a Sdecod,N, chacune des N données décodées Sdecod, , avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données décodées Sdecod,i-1 et de la (N-i+1)ème clé aléatoire diversifiée Kal,N-+ l ; les Nèmee données décodées Sdecod,N pouvant être des données décryptées S. Les moyens de déchiffrement de données peuvent comporter : -des moyens d'addition de la clé aléatoire Kal,o et des clés aléatoires diversifiées Kal,l à Kal,N à des matrices de données ; - des moyens de transposition cyclique des mots d'une matrice de données ; - des moyens de substitution de chaque mot d'une matrice de données par un autre mot de taille similaire ; - des moyens de multiplication matricielle entre une matrice de données et une matrice constante. L'invention concerne aussi un dispositif de traitement de signaux destiné à mettre en oeuvre un procédé de cryptage d'un message de données et/ou un procédé de décryptage d'un message de données cryptées tels que décrits précédemment. L'invention concerne aussi un carte à puce comportant au moins un dispositif de cryptage d'un message de données et/ou un dispositif de décryptage d'un message de données cryptées tels que décrits précédemment. L'invention concerne également un support de données, pouvant être lu par un système informatique, comportant des données sous forme codée, pour mettre en oeuvre un procédé de cryptage et/ou un procédé de décryptage tels que décrits précédemment. Enfin, l'invention concerne un produit logiciel comportant un support de données susceptible d'être lu par un système informatique, permettant de mettre en oeuvre un procédé de cryptage et/ou un procédé de décryptage tels que décrits précédemment. L'invention s'applique notamment pour un algorithme de type AES. Toutefois, les principes de l'invention peuvent s'appliquer à d'autres types d'algorithmes, par exemple tout algorithme de chiffrement et/ou de déchiffrement faisant appel à un calcul de clés non trivial , comportant par exemple au moins une étape non linéaire de substitution et/ou une étape de permutation sur des clés calculées. BRÈVE DESCRIPTION DES DESSINS La présente invention sera mieux comprise à la lecture de la description d'exemples de réalisation donnés à titre purement indicatif et nullement limitatif en faisant référence aux dessins annexés sur lesquels : - la figure 1 représente schématiquement les étapes de codage de données mises en oeuvre par un algorithme AES selon l'art antérieur, - la figure 2 représente les étapes réalisées lors de la mise en oeuvre d'un exemple de réalisation d'un procédé de cryptage de données selon l'invention, - la figure 3 représente schématiquement les étapes mises en oeuvre lors d'un chiffrement de données réalisé durant un exemple de réalisation d'un procédé de cryptage de données selon l'invention, - la figure 4 représente un tableau de correspondance utilisée lors d'une opération de substitution exécutée durant un exemple de réalisation d'un procédé de cryptage de données selon l'invention, - la figure 5 représente les étapes réalisées lors de la mise en oeuvre d'un exemple de réalisation d'un procédé de décryptage de données cryptées selon l'invention, - la figure 6 représente schématiquement les étapes mises en oeuvre lors d'un déchiffrement de données réalisé durant un exemple de réalisation d'un procédé de décryptage de données cryptées selon l'invention, - la figure 7 représente un tableau de correspondance utilisée lors d'une opération de substitution exécutée durant un exemple de réalisation d'un procédé de décryptage de données cryptées selon l'invention, - la figure 8 représente un exemple d'un circuit destiné à mettre en oeuvre un procédé de cryptage de données selon l'invention, - la figure 9 représente un exemple d'un circuit destiné à mettre en oeuvre un procédé de décryptage de données selon l'invention. The present invention also relates to a device for encrypting a data message S comprising at least means for calculating at least one random key Ka1, o from at least one random number Nba1 and at least one key secret Ksecret, and means for encrypting the data S from a plurality of diversified random keys Ka1,1 to Ka1, N calculated from the random key Ka1, o, with N natural number strictly greater than 1. N may be equal to the number of rounds performed by the encryption device. The encryption device may further comprise: means for calculating at least a first diversified random key Ka1, 1 from the random key Kai, o; means for calculating each of the N-1 diversified random keys Ka1, i, with a natural integer such that 2 <- i <- N, from a previous diversified random key Ka1, i-1 • The means encryption of the data S may comprise at least. means for calculating coded data S d, 0 from the random key Ka1, o and data S to be encrypted; means for calculating N coded data Scod, 1 to Scod, N, each of N coded data Scod, i, with i such that 1 <- i <- N, being calculated from previous coded data Scod, i 1 and the ith diversified random key Ka1, i; the Nth coded data Scod, N possibly being encrypted data Z. The encryption device may further comprise: means for calculating at least a first diversified key Kdiv, 1 from the secret key Ksecret; means for calculating a diversified key meme Kdiv, m from a (m-1) th diversified key Kdiv, (m-1), with m natural integer such that 2 <- m <- N; means for calculating a difference DifKm between a diversified random keymem Ka1, m and the diversified keymem Kdiv, m. The data encryption means S may comprise: means for adding the random key Ka1, o and diversified random keys Kat, 1 to Kat, N to matrices of data; means for substituting each word 5 of a data matrix with another word of similar size; means for cyclically transposing the words of a data matrix; - Matrix multiplication means 10 between a data matrix and a constant matrix. The present invention also relates to a method for decrypting an encrypted data message Z comprising at least one step of calculating a diversified random key N1 Ka1, N from a secret key Ksecret and a difference DifKm between a diversified random key meme Ka1, m and a diversified key meme Kdiv, m, an inverse diversification step carried out from the diversified random Nth key Ka1, N calculating N-1 diversified random keys Ka1, N-1 to Ka1,1 20 and a random key Ka1, o, and a decryption of the data Z from the N diversified random keys Kat, 1 to Ka1, N and the random key Kat, o, with N natural integer strictly greater than 1 and m number The present invention may also relate to a cryptographic method for an electronic device, making it possible to decrypt data protected against attacks made on the device. tif, consisting of calculating a diversified random Nth key Ka1, N from a secret key Ksecret and a difference DifKm between a diversified random keymem Ka1, m and a diversified keyemem v, m, performing an inverse diversification starting from the Nth diversified random key Ka1, N calculating N-1 diversified random keys Ka1, N-1 to Ka1,1 and a random key Ka1, o, and performing a decryption of the data Z from the N diversified random keys Ka1,1 to Ka1, N and random key Kat, o, with N natural number strictly greater than 1 and m natural number such that 1 <- m <- N. N can be the number of rounds of the process of decryption. The calculation of the Nth diversified random key Ka1, N can be obtained at least by the following steps. calculating at least a first diversified key KdjV, 1 from the secret key Ksecret; calculating m-1 diversified keys v, 2 to Kdiv, m, each of the diversified m-1 keys KdiV, i, with a natural integer such that 2 <- i <- m, being calculated from a previous diversified key KdiV, i_1; - addition of the diversified key meme Kdiv, m previously calculated and the difference DifKm between the diversified random meme key Ka1, m and the diversified key meme Kdiv, m; calculation of (N-m + 1) diversified random keys Ka1, m + 1a Ka1, N, each of these diversified random keys Kat,, with j natural number such that m + 1 <j <- N, being calculated from a previous random random key Kat, _1. Reverse diversification can perform the calculation of N-1 diversified random keys Ka1, N-1 to Ka1,1 and the random key Ka1, o, each of these keys Ka1, i, with a natural integer such that that 0 N-1, being calculated from a previous diversified random key Kai, i + 1 • The decryption of the encrypted data Z can be achieved at least by the following steps: - computation of decoded data Sdecod, O from the Nth diversified random key Ka1, N and encrypted data Z; calculation of N decoded data Sdecod, I to Sdecod, N, each of N decoded data Sdecod, i, with i such that 1 <- i <- N, being calculated from previous decoded data Sdecod, i-1 and the (N-i + 1) random diversified key Ka1, N-i + 1; the Nth decoded data Sdecod, N being able to be decrypted data S. The decryption of data can be achieved by: a) the following steps. adding the Nth diversified random key Ka1, N to a matrix formed by the encrypted data Z, thus forming decoded data Sdecod, O; cyclic transposition of the words of a matrix formed by the data obtained after the preceding step of addition; replacing each word of a matrix formed by the data obtained after the preceding cyclic transposition step with another word of similar size, thereby forming first decoded data Sdecod, 1; then b) N-1 executions of the following steps: adding between a matrix formed by (i-1) decoded data Sdecod, i-1 and a diversified ieme key Kaki, with i such that 2 <- i <- N; matrix multiplication between a matrix formed by the data obtained after the previous addition step and a constant matrix; cyclic transposition of the words of a matrix formed by the data obtained after the preceding multiplication step; replacing each word of a matrix formed by the data obtained after the preceding cyclic transposition step, the data obtained being decoded second data S decod, i; then c) a step of adding between a matrix formed by the Nth decoded data Sdecod, N and the random key Ka1, o, the data obtained being decrypted data S. The present invention also relates to a device for decrypting a message encrypted data comprising at least means for calculating a diversified random key N1 Ka1, N from a secret key Ksecret and a difference DifKm between a diversified random key meme Ka1, m and a diversified key meme Kdiv, m, means of inverse diversification from the nth diversified random key Ka1, N calculating N-1 diversified random keys Ka1, N-1 to Ka1,1 and the random key Kat, o, and means for decrypting the data Z from the N random diversified keys Ka1,1 to Ka1, N and the random key Ka1, o, with N natural number strictly greater than 1 and m natural integer such that 1 <- m <- N. The means of calculation of the N Diversified random key Ka1, N may comprise at least: means for calculating at least one first diversified key Kdiv, 1 from the secret key Ksecret; means for calculating diversified key m-1 Kdiv, 2 to Kdiv, m, each of the diversified m-keys Kdiv, i, with a natural integer such that 2 <- i <- m, being calculated from an earlier diversified key Kd v, i; means for adding the diversified differential meme Kdiv m previously calculated and the difference DifKm between the diversified random multiemem Ka1 m and the diversified keymem Kdiv m; means for calculating (N-m + 1) diversified random keys Ka1, m + 1a Ka1, N, each of these diversified random keys Ka1, ~, with j natural integer such that m + 1 <j <- N, being calculated from a previous diversified random key Ka1, j-1 The inverse diversification means can calculate N-1 diversified random keys Ka1, N-1 to Kat, 1 and the random key Kat, o, each of these keys Ka1, i, with i natural number such that 0 N-1, being calculated from a previous diversified random key Kai, i + 1 • The data decryption means may comprise at least. decoded data calculation means Sdecod, O from the diversified Nth random key Kal, N and encrypted data Z; means for calculating N decoded data Sdecod, the Sdecod, N, each of the N decoded data Sdecod, with i such that 1 <- i <- N, being calculated from previous decoded data Sdecod, i-1 and the (N-i + 1) th diversified random key Kal, N- + 1; the Nth decoded data Sdecod, N being able to be decrypted data S. The data decryption means may comprise: means for adding the random key Kal, o and diversified random keys Kal, l to Kal, N to data matrices; means for cyclically transposing the words of a data matrix; means for substituting each word of a data matrix with another word of similar size; - Matrix multiplication means between a data matrix and a constant matrix. The invention also relates to a signal processing device for implementing a method of encrypting a data message and / or a method for decrypting an encrypted data message as described above. The invention also relates to a smart card comprising at least one device for encrypting a data message and / or a device for decrypting an encrypted data message as described above. The invention also relates to a data carrier, readable by a computer system, comprising data in coded form, for implementing an encryption method and / or a decryption method as described above. Finally, the invention relates to a software product comprising a data medium that can be read by a computer system, making it possible to implement an encryption method and / or a decryption method as described above. The invention applies in particular for an AES type algorithm. However, the principles of the invention can be applied to other types of algorithms, for example any encryption and / or decryption algorithm using a non-trivial key calculation, for example comprising at least one non-trivial step. linear substitution and / or a permutation step on calculated keys. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will be better understood on reading the description of exemplary embodiments given purely by way of indication and in no way limiting, with reference to the appended drawings in which: FIG. 1 schematically represents the data coding steps; implemented by an algorithm AES according to the prior art, - Figure 2 shows the steps performed during the implementation of an exemplary embodiment of a data encryption method according to the invention, - Figure 3 schematically represents the steps implemented during a data encryption performed during an exemplary embodiment of a data encryption method according to the invention, - Figure 4 shows a correspondence table used during a substitution operation. executed during an exemplary embodiment of a data encryption method according to the invention, - FIG. FIGS. 6 and 6 show schematically the steps implemented during a data decryption performed during an example. embodiment of a method for decrypting encrypted data according to the invention, FIG. 7 represents a correspondence table used during a substitution operation executed during an exemplary embodiment of a method for decrypting encrypted data according to FIG. FIG. 8 represents an example of a circuit intended to implement a data encryption method according to the invention; FIG. 9 represents an example of a circuit intended to implement a decryption method; data according to the invention.

Des parties identiques, similaires ou équivalentes des différentes figures décrites ci-après portent les mêmes références numériques de façon à faciliter le passage d'une figure à l'autre. Identical, similar or equivalent parts of the different figures described below bear the same numerical references so as to facilitate the passage from one figure to another.

Les différentes possibilités (variantes et modes de réalisation) doivent être comprises comme n'étant pas exclusives les unes des autres et peuvent se combiner entre elles. EXPOSÉ DÉTAILLÉ DE MODES DE RÉALISATION PARTICULIERS On se réfère à la figure 2 qui représente les étapes réalisées lors de la mise en oeuvre d'un exemple de réalisation d'un procédé de cryptage de données à clé secrète aléatoire. Le message de données à crypter, référencé S sur la figure 2, est tout d'abord coupé en blocs de 128 bits représentés sous forme d'une matrice 4 X 4 dont les entrées sont respectivement des mots de 8 bits (octets). Ces blocs sont ensuite cryptés indépendamment les uns des autres pour obtenir en fin du procédé de cryptage des blocs de données cryptées, référencés Z sur la figure 2, qui peuvent alors être concaténés et former un message de données cryptées. Dans l'exemple de réalisation du procédé décrit, toutes les opérations arithmétiques s'effectuent sur des mots de 8 bits disposés en matrice 4 X 4. On peut donc se placer, pour les calculs, dans un corps fini appelé champ de Galois étendu noté GF(28), ayant comme polynôme primitif : P (X) = x8 + x4 + x3 + x + 1. The different possibilities (variants and embodiments) must be understood as not being exclusive of each other and can be combined with one another. DETAILED DESCRIPTION OF PARTICULAR EMBODIMENTS Referring to FIG. 2, which represents the steps performed during the implementation of an exemplary embodiment of a random secret key data encryption method. The data message to be encrypted, referenced S in FIG. 2, is first cut into 128-bit blocks represented in the form of a 4 × 4 matrix whose inputs are respectively 8-bit words (bytes). These blocks are then encrypted independently of one another to obtain, at the end of the encryption method, encrypted data blocks, referenced Z in FIG. 2, which can then be concatenated and form an encrypted data message. In the exemplary embodiment of the method described, all the arithmetic operations are performed on 8-bit words arranged in a 4 × 4 matrix. It is therefore possible to place, for the calculations, in a finite field called the extended Galois field noted GF (28), having as primitive polynomial: P (X) = x8 + x4 + x3 + x + 1.

On réalise un premier ensemble de fonctions, appelé ronde initiale, comprenant tout d'abord le calcul d'une clé aléatoire Kai, o à partir d'un nombre aléatoire Nba1r par exemple non nul, et d'une clé secrète Ksecret, par exemple également non nulle. La clé aléatoire Ka1,o est obtenue par une addition 102 entre la clé secrète Ksecret et le nombre aléatoire Nba1. La taille de la clé secrète Ksecret peut être égale à 128 bits, 192 bits ou encore 256 bits, et est ici choisie égale à la taille des blocs de données s à crypter. Sur l'exemple de la figure 2, la clé secrète Ksecret comporte 128 bits représentés sous la forme d'une matrice 4 X 4 dont les entrées sont des mots de 8 bits. La taille du nombre aléatoire Nba1 est choisie égale à la taille de la clé secrète Ksecret. Cette addition 102 est réalisée par un OU Exclusif entre la clé secrète Ksecret et le nombre aléatoire Nba1. On obtient en sortie de l'addition 102 la clé aléatoire Kat, 0 Durant la ronde initiale, on utilise la clé aléatoire Ka1,o. A la ronde suivante, on réalise le calcul d'une première clé aléatoire diversifiée Ka1,1, ou première clé de ronde aléatoire, obtenue à partir de la clé aléatoire Ka1,o par une opération de diversification 103, appelée KeySchedule , de cette clé aléatoire Kat, o . On a donc Kat, 1 = KeySchedule (Ka1, o) . Cette fonction 103 KeySchedule permet de calculer N clés aléatoire diversifiée Ka1,1 à Ka1,N, N étant le nombre de rondes réalisées durant le procédé de cryptage. La valeur de N est fonction de la taille de la clé secrète Ksecret utilisée : pour une clé secrète Ksecret de 128 bits, on a N = 10 ; N = 12 pour une clé de 192 bits ; et N = 14 pour une clé de 256 bits. La fonction KeySchedule sera détaillée plus loin dans la description. Ces clés aléatoires diversifiées Ka1,1 à Kai,N et la clé aléatoire Ka1,o sont utilisées pour réaliser un chiffrement 105 des données S détaillé ci-dessous en liaison avec la figure 3. Dans cet exemple de réalisation, les clés Ka1,o à Ka1,N sont calculées parallèlement à l'exécution du chiffrement 105. Dans une variante, il est possible que les clés aléatoires diversifiées Ka1,1 à Ka1,N et la clé aléatoire Ka1,o soient calculées avant l'exécution du chiffrement 105. Tout d'abord, le chiffrement 105 achève la ronde initiale par le calcul de données codées Scod,o à partir de la clé aléatoire Ka1,o et des données S. Une fonction 104, appelée AddRoundKey , réalise ce calcul. On a donc : Scod, o = AddRoundKey (Kao, o, S). Le calcul AddRoundKey des données codées Scod,o est ici une opération d'addition, réalisée par un OU Exclusif , entre les données initiales S et la clé aléatoire Kai, o . La ronde initiale étant terminée, on exécute N rondes. Chacune des iemes rondes, avec i nombre entier naturel tel que 1 <- i <- N-1, comporte quatre fonctions qui sont détaillées ci-dessous. Durant chacune de ces rondes, le procédé 30 exécute tout d'abord une fonction 106, appelée SubBytes , durant laquelle chaque mot de la matrice 20 25 de données codées obtenue à l'étape précédente (les données codées Scod, o lorsque l'on vient d'achever l'exécution de la ronde initiale, ou les (i-1)èmes données codées Scod,i-1 lorsque l'on exécute une ieme ronde avec 2 <- i <- N-1) est remplacé par un autre mot. Pour cela, une transformation élémentaire appelée sub est appliquée sur chaque mot Scod(c,d) des données codées Scod tel que : sub (Scod(c,d) ) est non nul, ou * -1 a Scod(c,d) + b si Scod(c,d) sub (Scod(c,d)) = b si Scod(c,d) est nul, avec c et d nombres entiers naturels, b = {63} (notation hexadécimale), et /1 0 0 0 1 1 1 1` 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 a= 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 ~0 0 0 1 1 1 1 1) L'opérateur * représente la multiplication des matrices dans le champ de Galois GF (28) , et Scod(c,d) -1 représente un mot inverse des données codées Scod La fonction SubBytes est donc une fonction de substitution non linéaire. Cette fonction de substitution peut également être représentée sous la forme d'un tableau comportant les valeurs de substitution des mots des données codées Scod. Un mot Scod(c,d) (ici un octet) dont la valeur est notée X, y , où x et y représentent respectivement les bits de poids fort et de poids faible, est donc substitué par le mot dont la valeur se trouve dans le tableau représenté sur la figure 4, au croisement de la ligne x et de la colonne y correspondantes. Par exemple, si le mot Scod1 ( 1 , 1 ) a pour valeur { 04 } , on a alors : SubBytes (Scod1 c 1 , 1 > ) = { F2 } . On exécute ensuite une fonction 108 appelée ShiftRows sur les données obtenues en sortie de SubBytes 106. Cette fonction 108 consiste en une transposition décalant cycliquement les mots des lignes de la matrice obtenue en sortie de SubBytes . Les mots des lignes sont décalés suivant un décalage circulaire à gauche, le nombre de cases du décalage dépendant de la ligne : les mots de la première ligne de la matrice ne sont pas décalés, les mots de la seconde ligne sont décalés d'une case vers la gauche, les mots de la troisième ligne sont décalés de deux cases vers la gauche et les mots de la quatrième ligne sont décalés de trois cases vers la gauche. A first set of functions, called the initial round, is produced, comprising firstly the computation of a random key Kai, o from a random number Nba1r, for example nonzero, and a secret key Ksecret, for example also non-zero. The random key Ka1, o is obtained by an addition 102 between the secret key Ksecret and the random number Nba1. The size of the secret key Ksecret can be equal to 128 bits, 192 bits or even 256 bits, and here is chosen equal to the size of the data blocks to be encrypted. In the example of FIG. 2, the secret key Ksecret comprises 128 bits represented in the form of a 4 × 4 matrix whose inputs are 8-bit words. The size of the random number Nba1 is chosen equal to the size of the secret key Ksecret. This addition 102 is performed by an Exclusive OR between the secret key Ksecret and the random number Nba1. The random key Kat, 0 is obtained at the output of the addition 102. During the initial round, the random key Ka1, o is used. In the next round, the calculation of a first diversified random key Ka1,1, or first random round key, obtained from the random key Ka1, o by a diversification operation 103, called KeySchedule, of this key is carried out. random Kat, o. So we have Kat, 1 = KeySchedule (Ka1, o). This function 103 KeySchedule makes it possible to calculate N diversified random keys Ka1,1 to Ka1, N, N being the number of rounds realized during the encryption process. The value of N is a function of the size of the secret key Ksecret used: for a secret key Ksecret of 128 bits, one has N = 10; N = 12 for a 192-bit key; and N = 14 for a 256-bit key. The KeySchedule function will be detailed later in the description. These diversified random keys Ka1,1 to Kai, N and the random key Ka1, o are used to perform an encryption 105 of the data S detailed below in connection with FIG. 3. In this exemplary embodiment, the keys Ka1, o at Ka1, N are computed in parallel with the execution of the encryption 105. In a variant, it is possible for the diversified random keys Ka1,1 to Ka1, N and the random key Ka1, o to be calculated before the execution of the encryption 105 Firstly, the encryption 105 completes the initial round by computing Scod coded data, o from the random key Ka1, o and data S. A function 104, called AddRoundKey, performs this calculation. So we have: Scod, o = AddRoundKey (Kao, o, S). The AddRoundKey calculation of Scod coded data, o is here an addition operation, performed by an Exclusive OR, between the initial data S and the random key Kai, o. The initial round being completed, we execute N rounds. Each of the round iemes, with a natural integer such that 1 <- i <- N-1, has four functions which are detailed below. During each of these rounds, the method 30 first executes a function 106, called SubBytes, during which each word of the encoded data matrix 25 obtained in the previous step (the coded data Scod, o when one has just completed the execution of the initial round, where the (i-1) scoded data Scod, i-1 when executing an ieme round with 2 <- i <- N-1) is replaced by a another word. For this, an elementary transformation called sub is applied to each Scod word (c, d) of coded data Scod such that: sub (Scod (c, d)) is non-zero, or * -1 a Scod (c, d) + b if Scod (c, d) sub (Scod (c, d)) = b if Scod (c, d) is zero, with c and d natural numbers, b = {63} (hexadecimal notation), and / 1 0 0 0 1 1 1 1` 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 a = 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 ~ 0 0 0 1 1 1 1 1) The operator * represents the multiplication of matrices in the Galois field GF (28), and Scod (c, d) -1 represents a word inverse of Scod coded data The SubBytes function is therefore a nonlinear substitution function. This substitution function can also be represented in the form of a table comprising the substitution values of the words of the coded Scod data. A word Scod (c, d) (here a byte) whose value is denoted by X, y, where x and y respectively represent the bits of high and low weight, is therefore substituted by the word whose value is in the table shown in FIG. 4, at the intersection of the line x and the corresponding column y. For example, if the word Scod1 (1, 1) has the value {04}, then we have: SubBytes (Scod1 c 1, 1>) = {F2}. A function 108 called ShiftRows is then executed on the data obtained at the output of SubBytes 106. This function 108 consists of a transposition that shifts the words of the lines of the matrix obtained at the output of SubBytes cyclically. The words of the lines are shifted with a left circular shift, the number of squares of the shift depends on the line: the words of the first line of the matrix are not shifted, the words of the second line are shifted by one square to the left, the words in the third line are shifted two squares to the left and the words in the fourth line are shifted three squares to the left.

Par exemple, si on a en entrée de la fonction ShiftRows une matrice M telle que : (Mo0 Moi Mot Mo3 M1,0 Ml ,l M1,2 M1,3 M20 M21 M22 M23 M3 M M M ,0 3,1 3,2 3,3 on obtient alors en sortie la matrice : (Mo o Mo 1 Mo 2 Mo 3 M1,1 M1 2 M13 Mi o M2,2 M2 3 M2,0 M21 M32) M= ShWRows(M) = Une fonction 110, appelée MixColumns réalise ensuite une multiplication matricielle dans GF(28) entre la matrice obtenue en sortie de ShiftRows et une matrice constante Ao telle que : (02 03 01 010 01 02 03 01 A° 01 01 02 03 X03 01 01 02 Ce calcul s'effectue par colonne, c'est-à-dire que chaque colonne dépend de toute la colonne d'entrée. Ensuite, la fonction KeySchedule 103 (représentée sur la figure 2) est exécutée, réalisant une opération de diversification de la clé précédemment utilisée, qui est soit la clé aléatoire Kai,o lorsque l'on réalise la ronde initiale, soit une (i-1)ème clé aléatoire diversifiée Ka1,i_1 lorsque l'on réalise les autres rondes. En écrivant la (i-1)ème clé aléatoire diversifiée Ka ,i_1 sous la forme : Kal,i-1 ko,o kl,o k2 0 k3,0 k01 k0 2 4,1 k1 2 k21 k22 k3 1 k3 2 k0,3 k1,3 k2 3 k3,3 / la ième clé aléatoire diversifiée Ka1,i obtenue est alors de la forme : Kal,i / ka ke ki ~kmkb k, kf kg k1 kk kn ko kka:" kh kl kp25 Avec ka = sub(k1 3) k0 0 Rcon (Z) kb = sub(k1,3) O+ ko,m m=0 2 ka = sub(k1,3) O+ ko,m m=0 3 kd = sub(k1,3) O+ 1 ko,m m=0 ke =sub(k23)~k1,0 kf =sub(k23)O+ klm m=o 2 kg = sub(k2 3) O+ kl m m=o 3 kh = sub(k2,3) 0 kl,m m=o ki =sub(k33)k20 k. = sub(k3 3) 0 k2,m m=0 2 kk = sub(k3,3) 0 k2,m m=0 3 k1 = sub(k3,3) 0 k2,m m=0 km = sub(k0,3) k3,0 kn = sub(k0,3) 0 k3,m m=0 2 ko = sub(k0,3) 0 k3,m m=0 3 kp = sub(k0,3) 0 k3,m m=0 26 For example, if the input of the ShiftRows function has a matrix M such that: (Mo0 Mo3 Mot Mo3 M1.0 Ml, l M1.2 M1.3 M20 M21 M22 M23 M3 MMM, 0 3.1 3.2 3 , 3 the matrix is then output: (Mo o Mo 1 Mo 2 Mo 3 M1.1 M1 2 M13 Mi o M2.2 M2 3 M2.0 M21 M32) M = ShWRows (M) = A function 110, called MixColumns then performs a matrix multiplication in GF (28) between the matrix obtained at the output of ShiftRows and a constant matrix Ao such that: (02 03 01 010 01 02 03 01 A ° 01 01 02 03 X03 01 01 02 This calculation s' by column, that is to say that each column depends on the entire input column, then the function KeySchedule 103 (represented in FIG. 2) is executed, carrying out a diversification operation of the previously used key, which is either the random key Kai, o when one carries out the initial round, or a (i-1) th diversified random key Ka1, i_1 when one realizes the other rounds. the (i-1) th diversified random key Ka, i_1 in the form: Kal, i-1 ko, o kl, o k2 0 k3.0 k01 k0 2 4.1 k1 2 k21 k22 k3 1 k3 2 k0.3 k1,3 k2 3 k3,3 / the ith diversified random key Ka1, i obtained is then of the form: Kal, i / ka ke ki ~ kmkb k, kf kg k1 kk kka kka: "kh kl kp25 With ka = sub (k1 3) k0 0 Rcon (Z) kb = sub (k1,3) O + ko, mm = 0 2 ka = sub (k1,3) O + ko, mm = 0 3 kd = sub (k1,3) O + 1 ko, mm = 0 ke = sub (k23) ~ k1.0 kf = sub (k23) O + klm m = o 2 kg = sub (k2 3) O + kl mm = o 3 kh = sub (k2,3) 0 k1, mm = o k1 = sub (k33) k20k. = sub (k3 3) 0 k2, mm = 0 2 kk = sub (k3,3) 0 k2, mm = 0 3 k1 = sub (k3,3) 0 k2, mm = 0 km = sub (k0,3) k3,0 kn = sub (k0,3) 0 k3, mm = 0 2 ko = sub (k0,3) 0 k3, mm = 0 3 kp = sub (k0,3) 0 k3, mm = 0 26

sub correspond à la fonction de transformation non linéaire décrite précédemment pour la fonction SubBytes . Rcon correspond à un tableau unidimensionnel de constantes (en hexadécimal), indexé par le numéro de la ronde courante : Ronde i 1 2 3 4 5 6 7 8 9 10 Rcon 01 02 04 08 10 20 40 80 1B 36 On a donc Kat, i = KeySchedule (Kat, i-1)   sub is the nonlinear transformation function described above for the SubBytes function. Rcon is a one-dimensional table of constants (in hexadecimal), indexed by the number of the current round: Round i 1 2 3 4 5 6 7 8 9 10 Rcon 01 02 04 08 10 20 40 80 1B 36 So we have Kat, i = KeySchedule (Kat, i-1)

Enfin, la ième ronde, avec i tel que 1 <- i <- N-1, se termine par le calcul (fonction 112 appelée AddRoundKey ) de ièmes données codées Scod,i à partir de la ième clé aléatoire diversifiée Ka1,i et des données obtenues en sortie MixColumns 110. Cette fonction 112 AddRoundKey est similaire à la fonction 104 AddRoundKey réalisée durant la ronde initiale. La Nème ronde est ensuite exécutée. Par rapport aux ièmes rondes, avec i tel que 1 <- i <- N-1, cette dernière ronde N ne comporte que trois fonctions 114, 116, 118 respectivement similaires aux fonctions 106 SubBytes , 108 ShiftRows et 112 AddRoundKey . A la fin de cette dernière ronde, on obtient en sortie les données cryptées Z. Ces étapes sont répétées pour chacun des blocs de données. Ainsi, le cryptage réalisé permet de chiffrer chaque bloc d'informations par une clé différente. De plus, cette clé étant aléatoire pour chaque bloc de données, les attaques connues utilisées contre l'algorithme AES sont ici inefficaces. Finally, the ith round, with i such that 1 <- i <- N-1, ends with the computation (function 112 called AddRoundKey) of the first coded data Scod, i from the ith diversified random key Ka1, i and data obtained at the MixColumns 110 output. This AddRoundKey function is similar to the AddRoundKey 104 function performed during the initial round. The Nth round is then executed. With respect to the second round, with i such that 1 <- i <- N-1, this last round N has only three functions 114, 116, 118 respectively similar to the functions 106 SubBytes, 108 ShiftRows and 112 AddRoundKey. At the end of this last round, the encrypted data Z is output. These steps are repeated for each of the data blocks. Thus, the encryption performed makes it possible to encrypt each block of information by a different key. Moreover, since this key is random for each block of data, the known attacks used against the AES algorithm are ineffective here.

La clé aléatoire doit toutefois être connue pour réaliser le décryptage des données cryptées. Pour cela, parallèlement aux étapes décrites ci-dessus, le procédé réalise également, durant la première ronde, une fonction 107 KeySchedule , représentée sur la figure 2, à partir de la clé secrète Ksecret, délivrant ainsi une première clé diversifiée Kdiv,l. Cette fonction 107 KeySchedule est également répétée durant les rondes suivantes en utilisant à chaque fois la clé diversifiée Kdiv calculée précédemment. En calculant la différence entre une mème clé aléatoire diversifié Kal,m et une mème clé diversifiée Kdiv, m (opération 109 sur la figure 2), avec m nombre entier naturel tel que 1 <- m <- N, on obtient une information DifKm utilisable pour réaliser le décryptage des données. Il est alors possible de réaliser le décryptage à partir de cette information DifKm et de la clé secrète Ksecret. On choisit de préférence de réaliser le calcul de cette différence DifKm au cours d'une ronde se trouvant sensiblement au milieu de l'ensemble des rondes. Dans l'exemple décrit précédemment, le chiffrement étant réalisé sur 10 rondes, on choisit donc de réaliser cette différence durant la cinquième ronde (m = 5), c'est-à-dire de calculer la différence DifK5 = Ka ,5 - Kdiv,5. Toutefois, il est possible de choisir une autre valeur de m. Un procédé de décryptage des données précédemment cryptées va maintenant être décrit en liaison avec la figure 5. On réalise tout d'abord une fonction KeySchedule 202, similaire à la fonction KeySchedule réalisée durant le procédé de cryptage des données, réalisant ainsi une diversification de la clé secrète Ksecret. KeySchedule est exécutée N fois, N correspondant aux nombres de rondes réalisées durant le procédé de cryptage. The random key must, however, be known for decrypting the encrypted data. For this, in parallel with the steps described above, the method also performs, during the first round, a function KeySchedule, shown in Figure 2, from the secret key Ksecret, thus delivering a first diversified key Kdiv, l. This function 107 KeySchedule is also repeated during the next rounds using each time the diversified key Kdiv calculated previously. By calculating the difference between a diversified random key mn Kal, m and a diversified key meme Kdiv, m (operation 109 in FIG. 2), with m natural integer such that 1 <- m <- N, DifKm information is obtained. usable to realize the decryption of the data. It is then possible to perform the decryption from this information DifKm and the secret key Ksecret. It is preferable to calculate the difference DifKm during a round that is substantially in the middle of the set of rounds. In the example described above, the encryption being performed on 10 rounds, so we choose to achieve this difference during the fifth round (m = 5), that is to say to calculate the difference DifK5 = Ka, 5 - Kdiv 5. However, it is possible to choose another value of m. A method for decrypting the previously encrypted data will now be described in connection with FIG. 5. Firstly, a KeySchedule function 202 is produced, similar to the KeySchedule function performed during the data encryption process, thereby realizing a diversification of the data. secret key Ksecret. KeySchedule is executed N times, N being the number of rounds made during the encryption process.

Lorsque la fonction KeySchedule a calculé la mème clé diversifiée Kdiv,m, l'information Difxm = Ka1,m ù Kdiv,m est ajoutée à la mème clé diversifiée Kdiv,m• On obtient alors la meme clé aléatoire diversifiée Ka1,m• On continue alors la fonction KeySchedule 202 à partir de la mème clé aléatoire diversifiée Kai,m, permettant ainsi d'obtenir la dernière clé aléatoire diversifiée Ka1,N• Un fonction 204 de diversification inverse de clé, appelée InvKeySchedule permet alors de délivrer en sortie les N clés aléatoires diversifiées Kam_,1 à Kai,N utilisées lors du cryptage des données. Cette fonction InvKeySchedule réalise l'opération matricielle inverse de la fonction KeySchedule La obtenue par la la forme Kai,i-1 si . (i-1)ème clé aléatoire diversifiée Ka1,i-1 fonction InvKeySchedule est alors de InvKeySchedule (Kaki) , c'est-à-dire que Kal,l ko,o 4,0 k2 0 k3,0 ko,1 k1,1 k2 1 k3,1 alors la (i-1) èmeclé aléatoire Ka1,i-1 s'écrit sous la forme : When the KeySchedule function has computed the diversified key meme Kdiv, m, the information Difxm = Ka1, m ù Kdiv, m is added to the same diversified key Kdiv, m • We then obtain the same diversified random key Ka1, m • On then continues the KeySchedule function 202 from the same random multi-key key Kai, m, thus making it possible to obtain the last diversified random key Ka1, N • A reverse key diversification function 204, called InvKeySchedule, then makes it possible to output the N diversified random keys Kam_, 1 to Kai, N used during data encryption. This InvKeySchedule function performs the inverse matrix operation of the KeySchedule function The obtained by the form Kai, i-1 if. (i-1) The diversified random key Ka1, i-1 InvKeySchedule function is then of InvKeySchedule (Khaki), that is to say that Kal, l ko, o 4.0 k2 0 k3.0 kb, 1 k1 , 1 k2 1 k3,1 then the (i-1) èmeclé random Ka1, i-1 is written in the form:

(ko o e sub(ko 2 O+ ko,3 ) O+ Rcon (t -1) ko 1 O+ ko o ko 2 O+ ko 1 ko 3 O+ ko 2 k1 0 O+ sub(k12 O+ k13 ) k1 1 O+ k1 o k12 O k11 k13 O+ k12 k2 0 sub(k2,2 k2,3 ) k2,1 O+ k2,0 k2,2 k2,1 k2,3 O+ k2,2 k30 sub(k32 k33) k31 ek30 k32 k31 k33 Ok32) A partir des N clés aléatoires diversifiées obtenues, on réalise ensuite un déchiffrement 206 des données Z. Ce déchiffrement va être détaillé en liaison avec la figure 6. On réalise une fonction 208 AddRoundKey qui est similaire à la fonction AddRoundKey 118. Cette étape est similaire pour le cryptage et le décryptage car l'opération d'addition OU Exclusif est également sa propre opération inverse. On réalise donc ici un OU Exclusif entre les données cryptées Z et la dernière (Nème) clé aléatoire diversifiée. On exécute ensuite une fonction 210 InvShiftRows sur les données obtenues en sortie de AddRoundKey 208. Cette fonction 210 est la fonction inverse de ShiftRows . Cette fonction InvShiftRows consiste en une transposition décalant cycliquement les mots des lignes de la matrice obtenue en sortie de AddRoundKey 208. Les mots des lignes sont décalés suivant un décalage circulaire à droite, le nombre de cases du décalage dépendant de la ligne : les mots de la première ligne de la matrice ne sont pas décalés, les mots de la seconde ligne sont décalés d'une case vers la droite, les mots de la troisième ligne sont décalés de deux cases vers la droite et les mots de la quatrième ligne sont décalés de trois cases vers la droite. (ko oe sub (ko 2 O + ko, 3) O + Rcon (t -1) ko 1 O + ko o ko 2 O + ko 1 ko 3 O + ko 2 k1 0 O + sub (k12 O + k13) k1 1 O + k1 o k12 O k11 k13 O + k12 k2 0 sub (k2,2 k2,3) k2,1 O + k2,0 k2,2 k2,1 k2,3 O + k2,2 k30 sub (k32 k33) k31 ek30 k32 k31 k33 Ok32) From of the N diversified random keys obtained, a decryption 206 of the data Z is then carried out. This decryption will be detailed with reference to FIG. 6. An AddRoundKey function 208 is produced which is similar to the AddRoundKey function 118. This step is similar for the Encryption and decryption because the OR addition operation is also its own inverse operation. An exclusive OR is thus realized between the encrypted data Z and the last (Nth) diversified random key. A function 210 InvShiftRows is then executed on the data obtained at the output of AddRoundKey 208. This function 210 is the inverse function of ShiftRows. This function InvShiftRows consists of a transposition cyclically shifting the words of the rows of the matrix obtained at the output of AddRoundKey 208. The words of the lines are shifted according to a circular shift to the right, the number of squares of the shift depending on the line: the words of the first line of the matrix are not shifted, the words of the second line are shifted one box to the right, the words of the third line are shifted two squares to the right and the words of the fourth line are shifted three boxes to the right.

Par exemple, si on a en entrée de la fonction InvShiftRows une matrice M telle que : /M0,0 M0,1 Ml,0 M1,1 M 21 M3,0 M3,1 M0,3 M1,3 M23 M3,3 % M= M12 M on obtient alors en sortie la matrice : /MO ,O Mo Mo 2 M0 3 M13 M10 Mil Mie M2,2 M2,3 M2,0 Al2,1 M3,3 M3,0 % Le procédé de décryptage exécute ensuite une fonction 212, appelée InvSubBytes , dans laquelle chaque mot de la matrice obtenue à l'étape précédente est remplacé par un autre mot. Pour cela, une transformation élémentaire appelée invsub est appliquée sur chaque mot à transformer. Pour cela, on réalise l'inverse de la transformation affine utilisée pour la transformation élémentaire sub , puis on applique l'inverse multiplicatif sur le résultat. La fonction InvSubBytes est donc une fonction de substitution non linéaire. Cette opération de substitution peut également être représentée sous la forme d'un tableau comportant les valeurs de substitution des mots des données codées. Un mot (ici un octet) dont la valeur est notée x,y , où x et y représentent respectivement les bits de poids fort et de poids faible, est donc substitué par le mot dont la valeur se trouve dans le tableau représenté sur la figure 7, au croisement de la ligne x et de la colonne InvShifiRows(M) = y correspondantes. Par exemple, si le mot à substituer a pour valeur {04}, on a alors : SubBytes({04}) = {30}. Ces fonctions réalisées ci-dessus correspondent aux fonctions inverses de celles réalisées durant la dernière ronde du procédé de cryptage. Les quatre fonctions inverses de celles correspondant aux rondes 1 à N-1 du procédé de cryptage sont ensuite réalisées. On exécute tout d'abord une fonction AddRoundKey 214, par exemple similaire à la fonction AddRoundKey 208, en utilisant la hème clé aléatoire diversifiée Ka1,h correspondant au numéro h de ronde. Une fonction 216, appelée InvMixColumns , correspondant à l'inverse de la fonction MixColumns réalise ensuite une multiplication matricielle dans GF(28) entre la matrice obtenue en sortie de la fonction AddRoundKey 214 et une matrice constante Bo telle que : /Oe Ob Od 09' 09 Oe Ob Od Bo Od 09 Oe Ob ~Ob Od 09 Oe) Ce calcul s'effectue par colonne, c'est-à-dire que chaque colonne dépend de toute la colonne d'entrée. On exécute ensuite une fonction InvShiftRows 218, par exemple similaire à la fonction InvShiftRows 210, sur les données obtenues en sortie de InvMixColumns 216. La ronde est terminée par un fonction InvSubBytes 220, par exemple similaire à la fonction InvSubBytes 212. Le décryptage des données Z est alors terminé en réalisant la dernière ronde, correspondant à l'inverse de la première ronde, ou ronde initiale, du cryptage. Cette dernière ronde consiste en une fonction AddRoundKey 222 similaire aux autres fonctions AddRoundKey réalisées. On obtient en sortie de cette fonction AddRoundKey 222 les données décryptées S. La figure 8 représente un exemple d'implémentation d'un circuit 300 mettant en oeuvre le procédé de cryptage à clé secrète aléatoire décrit précédemment. Les données à crypter sont entrées sur un bus 302 de 32 bits, et les données cryptées sont délivrées en sortie du circuit 300 sur un bus de sortie 304 également de 32 bits. La clé secrète est entrée sur un bus 306 également de 32 bits. Des moyens de conversion 308 convertissent quatre mots de 32 bits de données en une seule donnée S de longueur 128 bits contenu dans un registre. De même, des moyens de conversion 310 convertissent la clé secrète en une seule donnée Ksecret de 128 bits, 192 bits ou 256 bits. Au niveau de la sortie du circuit 300, des moyens de conversion 312 convertissent les données cryptées Z de 128 bits en mots de 32 bits sur le bus de sortie 304. For example, if the input of the InvShiftRows function has a matrix M such that: / M0.0 M0.1 Ml, 0 M1.1 M 21 M3.0 M3.1 M0.3 M1.3 M23 M3.3% M = M12 M then obtained at the output the matrix: / MO, O Mo Mo 2 M0 3 M13 M10 Mil Mie M2.2 M2.3 M2.0 Al2.1 M3.3 M3.0% The decryption method then executes a function 212, called InvSubBytes, in which each word of the matrix obtained in the previous step is replaced by another word. For this, an elementary transformation called invsub is applied to each word to transform. For this, we carry out the inverse of the affine transformation used for the elementary transformation sub, then we apply the multiplicative inverse on the result. The InvSubBytes function is therefore a nonlinear substitution function. This substitution operation can also be represented in the form of a table comprising the substitution values of the words of the coded data. A word (here an octet) whose value is denoted x, y, where x and y respectively represent the bits of high and low weight, is therefore substituted by the word whose value is in the table represented in the figure. 7, at the intersection of the line x and the column InvShifiRows (M) = y corresponding. For example, if the word to substitute has the value {04}, then we have: SubBytes ({04}) = {30}. These functions performed above correspond to the inverse functions of those performed during the last round of the encryption process. The four inverse functions of those corresponding to rounds 1 to N-1 of the encryption method are then performed. First, an AddRoundKey function 214, for example similar to the AddRoundKey function 208, is executed using the diversified random key heme Ka1, h corresponding to the round number h. A function 216, called InvMixColumns, corresponding to the inverse of the MixColumns function, then performs a matrix multiplication in GF (28) between the matrix obtained at the output of the AddRoundKey function 214 and a constant matrix Bo such that: / Oe Ob Od 09 This calculation is carried out by column, that is to say that each column depends on the entire input column. An InvShiftRows function 218, for example similar to the InvShiftRows function 210, is then executed on the data obtained at the output of InvMixColumns 216. The round is terminated by an InvSubBytes function 220, for example similar to the InvSubBytes function 212. The decryption of the data Z is then finished by performing the last round, corresponding to the inverse of the first round, or initial round, of the encryption. This last round consists of an AddRoundKey 222 function similar to the other AddRoundKey functions performed. The output of this AddRoundKey function 222 is the decrypted data S. FIG. 8 represents an exemplary implementation of a circuit 300 implementing the random secret key encryption method described above. The data to be encrypted is entered on a 32 bit bus 302, and the encrypted data is output from the circuit 300 on an output bus 304 also 32 bits. The secret key is entered on a bus 306 also 32 bits. Conversion means 308 converts four 32-bit words of data into a single 128-bit length S data contained in a register. Likewise, converting means 310 converts the secret key into a single 128-bit, 192-bit or 256-bit Ksecret data. At the output of the circuit 300, converting means 312 converts the 128-bit Z encrypted data into 32-bit words on the output bus 304.

Un contrôleur d'état 314 cadence la diversification des clés aléatoires KeySchedule réalisée par des moyens de diversification 316 et le chiffrement des données par des moyens de chiffrement 318. Ces moyens de chiffrement 318 exécutent les fonctions SubBytes , ShiftRows , MixColumns et AddRoundKey . La diversification de la clé secrète (fonction 107 de la figure 2) peut être réalisée par les moyens de diversification 316 si ceux-ci sont assez rapides pour réaliser deux diversifications distinctes durant une ronde, comme c'est le cas sur la figure 8, ou par d'autres moyens de diversification. Dans le deux cas, on délivrera également en sortie du circuit 300 la valeur de la différence Difxm = Kal,m ù Kdiv,m permettant de réaliser un décryptage ultérieur des données. Chaque ronde est effectuée sur un cycle, les clés aléatoires diversifiées étant produites parallèlement à l'exécution des rondes. Cette synchronisation de calcul est réalisée par le contrôleur d'état 314. Différents signaux de commande sont également échangés entre les différents composants du circuit 300. A la fin des N rondes, le contrôleur d'état 314 autorise l'envoi du texte crypté aux moyens de conversion 312. Le nombre aléatoire Nbam_ utilisé dans ce procédé de cryptage peut être obtenu à partir d'un générateur de nombre aléatoire extérieur au circuit 300, ou en utilisant un état interne dudit circuit 300 de mise en oeuvre du procédé de cryptage. Le nombre aléatoire Nbal utilisé par le procédé de cryptage peut être directement cet état interne ou le nombre obtenu en sortie du générateur, ou bien être le résultat de l'addition de la clé aléatoire précédente (utilisée pour le codage d'un précédent bloc de données) à l'état interne ou au nombre obtenu en sortie du générateur. On peut également choisir aléatoirement entre ces différentes possibilités pour chaque bloc de données à crypter. A state controller 314 speeds the diversification of KeySchedule random keys realized by means of diversification 316 and the encryption of the data by encryption means 318. These encryption means 318 execute the functions SubBytes, ShiftRows, MixColumns and AddRoundKey. The diversification of the secret key (function 107 of FIG. 2) can be achieved by the diversification means 316 if they are fast enough to carry out two distinct diversifications during a round, as is the case in FIG. 8, or by other means of diversification. In both cases, the output value of the circuit 300 will also be delivered with the value of the difference Difxm = Kal, m ù Kdiv, m making it possible to perform a subsequent decryption of the data. Each round is performed on a cycle, with the diversified random keys being produced in parallel with the execution of the rounds. This calculation synchronization is carried out by the state controller 314. Different control signals are also exchanged between the various components of the circuit 300. At the end of the N rounds, the state controller 314 authorizes the sending of the encrypted text to conversion means 312. The random number Nbam_ used in this encryption method can be obtained from a random number generator outside the circuit 300, or by using an internal state of said circuit 300 for implementing the encryption method. The random number Nbal used by the encryption method can be directly this internal state or the number obtained at the output of the generator, or be the result of the addition of the previous random key (used for the coding of a previous block of data) to the internal state or to the number obtained at the output of the generator. One can also choose randomly between these different possibilities for each block of data to be encrypted.

La figure 9 représente un exemple d'implémentation d'un circuit 400 mettant en oeuvre le procédé de décryptage à clé secrète aléatoire décrit précédemment. Les données à décrypter sont entrées sur un bus 402 de 32 bits, et les données décryptées sont délivrées en sortie du circuit 400 sur un bus de sortie 404 également de 32 bits. La clé secrète, ainsi que la valeur de la différence DifKm, sont entrées sur un bus 406 également de 32 bits. FIG. 9 represents an exemplary implementation of a circuit 400 implementing the random secret key decryption method described above. The data to be decrypted is entered on a 32 bit bus 402, and the decrypted data is output from the circuit 400 on an output bus 404 also of 32 bits. The secret key, as well as the value of the difference DifKm, are input on a bus 406 also of 32 bits.

Des moyens de conversion 408 convertissent quatre mots de 32 bits de données en une seule donnée de longueur 128 bits contenu dans un registre. De même, des moyens de conversion 410 convertissent la clé secrète et la différence DifKm en des données de 128 bits, 192 bits ou 256 bits. Au niveau de la sortie du circuit 400, des moyens de conversion 412 convertissent les données décryptées de 128 bits en mots de 32 bits sur le bus de sortie 404. Un contrôleur d'état 414 cadence la diversification de la clé secrète KeySchedule réalisée par des moyens 416, permettant d'obtenir la dernière clé aléatoire diversifiée à partir de la clé secrète et de l'information de différence de clés DifKm• Ces moyens 416 réalisent ensuite la diversification inverse permettant d'obtenir les clés aléatoires diversifiées. Le contrôleur d'état 414 cadence également le déchiffrement des données par des moyens de déchiffrement 418. Ces moyens de déchiffrement 418 exécutent les fonctions InvSubBytes , InvShiftRows , InvMixColumns et AddRoundKey . Conversion means 408 converts four 32-bit words of data into a single 128-bit length data contained in a register. Likewise, converting means 410 converts the secret key and the difference DifKm into 128-bit, 192-bit or 256-bit data. At the output of the circuit 400, converting means 412 converts the 128-bit decrypted data into 32-bit words on the output bus 404. A state controller 414 speeds the diversification of the KeySchedule secret key performed by means 416, making it possible to obtain the last diversified random key from the secret key and the key difference information DifKm. These means 416 then perform the inverse diversification making it possible to obtain the diversified random keys. The state controller 414 also speeds the decryption of the data by decryption means 418. These decryption means 418 execute the functions InvSubBytes, InvShiftRows, InvMixColumns and AddRoundKey.

Chaque ronde est effectuée sur un cycle, les clés aléatoires diversifiées étant produites parallèlement à l'exécution des rondes. Cette synchronisation de calcul est réalisée par le contrôleur d'état 414. Différents signaux de commande sont également échangés entre les différents composants du circuit 400. A la fin des N rondes, le contrôleur d'état 414 autorise l'envoi du texte décrypté aux moyens de conversion 412. Each round is performed on a cycle, with the diversified random keys being produced in parallel with the execution of the rounds. This calculation synchronization is carried out by the state controller 414. Different control signals are also exchanged between the different components of the circuit 400. At the end of the N rounds, the state controller 414 authorizes the sending of the decrypted text to conversion means 412.

Le fait d'utiliser la différence DifKm au milieu du chiffrement (par exemple à la cinquième ou sixième ronde si le chiffrement est réalisé en 10 rondes) permet de sortir ce nombre DifKm sans perdre de temps au niveau du chiffrement (un procédé réalisant le cryptage en 10 rondes sur un bus de 32 bits peut finir d'extraire cette valeur en 4 rondes et donc avant la fin de l'exécution du chiffrement) et de limiter la perte de temps au niveau du déchiffrement.30 The fact of using the difference DifKm in the middle of the encryption (for example in the fifth or sixth round if the encryption is done in 10 rounds) makes it possible to output this number DifKm without losing time in the level of the encryption (a method realizing the encryption in 10 rounds on a 32-bit bus can finish extracting this value in 4 rounds and thus before the end of the execution of the encryption) and limit the loss of time in decryption.30

Claims (26)

REVENDICATIONS 1. Procédé de cryptage d'un message de données S comportant au moins une étape de calcul (102) d'au moins une clé aléatoire Kat, o à partir d'au moins un nombre aléatoire Nba1 et d'au moins une clé secrète Ksecret, et un chiffrement (105) des données S à partir de la clé aléatoire Ka1,o et d'une pluralité de clés aléatoires diversifiées Ka1,1 à Ka1,N calculées à partir de la clé aléatoire Kat, o . 1. A method of encrypting a data message S comprising at least one calculation step (102) of at least one random key Kat, o from at least one random number Nba1 and at least one secret key Ksecret, and an encryption (105) of the data S from the random key Ka1, o and a plurality of diversified random keys Ka1,1 to Ka1, N calculated from the random key Kat, o. 2. Procédé de cryptage selon la revendication 1, calculant N clés aléatoires diversifiées Ka1,1 à Ka1,N, N étant un nombre entier naturel strictement supérieur à 1 égal au nombre de rondes du procédé de cryptage. 2. Encryption method according to claim 1, calculating N diversified random keys Ka1,1 to Ka1, N, N being a natural number strictly greater than 1 equal to the number of rounds of the encryption method. 3. Procédé de cryptage selon la revendication 2, les N clés aléatoires diversifiées Ka1,1 à Ka1,N étant obtenues au moins par les étapes suivantes . - calcul d'une première clé aléatoire diversifiée Ka1, 1 à partir de la clé aléatoire Ka1,o ; - calcul de chacune des N-1 clés aléatoires diversifiées Kaki, avec i nombre entier naturel tel que 2 <-i <- N, à partir d'une précédente clé aléatoire diversifiée Kai,i_1. 3. Encryption method according to claim 2, the N random diversified keys Ka1,1 to Ka1, N being obtained at least by the following steps. calculating a first diversified random key Ka1, 1 from the random key Ka1, o; calculating each of the N-1 diversified random keys Kaki, with a natural integer such that 2 <-i <- N, from a previous diversified random key Kai, i_1. 4. Procédé de cryptage selon la revendication 3, le chiffrement (105) des données S étant réalisé au moins par les étapes suivantes : 37 - calcul (104) de données codées S cod, 0 à partir de la clé aléatoire Ka1, o et des données S à crypter ; - calcul de N données codées Scod,1 à s d, N, chacune des N données codées Scod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données codées Scod,i_1 et de la ième clé aléatoire diversifiée Kat, i ; les Nème s données codées Scod,N étant des données cryptées Z. 4. Encryption method according to claim 3, the encryption (105) of the data S being performed at least by the following steps: 37 - computation (104) coded data S cod, 0 from the random key Ka1, o and S data to encrypt; calculation of N coded data Scod, 1 to sd, N, each of N coded data Scod, i, with i such that 1 <- i <- N, being calculated from previous coded data Scod, i_1 and the ith diversified random key Kat, i; the Nth Scod encoded data, N being encrypted data Z. 5. Procédé de cryptage selon l'une des revendications 3 ou 4, comportant en outre les étapes suivantes . calcul (107) d'au moins une première clé diversifiée Kd V,1 à partir de la clé secrète Ksecret ; calcul (107) de N-1 clés diversifiées Kdiv,2 à KdiV,N, chacune des N-1 clés diversifiées Kdiv,i, avec i tel que 2 <- i <- N, étant calculée à partir d'une précédente clé diversifiée Kdiv,i_1 ; - calcul (109) d'une différence DifKra entre une mème clé aléatoire diversifiée Ka1,m et une mème clé diversifiée Kdiv,m, avec m nombre entier naturel tel que 1 <- m <-N. 5. Encryption method according to one of claims 3 or 4, further comprising the following steps. calculating (107) at least a first diversified key Kd V, 1 from the secret key Ksecret; calculation (107) of N-1 diversified keys Kdiv, 2 to KdiV, N, each of the N-1 diversified keys Kdiv, i, with i such that 2 <- i <- N, being calculated from a previous key diversified Kdiv, i_1; calculating (109) a difference DifKra between a diversified random key mn Ka1, m and a diversified key meme Kdiv, m, with m natural integer such that 1 <- m <-N. 6. Procédé de cryptage selon l'une des revendications 4 ou 5, le chiffrement (105) de données S étant réalisé par : a) une étape d'addition (104) de la clé aléatoire Ka1,o à une matrice formée par les données s à crypter, formant des données codées Scod,o ; puis 38 b) N-1 exécutions des étapes suivantes : - substitution (106) de chaque mot d'une matrice formée par des (i-1)èmes données codées Scod,i-1, avec i tel que 1 <- i <-N-1 par un autre mot de taille similaire ; - transposition cyclique (108) des mots d'une matrice formée par les données obtenues après l'étape précédente de substitution (106) ; - multiplication matricielle (110) 10 entre une matrice constante et une matrice formée par les données obtenues après l'étape précédente de transposition (108) ; - addition (112) entre une matrice formée par les données obtenues apres l'étape précédente de multiplication (110) et une ième clé aléatoire diversifiée Ka1,i, avec i tel que 1 <- i <- N-1, les données obtenues étant des ièmes données codées S cod,i ; puis c) les étapes suivantes . substitution (114) de chaque mot d'une matrice formée par les (N-1)èmes données codées Scod, (N-1) par un autre mot de taille similaire ; - transposition cyclique (116) des mots d'une matrice formée par les données obtenues après 25 l'étape précédente de substitution (114) ; - addition (118) entre une matrice formée par les données obtenues apres l'étape précédente de transposition (116) et la Nème clé aléatoire diversifiée Ka1,N, les données obtenues étant 30 des données cryptées Z. 15 20 6. Encryption method according to one of claims 4 or 5, the encryption (105) of data S being achieved by: a) a step of adding (104) the random key Ka1, o to a matrix formed by the data to be encrypted, forming coded data Scod, o; then 38 b) N-1 executions of the following steps: substitution (106) of each word of a matrix formed by (i-1) th coded data Scod, i-1, with i such that 1 <- i < -N-1 by another word of similar size; cyclic transposition (108) of the words of a matrix formed by the data obtained after the preceding substitution step (106); matrix multiplication (110) between a constant matrix and a matrix formed by the data obtained after the preceding transposition step (108); adding (112) between a matrix formed by the data obtained after the preceding multiplication step (110) and a diversified random ith key Ka1, i, with i such that 1 <- i <- N-1, the data obtained being the second coded data S cod, i; then c) the following steps. substituting (114) each word of a matrix formed by the (N-1) Scod encoded data (N-1) with another word of similar size; cyclic transposition (116) of the words of a matrix formed by the data obtained after the preceding substitution step (114); adding (118) between a matrix formed by the data obtained after the preceding transposition step (116) and the Nth diversified random key Ka1, N, the data obtained being encrypted data Z. 7. Dispositif de cryptage (300) d'un message de données S comportant au moins des moyens de calcul (316) d'au moins une clé aléatoire Ka1,o à partir d'au moins un nombre aléatoire Nba1 et d'au moins une clé secrète Ksecret, et des moyens de chiffrement (318) des données S à partir d'une pluralité de clés aléatoires diversifiées Ka1,1 à Ka1,N calculées à partir de la clé aléatoire Kat, o, avec N nombre entier naturel strictement supérieur à 1. 7. Device for encrypting (300) a data message S comprising at least calculation means (316) for at least one random key Ka1, o from at least one random number Nba1 and at least one a secret key Ksecret, and encryption means (318) of the data S from a plurality of diversified random keys Ka1,1 to Ka1, N calculated from the random key Kat, o, with N natural number strictly greater than 1. 8. Dispositif de cryptage (300) selon la revendication 7, comportant en outre : - des moyens de calcul (316) d'au moins une première clé aléatoire diversifiée Ka1,1 à partir de la clé aléatoire Kat, o ; - des moyens de calcul (316) de chacune des N-1 clés aléatoires diversifiées Kaki, avec i nombre entier naturel tel que 2 <- i <- N, à partir d'une précédente clé aléatoire diversifiée Ka1,i-1• 8. An encryption device (300) according to claim 7, further comprising: calculating means (316) of at least a first diversified random key Ka1,1 from the random key Kat, o; calculating means (316) of each of the diversified random key N-1 Kaki, with a natural integer such that 2 <- i <- N, from a previous diversified random key Ka1, i-1 • 9. Dispositif de cryptage (300) selon la revendication 8, les moyens de chiffrement (318) des données S comportant au moins : - des moyens de calcul de données codées S d, 0 à partir de la clé aléatoire Ka1,o et des données S à crypter ; - des moyens de calcul de N données codées Scod, 1 à Scod,N, chacune des N données codées Scod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données codées Scod,i_1 et de la ième clé aléatoire diversifiée Ka1,i ;les Nèmes données codées Scod,N étant des données cryptées Z. 9. Encrypting device (300) according to claim 8, the encryption means (318) of the data S comprising at least: coded data calculation means S d, 0 from the random key Ka1, o and S data to be encrypted; means for calculating N coded data Scod, 1 to Scod, N, each of N coded data Scod, i, with i such that 1 <- i <- N, being calculated from previous coded data Scod, i_1 and of the ith diversified random key Ka1, i, the Nth coded data Scod, N being encrypted data Z. 10. Dispositif de cryptage (300) selon l'une des revendications 8 ou 9, comportant en outre : des moyens de calcul (316) d'au moins une première clé diversifiée Kdiv,1 à partir de la clé secrète Ksecret ; des moyens de calcul (316) d'une mème clé diversifiée Kdiv,m à partir d'une (m-1) ème clé diversifiée Kdiv, (m-1) , avec m nombre entier naturel tel que 2 <-m <- N ; - des moyens de calcul (318) d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et la mème clé diversifiée Kdiv,m• 10. Encrypting device (300) according to one of claims 8 or 9, further comprising: calculating means (316) of at least a first diversified key Kdiv, 1 from the secret key Ksecret; calculating means (316) of a diversified key meme Kdiv, m from a diversified (m-1) th key Kdiv, (m-1), with m natural integer such that 2 <-m <- NOT ; calculating means (318) for a difference DifKm between a diversified random key meme Ka1, m and the diversified key meme Kdiv, m 11. Dispositif de cryptage (300) selon l'une des revendications 9 ou 10, les moyens de chiffrement (318) des données S comportant : - des moyens d'addition de la clé aléatoire Ka1,o et des clés aléatoires diversifiées Ka1,1 à Kat, N à des matrices de données ; - des moyens de substitution de chaque mot d'une matrice de données par un autre mot de taille similaire ; - des moyens de transposition cyclique des mots d'une matrice de données -des moyens de multiplication matricielle entre une matrice de données et une matrice constante.30 11. Encrypting device (300) according to one of claims 9 or 10, the encryption means (318) of the data S comprising: - means for adding the random key Ka1, o and diversified random keys Ka1, 1 to Kat, N to matrices of data; means for substituting each word of a data matrix with another word of similar size; means for cyclically transposing the words of a data matrix; means for matrix multiplication between a data matrix and a constant matrix. 12. Procédé de décryptage d'un message de données cryptées Z comportant au moins une étape de calcul (202) d'une Nème clé aléatoire diversifiée Ka1,N à partir d'une clé secrète Ksecret et d'une différence DifKm entre une meme clé aléatoire diversifiée Ka1,m et une meme clé diversifiée Kdiv,m, une étape de diversification inverse (204) réalisée à partir de la Nème clé aléatoire diversifiée Ka1,N calculant N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 et une clé aléatoire Ka1,o, et un déchiffrement (206) des données Z à partir des N clés aléatoires diversifiées Ka1,1 à Ka1,N et de la clé aléatoire Ka1,o, avec N nombre entier naturel strictement supérieur à 1 et m nombre entier naturel tel que 1 <- m <- N. 12. A method for decrypting an encrypted data message Z comprising at least one step of calculating (202) a diversified random key N1 Ka1, N from a secret key Ksecret and a difference DifKm between a meme diversified random key Ka1, m and the same diversified key Kdiv, m, an inverse diversification step (204) carried out from the nth diversified random key Ka1, N calculating N-1 diversified random keys Ka1, N-1 to Ka1, 1 and a random key Ka1, o, and a decryption (206) of the data Z from the N diversified random keys Ka1,1 to Ka1, N and the random key Ka1, o, with N natural integer strictly greater than 1 and m natural integer such that 1 <- m <- N. 13. Procédé de décryptage selon la revendication 12, N étant le nombre de rondes du procédé de décryptage. 13. decryption method according to claim 12, N being the number of rounds of the decryption method. 14. Procédé de décryptage selon l'une des revendications 12 ou 13, le calcul (202) de la Nème clé aléatoire diversifiée Ka1,N étant obtenu au moins par les étapes suivantes - calcul d'au moins une première clé diversifiée Kdiv,1 à partir de la clé secrète Ksecret ; - calcul de m-1 clés diversifiées Kdiv, 2 à v,m, chacune des m-1 clés diversifiées Kdiv, , avec i nombre entier naturel tel que 2 <- i <- m, étant calculée à partir d'une précédente clé diversifiée Kdiv,i-1 ; - addition de la mème clé diversifiée Kdiv,m calculée précédemment et de la différence DifKm entre la mème clé aléatoire diversifiée Ka1,m et la mème clé diversifiée Kdiv,m ; - calcul de (N-m+1) clés aléatoires diversifiées Kai,m+1 a Ka1, Nr chacune de ces clés aléatoires diversifiées Kat, , avec j nombre entier naturel tel que m+1 < j <- N, étant calculée à partir d'une précédente clé aléatoire diversifiée 14. decryption method according to one of claims 12 or 13, the calculation (202) of the Nth diversified random key Ka1, N being obtained at least by the following steps - calculating at least a first diversified key Kdiv, 1 from the secret key Ksecret; calculation of m-1 diversified keys Kdiv, 2 to v, m, each of the diversified m-1 keys Kdiv,, with i natural number such that 2 <- i <- m, being calculated from a previous key diversified Kdiv, i-1; - addition of the diversified key meme Kdiv, m previously calculated and the difference DifKm between the diversified random meme key Ka1, m and the diversified key meme Kdiv, m; calculation of (N-m + 1) diversified random keys Kai, m + 1 to Ka1, Nr each of these diversified random keys Kat, with j natural number such that m + 1 <j <- N, being calculated at from a previous diversified random key 15. Procédé de décryptage selon l'une des revendications 12 à 14, la diversification inverse (204) réalisant le calcul de N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 et de la clé aléatoire Ka1,o, chacune de ces clés Kaki, avec i nombre entier naturel tel que 0 N-1, étant calculée à partir d'une précédente clé aléatoire diversifiée Ka1,i+1. 15. decryption method according to one of claims 12 to 14, the inverse diversification (204) performing the calculation of N-1 diversified random keys Ka1, N-1 to Ka1,1 and random key Ka1, o, each of these keys kaki, with i natural number such as 0 N-1, being calculated from a previous diversified random key Ka1, i + 1. 16. Procédé de décryptage selon l'une des revendications 12 à 15, le déchiffrement (206) des données cryptées Z étant réalisé au moins par les étapes suivantes : - calcul de données décodées Scie, od,0 à partir de la Nème clé aléatoire diversifiée Ka1,N et des données cryptées Z ; - calcul de N données décodées Sdecod, i à Sdecod,N, chacune des N données décodées Sdecod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données décodées Sdecod,i-1 et de la (N-i+1)ème clé aléatoire diversifiée Kal,N_i+1 ; les Nèmes données décodées S ecod,N étant des d données décryptées S. 43 16. decryption method according to one of claims 12 to 15, the decryption (206) encrypted data Z being achieved at least by the following steps: - calculation of decoded data Saw, od, 0 from the nth random key diversified Ka1, N and encrypted data Z; calculating N decoded data Sdecod, i to Sdecod, N, each of N decoded data Sdecod, i, with i such that 1 <- i <- N, being calculated from previous decoded data Sdecod, i-1 and of the (N-i + 1) diversified random key Kal, N_i + 1; the Nth decoded data S ecod, N being decoded data D S. 43 17. Procédé de décryptage selon l'une des revendications 12 à 16, le déchiffrement (206) de données étant réalisé par : a) les étapes suivantes - addition (208) de la Nème clé aléatoire diversifiée Ka1,N à une matrice formée par les données cryptées Z, formant ainsi des données décodées Sdec d 0 ; - transposition cyclique (210) des mots d'une matrice formée par les données obtenues après l'étape précédente d'addition (208) ; -substitution (212) de chaque mot d'une matrice formée par les données obtenues après l'étape précédente de transposition cyclique (210) par un autre mot de taille similaire, formant ainsi des premières données décodées Sdecod,l ; puis b) N-1 exécutions des étapes suivantes : -addition (214) entre une matrice formée par des i-1 èmes données décodées S ( ) decod,i-1 et une ième clé aléatoire diversifiée Kali, avec i tel que 2 <- i <- N ; - multiplication matricielle (216) entre une matrice formée par les données obtenues après l'étape précédente d'addition (214) et une matrice constante ; - transposition cyclique (218) des mots d'une matrice formée par les données obtenues après l'étape précédente de multiplication (216) - substitution (220) de chaque mot d'une matrice formée par les données obtenues après l'étape précédente de transposition cyclique (218), les données obtenues étant des ièmes données décodées Sdecod,i ; puis c) une étape d'addition (222) entre une matrice formée par les Nèmes données décodées Sdecod,N et la clé aléatoire Ka1,o, les données obtenues étant des données décryptées S. 17. decryption method according to one of claims 12 to 16, the decryption (206) of data being achieved by: a) the following steps - addition (208) of the Nth diversified random key Ka1, N to a matrix formed by the encrypted data Z, thus forming decoded data Sdec d 0; cyclic transposition (210) of the words of a matrix formed by the data obtained after the preceding step of adding (208); substituting (212) each word of a matrix formed by the data obtained after the previous cyclic transposition step (210) by another word of similar size, thereby forming first decoded data Sdecod, 1; then b) N-1 executions of the following steps: -addition (214) between a matrix formed by i-1 decoded data S () decod, i-1 and a diversified random Ith key Kali, with i such that 2 < - i <- N; matrix multiplication (216) between a matrix formed by the data obtained after the preceding addition step (214) and a constant matrix; cyclic transposition (218) of the words of a matrix formed by the data obtained after the preceding step of multiplication (216) - substitution (220) of each word of a matrix formed by the data obtained after the preceding step of cyclic transposition (218), the data obtained being deceded second data Sdecod, i; then c) an addition step (222) between a matrix formed by the Nth decoded data Sdecod, N and the random key Ka1, o, the data obtained being decrypted data S. 18. Dispositif de décryptage (400) d'un message de données cryptées Z comportant au moins des moyens de calcul (416) d'une Nème clé aléatoire diversifiée Ka1,N à partir d'une clé secrète Ksecret et d'une différence DifKm entre une mème clé aléatoire diversifiée Ka1,m et une mème clé diversifiée Kdiv,m, des moyens (416) de diversification inverse à partir de la Nème clé aléatoire diversifiée Ka1,N calculant N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 et la clé aléatoire Ka1,o, et des moyens de déchiffrement (418) des données Z à partir des N clés aléatoires diversifiées Ka1,1 à Ka1,N et de la clé aléatoire Ka1,o, avec N nombre entier naturel strictement supérieur à 1 et m nombre entier naturel tel que 1 <- m <- N. 18. Device for decrypting (400) an encrypted data message Z comprising at least calculation means (416) of a diversified random key N1 Ka1, N from a secret key Ksecret and a difference DifKm between a diversified random key mn Ka1, m and a diversified key meme Kdiv, m, inverse diversification means (416) from the diversified random Nth key Ka1, N calculating N-1 diversified random keys Ka1, N-1 to Ka1,1 and the random key Ka1, o, and means for decrypting (418) the data Z from the N diversified random keys Ka1,1 to Ka1, N and the random key Ka1, o, with N natural integer strictly greater than 1 and m natural integer such that 1 <- m <- N. 19. Dispositif de décryptage (400) selon la revendication 18, les moyens de calcul (416) de la Nème clé aléatoire diversifiée Ka1,N comportant au moins : - des moyens de calcul d'au moins une première clé diversifiée Kdiv,1 à partir de la clé secrète Ksecret ; - des moyens de calcul de m-1 clés diversifiées Kdiv,2 à Kdiv,m, chacune des m-1 clés diversifiées Kdiv,i, avec i nombre entier naturel tel que2 <- i <- m, étant calculée à partir d'une précédente clé diversifiée Kdiv,i-1 ; - des moyens d'addition de la mème clé diversifiée Kdiv,m calculée précédemment et de la différence DifKm entre la mème clé aléatoire diversifiée Ka1,m et la meme clé diversifiée Kdiv,m ; - des moyens de calcul de (N-m+1) clés aléatoires diversifiées Ka1,m+1 a Ka1,N, chacune de ces clés aléatoires diversifiées avec j nombre entier naturel tel que m+1 < j <- N, étant calculée à partir d'une précédente clé aléatoire diversifiée Ka1,j-1 19. decryption device (400) according to claim 18, the calculation means (416) of the Nth diversified random key Ka1, N comprising at least: - means for calculating at least a first diversified key Kdiv, 1 to from the secret key Ksecret; means for calculating diversified key m-1 Kdiv, 2 to Kdiv, m, each of the diversified key m-1 Kdiv, i, with a natural integer such that 2 <- i <- m, being calculated from an earlier diversified key Kdiv, i-1; means for adding the diversified differential meme Kdiv m previously calculated and the difference DifKm between the diversified random multiemem Ka1 m and the same diversified key Kdiv m; means for calculating (N-m + 1) diversified random keys Ka1, m + 1a Ka1, N, each of these diversified random keys with a natural integer number such that m + 1 <j <- N, being calculated from a previous diversified random key Ka1, j-1 20. Dispositif de décryptage (400) selon l'une des revendications 18 ou 19, les moyens (416) de diversification inverse calculant N-1 clés aléatoires diversifiées Ka1,N-1 à Ka1,1 et la clé aléatoire Ka1,o, chacune de ces clés Kaki, avec i nombre entier naturel tel que 0 N-1, étant calculée à partir d'une précédente clé aléatoire diversifiée Ka1,i+1. 20. decryption device (400) according to one of claims 18 or 19, the means (416) of inverse diversification calculating N-1 diversified random keys Ka1, N-1 to Ka1,1 and the random key Ka1, o, each of these keys Kaki, with i natural number such as 0 N-1, being calculated from a previous diversified random key Ka1, i + 1. 21. Dispositif de décryptage (400) selon l'une des revendications 18 à 20, les moyens de déchiffrement (418) des données comportant au moins : - des moyens de calcul de données décodées Sdecod,O à partir de la Neme clé aléatoire diversifiée Ka1,N et des données cryptées Z ; - des moyens de calcul de N données décodées Sdecod,l a Sdecod,N, chacune des N données décodées Sdecod,i, avec i tel que 1 <- i <- N, étant calculée à partir de précédentes données décodées Sdecod,i-1 et de la (N-i+1)ème clé aléatoire diversifiée Kal,N_i+1 ;les Nèmes données décodées S decod,N étant des données décryptées S. 21. decryption device (400) according to one of claims 18 to 20, the decryption means (418) of data comprising at least: - decoded data calculation means Sdecod, O from the Neme diversified random key Ka1, N and encrypted data Z; means for calculating N decoded data Sdecod, Sdecod, N, each of N decoded data Sdecod, i, with i such that 1 <- i <- N, being calculated from previous decoded data Sdecod, i-1 and of the (N-i + 1) th diversified random key Kal, N_i + 1, the Nth decoded data S decod, N being decrypted data S. 22. Dispositif de décryptage (400) selon l'une des revendications 18 à 21, les moyens de déchiffrement (418) de données comportant : - des moyens d'addition de la clé aléatoire Ka1,o et des clés aléatoires diversifiées Ka1,1 à Ka1,N à des matrices de données ; - des moyens de transposition cyclique des mots d'une matrice de données ; - des moyens de substitution de chaque mot d'une matrice de données par un autre mot de taille similaire ; - des moyens de multiplication matricielle entre une matrice de données et une matrice constante. 22. decryption device (400) according to one of claims 18 to 21, the decryption means (418) of data comprising: - means of adding the random key Ka1, o and diversified random keys Ka1,1 at Ka1, N to data matrices; means for cyclically transposing the words of a data matrix; means for substituting each word of a data matrix with another word of similar size; - Matrix multiplication means between a data matrix and a constant matrix. 23. Dispositif de traitement de signaux destiné à mettre en oeuvre un procédé de cryptage d'un message de données selon l'une des revendications 1 à 6 et/ou un procédé de décryptage d'un message de données cryptées selon l'une des revendications 12 à 17. 23. A signal processing device for implementing a method for encrypting a data message according to one of claims 1 to 6 and / or a method for decrypting an encrypted data message according to one of the claims 12 to 17. 24. Carte à puce comportant au moins un dispositif (300) de cryptage d'un message de données selon l'une des revendications 7 à 11 et/ou un dispositif (400) de décryptage d'un message de données cryptées selon l'une des revendications 18 à 22. 24. Smart card comprising at least one device (300) for encrypting a data message according to one of claims 7 to 11 and / or a device (400) for decrypting an encrypted data message according to the one of claims 18 to 22. 25. Support de données, pouvant être lu par un système informatique, comportant des données sousforme codée, pour mettre en oeuvre un procédé de cryptage d'un message de données selon l'une des revendications 1 à 6 et/ou un procédé de décryptage d'un message de données cryptées selon l'une des revendications 12 à 17. 25. Data carrier, readable by a computer system, comprising coded data, for implementing a method of encrypting a data message according to one of claims 1 to 6 and / or a decryption method an encrypted data message according to one of claims 12 to 17. 26. Produit logiciel comportant un support de données susceptible d'être lu par un système informatique, permettant la mise en oeuvre d'un procédé de cryptage d'un message de données selon l'une des revendications 1 à 6 et/ou un procédé de décryptage d'un message de données cryptées selon l'une des revendications 12 à 17. 26. Software product comprising a data medium that can be read by a computer system, enabling the implementation of a method for encrypting a data message according to one of claims 1 to 6 and / or a method decryption of an encrypted data message according to one of claims 12 to 17.
FR0759464A 2007-11-30 2007-11-30 METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY. Withdrawn FR2924550A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
FR0759464A FR2924550A1 (en) 2007-11-30 2007-11-30 METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY.
PCT/EP2008/066454 WO2009068658A1 (en) 2007-11-30 2008-11-28 Methods and devices for encrypting and decrypting a data message with random secret key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
FR0759464A FR2924550A1 (en) 2007-11-30 2007-11-30 METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY.

Publications (1)

Publication Number Publication Date
FR2924550A1 true FR2924550A1 (en) 2009-06-05

Family

ID=39712236

Family Applications (1)

Application Number Title Priority Date Filing Date
FR0759464A Withdrawn FR2924550A1 (en) 2007-11-30 2007-11-30 METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY.

Country Status (2)

Country Link
FR (1) FR2924550A1 (en)
WO (1) WO2009068658A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002277B (en) * 2018-11-05 2019-03-22 湖南继善高科技有限公司 A kind of pseudo-random signal dynamic configuration system and method
CN115801274B (en) * 2022-11-17 2023-07-11 广州芯德通信科技股份有限公司 Firmware protection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000041356A1 (en) * 1998-12-30 2000-07-13 Koninklijke Kpn N.V. Method and device for cryptographically processing data
WO2002063822A1 (en) * 2001-02-08 2002-08-15 Stmicroelectronics S.A. Secure method for secret key cryptographic calculation and component using said method
EP1722502A1 (en) * 2005-05-10 2006-11-15 Research In Motion Limited Key masking for cryptographic processes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6490353B1 (en) * 1998-11-23 2002-12-03 Tan Daniel Tiong Hok Data encrypting and decrypting apparatus and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000041356A1 (en) * 1998-12-30 2000-07-13 Koninklijke Kpn N.V. Method and device for cryptographically processing data
WO2002063822A1 (en) * 2001-02-08 2002-08-15 Stmicroelectronics S.A. Secure method for secret key cryptographic calculation and component using said method
EP1722502A1 (en) * 2005-05-10 2006-11-15 Research In Motion Limited Key masking for cryptographic processes

Also Published As

Publication number Publication date
WO2009068658A1 (en) 2009-06-04

Similar Documents

Publication Publication Date Title
CA2570617C (en) Method and device for carrying out a cryptographic calculation
EP1379023B1 (en) En- and Decryption Method executed by an integrated Circuit masking a nonlinear transformation as the SUBBYTE operation
EP1769603B1 (en) Method and device for executing cryptographic calculation
JP2760799B2 (en) Encryption method
EP1638245B2 (en) Protection of a DES algorithm
EP3139365B1 (en) Verification of the resistance of an electronic circuit to covert channel attacks
EP3139364B1 (en) Dpa protection of a rijndael algorithm
EP1798888B1 (en) DES-algorithm execution protection
US20150270967A1 (en) Method for performing an encryption of an aes type, and corresponding system and computer program product
EP1779584A1 (en) Stream cipher combining system and method
EP3228043B1 (en) Method of encryption with dynamic diffusion and confusion layers
EP3139363B1 (en) Protection of a rijndael algorithm
FR2995111A1 (en) PROTECTION AGAINST AUXILIARY CHANNELS
EP2159952B1 (en) Protection of an encryption algorithm
EP2509252B1 (en) Secured cryptographic calculation method, in particular against DFA and one-way attacks, and corresponding component
EP0935858B1 (en) Method for data decorrelation
FR2924550A1 (en) METHODS AND DEVICES FOR ENCRYPTING AND DECRYPTING A DATA MESSAGE WITH A RANDOM SECRET KEY.
Kumar et al. Enhanced cost effective symmetric key algorithm for small amount of data
FR2949887A1 (en) METHOD FOR CRYPTOGRAPHIC DATA PROCESSING
CN118158021A (en) Data transmission processing method and system based on Glink bus protocol
FR2836311A1 (en) Cryptography method for generation of a pseudo-random number and or for encryption or decryption and or for authentication of data using an encryption key and a streaming symmetric cryptographic algorithm
FR2984646A1 (en) Method for processing cryptographic data, involves randomly choosing derivative key from initial key to complement bit of initial key, and implementing derivation process based on selected key

Legal Events

Date Code Title Description
TP Transmission of property
ST Notification of lapse

Effective date: 20110801