Electronic device for providing security function, and operation method thereof
Patent Information
- Application Number
- PCT/KR2024/012218
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-28
- Filing Date
- 2024-08-16
- Publication Date
- 2025-03-13
Smart Images

Figure KR2024012218_13032025_PF_FP_ABST
Abstract
Description
Electronic device providing security function and method of operation thereof
[0001] This article relates to electronic devices, and more specifically to electronic devices providing security functions and their operating methods.
[0002] Recently, mobile devices including smartphones or devices requiring security and privacy can provide hardware-backed security technology at the processor level.
[0003] The processor's computational processing is divided into a general environment (REE, Rich Execution Environment) and a trusted environment (TEE, Trusted Execution Environment). Therefore, even if the operating system (OS) located in the REE is rooted (gaining administrator privileges), direct access to the device's TEE area can be restricted.
[0004] While the TEE is physically distinct from the REE at the register level within the processor, peripherals outside the processor, such as RAM and flash, are not physically distinct and can be logically separated through encryption and access control. Therefore, while attackers generally cannot access plaintext data stored in the TEE area, they may be able to access encrypted data after rooting. If an attacker arbitrarily corrupts encrypted critical data, the electronic device could fall into a denial-of-service (DoS) state.
[0005] To prevent denial of service (DoS) attacks, electronic devices may support a separate Secure Execution Environment (SEE) that physically separates all execution environments from the main processor.
[0006] In modern computing, as the key length increases, the number of cases increases exponentially, and thus the number of operations required to decrypt the password also increases exponentially. However, in quantum computing, an increase in key length may not lead to an exponential increase in the amount of operations.
[0007] Since quantum computing, if implemented, could potentially defeat most modern public-key cryptography, a secure environment (SEE) must be used to provide a higher level of security than a trusted environment (TEE) to prepare for quantum computing. In a secure environment (SEE), the execution environment, including the processor and memory, may be restricted.
[0008] An electronic device according to various embodiments of the present document can efficiently and universally support PQC in a secure environment composed of multiple types of devices including TEE and SEE.
[0009] An electronic device according to various embodiments may include a main processor that performs operations in a general environment (REE, rich execution environment) and a trusted execution environment (TEE, trusted execution environment), and a security processor (223) that is physically separated from the main processor and performs operations in a secure execution environment (SEE, secure execution environment). When performing an electronic signature (sig) and a key encapsulation mechanism (KEM) operation, the main processor checks the operation speed when the operation is performed in either the trusted environment (TEE) or the secure environment (SEE), and determines the execution environment in which the electronic signature (sig) and the key encapsulation mechanism (KEM) operation are performed differently based on the checked operation speed, and the execution environment may include a secure environment (SEE) and a trusted environment (TEE).
[0010] An operating method of an electronic device according to various embodiments may include an operation of checking an operation speed when an operation is performed in either a trusted environment (TEE) or a secure environment (SEE) when performing an electronic signature (sig) and key encapsulation (key encapsulation, mechanism, KEM) operation, and an operation of differently determining an execution environment in which the electronic signature (sig) and key encapsulation (key encapsulation, mechanism, KEM) operation is performed based on the checked operation speed.
[0011] According to various embodiments of the present document, an electronic device may utilize multiple environments depending on the situation, rather than fixing the environment for performing the PQC algorithm to a secure environment (SEE) with a relatively high security level or a trusted environment (TEE) with a relatively fast computation speed. Considering the characteristics of the PQC algorithm, the electronic device may perform the KEM algorithm in a trusted environment (TEE) with a relatively fast computation speed. On the other hand, the electronic device may perform the final signing of a certificate including a public key in a secure environment (SEE) with a relatively high security level. The electronic device may perform the final signing of a certificate in a secure environment (SEE) with a relatively high security level, thereby maintaining the verification and security level of the certificate at the level of the secure environment (SEE).
[0012] An electronic device according to various embodiments of the present document can reduce the time required for encryption and operation by omitting at least one of the operations of transmitting an encrypted (wrapped) PQC electronic signature private key, deriving a KEK capable of decrypting the encrypted PQC private key, or unwrapping the PQC electronic signature private key.
[0013] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments.
[0014] FIG. 2 is a block diagram illustrating a security integrated circuit of an electronic device according to one embodiment.
[0015] FIG. 3a is a block diagram illustrating components according to an execution environment of an electronic device according to one embodiment.
[0016] Figure 3b is a block diagram showing the storage locations of multiple keys within an electronic device.
[0017] Figure 3c illustrates a trust chain according to one embodiment.
[0018] FIG. 4 is a block diagram illustrating a process for generating a key pair for electronic signature in an electronic device according to one embodiment.
[0019] FIG. 5 is a block diagram illustrating a process for generating a KEM key pair in an electronic device according to one embodiment.
[0020] FIG. 6 is a block diagram illustrating a process of performing an electronic signature based on a secure environment (SEE) in an electronic device according to one embodiment.
[0021] FIG. 7 is a flowchart illustrating a method for providing a security function in an electronic device according to one embodiment.
[0022] Figure 8 is a flowchart illustrating an operation method of an electronic device according to one embodiment.
[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 the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) or the server (108) via a second network (199) (e.g., a long-range wireless communication network). In 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 operations. According to one embodiment, as at least a part of the data processing or operations, 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 an auxiliary 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 with the main processor (121). For example, when the electronic device (101) includes the main processor (121) and the auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function. The auxiliary 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] 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.
[0046] 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 (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.
[0047] 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).
[0048] 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.
[0049] 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 product 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) through 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.
[0050] 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 placed 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.
[0051] FIG. 2 is a block diagram illustrating a security integrated circuit of an electronic device according to one embodiment.
[0052] Referring to FIG. 2, an electronic device (201) (e.g., electronic device (101)) according to one embodiment of the present document may include a secure integrated circuit (IC) of a system on chip (SoC) that provides a general environment (Rich Execution Environment: REE), a trusted execution environment (TEE), and a secure execution environment (Secure Execution Environment: SEE). Alternatively, the trusted execution environment (TEE) may be physically separated from the general environment (Rich Execution Environment: REE).
[0053] In one embodiment, a Trusted Environment (TEE) or Secured Environment (SEE) may have a relatively higher security level than a Regular Environment (REE) that requires a general security level. In one embodiment, a Trusted Environment (TEE) or Secured Environment (SEE) may be an environment in which a program (e.g., program (140)) operates based on resources that are distinct from the resources allocated to the Regular Environment (REE).
[0054] In one embodiment, the trusted environment (TEE) or the secure environment (SEE) may not allow unauthorized programs to access resources on the trusted environment (TEE) or the secure environment (SEE). In one embodiment, the secure environment (SEE) may have a relatively higher security level than the trusted environment (TEE). In one embodiment, the secure environment (SEE) or the trusted environment (TEE) may be a software-separated execution environment rather than a physically separated execution environment. For example, an operating system (e.g., operating system (142)) running on an electronic device (201) may provide services through general applications in a general environment (REE), and when performing an operation requiring high reliability, may switch to the secure environment (SEE) or the trusted environment (TEE) and execute an application for providing a service requiring separate reliability.
[0055] For example, when performing a financial transaction or performing a function requiring reliability, such as user fingerprint authentication, password input, or password authentication, the electronic device (201) may execute a biometric authentication application performed in a trusted environment (TEE) or a secure environment (SEE) and perform user authentication.
[0056] In one embodiment, the secure environment (SEE) or trusted environment (TEE) may be a physically separated execution environment. For example, a function requiring high security may be provided to the user through a hardware-separated environment of a secure memory (225) or a secure processor (223) in which a separate security area is established. For example, the main processor (221) may include multiple core processors. In one embodiment, depending on the type of application used in the electronic device (201), the main processor (221) may select at least one of the multiple core processors to execute the application. For example, in a general mode (e.g., the general environment (REE)), the electronic device (201) may select some of the core processors of the main processor (221) to execute a general application, and in a mode requiring security (e.g., the secure environment (SEE) or trusted environment (TEE)), the electronic device (201) may access the secure area through a secure core processor instead of a general core processor of the main processor (221) to execute a secure application.
[0057] In one embodiment, the main processor (221) can operate in a normal environment, a trusted environment, or a combination thereof. In one embodiment, the main processor (221) can control the processing and calculation of data in the normal environment and / or the trusted environment.
[0058] In one embodiment, the electronic device (201) may include a main processor (221) (e.g., main processor (121)), a security processor (223) (e.g., auxiliary processor (123)), and a secure memory (225).
[0059] In one embodiment, the security processor (223) is operatively connected to and can communicate with the main processor (221). In one embodiment, the security processor (223) can receive a request from the main processor (221) to start or initialize a secure environment. In one embodiment, the security processor (223) can operate in a secure environment.
[0060] In one embodiment, the secure processor (223) may further include various configurations. In one embodiment, the secure processor (223) may further include a secure cache, ROM, RAM, a memory controller (MEM controller), security sensors, or a combination thereof.
[0061] In one embodiment, the secure memory (225) may be operatively connected to the secure processor (223). In one embodiment, the secure memory (225) may perform encrypted communication using a key previously shared with the secure processor (223). In one embodiment, the secure memory (225) may be a non-volatile memory (NVM) memory.
[0062] In FIG. 2, it is exemplified that the electronic device (201) is equipped with a security processor (223), but this is merely an example. In one embodiment, if the electronic device (201) is not equipped with a security processor (223), the main processor (221) may perform the role of the security processor (223). In such a case, the function of the secure memory (225) may also be provided through a memory (e.g., memory (130)) that operates in a general environment (REE) or a trusted environment (TEE).
[0063] FIG. 3a is a block diagram illustrating components according to an execution environment of an electronic device according to one embodiment.
[0064] An electronic device (e.g., an electronic device (201) of FIG. 2) may include a main processor (e.g., a main processor (221) of FIG. 2) and a security processor (e.g., a security processor (223) of FIG. 2).
[0065] The main processor (221) may receive a security-related request from at least one application (312) in a Rich Execution Environment (REE) (310). The application (312) may refer to at least one app that utilizes PQC for enhanced security. The application (312) may be related to the execution of any one of banking, card, simple payment (e.g., Pay), or e-commerce, for example.
[0066] KeyStore (314) may refer to a module that provides a cryptographic operation API (Application Program Interface) supported by REE OS.
[0067] KeyMaster (322) may refer to one of the applications operating in a trusted environment (320) by the main processor (221). KeyMaster (322) may provide a trusted cryptographic operation performed in the trusted environment (320) to KeyStore (314) operating in a general environment (310).
[0068] The SEEDriver (324) can perform communication between a trusted environment (TEE) (320) and a secure environment (SEE) (330). The software can utilize the standard APDU protocol, and the hardware communication channel can utilize the enhanced Secure SPI. This may vary depending on the implementation.
[0069] Figure 3b is a block diagram showing the storage locations of multiple keys within an electronic device.
[0070] TEEWrapKey (340) and AppKEMKey (342) may be stored in Keymaster (322) of the trusted environment (320). The KEM (Key Encapsulation, Mechanism) algorithm may include a method of transmitting a symmetric key by encrypting it with a public key. AppKEMKey (342) refers to a key pair (e.g., a public key and a private key) of the KEM algorithm generated at the request of the application (312). AppKEMKey (342) may be generated in the trusted environment (320), signed in the secure environment (330), encrypted in the trusted environment (320), and stored in KeyStore (314) of the general environment (310).
[0071] The PQC KeyMaster (332) is a module that provides reliable cryptographic operations performed in a secure environment (330) through the SEEDriver (324) of the trusted environment (320). Depending on the implementation, the PQC KeyMaster (332) may include a hardware acceleration function supported in the secure environment (330). AppSigKey (344) and SEEWrapKey (346) may be stored in the StorageManager (e.g., the secure memory (635) of 6) of the secure environment (330).
[0072] The SEE Provisioned Key (348) may be stored in a ROM area of a secure environment (330) that only the PQC Keymaster (332) can access. The ROM area of the SEE may refer to an area whose integrity is guaranteed by the manufacturer.
[0073] Secure memory (335) (e.g., secure memory (225) of FIG. 2) may refer to a module that manages the storage of the secure environment (330). Secure memory (335) may serve as an additional storage dependent on KeyStore (314) located in the general environment (310).
[0074] The SEE Provisioned Key (348) may refer to a unique key pair of the PQC electronic signature algorithm. The security processor (223) may protect the secret key of this key pair from being exposed outside the security environment (330) in the security environment (330). The SEE Provisioned Key (348) may be stored in a ROM area when the security processor (223) is mass-produced by the manufacturer. Depending on the implementation, the SEE Provisioned Key (348) may utilize a specific algorithm (e.g., Dilithium algorithm of security level 3). A certificate including the public key of the SEE Provisioned Key (348) key pair may be signed by the manufacturer at the time of mass production of the security processor (223).
[0075] AppSigKey (344) may refer to a key pair of a PQC signing algorithm that an application (312) requested to generate in a general environment (310). AppSigKey (344) is typically generated in a secure environment (330), encrypted in the secure environment (330), and stored in the general environment (310). However, according to this document, it may be additionally stored in the secure environment (330) in a plain text state. Plain text may refer to a bit string or character string to which an encryption algorithm is not applied. Cipher text may refer to a bit string or character string to which an encryption algorithm is applied.
[0076] At least one application (312) can request the generation of a specific PQC key pair via an API. The public key of the specific PQC key pair for which generation is requested is issued as a certificate containing a signature generated using the private key of the Provisioned Keypair held by the issuer, the security environment (330). The Provisioned Keypair may have a certificate signed with the manufacturer's private key. The key generated by at least one application (312) can create a trust chain.
[0077] Figure 3c illustrates a trust chain according to one embodiment.
[0078] The trust chain (360) may start from a root certificate of an HSM supporting PQC. In Figure 362, the HSM's root certificate may have a self-signed signature. The HSM's root certificate may serve as a guarantee for the HSM manufacturer that the private key of the PQC root key pair has not been leaked outside the HSM. Accordingly, an external manufacturer (e.g., a third party) may store the self-signed certificate issued by the HSM in an integrity-guaranteed area (e.g., KeyStore (314)).
[0079] In Figure 364, a certificate issued using a PQC root secret key stored in an HSM may be stored in a security processor (223) (e.g., a secure element (SE) or eSE) providing a secure environment (330). The manufacturer of the security processor (223) can ensure that the secret key of the PQC key pair held by the security processor (223) is not leaked outside the security processor (223), similar to the HSM.
[0080] In Figure 366, the plaintext of the PQC secret key generated by at least one application (312) may not be leaked outside the secure environment (330). An external server may have difficulty trusting the public key included in the certificate transmitted from at least one application (312). In this case, the external server may verify the issuer's signature recorded in the certificate. Based on the verification result, the external server may determine that at least one application (312) is using a key protected in the secure environment (330).
[0081] An external server may have difficulty trusting the secure environment (330). In Figure 368, the external server can verify that the certificate of the secure environment (330) has an electronic signature issued by an HSM. The external server can trust the certificate of at least one application (312) if the certificate of the secure environment (330) includes an electronic signature issued by an HSM.
[0082] The electronic device (201) can provide a reliable level of security even when quantum computing capable of performing large-scale operations is realized by utilizing a chain of trust (360) between the HSM, the security processor (223) operating in the secure environment (330), and the application (312).
[0083] FIG. 4 is a block diagram illustrating a process for generating a key pair for electronic signature in an electronic device according to one embodiment.
[0084] According to FIG. 4, an electronic device (e.g., electronic device (201) of FIG. 2) may include a general environment (REE), a trusted environment (TEE), and a secure environment (SEE).
[0085] Simply applying post-quantum cryptography (PQC) to a system with a typical security environment can impose a significant burden on the system. Applying PQC to a system with a typical security environment can result in a deterioration in the quality of services provided by applications. This is because PQC algorithms have larger key lengths and are computationally intensive compared to modern cryptography.
[0086] The electronic device (201) according to various embodiments of the present document may distinguish between the execution environment of the KEM algorithm and the execution environment of the electronic signature in order to perform the PQC algorithm, which has a large key length and heavy computation compared to modern cryptography. That is, the PQC algorithm may be divided into the PQC electronic signature algorithm and the KEM algorithm. The PQC electronic signature algorithm is mainly used during key generation, and the KEM algorithm may be used whenever an individual communication session begins. The KEM (Key Encapsulation, Mechanism) algorithm may include a method of transmitting a symmetric key by encrypting it with a public key. The KEM algorithm may use a method of encrypting a symmetric key with a public key to securely transmit a symmetric key in asymmetric encryption. The KEM algorithm may include an encapsulation and decapsulation step. In the encapsulation step, the electronic device (201) may generate a random symmetric key and encrypt this key with the recipient's public key. In the decapsulation step, the recipient may decrypt the encapsulation using a private key and extract the original symmetric key. The recipient can then use the extracted symmetric key to decrypt the actual message or data.
[0087] The PQC digital signature algorithm can be used to guarantee the integrity of messages and the identity of senders. The PQC digital signature algorithm can be used safely even if quantum computers become a reality.
[0088] The PQC digital signature algorithm, which has a relatively low call frequency, can be performed by a secure processor (e.g., the secure processor (223) of FIG. 2) in a secure environment (SEE) with a high security level. The KEM algorithm, which has a relatively high call frequency, can be performed by a main processor (e.g., the main processor (221) of FIG. 2) in a trusted environment (TEE). The main processor (221) can be linked with the secure environment (SEE) when the KEM key pair is first generated. The secure processor (223) can act as a Certificate Authority (CA) and indicate this in the certificate. The electronic device (201) can provide a relatively higher level of trust in the secure environment (SEE) than in the general environment (REE) when verifying a certificate. A certificate authorized in the secure environment of the electronic device (201) can provide a relatively higher level of trust compared to certificates issued in the general environment (REE) and the trusted environment (TEE) when verified externally.
[0089] At least one application (412) that wants to utilize the PQC digital signature algorithm can transmit options for a standard certificate containing a public key and an alias of the key to be generated when requesting key generation. The options may include, for example, whether to prefer the use of a Secure Environment (SEE). Alternatively, the options may indicate content to be included in an X.509 certificate, such as KeyUsage. The alias of the key to be generated means an arbitrary value that the application (412) uses to refer to a specific key.
[0090] KeyStore (414) receives a key generation request from an application (412) and transmits it to KeyStoreHAL (416). HAL may refer to a hardware abstraction layer. KeyStoreHAL (416) may transmit the request from the application (412) to an SEEDriver (424) operating in a trusted environment (TEE). TA may refer to a trusted application operating in a trusted environment (TEE).
[0091] The interface of the Secure Environment (SEE) domain can use the standard APDU (application protocol data unit) format. The SEEDriver (424) can convert the request of the application (412) into an APDU message and transmit it to the PQCKeyMaster (432).
[0092] PQCKeyMaster (432) can generate WrapKey for the first time and store it in secure memory (435) if WrapKey is not generated. WrapKey can mean a key that is not exposed outside of the secure environment (SEE). PQCKeyMaster (432) can use a symmetric cipher generated in a specific way (e.g., AES256) when generating WrapKey. Symmetric cipher can mean a cipher that encrypts and decrypts using the same key. Plain text can mean a bit string or character string to which an encryption algorithm is not applied. Cipher text can mean a bit string or character string to which an encryption algorithm is applied. PQCKeyMaster (432) can generate WrapKey for the first time and maintain it only with the execution module without directly storing data. PQCKeyMaster (432) can reduce the time required to move previously stored data when updating a module and improve the update speed.
[0093] After the WrapKey is generated, the PQCKeyMaster (432) can read the KeyId corresponding to the WrapKey from the secure memory (435). The KeyId may mean a unique value corresponding to an individual key generated in the secure environment (SEE). The secure memory (435) may increase the KeyId value to respond to the next request each time a KeyId is issued. The secure memory (435) may distinguish keys using the KeyId. The KeyStore (414) may store information about individual keys, the application (412) that generated the key, and the alias assigned to the key by the application.
[0094] PQCKeyMaster (432) can generate an initialization vector (IV) for encryption using WrapKey and a key encryption key (KEK) derived from WrapKey. PQCKeyMaster (432) can use a different symmetric encryption key for each PQC key pair of individual applications (412) by deriving KEK instead of encrypting directly with WrapKey. PQCKeyMaster (432) can efficiently use the limited storage capacity of the secure environment (SEE) by deriving KEK instead of encrypting directly with WrapKey. WrapKey can be used as a means for securely transmitting or storing an encrypted key.
[0095] The electronic device (201) can encrypt a symmetric key (or secret key) that encrypts actual data using a key encryption key (KEK). The KEK can be derived from a Wrapkey.
[0096] The electronic device (201) can encrypt (wrap) a key generated at the request of an application by performing encryption with a KEK, and store the encrypted key (wrapped key) in a general environment (REE). That is, the electronic device (201) can control the key generated at the request of the application so that it is not exposed outside the secure environment in a plaintext state. The plaintext state may mean a state in which no wrapping is performed.
[0097]
[0098] An initialization vector (IV) can be a random number used to initialize blockchain encryption during the encryption process. The electronic device (201) can randomly generate an IV. A new IV can be generated for each new message or session. The electronic device (201) can encrypt messages differently using the IV each time the same message is transmitted, thereby preventing attacks using pattern analysis.
[0099] PQCKeyMaster (432) can generate a PQC electronic signature key pair requested from an application (412) using a cryptographic library (434) used in a secure environment (SEE).
[0100] PQCKeyMaster (432) can encrypt the private key in the generated PQC electronic signature key pair using KEK (key encryption key). PQCKeyMaster (432) can include the public key in the certificate using a cryptographic library (434) used in a secure environment (SEE). In this case, the certificate may mean a certificate signed with a PQC electronic signature private key (Provisioned SigSecKey).
[0101] PQCKeyMaster (432) can check whether there is any storage space left on the secure memory (435) based on receiving a request for generating and storing a PQC key pair from the application (412). If there is enough storage space left on the secure memory (435) to store the PQC secret key of the application (412), the PQCKeyMaster (432) can store the PQC secret key of the application (412) on the secure memory (435). A case where there is not enough storage space left on the secure memory (435) to store the PQC key pair will be described in FIG. 5.
[0102] PQCKeyMaster (432) can store the PQC secret key in secure memory (435) and then transmit an APDU message to SEEDriver (424) operating in a trusted environment (TEE). The APDU message can include at least one of KeyID, an encrypted PQC digital signature private key of the application (412), an initialization vector, a PQC digital signature certificate, or whether the PQC secret key is stored in the secure environment (SEE).
[0103] SEEDriver (424) can parse APDU messages into values that KeyStore (414) can read. Parsing may refer to the process of extracting desired data and converting it into a state that is easy to process. SEEDriver (424) can parse APDU messages and transmit them to KeyStoreHAL (416). KeyStoreHAL (416) can transmit the received APDU messages to KeyStore (414).
[0104] KeyStore (414) can verify the received certificate and, based on the trust chain being verified, store together the AppId, which is a unique value of the application (412) that initially requested the generation of the PQC electronic signature key, an alias designated by the application (412), and a value (e.g., a PQC electronic signature key pair) generated by PQCKeyMaster (432). Thereafter, KeyStore (414) can return the result of the PQC electronic signature key generation to the application (412).
[0105] FIG. 5 is a block diagram illustrating a process for generating a KEM key pair in an electronic device according to one embodiment.
[0106] According to FIG. 5, an electronic device (e.g., electronic device (201) of FIG. 2) may include a general environment (REE), a trusted environment (TEE), and a secure environment (SEE).
[0107] Fig. 5 illustrates a procedure for generating a PQC KEM key pair on an electronic device (201) according to various embodiments of the present document. The biggest difference between the PQC KEM key pair generation procedure and the electronic signature key pair generation of Fig. 4 is that the location for generating the PQC algorithm key pair requested by the application (512) is a trusted environment (TEE) rather than a secure environment (SEE).
[0108] The electronic device (201) can generate a PQC KEM key pair in a trusted environment (TEE) to provide a faster computation speed compared to a secure environment (SEE).
[0109] An application (512) may request the generation of a KEM key pair on the KeyStore (514) to utilize the PQC KEM algorithm. The application (512) may request the KeyStore (514) API of the framework with an option. The option may indicate, for example, whether to prefer the use of a Secure Environment (SEE). Alternatively, the option may indicate, for example, content to be included in an X.509 certificate, such as KeyUsage. The application (512) may transmit an alias of the key to be generated on the KeyStore (514). The alias of the key to be generated means an arbitrary value that the application (512) uses to refer to a specific key.
[0110] KeyStore (514) forwards the request received from the application (512) to KeyStoreHAL (516). KeyStoreHAL (516) forwards the received request to KeyMaster.
[0111] KeyMaster (526) can generate a PQC KEM key pair in a trusted environment (TEE). KeyMaster (526) can derive a KEK for the generated PQC KEM private key in the trusted environment (TEE) and encrypt (wrapping) it by generating an IV.
[0112] KeyMaster (526) can request signing of the certificate of the application (512) on SEEDriver (524). The certificate can include a PQC public key.
[0113] SEEDriver (524) generates an APDU message for communicating with the secure environment (SEE) and transmits the request of KeyMaster (526) to PQCKeyMaster (532).
[0114] PQCKeyMaster (532) can create a signature using a PQC electronic signature secret key unique to each security environment (SEE) using a cryptographic library (534) and complete a certificate.
[0115] PQCKeyMaster (532) can transmit an APDU message to SEEDriver (524). The APDU message can include a completed certificate and a generated signature. SEEDriver (524) can parse the certificate based on the received APDU message and transmit the parsed certificate to KeyMaster (526).
[0116] KeyMaster (526) can transmit a certificate generated in a secure environment (SEE) and an encrypted (wrapped) KEM private key to KeyStoreHAL (516).
[0117] KeyStoreHAL (516) can transmit the received certificate and the encrypted (wrapped) KEM private key to KeyStore (514).
[0118] KeyStore (514) can verify the received certificate with the public key of the secure environment (SEE). If verification is successful, KeyStore (514) can store the received certificate and the encrypted private key in the database of KeyStore (514) (e.g., memory (130) of FIG. 1). KeyStore (514) can store the identifier (AppId) of the app that requested the generation of the PQC key pair and the alias (alias) assigned by the app in the database.
[0119] KeyStore (514) can transmit the key generation and storage results to the application (512).
[0120] FIG. 6 is a block diagram illustrating a process of performing an electronic signature based on a secure environment (SEE) in an electronic device according to one embodiment.
[0121] According to FIG. 6, an electronic device (e.g., electronic device (201) of FIG. 2) may include a general environment (REE), a trusted environment (TEE), and a secure environment (SEE).
[0122] The application (612) can request a signature by sending an alias of a PQC electronic signature key pair created to use the PQC electronic signature and a message requiring a signature to the KeyStore (614).
[0123] KeyStore (614) can confirm that the private key corresponding to the PQC electronic signature is stored in the secure environment (SEE). KeyStore (614) is operatively connected to the secure memory (635) to perform communication, and can confirm whether the private key corresponding to the PQC electronic signature is stored in the secure environment (SEE). Keystore (614) can use KeyID to confirm whether the private key corresponding to the PQC electronic signature is stored in the secure environment (SEE). Alternatively, Keystore (614) can confirm whether the private key corresponding to the PQC electronic signature is stored in the secure environment (SEE) based on a request of an APDU (application protocol data unit).
[0124] KeyStore (614) can transmit a message requiring a signature and a KeyId corresponding to the private key to KeyStoreHAL (616) based on the private key corresponding to the PQC electronic signature being stored in a secure environment (SEE).
[0125] KeyStoreHAL (616) can receive a KeyId corresponding to a private key and a message requiring a signature and transmit them to SEEDriver (624) in a trusted environment.
[0126] SEEDriver (624) can convert a KeyId corresponding to a private key and a message requiring a signature into an APDU message and transmit it to PQCKeyMaster (632) of the secure environment (SEE).
[0127] PQCKeyMaster (632) can read the PQC electronic signature private key corresponding to the KeyID on the secure memory (635). PQCKeyMaster (632) can generate a signature for the requested message using the cryptographic library (634) of the secure environment (SEE). PQCKeyMaster (632) can transmit an APDU message including the generated signature to SEEDriver (624). PQCKeyMaster (632) does not receive the private key for signing in an encrypted (wrapped) state and recover it to a signable state, but reads the PQC electronic signature private key corresponding to the KeyID and performs signing without a separate key recovery process. In this case, compared to the process of recovering the private key and performing signing on the secure environment (SEE), the resource consumption of the security processor (e.g., the security processor (223) of FIG. 2) can be relatively reduced, and the time required for operation can be reduced.
[0128] SEEDriver (624) can transmit the received APDU message to KeyStoreHAL (616). KeyStoreHAL (616) can transmit the received APDU message and the generated signature to KeyStore (614). KeyStore (614) can transmit the received signature to the application (612) that requested the electronic signature.
[0129] In one embodiment, KeyStoreHAL (616) and SEEDriver (624) can retransmit received data and enhance the security of the electronic device (201) through access control. KeyStoreHAL (616) and SEEDriver (624) may be referred to as a pass-through module.
[0130] The KeyStoreHAL (616) can create a random-based secure channel with the SEEDriver (624) and the KeyMaster at the initial boot time of individual devices. The SEEDriver (624) and the KeyMaster can create the initial KeyStoreHAL (616) and the secure channel. The SEEDriver (624) and the KeyMaster can treat all requests from other modules located in the regular environment (REE) as security violations. The SEEDriver (624) and the KeyMaster can only receive and process requests from the KeyStoreHAL (616) until the OS in the regular environment (REE) performs a factory reset.
[0131] The PQCKeymaster (632) located in the secure environment (SEE) can create a secure channel at the time of the manufacturing process using the SEEDriver (624). The SEEDriver (624) located in the trusted environment (TEE) can have exclusive access to the PQCKeyMaster (632) in the secure environment (SEE). The PQCKeyMaster (632) can determine that access by other modules located in the trusted environment (TEE) is a security breach until the manufacturer replaces the hardware module.
[0132] KeyStoreHAL (616) can perform the same operation within processors from various manufacturers that provide a trusted environment (TEE). SEEDriver (624) can support a standard interface that operates on a specific operating system (e.g., Android). APDU (Application Protocol Data Unit) can refer to a communication protocol used to exchange data between a smart card and a smart card reader. When exchanging information between a smart card and a device that reads it, the electronic device (201) can package and transmit the information. Here, the package can include an APDU. APDU can include two types: a command APDU and a response APDU. A command APDU can refer to a message that instructs the smart card to perform a certain operation. A response APDU can refer to a message in which the smart card sends the result of the operation to the reader. The structure and format of APDU can be defined according to the international standard ISO / IEC 7816-4.
[0133] FIG. 7 is a flowchart illustrating a method for providing a security function in an electronic device according to one embodiment.
[0134] The operations described through FIG. 7 can be implemented based on instructions that can be stored in a computer recording medium or memory (e.g., memory (130) of FIG. 1). The illustrated method (700) can be executed by the electronic device described above through FIGS. 1 to 6 (e.g., electronic device (201) of FIG. 2), and the technical features described above will be omitted below. The order of each operation of FIG. 7 can be changed, some operations can be omitted, and some operations can be performed simultaneously.
[0135] In operation 710 of FIG. 7, a main processor (e.g., main processor (221) of FIG. 2) may receive a security function request from an application (e.g., application (612) of FIG. 6).
[0136] In operation 715 of FIG. 7, the main processor (221) may forward a security function request to an optimal execution environment (e.g., a trusted environment (TEE) or a secure environment (SEE)). The main processor (221) may forward the security function request to a module corresponding to the trusted environment (TEE) or the secure environment (SEE) based on the security function request of the application being confirmed on the general environment (REE). In operation 720 of FIG. 7, the main processor (221) may generate a public key and a private key using the module (e.g., the trusted environment (TEE) or the secure environment (SEE)) that received the security function request, and may encrypt the private key. The main processor (221) may generate a key pair including the public key and the private key on the trusted environment (TEE). The main processor (221) may encrypt (wrapping) the generated private key using a key-encryption-key (KEK) and an initialization vector (IV).
[0137] In operation 730 of FIG. 7, the main processor (221) may generate a certificate containing a public key in the secure environment (SEE). The main processor (221) may request the generation of the certificate from a security processor (e.g., the security processor (223) of FIG. 2) operating in the secure environment (SEE). The security processor (223) may perform signing and transmit the result to the main processor (221).
[0138] In operation 735 of FIG. 7, the main processor (221) may store a private key in a secure environment (SEE) based on a request from an application.
[0139] In operation 740 of FIG. 7, the main processor (221) can perform verification using the public key of the secure environment (SEE) in the general environment (REE). The main processor (221) can perform verification on the received signature and certificate in the general environment (REE) based on the signature received from the secure processor (223).
[0140] The main processor (221) can perform verification using the public key of the secure environment (SEE). The main processor (221) can perform verification in a general environment (REE), thereby relatively increasing the computational speed and reducing the time required for verification compared to performing verification in the secure environment (SEE).
[0141] The main processor (221) can perform verification using the public key of the secure environment (SEE) and control signing to be performed in the secure environment (SEE). The main processor (221) can maintain a relatively high level of security compared to signing in a general environment (REE) or a trusted environment (TEE).
[0142] In operation 750 of FIG. 7, the main processor (221) may store an encrypted private key and identification information in a secure environment (SEE) and transmit the result of performing a security function. Based on the security function being performed, the main processor (221) may store a certificate, an encrypted private key, and identification information (ID) of the application (612) requesting verification in the memory (130). The main processor (221) may transmit the result of performing the security function to the application (612).
[0143] According to one embodiment, the main processor (221) may, based on receiving a message requiring information and a signature for an encrypted private key from an application (612) on a general execution environment (REE), verify whether a corresponding private key is stored in a secure memory (225) on a secure environment (SEE).
[0144] The main processor (221) can transmit information about the private key and a message requiring a signature to a trusted execution environment (TEE) based on the fact that the corresponding private key is stored in the secure memory (225). The main processor (221) can transmit information about the private key and a message requiring a signature to the secure processor (223) using the trusted execution environment.
[0145] The security processor (223) can verify the private key stored in the secure memory (225) based on information about the received private key, and can generate a signature for a message requiring a signature using the verified private key.
[0146] The electronic device (201) according to various embodiments of the present document may utilize multiple environments depending on the situation, rather than fixing the environment for performing the PQC algorithm to a secure environment (SEE) with a relatively high security level or a trusted environment (TEE) with a relatively fast computation speed. Considering the characteristics of the PQC algorithm, the electronic device (201) may perform the KEM algorithm in a trusted environment (TEE) with a relatively fast computation speed. On the other hand, the electronic device (201) may perform the final signing of a certificate including a public key in a secure environment (SEE) with a relatively high security level. The electronic device (201) may perform the final signing of a certificate in a secure environment (SEE) with a relatively high security level, thereby maintaining the verification and security level of the certificate at the level of the secure environment (SEE).
[0147] An electronic device (201) according to various embodiments of the present document can reduce the time required for encryption and operation by omitting at least one of the operations of transmitting an encrypted (wrapped) PQC electronic signature private key, deriving a KEK capable of decrypting the encrypted PQC private key, or decrypting (unwrapping) the PQC electronic signature private key.
[0148] Figure 8 is a flowchart illustrating an operation method of an electronic device according to one embodiment.
[0149] The operations described through FIG. 8 may be implemented based on instructions that may be stored in a computer recording medium or memory (e.g., memory (130) of FIG. 1). The illustrated method (800) may be executed by an electronic device (e.g., electronic device (201) of FIG. 2) described above through FIGS. 1 to 6, and the technical features described above will be omitted below. The order of each operation of FIG. 8 may be changed, some operations may be omitted, and some operations may be performed simultaneously.
[0150] In operation 810, the main processor (e.g., the main processor (221) of FIG. 2) can check the computational speed when performing an electronic signature (sig) and key encapsulation (key encapsulation, mechanism, KEM) operation in either a trusted environment (TEE) or a secure environment (SEE).
[0151] According to one embodiment, an electronic signature (sig) operation may include the steps of key generation, signature generation, and signature verification. The key for verifying the signature may be initially generated in a secure environment (SEE). Furthermore, the signature generation process may also be performed in the secure environment (SEE). The main processor (221) may calculate the computational speed when the signature verification process is performed in a trusted environment (TEE). Furthermore, the main processor (221) may calculate the computational speed when the signature verification process is performed in the secure environment (SEE).
[0152] According to one embodiment, a key encapsulation (KEM) operation may include the steps of generating, encapsulating, and decapsulating a KEM key pair. A KEM key pair may include a private key and a public key.
[0153] In operation 820, the main processor (221) can differently determine the execution environment in which the electronic signature (sig) and key encapsulation (key encapsulation, mechanism, KEM) operations are performed based on the verified operation speed.
[0154] The main processor (221) may determine that there will be no problem with the service speed if the computational speed exceeds a specified level when the signature verification process is executed in the secure environment (SEE), and may execute the signature verification process in the secure environment (SEE). On the other hand, the main processor (221) may determine that there will be a problem with the service provision because the computational speed is relatively slow if the computational speed is below a specified level when the signature verification process is executed in the secure environment (SEE). In this case, the main processor (221) may execute the signature verification process in a trusted environment (TEE) with a relatively fast computational speed, instead of the secure environment (SEE).
[0155] According to one embodiment, the main processor (221) may execute private key generation in a trusted environment (TEE) and public key generation in a secure environment (SEE). Since the public key includes the issuer's signature, it may require relatively more security during the generation process. The main processor (221) may execute the public key generation process, where security is relatively important, in the secure environment (SEE). The main processor (221) may execute the private key generation, encapsulation, and decapsulation steps in either the secure environment (SEE) or the trusted environment (TEE) based on computational speed.
[0156] The main processor (221) may determine that there will be no problem with the service speed if the operation speed exceeds a specified level when the private key generation, encapsulation, and decapsulation steps are executed in the secure environment (SEE), and may execute the private key generation, encapsulation, and decapsulation steps in the secure environment (SEE). On the other hand, the main processor (221) may determine that there will be a problem with the service provision because the operation speed is relatively slow if the operation speed is below a specified level when the private key generation, encapsulation, and decapsulation steps are executed in the secure environment (SEE). In this case, the main processor (221) may execute the private key generation, encapsulation, and decapsulation steps in a trusted environment (TEE) with a relatively fast operation speed instead of the secure environment (SEE).
Claims
1. In electronic devices, A main processor (221) that performs operations in a general environment (REE, rich execution environment) (310) and a trusted environment (TEE, trusted execution environment) (320); and It includes a security processor (223) that is physically separated from the main processor and performs operations in a secure execution environment (SEE) (330). The above main processor In performing electronic signature (sig) and key encapsulation mechanism (KEM) operations, Verify the computational speed when the operation is executed in either the trusted environment (TEE) or the secure environment (SEE). Based on the verified operation speed, the execution environment in which the electronic signature (sig) and key encapsulation (key encapsulation, mechanism, KEM) operations are performed is determined differently. The above execution environment is An electronic device comprising a secure environment (SEE) and a trusted environment (TEE).
2. In paragraph 1, The above main processor Based on the verification of the security function request of the application in the above general environment (REE), the security function request is forwarded to the execution environment of either the above trusted environment (TEE) or the above secure environment. Generate a PQC (post quantum cryptography) key pair including a public key and a private key on a module that receives a security function request among the above trusted environment (TEE) or the above secure environment, Encrypt (wrapping) the generated private key using the key encryption key (KEK) and initialization vector (IV). Generate a certificate including a public key in the above secure environment (SEE), store a private key based on a request from the application, and perform a security function using the public key of the above secure environment (SEE) in the above general environment (REE) for the certificate generated in the above secure environment (SEE). An electronic device that stores a certificate, an encrypted private key, and identification information (ID) of an application requesting performance of a security function in memory (130) based on the performance of a security function, and transmits the result of performing the security function to the application.
3. In paragraph 1, The above main processor Based on receiving a message requiring information and signature regarding an encrypted private key from an application in the general environment (REE), it is verified whether the corresponding private key is stored in the secure memory (225) in the secure environment (SEE). Transmitting a message requiring information about the private key and a signature to the trusted environment (TEE) based on the corresponding private key being stored in the secure memory; Using the above trusted environment, information about the private key and a message requiring a signature are transmitted to the above secure processor, The above security processor An electronic device that verifies a private key stored in the secure memory based on information about a received private key and generates a signature for a message requiring a signature using the verified private key.
4. In paragraph 1, The above main processor Receive a key generation request from the above application, Converts to a message using the APDU (application protocol data unit) format. An electronic device that transmits the converted message to the security processor (223).
5. In paragraph 4, The above security processor Generate a WrapKey based on the fact that a WrapKey has not been generated and store it in secure memory. Based on the WrapKey being generated, the unique value corresponding to the WrapKey is read from the secure memory. The above WrapKey is An electronic device characterized in that the security function request of the above application means a key that is not exposed outside the execution environment in which it is received, and is created using symmetric encryption.
6. In paragraph 5, The above security processor Generate a Key Encryption Key (KEK) derived from the Initialization Vector (IV) and WrapKey, An electronic device that generates a PQC electronic signature key pair containing a public key and a private key.
7. In paragraph 6, The above security processor Encrypt the secret key among the above-generated PQC electronic signature key pairs using the Key Encryption Key (KEK), An electronic device that includes the public key of the above-mentioned generated PQC electronic signature key pair in a certificate.
8. In paragraph 4, The above security processor If there is enough storage space left on the secure memory (435) to store the PQC key pair generated on the secure memory, the PQC secret key of the application (412) is stored on the secure memory, An electronic device transmitting a message including at least one of a KeyID, an encrypted PQC electronic signature private key of an application (412), an initialization vector, a PQC electronic signature certificate, or whether a PQC secret key is stored in a secure environment (SEE) on the main processor.
9. In paragraph 8, The above main processor Parses the message received on the above security processor so that it can be read in the trusted environment (TEE), Verify the certificate contained in the received message, Based on successful verification, the AppId, which is a unique value of the application that requested the initial PQC electronic signature key generation, the alias specified by the application, and the generated PQC electronic signature key pair are stored in the memory. An electronic device that transmits the certificate verification result and the PQC electronic signature key generation result to the above application.
10. In paragraph 1, The above main processor Generate a PQC KEM key pair in a trusted environment (TEE) based on a request for KEM key pair generation from the above application, Encryption (wrapping) is performed using the Initialization Vector (IV) and the Key Encryption Key (KEK) derived from the WrapKey. An electronic device requesting authentication for KEM key pair generation on said secure processor.
11. In Article 10, The above security processor Authentication is performed using the PQC electronic signature secret key and transmitted to the main processor. The above main processor Based on the authentication result received from the above security processor, the received certificate is verified with the public key of the secure environment (SEE), Based on successful verification, the received certificate and the encrypted (wrapped) KEM private key are stored in the memory, An electronic device that transmits the results of KEM key pair generation and authentication results to the application.
12. In paragraph 1, The above main processor Receive information about a key pair for PQC electronic signature and a message requiring signing from the above application, Verify that the private key corresponding to the key pair for the above PQC electronic signature is stored in secure memory, Based on the fact that the private key corresponding to the key pair for the above PQC electronic signature is stored on the above secure memory, the KeyId corresponding to the private key and a message requiring a signature are transmitted to the above secure processor, The above security processor Based on receiving a KeyId corresponding to a private key and a message requiring a signature from the main processor, the PQC electronic signature private key corresponding to the KeyID is read from the secure memory, Using the PQC electronic signature private key read above, a signature is created on the message that requires a signature. An electronic device that transmits the generated signature and message onto the main processor.
13. In the method of operating an electronic device, In performing electronic signature (sig) and key encapsulation mechanism (KEM) operations, An operation that verifies the speed of computation when the operation is executed in either the trusted environment (TEE) or the secure environment (SEE); and Includes an operation for determining differently the execution environment in which the electronic signature (sig) and key encapsulation (key encapsulation, mechanism, KEM) operations are performed based on the verified operation speed. The above execution environment is A method comprising a secure environment (SEE) and a trusted environment (TEE).
14. In paragraph 13, The act of forwarding a verification request to a trusted environment (TEE) based on the verification request of an application in a common environment (REE); An operation of generating a PQC key pair including a public key and a private key on the above trusted environment (TEE); The action of encrypting (wrapping) the generated private key using a key encryption key (KEK) and an initialization vector (IV); An action to request signing of a certificate on a secure processor operating in a secure environment (SEE); An operation of performing verification on the received signature and certificate using the public key of the secure environment (SEE) in the general environment (REE) based on receiving a signature from the secure processor; and A method further comprising: storing a certificate, an encrypted private key, and identification information (ID) of an application requesting verification in memory (130) based on successful verification, and transmitting the verification result to the application.
15. In paragraph 14, An operation of checking whether a corresponding private key is stored in a secure memory (225) in the secure environment (SEE) based on receiving a message requiring information and a signature about an encrypted private key from an application in the general environment (REE) above. The act of transmitting information about a private key and a message requiring a signature to the trusted environment (TEE) based on the corresponding private key being stored in the secure memory; An operation of transmitting a message requiring information about a private key and a signature to the security processor using the above trusted environment; An operation of verifying a private key stored in the secure memory based on information about the received private key, and generating a signature for a message requiring a signature using the verified private key; and A method further comprising the steps of receiving a key generation request from the application, converting the request into a message using an application protocol data unit (APDU) format, and transmitting the converted message onto the security processor.
Citation Information
Patent Citations
Configurable devices for lattice cryptography
JP2020537450A
Method and apparatus for secure voice call
KR1020150071958A
Cathode active material for lithium secondary battery and lithium secondary battery including the same
KR102536950B1
Efficient quantum-attack resistant functional-safe building block for key encapsulation and digital signature
US20210119777A1