Electronic device and method for controlling access to applet
By generating and managing access rules within a trusted execution environment based on security element identification, the electronic device securely controls applet access, mitigating unauthorized access and enhancing security through secure key-based communication.
Patent Information
- Application Number
- PCT/KR2024/004843
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-16
- Filing Date
- 2024-04-11
- Publication Date
- 2024-10-31
AI Technical Summary
Existing electronic devices face challenges in securely controlling access to applets due to exposure of access rules in general environments, leading to potential unauthorized access and security risks.
The electronic device generates and stores access rules in a trusted execution environment (TEE) based on identification information of a security element, using a shared key for secure communication, thereby preventing unauthorized access and enhancing security.
This approach ensures secure access control by keeping access rules within a secure environment, reducing the risk of exposure and unauthorized access, and preventing access rule forgery or modification in general environments.
Smart Images

Figure KR2024004843_31102024_PF_FP_ABST
Abstract
Description
Electronic device and method for controlling access to applets
[0001] The descriptions below relate to electronic devices and methods for controlling access to applets.
[0002] Electronic devices may include components for security. For example, the security components may be referred to as security circuits, security chip sets, or security elements. For example, electronic devices may provide various security-related services based on the security components.
[0003] The above information may be provided as background art to aid in understanding the present disclosure. No claim or determination is made as to whether any of the above is applicable as prior art related to the present disclosure.
[0004] An electronic device may include a processor. The electronic device may include a security element. The processor may be configured to identify an event for executing a function of an applet within the security element based on a software application. The processor may be configured to transfer, based on the identified event, certification information of the software application and package information of the software application from a rich execution environment (REE) of the processor to a trusted execution environment (TEE) of the processor. The processor may be configured to generate, on the TEE, a value for controlling access to the applet based on the identification information of the security element, the authentication information, and the package information obtained from the security element. The processor may be configured to execute the function based on the value.
[0005] A method performed by an electronic device may include an operation of identifying an event for executing a function of an applet within a secure element of the electronic device based on a software application. The method may include an operation of transmitting, based on the identified event, certification information of the software application and package information of the software application from a rich execution environment (REE) to a trusted execution environment (TEE). The method may include an operation of generating, on the TEE, a value for controlling access to the applet based on the identification information of the secure element, the authentication information, and the package information obtained from the secure element. The method may include an operation of executing the function based on the value.
[0006] An electronic device may include a memory. The electronic device may include at least one processor including a security element. When executed by the at least one processor, the memory may include one or more instructions that cause the at least one processor to identify an event for executing a function of an applet within the security element of the electronic device based on a software application. When executed by the at least one processor, the memory may include one or more instructions that cause the at least one processor to transfer, based on the identified event, certification information of the software application and package information of the software application from a rich execution environment (REE) to a trusted execution environment (TEE). When executed by the at least one processor, the memory may include one or more instructions that cause the at least one processor to generate, on the TEE, a value for controlling access to the applet based on the identification information of the secure element obtained from the secure element, the authentication information, and the package information. When executed by the at least one processor, the memory may include one or more instructions that cause the at least one processor to execute the function based on the value.
[0007] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments.
[0008] FIG. 2 illustrates an example of a simplified block diagram of an electronic device according to various embodiments.
[0009] Figures 3a and 3b illustrate examples of how to inject access rules into a security element.
[0010] Figure 3c illustrates an example of how to perform access to an applet of a secure element.
[0011] FIGS. 4A and 4B illustrate an example of a method for injecting access rules based on identification information of a security element within a local area of an electronic device according to one embodiment.
[0012] FIG. 5 illustrates an example of a method for injecting access rules based on identification information of a security element using an external electronic device according to one embodiment.
[0013] FIG. 6 illustrates an example of a method for performing access to an applet using an access rule based on identification information of a security element according to one embodiment.
[0014] FIG. 7A illustrates an example of a visual object displayed according to a result of an integrity check of an electronic device according to one embodiment.
[0015] FIG. 7b illustrates an example of a visual object displayed according to the result of checking the allow list of a software application according to one embodiment.
[0016] FIG. 8a illustrates an example of an operation flow for injecting an access rule based on identification information of a security element according to one embodiment.
[0017] FIG. 8b illustrates an example of an operation flow for performing access to an applet using an access rule based on identification information of a security element according to one embodiment.
[0018] FIG. 9 illustrates an example flowchart for a method of controlling access to an applet of a security element according to one embodiment.
[0019] The terms used in this disclosure are used only to describe specific embodiments and may not be intended to limit the scope of other embodiments. The singular expression may include plural expressions unless the context clearly indicates otherwise. Terms used herein, including technical or scientific terms, may have the same meaning as commonly understood by those of ordinary skill in the art described in this disclosure. Terms defined in general dictionaries among the terms used in this disclosure may be interpreted as having the same or similar meaning in the context of the relevant technology, and shall not be interpreted in an idealized or overly formal sense unless explicitly defined in this disclosure. In some cases, even if a term is defined in this disclosure, it cannot be interpreted to exclude embodiments of the present disclosure.
[0020] The various embodiments of the present disclosure described below illustrate a hardware-based approach as an example. However, since the various embodiments of the present disclosure include techniques utilizing both hardware and software, the various embodiments of the present disclosure do not exclude a software-based approach.
[0021] In addition, in the present disclosure, expressions such as "more than" or "less than" may be used to determine whether a specific condition is satisfied or fulfilled. However, this is merely a description for expressing an example and does not exclude descriptions such as "more than" or "less than." Conditions described as "more than" may be replaced with "more than," conditions described as "less than," and conditions described as "more than and less than" may be replaced with "more than and less than." In addition, hereinafter, "A" to "B" mean at least one of the elements from A (including A) to B (including B).
[0022] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments.
[0023] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to various embodiments. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with an electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (104) or a server (108) via a second network (199) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0024] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or calculations. According to one embodiment, as at least a part of the data processing or calculations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or a secondary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor)) that can operate independently or together therewith. For example, if the electronic device (101) includes a main processor (121) and a secondary processor (123), the secondary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a specified function. The secondary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0025] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0026] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0027] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0028] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0029] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0030] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
[0031] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0032] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0033] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0034] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0035] The haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0036] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0037] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0038] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0039] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0040] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0041] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).
[0042] According to various embodiments, the antenna module (197) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.
[0043] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
[0044] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0045] FIG. 2 illustrates an example of a simplified block diagram of an electronic device according to various embodiments.
[0046] The electronic device (101) of FIG. 2 may include at least a portion of the electronic device (101) of FIG. 1. For example, the electronic device (101) may include a processor (120) and a memory (130). For example, the processor (120) may be referred to as an application processor (AP).
[0047] Referring to FIG. 2, the processor (120) may include a rich execution environment (REE) (210) and a trusted execution environment (TEE) (220). For example, the REE (210) may include an area for the processor (120) to perform normal data operations and processing. For example, the REE (210) may be referred to as a normal environment. For example, the TEE (220) may include an area for the processor (120) to operate and process security-related data. For example, the TEE (220) may be referred to as a secure environment. In other words, the TEE (220) may represent an environment for processing data that requires a relatively high level of security with respect to the REE (210). The REE (210) and the TEE (220) may be implemented in a hardware-separated state, a software-separated state, or a hardware-software-separated state.
[0048] For example, the processor (120) may include various processing circuits and / or multiple processors. For example, the term "processor" as used herein, including in the claims, may include various processing circuits including at least one processor, one or more of which may be configured to perform the various functions described below individually or collectively in a distributed manner. As used herein, when "processor," "at least one processor," and "one or more processors" are described as being configured to perform various functions, these terms encompass, for example, and without limitation, situations where one processor performs some of the recited functions and other processor(s) perform other parts of the recited functions, and also situations where one processor may perform all of the recited functions. Additionally, the at least one processor may include a combination of processors that perform the various functions enumerated / disclosed, for example, in a distributed manner. At least one processor may execute program instructions to achieve or perform the various functions.
[0049] Referring to FIG. 2, the electronic device (101) may include a secure element (SE) (230). The secure element (230) may be referred to as a secure circuit, a secure chip set, a secure processor, or a secure processor unit (SPU). For example, the secure element (230) may be embedded within the electronic device (101). For example, the secure element (230) may include an embedded secure element (eSE). In FIG. 2, the secure element (230) is illustrated as being included in the electronic device (101) as a separate component from the processor (120), which is the AP, but the embodiments of the present disclosure are not limited thereto. For example, the secure element (230) and the processor (120) may be included in a single component, such as a system on chip (SoC). For example, the security element (230) and the processor (120) may be referred to as at least one processor. In the following, for convenience of explanation, the security element (230) is illustrated as being included as a separate component within the electronic device (101), but the embodiments of the present disclosure are not limited thereto.
[0050] Although not illustrated in FIG. 2, the TEE (220) may be connected to a secure element (230). For example, a secure channel may be formed between the TEE (220) and the secure element (230). For example, the secure channel may be implemented through a physical interface such as a serial peripheral interface (SPI) or an inter-integrated circuit (I2C). Forming the secure channel may include activating a secure session. When the secure channel is formed, the processor (120) may perform communication based on a protocol specified between the secure elements (230). For example, the processor (120) may transmit or receive data through the secure channel based on the specified protocol. For example, the data may include at least one of a command, a key, identification information, or an access rule. However, the embodiments of the present disclosure are not limited thereto. The access rule may represent a value for controlling access to the applet (260). For example, the access rule may be composed of binary bits.
[0051] For example, the security element (230) may include an authorized management security domain (AMSD) or delegated management security domain (DMSD) (240) for activating the secure session based on a specified protocol. For example, the AMSD or DMSD (240) may perform chain verification for a certificate using a root key based on the specified protocol. If the verification is successful, the AMSD or DMSD (240) may activate the secure session, thereby creating the secure channel. For example, the AMSD or DMSD (240) may be referred to as a first security domain.
[0052] For example, the security element (230) may include a security domain (SD) (250) that includes an applet (260) associated with a specific software application. For example, the SD (250) may be created for each service provider. For example, when there are multiple service providers, the security element (230) may include multiple SDs. For example, each of the multiple SDs may include at least one applet. For example, the SD (250) may be included in the AMSD or DMSD (240). The applet (260) may perform a function requested through an application programming interface (API) called from the associated specific software application. The API may include an API defined for use of the applet (260). For example, the API may include an open mobile API or an API specific to the security element (230). For example, the function may include at least one of generating or deleting a key, generating or verifying a signature, encrypting or decrypting data, or storing or deleting data.
[0053] For example, the memory (130) may include one or more instructions that, when executed by the at least one processor (e.g., the processor (120), the security element (230)), cause an operation of the at least one processor. For example, within the memory (130), the one or more instructions (or commands) representing operations and / or actions to be performed on data by the at least one processor of the electronic device (101) may be stored. A set of the one or more instructions may be referred to as a program, firmware, an operating system, a process, a routine, a sub-routine, and / or an application. Hereinafter, the fact that a software application is installed in the electronic device (101) may mean that one or more instructions provided in the form of a software application are stored in the memory (130), and that the one or more applications are stored in a format executable by at least one processor of the electronic device (101) (e.g., a file having an extension designated by an operating system of the electronic device (101). According to one embodiment, the electronic device (101) may execute the one or more instructions stored in the memory (130) to perform an operation according to an embodiment of the present disclosure.
[0054] In FIG. 2, components included in the electronic device (101) are illustrated, but the components in FIG. 2 are merely examples of at least some components included in the electronic device (101), and the embodiments of the present disclosure are not limited thereto. For example, the electronic device (101) may include a transceiver for communicating with an external electronic device.
[0055] Figures 3a and 3b illustrate examples of a method for injecting an access rule into a security element. The access rule may represent a value for controlling access to an applet. The injection can be understood as essentially the same as storing.
[0056] The electronic device (101) of FIGS. 3A and 3B may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIGS. 3A and 3B may include an REE (210), a TEE (220), and a security element (230). The same reference numerals may be used for the same description.
[0057] FIG. 3A illustrates a method in which an electronic device (101) obtains an access rule (315) for an applet (310) (hereinafter, “access rule applet”) for controlling access to a specific applet from an external electronic device (e.g., a key management system (KMS) (300)) and injects the access rule (315) into a security element (230). For example, the electronic device (101) may create a security domain (SD) for a service provider providing a specific service within the security element (230). For example, the electronic device (101) may inject an access rule (315) for access to the access rule applet (310) for controlling access to the service applet into the access rule applet (310). For example, the service applet may represent an applet linked to a software application that provides the specific service. For example, an access rule (315) for access to an access rule applet (310) can be injected into a security element (230) before installing the service applet in the electronic device (101).
[0058] Referring to FIG. 3A, the REE (210) in the processor of the electronic device (101) (e.g., the processor (120) of FIG. 2) may execute a software application (hereinafter, KMS application) (301) for a key management system (KMS). For example, the KMS (300) may represent a system or server for managing the life cycle of an encrypted key. The KMS (300) may be referred to as an external electronic device. For example, the REE (210) may obtain an access rule (315) for accessing the access rule applet (310) from the KMS (300) by using the KMS application (301). The access rule (315) may include a certificate of a software application that is permitted to access the access rule applet (310) or a hashed value of the certificate. For example, REE (210) can inject an access rule (315) into the access rule applet (310) based on a KMS API (303) that is linked to a KMS application (301) and defined for use by the access rule applet (310).
[0059] FIG. 3b illustrates an example of a method for injecting a service applet (320) through an external electronic device (e.g., a trusted service manager (TSM) (330) of a service provider providing a specific service).
[0060] Referring to FIG. 3b, the REE (210) can execute a software application (hereinafter, service application) (305) that provides the specific service. For example, the REE (210) can obtain an access rule (325) for a service applet (320) using the service application (305). For example, the REE (210) can inject the access rule (325) into the access rule applet (310) using the open mobile API (307), which is an API for accessing the security element (230) and is linked to the service application (305).
[0061] For example, the REE (210) may obtain an access rule (315) from the access rule applet (310) through the access control enforcer (309) by identifying an event for accessing the service applet (320) through the service application (305). The access control enforcer (309) may compare the access rule (315) with an access rule calculated based on the authentication information of the service application (305). The authentication information may include a certificate (App cert) of the service application (305) or a hashed value of the certificate (App cert Hash). For example, if the REE (210) identifies that the service application (305) is accessible to the access rule applet (310) based on the above comparison, the REE (210) can inject the access rule (325) for the service applet (320) into the access rule applet (310) using the open mobile API (307).
[0062] Referring to the above, the electronic device (101) or REE (210) can inject (or store) access rules for an applet (e.g., an access rule applet (310)) for controlling access to the applet. The access rules can include access rules for the access rule applet (310) and the service applet (320).
[0063] Figure 3c illustrates an example of how to perform access to an applet of a secure element.
[0064] The above applet may include an applet (e.g., a service applet (320) of FIG. 3b) linked to a software application (e.g., a service application (305) of FIG. 3b) that provides a specific service.
[0065] The electronic device (101) of FIG. 3C may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIG. 3C may include an REE (210), a TEE (220), and a security element (230). The same reference numerals may be used for the same description.
[0066] FIG. 3c illustrates an example of an electronic device (101) accessing a service applet (320) to execute a specific function. The specific function may include at least one of key generation or deletion, signature generation or verification, data encryption or decryption, or data storage or deletion. For example, the use of the specific function may result in the storage or deletion of data for a transportation card or credit card, charging of the transportation card, or the generation or deletion of a car key.
[0067] Referring to FIG. 3c, for example, the REE (210) can identify an event for executing the function through the service applet (320) using the service application (305). For example, the REE (210) can obtain the access rule (325) from the security element (230) through the access manager (309) when the electronic device (101) is booted or the access rule (325) is updated. For example, the REE (210) can obtain the access rule (325) for controlling access to the service applet (320) from the access rule applet (310). The REE (210) can store the obtained access rule (325) in the memory of the REE (210).
[0068] For example, the REE (210) can compare the access rule (325) calculated based on the authentication information of the service application (305) with the access rule using the access manager (309). The authentication information can include a certificate (App cert) of the service application (305) or a hashed value of the certificate (App cert Hash). For example, if the REE (210) identifies that the service application (305) can access the service applet (320) based on the comparison, the REE (210) can access the service applet (320) using the open mobile API (307). Accordingly, the above function can be executed.
[0069] As described above, when the access manager (309) reads (or obtains) the access rule (325) stored (or cached) in the security element (230), the REE (210) may store the access rule (325) in the memory. Accordingly, the access rule (325) may be easily exposed and modified. If the access rule (325) is modified to a desired value before comparing the access rule (325) with the access rule calculated based on the authentication information, there is a problem that an unauthorized software application may access the service applet (320). Alternatively, even when the comparison by the access manager (309) on the REE (210), which is a relatively open environment, is skipped, there is a problem that an unauthorized software application may access the service applet (320). Additionally, the access rule calculated for comparison with the access rule (325) is generated based on the application's certificate (or a hashed value of the certificate) and can be used for all security elements. In other words, an access rule value exposed from a specific terminal can be used by other terminals, which may cause a security issue.
[0070] Hereinafter, an electronic device and method according to an embodiment of the present disclosure can generate access rules based on identification information of a security element. Furthermore, the electronic device and method according to an embodiment of the present disclosure can generate the access rules in a secure environment (e.g., a TEE) rather than a general environment (e.g., an REE). Accordingly, the electronic device and method according to an embodiment of the present disclosure can control access to applets in a more secure manner. Accordingly, the electronic device and method according to an embodiment of the present disclosure can reduce the risk of access rule exposure and enhance security.
[0071] FIGS. 4A and 4B illustrate an example of a method for injecting access rules based on identification information of a security element within a local area of an electronic device according to one embodiment.
[0072] The electronic device (101) of FIG. 4A may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIG. 4A may include the REE (210), the TEE (220), and the security element (230) of FIG. 2. The same reference numerals may be used for the same description.
[0073] FIG. 4A illustrates an example of a method for an electronic device (101) to inject a shared key (service TA-SD) (440) between a trusted application (TA) (415) and a security domain (SD) (250) in order to inject the access rule within the local area. Injecting the access rule within the local area can be understood as injecting the access rule within the electronic device (101) itself. In other words, the electronic device (101) can inject the access rule without being connected to an external electronic device by using a pre-shared shared key (service TA-SD) (440).
[0074] Referring to FIG. 4A, according to one embodiment, an electronic device (101) may include a REE (210), which is an environment with a relatively low security level, and a TEE (220), which is an environment with a relatively high security level. For example, a TA (415) within the TEE (220) may represent a software application running within the TEE (220). In addition, as described in FIG. 2, a security element (230) may include an AMSD or DMSD (240) and an SD (250). The AMSD or DMSD (240) may be referred to as a first security domain. The SD (250) may be referred to as a second security domain, which is a subdomain of the first security domain. An applet (260) may be stored or installed in the SD (250). Referring to the above, the shared key (service TA-SD) (440) between the TA (415) and the SD (250) may also be referred to as a shared key (service TA-SD) between the TEE (220) and the security element (230).
[0075] In one embodiment, the shared key (service TA-SD) (440) may be required for the electronic device (101) to generate the access rule, which is a value for controlling access to the applet (260), within the local area. The electronic device (101) needs to operate as an authenticated end-point in order to generate the shared key (service TA-SD) (440) and inject it into the SD (250). In order to operate as the authenticated end-point, when manufacturing the electronic device (101), the electronic device (101) may obtain a certificate signed by an external electronic device (e.g., a hardware security module (HSM) (400) (or a factory HSM)).
[0076] Referring to FIG. 4A, an electronic device (101) according to one embodiment may generate a security element key (SEK) (420) for providing a service related to a security element of the electronic device (101) using a TA (415) of a TEE (220). The security element key (420) may also be referred to as an embedded SEK (eSEK). The security element key (420) may be associated with a sub-CA (certificate authority) for providing a service related to a security element of the electronic device (101). The electronic device (101) may generate a request (certificate signing request, CSR) for generating a signature value for the security element key (420). The electronic device (101) can transmit the security element key (420) and the CSR to the HSM (400), which is an external electronic device used for injecting keys and certificates during the manufacturing process of the electronic device (101). For example, the TA (415) of the electronic device (101) can transmit the CSR to the HSM (400). By transmitting the CSR, the electronic device (101) can request a certificate for the security element key (420).
[0077] According to one embodiment, the HSM (400) can perform a signature using the root key of the CSR and the security element key (420). The HSM (400) can generate a certificate (hereinafter, referred to as a first certificate) (427) for the security element key (420) based on the signature. The security element key (420) can be a key chained to the root key. The HSM (400) can transmit the generated first certificate (427) to the electronic device (101). For example, the HSM (400) can transmit the first certificate (427) to the TA (415) of the electronic device (101).
[0078] According to one embodiment, the electronic device (101) may generate a subkey (430) of the security element key (420) and a certificate (hereinafter, referred to as a second certificate) for the subkey (430). For example, the subkey (430) may include an eSE SCP11 key. The electronic device (101) may perform a signing of the second certificate using the security element key (420) authenticated based on the first certificate. For example, the subkey (430) may be an asymmetric key paired with an SCP11 key (435) that is a key for managing AMSD or DMSD (240). The subkey (430) may be a key chained to the security element key (420). In other words, the root key, the security element key (420), and the subkey (430) may be chained.
[0079] According to one embodiment, the electronic device (101) can create a secure channel (437) using the subkey (430) and the AMSD or DMSD (240) using a designated protocol. For example, the TA (415) and the AMSD or DMSD (240) can use the subkey (430) and the SCP11 key (435) to calculate a shared secret value for mutual verification. For example, the TA (415) can use the subkey (430) to calculate the shared secret value. For example, the AMSD or DMSD (240) can use the SCP11 key (435) to calculate the shared secret value. If the calculation of the common shared secret value is successful, the secure channel (437) can be created. The secure channel (437) can include a secure session. Additionally, AMSD or DMSD (240) can perform chain verification for the first certificate and the second certificate using the public key for the root key based on the SCP11 protocol method.
[0080] According to one embodiment, the electronic device (101) can inject the generated shared key (service TA-SD) (440) into the SD (250) using the secure channel (437). For example, the TA (415) can generate the shared key (service TA-SD) (440). Using the secure channel (437), the shared key (service TA-SD) (440) can be transferred from the TA (415) to the SD (250). The shared key (service TA-SD) transferred to the SD (250) can be stored in the SD (250). The shared key (service TA-SD) can also be used to activate the secure channel (437). For example, the TA (415) can activate the secure channel (437) using the shared key (service TA-SD) and communicate with the SD (250).
[0081] The electronic device (101) of FIG. 4B may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIG. 4B may include an REE (210), a TEE (220), and a security element (230). The same reference numerals may be used for the same description.
[0082] The electronic device (101) of FIG. 4B may be in a state where the shared key (service TA-SD) between the TA (hereinafter, service TA) (459) and the SD (250) is shared according to the method of FIG. 4A. In other words, the electronic device (101) of FIG. 4B may represent an electronic device manufactured in a state where the shared key (service TA-SD) is stored in the TEE (220) and the security element (230) of the electronic device (101).
[0083] Referring to FIG. 4B, an electronic device (101) according to one embodiment may identify an event for accessing an applet (260) based on an application (451) for providing a specific service. For example, the application (451) may include a service application for providing the specific service using the applet (260). The applet (260) may be referred to as a service applet associated with the service application. For example, the REE (210) may be linked to the application (451) and may identify whether there is an attempt to access the applet (260) through an application programming interface (API) (453) defined for the use of the applet (260). For example, the API (453) may include an open mobile API or a security chip API defined for the secure element (230). The above access may be an initial access to the applet (260) via the API (453) using the application (451).
[0084] According to one embodiment, the electronic device (101) may perform an integrity check of the electronic device (101) when there is the first access to the applet (260) through the API (453). For example, the REE (210) may perform the integrity check using the service module (455). The service module (455) may represent a module included in the electronic device (101) for the use of the security element (230). For example, the integrity check may be performed based on the service module (455) of the REE (210) and the TA (hereinafter, integrity check TA) (457) for the integrity check of the TEE (220). The integrity check of the electronic device (101) may include checking the status information of the electronic device (101). For example, the status information of the electronic device (101) may include root of trust (RoT) information. The above RoT information may include at least one of a verified boot state, information indicating whether the electronic device (101) is in a locked state, an operating system version (OS version), a patch time, or a patch level.
[0085] According to one embodiment, if the result of the integrity check is a failure, the electronic device (101) may restrict the use of the API (453). A failure in the integrity check may indicate a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal or has downloaded abnormal firmware, it may be identified that there is a problem with the integrity of the electronic device (101). For example, the electronic device (101) may transmit information indicating that the result of the integrity check is a failure to a service provider of the application (451) (e.g., a trusted service manager (TMS)). In addition, the electronic device (101) may display a visual object to notify that the integrity verification has failed. For example, the electronic device (101) may display the visual object through a display (e.g., the display module (160) of FIG. 1). Specific details related thereto are described below in FIG. 7A.
[0086] According to one embodiment, if the result of the integrity check is successful, the electronic device (101) may perform an allow list check. A success of the integrity check may indicate that there is no problem with the integrity of the electronic device (101). For example, if the electronic device (101) is intact, the REE (210) may perform the allow list check using the service module (455). The allow list may be obtained from an external electronic device (e.g., KMS (300)). The allow list may include information on at least one software application. For example, the information on the at least one software application may include at least one of authentication information of the software application or package information of the software application. For example, the authentication information may include a certificate (App cert) of the software application or a hashing value of the certificate (App cert Hash). For example, the package information may include at least one of a package name (App package name) or an application identifier (AID) of the software application.
[0087] In one embodiment, if the application (451) is different from at least one software application in the allowed list, the electronic device (101) may display a visual object to indicate that the application (451) is a disallowed software application. For example, the electronic device (101) may display the visual object through a display (e.g., the display module (160) of FIG. 1) in response to identifying that the application (451) is different from at least one software application in the allowed list. Specific details related thereto are described below in FIG. 7B.
[0088] According to one embodiment, when an application (451) is included in at least one software application of the allow list, the electronic device (101) may transmit package information and authentication information of the application (451) from the REE (210) to the TEE (220). For example, the REE (210) may provide package information and authentication information of the application (451) to the service TA (459) of the TEE (220).
[0089] According to one embodiment, the service TA (459), which has been provided with the package information and authentication information of the application (451), can read the identification information of the security element (230). For example, the service TA (459) can obtain the identification information from the security element (230). For example, the identification information can include a unique value of a security chip indicating the security element (230). The TEE (220) can generate a value for controlling access to the applet (260) based on the package information of the application (451), the authentication information of the application (451), and the identification information of the security element (230). For example, the service TA (459) of the TEE (220) can calculate an access rule for the applet (260) based on the package information, the authentication information, and the identification information. The above access rule may include a hashed value based on the package information, the authentication information, and the identification information.
[0090] According to one embodiment, the TEE (220) may transmit a command to the security element (230) to store the calculated access rule within the security element (230). For example, the service TA (459) may transmit the command including the access rule to the SD (250) using the secure channel (437). For example, the access rule may be included in the header of the command. For example, the command may be encrypted using the shared key (service TA-SD) between the service TA (459) and the SD (250). The security element (230) may decrypt the command using the shared key (service TA-SD) and store the access rule. For example, the applet (260) may store the access rule by decrypting the command based on the shared key (service TA-SD).
[0091] FIG. 5 illustrates an example of a method for injecting access rules based on identification information of a security element using an external electronic device according to one embodiment.
[0092] The electronic device (101) of FIG. 5 may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIG. 5 may include the REE (210), the TEE (220), and the security element (230) of FIG. 2. The same reference numerals may be used for the same description. For example, the KMS (300), which is an external electronic device of FIG. 5, may be understood to be substantially identical to the KMS (300), which is an external electronic device of FIG. 3A.
[0093] Referring to FIG. 5, according to one embodiment, the electronic device (101) may store a key shared with the KMS (300). For example, the shared key (KMS-SD) may be stored in the SD (250) of the electronic device (101). The electronic device (101) may connect to the KMS (300) to inject an access rule using the KMS (300). The electronic device (101) may identify an access rule injection request for the applet (260) in an application (501) for providing a specific service. For example, the access rule injection request may include an initial access to the applet (260) in the application (501). For example, the application (501) may include a service application for providing the specific service using the applet (260). The applet (260) may be referred to as a service applet associated with the service application.
[0094] According to one embodiment, the electronic device (101) may request the access rule from the KMS (300) using the KMS application (503) for managing the KMS (300) based on the injection request. For example, the REE (210) may, in response to identifying the injection request in the application (501), notify the KMS application (503) of the presence of the injection request. For example, the REE (210) may obtain identification information of the security element (230) (e.g., a unique value of the security chip of the security element (230)) based on the KMS API (505) that is associated with the KMS application (503) and defined for use by the applet (260). For example, the REE (210) may obtain package information of the application (501) (e.g., a package name (App Package name) or an application identifier (AID)). For example, REE (210) can transmit a request for the access rule including the package information and the identification information to KMS (300) using the KMS application (503).
[0095] According to one embodiment, the KMS (300) may identify whether the application (501) is included in at least one application of the allow list based on the request for the received access rule. For example, the KMS (300) may identify whether the package information for the application (501) is included in the allow list. If the application (501) is included in the at least one software application of the allow list, the KMS (300) may generate the access rule based on the authentication information of the application (501), the package information, and the identification information. The authentication information of the application (501) may already be registered in the KMS (300). For example, the authentication information may include a certificate of the application (501) or a hashed value of the certificate (App cert Hash). For example, the KMS (300) can calculate the access rule by hashing based on the authentication information, the package information, and the identification information. The access rule can be referenced as a value for controlling access to the applet (260). The KMS (300) can transmit the calculated access rule to the electronic device (101). For example, the KMS (300) can transmit a command, encrypted using the shared key (KMS-SD) and including the access rule, to the REE (210). The command can be a command for storing the access rule in the applet (260).
[0096] According to one embodiment, the electronic device (101) may transmit the received command to the security element (230). For example, the REE (210) may transmit the command to the security element (230) using the KMS API (505) called by the KMS application (503). The security element (230) may decrypt the command using the shared key (KMS-SD) and store the access rule. For example, the applet (260) may store the access rule by decrypting the command based on the shared key (KMS-SD).
[0097] Referring to FIGS. 4A to 5, the electronic device (101) can store an access rule, which is a value for controlling access to the applet (260), within the applet (260). For example, the electronic device (101) of FIGS. 4A and 4B can generate an access rule within a local area of the electronic device (101) (e.g., TEE (220)) using a shared key (service TA-SD) and inject the access rule into the applet (260). Alternatively, the electronic device (101) of FIG. 5 can obtain an access rule generated by an external electronic device (e.g., KMS (300)) connected through a network using a shared key (KMS-SD) and inject the access rule into the applet (260). The access rule injected (or stored) into the applet (260) may be used to control access to the applet (260) when an access attempt is made via a service application. In other words, the access rule may be a value for controlling access to the applet (260).
[0098] For convenience of explanation, in FIGS. 4A and 5, an applet (260) storing a single access rule for a single service application is illustrated as an example. However, the embodiments of the present disclosure are not limited thereto. For example, access rules for each of multiple service applications may be stored in the applet (260). Alternatively, the security element (230) may include multiple applets.
[0099] Hereinafter, in FIG. 6, an example is described of a method in which an electronic device (101) calculates an access rule for accessing an applet (260) in a secure environment (e.g., TEE (220)) and compares it with the stored access rule to execute the function of the applet (260).
[0100] FIG. 6 illustrates an example of a method for performing access to an applet using an access rule based on identification information of a security element according to one embodiment.
[0101] The electronic device (101) of FIG. 6 may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIG. 6 may include the REE (210), the TEE (220), and the security element (230) of FIG. 2. The same reference numerals may be used for the same description.
[0102] The electronic device (101) of FIG. 6 may have an access rule stored inside the applet (260) of the security element (230) according to the method of FIG. 4a and FIG. 4b or FIG. 5.
[0103] Referring to FIG. 6, according to one embodiment, the electronic device (101) may identify an event for accessing an applet (260) based on an application (601) for providing a specific service. For example, the application (601) may include a service application for providing the specific service using the applet (260). The applet (260) may be referred to as a service applet associated with the service application. For example, the REE (210) may be linked to the application (601) and may identify whether there is an attempt to access the applet (260) through an application programming interface (API) (603) defined for the use of the applet (260). For example, the API (603) may include an open mobile API or a security chip API defined for the secure element (230). The above access may be a non-initial access to the applet (260) via the API (603) using the application (601). In other words, the access rule related to the application (601) may already be stored within the applet (260). For example, identifying whether there is an attempt to access may refer to identifying an event for executing a function of the applet (260) within the security element (230) based on the application (601). The function may include at least one of generating or deleting a key, generating or verifying a signature, encrypting or decrypting data, or storing or deleting data. For example, by utilizing the above function, the storage or deletion of data for a transportation card or credit card, recharging the transportation card, or generating or deleting a car key may be performed.
[0104] According to one embodiment, the electronic device (101) may perform an integrity check of the electronic device (101) in response to identifying the access to the applet (260) via the API (603). For example, the REE (210) may perform the integrity check using the service module (605). The service module (605) may represent a module included in the electronic device (101) for utilizing the security element (230). For example, the integrity check may be performed based on the service module (605) of the REE (210) and the TA (hereinafter, referred to as integrity check TA) (607) for the integrity check of the TEE (220). The integrity check of the electronic device (101) may include checking status information of the electronic device (101). For example, the status information of the electronic device (101) may include root of trust (RoT) information. The above RoT information may include at least one of a verified boot state, information indicating whether the electronic device (101) is in a locked state, an operating system version (OS version), a patch time, or a patch level.
[0105] According to one embodiment, if the result of the integrity check is a failure, the electronic device (101) may restrict the use of the API (603). A failure in the integrity check may indicate a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal or has downloaded abnormal firmware, it may be identified that there is a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal, if a specific function (e.g., signing of specific data) is to be executed using a key generated within the security element (230), a command for executing the specific function to the security element (230) may not be transmitted due to a failure in the integrity check. The electronic device (101) may transmit information indicating that the result of the integrity check is a failure to the service provider (e.g., TMS) of the application (601). Additionally, the electronic device (101) may display a visual object to indicate that integrity verification has failed. For example, the electronic device (101) may display the visual object via a display (e.g., the display module (160) of FIG. 1). Specific details related thereto are described below in FIG. 7A.
[0106] According to one embodiment, if the result of the integrity check is successful, the electronic device (101) may perform an allow list check. A success of the integrity check may indicate that there is no problem with the integrity of the electronic device (101). For example, if the electronic device (101) is intact, the REE (210) may perform the allow list check using the service module (605). The allow list may be obtained from an external electronic device (e.g., KMS (300)). The allow list may include information on at least one software application. For example, the information on the at least one software application may include at least one of authentication information of the software application or package information of the software application. For example, the authentication information may include a certificate (App cert) of the software application or a hashing value of the certificate (App cert Hash). For example, the package information may include at least one of a package name (App Package name) or an application identifier (AID) of the software application.
[0107] In one embodiment, if the application (601) is different from at least one software application in the allowed list, the electronic device (101) may display a visual object to indicate that the application (601) is a disallowed software application. For example, the electronic device (101) may display the visual object through a display (e.g., the display module (160) of FIG. 1) in response to identifying that the application (601) is different from at least one software application in the allowed list. Specific details related thereto are described below in FIG. 7B.
[0108] According to one embodiment, when the application (601) is included in at least one software application of the allow list, the electronic device (101) may transmit the package information and authentication information of the application (601) from the REE (210) to the TEE (220). For example, the REE (210) may provide the package information and authentication information of the application (601) to the service TA (609) of the TEE (220).
[0109] According to one embodiment, the service TA (609), which has received the package information and authentication information of the application (601), can read the identification information of the security element (230). For example, the service TA (609) can obtain the identification information from the security element (230). Alternatively, for example, the service TA (609) can encrypt the identification information obtained from the security element (230) and store it in the memory of the REE (210), and, if necessary, obtain the identification information from the memory and decrypt it for reuse. The necessary case may include a case where the TEE (220) receives the package information and authentication information from the REE (210) in order to calculate the following access rules. For example, the identification information may include a unique value indicating the security element (230). The TEE (220) can generate a value for controlling access to the applet (260) based on the package information of the application (601), the authentication information of the application (601), and the identification information of the security element (230). For example, the service TA (609) of the TEE (220) can calculate an access rule for the applet (260) based on the package information, the authentication information, and the identification information. The calculated access rule can include a hashed value based on the package information, the authentication information, and the identification information.
[0110] According to one embodiment, the TEE (220) may transmit the calculated access rule to the security element (230) via a command for executing the function using an applet (260) within the security element (230). For example, the service TA (609) may transmit the command including the calculated access rule to the SD (250) via a secure channel (611). For example, the calculated access rule may be included in a header of the command. For example, the command may be encrypted via a shared key (service TA-SD) between the service TA (609) and the SD (250). The shared key (service TA-SD) may be injected (or stored) in advance during the manufacturing of the electronic device (101). The security element (230) can decrypt the command using the shared key (service TA-SD) and obtain the calculated access rule. For example, the applet (260) can identify the calculated access rule by decrypting the command based on the shared key (service TA-SD). The applet (260) can compare the calculated access rule with the stored access rule. For example, if the calculated access rule corresponds to the stored access rule, the applet (260) can execute the function according to the command. The applet (260) executing the function according to the command may include performing an operation according to the function requested by the permitted application (601) through the API (603). Alternatively, the applet (260) can ignore the command if the calculated access rule does not correspond to the stored access rule. In other words, the applet (260) can terminate the operation without executing the command if the calculated rule is different from the stored access rule.
[0111] As described above, the device and method according to the embodiment of the present disclosure can calculate an access rule, which is a value for accessing an applet, within a service TA (e.g., service TA (609)) of a secure environment (e.g., TEE (220)). Accordingly, the device and method according to the embodiment of the present disclosure can prevent access to an applet by an unauthorized application through falsification or modification of an access rule in a general environment, since the value is not exposed to a general environment (e.g., REE (210)).
[0112] In addition, the device and method according to the embodiment of the present disclosure, when transmitting an access rule from a service TA to a security element (e.g., a security element (230)), may transmit it through a command encrypted with a pre-shared key between the service TA and the security element. The command may include the access rule in a header. Accordingly, the device and method according to the embodiment of the present disclosure may reduce the risk of the access rule being exposed on the communication channel between the service TA (or TEE) and the security element.
[0113] In addition, unlike access rules that are composed of a hashed value of an application's certificate (App cert Hash) and have the same value regardless of the security element, the device and method according to the embodiment of the present disclosure can calculate access rules using authentication information (e.g., a certificate or a certificate hash value), package information (e.g., a package name), and identification information of the security element (e.g., a unique value of the security chipset). Accordingly, even for the same application, since different access rules are calculated for each security element, access to applets of the electronic device may be impossible through reuse of access rules acquired from another electronic device.
[0114] Additionally, when comparing the access rules calculated in the REE with the stored access rules, there may be a possibility of access to applets of unauthorized applications by bypassing the logic for the comparison. In contrast, the device and method according to the embodiment of the present disclosure can be performed within the security elements of the calculated and stored access rules. Accordingly, the device and method according to the embodiment of the present disclosure can prevent access to applets by bypassing the logic for comparing the access rules by utilizing hardware-level security (H / W security level).
[0115] FIG. 7A illustrates an example of a visual object displayed according to the results of an integrity check of an electronic device according to one embodiment. FIG. 7B illustrates an example of a visual object displayed according to the results of an allow list check of a software application according to one embodiment.
[0116] The electronic device (101) of FIGS. 7A and 7B may include at least a portion of the electronic device (101) of FIG. 2. For example, the electronic device (101) of FIGS. 7A and 7B may perform operations based on the REE (210) and the TEE (220) and the security element (230) of FIG. 2. For example, the display (160) of FIGS. 7A and 7B may include at least a portion of the display module (160) of the electronic device (101) of FIG. 1. The same reference numerals may be used for the same description.
[0117] Referring to FIGS. 7A and 7B , according to one embodiment, the electronic device (101) may display a user interface of a service application through a screen of the display (160). For example, the service application may include the application (451) of FIG. 4B , the application (501) of FIG. 5 , or the application (601) of FIG. 6 . For example, the user interface may include a visual object (700) for generating a car key through the service application. For example, the service application of FIGS. 7A and 7B may represent a service application that may provide a function for managing a car key. However, the embodiments of the present disclosure are not limited thereto. The electronic device (101) may identify an input (710) to the visual object (700). For example, the input (710) may include a touch input to the screen by a user of the electronic device (101). Accordingly, the electronic device (101) can identify, based on the service application, that there is an attempt to access an applet associated with the service application in order to execute the function. Identifying whether there is an attempt to access may indicate identifying an event for executing the function of the applet within the secure element based on the service application.
[0118] Referring to FIG. 7A, according to one embodiment, the electronic device (101) may display a visual object (720) to indicate that integrity verification has failed. For example, the visual object (720) may display a notification including the text "Integrity verification failed."
[0119] For example, the electronic device (101) may perform an integrity check of the electronic device (101) in response to identifying the access to the applet through the API called using the service application. For example, the electronic device (101) may perform the integrity check using a service module (e.g., the service module (605) of FIG. 6) within the REE associated with the service application. For example, the electronic device (101) may perform the integrity check of the electronic device (101) using an integrity check TA (e.g., the integrity check TA (607) of FIG. 6) of the TEE based on the service module. The integrity check of the electronic device (101) may include checking status information of the electronic device (101). For example, the status information of the electronic device (101) may include root of trust (RoT) information. The RoT information may include at least one of a verified boot state, information indicating whether the electronic device (101) is in a locked state, an operating system version (OS version), a patch point, or a patch level. If the result of the integrity check is a failure, the electronic device (101) may restrict the use of the API. A failure of the integrity check may indicate a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal or has downloaded abnormal firmware, it may be identified as a problem with the integrity of the electronic device (101).For example, if the electronic device (101) is a rooted terminal, and a specific function (e.g., signing of specific data) is to be executed using a key generated within the security element, a command for executing the specific function to the security element may not be transmitted based on a failure of the integrity check. For example, the electronic device (101) may transmit information indicating that the result of the integrity check is a failure to the service provider (e.g., TMS) of the service application. For example, the electronic device (101) may display a visual object (720) through the screen of the display (160) to inform the user of the failure of the integrity check.
[0120] Referring to FIG. 7B, the electronic device (101) may display a visual object (730) to indicate that the application is not permitted. For example, the visual object (730) may display a notification including the text "This is a not permitted application."
[0121] According to one embodiment, if the result of the integrity check is successful, the electronic device (101) may perform an allow list check. The success of the integrity check may indicate that there is no problem with the integrity of the electronic device (101). For example, if the electronic device (101) is intact, the REE (e.g., REE (210)) of the electronic device (101) may perform the allow list check using a service module (e.g., service module (605) of FIG. 6). The allow list may be obtained from an external electronic device (e.g., KMS (300)). The allow list may include information on at least one software application. For example, the information on the at least one software application may include at least one of authentication information of the software application or package information of the software application.
[0122] In one embodiment, if the service application is different from the at least one software application in the allowed list, the electronic device (101) may display a visual object (730) to inform the user that the service application is a non-allowed software application. For example, the electronic device (101) may display the visual object (730) through the display (160) in response to identifying that the application is different from the at least one software application in the allowed list.
[0123] FIG. 8a illustrates an example of an operation flow for injecting an access rule based on identification information of a security element according to one embodiment.
[0124] The processor (120) of FIG. 8A may include at least a portion of the processor (120) of FIG. 2. For example, the processor (120) may include an REE (210) and a TEE (220). The secure element (SE) (230) of FIG. 8A may include at least a portion of the secure element (230) of FIG. 2. The processor (120) and the secure element (230) of FIG. 8A may be included in the electronic device (101) of FIG. 2. The external electronic device (300 or 400) of FIG. 8A may include a KMS (300) of FIG. 3A, an HSM (400) of FIG. 4A, and a KMS (500) of FIG. 5.
[0125] FIG. 8A illustrates examples (800, 830) of a method for injecting an access rule into an applet of a security element (230). Example (800) illustrates a method in which an electronic device (101) injects the access rule using the local area, as in FIGS. 4A and 4B . In example (800), the external electronic device (300 or 400) may be an HSM (400). Example (830) illustrates a method in which an electronic device (101) injects the access rule using an external electronic device (300 or 400), as in FIG. 5 . In example (830), the external electronic device (300 or 400) may be a KSM (300).
[0126] Referring to example (800), in operation (801), the processor (120) may generate a security element key (SEK) for providing a service related to the security element (230) of the electronic device (101). For example, the TEE (220) may generate the security element key using a TA. The security element key may also be referred to as an embedded SEK (eSEK). The security element key may be associated with a sub-CA (certificate authority) for providing a service related to the security element (230) of the electronic device (101). In addition, the processor (120) may generate a request (certificate signing request (CSR)) for generating a signature value for the security element key. For example, the TEE (220) may generate the CSR using a TA.
[0127] In operation (803), the processor (120) may transmit the CSR to the HSM (400), which is an external electronic device used for injecting keys and certificates during the process of the electronic device (101). For example, the TEE (220) may transmit the CSR to the HSM (400) using the TA. By transmitting the CSR, the electronic device (101) may request a certificate for the security element key.
[0128] In operation (805), the HSM (400) may transmit the first certificate to the electronic device (101). For example, the HSM (400) may perform a signature using the CSR and the root key of the security element key. The HSM (400) may generate a first certificate for the security element key based on the signature. The security element key may be a key chained to the root key. Accordingly, the HSM (400) may transmit the first certificate to the TEE (220) of the electronic device (101) (or the TA of the TEE (220)).
[0129] In operation (807), the processor (120) may generate a subkey of the secure element key and a second certificate for the subkey. For example, the TEE (220) may generate the subkey and the second certificate using a TA. For example, the subkey may include an eSE SCP11 key. The electronic device (101) may perform a signature on the second certificate using the secure element key authenticated based on the first certificate. For example, the subkey may be an asymmetric key paired with an SCP11 key, which is a key for managing a subdomain of the secure element (230) (e.g., AMSD or DMSD (240) of FIG. 2). The subkey may be a key chained to the secure element key. In other words, the root key, the secure element key, and the subkey may be chained.
[0130] In operation (809), the processor (120) may perform verification with the security element (230). For example, the TA and the subdomain (e.g., AMSD or DMSD (240) of FIG. 2) of the TEE (220) may use the subkey and the SCP11 key to calculate a shared secret value for mutual verification. For example, the TA may use the subkey to calculate the shared secret value. For example, the AMSD or DMSD (240) may use the SCP11 key to calculate the shared secret value. If the calculation of the common shared secret value is successful, a secure channel may be created. The secure channel may include a secure session. In addition, the AMSD or DMSD (240) may use the public key for the root key to perform chain verification for the first certificate and the second certificate based on the SCP11 protocol.
[0131] In operation (811), the processor (120) may inject a shared key (service TA-SD) into a subdomain of the secure element (230) (e.g., SD (250) of FIG. 2) using the secure channel. For example, the TEE (220) may generate the shared key (service TA-SD) using the TA. The shared key (service TA-SD) may be transferred from the TEE (220) to the secure element (230). For example, the shared key (service TA-SD) may be transferred from the TA to the SD (250). The shared key (service TA-SD) transferred to the SD (250) may be stored in the SD (250). The shared key (service TA-SD) may also be used to activate the secure channel. For example, the TA can activate the secure channel using the shared key (service TA-SD) and communicate with the SD (250).
[0132] Before the operation (813) is performed, the electronic device (101) may identify an event for accessing the applet (260) of FIG. 2 based on a service application for providing a specific service. For example, the service application may include an application for providing the specific service using an applet. The applet may be referred to as a service applet associated with the service application. For example, the REE (210) may be associated with the service application and may identify whether there is an attempt to access the service applet through an application programming interface (API) defined for using the service applet. For example, the API may include an open mobile API or a security chip API defined for the secure element (230). The access may be an initial access to the service applet through the API using the service application.
[0133] In operation (813), the processor (120) may perform an integrity check. For example, the integrity check may be performed based on a service module of the REE (210) (e.g., the service module (455) of FIG. 4B) and a TA for integrity check of the TEE (220) (e.g., the integrity check TA (457) of FIG. 4B). For example, the processor (120) may perform an integrity check of the electronic device (101) when there is an initial access to the service applet through the API. For example, the REE (210) may perform the integrity check using the service module. The service module (455) may represent a module included in the electronic device (101) for utilizing the security element (230). The integrity check of the electronic device (101) may include checking status information of the electronic device (101). For example, the status information of the electronic device (101) may include RoT (root of trust) information. The RoT information may include at least one of a verified boot state, information indicating whether the electronic device (101) is in a locked state, an operating system version (OS version), a patch point, or a patch level.
[0134] If the result of the integrity check according to operation (813) is a failure, the processor (120) may restrict the use of the API. A failure in the integrity check may indicate a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal or has downloaded abnormal firmware, it may be identified that there is a problem with the integrity of the electronic device (101). For example, the electronic device (101) may transmit information indicating that the result of the integrity check is a failure to the service provider (e.g., TMS) of the service application. In addition, the electronic device (101) may display a visual object (e.g., visual object (730) of FIG. 7A) to indicate that the integrity check has failed.
[0135] If the result of the integrity check according to operation (813) is successful, the processor (120) may perform an allow list check in operation (815). For example, the REE (210) may check whether the service application is included in the allow list. A successful result of the integrity check may indicate that there is no problem with the integrity of the electronic device (101). For example, if the electronic device (101) is intact, the REE (210) may perform the allow list check using the service module. The allow list may be obtained from an external electronic device (e.g., KMS (300)). The allow list may include information on at least one software application. For example, the information on the at least one software application may include at least one of authentication information of the software application or package information of the software application. For example, the authentication information may include a certificate of the software application or a hashing value of the certificate. For example, the package information may include at least one of a package name or an application identifier (AID) of the software application.
[0136] If the service application is different from at least one software application in the allowed list, the processor (120) may display a visual object (e.g., a visual object (730) of FIG. 7b) to indicate that the service application is a non-allowed software application.
[0137] In operation (815), the processor (120) may transmit authentication information and package information from the REE (210) to the TEE (220). For example, the REE (210) may transmit the authentication information and the package information to the TEE (220) if the service application is included in at least one software application of the allow list. For example, the REE (210) may provide the package information and the authentication information to the service TA of the TEE (220).
[0138] In operation (819), the processor (120) may obtain identification information from the secure element (230). For example, the TEE (220) may obtain the identification information. For example, the identification information may include a unique value indicating the secure element (230). For example, the TEE (220) may obtain the identification information from the secure element (230) using the service TA. Alternatively, for example, the TEE (220) may encrypt the identification information obtained from the secure element (230) using the service TA and store it in the memory of the REE (210), and, if necessary, obtain the identification information from the memory and decrypt it for reuse. The necessary case may include a case where the TEE (220) receives the package information and authentication information from the REE (210) in order to calculate the following access rule. However, the embodiments of the present disclosure are not limited thereto. For example, in FIG. 8A, operation (819) is depicted as being performed after operation (817), but operation (819) may be performed concurrently with or before operation (817).
[0139] In operation (821), the processor (120) may generate an access rule. For example, the TEE (220) may generate a value for controlling access to the service applet based on the package information, the authentication information, and the identification information of the security element (230). For example, the service TA of the TEE (220) may calculate an access rule for the service applet based on the package information, the authentication information, and the identification information. The calculated access rule may include a hashed value based on the package information, the authentication information, and the identification information.
[0140] In operation (823), the processor (120) may transmit the calculated access rule to the security element (230). For example, the TEE (220) may transmit a command to the security element (230) to store the calculated access rule in the security element (230). For example, the TEE (220) may transmit the command including the access rule to a subdomain of the security element (230) (e.g., the SD (250) of FIG. 2) through a secure channel using the service TA. For example, the access rule may be included in the header of the command. For example, the command may be encrypted using the shared key (service TA-SD) between the service TA and the SD (250).
[0141] In operation (825), the security element (230) can store the access rule. For example, the applet (260) can store the access rule by decrypting the command based on the shared key (service TA-SD).
[0142] Referring to example (830), the electronic device (101) may store a key shared with the KMS (300). For example, the shared key (KMS-SD) may be stored in a subdomain of the security element (230) of the electronic device (101) (e.g., SD (250) of FIG. 2).
[0143] Before operation (831) is performed, the electronic device (101) may connect to the KMS (300) to inject access rules using the KMS (300). The electronic device (101) may identify a request for injecting access rules for a service applet in a service application for providing a specific service. For example, the request for injecting access rules may include the initial access to the service applet in the service application.
[0144] In operation (831), the processor (120) may obtain identification information from the security element (230). For example, the REE (210) may, in response to identifying the injection request in the service application, notify the KMS application of the presence of the injection request. For example, the REE (210) may obtain the identification information of the security element (230) based on the KMS API, which is associated with the KMS application and defined for use of the service applet. In addition, the REE (210) may obtain package information of the service application.
[0145] In operation (833), the processor (120) may transmit package information and identification information to the KMS (300). For example, the REE (210) may transmit a request for the access rule including the package information and the identification information to the KMS (300) using the KMS application (503) of FIG. 5.
[0146] In operation (835), the KMS (300) may generate the access rule. For example, the KMS (300) may identify whether the service application is included in at least one application in the allow list based on the received access rule request. For example, the KMS (300) may identify whether the package information for the service application is included in the allow list. If the service application is included in the at least one software application in the allow list, the KMS (300) may generate the access rule based on the authentication information of the service application, the package information, and the identification information. The authentication information of the service application may already be registered in the KMS (300). For example, the authentication information may include a certificate of the service application or a hashed value of the certificate. For example, KMS (300) can calculate the access rule by hashing based on the authentication information, the package information, and the identification information. The access rule can be referenced as a value for controlling access to the service applet.
[0147] In operation (837), the KMS (300) may transmit the calculated access rule to the processor (120). For example, the KMS (300) may transmit a command, encrypted using the shared key (KMS-SD) and including the access rule, to the REE (210). The command may be a command for storing the access rule in the service applet.
[0148] In operation (839), the processor (120) may transmit an access rule to the security element (230). For example, the REE (210) may transmit the command to the security element (230) using the KMS API called using the KMS application.
[0149] In operation (841), the security element (230) can store the access rule. For example, the service applet can store the access rule by decrypting the command based on the shared key (KMS-SD).
[0150] FIG. 8b illustrates an example of an operation flow for performing access to an applet using an access rule based on identification information of a security element according to one embodiment.
[0151] The processor (120) of FIG. 8B may include at least a portion of the processor (120) of FIG. 2. For example, the processor (120) may include an REE (210) and a TEE (220). The security element (SE) (230) of FIG. 8B may include at least a portion of the security element (230) of FIG. 2. The processor (120) and the security element (230) of FIG. 8B may be included in the electronic device (101) of FIG. 2.
[0152] FIG. 8b illustrates an example of a method for accessing an applet and executing a function using an access rule calculated in a TEE (220). The electronic device (101) of FIG. 8b may have access rules stored within the service applet of the security element (230), according to the examples (800, 830) of FIG. 8a.
[0153] Referring to FIG. 8B, in operation (851), the processor (120) may execute an application. For example, the application may be referred to as a service application for providing a specific service. For example, the REE (210) may identify an event for accessing the service applet based on the service application. For example, the REE (210) may identify whether there is an attempt to access the service applet through an application programming interface (API) defined for use of the service applet and linked to the service application. For example, the API may include an open mobile API or a security chip API defined for a security element (230). The access may be a non-initial access to the service applet through the API using the service application. In other words, the service applet may already have the access rule related to the service application stored therein. For example, identifying whether an access attempt exists may indicate identifying an event for executing a function of the service applet within the security element (230), based on the service application. The function may include at least one of key generation or deletion, signature generation or verification, data encryption or decryption, or data storage or deletion. For example, through the use of the function, data storage or deletion for a transportation card or credit card, recharging of the transportation card, or generation or deletion of a car key may be performed.
[0154] In operation (853), the processor (120) may perform an integrity check. For example, the processor (120) may perform an integrity check in response to identifying the access to the service applet through the API. For example, the integrity check may be performed based on the service module of the REE (210) and the integrity check TA of the TEE (220). For example, the service module may include the service module (605) of FIG. 6. For example, the integrity check TA may include the integrity check TA (607) of FIG. 6. The integrity check of the electronic device (101) may include checking status information of the electronic device (101). For example, the status information of the electronic device (101) may include root of trust (RoT) information. The above RoT information may include at least one of a verified boot state, information indicating whether the electronic device (101) is in a locked state, an operating system version (OS version), a patch time, or a patch level.
[0155] If the result of the integrity check according to operation (853) is a failure, the processor (120) may restrict the use of the API. A failure in the integrity check may indicate a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal or has downloaded abnormal firmware, it may be identified that there is a problem with the integrity of the electronic device (101). For example, the electronic device (101) may transmit information indicating that the result of the integrity check is a failure to the service provider (e.g., TMS) of the service application. In addition, the electronic device (101) may display a visual object (e.g., visual object (730) of FIG. 7A) to indicate that the integrity check has failed.
[0156] If the result of the integrity check according to operation (853) is successful, the processor (120) may perform an allow list check in operation (855). For example, the REE (210) may check whether the service application is included in the allow list. A successful result of the integrity check may indicate that there is no problem with the integrity of the electronic device (101). For example, if the electronic device (101) is intact, the REE (210) may perform the allow list check using the service module. The allow list may be obtained from an external electronic device (e.g., KMS (300)). The allow list may include information on at least one software application. For example, the information on the at least one software application may include at least one of authentication information of the software application or package information of the software application. For example, the authentication information may include a certificate of the software application or a hashing value of the certificate. For example, the package information may include at least one of a package name or an application identifier (AID) of the software application.
[0157] If the service application is different from at least one software application in the allowed list, the processor (120) may display a visual object (e.g., a visual object (730) of FIG. 7b) to indicate that the service application is a non-allowed software application.
[0158] In operation (857), the processor (120) may transmit authentication information and package information from the REE (210) to the TEE (220). For example, the REE (210) may transmit the authentication information and the package information to the TEE (220) if the service application is included in at least one software application of the allow list. For example, the REE (210) may provide the package information and the authentication information to the service TA of the TEE (220).
[0159] In operation (859), the processor (120) may obtain identification information from the secure element (230). For example, the TEE (220) may obtain the identification information. For example, the identification information may include a unique value indicating the secure element (230). For example, the TEE (220) may obtain the identification information from the secure element (230) using the service TA. Alternatively, for example, the TEE (220) may encrypt the identification information obtained from the secure element (230) using the service TA and store it in the memory of the REE (210), and, if necessary, obtain the identification information from the memory and decrypt it for reuse. The necessary case may include a case where the TEE (220) receives the package information and authentication information from the REE (210) in order to calculate the following access rule. However, the embodiments of the present disclosure are not limited thereto. For example, in FIG. 8B, operation (859) is depicted as being performed after operation (857), but operation (859) may be performed concurrently with or before operation (857).
[0160] In operation (861), the processor (120) may generate an access rule. For example, the TEE (220) may generate a value for controlling access to the service applet based on the package information, the authentication information, and the identification information. For example, the service TA of the TEE (220) may calculate an access rule for the service applet based on the package information, the authentication information, and the identification information. The calculated access rule may include a hashed value based on the package information, the authentication information, and the identification information.
[0161] In operation (863), the processor (120) may transmit the calculated access rule to the security element (230). For example, the TEE (220) may transmit a command to the security element (230) to store the calculated access rule in the security element (230). For example, the TEE (220) may transmit the command including the access rule to a subdomain of the security element (230) (e.g., the SD (250) of FIG. 2) through a secure channel using the service TA. For example, the access rule may be included in a header of the command. For example, the command may be encrypted using the shared key (service TA-SD) between the service TA and the SD (250). The shared key (service TA-SD) may be injected (or stored) in advance during the manufacturing of the electronic device (101).
[0162] In operation (865), the security element (230) can compare the stored access rule with the calculated access rule. For example, the service applet can identify the calculated access rule by decrypting the command based on the shared key (service TA-SD). The service applet can compare the calculated access rule with the stored access rule.
[0163] In operation (867), the security element (230) may execute the function of the applet. For example, the service applet may execute the function according to the command if the calculated access rule corresponds to the stored access rule. The service applet may execute the function according to the command including performing an operation according to the function requested by the permitted service application through the API. Alternatively, the service applet may ignore the command if the calculated access rule does not correspond to the stored access rule. In other words, the service applet may terminate the operation without executing the command if the calculated rule is different from the stored access rule.
[0164] FIG. 9 illustrates an example flowchart for a method of controlling access to an applet of a security element according to one embodiment.
[0165] The method of FIG. 9 may be performed by the electronic device (101) of FIG. 2. For example, the method may be performed by the processor (120) and the security element (230) of FIG. 2. For example, the method may be controlled by the processor (120) of FIG. 2. For example, the processor (120) may include an REE (210) and a TEE (220).
[0166] In the following examples, the operations may be performed sequentially, but are not necessarily sequential. For example, the order of the operations may be changed, and at least two operations may be performed in parallel.
[0167] Referring to FIG. 9, in operation (910), the processor (120) may identify an event for executing a function of an applet within the security element (230) based on a software application. For example, the software application may include a software application for providing a specific service. For example, the software application may include the application (451) of FIG. 4B, the application (501) of FIG. 5, or the application (501) of FIG. 6. The software application may be referred to as a service application. The applet may be referred to as a service applet associated with the service application.
[0168] According to one embodiment, the REE (210) within the processor (120) may identify an event for executing a function of the applet based on the software application. For example, the event may be identified based on an input to the electronic device (101). For example, identifying the event may include identifying whether an attempt to access the applet exists. For example, the REE (210) may identify whether an attempt to access the applet exists through an application programming interface (API) that is associated with the software application and defined for use of the applet. For example, the API may include an open mobile API or a security chip API defined for the secure element (230). The access may be a non-initial access to the applet through the API using the software application. In other words, the applet may already have the access rule associated with the software application stored therein.
[0169] For example, the above function may include at least one of key generation or deletion, signature generation or verification, data encryption or decryption, or data storage or deletion. For example, the above function may be used to store or delete data for a transportation card or credit card, recharge the transportation card, or generate or delete a car key.
[0170] In operation (920), the processor (120) may transmit authentication information and package information from the REE (210) to the TEE (220). For example, the REE (210) may transmit the authentication information and the package information to the TEE (220). For example, the authentication information may include a certificate of the software application or a hash value of the certificate. For example, the package information may include at least one of a package name or an application identifier (AID) of the software application.
[0171] According to one embodiment, before the processor (120) transmits the authentication information and the package information from the REE (210) to the TEE (220), the processor (120) may perform an integrity check. For example, the processor (120) may perform an integrity check in response to identifying the access to the applet through the API. For example, the integrity check may be performed based on a service module of the REE (210) and an integrity check TA of the TEE (220). The integrity check of the electronic device (101) may include checking status information of the electronic device (101). For example, the status information of the electronic device (101) may include root of trust (RoT) information. The above RoT information may include at least one of a verified boot state, information indicating whether the electronic device (101) is in a locked state, an operating system version (OS version), a patch time, or a patch level.
[0172] According to one embodiment, if the result of the integrity check is a failure, the processor (120) may restrict the use of the API. A failure in the integrity check may indicate a problem with the integrity of the electronic device (101). For example, if the electronic device (101) is a rooted terminal or has downloaded abnormal firmware, it may be identified that there is a problem with the integrity of the electronic device (101). For example, the electronic device (101) may transmit information indicating that the result of the integrity check is a failure to the service provider (e.g., TMS) of the software application. In addition, the electronic device (101) may display a visual object (e.g., the visual object (730) of FIG. 7A) to indicate that the integrity check has failed.
[0173] According to one embodiment, if the result of the integrity check is successful, the processor (120) may perform an allow list check. For example, the REE (210) may check whether the software application is included in the allow list. A successful result of the integrity check may indicate that there is no problem with the integrity of the electronic device (101). For example, if the electronic device (101) is intact, the REE (210) may perform the allow list check using the service module. The allow list may be obtained from an external electronic device (e.g., KMS (300)). The allow list may include information about at least one software application. For example, the information about the at least one software application may include at least one of authentication information of the software application or package information of the software application. For example, REE (210) may transmit the authentication information and the package information to TEE (220) if the software application is included in at least one software application of the allow list. For example, REE (210) may provide the package information and the authentication information to the service TA of TEE (220).
[0174] In one embodiment, if the software application is different from at least one software application in the allowed list, the processor (120) may display a visual object (e.g., visual object (730) of FIG. 7b) to indicate that the software application is a non-allowed software application.
[0175] According to one embodiment, the processor (120) may obtain identification information from the secure element (230). For example, the TEE (220) may obtain the identification information. For example, the identification information may include a unique value indicating the secure element (230). For example, the TEE (220) may obtain the identification information from the secure element (230) using the service TA. Alternatively, for example, the TEE (220) may encrypt the identification information obtained from the secure element (230) using the service TA and store it in the memory of the REE (210), and, if necessary, obtain the identification information from the memory and decrypt it for reuse. The necessary case may include a case where the TEE (220) receives the package information and authentication information from the REE (210) in order to calculate the following access rule. However, the embodiments of the present disclosure are not limited thereto.
[0176] In operation (930), the processor (120) may generate a value for controlling access to the applet on the TEE (220). The value for controlling access to the applet may be referenced as an access rule calculated in the TEE (220). For example, the TEE (220) may generate a value for controlling access to the applet based on the package information, the authentication information, and the identification information. For example, the service TA of the TEE (220) may calculate an access rule for the applet based on the package information, the authentication information, and the identification information. The calculated access rule may include a hashed value based on the package information, the authentication information, and the identification information.
[0177] In operation (940), the processor (120) may execute the function of the applet based on the value. For example, the processor (120) may transmit the value to the security element (230), and if the value corresponds to another value within the security element (230), the processor (120) may control execution of the function of the applet. The other value may refer to a stored access rule, which is a value for controlling access to the applet stored in advance within the security element (230). For example, the other value, the stored access rule, may be generated and stored based on the local area of the electronic device (101) described in FIGS. 4A and 4B. Alternatively, the other value, the stored access rule, may be generated and stored based on an external electronic device (e.g., KMS (300)) connected to the electronic device (101) described in FIG. 5.
[0178] According to one embodiment, the processor (120) may transmit the calculated access rule to the security element (230). For example, the TEE (220) may transmit a command to the security element (230) to store the calculated access rule in the security element (230). For example, the TEE (220) may transmit the command including the access rule to a subdomain of the security element (230) (e.g., the SD (250) of FIG. 2) through a secure channel using the service TA. For example, the access rule may be included in a header of the command. For example, the command may be encrypted using a shared key (service TA-SD) between the service TA and the SD (250). The shared key (service TA-SD) may be injected (or stored) in advance during the manufacturing of the electronic device (101).
[0179] In one embodiment, the security element (230) can compare the stored access rule with the calculated access rule. For example, the applet can identify the calculated access rule by decrypting the command based on the shared key (service TA-SD). The applet can compare the calculated access rule with the stored access rule.
[0180] In one embodiment, the security element (230) can execute a function of an applet. For example, the applet can execute the function according to the command if the calculated access rule corresponds to the stored access rule. The applet, executing the function according to the command, may include performing an operation according to the function requested by the authorized software application through the API. Alternatively, the applet can ignore the command if the calculated access rule does not correspond to the stored access rule. In other words, the applet can terminate the operation without executing the command if the calculated rule is different from the stored access rule.
[0181] As described above, the electronic device (101) may include a processor (120). The electronic device (101) may include a security element (230). The processor (120) may be configured to identify an event for executing a function of an applet in the security element (230) based on a software application. The processor (120) may be configured to transfer, based on the identified event, certification information of the software application and package information of the software application from a rich execution environment (REE) of the processor (120) to a trusted execution environment (TEE) of the processor (120). The processor (120) may be configured to generate, on the TEE, a value for controlling access to the applet based on the identification information of the security element (230), the authentication information, and the package information obtained from the security element (230). The processor (120) may be configured to execute the function based on the value.
[0182] According to one embodiment, the processor (120) may be configured to transmit an encrypted command from the TEE to the secure element (230) based on a shared key between the TEE and the secure element (230), stored within the secure element (230). The command may include the value. The processor (120) may be configured to execute the function based on the secure element (230) in response to the value corresponding to another value for controlling access to the applet, stored in the secure element (230).
[0183] In one embodiment, the value may be included in the header of the command. The command may request the execution of the function of the applet, which is transmitted through a secure channel between the TEE and the secure element (230).
[0184] According to one embodiment, the processor (120) may be configured to execute another software application for a key management system (KMS) (300) connected to the electronic device (101) to store the other value in the security element (230). The processor (120) may be configured to obtain the package information of the software application and the identification information of the security element (230) using the executed other software application. The processor (120) may be configured to transmit the obtained package information and the obtained identification information to the KMS (300). The processor (120) may be configured to transmit another command for storing the other value obtained from the KMS (300) to the security element (230).
[0185] In one embodiment, the other command may be encrypted based on another shared key between the KMS and the security element (230). The other value may be stored in the security element (230) by decrypting the other command based on the other shared key within the security element (230).
[0186] According to one embodiment, the processor (120) may be configured to, based on the software application, identify whether the electronic device (101) has integrity in response to an initial access to the applet. The processor (120) may be configured to, in response to identifying that the electronic device (101) has integrity, identify whether the software application is included in an allow list. The processor (120) may be configured to, in response to the software application being included in the allow list, generate the other value on the TEE based on the identification information, the authentication information, and the package information. The processor (120) may be configured to transmit another command to the secure element (230) for storing the other value, the other value being encrypted based on the shared key and including the other value.
[0187] According to one embodiment, the other value may be stored in the secure element (230) by decrypting the other command within the secure element (230) based on the shared key.
[0188] According to one embodiment, the processor (120) may be configured to generate a security element key (SEK) for providing a service related to the security element (230) and a request for a signature for the security element (230) key. The processor (120) may be configured to transmit the security element (230) key and the request to a hardware security module (HSM) (400). The processor (120) may be configured to obtain a first certificate for the security element (230) key from the HSM (400). The processor (120) may be configured to generate a sub-key chained to the security element (230) key and a second certificate for the sub-key.
[0189] According to one embodiment, the processor (120) may be configured to perform verification on an asymmetric key associated with the subkey in a first security domain within the security element (230) using the subkey. The processor (120) may be configured, in response to a successful verification, to store the shared key in a second security domain, which is a subdomain of the first security domain. Verification of the asymmetric key may include verification between a first shared value generated using the subkey and a second shared value generated using the asymmetric key, based on the first certificate and the second certificate.
[0190] According to one embodiment, the authentication information may include a hashed value of a certificate of the software application or at least one of the certificates. The package information may include the package name of the software application. For example, the package name may include an application identifier (AID). The identification information may include a unique value indicating the security element (230).
[0191] According to one embodiment, the value generated on the TEE may be hashed based on the hashed value or the certificate, the package name, and the unique value.
[0192] According to one embodiment, the processor (120) may be configured to, in response to the event, identify whether the electronic device (101) has integrity. The processor (120) may be configured to, in response to identifying that the electronic device (101) has integrity, identify whether the software application is included in an allow list. The authentication information and the package information may be transmitted from the REE to the TEE in response to the software application being included in the allow list. The allow list may be obtained from a key management system (KMS) (300) connected to the electronic device (101) and may include information about at least one software application.
[0193] According to one embodiment, the processor (120) may be configured to, in response to the electronic device (101) identifying that the integrity is not present, display a visual object on the display of the electronic device (101) to indicate that the integrity verification has failed.
[0194] According to one embodiment, the processor (120) may be configured to, in response to identifying that the software application is different from at least one software application in the allowed list, display a visual object on the display of the electronic device (101) to indicate that the software application is a non-allowed software application.
[0195] In one embodiment, the function may be linked to the software application and requested through an application programming interface (API) defined for use by the applet. The function may include at least one of key generation or deletion, signature generation or verification, data encryption or decryption, or data storage or deletion.
[0196] As described above, the method performed by the electronic device (101) may include an operation of identifying an event for executing a function of an applet in a security element (230) of the electronic device (101) based on a software application. The method may include an operation of transmitting, based on the identified event, certification information of the software application and package information of the software application from a rich execution environment (REE) to a trusted execution environment (TEE). The method may include an operation of generating, on the TEE, a value for controlling access to the applet based on the identification information of the security element (230), the authentication information, and the package information obtained from the security element (230). The method may include an operation of executing the function based on the value.
[0197] In one embodiment, the method may include transmitting an encrypted command from the TEE to the secure element (230) based on a shared key between the TEE and the secure element (230), stored within the secure element (230). The command may include the value. Based on the secure element (230), another value stored in the secure element (230) for controlling access to the applet may include executing the function in response to the value corresponding to the value.
[0198] According to one embodiment, the method may comprise executing another software application for a key management system (KMS) connected to the electronic device (101) in order to store the other value in the secure element (230), in response to an input for the software application. The method may include an operation of obtaining the package information of the software application and the identification information of the secure element (230) using the executed other software application. The method may include an operation of transmitting the obtained package information and the obtained identification information to the KMS. The method may include an operation of transmitting another command for storing the other value obtained from the KMS to the secure element (230).
[0199] In one embodiment, the other command may be encrypted based on another shared key between the KMS and the security element (230). The other value may be stored in the security element (230) by decrypting the other command based on the other shared key within the security element (230).
[0200] As described above, the electronic device (101) may include a memory (130). The electronic device (101) may include at least one processor (120) including a security element (230). When executed by the at least one processor (120), the memory (130) may include one or more instructions that cause the at least one processor (120) to identify an event for executing a function of an applet within the security element (230) of the electronic device (101) based on a software application. When executed by the at least one processor (120), the memory (130) may include one or more instructions that cause the at least one processor (120) to transfer, based on the identified event, certification information of the software application and package information of the software application from a rich execution environment (REE) to a trusted execution environment (TEE). When executed by the at least one processor (120), the memory (130) may include one or more instructions that cause the at least one processor (120) to generate, on the TEE, a value for controlling access to the applet based on the identification information of the secure element (230), the authentication information, and the package information obtained from the secure element (230). When executed by the at least one processor (120), the memory (130) may include one or more instructions that cause the at least one processor (120) to execute the function based on the value.
[0201] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.
[0202] The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another component (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0203] The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0204] Various embodiments of the present document may be implemented as software (e.g., a program (140)) including one or more instructions stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101)). For example, a processor (e.g., a processor (120)) of the machine (e.g., an electronic device (101)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0205] According to one embodiment, the method according to various embodiments disclosed in this document may be provided as included in a computer program product. The computer program product may be traded as a commodity between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0206] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and arranged in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.
Claims
1. In an electronic device (101), At least one processor (120) comprising a processing circuit; and security element (230); and A memory (130) including one or more storage media and storing instructions, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: Based on the software application, an event for executing the function of the applet within the security element (230) is identified, Based on the identified event, the certification information of the software application and the package information of the software application are transmitted from the REE (rich execution environment) of the at least one processor (120) to the TEE (trusted execution environment) of the at least one processor (120). Based on the identification information of the security element (230), the authentication information, and the package information obtained from the security element (230), a value for controlling access to the applet is generated on the TEE, and Based on the above values, causing the above function to be executed, Electronic devices (101).
2. In claim 1, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: An encrypted command is transmitted from the TEE to the security element (230) based on a shared key between the TEE and the security element (230) stored in the security element (230), and the command includes the value. Another value stored in the security element (230) for controlling access to the applet causes the function to be executed based on the security element (230) in response to the value corresponding to the other value. Electronic devices (101).
3. In claim 2, The above value is included in the header of the above command, The above command requests the execution of the above function of the applet, which is transmitted through a security channel between the TEE and the security element (230). Electronic devices (101).
4. In claim 2, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: In order to store the above different values in the security element (230), another software application for a KMS (key management system) connected to the electronic device (101) is executed, By using the other software application executed above, the package information of the software application and the identification information of the security element (230) are obtained, Transmitting the acquired package information and the acquired identification information to the KMS, and Causing another command to be transmitted to the security element (230) to store the other value obtained from the KMS. Electronic devices (101).
5. In claim 4, The above other command is encrypted based on another shared key between the KMS and the security element (230), The above other value is stored in the security element (230) by decrypting the other command within the security element (230) based on the other shared key. Electronic devices (101).
6. In claim 2, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: Based on the software application, in response to an initial access to the applet, identifying whether the electronic device (101) is in integrity, In response to the electronic device (101) identifying the integrity, it identifies whether the software application is included in an allow list, In response to the software application being included in the allow list, generating, on the TEE, the other value based on the identification information, the authentication information, and the package information, and Causing another command to be transmitted to the security element (230) to store the other value, the other value being encrypted based on the shared key, and including the other value; The above other value is stored in the security element (230) by decrypting the other command based on the shared key within the security element (230). Electronic devices (101).
7. In claim 6, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: Generate a request for a security element key and a signature for the security element key to provide a service related to the above security element (230), Transmit the above security element key and the above request to the HSM (hardware security module), Obtaining a first certificate for the security element key from the above HSM, and Causing to generate a sub-key chained to the above security element key and a second certificate for the sub-key; Electronic devices (101).
8. In claim 7, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: Using the above sub-key, verification is performed on an asymmetric key related to the above sub-key of the first security domain within the above security element (230), and In response to the success of the above verification, cause the shared key to be stored within a second security domain, which is a subdomain of the first security domain; Verification of the asymmetric key comprises verification between a first shared value generated using the subkey and a second shared value generated using the asymmetric key, based on the first certificate and the second certificate. Electronic device (101).
9. In claim 1, The above authentication information includes a hashed value of a certificate of the software application or at least one of the certificates, The above package information includes the package name of the software application, The above identification information includes a unique value indicating the security element (230), and The value generated on the TEE is hashed based on the hashed value or the certificate, the package name, and the unique value. Electronic device (101).
10. In claim 1, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: In response to the above event, identifying whether the electronic device (101) is in integrity, and In response to the electronic device (101) identifying said integrity, cause the software application to identify whether it is included in an allow list, The above authentication information and the package information are transmitted from the REE to the TEE in response to the software application being included in the allow list, and The above allowance list is obtained from a KMS (key management system) connected to the electronic device (101) and includes information on at least one software application. Electronic device (101).
11. In claim 10, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: In response to the electronic device (101) identifying that the integrity is not present, causing the electronic device (101) to display a visual object to indicate that the integrity verification has failed, through the display of the electronic device (101). Electronic device (101).
12. In claim 10, The above instructions, when executed by the at least one processor (120), cause the electronic device (101) to: In response to identifying that the software application is different from at least one software application in the allowed list, causing a visual object to be displayed on the display of the electronic device (101) to indicate that the software application is a non-allowed software application. Electronic device (101).
13. In claim 1, The above function is linked to the software application and requested through an application programming interface (API) defined for use of the applet. The above functions are, Create or delete a key, Creation or verification of a signature; Encrypt or decrypt data, or Including at least one of storing or deleting data; Electronic device (101).
14. In a method performed by an electronic device (101), An action for identifying an event for executing a function of an applet within a security element (230) of the electronic device (101) based on a software application; An operation of transmitting, based on the identified event, the certification information of the software application and the package information of the software application from the REE (rich execution environment) to the TEE (trusted execution environment). An operation of generating, on the TEE, a value for controlling access to the applet based on the identification information of the security element (230), the authentication information, and the package information obtained from the security element (230), and Based on the above value, including an action to execute the above function, method.
15. A non-transitory computer-readable storage medium, when executed individually or collectively by at least one processor (120) of an electronic device (101) including a security element (230), causes the electronic device (101) to: Based on the software application, an event for executing the function of the applet within the security element (230) is identified, Based on the identified event, the certification information of the software application and the package information of the software application are transmitted from the REE (rich execution environment) of the at least one processor (120) to the TEE (trusted execution environment) of the at least one processor (120). Based on the identification information of the security element (230), the authentication information, and the package information obtained from the security element (230), a value for controlling access to the applet is generated on the TEE, and storing one or more programs storing instructions that cause the above function to be executed based on the above value; A non-transitory computer-readable storage medium.
Citation Information
Patent Citations
Security system implementation method based on virtual security element in trusted execution environment
CN104899506A
Multi-issuer secure element partition architecture for NFC enabled devices
KR101567902B1
User identity attestation in mobile commerce
KR101624575B1
Device enrollment protocol
US20180254898A1
Techniques for secure-chip memory for trusted execution environments
US20180336342A1
