PROCEDE DE PROTECTION D'UN CIRCUIT INTEGRE CONTRE LES UTILISATIONS FRAUDULEUSES METHOD FOR PROTECTING AN INTEGRATED CIRCUIT AGAINST FRAUDULENT USES
La présente invention se rapporte aux procédés qui permettent de protéger les circuits intégrés contre les utilisations frauduleuses par des personnes non autorisées. Elle s'applique notamment aux circuits intégrés destinés à être utilisés dans les "cartes à puces", ainsi qu'aux circuits spécialisés connus sous le nom d'ASIC qui représentent souvent l'essentiel des performances de l'équipement auquel ils sont intégrés. Tous ces circuits comportent au moins une mémoire et un nombre plus ou moins grand de circuits logiques pouvant éventuellement aller jusqu'à constituer un microprocesseur.The present invention relates to methods which make it possible to protect integrated circuits against fraudulent use by unauthorized persons. It applies in particular to integrated circuits intended to be used in "smart cards", as well as to specialized circuits known under the name of ASIC which often represent the main part of the performance of the equipment in which they are integrated. All these circuits include at least one memory and a greater or lesser number of logic circuits which may possibly go as far as constituting a microprocessor.
Il est de pratique courante pour les fabricants de cartes à puces de tester le circuit puis de le prépersonnaliser en inscrivant dans sa mémoire un certain nombre de données qui définissent plus précisément ses fonctions. Pour éviter les usages frauduleux, en particulier en cas de vol pendant le transport entre le fabricant et le client, on introduit dans ces données un code confidentiel dissimulé parmi les autres données. A la réception de la carte le client, qui a eu connaissance du code confidentiel par une autre voie, valide celui-ci en introduisant, selon une procédure déterminée, le code dans la carte. II arrive fréquemment que le fabricant de la carte ne soit pas celui du circuit, et que ces deux industriels soient localisés à des endroits très éloignés l'un de l'autre. On est donc amené à transférer un grand nombre de circuits sous un petit volume, puisque ceux-ci ne sont pas montés dans les cartes. Le
montage des circuits dans les cartes est délicat mais n présente pas de difficultés excessives et la personnalisation de la carte est très simple car les données inscrites dans la mémoire ne sont pas particulièrement confidentielles, puisqu'elles sont la plupart du temps lisibles dans les cartes régulièrement mises en circulation. Comme pour des besoins de test, avant montage et personnalisation, toutes les cellules de la mémoire doivent être accessibles en lecture/écriture, il suffit donc d'y inscrire ces données.It is common practice for chip card manufacturers to test the circuit and then to pre-personalize it by writing a certain number of data into its memory which more precisely define its functions. To avoid fraudulent use, in particular in the event of theft during transport between the manufacturer and the customer, a confidential code hidden among the other data is entered into this data. Upon receipt of the card, the customer, who has learned of the confidential code by another means, validates it by entering, according to a determined procedure, the code in the card. It frequently happens that the manufacturer of the card is not that of the circuit, and that these two manufacturers are located in places very distant from each other. It is therefore necessary to transfer a large number of circuits under a small volume, since these are not mounted in the cards. The mounting circuits in cards is delicate but does not present excessive difficulties and personalization of the card is very simple because the data stored in the memory is not particularly confidential, since it is mostly readable in cards regularly put into circulation. As for testing purposes, before assembly and personalization, all the memory cells must be accessible in read / write mode, it suffices to write this data there.
Le risque est alors grand de voir un voleur s'emparer-des circuits et effectuer ces opérations pour utiliser les cartes à son profit, notamment pour récupérer l'argent auquel elles donnent accès dans les utilisations monétiques. Ce risque est d'autant plus grand qu'un seul paquet de circuits peut représenter une contre-valeur très importante.The risk is then great to see a thief seizing the circuits and carrying out these operations to use the cards for his benefit, in particular to recover the money to which they give access in electronic payment uses. This risk is all the greater since a single package of circuits can represent a very significant equivalent value.
Il faut donc prendre pour ces transports des précautions considérables, qui sont sources de coûts et de délais importants.Considerable precautions must therefore be taken for these transports, which are sources of significant costs and delays.
Pour protéger les circuits contre de tels risques, l'invention propose un procédé de protection d'un circuit intégré contre les utilisations frauduleuses, ce circuit intégré comprenant une mémoire et des circuits logiques de gestion de cette mémoire, principalement caractérisé en ce que :To protect the circuits against such risks, the invention provides a method of protecting an integrated circuit against fraudulent use, this integrated circuit comprising a memory and logic circuits for managing this memory, mainly characterized in that:
- à la fabrication du circuit intégré on détermine physiquement, à partir de la géométrie d'au moins l'un des masques de fabrication du circuit, le contenu d'au moins une adresse secrète de la mémoire, pour que ce contenu représente un code secret qui permet de verrouiller au moins l'écriture ou au moins la lecture d'au moins une partie de cette mémoire ; et
pour déverrouiller ensuite la mémoire, on provoque la lecture du code secret contenu dans l'adresse secrète et on présente un code identique aux circuits logiques de gestion pour les comparer. D'autres particularités et avantages de l'invention apparaîtront clairement dans la description suivante, faite en regard des figures annexées qui représentent :- during the manufacturing of the integrated circuit, the content of at least one secret memory address is physically determined from the geometry of at least one of the manufacturing masks of the circuit, so that this content represents a code secret which makes it possible to lock at least the writing or at least the reading of at least part of this memory; and to then unlock the memory, the secret code contained in the secret address is read and a code identical to the management logic circuits is presented to compare them. Other features and advantages of the invention will appear clearly in the following description, given with reference to the appended figures which represent:
- la figure 1, un schéma partiel et didactique d'un circuit intégré muni de moyens de protection selon l'invention ; et- Figure 1, a partial and didactic diagram of an integrated circuit provided with protection means according to the invention; and
- la figure 2, un schéma également partiel et didactique de la mémoire et d'un registre associé d'un circuit selon l'invention.- Figure 2, a diagram also partial and didactic of the memory and an associated register of a circuit according to the invention.
Le schéma de la figure 1 a été fait pour expliquer le procédé selon l'invention et est sans rapport avec la réalité physique des organes composant le circuit intégré muni des moyens de protection permettant de mettre en oeuvre le procédé selon l'invention. On n'a pas non plus représenté les organes utilisés dans le fonctionnement normal du circuit et connus en eux-mêmes.The diagram in FIG. 1 has been made to explain the method according to the invention and is unrelated to the physical reality of the components of the integrated circuit provided with protection means making it possible to implement the method according to the invention. The organs used in the normal operation of the circuit and known in themselves have also not been shown.
Ce circuit intégré comprend donc une mémoire 101 dans laquelle seront enregistrés un programme et des données nécessaires pour son usage normal, et des organes non représentés qui permettent 1'exploitation de ces données et le déroulement du programme.This integrated circuit therefore comprises a memory 101 in which a program and data necessary for its normal use will be recorded, and organs not shown which allow the exploitation of these data and the progress of the program.
Le contenu des mots de la mémoire est écrit à partir d'une entrée écriture et il est présenté après lecture sur une sortie lecture. La sélection de l'adresse des mots écrits et lus est faite par une entrée adresse. Ces entrées et sorties transitent bien entendu par les organes d'exploitation non représentés.The content of the words in the memory is written from a write input and is presented after reading on a read output. The address selection for written and read words is made by an address entry. These inputs and outputs of course pass through the operating bodies not shown.
Lors de la fabrication du circuit intégré protégé selon l'invention, on a inscrit dans au moins un mot déterminé de la mémoire, dont l'adresse secrète fait
partie de la protection, un code secret déterminé. Cett inscription se fait par des moyens physiques lors de l'implantation du circuit, par exemple en configurant de manière adéquate au moins l'un des masques de fabrication. Ce mot 102 est commun à tout un lot de fabrication, ce lot pouvant être par exemple un ensemble de tranches de semi-conducteur ou, pour des applications de grande sécurité, seulement tous les circuits d'une plaquette unique. La longueur du code est variable, là aussi selon le degré de sécurité souhaité, et si cette longueur dépasse celle d'un mot unique on utilise plusieurs mots, éventuellement disjoints dans la mémoire, c'est-à-dire localisés à des adresses non contiguës. A titre de variante, et toujours pour augmenter la sécurité, on peut utiliser des codes différents pour les circuits selon leur localisation physique sur la tranche qui forme le substrat commun où ils sont implantés. Ainsi le voleur qui aura pu se procurer un code par un moyen ou un autre ne connaîtra pas. les autres.During the manufacture of the protected integrated circuit according to the invention, at least one determined word of memory has been written, the secret address of which is part of protection, a specific secret code. This registration is done by physical means when setting up the circuit, for example by adequately configuring at least one of the manufacturing masks. This word 102 is common to a whole manufacturing batch, this batch being able for example to be a set of semiconductor wafers or, for high security applications, only all the circuits of a single wafer. The length of the code is variable, again according to the desired degree of security, and if this length exceeds that of a single word, several words are used, possibly disjoint in memory, that is to say located at addresses not contiguous. As a variant, and always to increase security, it is possible to use different codes for the circuits according to their physical location on the wafer which forms the common substrate where they are implanted. Thus the thief who has been able to obtain a code by one means or another will not know. others.
Lors de la mise sous tension du circuit, la logique de démarrage non représentée positionne une bascule 103 dont la sortie est reliée aux circuits logiques de test 104 et à deux portes 105 et 106, qui bloquent respectivement l'entrée écriture et la sortie lecture, c'est-à-dire l'accès à la mémoire pour l'utilisateur à ce moment.When the circuit is energized, the starting logic, not shown, positions a flip-flop 103, the output of which is connected to the logic test circuits 104 and to two doors 105 and 106, which respectively block the write input and the read output, i.e. access to memory for the user at this time.
Ainsi donc dans cet état le circuit ne peut pas être testé, rien ne peut être inscrit dans la mémoire, et le contenu de la mémoire n'est pas disponible sur les sorties du circuit. A titre de variante on pourra, pour certaines applications, prévoir une possibilité limitée d'écriture dans la mémoire pour valider le code secret selon une procédure connue.
Par contre il est tout à fait possible de lire ce contenu en adressant les mots par l'entrée adresse qui reste libre, sauf pour d'éventuelles zones protégées.Thus in this state the circuit cannot be tested, nothing can be written to the memory, and the content of the memory is not available on the outputs of the circuit. As a variant, it will be possible, for certain applications, to provide a limited possibility of writing into the memory to validate the secret code according to a known procedure. By cons it is quite possible to read this content by addressing the words by the address entry which remains free, except for possible protected areas.
Les données qui sont ainsi lues, et qui sont bloquées en sortie par la porte 106, sont appliquées à un comparateur 107 qui reçoit par ailleurs sur une entrée code le code à reconnaître pour débloquer 1'accès au circuit.The data which are thus read, and which are blocked at output by the gate 106, are applied to a comparator 107 which moreover receives on an input code the code to be recognized to unblock the access to the circuit.
Pour effectuer une tentative frauduleuse de déblocage du circuit il faudrait donc lire la totalité de la mémoire, et pour chacun des mots ainsi lus essayer toutes les combinaisons de codes possibles. Dès que le code est un peu long on arrive à une durée qui décourage toutes les tentatives. Le fabricant en possession du bon code par contre, lira directement la bonne adresse et entrera dans le circuit le bon code.To carry out a fraudulent attempt to unlock the circuit, it would therefore be necessary to read the entire memory, and for each of the words thus read try all possible combinations of codes. As soon as the code is a little long we arrive at a duration which discourages all attempts. The manufacturer in possession of the correct code, on the other hand, will read the correct address directly and will enter the correct code in the circuit.
A ce moment le comparateur reconnaît 1'identité du code extérieur et du contenu du mot lu dans la mémoire et il adresse un signal "oui" à la bascule 103. Celle-ci change alors d'état, libère la logique de test et ouvre les portes 105 et 106. On peut alors procéder au test du circuit et à sa prépersonnalisation. A l'issue de cette étape, la mémoire comporte donc une zone dans laquelle sont inscrites lès données de prépersonnalisation.At this time the comparator recognizes the identity of the external code and of the content of the word read in the memory and it sends a signal "yes" to the flip-flop 103. This then changes state, releases the test logic and opens doors 105 and 106. We can then proceed to test the circuit and pre-personalize it. At the end of this step, the memory therefore includes an area in which the pre-personalization data are written.
Pour éviter que le circuit ne se retrouve bloqué par la bascule 103 à la prochaine mise sous tension, celle-ci, lorsqu'elle bascule sous la commande du comparateur 107, vient positionner de manière définitive un circuit 108 qui rétroagit sur la bascule pour l'obliger à rester dans la bonne position. Ce circuit est par exemple une simple cellule de mémoire EPROM. Il peut être localisé dans des endroits divers et par exemple faire partie de la logique de démarrage, ou même
être directement intégré dans les circuits qu constituent la bascule.To prevent the circuit from finding itself blocked by the flip-flop 103 at the next power-up, the latter, when it switches under the control of the comparator 107, comes to definitively position a circuit 108 which feeds back on the flip-flop for the 'force him to stay in the right position. This circuit is for example a simple EPROM memory cell. It can be located in various places and for example be part of the startup logic, or even be directly integrated into the circuits that constitute the scale.
De même il est préférable de neutraliser le conten du mot 102 pour d'une part avoir une mémoire sans tro et d'autre part éviter qu'une personne mal intentionné ne vienne lire le code secret qu'il contient.In the same way it is preferable to neutralize the content of the word 102 to on the one hand have a memory without tro and on the other hand to prevent that a malicious person does not come to read the secret code which it contains.
On pourrait faire en sorte que ce mot soit "noyé" dans les données de prépersonnalisation, mais cett solution n'est pas entièrement satisfaisante. Une meilleure solution consiste à configurer la logique de commande du circuit intégré de telle manière que le mot 102 disparaisse de la liste des mots adressables tout en lui en substituant un autre, le dernier de la mémoire par exemple. La configuration de cette logique se fera alors soit par commande à partir du circuit de blocage 108, ou de la sortie de la basculeWe could make sure that this word is "drowned" in the prepersonalization data, but this solution is not entirely satisfactory. A better solution consists in configuring the control logic of the integrated circuit in such a way that the word 102 disappears from the list of addressable words while replacing it with another, the last in memory for example. The configuration of this logic will then be done either by command from the blocking circuit 108, or from the output of the rocker
103 elle même bloquée par 108, soit par des circuits internes à la logique, analogues au circuit 108 et bloqués eux mêmes lors de la reconnaissance du code secret. Outre des cellules EPROM, on peut aussi utiliser des fusibles.103 itself blocked by 108, either by circuits internal to the logic, analogous to circuit 108 and blocked themselves when the secret code is recognized. In addition to EPROM cells, fuses can also be used.
La solution préférée consiste à utiliser, comme représenté sur la figure 2 là aussi de manière purement explicative, un registre séparé de la mémoire principale pour enregistrer le code secret.The preferred solution consists in using, as shown in FIG. 2 here also in a purely explanatory manner, a separate register from the main memory to record the secret code.
La mémoire 201 est identique à la mémoire 101, sauf que tous ses mots sont vierges. Le code secret est contenu dans un registre distinct 202 (ou éventuellement une mémoire distincte) dont l'adresse est la même que celle du_ mot 102 dans la mémoire 101. L'adressage de ce registre §e fait donc en même temps que celui du mot correspondant dans la mémoire 201, représenté en pointillés sur la figure.The memory 201 is identical to the memory 101, except that all of its words are blank. The secret code is contained in a separate register 202 (or possibly a separate memory) the address of which is the same as that of the word 102 in memory 101. The addressing of this register §e therefore takes place at the same time as that of the corresponding word in memory 201, represented by dotted lines in the figure.
Le contenu du registre 202 est donc lu lors de
l'étape de déblocage du circuit intégré et son contenu est transféré vers le comparateur 107 et la porte 106 à travers une porte ET 209 et une porte OU 210. Le contenu du mot de même adresse de la mémoire 201 est aussi appliqué à la porte OU 210, ce qui est à ce stade sans importance puisque ce contenu est nul. D'autres dispositions, donnant un résultat équivalent, permettraient de ne pas lire ce mot.The content of register 202 is therefore read during the step of unlocking the integrated circuit and its content is transferred to the comparator 107 and the gate 106 through an AND gate 209 and an OR gate 210. The content of the word with the same address of the memory 201 is also applied to the gate OR 210, which is unimportant at this stage since this content is zero. Other provisions, giving an equivalent result, would make it possible not to read this word.
Si par ailleurs le bon code a été appliqué sur le comparateur 107, la séquence décrite plus haut se déroule et la bascule 103, dont la sortie est aussi appliquée à une entrée de la porte 209, vient bloquer le passage du contenu du registre 202 vers la porte 210, qui ne délivre plus donc que le contenu de la mémoire. Comme la bascule reste ultérieurement bloquée dans la même position, on ne lira donc plus que la mémoire et jamais plus le registre 202.If, moreover, the correct code has been applied to the comparator 107, the sequence described above takes place and the flip-flop 103, the output of which is also applied to an input of the gate 209, blocks the passage of the content of the register 202 to door 210, which therefore only delivers the content of the memory. As the rocker remains blocked in the same position later, we will therefore only read the memory and never again the register 202.
La suite du fonctionnement (test et prépersonnalisation) est identique à ce qui a été décrit auparavant.The rest of the operation (test and pre-personalization) is identical to what has been described previously.
Là aussi on peut utiliser tout autre mode de réalisation respectant les règles logiques décrites ci-dessus, par exemple un fusible situé sur la sortie du registre 202, ou sur la commande de lecture de celui-ci, ou un circuit d'aiguillage à la place de la porte 210.Here again, any other embodiment can be used which complies with the logic rules described above, for example a fuse located on the output of the register 202, or on the read command thereof, or a switching circuit at the door place 210.
La protection principale réside dans 1'interdiction de l'écriture, puis secondairement dans celle de la sortie de la lecture, et enfin dans le blocage des fonctions de test. Lorsque les besoins de sécurité sont plus réduits, on peut se limiter à cette première interdiction, ou à une combinaison de la première et de la seconde.The main protection resides in the prohibition of writing, then secondly in that of the output of reading, and finally in the blocking of the test functions. When the security needs are more reduced, one can limit oneself to this first prohibition, or to a combination of the first and the second.
Il est enfin clair que l'invention n'est pas limitée aux circuits intégrés destinés aux cartes à
puces. Elle s'étend aussi par exemple aux circuits de type ASIC dont l'usage est réservé à l'utilisateur qui en a défini les spécifications
It is finally clear that the invention is not limited to integrated circuits intended for cards with fleas. It also extends, for example, to ASIC type circuits, the use of which is reserved for the user who has defined the specifications.