Method for optimizing the operation of a safety-critical component
By evaluating memory wear and restricting operations in secure elements like eUICC cards, the method ensures continued functionality and alerts operators when replacement is needed, addressing the issue of memory endurance limitations.
Patent Information
- Application Number
- FR2021008329
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-07-30
AI Technical Summary
The existing management of non-volatile memory in secure elements, such as eUICC cards, fails to effectively manage data writing and erasing based on the memory's state of wear, leading to potential failures and interruptions when operations exceed the memory's endurance capacity.
A method is implemented to evaluate the memory's wear state before performing data operations, restricting operations to authorized ones and sending alerts when the wear exceeds a threshold, and redirecting data to replacement pages to maintain functionality.
This approach prevents the secure element from executing commands that could compromise its operation due to excessive wear, ensuring continued access to basic functions and informing the operator to replace the element when necessary, thus extending its lifespan and reliability.
Smart Images

Figure 00000025_0000 
Figure 00000026_0000 
Figure 00000027_0000
Abstract
Description
Title of the invention: Method for optimizing the operation of a safety element
[0001] The present invention relates to the field of memory management, in particular the management of non-volatile memory of a secure element.
[0002] The secure elements traditionally used for authentication on mobile telephone networks include UICC (Universal Integrated Circuit Card) universal integrated circuit cards, in particular SIM (Subscriber Identity Module) cards. Each card includes subscription data, for example an IMSI (International Mobile Subscriber Identity) identifier, cryptographic keys and algorithms, specific to a subscription provided by a mobile telephone operator.
[0003] Embedded UICC (eUICC) cards have also emerged, offering greater flexibility in subscription management. The main specifications for an eUICC card are defined by the GSMA (Global System for Mobile Communications Association), notably in the GSMA standard SGP.02 v3.2 entitled "Remote Provisioning Architecture for Embedded UICC - Technical Specification - Version 4.0" dated February 25, 2019. An eUICC card (or module) is a secure, generally small, hardware component that can be integrated into a host mobile terminal to implement the functions of a traditional SIM card. The host mobile terminal (or "host device") can be, for example, a mobile phone, a smartphone, or any other mobile communication terminal, such as a tablet.
[0004] eUICC cards are reprogrammable and allow multiple subscriber profiles (or communication profiles) to be loaded onto the same eUICC card, as well as one or more of these subscriber profiles to be updated and / or deleted. Each subscriber profile is contained in a secure container, designated ISD-P (for "Issuer Security Domain - Profile") in the GSMA standard. This secure container is typically stored in non-volatile memory on the eUICC card and contains, like a conventional SIM card, the data that, when a subscriber profile is active, allows authentication with a corresponding mobile network to access a service (e.g., voice or data). By changing the active subscriber profile on the eUICC card, it is possible to change operators or modify access to associated services (e.g., voice and / or data services).
[0005] To add a new subscriber profile, modify an existing subscriber profile, or To launch an application from an existing subscriber profile, it is necessary to erase and / or write data to the non-volatile memory of the secure element (eUICC or other). More specifically, non-volatile memory is generally composed of a plurality of memory blocks, each memory block comprising a set of memory pages that can be erased and / or (re)written. In what follows, a "memory page" refers to the smallest unit of memory for data erasure (i.e., data erasure can only occur for one or more complete pages, and not just a part of a page). Writing (or "Programming" can, however, be performed on only a portion of a page. It should be noted that the vocabulary used to designate these elements may vary from one type of memory to another or depending on the memory card manufacturer. For example, the term "sector" is sometimes used to designate the smallest unit of memory for data erasure. A person skilled in the art will, of course, have no difficulty applying the following instructions to cards supplied by manufacturers using different terminology than that used here.
[0006] Each page of volatile memory has a certain endurance capacity (or simply "endurance"), which corresponds to the maximum number of times the memory page can be erased and (re)written. Once this maximum number is reached, the memory page is "worn out" and may no longer be able to retrieve, for reading, the data previously written to it and / or to allow data (re)writing and / or to allow data (re)erasure. The endurance capacity can vary from one page to another. When all memory pages are worn out, proper memory operation is no longer guaranteed. The "overall" endurance capacity (i.e., taking into account all memory pages) varies considerably depending on the type of non-volatile memory (flash, EEPROM - from the English "Electrically Erasable Programmable Read Only Memory", etc.).It can range from a few thousand write and erase cycles for some non-volatile memories to several hundred thousand cycles for others.
[0007] Some operations require more erases and writes than others, and thus put more strain on the memory. For example, downloading a new subscriber profile generally requires more erases and writes than using or updating an application already installed on an existing subscriber profile. If such operations are performed when the memory has reached an excessively worn state, it is possible that some or all of the erases / writes may not be completed. This can lead to malfunctions in the use of the eUICC card or other device, or even a complete interruption of the card's operation.
[0008] There is therefore a need to efficiently manage the writing and erasure of data on a memory, typically a non-volatile memory of an element secure, depending on its state of wear. The present invention improves the situation. Description of the invention
[0009] To this end, the invention proposes to evaluate the wear state of the memory of a secure element (for example, the volatile memory of an eUICC card) when receiving a data write command (for example, downloading a new subscriber profile, updating a subscriber profile, launching an application, etc.), before starting to erase or write data to the memory.If the memory exhibits excessive wear, the secure element switches to a restricted operating mode, in which only certain operations are permitted (for example, authentication operations with an operator's network or with a service offered on a telecommunications network, or remote management operations of the secure element's content or applications, known respectively as RFM (for "remote file management") or RAM (for "remote application management"), or auditing operations of the secure element, or Domain Name System (DNS) resolution operations). The received command is then executed only if it corresponds to one of these authorized operations.
[0010] Furthermore, in certain embodiments, the invention proposes sending an alert to an external server (typically the telephone operator's server associated with the card) to inform it that the card is reaching the end of its lifespan in terms of wear. According to the invention, sending this alert is advantageously managed in such a way as, on the one hand, to avoid further wear on the memory, and on the other hand, to avoid saturating the network (in particular by avoiding simultaneously sending alerts to the same server for an entire fleet of secure elements associated with the same operator, which would reach an advanced state of wear at the same time).
[0011] A method implemented by a processor of a secure element is thus proposed to optimize the operation of the secure element, the secure element comprising a memory, the secure element being configured by a list of allowed operations, wherein the method may include: a. receive a command to erase or write data to memory; and b. execute the received command only if the received command corresponds to an authorized operation from the list of authorized operations; in which the process may further include: c. determine an indicator of overall memory wear; and d. If the determined indicator shows that the overall wear state of the memory is greater than a predefined threshold, reduce the list of allowed operations by removing operations from said list.
[0012] The "authorized operations list" refers to a set of operations (or commands) accessible and / or executable by the secure element. For example, such an operation might include using, updating, installing, or deleting an application, installing or deleting a subscriber profile, or commands to authenticate the secure element to a telecommunications network, etc. This authorized operations list defines the operating mode of the secure element. When the authorized operations list is reduced, i.e., when certain operations are removed from the list, the secure element operates in a more restricted mode, in that it has access to a more limited set of operations. "Executing" the received command means writing and / or deleting the data corresponding to the command.By "indicator of overall memory wear status", we mean an indicator used to quantify the degree of wear of the memory as a whole - for example, the percentage of memory pages that have reached their endurance capacity.
[0013] Thanks to such a method, as soon as it is determined that the overall memory wear exceeds a predefined threshold, the list of allowed operations is advantageously updated by removing certain operations, for example, operations requiring more data writes / erases. This prevents commands from starting to execute when the memory is in such an advanced state of wear that it does not allow their correct execution, and / or that it would compromise the use of the secure element (for example, if, after the execution of the command, the memory is too worn to be able to access basic operations such as authentication with a telecommunications network).
[0014] In one or more embodiments, in response to step a, steps c and d may be implemented before step b, and in step b, the received command may be executed only if it corresponds to an authorized operation from the list of authorized operations obtained in step d.
[0015] Alternatively, in response to step a, step b may be implemented before steps c and d, and in step b, the received command is executed only if it corresponds to an authorized operation from the list of authorized operations before any possible reduction of said list in step d.
[0016] In one or more embodiments, the memory may comprise a plurality of main memory pages and a plurality of replacement memory pages, and, when all the main memory pages are in use, a main memory page determined to be worn out may be redirected to a replacement memory page. blank replacement. The overall memory wear indicator can then be determined from a number of non-blank replacement pages or from a number of blank replacement pages.
[0017] By "primary memory pages" (also referred to as "working pages" hereafter) is meant memory pages used with priority. Conversely, "replacement memory pages" are reserve memory pages, used when no primary memory page remains available, typically a blank primary memory page, once one of the primary memory pages becomes unusable by reaching its maximum endurance capacity (worn-out page). By "blank" memory page is meant a memory page on which no data has yet been written and / or erased. By "redirected" is meant that the content of a memory page, generally worn out, is copied to an available replacement page, typically blank, and then redirected (for example, using a pointer) to that replacement page. By "used" is meant that the memory page is "not blank," i.e., that data has already been written and / or erased.By "worn out" it is understood that the memory page is considered to have reached its endurance capacity, i.e. its maximum write / erase cycle, and can no longer be used properly. A memory page can therefore be used, i.e., not blank, but not yet worn out.
[0018] In one or more embodiments, steps a to d can be repeated for a plurality of successive predefined thresholds distinct from each other.
[0019] It is thus possible to define successive operating modes corresponding to the plurality of thresholds, each operating mode being associated with a respective list of authorized operations. Each time the overall wear state of the memory reaches one of the plurality of predefined thresholds, the protected element enters a more restricted operating mode than the previous one (i.e., the associated list of authorized operations is limited compared to the previous one). This advantageously allows the list of authorized operations to be adapted to the overall wear state of the memory.
[0020] In one or more embodiments, during an implementation of step d, at least one operation among: installing a new subscriber profile, deleting an existing subscriber profile, installing a new application and deleting an application, may be removed from the list of authorized operations.
[0021] Such operations are particularly costly in terms of data writing / erasing, and use more memory than other operations and / or may use a large number of memory pages at the risk of not having enough memory pages available.
[0022] Alternatively or in addition, during the implementation of step d, the list of authorized operations is reduced to only one or more operations from among: operations related to authentication with a telecommunications network attached to the secure element; remote management operations of file contents of the secure element; remote management operations of applications of the secure element; operations related to a domain name system resolution session and operations related to an airborne communication session initiated by the secure element.
[0023] These operations include a set of "minimal" operations to ensure access to a telecommunications network and the use of basic functionalities, such as accessing services offered by the telecommunications network, making a telephone call, as well as remote access operations to data from the secure element (in order, for example, to determine which previous command used memory in an unusual and excessive way).
[0024] The list of allowed operations may be reduced to one or more operations from the list above when implementing step d in the case where steps a to d are implemented only once, or when implementing one of the steps d when steps a to d are implemented iteratively.Thus, for example, during one iteration, at least one operation among: installing a new subscriber profile, deleting an existing subscriber profile, installing a new application, and deleting an application, is removed from the list of allowed operations; and during a subsequent iteration, the list of allowed operations is reduced to only one or more of the following operations: operations related to authentication with a telecommunications network (for example, a telephone network) attached to the secure element; remote management of file contents of the secure element; remote management of applications of the secure element; operations related to a domain name system resolution session; and operations related to an airborne communication session initiated by the secure element.
[0025] In such embodiments, remote file content management operations of the secure element and / or remote application management operations of the secure element from the list of authorized operations may exclude any operation requiring writing or erasure of data on the memory of the secure element.
[0026] In addition, during an implementation of step d, the list of permitted operations is reduced and the method may further include: sending an alert to a remote server including information relating to the overall wear status of the memory of the secured element.
[0027] Thus, when the memory reaches a critical degree of overall wear, the server - for example, a server of the telephone operator or telecommunications network The entity to which the secure element is attached is notified. The telephone operator or a telecommunications network entity can then take the necessary measures, for example, send a message to the user informing them that they must change their secure element.
[0028] In one or more embodiments, the alert can be sent when a current number of authentications of the secure element with a telecommunications network is greater than or equal to a critical value.
[0029] The term "number of authentications of the secure element with a telecommunications network" means the number of times a procedure has been implemented to authenticate the secure element with a network to which it is connected. The term "current" means that the value of this number is taken into account when implementing step d.
[0030] Such procedures (called "Network Authentication Algorithms") are standardized and described, in particular, in the technical documents "ETSI TS 131 102 V13.5.0" or "ETSI 133 102 V5.1.0". They include, in particular, the exchange of data between the infrastructure network (or "core network") and the secure element, such as authentication vectors and keys. These standardized procedures include a counter that tracks the number of authentications of the secure element to the cellular network, this counter being stored in the secure element's memory. Thus, the decision to send or not send an alert is advantageously based on the use of a counter that is already mandated by the standards, and the alert procedure does not require storing and updating an additional value in the secure element's memory, which would further wear it out.
[0031] Advantageously, the critical value can be determined after said implementation of step d, by a random draw from a set of natural integers whose minimum value is strictly greater than the current number of authentications of the secure element with a telecommunications network.
[0032] Thus, sending the alert relies on a random procedure and is not done systematically as soon as the number of authentications reaches a predefined deterministic number. This prevents saturating the telecommunications network. Indeed, it can happen that an operation (for example, a major application update) is implemented almost simultaneously on an entire fleet of secure elements connected to the network, and that this operation uses the memory of these secure elements in an unusual and excessive way. By using a predefined deterministic critical value, alerts would be sent to the server in very large numbers almost simultaneously (i.e., over a very short time interval compared to the number of elements in the fleet), which would saturate the cellular network. By introducing a random determination of a critical value specific to each secured element, the sending of alerts is advantageously distributed over time, thus avoiding such network saturation.
[0033] Another aspect of the invention relates to a secure element comprising a processor and memory, the secure element being configured by a list of permitted operations. The processor can be configured to: a. receive a command to erase or write data to memory; and b. execute the received command only if the received command corresponds to a permitted operation from the list of permitted operations. The processor can further be configured to: c. determine an indicator of the overall wear level of the memory; and d. if the determined indicator shows that the overall wear level of the memory is above a predefined threshold, reduce the list of permitted operations by removing operations from said list.
[0034] For example, the memory can be a non-volatile memory, for example rewritable of the FLASH type.
[0035] Another aspect of the invention relates to a host terminal comprising a secure element as defined above.
[0036] The present invention also relates to a computer program comprising instructions for implementing the above process, when this program is executed by a processor.
[0037] This program may use any programming language (for example, an object-oriented language or other), and may be in the form of interpretable source code, partially compiled code or fully compiled code.
[0038] The [Fig.4] described in detail below can form the flowchart of the general algorithm of such a computer program, according to one embodiment.
[0039] The invention also relates to a non-transient recording medium readable by a computer on which a program is recorded for the implementation of the above method, when this program is executed by a processor. Brief description of the drawings
[0040] Other features, details, and advantages of the invention will become apparent upon reading the detailed description below. This description is purely illustrative and should be read in conjunction with the accompanying drawings, in which: Fig. 1
[0041] [Fig.1] schematically represents a host device comprising an embedded secure element according to an embodiment of the invention; Fig. 2a, 2b, 2c
[0042] [Fig.2a], [2b], [2c] represent the organization of a non-volatile memory of a secure element to which an embodiment of the invention can be applied; Fig. 3
[0043] [Fig.3] represents an indexing of the memory pages of the replacement area according to an embodiment of the invention conforming to the organization of Figures 2a, 2b and 2c; Fig. 4
[0044] [Fig.4] is a flowchart of a process for optimizing the operation of the secured element, according to one embodiment of the invention; Fig. 5
[0045] [Fig. 5] is a flowchart of a method for sending an alert to an external server when the secured element reaches a critical wear value, according to one embodiment of the invention. Detailed description
[0046] The [Fig.1] schematically represents a host device 100 comprising a secure element 107 according to one or more embodiments of the invention.
[0047] The host device 100 can be, for example, a mobile terminal, a mobile phone, a tablet computer, or any type of electronic equipment. The secure element 107 is incorporated into the host device 100.
[0048] The host device 100 may include a communication bus 106 to which the following may be connected: - a processing unit 101, named in the figure CPU (for "Central Processing Unit") and which may include one or more processors; - a non-volatile memory 102, for example a ROM (for "Read Only Memory"), an EEPROM (for "Electrically Erasable Read Only Memory") or a Flash memory; - 103 or RAM (for "Random Access Memory"); - an input / output interface 104, labeled I / O (for "Input / Output") in the figure, for example a screen, keyboard, mouse, or other pointing device such as a touchscreen or remote control, allowing a user to interact with the system via a graphical interface; and - a communication interface 105, named COM in the figure, adapted to exchange data for example with an SM-SR server (for "subscription manager-security routing" in English) via a network, or a read / write interface.
[0049] The secure element 107 may be, for example, a universal embedded integrated circuit card (eUICC). It may include a communication bus 112 to which the following may be connected: - a processing unit 110 or microprocessor, named in the figure CPU2; - a non-volatile memory (or "NVM") 108, for example a ROM, an EEPROM or Flash memory; - 111 MB of RAM, labeled RAM2; and - a communication interface 109, named COM2 in the figure, adapted to exchange data with the processor 101 of the host device 100.
[0050] The RAM 111 of the secure element 107 may include registers adapted for recording variables and parameters created and modified during the execution of a computer program comprising instructions for implementing a process according to the invention. Typically, the program instruction codes stored in non-volatile memory 108 are loaded into RAM2 memory 111 for execution by the CPU2 processing unit 110.
[0051] The non-volatile memory 108 of the secure element 107 is, for example, a memory rewritable of type EEPROM or a Flash memory which can constitute a medium within the meaning of the invention, that is to say, which can include a computer program comprising instructions for the implementation of the methods according to the invention.
[0052] Figures 2a to 2c represent the organization of a non-volatile memory of a secure element to which an embodiment of the invention can be applied.
[0053] As mentioned above, a memory, for example the non-volatile memory 108 of a secure element 107, comprises a plurality of memory blocks, in which each memory block comprises a set of memory pages on which data can be written and / or erased. It should be noted that, in what follows, the term "memory page" is used to designate the smallest unit for erasing data from memory. Writing (also referred to as "programming") can, however, be performed on only a portion of a page.
[0054] Typically, each memory card manufacturer provides a value called native endurance, which corresponds to the minimum endurance capacity guaranteed for all memory pages on the card. For example, a native endurance of 10,000 cycles indicates that each memory page can withstand at least 10,000 write and erase cycles. Some memory pages can withstand endurance capacities much higher than this native endurance (here, 10,000 cycles), and there is considerable variability in the individual endurance capacity values of different memory pages.
[0055] In the prior art, there exist methods for managing memory endurance that make it possible to improve the overall endurance of a memory and to advantageously exploit the variability of the endurance capacities of the different memory pages. For example, in French patent FR 2 977 047 Bl, the memory is advantageously partitioned into two logical memory page areas: one area of The working area comprises a set of memory pages called "working pages" for clarity (also called "main pages"). The replacement area comprises a set of memory pages called "replacement pages".
[0056] As detailed below, when a working page is identified as "worn out," its content is redirected to another page, either the main page (if one is available) or a replacement page. For example, when new data needs to be written to a working page but it is worn out, its content is copied to another page and the new data is written there. In one or more embodiments, the redirection of the working page's content to another page is performed using a pointer containing the address of the new page. Furthermore, when such a new page is in turn worn out, its content is redirected to yet another (main or replacement) unworn page.
[0057] According to one or more embodiments of the present invention, the non-volatile memory 108 of the secure element 107 is organized similarly, as shown in [Fig. 2a]. In [Fig. 2a], the non-volatile memory 108 (for example, Flash memory) comprises two (logical) areas: a working area 201 and a replacement area 202. Each area comprises a plurality of memory pages (not shown in Figures 2a-2c). As shown in [Fig. 2a], before the user uses the memory 108 for the first time or before any data is written to the memory 108, the working area 201 comprises only "blank" working pages 203 and the replacement area 202 comprises only "blank" replacement pages 204. By "blank page" is understood to mean a memory page on which no data has yet been written and / or erased. In the following, a "non-blank" page is said to be "used".A "worn-out page" is defined as a memory page that has reached its endurance capacity and on which it is no longer possible to correctly erase and / or write data. A memory page is considered "used" (i.e., the page has already undergone at least one write or erase operation) before it is considered "worn out" (i.e., the maximum number of write / erase operations for the page has been reached). A method for determining whether a memory page is worn out is detailed in French patent FR 2 977 047 B1 and referred to below.
[0058] As data is written to memory pages, these pages wear out, eventually reaching their endurance capacity. In one or more embodiments, when a memory page, for example a working page, is newly determined to be worn out (page of subset 205), the contents of that page are copied to another available working page, typically Another "blank" working page (i.e., one that has never been used, meaning no data has yet been written / copied to it) is available in memory until the working pages are exhausted. "Working page exhaustion" is understood to mean the absence of at least one available, typically "blank," working page in memory (work area 201). When no more working pages remain available, the content of a newly determined used working page is redirected to an available replacement page, for example, a "blank" one (page in subset 204). This involves copying the content to this replacement page and creating a reference (e.g., a pointer) from the used working page to this replacement page. Such a redirection is shown in [Fig. 2b].Alternatively, the content of a working page can be redirected to an available non-blank replacement page, i.e., one into which data has already been copied (i.e., a replacement page that has already been used, therefore not blank), but which is not yet worn out.
[0059] Alternatively, the content of a newly determined working page is directly redirected to an available replacement page, typically blank, regardless of the availability of other working pages.
[0060] Similarly, as shown in [Fig.2c], when a replacement page is determined to be worn (page of subset 206), the content of that page can be redirected to another available replacement page, typically blank (page of subset 204) or simply unworn, depending on the embodiment.
[0061] When a redirection is performed, the replacement page allocated to replace the worn-out memory page (working or replacement) is stored, for example, by means of an allocation table associating an index or address of the worn-out memory page with an index or address of the replacement page to which the worn-out memory page is redirected. Advantageously, this allocation table can be stored outside of the non-volatile memory 108. Thus, the wear state of the volatile memory is not affected by the redirection mechanism, since it is not necessary to write to the non-volatile memory 108 to store the redirections. For example, the allocation table can be stored in a register of the CPU2 processor 110 separate from the non-volatile memory 108.
[0062] The remainder of the description focuses primarily on the use of available "blank" pages only, for the sake of simplicity. Those skilled in the art can make the necessary adaptations to accommodate both blank and non-blank (e.g., previously used) available pages, as appropriate.
[0063] To determine whether a memory page is worn or not, it is possible to use the The method described in French patent FR 2 977 047 Bl is based on evaluating the erasure or programming quality of a memory page. This erasure quality is measured by comparing the threshold voltages of the transistors corresponding to the memory cells of a given memory page to one or more predefined thresholds. This determination is known and is therefore not described in further detail.
[0064] As detailed with reference to [Fig.3], the invention proposes, in one or more embodiments, to determine a number (or a percentage) of remaining unworn replacement pages (i.e. those in use and those available) from the method described in patent FR 2 977 047 Bl. This number or percentage provides information on the overall wear of the memory.
[0065] Alternatively, the number of available and / or blank replacement pages can be considered as information on overall memory wear.
[0066] In other variants, the number of worn replacement pages (and therefore indirectly those remaining usable) can be considered as information on the overall wear of the memory.
[0067] Figure 3 represents an indexing of the memory pages of the replacement area 202 according to an embodiment of the invention in accordance with the organization of Figures 2a to 2c.
[0068] In the example shown in [Fig. 3], the replacement area 202 comprises N memory pages (where N is a strictly positive natural number) 301a, 301b, 301c, etc. Each memory page 301a, 301b, 301c of the replacement area 202 is associated with a respective index 302a, 302b, 302c. In the example shown, these indices range from K+1 to K+N, where K is a strictly positive natural number corresponding, for example, to the number of memory pages in the working area 201 (in which each working page can be associated with an index between 1 and K). Of course, this is an illustrative example, and other indexing arrangements are possible.
[0069] In one or more embodiments, when a working page is worn out and no blank working page is available, or when a replacement page is worn out, this worn-out memory page is redirected (i.e., its contents are copied and returned, for example, using a pointer) to the available blank replacement page with the lowest index. In this case, this index is subsequently called the "index of the first blank replacement page" ("blank" meaning that no data has yet been copied to the replacement page, it being understood that a blank replacement page belongs to the set of unworn replacement pages). From this index of the first blank replacement page, it is possible to determine a percentage of remaining blank replacement pages. For example, if this index 303 is K+k (k > 0), this means that there are N-k+1 blank replacement pages remaining and k-1 replacement pages already used (i.e.not virgins, . whether they are worn or not). The percentage of replacement pages already used can then be calculated, and in this example is (kl) / N. This number or percentage of replacement pages already used can be interpreted as an overall wear indicator of non-volatile memory 108 (also called the "overall memory wear status indicator" hereafter).
[0070] In one or more embodiments, the index of the first blank replacement page can be stored, along with the allocation table described above, in a register located outside the non-volatile memory 108. Advantageously, this index can be obtained by querying the register—and thus by determining the overall wear indicator of the non-volatile memory 108—rather than using, for example, a specific counter stored in the non-volatile memory 108 of the secure element 107 (which would cause memory wear). By storing the allocation table and / or the index of the first blank replacement page outside the non-volatile memory 108, no writing or erasing of the volatile memory 108 is involved in determining the overall wear indicator of the non-volatile memory 108.Thus, advantageously, the determination of the overall wear state of the non-volatile memory 108 (used in steps 403, 504 of the processes described with reference to Figures 4 and 5) does not in itself cause any wear of this non-volatile memory 108.
[0071] Alternatively, no index is used. In such embodiments, a memory page determined to be newly used can, for example, be redirected to a blank replacement page chosen randomly from among the remaining blank replacement pages. The number of replacement pages already used can be stored outside the non-volatile memory 108, using a counter whose value is initialized to 0 and incremented by one each time the contents of a memory page are redirected to a blank replacement page. This number can be used to determine the overall wear indicator of the non-volatile memory 108. For example, if the number of replacement pages already used is equal to k-1 (k > 1), the overall wear indicator of the non-volatile memory 108 can be evaluated at (kl) / N, where N is the initial number of replacement pages.
[0072] Similarly, in embodiments where a worn working page or replacement page is redirected to a replacement page that is not necessarily blank but not yet worn, the number of worn replacement pages can be stored outside the non-volatile memory 108, using a counter whose value is initialized to 0 and incremented by one each time a replacement page is newly determined to be worn. This number can be used to determine the overall wear indicator of the non-volatile memory 108. For example, if the number of worn replacement pages is equal to k-1 (k> 1), The overall wear indicator of non-volatile memory 108 can be evaluated at (kl) / N, where N is the initial number of replacement pages.
[0073] Of course, other memory structures or other logical areas can be considered than that shown in Figures 2a, 2b, 2c and 3, and other methods for determining the wear of a memory page can be implemented within the scope of the present invention. Other prior art methods are usable, provided they allow for the evaluation of an overall wear state of the memory.
[0074] The [Fig.4] is a flowchart of a method for optimizing the operation of the secure element, according to an embodiment of the invention.
[0075] In an initial step 401 of the process, the secure element 107 operates in a mode of operation referred to as the "current operating mode," or "current mode." A mode of operation is understood to be a set of functionalities (or commands, or authorized operations), such as installing a new subscriber profile, accessing an application of the secure element, or updating an application, etc., available and usable by the secure element when it is in that mode of operation. A mode of operation is typically associated with a current list of authorized operations (or equivalently, a list of prohibited operations) when the secure element is in that mode of operation.
[0076] When a user first uses the secure element, the secure element typically operates in "normal" mode, in which all the classic features of a secure element are available and usable.
[0077] Different modes can be predefined and respectively associated with predefined lists of allowed operations. These different modes / different lists of allowed operations can be associated with different memory wear states, and therefore with successive wear thresholds.
[0078] For example, for a memory wear level between 0% and 40% (which may correspond, in some embodiments, to a percentage of replacement pages already used of between 0% and 40%), the secure element can operate in normal mode, in which all functionalities are permitted. For a wear level strictly greater than 40% and less than or equal to 85%, the secure element can operate in a first restricted mode, in which the list of permitted operations includes all the operations permitted in normal mode, with the exception of commands requiring an excessive number of writes / erases, such as downloading a new subscriber profile, downloading and / or installing a new application, or deleting an application already installed on the secure element.Then, for a wear state strictly greater than 85%, the secure element can operate in a second restricted mode in which the list. The permitted operations may include or be strictly limited to one or more of the following: - access to and use of network applications managing access to a telecommunications network: for example SIM applications (for "Subscriber Identity Module" in English, USIM (for "Universal Subscriber Identity Module" in English), ISIM (for "IP Multimedia Services Identity Module" in English) defined in different ETSI standards (for "European Telecommunications Standards Institute" in English, or "European Institute of Telecommunications Standards" in French); - access to and use of applications managed by 1TSD (for "Issuer Security Domain" in English, or "domaine de sécurité de l'metteur" in French) defined in the GlobalPlatform technical documents, which allow the secure environment of the secure element to be defined; - certain RFM commands (for "remote file management" in English, or "gestion de fichiers à distance" in French), for example commands allowing remote access (and administration) to files relating to telecommunications links via OTA technology (for "over-the-air" in English, or "par voie aérienne" in French); - certain RAM commands (for "remote application management" in English, "gestion d'applications à distance" in French), for example commands allowing access to (and administration of) applications related to telecommunications links via OTA technology; - Domain name system resolution commands (“DNS resolver” in English); - access to and use of certain proprietary applications, such as an application to initiate an OTA session via the secure element and manage subsequent exchanges.
[0079] In the preceding example, the RFM and RAM commands in the list of allowed commands (or applications) enable remote access to the card's contents, but not the modification of files or the updating of applications. In other words, they allow access to the contents of the secure element, but not modification of them. By enabling these commands, it is possible to perform an audit of the secure element and thus identify, for example, the command(s) or application(s) that have excessively used non-volatile memory.
[0080] By defining such a highly restricted list, authentication with a telecommunications network is still possible (it is therefore possible in particular to make a phone call from the SIM card or for a device to be able to communicate with a server accessible via the telecommunications network), but most other applications are not usable.
[0081] Of course, the values 40% and 85% given above are particular examples of an embodiment of the present invention, and may be chosen differently.
[0082] Of course, it is possible to define, rather than a list of allowed commands, a list of prohibited commands (which correspond to the applications removed from the previous list of allowed operations, to which the secured element must no longer have access when it enters the subsequent more restricted mode).
[0083] At a step 402, a command to write and / or erase data in the non-volatile memory 108 of the secure element 107 is received at the level of the secure element 107. For example, this command may correspond to a request to install a new subscriber profile, to install a new application or to update an already installed application, etc.
[0084] In response to receiving this command to write and / or erase data in the non-volatile memory 108, it is checked (step 403) whether the overall wear status of the non-volatile memory 108 exceeds a predetermined wear threshold. For example, in one or more embodiments, the percentage or number of replacement memory pages already used is compared to a predefined threshold. If the overall wear status of the non-volatile memory 108 is below the wear threshold (for example, if the percentage or number of replacement memory pages already used is below the wear threshold – arrow “N” at the exit of step 403), it is checked (step 405) whether the command received in step 402 belongs to the list of allowed commands associated with the current mode. If the command received at step 402 belongs to the list of authorized commands associated with the current mode (arrow "O" at the exit of step 405), the command is executed.Otherwise, it is not executed (step 406) and the secured element remains in the current mode.
[0085] The predetermined wear threshold of step 403 can conventionally correspond to the "maximum" wear threshold associated with the current operating mode. In the preceding example, if the current mode corresponds to the normal mode, the wear threshold can correspond to the value 40% beyond which the protected element must switch to the first restricted mode. If the current mode corresponds to the first restricted mode, the wear threshold can correspond to the value 85% beyond which the protected element must switch to the second restricted mode.
[0086] In other words, a set of successive thresholds (in the previous example, the values 40% and 85%) and a set of successive restricted modes (in the previous example, the first restricted mode and the second restricted mode) can be predefined. Each restricted mode is associated with a respective list of allowed operations (or a list of prohibited operations), and each threshold is associated with an entry in a respective restricted mode (for example, the 40% threshold is associated with an entry in the first restricted mode, and the 85% threshold is associated with entry into the second restricted mode). During step 403, the memory wear state is compared to the "next" threshold in the set of successive thresholds (for example, if the secured element is in normal mode, the used wear threshold is 40%, and if the secured element is in the first restricted mode, the used wear threshold is 85%).
[0087] If the overall wear state of the non-volatile memory 108 is greater than the wear threshold (for example, if the percentage or number of replacement memory pages already used is greater than or equal to the wear threshold - arrow "O" at the exit of step 403), the secured element is switched to a more restricted operating mode (step 404), i.e., certain operations are removed from the list of allowed operations.In other words, at step 404, the list of allowed operations is reduced compared to the list of allowed operations associated with the current mode of step 401.
[0088] After the secure element has entered a more restricted operating mode (step 404), it is determined whether the command received in step 402 belongs to the list of authorized commands (step 405) associated with that more restricted mode. If the received command is not an authorized command (arrow "N" at the exit of step 405), it is not executed (step 406) and the secure element remains in the more restricted mode, which becomes the current mode. If the command is an authorized command (arrow "O" at the exit of step 405), it is executed by the secure element (step 407), and the secure element remains in the more restricted mode, which becomes the current mode.
[0089] It is noted that in one or more alternative embodiments, steps 405 to 407 can be implemented before steps 403 and 404, in response to step 402.
[0090] Figure 5 is a flowchart of a method for sending an alert to an external server when the protected element reaches a critical wear level, according to one embodiment of the invention. In one or more embodiments, such a method is implemented as soon as the protected element switches to a more restricted operating mode (step 404 of Figure 4).
[0091] According to such embodiments, in an initial step 501 of the process in [Fig. 5], it is assumed that the secure element has just switched to a more restricted mode (in accordance with step 404 of [Fig. 4]), associated with a respective list of permitted operations. In a step 502, it is determined whether the wear threshold associated with this more restricted mode, i.e., the wear threshold used in step 403, is strictly greater than a value called the "critical value." This critical value typically corresponds to a critical wear state beyond which the operation of the secure element is compromised, which could prevent the user or a device from accessing all the functionalities of the secure element, including the most basic ones (for example, being able to authenticate with a telecommunications network).
[0092] If the wear threshold associated with the more restricted mode is less than or equal to the value critical (arrow "N" at the exit of step 502), i.e. the critical wear state has not yet been reached, no particular step is implemented.
[0093] If the wear threshold associated with the more restricted mode is strictly greater than the critical value (arrow "O" at the output of step 502), i.e., the critical wear state is reached, a procedure is implemented to alert the server(s) of the telephone operator(s) to which the secure element is attached, or to alert one or more managers of the secure element, or to alert one or more managers of a device containing the secure element. A manager is understood to mean, for example, a server or an entity capable of, for example, managing the secure element or communicating with it. The telephone operator or manager can then take appropriate measures in response to this alert, for example, notifying the user that they must go to a store to change their SIM card. The operator or manager can also, thanks to "limited" RFM and RAM applications (i.e.limited to remote management operations, but not to file or application modification capabilities) identify if a command, for example an application update, has caused premature wear of volatile memory, and if so block the update for other users, in order to avoid wear on an entire fleet of secure elements.
[0094] To this end, a maximum number of authentications (SNAa) with a telecommunications network is determined in step 503. In one or more embodiments, this maximum number of authentications is determined by randomly drawing an integer between the current number of network authentications (NNAa) and this current number of network authentications (NNAa) plus a predefined integer, for example, a predefined integer between 10 and 100 (e.g., 10, 20, 50, or 100). In one or more embodiments, this integer is predefined based on the predetermined critical threshold and the number of erase and write cycles supported by the non-volatile memory 108.
[0095] When establishing a connection of a secure element to a telecommunications network, an authentication procedure for the secure element (the "Network Authentication Algorithm") with that network is performed. Such procedures are described in various standards, for example, in section 7.1 of the technical document "ETSI TS 131 102 V13.5.0" of November 2016, or in section 6.3.3 of the technical document "ETSI 133 102 V5.1.0" of December 2002. These standards stipulate that a historical counter counting the number of authentications performed with the network is stored in the non-volatile memory 108 of the secure element 107. This counter thus provides the current number N naa of network authentications already performed, which is used in steps 503 and 505. of [Fig.5]. Thus, the invention does not require storing and / or updating an additional counter (which would be specifically dedicated to sending an alert), which would generate additional use of non-volatile memory 108 and therefore additional wear and tear on it.
[0096] At the end of step 503, the maximum number of SNAa network authentications is stored in non-volatile memory 108. Thus, in the event of a restart of the secure element or in the event of a power outage, this number remains stored and accessible.
[0097] In step 504, the secure element sends a new authentication request to the server, and a new network authentication is performed. A test 505 is then performed to determine whether the current number (i.e., at the time step 505 is implemented) NNAa of network authentications (number of successful authentications only, or number of authentications regardless of whether authentication was successful or not) has reached the maximum number SNAa of network authentications determined in step 503. If this is not the case (arrow "N" in step 505), no alert is sent, and steps 504 and 505 are repeated during a subsequent network authentication request. If the current number of network authentications (NNAa) has reached the maximum number of network authentications (SNAa) determined in step 503 (arrow "O" in step 505), an alert is sent to the server (step 506).
[0098] Steps 503 to 506 of [Fig. 5] allow an alert to be sent to the server in an advantageous manner, avoiding saturation of the telecommunications network and without requiring additional writes and / or erases in non-volatile memory. Indeed, there are situations where all the secure elements of a fleet are simultaneously affected by abnormal memory wear (for example, in the case of an update requiring an abnormally high number of writes / erases). In such situations, if an alert were sent as soon as the overall memory wear of a secure element in the fleet reached the critical value of step 506, a large number of alerts would be sent almost simultaneously to the server, causing a spike in data sent over the network and its saturation.By using a maximum number of randomly defined SNAa network authentications to send an alert to the server, alert transmissions are spread out over time, preventing network congestion. Furthermore, as mentioned previously, the alert transmission procedure uses a historical counter already defined in the standards for performing network authentications, so no additional counters need to be stored and / or updated in non-volatile memory, which would cause wear and tear.
[0099] In the detailed description above, the alert sending method of [Fig. 5] is implemented each time the secure element switches to a more restricted mode (i.e. (as soon as step 404 of [Fig. 4] is implemented). Of course, other embodiments are possible. For example, and without limitation, it is possible to implement the process of [Fig. 5] periodically, or upon receipt of each new order.
[0100] Of course, the present invention is not limited to the embodiments described above by way of example; it extends to other variants. Other embodiments are possible.
[0101] Depending on the embodiment chosen, certain acts, actions, events, or functions of each of the methods described in this document may be performed or occur in a different order than described, or may be added, merged, or not performed or occur, as the case may be. Furthermore, in some embodiments, certain acts, actions, or events are performed or occur concurrently rather than sequentially.
[0102] Although described through a number of detailed embodiments, the proposed method and the equipment for implementing the method include various variants, modifications, and improvements that will be obvious to those skilled in the art, it being understood that these various variants, modifications, and improvements form part of the scope of the invention, as defined by the following claims. Furthermore, different aspects and features described above may be implemented together, separately, or substituted for one another, and all the different combinations and subcombinations of aspects and features form part of the scope of the invention. In addition, some of the systems and equipment described above may not incorporate all the modules and functions described for the preferred embodiments.
Claims
Claims
1. A method implemented by a processor of a secure element for optimizing an operation of the secure element, the secure element comprising a memory, the secure element being configured by a list of authorized operations, the method comprising: a. receiving a command to erase or write data in the memory; and b. executing the received command only if the received command corresponds to an authorized operation from the list of authorized operations; wherein the method further comprises: c. determining an indicator of an overall wear state of the memory; and d. if the determined indicator indicates that the overall wear state of the memory is greater than a predefined threshold, reducing the list of authorized operations by removing operations from said list.
2. The method of claim 1, wherein, in response to step a, steps c and d are performed before step b, and wherein, in step b, the received command is executed only if it matches an authorized operation from the list of authorized operations obtained in step d.
3. The method of claim 1, wherein, in response to step a, step b is performed before steps c and d, and wherein, in step b, the received command is executed only if it matches an authorized operation from the list of authorized operations before any possible reduction of said list in step d.
4. Method according to one of claims 1 to 3, in which the memory comprises a plurality of main memory pages and a plurality of replacement memory pages, in which, when all the main memory pages are used, a main memory page determined to be worn is redirected to a blank replacement memory page, the indicator of the overall wear state of the memory being determined from a number of non-blank replacement pages or a number of blank replacement pages.
5. Method according to one of claims 1 to 4, in which steps a to d are repeated for a plurality of successive predefined thresholds distinct from one another.
6. Method according to one of claims 1 to 5, in which, during a implementing step d, at least one operation among: installation of a new subscriber profile, deletion of an existing subscriber profile, installation of a new application and deletion of an application, is removed from the list of authorized operations.
7. Method according to claims 1 to 5, wherein, during an implementation of step d, the list of authorized operations is reduced to only one or more operations among: operations relating to authentication with a telecommunications network attached to the secure element; operations for remote management of file contents of the secure element; operations for remote management of applications of the secure element; operations related to a domain name system resolution session and operations related to an airborne communication session initiated by the secure element.
8. The method of claim 7, wherein the remote management operations of file contents of the secure element and / or the remote management operations of applications of the secure element from the list of authorized operations exclude any operation requiring writing or erasing of data on the memory of the secure element.
9. Method according to one of the preceding claims, in which, during an implementation of step d, the list of authorized operations is reduced, the method further comprising: sending an alert to a remote server comprising information relating to the overall wear state of the memory of the secure element.
10. The method of claim 9, wherein the alert is sent when a current number of authentications of the secure element to a telecommunications network is greater than or equal to a critical value.
11. Method according to claim 10, in which the critical value is determined after said implementation of step d, by a random drawing from a set of natural integers of which a minimum value is strictly greater than the current number of authentications of the secure element with a telecommunications network.
12. A secure element comprising a processor and a memory, the secure element being configured by a list of authorized operations, the processor being configured to: a. receive a command to erase or write data in the memory; and b. execute the received command only if the received command matches an authorized operation from the list of authorized operations; wherein the processor is further configured to: c. determine an indicator of an overall wear state of the memory; and d. if the determined indicator indicates that the overall wear state of the memory is greater than a predefined threshold, reduce the list of authorized operations by removing operations from said list.
13. A secure element according to claim 12, wherein the memory is a non-volatile memory.
14. Host terminal comprising a secure element according to one of claims 12 and 13.
15. Computer program product comprising instructions for implementing the method according to one of claims 1 to 11, when this program is executed by a processor.
16. Non-transitory recording medium readable by a computer on which is recorded a program for implementing the method according to one of claims 1 to 11 when this program is executed by a processor.