Electronic device and method for transmitting and receiving data on the basis of security operating system in electronic device

Various embodiments relating to an electronic device are described, and according to an embodiment, the electronic device may comprise a communication module which performs wireless communication; at least one processor which is electrically connected to the communication module; and a memory which stores instructions which cause at least one processor to receive or transmit data via communication with an external electronic device using the communication module on the basis of a first operating system and to process the received data or data to be transmitted to the external electronic device using a designated key on the basis of a second operating system, at the time of execution thereof.

CROSS-REFERENCE TO RELATED APPLICATIONS(S)

This application is a National Phase Entry of PCT International Application No. PCT/KR2018/014205, which was filed on Nov. 19, 2018 and claims a priority to Korean Patent Application No. 10-2017-0154918, which was filed on Nov. 20, 2017, the contents of which are incorporated herein by reference.

FIELD

Various embodiments of the disclosure relate to an electronic device and a method for transmitting or receiving data based on a secure operating system in the electronic device.

DESCRIPTION OF THE RELATED ART

Owing to the remarkable progress of the latest information communication technology, the latest semiconductor technology, and the like, the spread and use of various types of electronic devices have rapidly increased. In particular, the latest electronic devices are portable and can perform communication, can provide various services by using applications, and can transmit or receive various types of data to/from external electronic devices or external servers.

An electronic device may include at least one processor and an Operating System (OS) so that the electronic device can provide various services, and the OS of the electronic device is strategically opened by a major manufacturer and a major provider, and thus an application program interface, a software development kit, and even a source file are open to the public.

However, according to the use of such an open OS, the security of data of the electronic device becomes vulnerable, and actually, cases in which data of the electronic devices is damaged or hacked using various types of malicious codes, and the like have frequently occurred. Therefore, various types of methods for protecting data of an electronic device have recently been sought.

SUMMARY

Recently, according to a rapid increase in the connectivity of an electronic device, the electronic device and an external electronic device, such as an external server or another electronic device external to the electronic device, may be mutually operated through transmission/reception of data by the electronic device to/from the external electronic device. However, a security solution is inadequate for security at the time of transmission/reception of data between the electronic device and the external electronic device.

For example, a security solution at the time of transmission/reception of data between the electronic device and the external electronic device needs to consider both security of a communication channel and security of transmitted/received data, but a specific security solution for this configuration is not being provided.

Various embodiments of the disclosure may provide an electronic device and a method capable of, when data is transmitted or received between an electronic device and an external electronic device, safely transmitting or receiving data between the electronic device and the external electronic device by using a secure operating system.

Various embodiments of the disclosure may provide an electronic device and a method capable of, when data is transmitted or received between an electronic device and an external electronic device, safely transmitting or receiving data between the electronic device and the external electronic device by: performing secure communication between the electronic device and the external electronic device by using a first operating system; and processing encryption of data transmitted or received between the electronic device and the external electronic device by using a second operating system.

In accordance with an aspect of the disclosure, an electronic device may include: a communication module configured to perform wireless communication; a memory; and at least one processor configured to be electrically connected to the communication module and the memory, wherein the memory is configured to store instructions that, when executed, cause the at least one processor to: receive or transmit data via communication with an external electronic device by using the communication module based on a first operating system; and process the received data or data to be transmitted to the external electronic device by using a designated key based on a second operating system.

In accordance with another aspect of the disclosure, a method for transmitting or receiving data based on a secure operating system in an electronic device may include: receiving or transmitting data via communication with an external electronic device by using a communication module based on a first operating system; and processing the received data or data to be transmitted to the external server by using a designated key based on a second operating system.

In accordance with still another aspect of the disclosure, a non-transitory computer-readable recording medium may store a program configured to cause an electronic device to perform: receiving or transmitting data via communication with an external electronic device by using a communication module based on a first operating system; and processing the received data or data to be transmitted to the external electronic device by using a designated key based on a second operating system.

According to various embodiments, when data is transmitted or received between an electronic device and an external electronic device, communication between the electronic device and the external electronic device is performed based on a first operating system, and encryption of the data transmitted or received between the electronic device and the external electronic device is processed using a designated key shared between the electronic device and the external electronic device based on a second operating system, so that data can be safely transmitted or received between the electronic device and the external electronic device.

For example, a designated key shared between an electronic device and an external electronic device may be to encrypt data transmitted or received between the electronic device and the external electronic device, and thus the encrypted data may be decrypted only via the designated key. Therefore, even when the encrypted data is exposed in a communication process, due to decryption incapability of an attacker, it is possible to ensure the security of data transmitted or received between the electronic device and the external electronic device.

DETAILED DESCRIPTION

The processor120may execute, for example, software (e.g., a program140) to control at least one other component (e.g., a hardware or software component) of the electronic device101coupled with the processor120, and may perform various data processing and computation. The processor120may load a command or data received from another component (e.g., the sensor module176or the communication module190) in volatile memory132, process the command or the data stored in the volatile memory132, and store resulting data in non-volatile memory134. According to an embodiment, the processor120may include a main processor121(e.g., a central processing unit (CPU) or an application processor (AP)), and an auxiliary processor123(e.g., a graphics processing unit (GPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP)) that is operable independently from, or in conjunction with, the main processor121. Additionally or alternatively, the auxiliary processor123may be adapted to consume less power than the main processor121, or to be specific to a specified function. The auxiliary processor123may be operated separately from or embedded in the main processor121.

The auxiliary processor123may control, for example, at least some of functions or states related to at least one component (e.g., the display device160, the sensor module176, or the communication module190) among the components of the electronic device101, instead of the main processor121while the main processor121is in an inactive (e.g., sleep) state, or together with the main processor121while the main processor121is in an active (e.g., executing an application) state. According to an embodiment, the auxiliary processor123(e.g., an image signal processor or a communication processor) may be implemented as part of another component (e.g., the camera module180or the communication module190) functionally related to the auxiliary processor123. The memory130may store various data used by at least one component (e.g., the processor120or the sensor module176) of the electronic device101. The various data may include, for example, software (e.g., the program140) and input data or output data for a command related thereto. The memory130may include the volatile memory132or the non-volatile memory134.

The display device160may visually provide information to a user of the electronic device101. The display device160may include, for example, a display, a hologram device, or a projector and control circuitry to control a corresponding one of the display, hologram device, and projector. According to an embodiment, the display device160may include touch circuitry, or a pressure sensor adapted to measure the intensity of force incurred by the touch.

The interface177may support specified protocols to be used for the electronic device101to be coupled with the external electronic device (e.g., the electronic device102) wiredly or wirelessly. According to an embodiment, the interface177may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

The camera module180may capture a still image or moving images. The camera module180may include one or more lenses, image sensors, image signal processors, or flashes.

The power management module188may manage power supplied to the electronic device101. The power management module188may be implemented as at least part of, for example, a power management integrated circuit (PMIC).

According to an embodiment, the wireless communication module192may identify and authenticate the electronic device101in a communication network, using subscriber information stored in the subscriber identification module196.

The antenna module197may include at least one antenna for transmitting or receiving a signal or power to or from the outside of the electronic device101. According to an embodiment, the communication module190(e.g., the wireless communication module192) may transmit or receive a signal to or from the external electronic device via an antenna appropriate for a communication scheme.

The electronic device according to various embodiments disclosed herein may be one of various types of electronic devices. The electronic devices may include, for example, at least one of a portable communication device (e.g., a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance. According to an embodiment, the electronic devices are not limited to those described above.

Various embodiments as set forth herein may be implemented as software (e.g., the program140) including an instruction that is stored in a machine-readable storage medium (e.g., internal memory136or external memory138) that is readable by a machine (e.g., computer). The machine may invoke the instruction stored in the storage medium, be operated according to the instruction invoked, and include the electronic device (e.g., electronic device101) according to various embodiments. When the instruction is executed by a processor (e.g., the processor120), the processor may directly execute a function corresponding to the instruction, or use other components to execute the function under the control of the processor. The instruction may include a code generated by a complier or a code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Wherein, the term “non-transitory” simply means that the storage medium is a tangible device, and does not include a signal, but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

According to various embodiments, each component (e.g., a module or a program) of the above-described components may include a single entity or multiple entities. According to various embodiments, one or more of the above-described components may be omitted, or one or more other components may be added. Alternatively or additionally, some components (e.g., modules or programs) may be integrated into a single component. In such a case, according to various embodiments, the integrated component may still perform functions of each of some components in the same or similar manner as they are performed by a corresponding one of some components before the integration. According to various embodiments, operations performed by the module, the program, or another component may be carried out sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations may be executed in a different order or omitted, or one or more other operations may be added.

According to various embodiments, an electronic device (e.g., the electronic device101ofFIG. 1) may include: a communication module (e.g., the communication module190ofFIG. 1) configured to wirelessly communicate with an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1); a memory (e.g., the memory130ofFIG. 1); and at least one processor (e.g., the processor120ofFIG. 1) configured to be electrically connected to the communication module and the memory, wherein the memory is configured to store instructions that, when executed, cause the at least one processor to: receive or transmit data via communication with the external electronic device by using the communication module based on a first operating system; and process the received data or data to be transmitted to the external electronic device by using a designated key based on a second operating system.

According to various embodiments, the designated key may correspond to a secret key, and the memory may be configured to store the designated key in a storage area accessible only by the second operating system.

According to various embodiments, the memory may include a Replay Protected Memory Block (RPMB), and the designated key may be stored in the RPMB.

According to various embodiments, the memory may be configured to further store instructions that, when executed, cause the at least one processor to: allow the second operating system to encrypt the designated key and deliver the encrypted designated key to the first operating system; and allow the first operating system to transmit the encrypted designated key to the external electronic device via the communication module.

According to various embodiments, the instructions may be configured to cause the at least one processor to: when validity information, generated using the designated key, and first data are received from the external electronic device by using the communication module based on the first operating system, determine whether the first data is valid, by using the validity information based on the second operating system; and when the first data is valid, update data stored in the electronic device or a state of the electronic device based on the first data.

According to various embodiments, the validity information related to the first data may correspond to a token that the external electronic device generates based on the first data, the designated key, and a random value generated by the electronic device.

According to various embodiments, the validity information may include a Hash-based Message Authentication Code (HMAC).

According to various embodiments, the first data may include data for updating display data or a locked state of the electronic device.

According to various embodiments, the instructions may be configured to cause the at least one processor to, when a request for transmission of second data is received from the external electronic device by using the communication module based on the first operating system, encrypt and provide the second data by using the designated key based on the second operating system.

According to various embodiments, the memory may be configured to further store instructions that cause the at least one processor to: receive authentication information for authentication of the external electronic device, from the external electronic device by using the wireless communication module based on the first operating system; and authenticate the external electronic device by using the received authentication information based on the second operating system.

FIG. 2is a diagram illustrating a configuration of an electronic device201(e.g., the electronic device101ofFIG. 1) according to various embodiments. Referring toFIG. 2, the electronic device201may include a communication module210(e.g., the communication module190ofFIG. 1), a processor220(e.g., the processor120ofFIG. 1), and a memory230(e.g., the memory130ofFIG. 1).

The communication module210may support establishment of a wired or wireless communication channel between the electronic device201and an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1), and execution of communication via the established communication channel. According to various embodiments, the communication module210may support the electronic device201so that the electronic device201can, for example, communicate with the external server108based on a security protocol. For example, the security protocol may be a Transport Layer Security (TLS) protocol or a Secure Sockets Layer (SSL) protocol, and may be a protocol other than the TLS protocol or the SSL protocol.

The processor220may execute software (e.g., a first operating system233-1and a second operating system233-2) stored in the memory230, and thus may control at least another element (e.g., a hardware or software element) of the electronic device201connected to the processor220, so as to perform various data processings and arithmetic operations. The processor220may load commands or data received from another element (e.g., the communication module210) into a volatile memory (e.g., reference numeral132inFIG. 1), may process the same, and may store the resulting data in a non-volatile memory (e.g., reference numeral134inFIG. 1). According to an embodiment, as at least one processor, the processor220may include a main processor (e.g., reference numeral121inFIG. 1, i.e., a central processing unit or an application processor) and an auxiliary processor (e.g., reference numeral123inFIG. 1) which is configured to: be operable independently of the main processor; and additionally or alternatively, consume less power than the main processor, or be specific to a specified function.

The memory230may store software (e.g., the program140) and related data for various data processings and arithmetic operations within the electronic device201. According to various embodiments, the memory230may store instructions that, when executed, cause the processor220to: receive or transmit data via communication with an external electronic device (e.g., an external server, i.e., reference numeral108inFIG. 1) by using the communication module210based on the first operating system233-1; and process the received data or data to be transmitted to the external electronic device (e.g., the external server108) by using a designated key, for example, a secret key, based on the second operating system233-2. According to various embodiments, instructions may include software and related data.

According to various embodiments, software and related data may include a bootloader231, a kernel232, an operating system233, an application framework234, an application235, a Replay Protected Memory Block (RPMB)236, and user data237.

The bootloader231may perform a booting operation according power-on of electronic device201. According to various embodiments, when performing a booting operation, the bootloader231may check, through the kernel232, whether each of the first operating system233-1and the second operating system233-2is modified, and if the first operating system233-1and the second operating system233-2are normal, allow each of the first operating system233-1and the second operating system233-2to be loaded and operated by the processor220.

According to an embodiment, the kernel232may check whether a system image of each of the first operating system233-1and the second operating system233-2is modified, by using at least one module (e.g., a dm-verify module). According to an embodiment, a system image of the first operating system233-1may include all binaries and libraries constituting an application framework, and a system image of the second operating system233-2may include all binaries and libraries constituting a secure OS.

The operating system233may include the first operating system233-1and the second operating system233-2. According to various embodiments, according to power-on of the electronic device201, the first operating system233-1and the second operating system233-2may be loaded, and the processor220may operate based on the first operating system233-1or the second operating system233-2. According to various embodiments, the first operating system233-1may be a normal OS, and the second operating system233-2may be a secure OS which operates independently of the normal OS. According to various embodiments, the first operating system233-1may operate based on a first area22in the memory230, and the second operating system233-2may operate based on a second area24in the memory230. According to an embodiment, the first area22may be accessed by the first operating system233-1, and the second area24may be accessed by the second operating system233-2. For example, the first area22may be a normal area or a non-secure area, and the second area24may be a secure area. Processes in a normal area or a non-secure area correspond to an environment in which safety cannot be ensured from the threat of an external attacker, but a secure area corresponds to an independent processing environment (a Trusted Execution Environment (TEE)) which is distinguished from the normal area or the non-secure area and may correspond to an environment for protection of safety from the threat of an external attacker.

The application framework234may include a binary and a library needed to perform a function related to at least one application executable by the electronic device201, and may be accessed based on the first area22by the first operating system233-1.

According to various embodiments, the application framework234may include a client234-1and a daemon234-2. The client234-1may include a binary and a library needed to perform a function of receiving or transmitting data via communication with an external electronic device (e.g., an external server, i.e., reference numeral108inFIG. 1) by using the communication module210based on the first operating system233-1. The daemon234-2may include a binary and a library needed to perform a function of delivering data, received from an external server, via the kernel232to the application235which is based on the second operating system233-2, and delivering data, provided by the application235, via the kernel232to the client234-1which is based on the first operating system233-1.

The application235may be executed based on the second operating system233-2, and may be configured to process data received from an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1) or data to be transmitted to the external electronic device, by using a designated key, for example, a secret key.

The RPMB (236) area may be a storage area accessible by only the second operating system233-2. According to various embodiments, the RPMB (236) area may store a designated key, for example, a secret key. According to an embodiment, a designated key may be encrypted by the application235, and the encrypted designated key may be stored in the RPMB (236) area. According to various embodiments, a designated key may be shared by the electronic device201and an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1). For example, the electronic device201may authenticate the server108and provide a designated key to the server108when authentication of the server108is successful, and thus the designated key may be shared by the electronic device201and the server108. The external server may use the designated key provided by the electronic device201.

The user data (237) area may be accessed by various processes having an access right among processes which are based on the first operating system233-1and the second operating system233-2, and may store, therein, various data related to a user of the electronic device201.

According to various embodiments, the processor220may receive authentication information (certificate) for authentication of a server from the server (e.g., the server108ofFIG. 1) via the communication module210by using the client234-1based on the first operating system233-1, and may deliver the received authentication information to the application235, executed based on the second operating system233-2, by using the daemon234-2. The processor220may authenticate the external server by using the received authentication information through the application235executed based on the second operating system233-2. According to various embodiments, the processor220may provide a designated key to the authenticated server.

According to various embodiments, the processor220may encrypt a designated key by using the application236executed based on the second operating system233-2, and may deliver the encrypted designated key to the daemon234-2. The processor220may transmit the encrypted designated key, delivered to the daemon234-2, to a server (e.g., the server108ofFIG. 1) via the communication module210by using the client234-1.

According to various embodiments, the processor220may receive first data and validity information, generated using a designated key, from an external server (e.g., the server108ofFIG. 1) via the communication module210by using the client234-1based on the first operating system233-1, and may deliver the received first data and validity information to the application235, executed based on the second operating system233-2, by using the daemon234-2. The processor220may determine whether the first data is valid, by using the application235executed based on the second operating system233-2, and if the first data is valid, may update data, stored in the memory230, or a state of the electronic device201, based on the first data. According to various embodiments, validity information may be a token generated by the external server based on first data, a designated key, and a random value (e.g., a device nonce) generated by the electronic device. According to various embodiments, a token may include a Hash-based Message Authentication Code (HMAC). According to various embodiments, first data may include data for updating display data or a locked state of the electronic device.

According to various embodiments, the processor220may receive a request for transmission of second data (or a second data transmission request) from an external server (e.g., the server108ofFIG. 1) via the communication module210by using the client234-1based on the first operating system233-1, and may deliver the received second data transmission request to the application235, executed based on the second operating system233-2, by using the daemon234-2. The processor220may encrypt the requested second data by using a designated key through the application235executed based on the second operating system233-2, and may deliver the encrypted second data to the daemon234-2. The processor220may transmit the encrypted second data, delivered to the daemon234-2, to an external server (e.g., the server108ofFIG. 1) via the communication module210by using the client234-1.

According to various embodiments, a method for transmitting or receiving data based on a secure operating system in an electronic device (e.g., the electronic device101ofFIG. 1or the electronic device201ofFIG. 2) may include: receiving or transmitting data via communication with an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1) by using a communication module (e.g., the communication module190ofFIG. 1or the communication module210ofFIG. 2) based on a first operating system (e.g., the first operating system233-1ofFIG. 2); and processing the received data or data to be transmitted to the external electronic device by using a designated key based on a second operating system.

According to various embodiments, the designated key may correspond to a secret key, and may be stored in a storage area accessible only by the second operating system.

According to various embodiments, the electronic device may include a Replay Protected Memory Block (RPMB) which is a storage area accessible only by the second operating system.

According to various embodiments, the method may further include encrypting the designated key and delivering the encrypted designated key to the first operating system, by the second operating system, and transmitting the encrypted designated key to the external electronic device via the communication module, by the first operating system.

According to various embodiments, in the method, when validity information, generated using the designated key, and first data are received from the external electronic device by using the communication module based on the first operating system, whether the first data is valid may be determined using the designated key and the validity information based on the second operating system; and when the first data is valid, data stored in the electronic device or a state of the electronic device may be updated based on the first data.

According to various embodiments, the validity information may correspond to a token that the external electronic device generates based on the first data, the designated key, and a random value generated by the electronic device.

According to various embodiments, the first data may include data for updating display data or a locked state of the electronic device.

According to various embodiments, when a request for transmission of second data is received from the external electronic device by using the communication module based on the first operating system, the electronic device may encrypt and provide the second data by using the designated key based on the second operating system.

According to various embodiments, the method may further include: receiving authentication information for authentication of the external electronic device, from the external electronic device by using the wireless communication module based on the first operating system; and authenticating the external electronic device by using the received authentication information based on the second operating system.

FIG. 3is a flowchart illustrating an operation of an electronic device according to various embodiments.

Referring toFIG. 3, in operation310, the processor220(e.g., the processor120ofFIG. 1) of the electronic device201(e.g., the electronic device101ofFIG. 1) may receive or transmit data via communication with an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1) by using the communication module210based on the first operating system233-1. In operation320, the processor220may process the received data or data to be transmitted to the external server by using a designated key, for example, a secret key, based on the second operating system233-2.

FIG. 4is a flowchart illustrating an operation of an electronic device for transmitting a designated key to an external electronic device according to various embodiments.

Referring toFIG. 4, in operation410, the processor220(e.g., the processor120ofFIG. 1) of the electronic device201(e.g., the electronic device101ofFIG. 1) may receive authentication information (certificate) for authentication of an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1) (hereinafter, the server108will be described as an example of the external electronic device) based on the first operating system233-1. According to various embodiments, the processor220may receive authentication information (certificate) for authentication of the server108from the server108via the communication module210by using the client234-1of the application framework234based on the first operating system233-1, and may deliver the received authentication information to the application235, executed based on the second operating system233-2, by using the daemon234-2.

In operation420, the processor220may authenticate the server108by using the received authentication information based on the second operating system233-2. According to various embodiments, the processor220may authenticate the server108by using the received authentication information through the application235executed based on the second operating system233-2.

In operation430, the processor220may encrypt a designated key based on the second operating system233-2. According to various embodiments, when authentication of the server108is successful, the processor220may encrypt a designated key by using the application235executed based on the second operating system233-2, and may deliver the encrypted designated key to the daemon234-2which is based on the first operating system233-1.

According to various embodiments, the processor220may encrypt a designated key by using a hybrid encryption scheme. The hybrid encryption scheme may be configured to: encrypt actual data, that is, a designated key, by using symmetric encryption (e.g., an Advanced Encryption Standard (AES) algorithm); and encrypt a key and an Initial Vector (IV), which are used for the symmetric encryption, by using asymmetric encryption (e.g., Rivest Shamir Adleman (RSA)). In other words, a session key and an IV, which are used for the symmetric encryption, may be values randomly generated for every protocol, and as a result, a session key and an IV may be generated and used to encrypt a designated key. According to an embodiment, a combination of a designated key, a device nonce generated by the electronic device, and a server nonce in the server108may be encrypted using a session key and an IV which have been generated. The encrypted designated key can be decrypted only by the server, and thus even when the encrypted designated key is exposed in a communication process, due to decryption incapability of an attacker, the attacker may not acquire the designated key. Therefore, it is possible to ensure the security of a designated key transmitted from the electronic device to the server.

In operation440, the processor220may transmit the encrypted designated key to the server108based on the first operating system233-1. According to various embodiments, the processor220may transmit the encrypted designated key, delivered to the daemon234-2which is based on the first operating system233-1, to the server108via the communication module210by using the client234-1.

FIG. 5is a flowchart illustrating an operation of an electronic device for receiving data from an external electronic device according to various embodiments.

Referring toFIG. 5, in operation510, the processor220(e.g., the processor120ofFIG. 1) of the electronic device201(e.g., the electronic device101ofFIG. 1) may receive first data and validity information, which is based on a designated key, from an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1) (hereinafter, the server108will be described as an example of the external electronic device) based on the first operating system233-1. For example, the first data is data for which a write request is received by the electronic device201and which is then written to the electronic device201, and after receiving a write request from the server108, the processor220may receive first data and validity information from the server108. According to various embodiments, the processor220may receive first data and validity information from the server108via the communication module210by using the client234-1based on the first operating system233-1, and may deliver the received first data and validity information to the application235, executed based on the second operating system233-2, by using the daemon234-2.

In operation520, the processor220may determine whether the received first data is valid, by using the received validity information based on the second operating system233-2. According to various embodiments, validity information may be a token that the external server generates based on first data, a designated key, and a random value (nonce) generated by the electronic device. According to various embodiments, a token may include an HMAC. According to various embodiments, the processor220may determine the HMAC by using a designated key through the application, executed based on the second operating system233-2, and thus may determine whether first data is valid.

In operation530, if the first data is valid, the processor220may update data stored in the memory230or a state of the electronic device201by using the first data. According to various embodiments, if the first data is valid, the processor220may update data stored in the memory230or a state of the electronic device201by using the first data through the application235executed based on the second operating system233-2. According to various embodiments, first data may include data for updating display data or a locked state of the electronic device.

FIG. 6is a flowchart illustrating an operation of an electronic device for transmitting data to an external electronic device according to various embodiments.

Referring toFIG. 6, in operation610, the processor220(e.g., the processor120ofFIG. 1) of the electronic device201(e.g., the electronic device101ofFIG. 1) may receive a request for transmission of second data (or a second data transmission request) from an external electronic device (e.g., the electronic device102, the electronic device104, or the server108ofFIG. 1) (hereinafter, the server108will be described as an example of the external electronic device) based on the first operating system233-1. For example, the second data transmission request may be a read request for making a request for reading data of the electronic device201. According to various embodiments, the processor220may receive a request for transmission of second data (or a second data transmission request) from a server (e.g., the server108ofFIG. 1) via the communication module210by using the client234-1based on the first operating system233-1, and may deliver the received second data transmission request to the application235, executed based on the second operating system233-2, by using the daemon234-2.

In operation620, the processor220may encrypt the requested second data based on the second operating system233-2, and may provide the encrypted second data. According to various embodiments, the processor220may encrypt the requested second data by using a designated key through the application235executed based on the second operating system233-2. According to various embodiments, the processor220may encrypt second data by using a hybrid encryption scheme. The hybrid encryption scheme may be configured to: encrypt actual data, that is, second data, by using symmetric encryption (e.g., an AES algorithm); and encrypt a key and an IV, which are used for the symmetric encryption, by using asymmetric encryption (e.g., RSA). In other words, a session key and an IV, which are used for the symmetric encryption, may be values randomly generated for every protocol, and as a result, a session key and an IV may be generated and used to encrypt second data. According to an embodiment, a combination of second data, a nonce (a random value) generated by the electronic device, and a nonce (a random value) generated by the server may be encrypted using a session key and an IV which have been generated. The encrypted second data can be decrypted only by the server, and thus even when the encrypted second data is exposed in a communication process, due to decryption incapability of an attacker, the attacker may not acquire the second data. Therefore, it is possible to ensure the security of second data transmitted from the electronic device to the server.

According to various embodiments, the processor220may deliver the encrypted second data to the daemon234-2via the application235based on the first operating system233-1.

In operation630, the processor220may transmit the encrypted second data to the server108based on the first operating system233-1. According to various embodiments, the processor220may transmit the encrypted second data, delivered to the daemon234-2which is based on the first operating system233-1, to the server108via the communication module210by using the client234-1.

FIG. 7is a diagram illustrating an operation of sharing a designated key between an electronic device and a server according to various embodiments.

Referring toFIG. 7, the electronic device701(e.g., the electronic device101ofFIG. 1or the electronic device201ofFIG. 2) may operate based on a first operating system701-1(e.g., the first operating system233-1ofFIG. 2) and a second operating system701-2(e.g., the second operating system233-2ofFIG. 2). In operation712, the electronic device701may transmit an initial registration request (an initialization request) message to the server702(e.g., the server108ofFIG. 1) based on the first operating system701-1. According to an embodiment, an initialization request message may include device unique info of the electronic device701. For example, the device unique info may include an International Mobile Equipment Identity (IMEI) of the electronic device.

When an initialization request message is received, in operation714, the server702may determine whether the electronic device701is an initial registration target device, and if the electronic device701is an initial registration target device, may generate a server nonce. According to an embodiment, a server nonce may be a one-time value randomly generated by the server702.

In operation716, the server702may transmit the generated server nonce and a server cert, which is authentication information (certificate) for authentication of a server, to the electronic device701. According to various embodiments, the server702may store authentication information indicating a server capable of interworking with the electronic device701. According to an embodiment, the authentication information for authentication of a server may be issued by a ROOT CA (e.g., a manufacturer of the electronic device) related to the electronic device701, and may be stored in the server702.

The electronic device701may receive a server nonce and a server cert based on the first operating system701-1, and in operation718, may deliver the received server nonce and server cert to the second operating system701-2. According to an embodiment, the electronic device701may deliver the received server nonce and server cert to an application (e.g., reference numeral235inFIG. 2) executed based on the second operating system701-2.

In operation720, the electronic device701may determine whether the authentication information for authentication of a server (server cert) is valid, based on the second operating system701-2, and if the server cert is valid, may encrypt a designated key (a secret key) to be shared with the server702. According to various embodiments, the electronic device701may encrypt a designated key (a secret key) by using a hybrid encryption scheme through an application (e.g., reference numeral235) executed based on the second operating system701-2. For example, based on the second operating system701-2, the electronic device701may generate a device nonce, may generate a session key and an IV for hybrid encryption, and may then generate an encryption message (TaMsg) corresponding to the designated key (secret key) by using the session key and the IV, the designated key, the server nonce, and the device nonce.

In operation722, the electronic device701may deliver, to the first operating system701-1, the encryption message (TaMsg) corresponding to the designated key generated based on the second operating system701-2. For example, the electronic device701may deliver the generated encryption message (TaMsg) corresponding to the designated key to a client (e.g., reference numeral234-1inFIG. 2), which is based on the first operating system701-1, by using an application (e.g., reference numeral235inFIG. 2) which is based on the second operating system701-2.

In operation724, the electronic device701may deliver the encryption message (TaMsg) corresponding to the designated key to the server702via a communication module based on the first operating system701-1, and the server702may receive the encryption message (TaMsg) corresponding to the designated key.

In operation726, the server702may decrypt the encryption message (TaMsg) which corresponds to the designated key and has been received from the electronic device701, may identify the designated key (secret key), the server nonce, and the device nonce, and if a result of identifying of the designated key (secret key), the server nonce, and the device nonce is normal, may store the designated key (secret key).

In operation728, the server702may generate information, for example, a token, for notifying of successful reception of the designated key (secret key). According to various embodiments, the server702may substitute the designated key (secret key) into a key of an algorithm of an HMAC, may substitute the device nonce into a value, and thus may generate an HMAC value. In operation730, the server702may transmit the generated HMAC value to the electronic device701.

The electronic device701may receive information, for example, a token, notifying of successful reception of the designated key (secret key) from the server702based on the first operating system701-1, and in operation732, may deliver the received token to the second operating system701-2. According to an embodiment, the electronic device701may deliver the received token to an application (e.g., reference numeral235inFIG. 2), executed based on the second operating system701-2, based on the first operating system701-1.

In operation734, the electronic device701may identify the token, received from the first operating system701-1, based on the second operating system701-2, and thus may identify that the server702has successfully received the designated key (secret key). If it is identified that the token is normal, the electronic device701may store the designated key (secret key) in an RPMB (e.g., the RPMB236ofFIG. 2).

In operation736, the electronic device701may deliver a device result, identified based on the second operating system701-2, to the first operating system701-1, and in operation738, may transmit the identified device result to the server702via the communication module based on the first operating system701-1. Therefore, the electronic device701and the server702may safely share the same designated key (secret key).

FIG. 8is a diagram illustrating operations of an electronic device and a server according to a data write request of the server according to various embodiments.

Referring toFIG. 8, in operation812, the server702(e.g., the server108ofFIG. 1) may transmit a data write request message to the electronic device701(e.g., the electronic device101ofFIG. 1or the electronic device201ofFIG. 2). According to various embodiments, when data stored in the electronic device701or a state of the electronic device701needs to be updated, the server702may transmit, to the electronic device701, a message for making a request for writing first data, needed to update the stored data or the state, to the electronic device701. According to an embodiment, when data stored in the electronic device701or a state of the electronic device701needs to be updated, the server702may generate a server nonce, and may transmit, to the electronic device701, a data write request message including the generated server nonce and a server cert which is authentication information (certificate) for authentication of a server. According to an embodiment, a server nonce may be a one-time value randomly generated by the server.

According to various embodiments, the electronic device701may operate based on the first operating system701-1(e.g., the first operating system233-1ofFIG. 2) and the second operating system701-2(e.g., the second operating system233-2ofFIG. 2), and may receive a data write request message by using a client (e.g., the client234-1ofFIG. 2) based on the first operating system701-1.

When the electronic device701receives a data write request message based on the first operating system701-1, in operation814, the electronic device701may deliver a server nonce and a server cert, included in the data write request message, to the second operating system701-2. For example, the electronic device701may deliver the server nonce and the server cert to an application (e.g., reference numeral235inFIG. 2) executed based on the second operating system701-2.

In operation816, the electronic device701may determine whether authentication information for authentication of a server (server cert) is valid, based on the second operating system701-2, and if the server cert is valid, may generate and encrypt a device nonce. According to an embodiment, a device nonce may be a one-time value randomly generated by the electronic device701. According to various embodiments, the electronic device701may encrypt a device nonce by using a hybrid encryption scheme through an application (e.g., reference numeral235) executed based on the second operating system701-2. For example, based on the second operating system701-2, the electronic device701may generate a device nonce, may generate a session key and an IV for hybrid encryption, and may then generate an encryption message (TaMsg) corresponding to a designated key by using the session key and the IV, the server nonce, and the device nonce.

In operation818, the electronic device701may deliver, to the first operating system701-1, the encryption message (TaMsg) corresponding to the device nonce generated based on the second operating system701-2. For example, the electronic device701may deliver the encryption message (TaMsg) corresponding to the device nonce to a client (e.g., the client234-1ofFIG. 2), which is based on the first operating system701-1, by using an application (e.g., the application235ofFIG. 2) which is based on the second operating system701-2.

In operation820, the electronic device701may deliver the encryption message (TaMsg) corresponding to the device nonce to the server702via a communication module based on the first operating system701-1, and the server702may receive the encryption message (TaMsg) corresponding to the device nonce.

In operation822, the server702may decrypt the encryption message (TaMsg) which corresponds to the device nonce and has been received from the electronic device701, and thus may identify the device nonce.

In operation824, if it is identified that the device nonce is normal, the server702may generate validity information (token), and may transmit the validity information (e.g., a token or an HMAC) and first data to the electronic device701. According to various embodiments, validity information may include a token for determination of the validity of first data for which a write request is received by the electronic device701and which is then written to the electronic device701. According to an embodiment, the server702may generate a token based on first data, a designated key (e.g., a secret key), and a device nonce. According to various embodiments, the server702may substitute the secret key into a key of an algorithm of an HMAC, may substitute the first data (state or data) and the device nonce into a value, and thus may generate an HMAC. The server702may transmit the validity information (e.g., a token or an HMAC) and the first data to the electronic device701.

In operation826, the electronic device701may receive validity information (e.g., a token or an HMAC) and first data from the server702based on the first operating system701-1, and in operation828, may deliver the validity information and the first data to an application (e.g., the application235ofFIG. 2) executed based on the second operating system701-2.

In operation828, the electronic device701may determine whether the first data is valid, by using the designated key (e.g., a secret key) and the validity information through the application (e.g., the application235ofFIG. 2) executed based on the second operating system701-2, and if the first data is valid, may update data, stored in a memory (e.g., the memory230ofFIG. 2) or in an RPMB (e.g., the RPMB236ofFIG. 2), or a state of the electronic device701, by using the first data. According to various embodiments, first data may include data for updating display data or a locked state of the electronic device.

In operation830, the electronic device701may generate information (device result) for notifying of successful update of the stored data or the state, based on the second operating system701-2, and may deliver, to the first operating system701-1, the information (device result) for notifying of the successful update of the stored data or the state. In operation832, the electronic device701may transmit the information (device result) for notifying of the successful update of the stored data or the state, to the server701via a communication module based on the first operating system701-1.

FIG. 9is a diagram illustrating operations of an electronic device and a server according to a data read request of the server according to various embodiments.

Referring toFIG. 9, in operation912, the server702(e.g., the server108ofFIG. 1) may transmit a data read request message to the electronic device701(e.g., the electronic device101ofFIG. 1or the electronic device201ofFIG. 2). According to various embodiments, when the server702is to identify data stored in the electronic device701or a state of the electronic device701, the server702may transmit, to the electronic device701, a message for making a request for reading, from the electronic device701, second data needed to identify update of the stored data or the state. According to an embodiment, when the server702needs to identify data stored in the electronic device701or a state of the electronic device701, the server702may generate a server nonce, and may transmit, to the electronic device701, a data read request message including the generated server nonce and a server cert which is authentication information (certificate) for authentication of a server. According to an embodiment, a server nonce may be a one-time value randomly generated by the server.

According to various embodiments, the electronic device701may operate based on the first operating system701-1(e.g., the first operating system233-1ofFIG. 2) and the second operating system701-2(e.g., the second operating system233-2ofFIG. 2), and may receive a data read request message by using a client (e.g., the client234-1ofFIG. 2) based on the first operating system701-1.

When the electronic device701receives a data read request message based on the first operating system701-1, in operation914, the electronic device701may deliver a server nonce and a server cert, which are included in the data read request message, to the second operating system701-2. For example, the electronic device701may deliver a server nonce and a server cert to an application (e.g., reference numeral235inFIG. 2) executed based on the second operating system701-2.

In operation916, the electronic device701may determine whether authentication information for authentication of the server702(server cert) is valid, based on the second operating system701-2, and if the server cert is valid, may read and encrypt second data requested to be read. According to various embodiments, the electronic device701may encrypt second data by using a hybrid encryption scheme through an application (e.g., the application235ofFIG. 2) executed based on the second operating system701-2. For example, the electronic device701may generate a session key and an IV for hybrid encryption, and may then generate an encryption message (TaMsg) corresponding to the second data by using the session key and the IV, the server nonce, and the second data (state or data).

In operation918, the electronic device701may deliver, to the first operating system701-1, the encryption message (TaMsg) corresponding to the second data generated based on the second operating system701-2. For example, the electronic device701may deliver the encryption message (TaMsg) corresponding to the second data to a client (e.g., the client234-1ofFIG. 2), which is based on the first operating system701-1, by using an application (e.g., the application235ofFIG. 2) which is based on the second operating system701-2.

In operation920, the electronic device701may deliver the encryption message (TaMsg) corresponding to the second data to the server702via a communication module based on the first operating system701-1, and the server702may receive the encryption message (TaMsg) corresponding to the second data.

In operation922, the server702may decrypt the encryption message (TaMsg) which corresponds to the second data and has been received from the electronic device701, and thus may acquire the second data. According to various embodiments, the server702may identify a state of the electronic device701or data stored in the electronic device701, by using the second data.

Each of the elements described in the disclosure may include one or more components, and the name of the corresponding element may vary depending on the type of electronic device. In various embodiments, an electronic device may include at least one of the elements described herein. Some of the elements may be omitted from the electronic device, or the electronic device may further include other additional elements. Further, some of the elements of the electronic device according to various embodiments may be combined to constitute a single entity, making it possible to equivalently perform functions of the corresponding elements before being combined.

The term “module” used in the disclosure may refer to, for example, a unit including one or a combination of two or more of hardware, software, or firmware. The term “module” may be used interchangeably with, for example, the term “unit”, “logic”, “logical block”, “component”, or “circuit”. The “module” may be a minimum unit or a part of an integrally-configured component. The “module” may be a minimum unit performing one or more functions or a part thereof. The “module” may be implemented mechanically or electronically. For example, the “module” may include at least one of an Application-Specific Integrated Circuit (ASIC) chip, Field-Programmable Gate Arrays (FPGAs), or a programmable-logic device, all of which are known or to be developed in the future and perform certain operations.

At least some of devices (e.g., modules or functions thereof) or methods (e.g., operations) according to various embodiments may be implemented by an instruction which is stored in a computer-readable storage medium, for example, in the form of a program module. When the instruction is executed by a processor (e.g., the processor120), the at least one processor may perform a function corresponding to the instruction. A computer-readable storage medium may be, for example, the memory130.

According to various embodiments, a computer-readable recording medium may store a program configured to cause an electronic device to perform: receiving or transmitting data via communication with an external electronic device by using a communication module based on a first operating system; and processing the received data or data to be transmitted to the external electronic device by using a designated key based on a second operating system.

Examples of a computer-readable recording medium may include a hard disk, a floppy disk, a magnetic medium (e.g., a magnetic tape), an optical medium (e.g., a Compact Disc Read-Only Memory (CD-ROM) or a Digital Versatile Disc (DVD)), a magneto-optical medium (e.g., a floptical disk), a hardware device (e.g., a Read-Only Memory (ROM), a Random Access Memory (RAM), or a flash memory), and the like. Further, examples of program instructions may include high class language codes that can be executed by a computer by using an interpreter and the like, as well as machine language codes generated by a compiler. The above-described hardware device may be configured to operate as at least one software module so as to perform operations of various embodiments, and vice versa.

The module or program module according to various embodiments may include one or more of the above-described elements or may further include other additional elements, or some of the above-described elements may be omitted therefrom. The operations performed by the modules, the program modules, or other elements according to various embodiments may be performed in a sequential, parallel, repetitive, or heuristic manner. Further, some of the operations may be performed in another order or omitted, or other operations may be added thereto.

The above-described electronic device according to various embodiments of the disclosure is not limited by the above-described embodiments and the drawings. Further, it will be apparent to those having common knowledge in the technical field to which the disclosure pertains that various replacements, changes in form, and modifications may be made to the embodiments without departing from the technical scope of the disclosure.