Method for updating software installed on secure element

By checking the application identifier of the executable load file during the update process of the secure element, it avoids files with the same identifier being updated at the same time, solves the problem of inconsistent status when upgrading multiple executable load files, and improves security.

CN118535186APending Publication Date: 2024-08-23STMICROELECTRONICS INT NV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410182123.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-02-09
Filing Date
2024-02-19
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology cannot effectively manage the situation of multiple executable load files with the same application identifier during the upgrade process, causing the secure element to enter an inconsistent state and endangering its security.

Method used

Before starting the update of the executable load file, check whether its application identifier is the same as the application identifier of the executable load file that has been updated in the update session. If they are the same, reject the update to avoid the occurrence of inconsistent states.

Benefits of technology

Through this method, the security of the update session of multiple executable load files is improved, the secure element is prevented from entering an inconsistent state, and the stability and security of the upgrade process are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535186A_ABST
    Figure CN118535186A_ABST
Patent Text Reader

Abstract

The invention relates to a method of updating software installed on a secure element. A method for updating a plurality of executable load files in a secure element includes receiving at least one command for executing an update session of the plurality of executable load files, each executable load file associated with an application identifier; before starting the update of the executable load file: checking whether the executable load file is associated with the same application identifier as the application identifier of one of the executable load files that have been updated, and if the application identifier of the executable load file is new in consideration of the application identifier of each executable load file that has been updated, performing an update of the executable load file, or if the executable load file is associated with the same application identifier as the application identifier of one of the executable load files that has been updated in the update session, rejecting the update of the executable load file.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of priority to European Patent Application No. 23158150.5, filed on February 23, 2023, entitled “Method of Updating a Software Installed on a Secure Element,” and U.S. Patent Application No. 18 / 437,922, filed on February 9, 2024, entitled “Method of Updating a Software Installed on a Secure Element,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] Implementations and embodiments of the present invention relate to secure elements, and more particularly to application updates on secure elements. Background Art

[0004] A secure element is a tamper-resistant platform (usually an on-chip secure microcontroller) that can securely host applications and their confidential and cryptographic data (e.g., keys) according to rules and security requirements set by recognized trusted authorities. Secure elements can be embedded integrated secure elements, SIM / UICC, smart microSD, and smart cards.

[0005] Secure elements are an evolution of the traditional chip residing in smart cards, adapted to suit the needs of an increasingly digital world such as smartphones, tablets, set-top boxes, wearable devices, connected cars and other Internet of Things (IoT) devices.

[0006] With multiple applications stored and their processes executed within a single device, it is critical to be able to host trusted applications and their associated credentials in a secure environment. The secure environment includes authentication, identification, signing, and PIN management. These applications are required for different consumer services and require a protected environment to operate securely.

[0007] The secure element can be configured to use Java Card, a software technology that allows Java-based applications (applets) to run securely on a secure element.

[0008] It is important to allow updating / upgrading the software on the secure element. There are many reasons to upgrade software: fix bugs, add new features, etc. The difference between upgrading classic software and secure element software is that there are permanent instances of software programs on the secure element. These instances are created and personalized by the service provider with both user data and secret or sensitive data. The personalization process can sometimes be complex and expensive, and ideally should not be repeated in the case of a software upgrade.

[0009] For service providers, simply deleting their applications (and related data) and then installing them again and personalizing them is not a good solution.

[0010] An application is an instance of an executable module (particularly a Java Card Applet instance) after it has been installed on a secure element. Each application is identified by an application identifier. An executable module contains the executable code of a single application present in an executable load file.

[0011] An executable load file is a container of executable code (executable module) of one or more applications. For example, an executable load file is a Java Card package.

[0012] Installation of an application creates an instance from an executable module in persistent storage plus possible application data. Any application instance and its associated data can be removed. The secure element is designed to support multiple executable load files and multiple executable modules, and as such, such multiple applications can co-exist on the secure element.

[0013] The executable load file may be shared and used by several service providers (e.g., a mobile payment application that may be instantiated by different banks). Therefore, updating the executable load file is not only (or not at all) a matter for a single service provider, but a matter for the executable load file provider.

[0014] The executable load file upgrade process includes a save phase, a load phase and a restore phase. The save phase allows saving the instance data of the application instance created from the upgraded old executable load file. This saving is performed by using the upgrade API (Application Programming Interface).

[0015] The old executable loader version, its application instances and their instance data are then deleted, except for instance data saved using the upgrade API.

[0016] The load phase allows a new executable load file version to be loaded. Prior to loading the new executable load file version, library executable load files that were previously imported by the old executable load file version and that are not used after the deletion of the old executable load file version may be deleted / replaced, irrelevant executable load files may be deleted / loaded, and a new library executable load file may be loaded. The new library executable load file is the library executable load file that is imported by the new executable load file version.

[0017] The restore phase allows new application instances to be created from the new executable load file version in the same number and with the same application identifier as previously existing application instances.

[0018] Each new application instance is allowed to restore instance data from a previous application instance with the same application identifier.

[0019] More than one executable load file can be upgraded in the same executable load file upgrade session.

[0020] However, this upgrade process does not manage the situation where multiple executable load files with the same application identifier are upgraded. This situation is undesirable, but a hacker can use it to force the secure element into an inconsistent state.

[0021] In particular, if an upgrade of multiple executable load files with the same application identifier is started, the upgrade process cannot manage the load phases correctly.

[0022] More specifically, the loading phase is only adapted to perform the loading of only one executable load file per application identifier. Therefore, during the loading phase, the secure element can wait to receive another executable load file that it will not receive. In this case, the secure element enters an inconsistent state, which can compromise its security.

[0023] Therefore, the upgrade process cannot be terminated, and the security element can enter an inconsistent state. This inconsistent state can lock the security element in its waiting state for another executable load file, and / or enable a hacker to load an undesired executable load file. Therefore, this upgrade process raises security issues.

[0024] Therefore, there is a need to provide an upgrade process that improves security when multiple executable load files are upgraded. Summary of the invention

[0025] According to one aspect, a computer-implemented method for updating a plurality of executable load files in a secure element, in particular a microcontroller, is proposed, the method comprising:

[0026] - receiving at least one command for executing an update session of a plurality of executable load files, each executable load file being associated with an application identifier,

[0027] The method further comprises, before starting the update of the executable load file:

[0028] - checks whether this executable load file is associated with an application identifier that is the same as the application identifier of one of the executable load files that has been updated in this update session, and

[0029] - if the application identifier of the executable load file is new taking into account the application identifiers of each executable load file that has been updated in this update session, then proceed with the update of the executable load file, or

[0030] - If the executable load file is associated with an application identifier that is identical to an application identifier of one of the executable load files already updated in this update session, then the updating of this executable load file is rejected.

[0031] This approach allows for an update session to be performed with multiple executable load files, and also manages the situation where an update session is started with multiple executable load files having the same application identifier.

[0032] This method allows to improve the security of update sessions of multiple executable load files. The method allows to avoid inconsistent states in case of updates of multiple executable load files with the same application identifier. In particular, the method allows to reject the update of an executable load file when this executable load file has an application identifier that is the same as the application identifier of one of the executable load files that has been updated in this update session.

[0033] According to a particularly advantageous implementation, the computer-implemented method further comprises storing the application identifier in a list in a memory if the application identifier of the executable load file of the update session is new taking into account the application identifier of each executable load file that has been updated in this update session, and performing the check by comparing the application identifier of the executable load file with each application identifier in the list.

[0034] Advantageously, said checking is performed upon receipt of said at least one command for executing an update session of a plurality of executable load files.

[0035] According to another aspect, a security element (in particular, a microcontroller) is provided, the security element comprising a memory, the memory being configured to store a plurality of executable load files, the security element being configured to perform an update of the plurality of executable load files, the update comprising:

[0036] - receiving at least one command for executing an update session of a plurality of executable load files, each executable load file being associated with an application identifier,

[0037] The updating further comprises, before starting the updating of the executable load file:

[0038] - checks whether this executable load file is associated with an application identifier that is the same as the application identifier of one of the executable load files that has been updated in this update session, and

[0039] - if the application identifier of the executable load file is new taking into account the application identifiers of each executable load file that has been updated in this update session, then proceed with the update of the executable load file, or

[0040] - If the executable load file is associated with an application identifier that is identical to an application identifier of one of the executable load files already updated in this update session, then the updating of this executable load file is rejected.

[0041] According to a particularly advantageous implementation, the updating further comprises storing the application identifier of the executable load file of the update session in a list in the memory if the application identifier of the executable load file is new taking into account the application identifier of each executable load file already updated in this update session, and performing the check by comparing the application identifier of the executable load file with each application identifier in the list.

[0042] Advantageously, said checking is performed upon receipt of said at least one command for executing an update session of a plurality of executable load files. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Other advantages and features of the invention will emerge from the detailed description of embodiments and implementations which are by no means limiting and from the accompanying drawings, in which: [ Figure 1 ]、[ Figure 2 ]and[ Figure 3 ] schematically represent various implementations and embodiments of the present invention. DETAILED DESCRIPTION

[0044] Figure 1Represents a security element SE. The security element SE is, for example, a microcontroller. The security element SE can be an embedded integrated security element, a SIM / UICC, a smart microSD, and a smart card. The security element SE includes a processing unit UT and a memory MEM. This memory MEM is configured to store different applications that can be executed by the processing unit. An application is an instance of an executable module after the executable module has been installed (particularly, a Java Card Applet instance). Each application is identified by an application identifier. An executable module contains executable code for a single application present in an executable load file.

[0045] In particular, the security element SE includes at least one executable load file stored in the memory MEM. The executable load file is a container of executable code (executable module) of one or more applications. Multiple executable load files can be stored in the memory. For example, the executable load file is a Java Card package. Here, the security element includes three executable load files ELF1, ELF2, and ELF3.

[0046] The secure element SE is also configured to implement a method for updating a plurality of executable load files stored in its memory MEM.

[0047] In the following, the executable load file being upgraded is referred to as the "old executable load file version", and the executable load file that upgrades the old executable load file version is referred to as the "new executable load file version".

[0048] Figure 2 Represents the implementation of a method for updating multiple executable load files on a secure element SE. This method is implemented by a secure element SE.

[0049] The method comprises receiving 20 at least one command for starting an upgrade session of a plurality of executable load files. For example, the command can be a MANAGE ELF UPGRADE [start] command as defined in the document "executable load file Upgrade-Card Specification v2.3-AmendmentH-Version 1.1" published in March 2018 from GlobalPlatform.

[0050] Such commands are received via a secure channel. A secure channel is a communication mechanism between an external entity and the secure element SE. The secure channel is configured to provide a certain level of assurance.

[0051] More specifically, in order to update multiple executable load files in the same update session, the method begins by receiving multiple MANAGE ELF UPGRADE [start] commands. Each MANAGE ELF UPGRADE [start] command specifies an executable load file to be upgraded.

[0052] Upon receipt of each MANAGE ELF UPGRADE[start] command, the method comprises a step of performing a preliminary check 21. A preliminary check is performed for each executable load file associated with the MANAGE ELF UPGRADE[start] command of the update session.

[0053] In particular, preliminary checks are used to accept or reject the executable load file upgrade process.

[0054] In particular, the preliminary check allows rejecting the executable load file upgrade process if the executable load file upgrade process is already in progress.

[0055] If the command specifies a minimum version number, the preliminary check also allows the executable load file upgrade process to be rejected if the version number of the old executable load file version being upgraded is lower than the specified minimum version number.

[0056] The preliminary check also allows to reject the executable loader upgrade process if there are static dependencies on the secure element SE that would prevent the old executable loader version from being deleted (in particular according to Java Card rules).

[0057] The preliminary check also allows rejecting the executable load file upgrade process if any application instance created from the old executable load file version is currently selected (on any logical channel) or suspended.

[0058] The preliminary check also allows to reject the executable load file upgrade process if a new executable load file version already exists on the secure element SE (i.e. has an application identifier other than the old executable load file version) and the new executable load file version does not meet some requirements. In particular, the requirements are that each new executable load file version will be associated with the same security domain as the old executable load file version and that each new executable load file version will define at least the same application modules with exactly the same application identifiers as the old executable load file version.

[0059] The preliminary check also allows to reject the executable load file upgrade process if the new executable load file version already exists on the secure element SE (ie has an application identifier other than the old executable load file version) and an application instance has been created from the new executable load file version.

[0060] The initial inspection also includes Figure 3 This additional check allows to identify whether the application identifier of the executable load file associated with the received MANAGEELF UPGRADE [start] command is the same as the application identifier associated with the executable load file that has been updated in the update session.

[0061] Specifically, upon receipt of each MANAGE ELF UPGRADE[start] command ( Figure 3 21-1), the additional check includes a comparison between the application identifier of the executable load file associated with this command and the application identifier of each executable load file that has been updated in the update session (step 21-2).

[0062] More specifically, the security element includes a permanent memory CMEM. The permanent memory CMEM is a memory that cannot be changed when the security element is powered off. The permanent memory CMEM can be a non-volatile memory, such as a flash memory or an electrically erasable programmable read-only memory ("EEPROM"). The permanent memory CMEM is used to store an application identifier of each executable load file that has been updated in an update session. Therefore, the application identifier of the executable load file associated with the received command is compared with the application identifier in the list stored in the permanent memory CMEM.

[0063] If the additional check allows determining that the application identifier of the executable load file is different from the application identifier of each executable load file that is already being updated, the method comprises step 21 - 3 .

[0064] In this step 21-3, the secure element SE stores the application identifier of the executable load file in a list in the persistent memory CMEM. The method then comprises a step 21-4 in which a command for updating the executable load file is received. The method can be Figure 1 Continue with step 22 above to update this executable loader file.

[0065] If the additional check allows to determine that the application identifier of the executable load file is identical to the application identifier of the executable load file that is already being updated, the method comprises a step 21-5. In this step 21-5, the secure element SE rejects the MANAGE ELF UPGRADE [start] command of this executable load file. The rejection of this command allows to avoid starting an update of this executable load file that could put the secure element SE into an inconsistent state that could compromise its security.

[0066] The secure element SE also generates a status word to indicate that the executable load file cannot be updated, but the updates of other executable load files of the update session can be maintained. The status word can be "6900", as defined in the document "executable loadfile Upgrade-Card Specification v2.3-Amendment H-Version 1.1". The generation of this status word allows to avoid aborting the updates of other executable load files of the update session.

[0067] When all MANAGE ELF UPGRADE [start] commands have been checked, the method includes upgrading each executable load file that has not been rejected.

[0068] In particular, the updating of each executable load file includes a saving phase (step 22), a loading phase (step 23) and a restoring phase (step 24).

[0069] The preservation phase 22 allows the preservation of instance data of an application instance created from an upgraded old executable load file. This preservation is performed by using the upgrade API (Application Programming Interface).

[0070] The old executable loader version, its application instances and their instance data are then deleted, except for instance data saved using the upgrade API.

[0071] Loading stage 23 allows loading of a new executable load file version. Before loading the new executable load file version, library executable load files that were previously imported by the old executable load file version and that are not used after the deletion of the old executable load file version may be deleted / replaced, irrelevant executable load files may be deleted / loaded, and a new library executable load file may be loaded. The new library executable load file is the library executable load file that is imported by the new executable load file version.

[0072] The restore phase 24 allows new application instances to be created from the new executable load file version in the same number and with the same application identifier as previously existing application instances.

[0073] The save phase, load phase and restore phase can be implemented as specified in the document "executable load fileUpgrade-Card Specification v2.3-Amendment H-Version 1.1".

[0074] At the end of the upgrade session, the application identifier stored in the list LST of the memory CMEM is deleted.

Claims

1. A computer-implemented method for updating a plurality of executable load files in a secure element, the computer-implemented method comprising: - receiving at least one command for executing an update session of a plurality of executable load files, each executable load file being associated with an application identifier; - wherein the method further comprises, before starting the update of the executable load file: - checking whether the executable load file is associated with an application identifier that is identical to the application identifier of one of the executable load files that has been updated in the update session; - if the application identifier of the executable load file is new taking into account the application identifier of each executable load file that has been updated in the update session, updating of the executable load file is performed; or - rejecting the updating of the executable load file if the executable load file is associated with an application identifier that is identical to an application identifier of one of the executable load files already updated in the update session.

2. The computer-implemented method of claim 1 , further comprising: If the application identifier of the executable load file of the update session is new taking into account the application identifier of each executable load file that has been updated in the update session, the application identifier of the executable load file is stored in a list in the memory, and the check is performed by comparing the application identifier of the executable load file with each application identifier in the list.

3. The computer implemented method of claim 1, wherein the checking is performed upon receiving the at least one command to perform an update session of the plurality of executable load files.

4. A security element, comprising a memory, the memory being configured to store a plurality of executable load files, the security element being configured to execute an update of the plurality of executable load files, the update comprising: - receiving at least one command for executing an update session of a plurality of executable load files, each executable load file being associated with an application identifier, - wherein said updating further comprises, before starting the updating of the executable loader file: - checking whether the executable load file is associated with an application identifier that is identical to the application identifier of one of the executable load files that has been updated in the update session; - if the application identifier of the executable load file is new taking into account the application identifier of each executable load file that has been updated in the update session, updating of the executable load file is performed; or - rejecting the updating of the executable load file if the executable load file is associated with an application identifier that is identical to an application identifier of one of the executable load files already updated in the update session.

5. The security element of claim 4, wherein the updating further comprises: If the application identifier of the executable load file of the update session is new taking into account the application identifier of each executable load file that has been updated in the update session, the application identifier of the executable load file is stored in a list in the memory, and the check is performed by comparing the application identifier of the executable load file with each application identifier in the list. 6 . The secure element of claim 4 , wherein the checking is performed upon receiving the at least one command to perform an update session of a plurality of executable load files.