FR3030826A1 - METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE - Google Patents

METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE Download PDF

Info

Publication number
FR3030826A1
FR3030826A1 FR1462786A FR1462786A FR3030826A1 FR 3030826 A1 FR3030826 A1 FR 3030826A1 FR 1462786 A FR1462786 A FR 1462786A FR 1462786 A FR1462786 A FR 1462786A FR 3030826 A1 FR3030826 A1 FR 3030826A1
Authority
FR
France
Prior art keywords
counter
value
ptc
code
tot
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
FR1462786A
Other languages
French (fr)
Other versions
FR3030826B1 (en
Inventor
Francis Chamberot
Oliveira Marco De
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.)
Idemia France SAS
Original Assignee
Oberthur Technologies 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 Oberthur Technologies SA filed Critical Oberthur Technologies SA
Priority to FR1462786A priority Critical patent/FR3030826B1/en
Priority to PCT/FR2015/053602 priority patent/WO2016097637A1/en
Publication of FR3030826A1 publication Critical patent/FR3030826A1/en
Application granted granted Critical
Publication of FR3030826B1 publication Critical patent/FR3030826B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/341Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/354Card activation or deactivation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4012Verifying personal identification numbers [PIN]
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/10Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means together with a coded signal, e.g. in the form of personal identification information, like personal identification number [PIN] or biometric data
    • G07F7/1025Identification of user by a PIN code
    • G07F7/1083Counting of PIN attempts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/552Detecting local intrusion or implementing counter-measures involving long-term monitoring or reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • Storage Device Security (AREA)

Abstract

L'invention concerne un procédé de contrôle mis en œuvre par un dispositif électronique (2), ledit procédé comprenant les étapes suivantes : - obtention d'un code secret saisi par un utilisateur ; - traitement du code secret, le traitement comprenant une vérification du code secret et une gestion d'un premier compteur (TOT_PTC) ; - mémorisation de la valeur du premier compteur (TOT_PTC) dans une mémoire non-volatile réinscriptible (10) ; le dispositif électronique étant tel que : - si le code saisi est détecté comme étant faux lors de ladite vérification, l'étape de traitement a pour effet de modifier la valeur du premier compteur (TOT_PTC) pour indiquer que le code secret est faux ; et - si le code saisi est détecté comme étant bon lors de ladite vérification, l'étape de traitement a pour effet de garder la valeur du premier compteur (TOT_PTC) inchangée quelle que soit la valeur du premier compteur. L'invention concerne également un dispositif électronique apte à mettre en œuvre un tel procédé de contrôle.The invention relates to a control method implemented by an electronic device (2), said method comprising the following steps: obtaining a secret code entered by a user; - Secret code processing, the processing comprising a verification of the secret code and management of a first counter (TOT_PTC); storing the value of the first counter (TOT_PTC) in a rewritable non-volatile memory (10); the electronic device being such that: if the code entered is detected as false during said verification, the processing step has the effect of modifying the value of the first counter (TOT_PTC) to indicate that the secret code is false; and if the code entered is detected as being good during said verification, the processing step has the effect of keeping the value of the first counter (TOT_PTC) unchanged whatever the value of the first counter. The invention also relates to an electronic device capable of implementing such a control method.

Description

Arrière-plan de l'invention La présente invention se situe dans le domaine général des dispositifs électroniques aptes à coopérer avec un terminal externe afin de réaliser une transaction, dans le domaine bancaire par exemple. L'invention concerne plus particulièrement, mais de façon non limitative, une carte à puce (ou cartes à microcircuit), conforme par exemple à la norme IS07816, et apte à réaliser une transaction en coopération avec un terminal externe ainsi qu'un procédé de contrôle d'une telle carte à puce.BACKGROUND OF THE INVENTION The present invention is in the general field of electronic devices able to cooperate with an external terminal in order to carry out a transaction, in the banking field for example. The invention relates more particularly, but in a nonlimiting manner, to a smart card (or microcircuit cards), conforming for example to the IS07816 standard, and capable of carrying out a transaction in cooperation with an external terminal as well as a method of control of such a smart card.

L'invention vise notamment le contrôle d'une carte à puce fonctionnant selon le protocole EMV (pour « Europay Mastercard Visa ») et apte à réaliser une transaction de paiement avec un lecteur externe tel qu'un terminal de paiement. De manière générale, une carte à puce est conçue pour communiquer avec un dispositif externe à cette carte, autrement appelé terminal ou lecteur. Ces cartes permettent d'effectuer divers types de transactions, telles que des transactions de paiement, des transactions d'identification et/ou d'authentification du porteur etc. Les cartes à puce mettant en oeuvre une ou plusieurs applications bancaires (carte de crédit, carte de débit etc.) sont par exemple aptes à communiquer avec des terminaux de paiement.The invention aims in particular the control of a smart card operating according to the EMV protocol (for "Europay Mastercard Visa") and adapted to perform a payment transaction with an external reader such as a payment terminal. In general, a smart card is designed to communicate with a device external to this card, otherwise called terminal or reader. These cards make it possible to carry out various types of transactions, such as payment transactions, identification transactions and / or authentication of the bearer etc. Smart cards implementing one or more banking applications (credit card, debit card etc.) are for example able to communicate with payment terminals.

EMV est le protocole standardisé utilisé majoritairement dans le monde pour sécuriser les transactions de paiement effectuées par des cartes à puce. Le protocole EMV a été conçu pour diminuer les risques de fraudes lors d'une transaction de paiement en permettant notamment l'authentification à la fois de la carte à puce et de son porteur. L'authentification du porteur est réalisée généralement à partir d'un code secret (appelé aussi code PIN) saisi par le porteur de la carte à la demande du terminal de paiement. Typiquement, dans le cadre du protocole EMV, le terminal externe envoie une commande VERIFY à la carte bancaire contenant le code secret saisi par l'utilisateur sur le terminal de paiement. La carte bancaire vérifie alors l'authenticité de l'utilisateur en comparant le code secret saisi par celui-ci avec un code de référence enregistré dans une mémoire sécurisée de la carte. Si l'authentification est passée avec succès, la carte bancaire renvoie au terminal un message OK indiquant que la vérification du code secret est passée avec succès. Si en revanche le code secret saisi n'est pas valide, la carte bancaire renvoie un message d'échec NOK au terminal. Trois essais consécutifs sont généralement accordés à l'utilisateur pour fournir le bon code secret en réponse à la demande de saisie présentée par le terminal. Si l'utilisateur réalise trois essais consécutifs de saisie du code secret et échoue les trois fois, la carte bancaire informe le terminal que l'authentification du porteur a échoué. En général, trois échecs consécutifs entraînent le blocage de la carte. Pour ce faire, une carte bancaire EMV garde en mémoire le nombre d'essais qui ont échoué consécutivement, que ce soit pendant une même transaction EMV ou lors de plusieurs transactions distinctes. Ainsi, si un utilisateur saisit un premier code secret erroné, il aura une chance de moins d'entrer le bon code secret lors du prochain essai, que cet essai ait lieu lors de la même transaction que le premier échec ou lors d'une transaction ultérieure.EMV is the standardized protocol used mainly in the world to secure payment transactions made by smart cards. The EMV protocol has been designed to reduce the risk of fraud during a payment transaction by allowing in particular the authentication of both the smart card and its holder. The authentication of the bearer is generally performed from a secret code (also called PIN) entered by the cardholder at the request of the payment terminal. Typically, as part of the EMV protocol, the external terminal sends a VERIFY command to the bank card containing the secret code entered by the user on the payment terminal. The bank card then verifies the authenticity of the user by comparing the secret code entered by the latter with a reference code stored in a secure memory of the card. If the authentication is successfully passed, the bank card sends back to the terminal an OK message indicating that the verification of the secret code has passed successfully. If, on the other hand, the secret code entered is not valid, the bank card sends back a NOK failure message to the terminal. Three consecutive tests are generally granted to the user to provide the correct secret code in response to the input request presented by the terminal. If the user performs three consecutive attempts to enter the secret code and fails all three times, the bank card informs the terminal that the authentication of the bearer has failed. In general, three consecutive failures cause the card to hang. To do this, an EMV bank card keeps track of the number of trials that have failed consecutively, whether during the same EMV transaction or in several separate transactions. Thus, if a user enters a wrong first secret code, he will have one less chance of entering the correct secret code at the next test, whether this test takes place in the same transaction as the first failure or during a transaction. higher.

Si l'utilisateur saisit le bon code secret, la carte réinitialise le nombre d'essais accordé à trois pour la prochaine demande de saisie du code secret lors d'une transaction ultérieure. Ce mécanisme de vérification du code secret permet de protéger le propriétaire de la carte bancaire contre une utilisation frauduleuse par une personne malveillante. Une personne n'a généralement que trois essais consécutifs pour saisir le bon code secret, que ce soit lors d'une même transaction ou au cours de plusieurs transactions. Des nouvelles formes de fraudes et de piratage sont cependant mises au point continuellement par les fraudeurs de sorte qu'il existe aujourd'hui un besoin pour renforcer les mécanismes de sécurité portant sur les cartes à puce (de type EMV par exemple) et, plus généralement, sur tous dispositifs électroniques destinés à réaliser une transaction, de type bancaire ou autres, en coopération avec un terminal externe. Il existe en particulier un besoin pour renforcer le processus d'authentification de l'utilisateur mis en oeuvre par de tels dispositifs électroniques.If the user enters the correct secret code, the card resets the number of trials granted to three for the next request to enter the secret code in a subsequent transaction. This secret code verification mechanism protects the owner of the bank card against fraudulent use by a malicious person. A person usually has only three consecutive attempts to enter the correct secret code, whether in the same transaction or during multiple transactions. However, new forms of fraud and piracy are continually being developed by fraudsters, so that there is a need today to reinforce the security mechanisms for smart cards (EMV for example) and more generally, on all electronic devices intended to carry out a transaction, of the banking or other type, in cooperation with an external terminal. In particular, there is a need to strengthen the user authentication process implemented by such electronic devices.

Objet et résumé de l'invention A cet effet, la présente invention concerne un procédé de contrôle mis en oeuvre par un dispositif électronique, ledit procédé comprenant les étapes suivantes : obtention d'un code secret saisi par un utilisateur ; traitement du code secret, le traitement comprenant une vérification du code secret et une gestion d'un premier compteur ; mémorisation de la valeur du premier compteur dans une mémoire non-volatile réinscriptible ; dans lequel : si le code saisi est détecté comme étant faux lors de ladite vérification, l'étape de traitement a pour effet de modifier la valeur du premier compteur pour indiquer que le code secret est faux ; et si le code saisi est détecté comme étant bon lors de ladite vérification, l'étape de traitement a pour effet de garder la valeur du premier compteur inchangée quelle que soit la valeur du premier compteur.OBJECT AND SUMMARY OF THE INVENTION To this end, the present invention relates to a control method implemented by an electronic device, said method comprising the following steps: obtaining a secret code entered by a user; secret code processing, the processing including secret code verification and management of a first counter; storing the value of the first counter in a rewritable non-volatile memory; wherein: if the entered code is detected as false during said check, the processing step has the effect of changing the value of the first counter to indicate that the secret code is false; and if the entered code is detected as good during said check, the processing step has the effect of keeping the value of the first counter unchanged regardless of the value of the first counter.

Selon un mode de réalisation particulier, le procédé de contrôle comprend une détection d'une anomalie à partir de la valeur du premier compteur lorsqu'une condition prédéterminée est satisfaite. Selon un mode de réalisation particulier, la condition prédéterminée définit une valeur seuil, la détection de l'anomalie étant réalisée en comparant la valeur courante du premier compteur avec la valeur seuil. Selon un mode de réalisation particulier, le procédé de contrôle est tel que : à chaque fois que le code saisi est détecté comme étant faux lors de ladite vérification, l'étape de traitement a pour effet d'incrémenter la valeur du premier compteur pour indiquer la saisie d'un code faux supplémentaire, ladite anomalie étant détectée lorsque la valeur courante du premier compteur est supérieure ou égale à ladite valeur seuil ; ou à chaque fois que le code saisi est détecté comme étant faux lors de ladite vérification, l'étape de traitement a pour effet de décrémenter la valeur du premier compteur pour indiquer la saisie d'un code faux supplémentaire, ladite anomalie étant détectée lorsque la valeur courante du premier compteur est inférieure ou égale à ladite valeur seuil. Selon un mode de réalisation particulier, le procédé de contrôle comprend, sur détermination de ladite anomalie, une opération de sécurisation d'au moins l'un parmi le dispositif électronique et une opération avec un terminal externe.According to a particular embodiment, the control method comprises a detection of an anomaly from the value of the first counter when a predetermined condition is satisfied. According to a particular embodiment, the predetermined condition defines a threshold value, the detection of the anomaly being performed by comparing the current value of the first counter with the threshold value. According to a particular embodiment, the control method is such that: each time the code entered is detected as false during said verification, the processing step has the effect of incrementing the value of the first counter to indicate entering an additional false code, said anomaly being detected when the current value of the first counter is greater than or equal to said threshold value; or whenever the code entered is detected as false during said verification, the processing step has the effect of decrementing the value of the first counter to indicate the input of an additional false code, said anomaly being detected when the current value of the first counter is less than or equal to said threshold value. According to a particular embodiment, the control method comprises, on determining said anomaly, an operation for securing at least one of the electronic device and an operation with an external terminal.

Selon un mode de réalisation particulier, l'opération de sécurisation comprend au moins l'une parmi les opérations suivantes : reconfiguration du dispositif électronique de manière à restreindre ses capacités de fonctionnement ; mise en échec d'une opération avec le terminal externe ; et envoi au terminal externe d'une donnée de sécurité représentative de ladite anomalie.According to a particular embodiment, the security operation comprises at least one of the following operations: reconfiguration of the electronic device so as to restrict its operating capacities; defeat an operation with the external terminal; and sending to the external terminal a security data representative of said anomaly.

Selon un mode de réalisation particulier, l'opération avec le terminal externe est une transaction bancaire. Selon un mode de réalisation particulier, ledit traitement comprend la gestion d'un deuxième compteur, le procédé de contrôle comprenant les étapes suivantes : si le code saisi est détecté comme étant faux, le traitement a pour effet de modifier la valeur du deuxième compteur pour indiquer la saisie d'un code faux supplémentaire ; si le code saisi est détecté comme étant bon, le traitement a pour effet de : o modifier la valeur du deuxième compteur de façon à la réinitialiser à une valeur constante prédéterminée lorsque la valeur du deuxième compteur est différente de ladite valeur constante prédéterminée, et o garder la valeur du deuxième compteur inchangée lorsque la valeur du deuxième compteur est égale à ladite valeur constante prédéterminée Selon un mode de réalisation particulier, la valeur du premier compteur et la valeur du deuxième compteur sont enregistrées lors d'une même opération d'écriture dans la mémoire non volatile réinscriptible du dispositif électronique. Selon un mode de réalisation particulier, la valeur du premier compteur et la valeur du deuxième compteur sont enregistrées dans un même bloc mémoire de la mémoire non volatile réinscriptible du dispositif électronique. Selon un mode de réalisation particulier, dans lequel chaque bloc mémoire de la mémoire non volatile réinscriptible contient 256 octets de mémoire. Dans un mode particulier de réalisation, les différentes étapes du procédé de contrôle sont déterminées par des instructions de programmes d'ordinateurs.According to a particular embodiment, the operation with the external terminal is a bank transaction. According to a particular embodiment, said processing comprises the management of a second counter, the control method comprising the following steps: if the code entered is detected as false, the processing has the effect of modifying the value of the second counter for indicate the entry of an additional false code; if the code entered is detected as good, the processing has the effect of: modifying the value of the second counter so as to reset it to a predetermined constant value when the value of the second counter is different from said predetermined constant value, and keeping the value of the second counter unchanged when the value of the second counter is equal to said predetermined constant value According to a particular embodiment, the value of the first counter and the value of the second counter are recorded during the same write operation in the rewritable non-volatile memory of the electronic device. According to a particular embodiment, the value of the first counter and the value of the second counter are stored in a same memory block of the rewritable non-volatile memory of the electronic device. According to a particular embodiment, in which each memory block of the rewritable non-volatile memory contains 256 bytes of memory. In a particular embodiment, the various steps of the control method are determined by computer program instructions.

En conséquence, l'invention vise aussi un programme d'ordinateur sur un support d'informations (ou d'enregistrement), ce programme étant susceptible d'être mis en oeuvre dans un dispositif électronique tel qu'une carte à puce ou un ordinateur, ce programme comportant des instructions adaptées à la mise en oeuvre des étapes d'un procédé de contrôle tel que défini ci-dessus.Accordingly, the invention also relates to a computer program on an information carrier (or recording), this program being capable of being implemented in an electronic device such as a smart card or a computer , this program comprising instructions adapted to the implementation of the steps of a control method as defined above.

L'invention vise aussi un support d'enregistrement (ou support d'informations) lisible par un ordinateur, et comportant des instructions d'un programme d'ordinateur tel que mentionné ci-dessus. Corrélativement, l'invention concerne un dispositif électronique comprenant : - un module d'obtention d'un code secret saisi par un utilisateur ; un module de traitement pour réaliser un traitement du code secret, le traitement comprenant une vérification du code secret et une gestion d'un premier compteur ; un module de mémorisation pour mémoriser la valeur du premier compteur dans un mémoire non volatile réinscriptible du dispositif électronique ; dans lequel : si le code saisi est détecté comme étant faux par le module de vérification, le traitement a pour effet de modifier la valeur du premier compteur pour indiquer la saisie d'un code faux supplémentaire ; et si le code saisi est détecté comme étant bon par le module de vérification, le traitement a pour effet de garder la valeur du premier compteur inchangée quelle que soit la valeur du premier compteur. Selon un mode de réalisation particulier, le dispositif électronique comprend un module de détection d'une anomalie à partir de la valeur du premier compteur lorsqu'une condition prédéterminée est satisfaite. Selon un mode de réalisation particulier, la condition prédéterminée définit une valeur seuil, le module de détection étant apte à détecter l'anomalie à partir d'une comparaison entre la valeur du premier compteur et la valeur seuil. Selon un mode de réalisation particulier, le dispositif électronique est une carte à 20 puce. A noter que les programme d'ordinateur mentionnés dans le présent exposé peuvent utiliser n'importe quel langage de programmation, et être sous la forme de code source, code objet, ou de code intermédiaire entre code source et code objet, tel que dans une forme partiellement compilée, ou dans n'importe quelle autre forme souhaitable. 25 De plus, les supports d'enregistrement (ou d'information) mentionnés dans le présent exposé peuvent être n'importe quelle entité ou dispositif capable de stocker le programme. Par exemple, le support peut comporter un moyen de stockage, tel qu'une ROM, par exemple un CD ROM ou une ROM de circuit microélectronique, ou encore un moyen d'enregistrement magnétique, par exemple une disquette (floppy disc) ou un 30 disque dur. D'autre part, les supports d'enregistrement peuvent correspondre à un support transmissible tel qu'un signal électrique ou optique, qui peut être acheminé via un câble électrique ou optique, par radio ou par d'autres moyens. Le programme selon l'invention peut être en particulier téléchargé sur un réseau de type Internet.The invention also relates to a recording medium (or information carrier) readable by a computer, and including instructions of a computer program as mentioned above. Correlatively, the invention relates to an electronic device comprising: a module for obtaining a secret code entered by a user; a processing module for performing a secret code processing, the processing comprising a verification of the secret code and management of a first counter; a storage module for storing the value of the first counter in a rewritable non-volatile memory of the electronic device; wherein: if the entered code is detected as false by the verification module, the processing has the effect of modifying the value of the first counter to indicate the input of an additional false code; and if the code entered is detected as good by the verification module, the processing has the effect of keeping the value of the first counter unchanged regardless of the value of the first counter. According to a particular embodiment, the electronic device comprises a module for detecting an anomaly from the value of the first counter when a predetermined condition is satisfied. According to a particular embodiment, the predetermined condition defines a threshold value, the detection module being able to detect the anomaly from a comparison between the value of the first counter and the threshold value. According to a particular embodiment, the electronic device is a smart card. Note that the computer programs mentioned in this presentation can use any programming language, and be in the form of source code, object code, or intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form. In addition, the recording (or information) media mentioned in this disclosure may be any entity or device capable of storing the program. For example, the medium may comprise storage means, such as a ROM, for example a CD ROM or a microelectronic circuit ROM, or a magnetic recording medium, for example a floppy disk or a disk. Hard disk. On the other hand, the recording media may correspond to a transmissible medium such as an electrical or optical signal, which may be conveyed via an electrical or optical cable, by radio or by other means. The program according to the invention can be downloaded in particular on an Internet type network.

Alternativement, les supports d'enregistrement peuvent correspondre à un circuit intégré dans lequel le programme est incorporé, le circuit étant adapté pour exécuter ou pour être utilisé dans l'exécution du procédé en question.Alternatively, the recording media may correspond to an integrated circuit in which the program is incorporated, the circuit being adapted to execute or to be used in the execution of the method in question.

Brève description des dessins D'autres caractéristiques et avantages de la présente invention ressortiront de la description faite ci-dessous, en référence aux dessins annexés qui en illustrent des exemples de réalisation dépourvus de tout caractère limitatif. Sur les figures: la figure 1 représente sous forme d'un organigramme un exemple de réalisation d'une transaction mis en oeuvre par une carte à puce selon le protocole EMV avec un terminal externe ; la figure 2 représente, de manière schématique, l'architecture matérielle d'une carte à puce conforme à un mode de réalisation particulier de l'invention ; la figure 3 représente schématiquement des modules mis en oeuvre par la carte à puce de la figure 2; la figure 4 représente sous forme d'un organigramme un procédé de contrôle mis en oeuvre par la carte à puce des figures 2 et 3 conformément à un mode de réalisation particulier ; et la figure 5 représente sous forme d'un organigramme une variante de réalisation du procédé de contrôle de l'invention. Description détaillée de plusieurs modes de réalisation Comme indiqué ci-avant, la présente invention se situe dans le domaine général des dispositifs électroniques aptes à coopérer avec un terminal externe afin de réaliser une transaction, dans le domaine bancaire par exemple. Dans ce document, des modes de réalisation de l'invention sont décrits dans le cadre d'une carte bancaire (carte de crédit, carte de débit, carte de paiement etc.) apte à réaliser une transaction bancaire avec un lecteur externe. Dans cet exemple, la carte bancaire et le lecteur coopèrent ensemble selon le protocole EMV.BRIEF DESCRIPTION OF THE DRAWINGS Other features and advantages of the present invention will emerge from the description given below, with reference to the accompanying drawings which illustrate embodiments having no limiting character. In the figures: FIG. 1 represents in the form of a flowchart an exemplary embodiment of a transaction implemented by a smart card according to the EMV protocol with an external terminal; FIG. 2 schematically represents the hardware architecture of a smart card according to a particular embodiment of the invention; FIG. 3 schematically represents modules implemented by the smart card of FIG. 2; FIG. 4 represents in the form of a flowchart a control method implemented by the smart card of FIGS. 2 and 3 according to a particular embodiment; and FIG. 5 represents in the form of a flowchart an alternative embodiment of the control method of the invention. DETAILED DESCRIPTION OF SEVERAL EMBODIMENTS As indicated above, the present invention is in the general field of electronic devices capable of cooperating with an external terminal in order to carry out a transaction, in the banking field for example. In this document, embodiments of the invention are described in the context of a bank card (credit card, debit card, payment card, etc.) capable of carrying out a banking transaction with an external reader. In this example, the bank card and the reader cooperate together according to the EMV protocol.

On comprendra toutefois qu'il ne s'agit que d'exemples non limitatifs et que l'invention peut s'appliquer notamment à d'autres protocoles et à d'autres types de transactions. Plus généralement, la carte à puce peut être un quelconque dispositif électronique apte à communiquer avec le lecteur pour réaliser une transaction donnée. Par ailleurs, dans les exemples considérés ici, la carte à puce est conforme à la norme 35 ISO 7816.However, it will be understood that they are only non-limiting examples and that the invention can be applied in particular to other protocols and other types of transactions. More generally, the smart card can be any electronic device capable of communicating with the reader to perform a given transaction. Moreover, in the examples considered here, the smart card conforms to the ISO 7816 standard.

Sauf indications contraires, les éléments communs ou analogues à plusieurs figures portent les mêmes numéros de références et présentent des caractéristiques identiques ou analogues, de sorte que ces éléments communs ne sont généralement pas à nouveau décrits par souci de simplicité.Unless otherwise indicated, elements common or similar to several figures have the same reference numbers and have the same or similar characteristics, so that these common elements are generally not described again for the sake of simplicity.

On décrit tout d'abord en référence à la figure 1 un exemple de traitement mise en oeuvre par une carte à puce EMV, ce traitement comprenant la vérification du code secret et la gestion d'un compteur pour compter le nombre d'essais consécutifs manqués de saisie du code secret par un utilisateur. Lors d'une transaction EMV, on suppose qu'un lecteur demande à un utilisateur de saisir le code secret (ou code PIN) d'une carte EMV. L'utilisateur saisit généralement le code secret à l'aide des touches présentes sur le lecteur. La carte EMV assure en particulier la gestion d'un compteur noté PTC qui détermine le nombre d'essais consécutifs de saisie du code PIN par l'utilisateur qui ont échoué. A partir du suivi du compteur PTC, la carte EMV est apte à déterminer la suite à donner à la saisie d'un code PIN par l'utilisateur. Plus précisément, au cours d'une étape S2, la carte à puce reçoit un premier code PIN saisi par l'utilisateur. La carte détermine (S4) alors si le compteur PTC est tel que : PTC > LMT1 où LMT1 est une constante prédéterminée fixée par exemple ici à 3, cette constante représentant le nombre maximal autorisé d'essais consécutifs manqués de saisie du code PIN. Si 3 essais du code PIN échouent consécutivement, la vérification du code PIN échoue définitivement et, en général, la carte se bloque. Si PTC > LMT1, la carte EMV procède à l'étape S8. Dans le cas contraire, la variable PTC est détectée comme étant invalide et un message d'échec NOK est renvoyé (S6) au lecteur par la carte. En S8, la carte EMV décrémente la variable PTC de 1 puis procède à l'étape S10. En S10, la carte EMV détermine si le code secret saisi par l'utilisateur est valide en comparant celui-ci avec un code de référence stocké par exemple dans une mémoire sécurisée de la carte.FIG. 1 firstly describes an example of processing implemented by an EMV chip card, this processing including the verification of the secret code and the management of a counter to count the number of consecutive missed attempts. secret code entry by a user. During an EMV transaction, it is assumed that a reader requests a user to enter the secret code (or PIN) of an EMV card. The user usually enters the secret code using the keys on the reader. The EMV card in particular manages a counter rated PTC which determines the number of consecutive attempts to enter the PIN code by the user that failed. From the monitoring of the PTC counter, the EMV card is able to determine the sequence to be given to the entry of a PIN code by the user. More specifically, during a step S2, the smart card receives a first PIN code entered by the user. The card determines (S4) then whether the PTC counter is such that: PTC> LMT1 where LMT1 is a predetermined constant set here for example at 3, this constant representing the maximum allowed number of consecutive failed attempts to enter the PIN code. If 3 attempts of the PIN code fail consecutively, the verification of the PIN code permanently fails and, in general, the card is blocked. If PTC> LMT1, the EMV card proceeds to step S8. If not, the PTC variable is detected as invalid and a NOK failure message is returned (S6) to the reader by the card. In S8, the EMV card decrements the PTC variable by 1 and proceeds to step S10. In S10, the EMV card determines whether the secret code entered by the user is valid by comparing it with a reference code stored for example in a secure memory of the card.

Si le code secret est valide, la carte EMV (S14) réinitialise la variable PTC à la valeur de la constante LMT1. En outre, la carte EMV renvoie (S14) au lecteur un message OK indiquant le succès de la vérification du code secret. Si, en revanche, le code secret est détecté comme étant invalide en S10, la carte EMV vérifie (S16) si la variable PTC est égale à zéro. Si tel est le cas, l'utilisateur a effectué le nombre maximum d'essais consécutifs du PIN de sorte que l'authentification du porteur échoue et la carte renvoie (S8) un message d'échec au lecteur et, généralement, se bloque. Si revanche la variable PTC n'est pas égale à zéro, cela signifie que l'utilisateur a encore au moins une chance pour saisir le bon code secret. Dans ce cas, la carte EMV invite (S20) l'utilisateur à saisir à nouveau le code secret en envoyant une commande TRY_AGAIN prévue à cet effet au lecteur. Un exemple d'algorithme correspondant aux étapes S2 à S14 est proposé ci-dessous : /* held in NVM; set during personalization to 3 for example*/ byte constant: PIN_TRY_COUNTER LIMIT; /* Held in NVM; set during personalization to the value of PIN TRY COUNTER LIMIT */ _ byte variable: PTC; get-pin(pin) { if (PTC > PIN TRY COUNTER LIMIT) _ _ return NOK; --PTC; if (ok(pin)) { PTC = PIN TRY COUNTER LIMIT; _ return OK; else { return TRY AGAIN; Dans l'exemple d'algorithme ci-dessus, on entend par NVM une mémoire non volatile 30 (Non volatile Memory) de la carte à puce. De plus, PIN_TRY_COUNTER_LIMIT est la valeur prédéfinie LMT1 fixée ici à 3. Par ailleurs, on notera dans l'exemple d'algorithme ci-dessus, que lorsque le code PIN est détecté comme étant erroné à l'étape S10, l'algorithme ne lance pas une étape de vérification pour vérifier si le compteur PTC est égal à zéro ou non mais génère simplement une commande TRY_AGAIN invitant l'utilisateur à réaliser une nouvelle saisie du code secret. On comprendra que divers exemples de réalisation sont toutefois envisageables. Le suivi du compteur PTC permet avantageusement à la carte à puce d'empêcher un utilisateur de saisir plus N fois consécutivement un code secret faux, que ce soit pendant une même transaction ou au cours de plus transaction (pourvu que les essais en question soient consécutifs). N est un nombre entier défini par la constante LMT1. Cette authentification de l'utilisateur à partir du compteur PTC permet de limiter les tentatives de fraudes à l'encontre des cartes à puce, de type EMV par exemple.If the secret code is valid, the EMV card (S14) resets the PTC variable to the value of the LMT1 constant. In addition, the EMV card returns (S14) to the reader an OK message indicating the success of the verification of the secret code. If, on the other hand, the secret code is detected as being invalid in S10, the EMV card checks (S16) if the variable PTC is equal to zero. If so, the user has performed the maximum number of consecutive PIN tries such that the bearer authentication fails and the card returns (S8) a failure message to the reader and usually hangs. If the PTC variable is not equal to zero, the user still has at least one chance to enter the correct secret code. In this case, the EMV card prompts (S20) the user to enter the secret code again by sending a TRY_AGAIN command provided for this purpose to the reader. An example of an algorithm corresponding to steps S2 to S14 is proposed below: / * held in NVM; set during personalization to 3 for example * / byte constant: PIN_TRY_COUNTER LIMIT; / * Held in NVM; PIN TRY COUNTER LIMIT * / _ byte variable: PTC; get-pin (pin) {if (PTC> TRY COUNTER LIMIT PIN) _ _ return NOK; --PTC; if (ok (pin)) {PTC = PIN TRY COUNTER LIMIT; _ return OK; else {return TRY AGAIN; In the above algorithm example, NVM is a nonvolatile memory of the smart card. In addition, PIN_TRY_COUNTER_LIMIT is the LMT1 preset value set here at 3. Furthermore, it will be noted in the algorithm example above that when the PIN code is detected as erroneous in step S10, the algorithm does not start a verification step to check whether the PTC counter is equal to zero or not but simply generates a TRY_AGAIN command inviting the user to perform a new seizure of the secret code. It will be understood that various embodiments can however be envisaged. Tracking the PTC counter advantageously allows the smart card to prevent a user from entering more than once consecutively a false secret code, whether during the same transaction or during more transaction (provided that the tests in question are consecutive ). N is an integer defined by the constant LMT1. This authentication of the user from the PTC counter makes it possible to limit fraud attempts against smart cards, such as EMV cards.

La déposante a cependant constaté qu'une faille subsiste lorsque ce mécanisme de sécurité est mis en oeuvre dans un dispositif électronique tel qu'une carte bancaire EMV par exemple. Plus précisément, la déposante a observé qu'il est possible pour une personne malveillante de subtiliser une carte bancaire EMV et de faire deux tentatives de saisie du code secret (dans le cas où LMT1 = 3 par exemple). En cas d'échec, la personne malveillante peut ensuite rendre la carte EMV à son utilisateur légitime sans que ce dernier en ait connaissance. Dès lors que le propriétaire légitime entre le bon code secret lors d'une transaction ultérieure, le compteur PCT se réinitialise à la valeur maximum définie par LMT1, c'est-à-dire la valeur 3 dans cet exemple. La personne malveillante a alors la possibilité de tenter à nouveau deux saisis du code secret à l'insu de l'utilisateur légitime de la carte. En répétant autant de fois que nécessaire ce subterfuge dans le temps, il est possible pour une personne malveillante de déterminer le bon code secret de la carte. Cette faiblesse détectée dans le protocole réside dans le fait qu'à chaque fois qu'un code secret est saisi avec succès par un utilisateur, la carte à puce réinitialise le compteur PTC. L'invention propose notamment de palier les problèmes et inconvénients identifiés ci-avant. Pour ce faire, l'invention propose une carte à puce (et plus généralement un dispositif électronique) capable de contrôler un nombre total d'essais manqués de saisie du code secret. Il est ainsi possible pour la carte à puce de détecter une anomalie représentative d'une utilisation anormale de la carte à partir du nombre total d'essais manqués de saisie du code secret à un instant donné. Une anomalie est par exemple détectée lorsque la carte détermine que le nombre total d'essais manqués de saisie du code secret atteint une valeur seuil LIMT2 prédéterminée. Si une telle anomalie est détectée, la carte à puce peut réaliser un traitement approprié de l'anomalie tel qu'une opération de sécurisation donnée (blocage de la carte, envoi d'un message de mise en échec de la transaction en cours au lecteur etc.). Il est ainsi possible de détecter une utilisation frauduleuse de la carte à puce même si le nombre de saisies consécutives du code secret n'a pas atteint la limite maximale autorisée (fixée à trois, par exemple).The applicant however found that a fault remains when this security mechanism is implemented in an electronic device such as an EMV bank card for example. More specifically, the applicant has observed that it is possible for an attacker to steal an EMV bank card and make two attempts to enter the secret code (in the case where LMT1 = 3 for example). In case of failure, the malicious person can then return the EMV card to its legitimate user without the latter being aware of it. Once the legitimate owner enters the correct secret code in a subsequent transaction, the PCT counter resets to the maximum value defined by LMT1, that is, the value 3 in this example. The malicious person then has the opportunity to retry two seizures of the secret code without the knowledge of the legitimate user of the card. Repeating as many times as necessary this subterfuge in time, it is possible for an attacker to determine the correct secret code of the card. This weakness detected in the protocol lies in the fact that each time a secret code is successfully entered by a user, the smart card resets the PTC counter. The invention proposes in particular to overcome the problems and disadvantages identified above. To do this, the invention proposes a smart card (and more generally an electronic device) capable of controlling a total number of missed attempts to enter the secret code. It is thus possible for the smart card to detect an anomaly representative of an abnormal use of the card from the total number of missed attempts to enter the secret code at a given moment. An anomaly is detected, for example, when the card determines that the total number of missed attempts at entering the secret code reaches a predetermined threshold value LIMT2. If such an anomaly is detected, the smart card can perform an appropriate treatment of the anomaly such as a given security operation (blocking the card, sending a message of failure of the current transaction to the reader etc.). It is thus possible to detect a fraudulent use of the smart card even if the number of consecutive seizures of the secret code has not reached the maximum authorized limit (set at three, for example).

La figure 2 représente, de manière schématique, l'architecture matérielle de la carte à puce 2 conforme à un mode de réalisation particulier de l'invention. La carte 2 est dans cet exemple une carte EMV conforme à la norme ISO 7816. Plus particulièrement, la carte à puce 2 comprend ici un microprocesseur 4 couplé à des contacts externes 6 (ports d'entrées/sorties), une mémoire volatile réinscriptible (de type RAM) 8 et une mémoire non volatile réinscriptible 10 (de type Flash par exemple). La carte 2 peut également comprendre une mémoire morte (de type ROM) non représentée ici. Le microprocesseur 4 est apte, via les contacts externes 6, à communiquer par contact avec un lecteur (ou terminal) externe LT approprié, un terminal de paiement par exemple. On comprendra toutefois que l'invention peut s'appliquer également aux cartes à puce communiquant en mode sans contact. Dans cet exemple, on considère que la mémoire 10 est sécurisée, en faisant appel à un mécanisme de sécurité classique bien connu de l'homme du métier et qui ne sera donc pas décrit ici.FIG. 2 schematically represents the hardware architecture of the smart card 2 according to a particular embodiment of the invention. In this example, the card 2 is an EMV card conforming to the ISO 7816 standard. More particularly, the smart card 2 here comprises a microprocessor 4 coupled to external contacts 6 (input / output ports), a rewritable volatile memory ( RAM type) 8 and a rewritable non-volatile memory 10 (Flash type for example). The card 2 may also include a ROM (ROM type) not shown here. The microprocessor 4 is able, via the external contacts 6, to communicate by contact with an appropriate external reader (or terminal) LT, a payment terminal for example. However, it will be understood that the invention can also be applied to smart cards communicating in contactless mode. In this example, it is considered that the memory 10 is secured, using a conventional security mechanism well known to those skilled in the art and therefore will not be described here.

La mémoire 10 constitue ici un support d'enregistrement (ou d'information) conforme à un mode de réalisation de l'invention, lisible par la carte à puce 2, et sur lequel est enregistré un programme d'ordinateur PG1 conforme à un mode de réalisation de l'invention. Le programme PG1 comporte des instructions pour l'exécution des étapes d'un procédé de contrôle, conformément à un mode de réalisation de l'invention. Des exemples de réalisation de ce procédé sont représentés sur les figures 4 à 5 décrites ultérieurement. La mémoire 10 contient par ailleurs dans cet exemple un code de référence CREF représentatif du code secret authentique de la carte 2, les valeurs du compteur PTC et du compteur TOT_PTC, ainsi que les valeurs seuils LMT1 et LMT2.The memory 10 constitutes here a recording medium (or information) according to an embodiment of the invention, readable by the smart card 2, and on which is recorded a computer program PG1 according to a mode embodiment of the invention. The program PG1 includes instructions for carrying out the steps of a control method, in accordance with one embodiment of the invention. Exemplary embodiments of this method are shown in Figures 4 to 5 described later. The memory 10 also contains in this example a reference code CREF representative of the authentic secret code of the card 2, the values of the counter PTC and the counter TOT_PTC, as well as the threshold values LMT1 and LMT2.

Comme déjà expliqué, la valeur du compteur PTC est représentative du nombre consécutifs d'essais manqués de saisie du code secret par l'utilisateur de la carte 2. La valeur du compteur TOT_PTC est représentative du nombre total d'essais de saisie par l'utilisateur du code secret. Comme expliqué par la suite, la mémoire RAM 8 sert de mémoire de travail dans laquelle le microprocesseur 4 peut enregistrer de façon provisoire des données, telles que les valeurs des compteurs TOT_PTC et PTC. Ces données sont transférées si nécessaire de la RAM 8 dans la mémoire non volatile réinscriptible 10. La valeur seuil LMT1 est représentative du nombre maximum autorisé d'essais consécutifs manqués de saisie du code secret par l'utilisateur tandis que la valeur seuil LMT2 est représentative du nombre total maximum autorisé d'essais manqués de saisie du code secret par l'utilisateur. On suppose par exemple ici que LMT1 = 3 et que LMT2 = 15, ces valeurs pouvant bien entendu être adaptées selon les besoins. La figure 3 représente schématiquement des modules pouvant être mis en oeuvre par le microprocesseur 4 exécutant le programme PG1, à savoir : un module d'obtention d'un code secret 14, un module de traitement 16 d'un code secret obtenu par le module d'obtention 14, un module de mémorisation 18 apte à mémoriser une valeur du compteur TOT_PTC obtenue par le module de traitement 16, un module de détection 20 apte à détecter une anomalie à partir de la valeur du compteur TOT_PTC, et un module de sécurisation 22 apte à réaliser une opération de sécurisation de la carte à puce 2 lorsqu'une telle anomalie est détectée. Un mode de réalisation particulier de l'invention est à présent décrit en référence à la figure 4. Plus précisément, la carte à puce 2 met en oeuvre un procédé de contrôle conforme à un mode particulier de l'invention en exécutant le programme PG1.As already explained, the value of the counter PTC is representative of the consecutive number of missed attempts to enter the secret code by the user of the card 2. The value of the counter TOT_PTC is representative of the total number of input attempts by the user. secret code user. As explained below, the RAM 8 serves as a working memory in which the microprocessor 4 can temporarily store data, such as the values of the counters TOT_PTC and PTC. This data is transferred if necessary from the RAM 8 into the rewritable non-volatile memory 10. The threshold value LMT1 is representative of the maximum number of consecutive missed attempts to enter the secret code by the user while the threshold value LMT2 is representative. the maximum total number of missed attempts to enter the secret code by the user. For example, it is assumed here that LMT1 = 3 and LMT2 = 15, these values being able to be adapted according to needs. FIG. 3 schematically represents modules that can be implemented by the microprocessor 4 executing the program PG1, namely: a module for obtaining a secret code 14, a processing module 16 for a secret code obtained by the module for obtaining 14, a storage module 18 able to store a value of the counter TOT_PTC obtained by the processing module 16, a detection module 20 able to detect an anomaly from the value of the counter TOT_PTC, and a security module 22 capable of performing a security operation of the smart card 2 when such an anomaly is detected. A particular embodiment of the invention is now described with reference to FIG. 4. More specifically, the smart card 2 implements a control method according to a particular embodiment of the invention by executing the program PG1.

On suppose ici que la carte à puce 2 et le lecteur LT coopèrent ensemble selon le protocole EMV pour réaliser une transaction telle qu'une transaction de paiement ou une transaction bancaire par exemple. D'autres exemples de réalisation de l'invention sont toutefois envisageables. On suppose ici que la carte EMV 2 est insérée dans le lecteur LT et que la carte 2 entame un dialogue selon le protocole EMV avec le lecteur LT. Lors d'une phase d'authentification de l'utilisateur, le lecteur externe LT récupère un code secret (ou code PIN) saisi par l'utilisateur et envoie ce code secret à la carte EMV qui le reçoit à l'étape E2. Dans cet exemple, l'obtention du code PIN est réalisée à l'aide du module d'obtention 14 de la carte EMV 2 via les contacts externes 6.It is assumed here that the smart card 2 and the LT reader cooperate together according to the EMV protocol to perform a transaction such as a payment transaction or a banking transaction for example. Other embodiments of the invention are, however, conceivable. It is assumed here that the EMV card 2 is inserted into the reader LT and that the card 2 initiates a dialogue according to the EMV protocol with the reader LT. During a user authentication phase, the external reader LT retrieves a secret code (or PIN code) entered by the user and sends this secret code to the EMV card that receives it in step E2. In this example, obtaining the PIN code is performed using the obtaining module 14 of the EMV card 2 via the external contacts 6.

La carte EMV2 réalise ensuite un traitement du code secret, ce traitement comprenant en particulier une vérification du code secret (E10) ainsi récupéré et une gestion (E4, E8 et E20) du compteur TOT_PTC. Dans cet exemple, ce traitement comprend en outre la gestion du compteur PTC (E8, E12 et E20) bien que la mise en oeuvre de ce compteur PTC ne soit strictement obligatoire pour réaliser l'invention. Ce traitement est réalisé à l'aide du module de traitement 16 dans l'exemple ici considéré. La carte EMV incrémente (E4) ensuite de 1 la valeur du compteur TOT_PTC.The EMV2 card then performs a secret code processing, this processing including in particular a verification of the secret code (E10) thus recovered and a management (E4, E8 and E20) of the counter TOT_PTC. In this example, this processing further comprises the management of the PTC counter (E8, E12 and E20) although the implementation of this PTC counter is strictly mandatory to achieve the invention. This treatment is performed using the processing module 16 in the example considered here. The EMV card increments (E4) by 1 by the value of the counter TOT_PTC.

Dans cet exemple, la valeur de TOT_PTC ainsi incrémentée est enregistrée (E6) dans la mémoire RAM 8 de la carte EMV 2. Les différents enregistrements du compteur TOT_PTC dans la RAM 8 ou dans la mémoire non volatile réinscriptible 10 sont réalisés dans cet exemple à l'aide du module de mémorisation 18.In this example, the value of TOT_PTC thus incremented is recorded (E6) in the RAM 8 of the EMV card 2. The different recordings of the counter TOT_PTC in the RAM 8 or in the rewritable non-volatile memory 10 are made in this example to using the memory module 18.

Au cours d'une étape E8, la carte EMV 2 détermine si la valeur du compteur PTC et la valeur du compteur TOT_PTC sont erronées. Dans cet exemple, la carte EMV 2 : (1) vérifie si la valeur du compteur PTC est strictement supérieure à la valeur seuil LMT1, et (2) vérifie si la valeur du compteur TOT_PTC est strictement supérieure à la valeur seuil LMT2. Si l'une de ces deux vérifications est positives (i.e. si PTC > LMT1 ou si TOT_PTC > LMT2), la carte EMV 2 détecte une anomalie et renvoie (E10) un message d'erreur NOK au lecteur externe LT. Si au contraire les deux vérifications ci-dessus (1) et (2) sont négatives, la carte EMV 2 procède à l'étape E12 au cours de laquelle elle décrémente de 1 la valeur du compteur PTC. La carte EMV 2 enregistre (E14) ensuite la valeur ainsi décrémentée du compteur PTC dans la mémoire RAM 8 puis transfert (E16) la valeur courante du compteur PTC et du compteur TOT_PTC dans la mémoire non volatile réinscriptible 10. Dans cet exemple, ce transfert est réalisé au cours d'une même étape d'écriture dans la mémoire 10. La carte EMV 2 détermine (E18) par ailleurs si le code secret saisi par l'utilisateur et récupéré à l'étape E2 est correct. Pour ce faire, la carte EMV 2 compare ici le code secret obtenu en E2 avec le code de référence CREF stocké dans la mémoire 10. Si la carte EMV 2 détecte (E18) qu'il y a correspondance entre le code secret saisi et le code de référence CREF, elle procède à l'étape E20, sinon elle procède à l'étape E26. Au cours de l'étape E20, la carte EMV réinitialise la valeur du compteur PTC à la valeur seuil LMT1 et décrémente de 1 la valeur du compteur TOT_PTC de sorte à annuler l'incrémentation réalisée précédemment en E4. Le compteur de TOT_PTC revient ainsi à l'état immédiatement avant l'étape d'incrémentation E4.During a step E8, the EMV card 2 determines whether the value of the counter PTC and the value of the counter TOT_PTC are erroneous. In this example, the EMV card 2: (1) checks whether the value of the PTC counter is strictly greater than the threshold value LMT1, and (2) verifies whether the value of the counter TOT_PTC is strictly greater than the threshold value LMT2. If one of these two checks is positive (ie if PTC> LMT1 or TOT_PTC> LMT2), the EMV card 2 detects an anomaly and returns (E10) a NOK error message to the external reader LT. If, on the contrary, the two checks above (1) and (2) are negative, the EMV card 2 proceeds to step E12 in which it decrements the value of the counter PTC by 1. The card EMV 2 then records (E14) the value thus decremented by the counter PTC in the RAM memory 8 and then transfers (E16) the current value of the counter PTC and the counter TOT_PTC to the non-volatile memory rewritable 10. In this example, this transfer is performed during the same step of writing in the memory 10. The EMV card 2 determines (E18) moreover if the secret code entered by the user and recovered in step E2 is correct. To do this, the EMV card 2 here compares the secret code obtained in E2 with the reference code CREF stored in the memory 10. If the EMV card 2 detects (E18) that there is correspondence between the secret code entered and the CREF reference code, it proceeds to step E20, otherwise it proceeds to step E26. During step E20, the EMV card resets the value of the PTC counter to the threshold value LMT1 and decrements by 1 the value of the counter TOT_PTC so as to cancel the incrementation carried out previously in E4. The counter of TOT_PTC thus returns to the state immediately before the step of incrementing E4.

La carte EMV 2 renvoie (E22) au lecteur LT un message OK indiquant le succès de la vérification du code secret. En outre, la carte EMV 2 enregistre (E24) dans la RAM 8 la valeur réinitialisée en E20 de PTC et la valeur décrémentée en E20 de TOT_PTC. La carte EMV 2 réalise (E124) ensuite le transfert des valeurs des compteurs PTC et TOT_PTC depuis la mémoire RAM 8 dans la mémoire 10. Dans cet exemple, ce transfert est réalisé au cours d'une même étape d'écriture dans la mémoire 10.The card EMV 2 sends (E22) to the reader LT an OK message indicating the success of the verification of the secret code. In addition, the EMV card 2 stores (E24) in the RAM 8 the reset value at E20 of PTC and the value decremented at E20 of TOT_PTC. The EMV card 2 then performs (E124) the transfer of the values of the counters PTC and TOT_PTC from the memory RAM 8 in the memory 10. In this example, this transfer is performed during the same step of writing in the memory 10 .

A l'étape E26 (cas du code secret invalide), la carte EMV 2 détermine (E26) si l'utilisateur est autorisé a réaliser un nouvel essai de saisie du code secret, à partir de la valeur du compteur TOT_PTC et de celle du compteur PTC. Pour ce faire, la carte EMV 2 vérifie ici si l'une des deux conditions suivantes est satisfaite : (a) TOT_PTC = LMT2 (b) PTC = 0 Si aucune des deux conditions (a) et (b) ci-dessus n'est satisfaite, la carte EMV 2 autorise (E28) une nouvelle saisie du code secret par l'utilisateur. Si en revanche au moins l'une des conditions (a) et (a) ci-dessus est satisfaite, la carte EMV 2 détecte qu'il y a une anomalie et procède à l'étape E30 au cours de laquelle elle réalise un traitement de l'anomalie ainsi détectée. Divers traitements peuvent être envisagés selon le cas. La détection de l'anomalie effectuée en E26 à partir des valeurs de TOT_PTC et PTC est ici réalisée à l'aide du module de détection 20. Le traitement réalisé en E30 constitue ici une opération de sécurisation de la carte EMV 2. Cette opération de sécurisation est ici réalisée à l'aide du module de sécurisation 22. L'opération de sécurisation peut comprendre au moins l'une parmi les opérations suivantes : - la reconfiguration de la carte EMV 2 de manière à restreindre ses capacités de fonctionnement (afin par exemple de bloquer la carte EMV) ; la mise en échec de la transaction en cours avec le lecteur externe ; et l'envoi au lecteur externe d'une donnée de sécurité représentative de ladite anomalie (un message indiquant par exemple que TOT_PTC = LMT2 et/ou que PTC = 0 selon le cas). On notera que si le code secret saisi par l'utilisateur est détecté comme étant valide en E18, le compteur TOT_PTC est décrémenté de 1 de sorte que le traitement E4-E20 réalisé par la carte EMV 2 a pour effet global de garder la valeur du compteur TOT_PTC inchangée et ce, quel que soit la valeur du compteur TOT_PTC avant d'initier le traitement E4-E20 en question. En revanche, si le code secret saisi par l'utilisateur est détecté comme étant erroné en E18, le compteur TOT_PTC n'est pas décrémenté de sorte que le traitement E4-E18 réalisé dans ce cas par la carte EMV 2 a pour effet global de modifier la valeur du compteur TOT_PTC, c'est-à-dire décrémenter de 1 la valeur du compteur TOT_PTC dans l'exemple décrit ici. L'effet global du traitement E4-E20 sur la valeur du compteur PTC est différent. Ainsi, si le code secret saisi par l'utilisateur est détecté comme étant valide en E18, le compteur PTC est réinitialisé à sa valeur maximale, à savoir la valeur prédéterminée LMT1. Dans ce cas, le traitement E4-E20 a pour effet global de ne pas modifier la valeur de PTC si sa valeur était déjà à la valeur LMT1 immédiatement avant d'initier le traitement E4-E20 (cas particulier où l'utilisateur avait réalisé avec succès sa précédente saisie du code secret), ou a pour effet global de modifier la valeur de PTC si sa valeur n'était pas à la valeur LMT1 immédiatement avant d'initier le traitement E4-E20 (cas particulier où au moins la précédente saisie du code secret réalisée par l'utilisateur était erronée). Un exemple d'algorithme correspondant aux étapes E2 à E22 est proposé ci-dessous : /* held in NVM; set during personalization to 3 for example*/ byte constant: PIN_TRY_COUNTER_LIMIT; /* held in NVM; set during personalization to 15 for example */ byte or two-byte constant: TOT_PIN_TRY_COUNTER_LIMIT; /* Held in NVM; set during personalization to the value of PIN TRY COUNTER LIMIT */ _ byte or two-byte variable: PTC; /* Held in NVM; set to 0 during personalizaton */ byte variable TOT PTC; get-pin(pin) { ++TOT PTC; if (PTC > PIN_TRY_COUNTER_LIMIT) or (TOT_PTC > TOT PIN TRY COUNTER LIMIT) _ _ _ return NOK; --PTC; /* commit incremented/decremented values to EEPROM/Flash before executing ok(pin) */ if (ok(pin)) f PTC - PIN TRY COUNTER LIMIT; _ _ --TOT PTC; /* commit reinitialized/decremented values to EEPROM after executing ok(pin) */ return OK; else f return TRY AGAIN; Dans l'exemple d'algorithme ci-dessus, on entend par NVM une mémoire non volatile (Non volatile Memory) de la carte à puce. De plus, PIN_TRY_COUNTER_LIMIT est la 15 valeur prédéfinie LMT1 fixée ici à 3, et TOT_PIN_TRY_COUNTER_LIMIT est la valeur prédéfinie LMT2 fixée ici à 15. Par ailleurs, on notera dans l'exemple d'algorithme ci-dessus, que lorsque le code PIN est détecté comme étant erroné à l'étape E18, l'algorithme ne procède pas à la vérification des compteurs PTC et TOT_PTC comme décrit ci-avant en relation à l'étape 20 E26 mais génère simplement une commande TRY_AGAIN invitant l'utilisateur à réaliser une nouvelle saisie du code secret. On comprendra que divers exemples de réalisation sont envisageables. Comme indiqué ci-dessus, divers variantes du mode de réalisation illustré en figures 2 à 4 sont envisageables dans le cadre de l'invention. En particulier, il est possible de 25 décider de modifier la valeur du compteur PTC (en E4) et celle du compteur TOT_PTC (en E12) par incrémentation ou par décrémentation selon le cas. L'homme du métier saura adapter le mode de réalisation de l'invention en fonction de la configuration choisie. On comprendra également que la présente invention porte principalement sur l'utilisation du compteur TOT_PTC. Il est toutefois préféré d'utiliser également le 30 compteur PTC pour contrôler le nombre consécutifs d'essais manqués de saisie du code secret comme expliqué précédemment. La présente invention permet avantageusement d'améliorer la protection d'un utilisateur légitime d'une carte à puce, de type EMV par exemple, contre une utilisation frauduleuse visant notamment à tester à de multiples reprises le code secret de la carte 35 (de façon plus ou moins aléatoire selon le cas), en prenant le soin de retourner régulièrement la carte à l'utilisateur légitime afin que ce dernier réinitialise le compteur PTC en saisissant le bon code secret lors d'une transaction. La mise en oeuvre seule du compteur PTC ne permet pas de protéger un utilisateur contre ce type de comportement frauduleux.In step E26 (in the case of the invalid secret code), the EMV card 2 determines (E26) whether the user is authorized to perform a new secret code input test, based on the value of the counter TOT_PTC and that of the PTC meter. To do this, the EMV card 2 checks here whether one of the following two conditions is satisfied: (a) TOT_PTC = LMT2 (b) PTC = 0 If neither of the two conditions (a) and (b) above is satisfied, the EMV card 2 authorizes (E28) a new entry of the secret code by the user. If, on the other hand, at least one of the conditions (a) and (a) above is satisfied, the EMV card 2 detects that there is an anomaly and proceeds to the step E30 during which it performs a treatment. of the anomaly thus detected. Various treatments may be considered as appropriate. The detection of the anomaly carried out in E26 from the values of TOT_PTC and PTC is here carried out using the detection module 20. The processing performed in E30 here constitutes an operation for securing the EMV card 2. This operation of security is here performed using the security module 22. The security operation may include at least one of the following operations: - the reconfiguration of the EMV card 2 so as to restrict its operating capabilities (so by example of blocking the EMV card); the failure of the current transaction with the external reader; and sending to the external reader a security data representative of said anomaly (a message indicating for example that TOT_PTC = LMT2 and / or PTC = 0 as the case). Note that if the secret code entered by the user is detected to be valid at E18, the counter TOT_PTC is decremented by 1 so that the E4-E20 processing performed by the EMV card 2 has the overall effect of keeping the value of the counter TOT_PTC unchanged regardless of the value of the counter TOT_PTC before initiating the treatment E4-E20 in question. On the other hand, if the secret code entered by the user is detected as being erroneous in E18, the counter TOT_PTC is not decremented so that the E4-E18 processing carried out in this case by the EMV card 2 has the overall effect of modify the value of the counter TOT_PTC, that is to say, to decrement by 1 the value of the counter TOT_PTC in the example described here. The overall effect of the E4-E20 treatment on the value of the PTC counter is different. Thus, if the secret code entered by the user is detected as valid in E18, the PTC counter is reset to its maximum value, namely the predetermined value LMT1. In this case, the E4-E20 treatment has the overall effect of not modifying the value of PTC if its value was already at the value LMT1 immediately before initiating the treatment E4-E20 (a special case where the user had realized with successful its previous entry of the secret code), or has the overall effect of modifying the value of PTC if its value was not at the value LMT1 immediately before initiating the processing E4-E20 (special case where at least the previous seizure secret code made by the user was wrong). An example of an algorithm corresponding to steps E2 to E22 is proposed below: / * held in NVM; set during personalization to 3 for example * / byte constant: PIN_TRY_COUNTER_LIMIT; / * held in NVM; set during personalization to 15 for example * / byte or two-byte constant: TOT_PIN_TRY_COUNTER_LIMIT; / * Held in NVM; set of personalization to the value of PIN TRY COUNTER LIMIT * / _ byte or two-byte variable: PTC; / * Held in NVM; set to 0 during personalizaton * / byte variable TOT PTC; get-pin (pin) {++ TOT PTC; if (PTC> PIN_TRY_COUNTER_LIMIT) or (TOT_PTC> TOT PIN TRY COUNTER LIMIT) _ _ _ return NOK; --PTC; / * commit incremented / decremented values to EEPROM / Flash before executing ok (pin) * / if (ok (pin)) f PTC - PIN TRY COUNTER LIMIT; _ _ - TOT PTC; / * commit reinitialized / decremented values to EEPROM after executing ok (pin) * / return OK; else f return TRY AGAIN; In the algorithm example above, NVM means a nonvolatile memory of the smart card. In addition, PIN_TRY_COUNTER_LIMIT is the LMT1 preset value set here at 3, and TOT_PIN_TRY_COUNTER_LIMIT is the LMT2 preset value set here at 15. Furthermore, it will be noted in the above algorithm example that when the PIN is detected as being erroneous in step E18, the algorithm does not check the counters PTC and TOT_PTC as described above in relation to step E26 but simply generates a TRY_AGAIN command inviting the user to perform a new one. entering the secret code. It will be understood that various exemplary embodiments are conceivable. As indicated above, various variants of the embodiment illustrated in FIGS. 2 to 4 can be envisaged within the scope of the invention. In particular, it is possible to decide to modify the value of the counter PTC (in E4) and that of the counter TOT_PTC (in E12) by incrementation or decrementation as appropriate. Those skilled in the art will be able to adapt the embodiment of the invention as a function of the chosen configuration. It will also be understood that the present invention relates mainly to the use of the counter TOT_PTC. It is preferred, however, to also use the PTC counter to monitor the consecutive number of missed secret code entries as explained above. The present invention advantageously makes it possible to improve the protection of a legitimate user of a smart card, of the EMV type, for example, against a fraudulent use aiming in particular at repeatedly testing the secret code of the card 35 (so more or less random depending on the case), taking care to regularly return the card to the legitimate user so that the latter resets the PTC counter by entering the correct secret code during a transaction. The implementation of the PTC meter alone does not protect a user against this type of fraudulent behavior.

L'utilisation conjointe du compteur PTC et TOT_PTC permet en outre d'offrir une protection optimale contre des tentatives d'utilisation frauduleuse d'une carte à puce, de type EMV par exemple. La manière dont la valeur du compteur TOT_PTC, et le cas échéant celle du compteur PTC, sont enregistrées en mémoire dans la carte EMV 2 pourra être adaptée par l'homme du métier selon les besoins. Selon une variante illustrée en figure 5 du mode de réalisation décrit ci-avant, la valeur du compteur PTC et celle du compteur TOT_PTC sont enregistrées ensemble au cours de l'étape E16 dans un même bloc mémoire BC (appelé aussi page mémoire) de la mémoire non volatile réinscriptible 10 de la carte EMV 2. Un tel bloc mémoire BC a par exemple une taille mémoire de 256 octets ou de 64 octets. De même, la valeur du compteur PTC et celle du compteur TOT_PTC sont enregistrées ensemble au cours de l'étape E24 dans un même bloc mémoire BC. L'enregistrement des valeurs de TOT_PTC et de PTC dans un même bloc mémoire de la mémoire 10 permet d'améliorer la sécurité de la gestion du compteur TOT_PTC. En effet, il est fréquent de mettre en oeuvre dans une carte à puce EMV un mécanisme de sécurité pour vérifier si une écriture d'une valeur du compteur PTC dans la mémoire non volatile réinscriptible a été correctement réalisée, ceci afin de palier d'éventuels fraudes intentées par une personne malveillante. Un tel mécanisme de sécurité comprend par exemple la réalisation d'une fonction dite de « checksum » sur la valeur de PTC écrite dans la mémoire 10. Enregistrer les valeurs des compteurs TOT_PTC et PTC dans un même bloc mémoire de la mémoire non volatile réinscriptible 10 permet de faire bénéficier l'écriture de TOT_PTC dans la mémoire 10 du mécanisme de sécurité visant à vérifier la bonne écriture de PTC dans la mémoire 10. Si la valeur du compteur TOT_PTC n'est pas écrite correctement dans la mémoire 10, le mécanisme de vérification portant sur l'écriture du compteur PTC pourra avantageusement le détecter. Dans un exemple particulier, on vérifie que l'écriture de TOT_PTC et PTC dans la mémoire 10 a été correctement effectuée en réalisant une fonction checksum uniquement sur PTC. Selon une variante, la fonction checksum est réalisée à la fois sur TOT_PTC et sur PTC tels qu'enregistrés dans la mémoire 10.The joint use of the PTC counter and TOT_PTC also makes it possible to offer optimal protection against attempts to fraudulently use a smart card, EMV for example. The manner in which the value of the counter TOT_PTC, and if applicable that of the counter PTC, are stored in memory in the EMV card 2 may be adapted by the skilled person as needed. According to a variant illustrated in FIG. 5 of the embodiment described above, the value of the counter PTC and that of the counter TOT_PTC are recorded together during step E16 in the same memory block BC (also called memory page) of the non-volatile memory rewritable 10 of the EMV card 2. Such a memory block BC has for example a memory size of 256 bytes or 64 bytes. Likewise, the value of the counter PTC and that of the counter TOT_PTC are recorded together during the step E24 in a same memory block BC. The recording of the values of TOT_PTC and PTC in the same memory block of the memory 10 makes it possible to improve the security of the management of the counter TOT_PTC. Indeed, it is common to implement in a EMV chip card a security mechanism to check if a write of a value of the PTC counter in the rewritable non-volatile memory has been correctly performed, in order to mitigate any fraud by an attacker. Such a security mechanism comprises, for example, the realization of a so-called "checksum" function on the value of PTC written in the memory 10. Save the values of the counters TOT_PTC and PTC in the same memory block of the rewritable non-volatile memory 10 makes it possible to benefit from the writing of TOT_PTC in the memory 10 of the security mechanism intended to check the good writing of PTC in the memory 10. If the value of the counter TOT_PTC is not written correctly in the memory 10, the mechanism of verification of the writing of the PTC counter can advantageously detect it. In a particular example, it is verified that the writing of TOT_PTC and PTC in the memory 10 has been correctly performed by performing a checksum function only on PTC. According to one variant, the checksum function is performed on both TOT_PTC and PTC as recorded in the memory 10.

Un homme du métier comprendra que les modes de réalisation et variantes décrits ci-avant ne constituent que des exemples non limitatifs de mise en oeuvre de l'invention. En particulier, l'homme du métier pourra envisager une quelconque combinaison des variantes et modes de réalisation décrits ci-avant afin de répondre à un besoin bien particulier.Those skilled in the art will understand that the embodiments and variants described above are only non-limiting examples of implementation of the invention. In particular, those skilled in the art may consider any combination of the variants and embodiments described above to meet a particular need.

Claims (17)

REVENDICATIONS1. Procédé de contrôle mis en oeuvre par un dispositif électronique (2), ledit procédé comprenant les étapes suivantes : obtention (E2) d'un code secret saisi par un utilisateur ; traitement du code secret, le traitement comprenant une vérification (E18) du code secret et une gestion (E4, E8, E20) d'un premier compteur (TOT_PTC) ; mémorisation (E16) de la valeur du premier compteur dans une mémoire non- volatile réinscriptible (10) ; caractérisé en ce que : si le code saisi est détecté comme étant faux lors de ladite vérification (E18), l'étape de traitement a pour effet de modifier la valeur du premier compteur (TOT_PTC) pour indiquer que le code secret est faux ; et si le code saisi est détecté comme étant bon lors de ladite vérification (E18), l'étape de traitement a pour effet de garder la valeur du premier compteur (TOT_PTC) inchangée quelle que soit la valeur du premier compteur.REVENDICATIONS1. A method of control implemented by an electronic device (2), said method comprising the steps of: obtaining (E2) a secret code entered by a user; secret code processing, the processing comprising a verification (E18) of the secret code and a management (E4, E8, E20) of a first counter (TOT_PTC); storing (E16) the value of the first counter in a rewritable non-volatile memory (10); characterized in that: if the entered code is detected as false during said verification (E18), the processing step has the effect of modifying the value of the first counter (TOT_PTC) to indicate that the secret code is false; and if the entered code is detected as good during said check (E18), the processing step has the effect of keeping the value of the first counter (TOT_PTC) unchanged regardless of the value of the first counter. 2. Procédé selon la revendication 1, comprenant une détection (E30) d'une anomalie à partir de la valeur du premier compteur (TOT_PTC) lorsqu'une condition prédéterminée est satisfaite.The method of claim 1 including detecting (E30) an abnormality from the first counter value (TOT_PTC) when a predetermined condition is satisfied. 3. Procédé selon la revendication 2, dans lequel la condition prédéterminée définit une valeur seuil (LMT2), la détection de l'anomalie étant réalisée en comparant la valeur courante du premier compteur avec la valeur seuil.3. Method according to claim 2, wherein the predetermined condition defines a threshold value (LMT2), the detection of the anomaly being performed by comparing the current value of the first counter with the threshold value. 4. Procédé selon la revendication 3, dans lequel : à chaque fois que le code saisi est détecté comme étant faux lors de ladite vérification (E18), l'étape de traitement a pour effet d'incrémenter la valeur du premier compteur (TOT_PTC) pour indiquer la saisie d'un code faux supplémentaire, ladite anomalie étant détectée lorsque la valeur courante du premier compteur est supérieure ou égale à ladite valeur seuil ; ou à chaque fois que le code saisi est détecté comme étant faux lors de ladite vérification (E18), l'étape de traitement a pour effet de décrémenter la valeur du premier compteur (TOT_PTC) pour indiquer la saisie d'un code fauxsupplémentaire, ladite anomalie étant détectée lorsque la valeur courante du premier compteur est inférieure ou égale à ladite valeur seuil.The method according to claim 3, wherein: each time the code entered is detected as false during said verification (E18), the processing step has the effect of incrementing the value of the first counter (TOT_PTC) to indicate the input of an additional false code, said anomaly being detected when the current value of the first counter is greater than or equal to said threshold value; or whenever the code entered is detected as false during said verification (E18), the processing step has the effect of decrementing the value of the first counter (TOT_PTC) to indicate the input of a false additional code, said anomaly being detected when the current value of the first counter is less than or equal to said threshold value. 5. Procédé selon l'une quelconque des revendications 2 à 4, comprenant, sur détermination de ladite anomalie, une opération de sécurisation (E30) d'au moins l'un parmi le dispositif électronique et une opération avec un terminal externe (LT).5. Method according to any one of claims 2 to 4, comprising, on determining said anomaly, a securing operation (E30) of at least one of the electronic device and an operation with an external terminal (LT) . 6. Procédé selon la revendication 5, l'opération de sécurisation (E30) comprenant au moins l'une parmi les opérations suivantes : reconfiguration du dispositif électronique (2) de manière à restreindre ses capacités de fonctionnement ; mise en échec d'une opération avec le terminal externe (LT) ; et envoi au terminal externe (LT) d'une donnée de sécurité représentative de ladite anomalie.6. The method of claim 5, the security operation (E30) comprising at least one of the following operations: reconfiguration of the electronic device (2) so as to restrict its operating capabilities; defeat an operation with the external terminal (LT); and sending to the external terminal (LT) a security data representative of said anomaly. 7. Procédé selon la revendication 5 ou 6, dans lequel l'opération avec le terminal externe (LT) est une transaction bancaire.The method of claim 5 or 6, wherein the operation with the external terminal (LT) is a bank transaction. 8. Procédé selon l'une quelconque des revendications 1 à 7, dans lequel ledit 20 traitement comprend la gestion d'un deuxième compteur (PTC), comprenant les étapes suivantes : si le code saisi est détecté (E18) comme étant faux, le traitement a pour effet de modifier la valeur du deuxième compteur (PTC) pour indiquer la saisie d'un code faux supplémentaire ; 25 si le code saisi est détecté (E18) comme étant bon, le traitement a pour effet de : o modifier la valeur du deuxième compteur (PTC) de façon à la réinitialiser à une valeur constante prédéterminée lorsque la valeur du deuxième compteur est différente de ladite valeur constante prédéterminée, et 30 o garder la valeur du deuxième compteur (PTC) inchangée lorsque la valeur du deuxième compteur est égale à ladite valeur constante prédéterminéeThe method of any one of claims 1 to 7, wherein said processing comprises managing a second counter (PTC), comprising the steps of: if the entered code is detected (E18) as false, the processing has the effect of changing the value of the second counter (PTC) to indicate the entry of an additional false code; If the entered code is detected (E18) as good, the treatment has the effect of: modifying the value of the second counter (PTC) so as to reset it to a predetermined constant value when the value of the second counter is different from said predetermined constant value, and 30 o keeping the value of the second counter (PTC) unchanged when the value of the second counter is equal to said predetermined constant value 9. Procédé selon la revendication 8, dans lequel, la valeur du premier compteur et la valeur du deuxième compteur sont enregistrées lors d'une même opération d'écriture 35 dans la mémoire non volatile réinscriptible (10) du dispositif électronique. 3 03 082 6The method according to claim 8, wherein the value of the first counter and the value of the second counter are recorded in a single write operation in the rewritable non-volatile memory (10) of the electronic device. 3 03 082 6 10. Procédé selon la revendication 8, dans lequel, la valeur du premier compteur et la valeur du deuxième compteur sont enregistrées dans un même bloc mémoire (BC) de la mémoire non volatile réinscriptible (10) du dispositif électronique. 5The method according to claim 8, wherein the value of the first counter and the value of the second counter are stored in a same memory block (BC) of the rewritable non-volatile memory (10) of the electronic device. 5 11. Procédé selon la revendication 10, dans lequel chaque bloc mémoire (BC) de la mémoire non volatile réinscriptible (10) contient 256 octets de mémoire.The method of claim 10, wherein each memory block (BC) of the non-volatile rewritable memory (10) contains 256 bytes of memory. 12. Programme d'ordinateur (PG1) comportant des instructions pour l'exécution des étapes d'un procédé de contrôle selon l'une quelconque des revendications 1 à 11 lorsque 10 ledit programme est exécuté par un processeur.A computer program (PG1) comprising instructions for performing the steps of a checking method according to any one of claims 1 to 11 when said program is executed by a processor. 13. Support d'enregistrement (10) lisible par un processeur sur lequel est enregistré un programme d'ordinateur (PG1) comprenant des instructions pour l'exécution des étapes d'un procédé de contrôle selon l'une quelconque des revendications 1 à 11. 1513. A processor-readable recording medium (10) on which is recorded a computer program (PG1) comprising instructions for carrying out the steps of a checking method according to any of claims 1 to 11 15 14. Dispositif électronique (2) comprenant : un module d'obtention (14) d'un code secret saisi par un utilisateur ; un module de traitement (16) pour réaliser un traitement du code secret, le traitement comprenant une vérification du code secret et une gestion d'un 20 premier compteur (TOT_PTC) ; un module de mémorisation (18) pour mémoriser la valeur du premier compteur dans un mémoire non volatile réinscriptible du dispositif électronique ; caractérisé en ce que : - si le code saisi est détecté comme étant faux par le module de vérification, le traitement a pour effet de modifier la valeur du premier compteur pour indiquer la saisie d'un code faux supplémentaire ; et si le code saisi est détecté comme étant bon par le module de vérification, le traitement a pour effet de garder la valeur du premier compteur inchangée quelle que soit la valeur du premier compteur.14. Electronic device (2) comprising: a module (14) for obtaining a secret code entered by a user; a processing module (16) for performing a secret code processing, the processing comprising a secret code check and a management of a first counter (TOT_PTC); a storage module (18) for storing the value of the first counter in a rewritable non-volatile memory of the electronic device; characterized in that: - if the entered code is detected as false by the verification module, the processing has the effect of modifying the value of the first counter to indicate the input of an additional false code; and if the code entered is detected as good by the verification module, the processing has the effect of keeping the value of the first counter unchanged regardless of the value of the first counter. 15. Dispositif électronique selon la revendication 14, comprenant un module de détection (20) d'une anomalie à partir de la valeur du premier compteur (TOT_PTC) lorsqu'une condition prédéterminée est satisfaite.An electronic device according to claim 14, comprising a detection module (20) of an anomaly from the value of the first counter (TOT_PTC) when a predetermined condition is satisfied. 16. Dispositif électronique selon la revendication 14 ou 15, dans lequel la condition prédéterminée définit une valeur seuil (LMT2), le module de détection étant apte àdétecter l'anomalie à partir d'une comparaison entre la valeur du premier compteur et la valeur seuil.16. An electronic device according to claim 14 or 15, wherein the predetermined condition defines a threshold value (LMT2), the detection module being able to detect the anomaly from a comparison between the value of the first counter and the threshold value. . 17. Dispositif électronique selon l'une quelconque des revendications 14 à 16, le dispositif électronique étant une carte à puce.17. Electronic device according to any one of claims 14 to 16, the electronic device being a smart card.
FR1462786A 2014-12-18 2014-12-18 METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE Active FR3030826B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
FR1462786A FR3030826B1 (en) 2014-12-18 2014-12-18 METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE
PCT/FR2015/053602 WO2016097637A1 (en) 2014-12-18 2015-12-17 Method of securing a pin code with error counters in a chip card

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR1462786 2014-12-18
FR1462786A FR3030826B1 (en) 2014-12-18 2014-12-18 METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE

Publications (2)

Publication Number Publication Date
FR3030826A1 true FR3030826A1 (en) 2016-06-24
FR3030826B1 FR3030826B1 (en) 2018-01-19

Family

ID=53191768

Family Applications (1)

Application Number Title Priority Date Filing Date
FR1462786A Active FR3030826B1 (en) 2014-12-18 2014-12-18 METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE

Country Status (2)

Country Link
FR (1) FR3030826B1 (en)
WO (1) WO2016097637A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2786007A1 (en) * 1998-11-18 2000-05-19 Gemplus Card Int METHOD FOR CONTROLLING THE USE OF A CHIP CARD
EP1646018A1 (en) * 2004-10-08 2006-04-12 Fujitsu Limited Biometric authentication device, biometric information authentication method, and program
DE102010044687A1 (en) * 2010-09-08 2012-03-08 Giesecke & Devrient Gmbh Portable data carrier with misoperation counter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2786007A1 (en) * 1998-11-18 2000-05-19 Gemplus Card Int METHOD FOR CONTROLLING THE USE OF A CHIP CARD
EP1646018A1 (en) * 2004-10-08 2006-04-12 Fujitsu Limited Biometric authentication device, biometric information authentication method, and program
DE102010044687A1 (en) * 2010-09-08 2012-03-08 Giesecke & Devrient Gmbh Portable data carrier with misoperation counter

Also Published As

Publication number Publication date
WO2016097637A1 (en) 2016-06-23
FR3030826B1 (en) 2018-01-19

Similar Documents

Publication Publication Date Title
EP2463833B1 (en) Method and device for operational control of internal functions and protected applications embedded in chip cards for mobile terminals
EP3455812B1 (en) Method for securing an electronic device, and corresponding electronic device
FR2958770A1 (en) METHOD FOR CONTROLLING A DEVICE SUITABLE TO FUNCTION IN MODE WITH OR WITHOUT CODE CHECKING TO PERFORM A TRANSACTION
EP3465584A1 (en) Method for securing an electronic device and corresponding electronic device
EP3234848B1 (en) Method of dispatching an item of security information and electronic device able to implement such a method
EP3198540B1 (en) Method of auto-detection of attempted piracy of an electronic payment card, corresponding card, terminal and programme
FR3030826A1 (en) METHOD FOR SECURING AN ELECTRONIC DEVICE, AND ITS ELECTRONIC DEVICE
EP3261014A1 (en) Method for sending security information
EP3340098B1 (en) Method for securing an electronic operation with a smart card
EP3671519A1 (en) Transaction securisation using a smartcard
EP2933767B1 (en) Method for deactivating a payment module, corresponding computer program product, storage medium and payment module
FR3076026B1 (en) SAVING HISTORY DATA IN A DEVICE FOR PROCESSING TRANSACTIONS
EP3317832B1 (en) Monitoring method implemented by an electronic device during a transaction, and corresponding device
EP2812864B1 (en) Payment system, payment terminal of said system, and associated payment method
EP3836060A1 (en) Processing of transactions according to an operational profile
FR3077150A1 (en) METHOD FOR CONTROLLING DEPENDENCY RULES OF OBJECTS UPDATED IN A MICROCIRCUIT, AND CORRESPONDING DEVICE
FR2749413A1 (en) METHOD FOR STORING VALUE UNITS IN A SECURELY CHIP CARD AND MONETARY TRANSACTION SYSTEM WITH SUCH CARDS
FR2976697A1 (en) SECURE TRANSFER BETWEEN NON-VOLATILE MEMORY AND VOLATILE MEMORY
EP3314803A1 (en) Recording method implemented by a microcircuit, and corresponding device
FR3076027A1 (en) SECURING THE PROCESSING OF A TRANSACTION

Legal Events

Date Code Title Description
PLFP Fee payment

Year of fee payment: 2

PLSC Publication of the preliminary search report

Effective date: 20160624

PLFP Fee payment

Year of fee payment: 3

PLFP Fee payment

Year of fee payment: 4

CD Change of name or company name

Owner name: IDEMIA FRANCE, FR

Effective date: 20180618

CJ Change in legal form

Effective date: 20180618

PLFP Fee payment

Year of fee payment: 6

PLFP Fee payment

Year of fee payment: 7

PLFP Fee payment

Year of fee payment: 8

PLFP Fee payment

Year of fee payment: 9

PLFP Fee payment

Year of fee payment: 10