Patent Description:
Through the development of information and communications technology and semiconductor technology, various types of electronic devices have developed into multimedia devices providing various multimedia services. For example, the multimedia services may include at least one of a voice call service, message service, broadcasting service, wireless Internet service, camera service, electronic payment service, or music playback service.

As the services provided through electronic devices become more diverse, the amount of personal information stored in the electronic devices is increasing. For example, personal information stored in an electronic device may include information requiring a security configuration, such as payment information, and information related to a certificate and credentials. Document <CIT> is a relevant prior-art document in the field of security configuration of a device.

Personal information stored in electronic devices may be leaked to the outside due to various types of attacks. For example, the various types of attacks may include an insider attack. For example, an insider attack may include an attack method in which, when a binary including a personal information releasing function is signed with a valid signature key and is installed in an electronic device without user consent as though the binary were a normal binary, personal information stored in the electronic device is leaked to the outside by the personal information releasing function included in the binary.

An insider attack may occur due to buggy code or malicious code, such as a personal information releasing function, included and issued in a normal binary by an insider having authority related to personal information. Accordingly, electronic devices require a method for preventing an insider attack caused by updating firmware from an unreliable source without the user being aware of the attack.

Various embodiments provide an apparatus and a method for updating firmware by using a security integrated circuit in an electronic device.

The invention is defined in the independent claims <NUM> and <NUM>. According to various embodiments, an electronic device may include: a security integrated circuit (IC) providing a rich execution environment and a secure execution environment, wherein the security integrated circuit includes a main processor operating in the rich execution environment and a secure processor operating in the secure execution environment, and wherein the secure processor is configured to: perform user authentication, based on firmware update information received from a server through the main processor; if the user authentication is successful, generate authentication information corresponding to the firmware update information; store the authentication information in at least a part of a secure memory; if the firmware is installed, perform authentication of the firmware, based on the authentication information stored in the secure memory; and if the authentication of the firmware is successful, install the firmware.

According to various embodiments, an operation method of an electronic device may include: in a security integrated circuit (IC) including a main processor operating in a rich execution environment and a secure processor operating in a secure execution environment, performing user authentication by the secure processor, based on firmware update information received from a server through the main processor; if the user authentication is successful, generating authentication information corresponding to the firmware update information; storing the authentication information in at least a part of a secure memory; if corresponding firmware is installed, performing authentication of the firmware, based on the authentication information stored in the secure memory; and if the authentication of the firmware is successful, installing the firmware.

According to various embodiments, if an electronic device succeeds in the user authentication of update information related to firmware by using a security integrated circuit, the electronic device may generate authentication information and store the generated authentication information in a secure memory, and update firmware, based on the authentication information stored in the secure memory at a time point for update of the firmware. Therefore, the electronic device can securely and efficiently update the firmware.

Hereinafter, various embodiments of the disclosure will be described in detail with reference to the accompanying drawings.

The input device <NUM> may include, for example, a microphone, a mouse, a keyboard, or a digital pen (e.g., stylus pen).

Each of the external electronic devices <NUM> and <NUM> may be a device of a same type as, or a different type, from the electronic device <NUM>.

It is to be understood that if an element (e.g., a first element) is referred to, with or without the term "operatively" or "communicatively", as "coupled with," "coupled to," "connected with," or "connected to" another element (e.g., a second element), the element may be coupled with the other element directly (e.g., wiredly), wirelessly, or via a third element.

Wherein, the "non-transitory" storage medium is a tangible device, and does not include a signal (e.g., an electromagnetic wave), but this term may not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

<FIG> illustrates a block diagram of an electronic device <NUM> for updating firmware according to various embodiments. In the following description, the electronic device <NUM> may include at least a part of the electronic device <NUM> in <FIG>.

Referring to <FIG>, the electronic device <NUM> may include a security integrated circuit (IC) <NUM> supporting a general environment (rich execution environment) and a secure environment (secure execution environment).

According to various embodiments, the security integrated circuit <NUM> may employ a system-on-chip (SoC) including a main processor <NUM>, a secure processor <NUM>, and a secure memory <NUM>. According to an embodiment, the main processor <NUM> may be substantially identical to the main processor <NUM> in <FIG>, or may be included therein. The secure processor <NUM> may be substantially identical to the auxiliary processor <NUM> in <FIG>, or may be included therein. The secure memory <NUM> may be substantially identical to the non-volatile memory <NUM> in <FIG>, or may be included therein.

According to various embodiments, the main processor <NUM> may control processing and calculation of data in a rich execution environment. According to an embodiment, if the use environment of the electronic device <NUM> satisfies a firmware update condition, the main processor <NUM> may transmit a request signal for updating firmware to the secure processor <NUM>. For example, the firmware update condition may include at least one of "install now", "install at night", "install upon wireless LAN access", or "install at a particular time". The firmware update condition may be configured by a user. For example, the main processor <NUM> may include an application processor (AP).

According to various embodiments, the secure processor <NUM> may be operatively connected to the main processor <NUM> to communicate with the main processor <NUM>. The secure processor <NUM> may receive a request for operating or initializing a secure execution environment from the main processor <NUM>, and control processing and calculation of data in the secure execution environment. For example, the secure processor <NUM> may include at least one of a processing module, an encryption module, a secure memory controller, a secure cache, read only memory (ROM), random access memory (RAM), a memory controller (MEM controller), or a security sensor.

According to an embodiment, if the secure processor <NUM> determines that update information related to firmware, received from the main processor <NUM>, is valid, the secure processor may perform user authentication of the update information related to the firmware. If the secure processor <NUM> succeeds in user authentication of update information related to firmware, the secure processor may generate authentication information related to the firmware and may store the generated authentication information in the secure memory <NUM>. For example, the update information related to firmware may include at least one of firmware version information, patch contents, hash information related to the firmware, or a signature of an external apparatus (e.g. a server). For example, the validity of update information related to the firmware may be determined based on a signature of an external apparatus, by which whether the update information has been forged or falsified and the source of the update information can be identified. For example, the authentication information related to firmware may include at least one of version information of the firmware, hash information, and a hash-based message authentication code (HMAC) value of the secure processor <NUM>, or information related to approval of the authentication information. For example, the version information of the firmware may include identification information of a firmware binary and/or version information (e.g. rollback prevention version (RP) of the firmware binary. The version information of the firmware binary may be signed with a signature key of a manufacturer, and thus the integrity of the version information may be ensured. For example, the hash information may include a hash value of the firmware binary. For example, the information related to approval of authentication information may include approval time point information of the authentication information and/or approval expiration time point information of the authentication information. For example, an approval expiration time point of authentication information may be configured based on an approval time point of the authentication information, or may be randomly configured based on a user input.

According to an embodiment, if the secure processor <NUM> receives a request signal for updating firmware from the main processor <NUM>, the secure processor may determine whether authentication information stored in the secure memory <NUM> is valid. For example, the validity of authentication information stored in the secure memory <NUM> may be determined based on at least one of approval time point information of the authentication information, approval expiration time point information, or an HMAC value of the authentication information, which are included in the authentication information.

According to an embodiment, if the secure processor <NUM> has determined that authentication information stored in the secure memory <NUM> is valid, the secure processor <NUM> may authenticate firmware requested to be updated by the main processor <NUM>, based on the authentication information stored in the secure memory <NUM>. If the secure processor <NUM> succeeds in authenticating firmware requested to be updated by the main processor <NUM>, the secure processor may update the firmware of the electronic device <NUM>. For example, if hash information of authentication information and hash information of firmware requested to be updated by the main processor <NUM> are identical to each other, the secure processor <NUM> may determine that authentication of the firmware is successful.

According to various embodiments, the secure memory <NUM> may be operatively connected to the secure processor <NUM>. For example, the secure memory <NUM> may perform encrypted communication with the secure processor <NUM> by using a key (e.g. subscriber management key (SMK)) previously shared with the secure processor <NUM>. According to an embodiment, the secure memory <NUM> may store authentication information related to firmware, received from the secure processor <NUM>, and/or the firmware. For example, the firmware stored in the secure memory <NUM> may include firmware currently running in the electronic device <NUM>. For example, when the firmware of the electronic device <NUM> is updated, the secure memory <NUM> may store the updated firmware of the electronic device <NUM> by a control of the secure processor <NUM>.

Referring to <FIG>, the electronic device <NUM> may include a security integrated circuit <NUM> and a non-secure memory <NUM>. According to an embodiment, the non-secure memory <NUM> may be substantially identical to the non-volatile memory <NUM> in <FIG>, or may be included therein.

According to various embodiments, the security integrated circuit <NUM> may employ a system-on-chip including a main processor <NUM> operating in a rich execution environment, a secure processor <NUM> operating in a secure execution environment, and a secure memory <NUM>. The security integrated circuit <NUM> of the electronic device <NUM> may operate in a manner similar to the security integrated circuit <NUM> of the electronic device <NUM> in <FIG>. For example, a main processor <NUM>, a secure processor <NUM>, and a secure memory <NUM> in <FIG> may operate in a manner similar to the main processor <NUM>, the secure processor <NUM>, and the secure memory <NUM> in <FIG>. Accordingly, in order to avoid a duplicate description of <FIG>, a detailed description of the elements of the security integrated circuit <NUM> of the electronic device <NUM> is omitted.

According to various embodiments, if the secure processor <NUM> has updated the firmware of the electronic device <NUM>, the main processor <NUM> may store the updated firmware in the non-secure memory <NUM>. According to an embodiment, if the secure processor <NUM> has updated the firmware of the electronic device <NUM>, the main processor <NUM> may store firmware received from the secure processor <NUM> and signature information of the secure processor <NUM> in the non-secure memory <NUM>. For example, the signature information of the secure processor <NUM> may include a security key (e.g. fused rights encryption key (REK), or fused bit) so as to secure communication of the secure processor <NUM>.

According to various embodiments, the non-secure memory <NUM> may store various pieces of data used by at least one element (e.g. the main processor <NUM>) of the electronic device <NUM> in a rich execution environment. According to an embodiment, the non-secure memory <NUM> may include a first region <NUM> and a second region <NUM> for storing firmware. For example, the first region <NUM> may be designated to be a non-active region in which new firmware downloaded from an external apparatus to update firmware is stored. The second region <NUM> may be designated to be an active region in which firmware currently running in the electronic device <NUM> is stored. According to an embodiment, if the secure processor <NUM> has updated the firmware of the electronic device <NUM>, based on firmware stored in the first region <NUM>, the first region <NUM> of the non-secure memory <NUM> may be changed to an active region by a control of the main processor <NUM>. That is, firmware stored in the first region <NUM> may be configured to be firmware currently running in the electronic device <NUM> through firmware updating. Signature information of the secure processor <NUM> may be stored together with the firmware of the electronic device <NUM> in the first region <NUM>. According to an embodiment, if the secure processor <NUM> has updated the firmware of the electronic device <NUM>, the second region <NUM> of the non-secure memory <NUM> may be changed to a non-active region by a control of the main processor <NUM>. Signature information related to previously stored firmware may be removed from the second region <NUM>.

Referring to <FIG>, the electronic device <NUM> may include a security integrated circuit <NUM>, a secure memory <NUM>, and a non-secure memory <NUM>.

According to various embodiments, the security integrated circuit <NUM> may employ a system-on-chip including a main processor <NUM> operating in a rich execution environment and a secure processor <NUM> operating in a secure execution environment. The security integrated circuit <NUM> of the electronic device <NUM> may operate in a manner similar to the security integrated circuit <NUM> of the electronic device <NUM> in <FIG>, differing in that the secure memory <NUM> is separate from the security integrated circuit <NUM>. For example, the main processor <NUM> and the secure processor <NUM> in <FIG> may operate in a manner similar to the main processor <NUM> and the secure processor <NUM> in <FIG>. Accordingly, in order to avoid a duplicate description of <FIG>, a detailed description of the elements of the security integrated circuit <NUM> of the electronic device <NUM> is omitted.

According to various embodiments, the secure processor <NUM> may encrypt data transmitted to the secure memory <NUM> in order to prevent the data from being exposed to the outside due to the secure memory <NUM> existing outside the security integrated circuit <NUM>. According to an embodiment, if the secure processor <NUM> succeeds in user authentication of update information related to firmware, the secure processor may generate an authentication key (AK) and an encryption key (EK). The authentication key may be used for generating an HMAC value included in authentication information. The encryption key may be used for encrypting information included in authentication information. For example, the authentication key may be generated through a key derivation function (KDF) to which a key (e.g. SMK) previously shared between the secure processor <NUM> and the secure memory <NUM> and a security key (e.g. fused REK, or fused bit) defined for securing communication of the secure processor <NUM> are applied. For example, the encryption key may be generated through a KDF, to which a security key is applied, to secure communication of the secure processor <NUM>. According to an embodiment, the main processor <NUM> may store data (e.g. authentication information) encrypted by the secure processor <NUM> in the secure memory <NUM>.

According to various embodiments, the non-secure memory <NUM> may store various pieces of data used by at least one element (e.g. the main processor <NUM>) of the electronic device <NUM> in a rich execution environment. According to an embodiment, the non-secure memory <NUM> may include a first region <NUM> (e.g. the first region <NUM> in <FIG>) and a second region <NUM> (e.g. the second region <NUM> in <FIG>) for storing firmware.

According to various embodiments, the secure processor <NUM> may encrypt data transmitted to the secure memory <NUM> in order to prevent the data from being exposed to the outside due to the secure memory <NUM> existing outside the security integrated circuit <NUM>. According to an embodiment, the secure processor <NUM> may encrypt security information, based on a key (e.g. SMK) previously shared with the secure memory <NUM>. The secure processor <NUM> may store security information encrypted based on a previously shared key in the secure memory <NUM>.

According to various embodiments, an electronic device (e.g. the electronic device <NUM> in <FIG>) may include a security integrated circuit (IC) providing a rich execution environment and a secure execution environment, wherein the security integrated circuit (e.g. the security integrated circuit <NUM> in <FIG>) includes a main processor (e.g. the main processor <NUM> in <FIG>) operating in the rich execution environment, and a secure processor (e.g. the secure processor <NUM> in <FIG>) operating in the secure execution environment, and wherein the secure processor is configured to: perform user authentication, based on firmware update information received from a server through the main processor; if the user authentication is successful, generate authentication information corresponding to the firmware update information; store the authentication information in at least a part of a secure memory (e.g. the secure memory <NUM> in <FIG>); if the firmware is installed, perform authentication of the firmware, based on the authentication information stored in the secure memory; and if the authentication of the firmware is successful, install the firmware.

According to various embodiments, the secure memory may be included in the security integrated circuit.

According to various embodiments, the authentication information may include at least one of version information included in the firmware update information, a hash included in the firmware update information, a hash-based message authentication code (HMAC) related to the secure processor, a time related to approval of the authentication information, or an approval expiration time of the authentication information.

According to various embodiments, the secure processor may: determine whether signature information of the server, included in the firmware update information, satisfies a designated condition; and if the signature information of the server satisfies the designated condition, perform user authentication of the firmware update information.

According to various embodiments, the secure processor may: determine whether signature information of the server, included in the firmware update information, satisfies a designated condition; if the signature information of the server satisfies the designated condition, compare version information included in the firmware update information with version information of firmware installed in the electronic device; and if a version included in the firmware update information is later than a version of the firmware installed in the electronic device, perform user authentication of the firmware update information.

According to various embodiments, if the secure memory is located outside the security integrated circuit, the secure processor may encrypt the authentication information with a security key related to the secure processor and store the encrypted authentication information in at least a part of the secure memory.

According to various embodiments, if an installation condition for the firmware is satisfied, the main processor may transmit a request signal for installing the firmware to the secure processor, and if the secure processor receives the request signal from the main processor, the secure processor may perform authentication of the firmware, based on the authentication information stored in the secure memory.

According to various embodiments, the secure processor may: determine whether the authentication information stored in the secure memory is valid; and if the authentication information is determined to be valid, perform authentication of the firmware, based on the authentication information.

According to various embodiments, the secure processor may determine whether the authentication information stored in the secure memory is valid, based on at least one of an HMAC value, a validity time interval, or a number of times of use of the authentication information.

According to various embodiments, the secure processor may: if the authentication of the firmware fails, perform user authentication of the firmware; and if the user authentication is successful, install the firmware.

<FIG> illustrates a flowchart <NUM> for updating firmware in an electronic device according to various embodiments. In the embodiment below, operations may be sequentially performed, but the disclosure is not limited to the sequential operations. For example, the sequences of operations may be changed, and at least two operations may be performed in parallel. The electronic device in <FIG> may be the electronic device <NUM> in <FIG>, or the electronic device <NUM> in <FIG>.

Referring to <FIG>, according to various embodiments, the electronic device (e.g. the processor <NUM> in <FIG> or the secure processor <NUM> in <FIG>) may receive update information related to firmware in operation <NUM>. According to an embodiment, the secure processor <NUM> may receive update information related to firmware from an external apparatus (e.g. a server) through the main processor <NUM>. For example, the secure processor <NUM> may receive the update information related to the firmware from a trusted external apparatus through a transport layer security (TLS) protocol. For example, the update information related to the firmware may include at least one of firmware version information, patch contents, hash information related to the firmware, or a signature of an external apparatus (e.g. a server).

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may identify whether user authentication of the update information related to the firmware is successful, in operation <NUM>. According to an embodiment, the secure processor <NUM> may output patch contents of update information related to firmware, received from a trusted external apparatus, through a display device (e.g. the display device <NUM> in <FIG>) so as to allow a user to identify the patch contents. The secure processor <NUM> may determine whether user authentication is successful, based on a user input related to the patch contents displayed on the display device. For example, the trusted external apparatus may be identified based on signature information of the external apparatus included in the update information related to the firmware. For example, the firmware version information may include identification information of the firmware binary and firmware binary version information.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) succeeds in user authentication of the update information of the firmware (e.g. "YES" relating to operation <NUM>), the electronic device may generate authentication information related to the firmware in operation <NUM>. According to an embodiment, the secure processor <NUM> may generate authentication information related to the firmware, based on at least a part (e.g. firmware version information and firmware hash information) of the update information related to the firmware. For example, the authentication information related to the firmware may further include an HMAC value of the secure processor <NUM> to indicate that the authentication information has been generated by the secure processor <NUM>, or to identify the integrity of the authentication information. For example, the authentication information related to the firmware may further include at least one of approval time point information of the authentication information or approval expiration time point information. As another example, if the secure memory <NUM> is located outside the security integrated circuit <NUM> as illustrated in <FIG>, the secure processor <NUM> may generate an authentication key (AK) and an encryption key (EK), based on a security key (e.g. fused REK, or fused bit) defined for securing communication of the secure processor <NUM>. The secure processor <NUM> may generate an HMAC value to be included in authentication information, based on the authentication key, and encrypt information (e.g. an HMAC value, firmware version information, firmware hash information, and information related to approval of authentication information) to be included in the authentication information by using the security key, so as to generate the authentication information.

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may store the authentication information related to the firmware in a secure memory in operation <NUM>. According to an embodiment, the secure processor <NUM> may securely store the authentication information related to the firmware in the secure memory <NUM> through a secure channel generated based on a key (e.g. SMK) previously shared with the secure memory <NUM>. According to another embodiment, the secure processor <NUM> may store the authentication information related to the firmware in the secure memory <NUM> located outside the security integrated circuit <NUM> through the main processor <NUM>. For example, if there is previously stored authentication information in the secure memory <NUM>, the secure processor <NUM> may replace the previously stored authentication information stored in the secure memory <NUM> with the new authentication information.

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may identify whether authentication of the firmware is successful, based on the authentication information stored in the secure memory, in operation <NUM>. According to an embodiment, if a firmware updating time point has arrived, the main processor <NUM> may transmit a request signal for updating firmware to the secure processor <NUM>. If the secure processor <NUM> receives a request signal for updating firmware from the main processor <NUM>, the secure processor may generate a hash value corresponding to the firmware received from the main processor <NUM>. If the hash value corresponding to the firmware received from the main processor <NUM> and a hash value included in the authentication information stored in the secure memory are identical to each other, the secure processor <NUM> may determine that the authentication of the firmware is successful. Additionally, if the version information of the firmware received from the main processor <NUM> and the version information included in the authentication information stored in the secure memory are identical to each other, the secure processor <NUM> may determine that the authentication of the firmware is successful. According to an embodiment, if it is determined that the authentication information stored in the secure memory <NUM> is valid, the secure processor <NUM> may perform authentication of the firmware, based on the authentication information stored in the secure memory <NUM>.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) succeeds in authenticating the firmware, based on the authentication information stored in the secure memory (e.g. "YES" relating to operation <NUM>), the electronic device may update the firmware of the electronic device with the firmware, the authentication of which was successful, in operation <NUM>. According to an embodiment, if the storage space (or capacity) of the secure memory <NUM> is sufficiently large to hold the firmware, the secure processor <NUM> may store the updated firmware in the secure memory <NUM>. According to another embodiment, the secure processor <NUM> may store the updated firmware in the non-secure memory <NUM>. The non-secure memory <NUM> may store a signature of the secure processor <NUM> together with the updated firmware.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) fails in user authentication of the update information related to the firmware (e.g. "NO" relating to operation <NUM>), or fails in authentication of the firmware, based on the authentication information stored in the secure memory (e.g. "NO" relating to operation <NUM>), a firmware update procedure based on the authentication information may be blocked. According to an embodiment, if the secure processor <NUM> fails in user authentication of the update information related to the firmware, or fails in authentication of the firmware, based on the authentication information, the secure processor may again perform user authentication. According to another embodiment, if the secure processor <NUM> fails in user authentication of the update information related to the firmware, or fails in authentication of the firmware, based on the authentication information, the secure processor may output firmware update restriction information.

<FIG> illustrates a flowchart <NUM> for performing user authentication of update information in an electronic device according to various embodiments. The operations in <FIG> described below may be detailed sub-operations of operation <NUM> in <FIG>. In the embodiment below, operations may be sequentially performed, but the disclosure is not limited to the sequential operations. For example, the sequences of the operations may be changed, and at least two operations may be performed in parallel. The electronic device in <FIG> may be the electronic device <NUM> in <FIG>, or the electronic device <NUM> in <FIG>. Hereinafter, at least a part of the operations in <FIG> may be described with reference to <FIG> and <FIG>. <FIG> illustrates a screen configuration for user authentication according to various embodiments. <FIG> illustrates a screen configuration for configuring a firmware update condition according to various embodiments.

Referring to <FIG>, according to various embodiments, if the electronic device (e.g. the processor <NUM> in <FIG> or the secure processor <NUM> in <FIG>) receives update information related to firmware (e.g. operation <NUM> in <FIG>), the electronic device may determine whether the update information related to the firmware is valid, in operation <NUM>. According to an embodiment, if the secure processor <NUM> receives update information related to firmware from an external apparatus (e.g. a server) through the main processor <NUM>, the secure processor may determine whether the external apparatus is trustworthy, based on signature information of the external apparatus included in the update information. For example, if the signature information of the external apparatus included in the update information is included in an authenticated apparatus list stored in a memory (e.g. the memory <NUM> or the secure memory <NUM>), the secure processor <NUM> may determine that the external apparatus is trustworthy. If the secure processor <NUM> has determined that the external apparatus is trustworthy, the secure processor may determine that the update information related to the firmware is valid.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) determines that the update information related to the firmware is valid (e.g. "YES" relating to operation <NUM>), the electronic device may identify version information of the firmware, included in the update information, in operation <NUM>. For example, the version information of the firmware may include identification information of the firmware binary and firmware binary version information.

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may determine whether the firmware is capable of being installed in the electronic device, based on the version information of the firmware, included in the update information, in operation <NUM>. According to an embodiment, the secure processor <NUM> may compare the version information of firmware that is operating in the electronic device <NUM>, with the version information of the firmware, included in the update information. If the version of the firmware that is operating in the electronic device <NUM> is earlier (or lower) than the version of the firmware included in the update information, the secure processor <NUM> may determine that the firmware related to the update information is capable of being installed in the electronic device. Accordingly, the secure processor <NUM> can prevent the firmware from being updated to a prior version (or a lower version). For example, the version information of firmware that is operating in the electronic device <NUM> may be identified in authentication information stored in the secure memory <NUM>.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) has determined that the firmware related to the update information is installable in the electronic device (e.g. "YES" relating to operation <NUM>), the electronic device may display the update information related to the firmware, in operation <NUM>. According to an embodiment, the secure processor <NUM> may control a display device (e.g. the display device <NUM> in <FIG>) through the main processor <NUM> such that the display device displays patch information included in the update information. For example, the display device (e.g. the display device <NUM> in <FIG>) may display patch information <NUM> included in the update information, as illustrated in <FIG>. The patch information <NUM> may include information <NUM> relating to functions that have been modified, added, or removed through the firmware update.

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may identify whether an approval input corresponding to the update information related to the firmware is detected, in operation <NUM>. According to an embodiment, the secure processor <NUM> may identify whether an input corresponding to an approval button <NUM> is detected in the patch information <NUM> displayed in at least a part of the display device, as illustrated in <FIG>. For example, if the secure processor <NUM> detects an input corresponding to the approval button <NUM> within a reference time interval, the secure processor may determine that the secure processor has detected an approval input corresponding to the update information related to the firmware. For example, if an input corresponding to the approval button is not detected during a reference time interval, or an input corresponding to a cancel button <NUM> is detected, the secure processor <NUM> may determine that an approval input corresponding to the update information related to the firmware is not detected.

According to various embodiments, if an approval input corresponding to the update information related to the firmware is detected (e.g. "YES" relating to operation <NUM>), the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may determine that user authentication of the update information related to the firmware is successful, in operation <NUM>. According to an embodiment, if the secure processor <NUM> succeeds in user authentication of the update information related to the firmware, the secure processor may provide a firmware installation time point (or an installation condition) configured based on a user input to the main processor <NUM>. For example, if the secure processor <NUM> detects an input corresponding to the approval button <NUM> of the patch information <NUM> displayed in the display device, the secure processor may control the display device (e.g. the display device <NUM> in <FIG>) to display a menu <NUM> for configuring a firmware installation time point, as illustrated in <FIG>. The secure processor <NUM> may control the display device by using the main processor <NUM>. For example, the menu <NUM> for configuring a firmware installation time point may include "install now" <NUM>, "install at night" <NUM>, and "set installation time" <NUM>. The secure processor <NUM> may configure a firmware installation time point, based on a selection input made by a user to the menu <NUM> for configuring a firmware installation time point.

According to various embodiments, if the update information related to the firmware is determined not to be valid (e.g. "NO" relating to operation <NUM>), the firmware related to the update information is determined to be incapable of being installed in the electronic device (e.g. "NO" relating to operation <NUM>), or if an approval input corresponding to the update information related to the firmware is not detected (e.g. "NO" relating to operation <NUM>), the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may determine that user authentication of the update information related to the firmware failed, in operation <NUM>. According to an embodiment, if the secure processor <NUM> fails in user authentication of the update information related to the firmware, the secure processor may provide authentication failure information to the main processor <NUM>. The main processor <NUM> may control the display device (e.g. the display device <NUM> in <FIG>) to output the authentication failure information received from the secure processor <NUM>.

<FIG> illustrates a flowchart <NUM> for updating firmware, based on authentication information, in an electronic device according to various embodiments. The operations in <FIG> described below may be detailed sub-operations of operations <NUM> to <NUM> in <FIG>. In the embodiment below, operations may be sequentially performed, but the disclosure is not limited to the sequential operations. For example, the sequences of the operations may be changed, and at least two operations may be performed in parallel. The electronic device in <FIG> may be the electronic device <NUM> in <FIG> or the electronic device <NUM> in <FIG>. Hereinafter, at least a part of the operations in <FIG> may be described with reference to <FIG>, <FIG>, and <FIG>. <FIG> illustrates a screen configuration including firmware download state information according to various embodiments. <FIG> illustrates a screen configuration for determining whether to install firmware according to various embodiments. <FIG> illustrates a screen configuration including firmware update restriction information according to various embodiments.

Referring to <FIG>, according to various embodiments, the electronic device (e.g. the processor <NUM> in <FIG> or the main processor <NUM> in <FIG>) may identify whether the use environment of the electronic device satisfies a firmware installation condition, in operation <NUM>. According to an embodiment, the main processor <NUM> may identify whether a firmware installation time point (e.g. "install at night", or "install at particular time point") configured by a user has arrived. According to another embodiment, if "install upon wireless LAN (e.g. WIFI) access" is configured as the firmware installation condition, the main processor <NUM> may download firmware when the electronic device <NUM> accesses a wireless LAN. When the downloading of the firmware is completed, the main processor <NUM> may determine that the firmware installation condition is satisfied. The main processor <NUM> may control at least one element (e.g. the sound output device <NUM>, the display device <NUM>, or an indicator) to output firmware downloading information to the outside, so as to allow a user to recognize the firmware download state. For example, the display device (e.g. the display device <NUM>) may display download state information <NUM> of firmware, for example, "Downloading firmware", as illustrated in <FIG>. According to another embodiment, if "install now" is configured, the main processor <NUM> may identify whether downloading of firmware is completed. If the downloading of the firmware is completed, the main processor <NUM> may determine that the firmware installation condition is satisfied.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) does not satisfy the firmware installation condition (e.g. "NO" relating to operation <NUM>), the electronic device may identify whether the firmware installation condition is satisfied.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) satisfies the firmware installation condition (e.g. "YES" relating to operation <NUM>), the electronic device may identify firmware to be installed (or updated) in the electronic device, in operation <NUM>. According to an embodiment, if the main processor <NUM> satisfies the firmware installation condition, the main processor may transmit a request signal for installing (or updating) firmware to the secure processor <NUM>. If the secure processor <NUM> has received a request signal for installing (or updating) firmware from the main processor <NUM>, the secure processor may identify firmware downloaded through the main processor <NUM>.

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may identify whether authentication information stored in a secure memory is valid, in operation <NUM>. According to an embodiment, the secure processor <NUM> may determine whether the authentication information is valid, based on an HMAC value of the authentication information stored in the secure memory <NUM> and a validity time interval of the authentication information. For example, the validity time interval of the authentication information may be determined based on at least one of approval time point information or approval expiration time point information of the authentication information, included in the authentication information. According to another embodiment, the secure processor <NUM> may determine whether the authentication information is valid, based on an HMAC value of the authentication information stored in the secure memory <NUM>, and the number of times the authentication information has been used. For example, if the number of times the authentication information stored in the secure memory <NUM> has been used is equal to or smaller than a reference number, the secure processor <NUM> may determine that the authentication information stored in the secure memory <NUM> is valid. For example, the reference number may be configured at the time of release of the electronic device <NUM>, or may be configured by a user.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) has determined that the authentication information stored in the secure memory <NUM> is valid (e.g. "YES" relating to operation <NUM>), the electronic device may identify whether firmware authentication based on the authentication information is successful, in operation <NUM>. According to an embodiment, the secure processor <NUM> may compare a hash value corresponding to the firmware received from the main processor <NUM> with a hash value included in the authentication information stored in the secure memory. If the hash value corresponding to the firmware received from the main processor <NUM> is identical to the hash value included in the authentication information, the secure processor <NUM> may determine that authentication of the firmware is successful. Additionally, if the hash value of the firmware received from the main processor <NUM> and the hash value of the authentication information stored in the secure memory are identical to each other, and the version information of the firmware and the version information of the authentication information are also identical to each other, the secure processor <NUM> may determine that the authentication of the firmware is successful.

According to various embodiments, if the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) succeeds in authenticating the firmware, based on the authentication information (e.g. "YES" relating to operation <NUM>), the electronic device may update the firmware of the electronic device to the firmware related to the authentication information, in operation <NUM>. According to an embodiment, if the secure processor <NUM> succeeds in firmware authentication based on the authentication information, the secure processor may transmit a request signal for confirming whether to install the firmware, to the main processor <NUM>. The main processor <NUM> may control the display device (e.g. the display device <NUM> in <FIG>) to display a message related to the determination of whether to install the firmware, based on the request signal received from the secure processor <NUM>. For example, the display device (e.g. the display device <NUM> in <FIG>) may display a message <NUM> related to the determination of whether to install the firmware, as illustrated in <FIG>. For example, if an input corresponding to a cancel button <NUM> in the message <NUM> displayed in at least a part of the display device, as illustrated in <FIG>, is detected, the secure processor <NUM> may determine that the user does not want to install the firmware at the current time point. The secure processor <NUM> may identify whether the use environment of the electronic device satisfies the firmware installation condition. For example, if an input corresponding to a confirm button <NUM> in the message <NUM> displayed in at least a part of the display device, as illustrated in <FIG>, is detected, the secure processor <NUM> may determine that the user wants to install the firmware at the current time point. Accordingly, the secure processor <NUM> may update the firmware of the electronic device to the firmware related to the authentication information. For example, the secure processor <NUM> may store the updated firmware of the electronic device <NUM> in the secure memory <NUM>. As another example, the secure processor <NUM> may store the updated firmware of the electronic device <NUM> in the non-secure memory <NUM> through the main processor <NUM>. The updated firmware may be stored in an active region (e.g. the first region <NUM>) of the non-secure memory <NUM> together with a signature of the secure processor <NUM>.

According to various embodiments, if the authentication information stored in the secure memory is not valid (e.g. "NO" relating to operation <NUM>), or the firmware authentication based on the authentication information fails (e.g. "NO" relating to operation <NUM>), the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may perform user re-authentication of the firmware, in operation <NUM>. According to an embodiment, if an external apparatus (e.g. a server) which has transmitted the firmware is trustworthy, and the version of the firmware is later (higher) than the version of the firmware that is running in the electronic device <NUM>, the secure processor <NUM> may control the display device (e.g. the display device <NUM>) through the main processor <NUM> such that the display device displays patch information of the firmware.

According to various embodiments, the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may identify whether user re-authentication of the firmware is successful, in operation <NUM>. According to an embodiment, if the secure processor <NUM> detects a user input corresponding to the patch information displayed in at least a part of the display device before passage of a reference time interval from the time point at which the patch information is displayed in the display device, the secure processor <NUM> may determine that the user re-authentication of the firmware is successful.

According to various embodiments, if the user re-authentication of the firmware is successful (e.g. "YES" relating to operation <NUM>), the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may update the firmware of the electronic device to the firmware, the user re-authentication of which was successful, in operation <NUM>.

According to various embodiments, if the user re-authentication of the firmware fails (e.g. "NO" relating to operation <NUM>), the electronic device (e.g. the processor <NUM> or the secure processor <NUM>) may output firmware update restriction information, in operation <NUM>. According to an embodiment, if the secure processor <NUM> fails in user re-authentication of the firmware, the secure processor may transmit firmware update restriction information to the main processor <NUM>. The main processor <NUM> may control at least one element (e.g. the sound output device <NUM>, the display device <NUM>, or an indicator) to output the firmware update restriction information received from the secure processor <NUM>, to the outside. For example, the display device (e.g. the display device <NUM>) may display a warning message <NUM> such as "Unable to update firmware", as illustrated in <FIG>.

According to various embodiments, an operation method of an electronic device (e.g. the electronic device <NUM> in <FIG>) may include: in a security integrated circuit (IC) (e.g. the security integrated circuit <NUM> in <FIG>) including a main processor (e.g. the main processor <NUM> in <FIG>) operating in a rich execution environment and a secure processor (e.g. the secure processor <NUM> in <FIG>) operating in a secure execution environment, performing user authentication by the secure processor, based on firmware update information received from a server through the main processor; if the user authentication is successful, generating authentication information corresponding to the firmware update information; storing the authentication information in at least a part of a secure memory (e.g. the secure memory <NUM> in <FIG>); if corresponding firmware is installed, performing authentication of the firmware, based on the authentication information stored in the secure memory; and if the authentication of the firmware is successful, installing the firmware.

According to various embodiments, the authentication information may be stored in at least a part of the secure memory included in the security integrated circuit.

According to various embodiments, if the secure memory is located outside the security integrated circuit, the authentication information may be encrypted with a security key related to the secure processor, and the encrypted authentication information may be stored in at least a part of the secure memory.

According to various embodiments, the performing of the user authentication may include: determining whether signature information of the server, included in the firmware update information, satisfies a designated condition; and if the signature information of the server satisfies the designated condition, performing user authentication of the firmware update information.

According to various embodiments, the performing of the user authentication may include: determining whether signature information of the server, included in the firmware update information, satisfies a designated condition; if the signature information of the server satisfies the designated condition, comparing version information included in the firmware update information with version information of firmware installed in the electronic device; and if a version included in the firmware update information is later than a version of the firmware installed in the electronic device, performing user authentication of the firmware update information.

According to various embodiments, the performing of the authentication of the firmware may include: if an installation condition for the firmware is satisfied, and a request signal is received from the main processor, performing authentication of the firmware, based on the authentication information stored in the secure memory.

According to various embodiments, the performing of the authentication of the firmware may include: determining whether the authentication information stored in the secure memory is valid; and if the authentication information is determined to be valid, performing authentication of the firmware, based on the authentication information.

According to various embodiments, the determining of whether the authentication information is valid may include: determining whether the authentication information stored in the secure memory is valid, based on at least one of an HMAC value, a validity time interval, or a number of times of use of the authentication information.

According to various embodiments, the method may further include: if the authentication of the firmware fails, performing user authentication of the firmware; and if the user authentication is successful, installing the firmware.

Claim 1:
An electronic device comprising:
a main processor (<NUM>)
a secure processor (<NUM>), and
a secure memory (<NUM>),
wherein the secure processor (<NUM>) is configured to:
perform user authentication for determining approval of a firmware update by a user, based on firmware update information received (<NUM>) from a server through the main processor (<NUM>) ,
based on the user authentication being successful (<NUM>), generate (<NUM>) authentication information corresponding to the firmware update information,
store (<NUM>) the authentication information in at least a part of the secure memory (<NUM>), based on a firmware installation condition being satisfied, perform (<NUM>) authentication of the firmware, based on the authentication information stored in the secure memory (<NUM>), and
based on the authentication of the firmware being successful, install (<NUM>) the firmware,
based on the authentication of the firmware failing, perform user re-authentication for determining approval of the firmware update by the user, and
based on the user re-authentication being successful, install the firmware.