FR3010561A1 - METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER - Google Patents

METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER Download PDF

Info

Publication number
FR3010561A1
FR3010561A1 FR1358798A FR1358798A FR3010561A1 FR 3010561 A1 FR3010561 A1 FR 3010561A1 FR 1358798 A FR1358798 A FR 1358798A FR 1358798 A FR1358798 A FR 1358798A FR 3010561 A1 FR3010561 A1 FR 3010561A1
Authority
FR
France
Prior art keywords
data
numbers
encoded data
modulo
circuit
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.)
Granted
Application number
FR1358798A
Other languages
French (fr)
Other versions
FR3010561B1 (en
Inventor
Alexandre Venelli
Francois Dassance
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.)
Rambus Inc
Original Assignee
Inside Secure SA
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 Inside Secure SA filed Critical Inside Secure SA
Priority to FR1358798A priority Critical patent/FR3010561B1/en
Publication of FR3010561A1 publication Critical patent/FR3010561A1/en
Application granted granted Critical
Publication of FR3010561B1 publication Critical patent/FR3010561B1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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/004Countermeasures against attacks on cryptographic mechanisms for fault attacks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7271Fault verification, e.g. comparing two values which should be the same, unless a computational fault occurred

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Advance Control (AREA)

Abstract

L'invention concerne un procédé de protection de l'intégrité d'une donnée dans un circuit de traitement (PRC), le procédé comprenant des étapes consistant à : choisir deux nombres entiers positifs (N, R), premiers entre eux, un premier (N) des deux nombres étant supérieur à une donnée à protéger (ID1), encoder la donnée à protéger par une opération de multiplication par un nombre idempotent (IP) modulo le produit (N R) des deux nombres, le nombre idempotent étant choisi idempotent dans un anneau ayant un nombre d'éléments distincts égal au produit des deux nombres, et égal à un multiple d'un second (R) des deux nombres et égal à un multiple du premier des deux nombres augmenté de un, et activer un signal d'erreur (FS) si une réduction modulaire modulo le second des deux nombres, de la donnée encodée (ED1) n'est pas nulle.The invention relates to a method for protecting the integrity of a data in a processing circuit (PRC), the method comprising the steps of: choosing two positive integers (N, R), first between them, a first (N) of the two numbers being greater than a datum to be protected (ID1), encoding the data to be protected by a multiplication operation by an idempotent number (IP) modulo the product (NR) of the two numbers, the idempotent number being chosen idempotent in a ring having a number of distinct elements equal to the product of the two numbers, and equal to a multiple of a second (R) of the two numbers and equal to a multiple of the first of the two numbers increased by one, and activate a signal of error (FS) if a modular reduction modulo the second of the two numbers, of the encoded data (ED1) is not null.

Description

PROCEDE DE PROTECTION DE L'INTEGRITE DE DONNEES A L'AIDE D'UN NOMBRE IDEMPOTENT La présente invention concerne la protection contre l'injection de faute de données manipulées par un circuit de traitement de données. Elle s'applique notamment à la protection d'un processeur, qu'il soit intégré dans un microcircuit comme ceux implantés dans les cartes à puce, ou dans un ordinateur. L'injection de faute dans un circuit de traitement vise généralement à découvrir des données sensibles manipulées par le circuit. Parmi les attaques connues d'un circuit, les attaques par injection de faute consistent à introduire des perturbations dans le circuit en particulier pendant qu'il exécute des opérations sensibles telles que des algorithmes cryptographiques. Ces attaques peuvent entrainer la modification d'une donnée ou d'une adresse dans un registre, sachant que généralement, il n'est pas possible de détecter qu'une donnée ou une adresse est invalide. La perturbation d'un registre d'adresse peut perturber l'exécution d'un programme et par exemple déclencher l'exécution d'une routine de téléchargement émettant sur un port des données mémorisées par le circuit. Ces perturbations peuvent être réalisées en appliquant au circuit un ou plusieurs éclairages brefs par exemple par un faisceau laser, ou un ou plusieurs pics de tension sur l'un de ses contacts.The present invention relates to the protection against fault injection of data manipulated by a data processing circuit. It applies in particular to the protection of a processor, whether integrated in a microcircuit like those implanted in smart cards, or in a computer. The injection of fault in a processing circuit is generally intended to discover sensitive data manipulated by the circuit. Among the known attacks of a circuit, fault injection attacks consist in introducing disturbances in the circuit in particular while executing sensitive operations such as cryptographic algorithms. These attacks can cause the modification of a data or an address in a register, knowing that generally, it is not possible to detect that a datum or an address is invalid. The disturbance of an address register can disrupt the execution of a program and for example trigger the execution of a download routine transmitting on a port data stored by the circuit. These disturbances can be achieved by applying to the circuit one or more brief lighting for example by a laser beam, or one or more voltage peaks on one of its contacts.

Afin de lutter contre ces attaques variées par nature, de nombreuses solutions très différentes les unes des autres ont été apportées. L'invention concerne plus particulièrement la lutte contre les attaques portant atteinte à l'intégrité de données et d'adresses lors de leur manipulation par un circuit de traitement. A cet effet, il est connu d'associer à chaque donnée une signature par exemple du type CRC (Cyclic Redundancy Check), calculée à partir de la donnée. Une telle signature convient notamment pour détecter une erreur de transmission d'une donnée. En revanche, lorsque la donnée subit une transformation résultant par exemple de l'exécution de calculs, la signature d'origine de la donnée n'est plus cohérente avec la donnée en sortie du traitement. Une nouvelle signature doit donc être calculée à partir de la donnée de sortie si l'intégrité de la donnée de sortie doit être protégée.In order to fight against these various attacks by nature, many solutions very different from each other have been made. The invention relates more particularly to the fight against attacks that compromise the integrity of data and addresses when manipulated by a processing circuit. For this purpose, it is known to associate with each data a signature for example CRC type (Cyclic Redundancy Check), calculated from the data. Such a signature is particularly suitable for detecting a data transmission error. On the other hand, when the datum undergoes a transformation resulting for example from the execution of computations, the original signature of the datum is no longer coherent with the data at the output of the processing. A new signature must therefore be calculated from the output data if the integrity of the output data is to be protected.

Il en résulte qu'une signature ne permet pas de détecter une perturbation se produisant durant un traitement. Il est donc souhaitable de protéger l'intégrité de données, y compris durant l'exécution d'un traitement portant sur ces données.As a result, a signature does not detect a disturbance occurring during a treatment. It is therefore desirable to protect the integrity of data, including during processing of such data.

Des modes de réalisation concernent un procédé de protection de l'intégrité d'une donnée dans un circuit de traitement, le procédé comprenant des étapes consistant à : choisir deux nombres entiers positifs, premiers entre eux, un premier des deux nombres étant supérieur à une donnée à protéger, encoder la donnée à protéger par une opération de multiplication par un nombre idempotent modulo le produit des deux nombres, le nombre idempotent étant choisi idempotent dans un anneau ayant un nombre d'éléments distincts égal au produit des deux nombres, et égal à un multiple d'un second des deux nombres et égal à un multiple du premier des deux nombres augmenté de un, et activer un signal d'erreur si une réduction modulaire modulo le second des deux nombres, de la donnée encodée n'est pas nulle. Selon un mode de réalisation, le procédé comprend des étapes de : fourniture de la donnée encodée en entrée d'un traitement réalisé par le circuit de traitement, le traitement comprenant une ou plusieurs opérations, chaque opération du traitement étant exclusivement soit une addition, soit une soustraction, soit une multiplication, application du traitement à la donnée encodée pour obtenir une nouvelle donnée encodée, les opérandes de chaque opération d'addition ou de soustraction du traitement étant encodées par l'opération de multiplication par le nombre idempotent modulo le produit des deux nombres, et activation du signal d'erreur si une réduction modulaire modulo le second des deux nombres, d'une des données encodées n'est pas nulle. Selon un mode de réalisation, le procédé comprend une étape de décodage d'une des données encodées en réalisant une réduction modulaire 30 modulo le premier des deux nombres, de la donnée encodée. Selon un mode de réalisation, le premier des deux nombres est choisi égal à 216 + 1, et le second des deux nombres est choisi égal à 28 - 1 ou 28 + 1.Embodiments provide a method for protecting the integrity of a data in a processing circuit, the method comprising the steps of: selecting two positive integers, first ones between them, a first of the two numbers being greater than one data to be protected, to encode the data to be protected by a multiplication operation by a number idempotent modulo the product of the two numbers, the idempotent number being chosen idempotent in a ring having a number of distinct elements equal to the product of the two numbers, and equal to a multiple of a second of the two numbers and equal to a multiple of the first of the two numbers increased by one, and to activate an error signal if a modular reduction modulo the second of the two numbers, of the encoded data is not nothing. According to one embodiment, the method comprises the steps of: providing the input encoded data of a processing performed by the processing circuit, the processing comprising one or more operations, each processing operation being exclusively either an addition or a subtraction, ie a multiplication, application of the processing to the encoded data to obtain a new encoded data, the operands of each operation of addition or subtraction of the processing being encoded by the multiplication operation by the idempotent number modulo the product of the two numbers, and activation of the error signal if a modular reduction modulo the second of the two numbers, of one of the encoded data is not zero. According to one embodiment, the method comprises a step of decoding one of the encoded data by performing a modular reduction modulo the first of the two numbers of the encoded data. According to one embodiment, the first of the two numbers is chosen equal to 216 + 1, and the second of the two numbers is chosen equal to 28 - 1 or 28 + 1.

Selon un mode de réalisation, l'une des données encodées est fournie à l'entrée d'un coprocesseur générant le signal d'erreur en fonction de la donnée encodée fournie. Selon un mode de réalisation, le coprocesseur réalise le décodage de 5 la donnée encodée fournie en entrée du coprocesseur. Selon un mode de réalisation, la donnée encodée est une adresse d'accès à une donnée ou à une instruction de programme dans une mémoire, et est fournie à l'entrée d'une unité de contrôle de la mémoire, l'unité de contrôle générant le signal d'erreur en fonction de la donnée 10 encodée. Selon un mode de réalisation, l'unité de contrôle réalise le décodage de la donnée encodée fournie à l'unité de contrôle, pour obtenir une adresse d'accès à la mémoire ou une donnée à écrire dans la mémoire. Selon un mode de réalisation, chaque donnée encodée est décodée 15 seulement si le signal d'erreur généré à partir de la donnée encodée est à l'état inactif. Selon un mode de réalisation, la donnée encodée est une adresse d'instruction dans une mémoire programme, une adresse d'instruction consécutive suivante étant obtenue en ajoutant le nombre idempotent à la 20 donnée encodée. Des modes de réalisation concernent également un circuit de traitement de données, configuré pour : encoder une donnée à protéger par une opération de multiplication par un nombre idempotent modulo le produit de deux nombres entiers positifs, premiers entre eux, un premier des deux 25 nombres étant supérieur à la donnée reçue, le nombre idempotent étant choisi idempotent dans un anneau ayant un nombre d'éléments distincts égal au produit des deux nombres, et égal à un multiple d'un second des deux nombres et égal à un multiple du premier des deux nombres augmenté de un, et activer un signal d'erreur si une réduction modulaire modulo le second 30 des deux nombres, de la donnée résultante encodée n'est pas nulle. Selon un mode de réalisation, le circuit est configuré pour : transmettre la donnée encodée en entrée d'un traitement comprenant une ou plusieurs opérations, chaque opération du traitement étant exclusivement soit une addition, soit une soustraction, soit une multiplication, et appliquer le 35 traitement à la donnée encodée pour obtenir une nouvelle donnée encodée, les opérandes de chaque opération d'addition ou de soustraction du traitement étant encodées par l'opération de multiplication par le nombre idempotent modulo le produit des deux nombres. Selon un mode de réalisation, le circuit est configuré pour décoder l'une des données encodées en réalisant une réduction modulaire modulo le premier des deux nombres, de la donnée encodée. Selon un mode de réalisation, le circuit comprend un coprocesseur ou une unité de contrôle d'une mémoire configuré pour recevoir l'une des données encodées, et comprenant un circuit d'interface comportant un circuit de test configuré pour activer le signal d'erreur si une réduction modulaire modulo le second des deux nombres, de la donnée encodée reçue n'est pas nulle. Selon un mode de réalisation, le circuit d'interface comprend un circuit de décodage configuré pour appliquer une réduction modulaire modulo le 15 premier des deux nombres, à une donnée à décoder. Selon un mode de réalisation, le circuit comprend un coprocesseur réalisant les opérations de réduction modulaire modulo le produit des deux nombres. 20 Des exemples de réalisation de l'invention seront décrits dans ce qui suit, à titre non limitatif en relation avec les figures jointes parmi lesquelles : les figures 1 et 2 représentent schématiquement un processeur et un coprocesseur mettant en oeuvre un procédé de protection de l'intégrité de données, selon différents modes de réalisation, 25 les figures 3 à 5 représentent schématiquement un processeur et une mémoire, mettant en oeuvre le procédé de protection, selon divers modes de réalisation. Selon un mode de réalisation, le procédé de protection de l'intégrité de données met en oeuvre un nombre idempotent dans un anneau fini EN.R à 30 N-R (ou N x R) éléments distincts, N et R étant des nombres entiers positifs premiers entre eux et le nombre N étant plus grand que toutes les données à protéger. En d'autres termes, la taille en nombre de bits du nombre N (soit LOG2(N)) est choisie égale ou plus grande que la taille des données à protéger. Pour être idempotent, un nombre IP vérifie l'équation suivante : 35 IP-IP mod (N-R) = IP (1) dans laquelle mod représente l'opération de réduction modulaire. En outre, le nombre IP est choisi de manière à présenter les propriétés suivantes : IP = 1 mod N (2) IP = 0 mod R (3) II peut être démontré que les équations (2) et (3) sont équivalentes à l'équation suivante : IP = (R-1 mod N) - R (4) Il peut être également démontré que le nombre IP obtenu par l'équation (4) est idempotent dans l'anneau ZN.R. Ainsi, l'équation (4) peut être utilisée pour déterminer le nombre IP. A titre d'exemple extremement simplifié pour faciliter la compréhension, les nombres N et R peuvent être choisis égaux respectivement à 7 et 4 qui sont premiers entre eux. Le nombre inverse R-1 modulo N correspondant à R (= 4) peut être déterminé égal à 2 modulo 7. Il en résulte que IP est égal à 4x2 = 8. Le nombre IP vérifie l'équation (1) car IP- IP est égal à 64, soit 8 modulo 28 (28 = N-R). Le procédé comprend une étape d'encodage de chaque donnée (ou adresse) ID à protéger, consistant à multiplier la donnée par le nombre idempotent IP modulo (N-R), conformément à la relation suivante : ED = ID- IP mod (N-R) (5) ED étant la donnée encodée. Dans ce qui suit, le terme "donnée" peut également désigner une adresse d'une donnée ou d'une instruction exécutable par un processeur, dans une mémoire.According to one embodiment, one of the encoded data is supplied to the input of a coprocessor generating the error signal according to the encoded data provided. According to one embodiment, the coprocessor realizes the decoding of the encoded data input to the coprocessor. According to one embodiment, the encoded data is an access address to a data item or a program instruction in a memory, and is supplied to the input of a memory control unit, the control unit generating the error signal according to the encoded data. According to one embodiment, the control unit decodes the encoded data supplied to the control unit, to obtain a memory access address or data to be written to the memory. According to one embodiment, each encoded data is decoded only if the error signal generated from the encoded data is in the idle state. According to one embodiment, the encoded data is an instruction address in a program memory, a subsequent consecutive instruction address being obtained by adding the idempotent number to the encoded data. Embodiments also relate to a data processing circuit, configured to: encode data to be protected by a multiplication operation by an idempotent number modulo the product of two positive integers, first ones between them, a first of the two numbers being greater than the received data, the idempotent number being chosen idempotent in a ring having a number of distinct elements equal to the product of the two numbers, and equal to a multiple of a second of the two numbers and equal to a multiple of the first of the two When the numbers are increased by one, and an error signal is activated if a modulo reduction modulo the second of the two numbers, the resulting data item is not zero. According to one embodiment, the circuit is configured to: transmit the input encoded data of a processing comprising one or more operations, each operation of the processing being exclusively either an addition, a subtraction or a multiplication, and apply the processing with the encoded data to obtain a new encoded data, the operands of each operation of adding or subtracting the processing being encoded by the multiplication operation by the idempotent number modulo the product of the two numbers. According to one embodiment, the circuit is configured to decode one of the encoded data by performing a modular reduction modulo the first of the two numbers of the encoded data. According to one embodiment, the circuit comprises a coprocessor or a control unit of a memory configured to receive one of the encoded data, and comprising an interface circuit comprising a test circuit configured to activate the error signal. if a modular reduction modulo the second of the two numbers, received encoded data is not zero. According to one embodiment, the interface circuit comprises a decoding circuit configured to apply a modular reduction modulo the first of the two numbers, to a data item to be decoded. According to one embodiment, the circuit comprises a coprocessor carrying out the modular reduction operations modulo the product of the two numbers. Exemplary embodiments of the invention will be described in the following, without limitation in connection with the accompanying figures in which: Figures 1 and 2 schematically show a processor and a coprocessor implementing a method of protecting the Data integrity, according to various embodiments, Figures 3 to 5 schematically show a processor and a memory, implementing the protection method, according to various embodiments. According to one embodiment, the data integrity protection method implements an idempotent number in a finite ring EN.R at NR (or N x R) distinct elements, N and R being prime positive integers between them and the number N being larger than all the data to be protected. In other words, the number-of-bits size of the number N (ie LOG2 (N)) is chosen equal to or larger than the size of the data to be protected. To be idempotent, an IP number satisfies the following equation: IP-IP mod (N-R) = IP (1) in which mod represents the modular reduction operation. In addition, the number IP is chosen to have the following properties: IP = 1 mod N (2) IP = 0 mod R (3) It can be shown that equations (2) and (3) are equivalent to following equation: IP = (R-1 mod N) - R (4) It can also be demonstrated that the number IP obtained by equation (4) is idempotent in the ring ZN.R. Thus, equation (4) can be used to determine the IP number. As an extremely simplified example to facilitate understanding, the numbers N and R may be chosen to be equal to 7 and 4, respectively, which are prime between them. The inverse number R-1 modulo N corresponding to R (= 4) can be determined equal to 2 modulo 7. It follows that IP is equal to 4x2 = 8. The IP number satisfies equation (1) because IP-IP is equal to 64, ie 8 modulo 28 (28 = NR). The method comprises a step of encoding each data item (or address) ID to be protected, consisting of multiplying the data by the idempotent number IP modulo (NR), according to the following relation: ED = ID-IP mod (NR) ( 5) ED being the encoded data. In what follows, the term "data" can also designate an address of a data item or an instruction executable by a processor, in a memory.

L'intégrité de la donnée ED ainsi encodée peut être vérifiée à tout moment sur la base des relations (3) et (5), en calculant une donnée de contrôle T obtenue en appliquant l'opération de réduction modulaire modulo R à la donnée encodée ED et en comparant la donnée de contrôle à 0 : T = ED mod R (6) Ainsi, la donnée encodée ED est intègre si et seulement si la donnée T est nulle. La donnée encodée ED peut être décodée à tout moment sur la base des relations (2) et (5). Ainsi, la donnée D correspondant à la donnée encodée ED peut être calculée par application de l'opération de réduction modulo N à la donnée ED : D = ED mod N (7) Il s'avère qu'une donnée encodée peut subir un traitement comprenant plusieurs opérations arithmétiques élémentaires, sans devoir être décodée et à nouveau encodée. Cette propriété peut être vérifiée si les opérations arithmétiques élémentaires sont limitées à des opérations d'addition, de soustraction et de multiplication, en excluant les opérations de division. La donnée résultante du traitement doit être calculée modulo (N-R). Les données résultant d'opérations intermédiaires du traitement, peuvent également être calculées modulo (N-R). Chaque opérande des opérations d'addition et de soustraction du traitement G doit elle-même être encodée par la relation (5) ou résulter du produit d'un nombre entier relatif par une ou plusieurs données encodées par la relation (5). Ainsi un traitement G ayant les propriétés précitées peut être modélisé par la relation suivante : G(ID) = j ai IDmi-F Euk ai IDk' (8) dans laquelle les nombres ai sont des entiers relatifs, les nombres mi, i, j et k sont des nombres entiers positifs et IDk sont d'autres données. Si le traitement G est appliqué aux données encodées correspondantes modulo (N-R), on obtient : G(ED) = [Ei aiEDmi + ai EDI mod (N - R) (9) dans laquelle ED et EDk sont des données encodées obtenues en appliquant la relation (5) aux données ID et IDk. Il résulte des relations (1), (5) et (9) que : G(ED) = IP - [Ei j ai IDmi+ Eilk ai mod (N - R) (10) Il résulte des relations (8) et (10) que : G(ED) = IP-G(ID) mod (N-R) (1 1 ) Par conséquent, la donnée G(ED) résultant de l'application du traitement G modulo (N-R) aux données encodées ED, EDk est égale au résultat de l'encodage, par application de la relation (5), de la donnée G(ID) résultant de l'application du traitement G aux données non encodées ID, IDk correspondantes.The integrity of the ED data thus encoded can be verified at any time on the basis of relations (3) and (5), by calculating a control data T obtained by applying the modulo R modular reduction operation to the encoded data. ED and comparing the control data to 0: T = ED mod R (6) Thus, the encoded data ED is integral if and only if the data T is zero. The encoded data ED can be decoded at any time on the basis of relations (2) and (5). Thus, the data D corresponding to the encoded data ED can be calculated by applying the modulo reduction operation N to the ED data: D = ED mod N (7) It turns out that an encoded data item can be processed comprising several elementary arithmetic operations, without having to be decoded and encoded again. This property can be checked if elementary arithmetic operations are limited to addition, subtraction and multiplication operations, excluding division operations. The resulting data of the treatment must be calculated modulo (N-R). Data resulting from intermediate operations of processing, can also be calculated modulo (N-R). Each operand of the addition and subtraction operations of the processing G must itself be encoded by the relation (5) or result from the product of a relative integer by one or more data encoded by the relation (5). Thus a treatment G having the aforementioned properties can be modeled by the following relation: G (ID) = j ai IDmi-F Euk ai IDk '(8) in which the numbers ai are relative integers, the numbers mi, i, j and k are positive integers and IDk are other data. If the treatment G is applied to the corresponding encoded data modulo (NR), we obtain: G (ED) = [Ei aiEDmi + ai EDI mod (N-R) (9) in which ED and EDk are encoded data obtained by applying the relation (5) to the data ID and IDk. It follows from the relations (1), (5) and (9) that: G (ED) = IP - [Ei i ai IDmi + Eilk ai mod (N-R) (10) It follows from relations (8) and (10) ) that: G (ED) = IP-G (ID) mod (NR) (1 1) Therefore, the data G (ED) resulting from the application of the G modulo (NR) processing to the encoded data ED, EDk is equal to the result of the encoding, by application of the relation (5), of the data G (ID) resulting from the application of the processing G to the corresponding non-encoded data ID, IDk.

D'après la relation (5), l'encodage d'une donnée produit une donnée encodée ayant une taille en nombre de bits augmentée de la taille en nombre de bits du nombre R (soit LOG2(R)). Si la taille du nombre N correspond à la taille des données à protéger, la taille des données encodées est égale à la somme de la taille du nombre N et de la taille du nombre R. L'ensemble EN.R comprend N-R nombres distincts modulo (N-R), parmi lesquels seuls N nombres sont valides, c'est-à-dire vérifient la condition T = 0 et sont susceptibles d'être décodés par la relation (7). Il en résulte que plus le nombre R est choisi grand, plus la probabilité (= 1/R) qu'une injection de faute génère une donnée valide est faible.According to the relation (5), the encoding of a data item produces an encoded data having a bit size increased by the number of bits of the number R (ie LOG2 (R)). If the size of the number N corresponds to the size of the data to be protected, the size of the encoded data is equal to the sum of the size of the number N and the size of the number R. The set EN.R comprises NR distinct numbers modulo (NR), of which only N numbers are valid, that is, satisfy the condition T = 0 and are capable of being decoded by the relation (7). As a result, the larger the number R is chosen, the lower the probability (= 1 / R) that a fault injection generates a valid datum.

La figure 1 représente un dispositif de traitement de données comprenant un processeur PRC associé à un coprocesseur CPR assurant pour le processeur PRC un traitement particulier CF1 tel qu'un traitement cryptographique. Le processeur PRC exécute un traitement FCT recevant en entrée des données ID1, ID2, IDp et fournissant en sortie une donnée résultante RD qui est transmise à un registre d'entrée RG1 du coprocesseur CPR pour être traitée par le traitement CF1 réalisé par le coprocesseur. Le traitement FCT est de la forme du traitement G tel que modélisé par la relation (8). En d'autres termes, le traitement FCT ne comporte que des opérations arithmétiques élémentaires (addition, soustraction, multiplication) à l'exclusion de la division. Selon un mode de réalisation, les données ID1, ID2, IDp sont encodées en leur appliquant la relation (5), de manière à obtenir des données encodées ED1, ED2, EDp. Les données encodées ED1-EDp sont fournies en entrée du traitement FCT. La donnée résultante fournie par le traitement FCT est ensuite réduite modulo (N-R) afin d'obtenir une donnée résultante encodée ERD qui est introduite dans le registre RG1 du coprocesseur CPR. L'opération de réduction modulo (N-R) peut être appliquée à des résultats intermédiaires du traitement FCT. Cette disposition permet notamment d'éviter que la taille d'éventuelles données résultant de traitements intermédiaires, dépasse celle de registres du processeur PRC utilisés pour réaliser le traitement FCT. Les données ID1, ID2, IDp peuvent être des adresses, sachant que les adresses ne subissent généralement que des opérations d'addition, de soustraction et de multiplication.FIG. 1 represents a data processing device comprising a processor PRC associated with a coprocessor CPR ensuring for the processor PRC a particular processing CF1 such as a cryptographic processing. The processor PRC executes a FCT processing receiving as input data ID1, ID2, IDp and outputting a resulting data RD which is transmitted to an input register RG1 of the coprocessor CPR to be processed by the processing CF1 performed by the coprocessor. FCT treatment is of the form of treatment G as modeled by relation (8). In other words, the FCT treatment comprises only elementary arithmetic operations (addition, subtraction, multiplication) excluding the division. According to one embodiment, the data ID1, ID2, IDp are encoded by applying to them the relation (5), so as to obtain encoded data ED1, ED2, EDp. The ED1-EDp encoded data is provided as input to the FCT processing. The resulting data provided by the FCT process is then modulo (N-R) reduced to obtain an ERD encoded result data which is input into the RG1 register of the coprocessor CPR. The modulo (N-R) reduction operation can be applied to intermediate results of the FCT treatment. This arrangement makes it possible in particular to avoid that the size of any data resulting from intermediate processing, exceeds that of PRC processor registers used to perform the FCT treatment. The data ID1, ID2, IDp can be addresses, knowing that the addresses generally only undergo addition, subtraction and multiplication operations.

Par ailleurs, le coprocesseur CPR comporte un circuit décodage INTF pouvant comprendre le registre RG1. Le circuit INTF comprend également des circuits MR, MN connectés à une sortie du registre RG1, et un interrupteur 11 commandé par le circuit MR. L'interrupteur 11 est connecté entre la sortie du registre RG1 et l'entrée du circuit MN. Le circuit MN est configuré pour décoder la donnée dans le registre RG1 en lui appliquant une opération de réduction modulaire modulo N conformément à la relation (7). La sortie du circuit MN est connectée à une entrée du traitement CF1 pour lui transmettre la donnée décodée RD correspondant à la donnée codée ERD figurant dans le registre RG1. Le circuit MR est configuré pour réaliser une réduction modulo R du contenu du registre RG1, pour comparer à 0 le résultat de la réduction modulo R (test de la relation (6) T = 0), et pour fournir un signal d'erreur FS dépendant du résultat de cette comparaison. Le signal FS est fourni en sortie du coprocesseur CPR et commande l'interrupteur 11. Si le signal FS est à l'état inactif, indiquant que la donnée dans le registre RG1 vérifie la relation T = 0, l'interrupteur 11 est fermé, sinon il reste ouvert. Ainsi, la donnée dans le registre RG1 est décodée et transmise en entrée du traitement CF1 seulement si elle est valide (relation T = 0 vérifée). Le coprocesseur CPR est donc configuré pour détecter qu'une donnée inscrite dans son registre d'entrée RG1 a subi une perturbation, soit parce qu'une donnée d'entrée du traitement FCT a subi une perturbation, soit pendant que le traitement FCT est actif, soit durant la transmission de cette donnée entre le processeur PRC et le coprocesseur CPR. L'interrupteur 11 permet d'éviter d'activer le traitement CF1 du coprocesseur CPR avec des données invalides. En effet, introduire des données invalides dans un circuit de traitement peut permettre de découvrir des données secrètes mises en oeuvre par le circuit de traitement. Toutefois l'interrupteur 11 peut être omis notamment pour permettre d'effectuer la vérification par le circuit MR et le décodage par le circuit MN en même temps. Le signal d'erreur FS peut être traité ultérieurement. L'interrupteur 11 peut être également omis si la donnée dans le registre RG1 peut ne pas être encodée dans certaines conditions notamment lorsque le traitement CF1 n'est pas appliqué à des données secrètes. A noter que le décodage effectué par le circuit MN, lorsqu'il est appliqué à une donnée non encodée, ne modifie pas la donnée.Moreover, the coprocessor CPR includes an INTF decoding circuit which may comprise the register RG1. The circuit INTF also comprises circuits MR, MN connected to an output of the register RG1, and a switch 11 controlled by the circuit MR. The switch 11 is connected between the output of the register RG1 and the input of the circuit MN. The circuit MN is configured to decode the data in the register RG1 by applying to it a modular reduction operation modulo N according to the relation (7). The output of the circuit MN is connected to an input of the processing CF1 to transmit the decoded data RD corresponding to the coded data ERD in the register RG1. The circuit MR is configured to carry out a modulo reduction of the contents of the register RG1, to compare the result of the reduction modulo R (test of the relation (6) T = 0) with 0, and to provide an error signal FS. depending on the result of this comparison. The signal FS is supplied at the output of the coprocessor CPR and controls the switch 11. If the signal FS is in the inactive state, indicating that the data in the register RG1 satisfies the relation T = 0, the switch 11 is closed, otherwise it remains open. Thus, the data in the register RG1 is decoded and transmitted to the input of the processing CF1 only if it is valid (relation T = 0 verified). The coprocessor CPR is therefore configured to detect that a data item entered in its input register RG1 has undergone a disturbance, either because an input data item of the FCT processing has undergone a disturbance, or while the FCT processing is active. either during the transmission of this data between the PRC processor and the coprocessor CPR. The switch 11 makes it possible to avoid activating the processing CF1 of the coprocessor CPR with invalid data. Indeed, introducing invalid data in a processing circuit may allow to discover secret data implemented by the processing circuit. However, the switch 11 may be omitted in particular to allow the verification by the MR circuit and the decoding by the circuit MN at the same time. The FS error signal can be processed later. The switch 11 may also be omitted if the data in the register RG1 may not be encoded under certain conditions, especially when the processing CF1 is not applied to secret data. Note that the decoding performed by the circuit MN, when applied to a non-encoded data, does not modify the data.

Lorsqu'une donnée doit subir des traitements plus complexes mettant en oeuvre d'autres opérations que des opérations d'addition, de soustraction et de multiplication, la donnée peut être décodée par exemple par le processeur PRC, à l'aide de la relation (7), avant d'être soumise à un traitement complexe. Chaque donnée résultant du traitement complexe peut ensuite être encodée à l'aide de la relation (5). Le processeur PRC peut 301056 1 9 également être configuré pour tester l'intégrité d'une donnée par la relation (6) à tout moment, en particulier avant de décoder une donnée. Le signal FS peut être transmis au processeur PRC et/ou à un circuit de traitement d'erreur, pour prendre toute mesure appropriée dépendant 5 notamment de l'objet dans lequel est intégré le processeur PRC. Ainsi, si le processeur PRC se trouve dans un circuit intégré, le signal FS peut révéler une attaque du circuit intégré. Dans ce cas, l'activation du signal FS peut par exemple déclencher une réinitialisation ou un blocage définitif du circuit intégré, et/ou un effacement complet d'une mémoire ou seulement de 10 données sensibles, etc. L'activation du signal FS peut aussi simplement déclencher le remplacement des données d'entrée du traitement CF1 par des données choisies aléatoirement. Selon un mode de réalisation, les nombres N et R sont choisis tels que le produit N-R puisse être stocké dans un registre du processeur PRC. 15 Selon un mode de réalisation, le nombre N est choisi égal à 216 + 1, et le nombre R est choisi égal à 28 - 1 ou 28 + 1. Dans ces conditions, les nombres N et R sont premiers entre eux, et les opérations de réduction modulaires modulo (N-R), modulo N et modulo R peuvent être réalisées par des calculs simples et peu couteux en termes de ressources et de temps de 20 calcul. Selon un mode de réalisation illustré par la figure 2, les opérations d'encodage des données, conformes à la relation (5), sont réalisées par un circuit de traitement du coprocesseur CPR (ou d'un autre coprocesseur connecté au processeur PRC). Ainsi, la figure 2 représente le processeur 25 PRC et un coprocesseur CPR1. Le coprocesseur CPR1 diffère du coprocesseur CPR en ce qu'il comprend en outre un circuit de traitement CF2. Le circuit CF2 comprend un circuit ECC réalisant l'opération d'encodage, et un registre d'entrée/sortie RG2 dans lequel le processeur PRC inscrit une donnée à encoder et dans lequel le circuit ECC inscrit la 30 donnée encodée correspondante. Par ailleurs, le processeur PRC est configuré pour faire réaliser les opérations d'encodage de données conformes à la relation (5) par le coprocesseur CPR1. Selon un mode de réalisation, les opérations de réduction modulaire modulo (N-R) effectuées par le circuit de traitement FCT et/ou sur la donnée 35 résultante fournie par le traitement FCT sont réalisées par le coprocesseur CPR1 ou un autre coprocesseur, notamment afin de décharger ce dernier d'opérations qui peuvent être couteuses en temps de calcul. Ainsi, dans l'exemple de la figure 2, le circuit CF2 du coprocesseur CPR1 comprend un circuit MRC réalisant l'opération de réduction modulaire modulo (N-R), et un registre d'entrée/sortie RG3 dans lequel le processeur PRC inscrit une donnée à traiter par le circuit MRC, et dans lequel le circuit MRC inscrit la donnée réduite correspondante. Par ailleurs, le processeur PRC est configuré pour faire réaliser les opérations de réduction modulaires modulo (N-R) par le coprocesseur CPR1. Les opérations de réduction modulaire réalisées par les circuits MR et 10 MN peuvent être également directement accessibles au processeur PRC pour pouvoir effectuer à tout moment des décodages et des tests d'intégrité de données, tout en limitant l'utilisation des ressources du processeur. Le procédé de protection de données décrit précédemment peut être également appliqué aux adresses d'accès à une mémoire. Ainsi, la figure 3 15 représente le processeur PRC, une mémoire MEM et une unité de contrôle de mémoire MCU reliant un bus d'adresse ADB et un bus de donnée DTB du processeur PRC à la mémoire MEM. Selon un mode de réalisation, l'unité MCU comprend le circuit de décodage INTF précédemment décrit. Le registre RG1 est relié au bus 20 d'adresse ADB du processeur PRC. Le circuit MN est connecté en sortie à une entrée d'adresse de la mémoire MEM. L'entrée d'adresse de la mémoire peut être connectée à un registre d'adresse ARG de la mémoire MEM. Les adresses transmises par le processeur PRC au bus d'adresse ADB, sont des adresses encodées à l'aide de la relation (5) ou des adresses calculées à 25 l'aide d'opérations d'addition, de soustraction et/ou de multiplication, modulo (N-R), portant sur des données encodées à l'aide de la relation (5). Selon un mode de réalisation, la mémoire MEM est une mémoire de données. Si le processeur PRC exécute un programme, toutes les adresses immédiates d'accès à une donnée dans la mémoire MEM et toutes les 30 valeurs immédiates ajoutées ou retranchées pour calculer une adresse d'accès à la mémoire MEM, figurant dans le programme peuvent être encodées à l'aide de la relation (5). L'encodage des adresses et valeurs immédiates figurant dans le programme exécuté par le processeur peut être effectué au moment de la génération du code exécutable par le processeur 35 PRC, par exemple par un compilateur. L'encodage des adresses et valeurs immédiates peut également être effectué au moment de l'exécution du programme par le processeur. Le compilateur peut alors insérer dans le programme les instructions nécessaires pour réaliser cet encodage. Le compilateur peut également ajouter dans le programme exécuté par le processeur PRC, des opérations de réduction modulaires modulo (N-R), à la suite d'opérations d'addition, de soustraction et de multiplication permettant de déterminer une adresse d'accès à la mémoire MEM. Certaines données manipulées par un processeur et devant être stockées dans une mémoire de données peuvent ne subir que des opérations d'addition, de soustraction et/ou de multiplication. Selon un mode de réalisation illustré par la figure 4, ces données sont encodées à l'aide de la relation (5) et les opérations qu'elles subissent sont réalisées modulo (N-R), les données résultant de ces opérations sont transmises sur le bus de données vers la mémoire MEM. Ainsi, la figure 4 représente le processeur PRC relié à la mémoire MEM par l'intermédiaire d'une unité de contrôle de mémoire MCU1. L'unité MCU1 diffère de l'unité MCU en ce que le circuit de décodage INTF est interposé sur le bus de données DTB. Les données transmises par le processeur PRC sur le bus DTB sont préalablement encodées en leur appliquant la relation (5).When data must undergo more complex processing involving other operations than addition, subtraction and multiplication operations, the data can be decoded for example by the PRC processor, using the relation ( 7), before being subjected to a complex treatment. Each data resulting from the complex processing can then be encoded using the relation (5). The PRC processor may also be configured to test the integrity of a datum by the relation (6) at any time, especially before decoding a datum. The signal FS may be transmitted to the PRC processor and / or an error processing circuit, to take any appropriate measure depending in particular on the object in which the PRC processor is integrated. Thus, if the PRC processor is in an integrated circuit, the signal FS may reveal an attack of the integrated circuit. In this case, the activation of the signal FS may, for example, trigger a reset or permanent blocking of the integrated circuit, and / or a complete erasure of a memory or only of sensitive data, etc. Activation of the FS signal can also simply trigger the replacement of the CF1 processing input data with randomly selected data. According to one embodiment, the numbers N and R are chosen such that the product N-R can be stored in a register of the processor PRC. According to one embodiment, the number N is chosen equal to 216 + 1, and the number R is chosen equal to 28 - 1 or 28 + 1. Under these conditions, the numbers N and R are prime between them, and the modulo (NR), modulo N and modulo R modular reduction operations can be performed by simple and inexpensive calculations in terms of resources and computation time. According to an embodiment illustrated in FIG. 2, the operations of encoding the data, in accordance with the relation (5), are carried out by a processing circuit of the coprocessor CPR (or another coprocessor connected to the processor PRC). Thus, Figure 2 shows the PRC processor and a coprocessor CPR1. The coprocessor CPR1 differs from the coprocessor CPR in that it further comprises a processing circuit CF2. The circuit CF2 comprises an ECC circuit performing the encoding operation, and an input / output register RG2 in which the PRC processor writes data to be encoded and in which the ECC circuit inscribes the corresponding encoded data. Moreover, the processor PRC is configured to perform the data encoding operations according to the relation (5) by the coprocessor CPR1. According to one embodiment, modulo (NR) modular reduction operations performed by the FCT processing circuit and / or the resultant data provided by the FCT process are performed by the coprocessor CPR1 or another coprocessor, in particular in order to unload the latter of operations that can be expensive in computing time. Thus, in the example of FIG. 2, the circuit CF2 of the coprocessor CPR1 comprises an MRC circuit performing the modular modulo reduction operation (NR), and an input / output register RG3 in which the PRC processor writes a data item. to be processed by the MRC circuit, and wherein the MRC circuit inserts the corresponding reduced data. Furthermore, the PRC processor is configured to perform modular modulo (N-R) reduction operations by the coprocessor CPR1. The modular reduction operations performed by the MR and 10 MN circuits can also be directly accessible to the PRC processor in order to be able to perform decoding and data integrity tests at any time, while limiting the use of the resources of the processor. The data protection method described above can also be applied to the access addresses to a memory. Thus, FIG. 3 shows the PRC processor, a memory MEM and an MCU memory control unit connecting an ADB address bus and a data bus DTB of the PRC processor to the memory MEM. According to one embodiment, the MCU unit comprises the INTF decoding circuit previously described. The register RG1 is connected to the address bus ADB of the PRC processor. The circuit MN is connected at the output to an address input of the memory MEM. The address entry of the memory can be connected to an address register ARG of the memory MEM. The addresses transmitted by the processor PRC to the address bus ADB are addresses encoded using relation (5) or addresses calculated using addition, subtraction and / or multiplication, modulo (NR), on data encoded using relation (5). According to one embodiment, the memory MEM is a data memory. If the PRC processor executes a program, all the immediate data access addresses in the MEM memory and all 30 immediate values added or removed to calculate a memory access address MEM in the program can be encoded. using the relation (5). The encoding of the addresses and immediate values appearing in the program executed by the processor can be performed at the time of the generation of the executable code by the processor PRC, for example by a compiler. The encoding of addresses and immediate values can also be done at the time of execution of the program by the processor. The compiler can then insert into the program the instructions necessary to perform this encoding. The compiler can also add in the program executed by the PRC processor modulo (NR) modular reduction operations, as a result of addition, subtraction and multiplication operations for determining a memory access address. SAME. Some data manipulated by a processor and to be stored in a data memory may only undergo addition, subtraction and / or multiplication operations. According to an embodiment illustrated in FIG. 4, these data are encoded using relation (5) and the operations they undergo are carried out modulo (NR), the data resulting from these operations are transmitted on the bus data to the MEM memory. Thus, FIG. 4 shows the processor PRC connected to the memory MEM via a memory control unit MCU1. The unit MCU1 differs from the unit MCU in that the decoding circuit INTF is interposed on the data bus DTB. The data transmitted by the PRC processor on the DTB bus is previously encoded by applying to them the relation (5).

Selon un mode de réalisation, les données à transmettre à la mémoire MEM subissent un décodage par le circuit MN du circuit INTF avant d'être inscrites dans la mémoire MEM. Les données lues dans la mémoire MEM peuvent alors subir un encodage par le processeur PRC ou par un circuit d'encodage (non représenté) qui peut être intégré dans le circuit INTF, avant d'être utilisées dans des traitements. Selon un autre mode de réalisation, les données transmises à la mémoire MEM sont mémorisées dans cette dernière sans être préalablement décodées. Dans ce cas, les données sont transmises par le circuit de décodage INTF à la mémoire MEM sans être traités par le circuit MN. Les données peuvent être décodées seulement lorsqu'elles sont transmises à un circuit d'entrée/sortie connecté au processeur PRC pour être utilisées par un dispositif externe, ou avant de subir un traitement faisant intervenir d'autres opérations qu'une addition, soustraction ou multiplication. Selon un autre mode de réalisation illustré par la figure 5, l'unité de 35 contrôle MCU est connectée entre le processeur PRC et une mémoire programme PMM contenant un programme exécuté par le processeur PRC. Le processeur PRC comprend un registre IRG de pointeur d'instruction mémorisant une adresse d'instruction à lire dans la mémoire PMM et exécuter. Toutes les adresses d'accès à la mémoire PMM et toutes les valeurs ajoutées ou retranchées pour mettre à jour le registre IRG, figurant dans le programme exécuté par le processeur PRC, peuvent être encodées à l'aide de la relation (5) au moment de la génération du code exécutable par le processeur PRC, par exemple par un compilateur. Le compilateur peut également ajouter aux opérations d'addition, de soustraction et de multiplication permettant de générer une adresse d'accès à la mémoire PMM des opérations de réduction modulaire modulo (N-R). Par ailleurs, lorsque le processeur PRC doit accéder à une instruction suivante, en l'absence de saut d'adresse, le processeur est configuré pour incrémenter l'adresse contenue dans le registre IRG non pas de un, mais de la valeur du nombre idempotent IP modulo (N - R). De cette manière, une attaque visant à perturber le contenu du registre de pointeur d'instruction IRG du processeur a une probabilité faible de remplacer le contenu de ce registre par une adresse qui serait considérée valide par le circuit MR.According to one embodiment, the data to be transmitted to the memory MEM are decoded by the circuit MN of the INTF circuit before being entered in the memory MEM. The data read in the memory MEM can then be encoded by the PRC processor or by an encoding circuit (not shown) that can be integrated in the INTF circuit, before being used in processing. According to another embodiment, the data transmitted to the memory MEM are stored in the latter without being previously decoded. In this case, the data is transmitted by the decoding circuit INTF to the memory MEM without being processed by the circuit MN. The data can be decoded only when transmitted to an input / output circuit connected to the PRC processor for use by an external device, or prior to processing involving operations other than an addition, subtraction or multiplication. According to another embodiment illustrated in FIG. 5, the MCU control unit is connected between the PRC processor and a PMM program memory containing a program executed by the PRC processor. The PRC processor includes an instruction pointer IRG register storing an instruction address to read into the PMM memory and execute. All PMM access addresses and all values added or deleted to update the IRG register, contained in the program executed by the PRC processor, can be encoded using relation (5) at the time the generation of the executable code by the PRC processor, for example by a compiler. The compiler can also add to the addition, subtraction, and multiplication operations to generate a PMM access address of modulo (N-R) modular reduction operations. On the other hand, when the PRC processor has to access a next instruction, in the absence of address jump, the processor is configured to increment the address contained in the IRG register not by one, but by the value of the idempotent number. IP modulo (N - R). In this manner, an attack to disrupt the contents of the processor's IRG instruction pointer register has a low probability of replacing the contents of that register with an address that would be considered valid by the MR circuit.

Il est à noter que l'opération de vérification d'une donnée encodée, réalisée par le circuit MR, et l'opération de décodage réalisée par le circuit MN, peuvent être exécutées à tout moment, par le processeur PRC, le coprocesseur CPR, CPR1 ou l'unité de contrôle MCU. Par ailleurs, dans les modes de réalisation des figures 3 à 5, les adresses d'accès à la mémoire MEM, PMM peuvent être des adresses virtuelles qui sont traduites en adresses réelles par l'unité MCU. Les modes de réalisation des figures 3 à 5 peuvent être appliqués seulement à une zone particulière de la mémoire MEM, PMM, par exemple une zone mémoire mémorisant des données sensibles ou des instructions réalisant une fonction de cryptographie.It should be noted that the operation of verification of an encoded data, performed by the MR circuit, and the decoding operation carried out by the circuit MN, can be executed at any time by the processor PRC, the coprocessor CPR, CPR1 or the MCU control unit. Moreover, in the embodiments of FIGS. 3 to 5, the access addresses to the memory MEM, PMM may be virtual addresses that are translated into real addresses by the MCU. The embodiments of FIGS. 3 to 5 may be applied only to a particular area of the memory MEM, PMM, for example a memory area storing sensitive data or instructions carrying out a cryptographic function.

Il apparaîtra clairement à l'homme de l'art que la présente invention est susceptible de diverses variantes de réalisation et diverses applications. Ainsi, l'opération de décodage d'une donnée encodée peut ne pas être nécessaire. En effet, dans certains traitements, la valeur réelle d'une donnée peut ne pas être utile. En outre, il n'est pas nécessaire d'appliquer un traitement à une donnée à protéger. En effet, la protection d'une donnée est assurée selon l'invention, dès lors qu'elle est mise sous une forme encodée par la relation (5). A noter également que les opérations de réduction modulo N-R ne sont effectuées que pour éviter que la taille des données encodées soit trop grande, par exemple pour limiter la taille des données encodées à la taille des registres internes du processeur PRC. Par conséquent, si les données traitées sont de suffisamment petite taille ou si les registres, bus et autres éléments matériels du processeur sont de tailles suffisantes relativement aux données traitées, il est possible qu'aucune opération de réduction modulaire modulo N-R ne doive être appliquée.It will be apparent to those skilled in the art that the present invention is capable of various alternative embodiments and various applications. Thus, the operation of decoding an encoded data item may not be necessary. Indeed, in some treatments, the real value of a data may not be useful. In addition, it is not necessary to apply a treatment to a data item to be protected. Indeed, the protection of data is provided according to the invention, since it is put in a form encoded by the relation (5). It should also be noted that the modulo N-R reduction operations are performed only to prevent the size of the encoded data from being too large, for example to limit the size of the encoded data to the size of the internal registers of the PRC processor. Therefore, if the processed data is sufficiently small or if the registers, buses, and other hardware of the processor are of sufficient size relative to the processed data, it is possible that no modulo N-R modular reduction operation should be applied.

Par ailleurs, tout ou partie des modes de réalisation précédemment décrits peuvent être combinés entre eux sans sortir du cadre de la présente invention, tel que défini par les revendications annexées.Furthermore, all or part of the previously described embodiments can be combined with each other without departing from the scope of the present invention, as defined by the appended claims.

Claims (16)

REVENDICATIONS1. Procédé de protection de l'intégrité d'une donnée dans un circuit de traitement (PRC), le procédé comprenant des étapes consistant à : choisir deux nombres entiers positifs (N, R), premiers entre eux, un premier (N) des deux nombres étant supérieur à une donnée à protéger (ID), encoder la donnée à protéger par une opération de multiplication par un nombre idempotent (IP) modulo le produit (N-R) des deux nombres, le nombre idempotent étant choisi idempotent dans un anneau ayant un nombre d'éléments distincts égal au produit des deux nombres, et égal à un multiple d'un second (R) des deux nombres et égal à un multiple du premier des deux nombres augmenté de un, et activer un signal d'erreur (FS) si une réduction modulaire modulo le second des deux nombres, de la donnée encodée (ED) n'est pas nulle.REVENDICATIONS1. A method of protecting the integrity of a data in a processing circuit (PRC), the method comprising the steps of: selecting two positive integers (N, R), first between them, a first (N) of the two with numbers being greater than a datum to be protected (ID), encoding the datum to be protected by a multiplication operation by an idempotent number (IP) modulo the product (NR) of the two numbers, the idempotent number being chosen idempotent in a ring having a number of distinct elements equal to the product of the two numbers, and equal to a multiple of a second (R) of the two numbers and equal to a multiple of the first of the two numbers increased by one, and activate an error signal (FS ) if a modular reduction modulo the second of the two numbers, the encoded data (ED) is not zero. 2. Procédé selon la revendication 1, comprenant des étapes de : fourniture de la donnée encodée (ED) en entrée d'un traitement (FCT) réalisé par le circuit de traitement, le traitement comprenant une ou plusieurs opérations, chaque opération du traitement étant exclusivement soit une addition, soit une soustraction, soit une multiplication, application du traitement à la donnée encodée pour obtenir une nouvelle donnée encodée (ERD), les opérandes de chaque opération d'addition ou de soustraction du traitement étant encodées par l'opération de multiplication par le nombre idempotent (IP) modulo le produit (N-R) des deux nombres (N, R), et activation du signal d'erreur (FS) si une réduction modulaire modulo le 25 second (R) des deux nombres, d'une des données encodées n'est pas nulle.2. Method according to claim 1, comprising the steps of: providing the encoded data (ED) at the input of a processing (FCT) produced by the processing circuit, the processing comprising one or more operations, each processing operation being exclusively either an addition, a subtraction or a multiplication, application of the processing to the encoded data to obtain a new encoded data (ERD), the operands of each operation of addition or subtraction of the processing being encoded by the operation of multiplication by the idempotent number (IP) modulo the product (NR) of the two numbers (N, R), and activation of the error signal (FS) if a modular reduction modulo the second (R) of the two numbers, of one of the encoded data is not zero. 3. Procédé selon la revendication 1 ou 2, comprenant une étape de décodage d'une des données encodées (ED, ERD) en réalisant une réduction modulaire modulo le premier (N) des deux nombres (N, R), de la 30 donnée encodée.3. Method according to claim 1 or 2, comprising a step of decoding one of the encoded data (ED, ERD) by performing a modular reduction modulo the first (N) of the two numbers (N, R), of the data encoded. 4. Procédé selon l'une des revendications 1 à 3, dans lequel le premier (N) des deux nombres (N, R) est choisi égal à 216 + 1, et le second (R) des deux nombres est choisi égal à 28 - 1 ou 28 + 1.4. Method according to one of claims 1 to 3, wherein the first (N) of the two numbers (N, R) is chosen equal to 216 + 1, and the second (R) of the two numbers is chosen equal to 28 - 1 or 28 + 1. 5. Procédé selon l'une des revendications 1 à 4, dans lequel l'une des données encodées (ED, ERD) est fournie à l'entrée d'un coprocesseur (CPR, CPR1) générant le signal d'erreur (FS) en fonction de la donnée encodée fournie.5. Method according to one of claims 1 to 4, wherein one of the encoded data (ED, ERD) is supplied to the input of a coprocessor (CPR, CPR1) generating the error signal (FS) according to the encoded data provided. 6. Procédé selon la revendication 5, dans lequel le coprocesseur (CPR, CPR1) réalise le décodage de la donnée encodée (ED, ERD) fournie en entrée du coprocesseur.6. The method of claim 5, wherein the coprocessor (CPR, CPR1) performs the decoding of the encoded data (ED, ERD) provided at the input of the coprocessor. 7. Procédé selon l'une des revendications 1 à 6, dans lequel la donnée encodée est une adresse d'accès à une donnée ou à une instruction de programme dans une mémoire (MEM, PMM), et est fournie à l'entrée d'une unité de contrôle (MCU, MCU1) de la mémoire, l'unité de contrôle générant le signal d'erreur (FS) en fonction de la donnée encodée.7. Method according to one of claims 1 to 6, wherein the encoded data is a data access address or a program instruction in a memory (MEM, PMM), and is supplied to the input d a control unit (MCU, MCU1) of the memory, the control unit generating the error signal (FS) according to the encoded data. 8. Procédé selon la revendication 7, dans lequel l'unité de contrôle (MCU, MCU1) réalise le décodage de la donnée encodée (ED, ERD) fournie à l'unité de contrôle, pour obtenir une adresse d'accès à la mémoire (MEM, PMM) ou une donnée à écrire dans la mémoire.8. The method of claim 7, wherein the control unit (MCU, MCU1) performs the decoding of the encoded data (ED, ERD) supplied to the control unit, to obtain a memory access address. (MEM, PMM) or data to be written to the memory. 9. Procédé selon l'une des revendications 1 à 8, dans lequel chaque donnée encodée (ED, ERD) est décodée seulement si le signal d'erreur (FS) généré à partir de la donnée encodée est à l'état inactif.9. Method according to one of claims 1 to 8, wherein each encoded data (ED, ERD) is decoded only if the error signal (FS) generated from the encoded data is in the inactive state. 10. Procédé selon l'une des revendications 1 à 9, dans lequel la 30 donnée encodée (ED, ERD) est une adresse d'instruction dans une mémoire programme (PMM), une adresse d'instruction consécutive suivante étant obtenue en ajoutant le nombre idempotent (IP) à la donnée encodée.The method according to one of claims 1 to 9, wherein the encoded data (ED, ERD) is an instruction address in a program memory (PMM), a subsequent consecutive instruction address being obtained by adding the idempotent number (IP) to the encoded data. 11. Circuit de traitement de données, configuré pour :encoder une donnée (ID) à protéger par une opération de multiplication par un nombre idempotent (IP) modulo le produit (N-R) de deux nombres entiers positifs (N, R), premiers entre eux, un premier des deux nombres (N) étant supérieur à la donnée reçue, le nombre idempotent étant choisi idempotent dans un anneau ayant un nombre d'éléments distincts égal au produit des deux nombres, et égal à un multiple d'un second (R) des deux nombres et égal à un multiple du premier des deux nombres augmenté de un, et activer un signal d'erreur (FS) si une réduction modulaire modulo le 10 second des deux nombres, de la donnée résultante encodée n'est pas nulle.11. A data processing circuit, configured to: encode a data (ID) to be protected by a multiplication operation by an idempotent number (IP) modulo the product (NR) of two positive integers (N, R), first between they, a first of the two numbers (N) being greater than the received data, the idempotent number being chosen idempotent in a ring having a number of distinct elements equal to the product of the two numbers, and equal to a multiple of a second ( R) of the two numbers and equal to a multiple of the first of the two numbers increased by one, and activate an error signal (FS) if a modular reduction modulo the second of the two numbers, of the resultant encoded data is not nothing. 12. Circuit selon la revendication 11, configuré pour : transmettre la donnée encodée (ED) en entrée d'un traitement (FCT) comprenant une ou plusieurs opérations, chaque opération du traitement 15 étant exclusivement soit une addition, soit une soustraction, soit une multiplication, et appliquer le traitement à la donnée encodée pour obtenir une nouvelle donnée encodée (ERD), les opérandes de chaque opération d'addition ou de soustraction du traitement étant encodées par l'opération de multiplication 20 par le nombre idempotent modulo le produit (N - R) des deux nombres (N, R).The circuit of claim 11, configured to transmit the encoded data (ED) input of a process (FCT) comprising one or more operations, each operation of the process being exclusively an addition, a subtraction or a multiplication, and apply the processing to the encoded data to obtain a new encoded data (ERD), the operands of each operation of adding or subtracting the processing being encoded by the multiplication operation 20 by the idempotent number modulo the product ( N - R) of the two numbers (N, R). 13. Circuit selon la revendication 11 ou 12, configuré pour décoder l'une des données encodées (ED, ERD) en réalisant une réduction modulaire modulo le premier (N) des deux nombres (N, R), de la donnée encodée. 2513. Circuit according to claim 11 or 12, configured to decode one of the encoded data (ED, ERD) by performing a modular reduction modulo the first (N) of the two numbers (N, R) of the encoded data. 25 14. Circuit selon l'une des revendications 11 à 13, comprenant un coprocesseur (CPR, CPR1) ou une unité de contrôle (MCU, MCU1) d'une mémoire (MEM, PMM) configuré pour recevoir l'une des données encodées (ED, ERD), et comprenant un circuit d'interface (INTF) comportant un circuit 30 de test (MR) configuré pour activer le signal d'erreur (FS) si une réduction modulaire modulo le second (R) des deux nombres (N, R), de la donnée encodée reçue n'est pas nulle.14. Circuit according to one of claims 11 to 13, comprising a coprocessor (CPR, CPR1) or a control unit (MCU, MCU1) of a memory (MEM, PMM) configured to receive one of the encoded data ( ED, ERD), and comprising an interface circuit (INTF) having a test circuit (MR) configured to activate the error signal (FS) if a modular reduction modulo the second (R) of the two numbers (N). , R), the received encoded data is not zero. 15. Circuit selon la revendication 14, dans lequel le circuit d'interface 35 (INTF) comprend un circuit de décodage (MN) configuré pour appliquer uneréduction modulaire modulo le premier (N) des deux nombres (N, R), à une donnée à décoder.The circuit of claim 14, wherein the interface circuit (INTF) comprises a decoding circuit (MN) configured to apply a modular retrofit modulo the first (N) of the two numbers (N, R) to a given data. to decode. 16. Circuit selon l'une des revendications 11 à 15, comprenant un coprocesseur (CPR1) réalisant les opérations de réduction modulaire modulo le produit des deux nombres (N, R).16. Circuit according to one of claims 11 to 15, comprising a coprocessor (CPR1) performing the modular reduction operations modulo the product of the two numbers (N, R).
FR1358798A 2013-09-12 2013-09-12 METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER Expired - Fee Related FR3010561B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
FR1358798A FR3010561B1 (en) 2013-09-12 2013-09-12 METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
FR1358798A FR3010561B1 (en) 2013-09-12 2013-09-12 METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER

Publications (2)

Publication Number Publication Date
FR3010561A1 true FR3010561A1 (en) 2015-03-13
FR3010561B1 FR3010561B1 (en) 2016-11-18

Family

ID=50097782

Family Applications (1)

Application Number Title Priority Date Filing Date
FR1358798A Expired - Fee Related FR3010561B1 (en) 2013-09-12 2013-09-12 METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER

Country Status (1)

Country Link
FR (1) FR3010561B1 (en)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BENOIT FEIX ET AL: "Defeating with Fault Injection a Combined Attack Resistant Exponentiation Defeating with Fault Injection a Combined Attack Resistant Exponentiation : slides", COSADE 20143, 7 March 2013 (2013-03-07), XP055120003, Retrieved from the Internet <URL:http://alexandre.venelli.free.fr/pdf/slides_cosade13.pdf> [retrieved on 20140526] *
FEIX BENOIT ET AL: "Defeating with Fault Injection a Combined Attack Resistant Exponentiation", 6 March 2013, RADIO FREQUENCY IDENTIFICATION; [LECTURE NOTES IN COMPUTER SCIENCE], SPRINGER BERLIN HEIDELBERG, BERLIN, HEIDELBERG, PAGE(S) 32 - 45, ISBN: 978-3-642-45283-3, ISSN: 0302-9743, XP047036495 *
JÖRN-MARC SCHMIDT ET AL: "Combined Implementation Attack Resistant Exponentiation", 8 August 2010, PROGRESS IN CRYPTOLOGY Â LATINCRYPT 2010, SPRINGER BERLIN HEIDELBERG, BERLIN, HEIDELBERG, PAGE(S) 305 - 322, ISBN: 978-3-642-14711-1, XP019147844 *

Also Published As

Publication number Publication date
FR3010561B1 (en) 2016-11-18

Similar Documents

Publication Publication Date Title
JP2022515711A (en) Security system using artificial intelligence
EP3457620B1 (en) Method for executing a binary code of a secure function by a microprocessor
FR2879320A1 (en) Integrated circuit chip card e.g. memory card for e.g. financial transaction, has processor to compare stored integrity identification value with calculated integrity identification value to determine if data of memory device is at risk
FR3071122A1 (en) METHOD FOR EXECUTING A BINARY CODE OF A FUNCTION SECURE BY A MICROPROCESSOR
FR2956764A1 (en) PROTECTION OF REGISTERS AGAINST UNILATERAL DISTURBANCES
EP3283968B1 (en) Method for sharing a memory between at least two functional entities
WO2009071791A2 (en) Verification of data read in memory
FR3076925A1 (en) CRYPTOGRAPHIC FUNCTION
WO2007010009A2 (en) Permanent data hardware integrity
FR2977342A1 (en) VERIFYING THE INTEGRITY OF A PROGRAM EXECUTED BY AN ELECTRONIC CIRCUIT
FR3010561A1 (en) METHOD OF PROTECTING DATA INTEGRITY USING IDEMPOTENT NUMBER
EP3284206B1 (en) Method of securing the execution of a program
EP3685259B1 (en) Method for executing a machine code of a secure function
EP1089175B1 (en) Secured computer system
FR3069993A1 (en) DEVICES AND METHODS FOR MASKING RSA ENCRYPTION OPERATIONS
EP4057169B1 (en) Method for executing a binary code of a computer program by a microprocessor
EP4057168B1 (en) Method for executing a computer program by an electronic apparatus
EP4089557B1 (en) Method for executing a binary code by a microprocessor
EP4089559B1 (en) Microprocessor provided with an arithmetic logic unit and a security hardware module
EP3832947B1 (en) Method for executing a computer program by an electronic apparatus
US20230294671A1 (en) Fast sensor fusion for free space detection
FR2963128A1 (en) METHOD FOR DETECTING FAULT INJECTION ATTACK IN MEMORY DEVICE, AND CORRESPONDING DETECTION SYSTEM
EP4307143A1 (en) Method and circuit for verifying the integrity of software
EP2630605B1 (en) Method for securing the execution of a computer code by means of dynamic redundancy
FR2898704A1 (en) PROTECTION OF A PROGRAM AGAINST A DISRUPTION

Legal Events

Date Code Title Description
CA Change of address

Effective date: 20150625

PLFP Fee payment

Year of fee payment: 3

PLFP Fee payment

Year of fee payment: 4

PLFP Fee payment

Year of fee payment: 5

PLFP Fee payment

Year of fee payment: 6

PLFP Fee payment

Year of fee payment: 7

CD Change of name or company name

Owner name: VERIMATRIX, FR

Effective date: 20191119

CA Change of address

Effective date: 20191209

TP Transmission of property

Owner name: RAMBUS INC., US

Effective date: 20200402

RG Lien (pledge) cancelled

Effective date: 20200828

GC Lien (pledge) constituted

Effective date: 20201105

ST Notification of lapse

Effective date: 20210506