Electronic device for encrypting user data
By storing the encryption key in an electronic device in an independent key storage partition and backing up the encryption key and its integrity files in the key backup partition, the problem of the encryption key being damaged due to user data input and output is solved, and the self-recovery of the encryption key and the rapid recovery of the user data is realized.
Patent Information
- Application Number
- CN202080052915.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-07
- Filing Date
- 2020-08-05
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2040-08-05
AI Technical Summary
The encryption key in the data partition in the electronic device may be corrupted due to frequent input and output of user data, and conventional recovery methods require copying and recovery of user data files, which takes a long time.
Store the encryption key in a key storage partition different from the data partition, and back up the encryption key and its integrity files in the key backup partition to ensure that self-recovery can be achieved by backing up the encryption key when the encryption key is corrupted.
Through this method, the encryption key is prevented from being damaged due to user data input and output, and the encryption key is self-recovery, reducing the time for user data recovery.
Smart Images

Figure CN114144784B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an encryption technology used in an electronic device. Background Art
[0002] Electronic devices such as smartphones have been used to be closely associated with users. As electronic devices used by users personally are widely distributed and used, the personal information of users or user-related information stored in the electronic devices is also increasing. Therefore, encryption technology is being used to protect data recorded and stored in the electronic devices from hacker attacks.
[0003] The above information is presented as background information only to assist in understanding the present disclosure. No determination has been made, and no assertion is made, as to whether any of the above may be applied as prior art to the present disclosure. Summary of the invention
[0004] Technical issues
[0005] An electronic device may divide and manage a data partition (e.g., / data) into multiple areas (or folders) (e.g., non-encrypted (NE), global device encrypted (DE), user DE, credential encrypted (user CE)). Conventional electronic devices have generated encryption keys for each of the multiple areas, and have stored the generated encryption keys in the data partitions together with the user data. However, the user data in the data partitions may be frequently input and output, and therefore the encryption keys may also be damaged when there is a problem in the data partitions. In addition, when the encryption key is changed by changing the user data, the rewriting of the encryption key may fail due to damage to the data partition. When the encryption key is damaged, all user data encrypted with the encryption key may not be available. At the same time, the conventional recovery method is to copy and restore the user data itself selected for backup by the user, or to store the checksum of the user data, identify the integrity of the user data itself, and restore the user data of each user data file, rather than restore the encryption key. Therefore, it may take a lot of time to restore the user data.
[0006] Solution to the problem
[0007] Aspects of the present disclosure are intended to at least solve the above-mentioned problems and / or disadvantages and to provide at least the advantages described below. Therefore, one aspect of the present disclosure is to provide an electronic device that stores encryption keys corresponding to multiple areas included in a data partition in a key storage partition different from the data partition.
[0008] Furthermore, an aspect of the present disclosure is to provide an electronic device which backs up an encryption key stored in a key storage partition in a key backup partition, and stores an integrity file obtained by re-encrypting the encryption key in the key backup partition.
[0009] In addition, an aspect of the present disclosure is to provide an electronic device which can use a backup encryption key stored in a key backup partition when an encryption key fails to be loaded due to a file system error.
[0010] Also, an aspect of the present disclosure is to provide an electronic device that can use a backup encryption key stored in a key backup partition when an area in which an encryption key of a memory is stored is physically destroyed.
[0011] According to one aspect of the present disclosure, an electronic device may include a memory in which an area is divided by a data partition, a key storage partition, and a key backup partition; and a processor operably connected to the memory. The processor may be configured to generate an encryption key for at least one data folder generated in the data partition to store the encryption key in the key storage partition, store a backup encryption key equal to the encryption key in the key backup partition, and store an integrity file including a checksum of the encryption key in the key backup partition.
[0012] According to another aspect of the present disclosure, an electronic device may include a memory in which an area is divided by a data partition, a key storage partition, and a key backup partition; and a processor operably connected to the memory. The data partition may include a first data folder storing files associated with a drive of the electronic device and a second data folder storing files associated with a user. The processor may be configured to, at a first boot time, generate a first encryption key corresponding to the first data folder to store the first encryption key in a first key storage folder of the key storage partition, store a first integrity file including a checksum calculated based on the first encryption key in the first key backup folder of the key backup partition; at a first boot time or when switching users, generate a second encryption key corresponding to the second data folder to store the second encryption key in a second key storage folder of the key storage partition, and store a second integrity file including a checksum calculated based on the second encryption key in a second key backup folder of the key backup partition.
[0013] Other aspects, advantages, and salient features of the present disclosure will become apparent to those skilled in the art from the following detailed description which discloses various embodiments of the present disclosure in conjunction with the accompanying drawings.
[0014] Advantageous Effects of the Invention
[0015] According to the embodiments disclosed in the specification, by storing the encryption key in a key storage partition different from the data partition, the loss of the encryption key due to the input / output of user data can be prevented.
[0016] According to the embodiments disclosed in the specification, in the event that an encryption key is damaged, self-recovery is possible by backing up the encryption key stored in the key storage partition in the key backup partition.
[0017] According to the embodiments disclosed in the specification, a small-size integrity file obtained by re-encrypting an encryption key can be used to identify the integrity of an encryption key stored in a key storage partition or a backup encryption key stored in a key backup partition; in addition, it can be determined whether the encryption key can be recovered.
[0018] According to the embodiments disclosed in the specification, when the encryption key is damaged due to a file system error, the data folder can be decrypted normally by the backup encryption key.
[0019] According to the embodiments disclosed in the specification, when the area where the encryption key of the memory is stored is physically destroyed, the data folder can be normally decrypted by the backup encryption key. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other aspects, features and advantages of certain embodiments of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings, in which:
[0021] Figure 1 is a block diagram illustrating an electronic device in a network environment according to various embodiments;
[0022] Figure 2A is a diagram showing a configuration of partitions included in a memory of an electronic device according to one embodiment;
[0023] Figure 2B is a diagram showing components included in a processor of an electronic device according to one embodiment;
[0024] Figure 3 It is shown that the Figure 2A Figure 1 shows an example of a folder in a partition of FIG. 1 ;
[0025] Figure 4 It is shown that the Figure 3 Figure 1 shows an example of files in a first key storage folder and a first key backup folder of a first data folder;
[0026] Figure 5A It shows that the generated Figure 4 FIGURE 1 is an example of a process for providing a first integrity file;
[0027] Figure 5B It shows that the generated Figure 4 FIG. 1 is another example of a process for obtaining a first integrity file;
[0028] Figure 6 is a flow chart showing a startup operation of an electronic device according to one embodiment;
[0029] Figure 7 is shown corresponding to Figure 6 A flowchart of an example of operations of A1 and A2 for generating a key storage folder and a key backup folder;
[0030] Figure 8 is shown corresponding to Figure 6 A flowchart of an example of an integrity verification operation of the first encryption keys of B1 and B2;
[0031] Fig. 9 is shown corresponding to Figure 6 A flowchart of an example of an integrity verification operation of the second encryption key of C1 and C2;
[0032] Fig.10 is shown corresponding to Figure 6 A flowchart of an example of an integrity verification operation of a third encryption key of D1 and D2;
[0033] Fig.11 is a flow chart illustrating a method of determining the integrity of a current encryption key of an electronic device according to one embodiment;
[0034] Fig.12 is a flow chart illustrating a method for determining whether a current encryption key of an electronic device is recoverable according to one embodiment;
[0035] Fig.13 is a flow chart showing a user switching operation of an electronic device according to one embodiment; and
[0036] Fig.14 is shown corresponding to Fig.13 A3 and A4 are flowcharts of examples of operations of generating a key storage folder and a key backup folder. DETAILED DESCRIPTION
[0037] Prior to proceeding with the following disclosure, it may be helpful to set forth definitions of certain words and phrases used throughout this patent document: the term "including" and its derivatives mean including but not limited to; the term "or" is inclusive, meaning and / or; the phrases "associated with" and "associated with" and their derivatives may mean including, included within, interconnected with, containing, contained within, connected to or connected with, coupled to or coupled with, capable of communicating with, cooperating with, interleaved, juxtaposed, proximate to, bound to or bound with, having, having the property of, and the like; and the term "controller" means any device, system, or part thereof that controls at least one operation, which device may be implemented in hardware, firmware, or software, or some combination of at least two thereof. It should be noted that the functionality associated with any particular controller may be centralized or distributed, whether local or remote.
[0038] In addition, the various functions described below may be implemented or supported by one or more computer programs, each of which is formed by a computer-readable program code and embodied in a computer-readable medium. The terms "application" and "program" refer to one or more computer programs, software components, instruction sets, processes, functions, objects, classes, instances, related data or a portion thereof that are suitable for implementation with a suitable computer-readable program code. The phrase "computer-readable program code" includes any type of computer code, including source code, object code and executable code. The phrase "computer-readable medium" includes any type of medium that can be accessed by a computer, such as a read-only memory (ROM), a random access memory (RAM), a hard drive, a compact disc (CD), a digital video disc (DVD) or any other type of memory. "Non-transitory" computer-readable media excludes wired, wireless, optical or other communication links that transmit instantaneous electrical signals or other instantaneous signals. Non-transitory computer-readable media include media that can permanently store data, and media that can store data and then rewrite data, such as rewritable optical discs or erasable memory devices.
[0039] Definitions for certain words and phrases are provided throughout this patent document, those of ordinary skill in the art should understand that in many, if not most instances, such definitions apply to prior, as well as future uses of such defined words and phrases.
[0040] The following discussion Figures 1 to 14 The various embodiments used to describe the principles of the present disclosure in this patent document are only for illustration and should not be interpreted in any way as limiting the scope of the present disclosure. Those skilled in the art will understand that the principles of the present disclosure can be implemented in any appropriately arranged system or device.
[0041] Hereinafter, various embodiments of the present disclosure may be described with reference to the accompanying drawings. Therefore, those skilled in the art will recognize that various modifications, equivalent expressions and / or alternatives may be made to the various embodiments described herein without departing from the scope and spirit of the present disclosure.
[0042] Figure 1 1 is a block diagram illustrating an electronic device 101 in a network environment 100 according to various embodiments. Figure 1 , the electronic device 101 in the network environment 100 may communicate with the electronic device 102 via the first network 198 (e.g., a short-range wireless communication network), or communicate with the electronic device 104 or the server 108 via the second network 199 (e.g., a long-range wireless communication network). According to one embodiment, the electronic device 101 may communicate with the electronic device 104 via the server 108. According to one embodiment, the electronic device 101 may include a processor 120, a memory 130, an input device 150, a sound output device 155, a display device 160, an audio module 170, a sensor module 176, an interface 177, a haptic module 179, a camera module 180, a power management module 188, a battery 189, a communication module 190, a subscriber identification module (SIM) 196, or an antenna module 197. In some embodiments, at least one of the components (e.g., the display device 160 or the camera module 180) may be omitted from the electronic device 101, or one or more other components may be added in the electronic device 101. In some embodiments, some of the components may be implemented as a single integrated circuit. For example, the sensor module 176 (eg, a fingerprint sensor, an iris sensor, or an illumination sensor) may be implemented to be embedded in the display device 160 (eg, a display).
[0043] The processor 120 may execute, for example, software (e.g., program 140) to control at least one other component (e.g., hardware or software component) of the electronic device 101 coupled to the processor 120, and may perform various data processing or calculations. According to one embodiment, as at least part of the data processing or calculation, the processor 120 may load a command or data received from another component (e.g., sensor module 176 or communication module 190) into the volatile memory 132, process the command or data stored in the volatile memory 132, and store the resulting data in the non-volatile memory 134. According to one embodiment, the processor 120 may include a main processor 121 (e.g., a central processing unit (CPU) or an application processor (AP)), and an auxiliary processor 123 (e.g., a graphics processing unit (GPU), an image signal processor (ISP), a sensor center processor, or a communication processor (CP)), which may operate independently or in combination with the main processor 121. Additionally or alternatively, the auxiliary processor 123 may be adapted to consume less power than the main processor 121, or be dedicated to a designated function. The secondary processor 123 may be implemented separate from the primary processor 121 or as part of the primary processor.
[0044] The auxiliary processor 123 may control at least some of the functions or states related to at least one component (e.g., the display device 160, the sensor module 176, or the communication module 190) among the components of the electronic device 101, in place of the main processor 121 when the main processor 121 is in an inactive (e.g., sleeping) state, or together with the main processor 121 when the main processor 121 is in an active state (e.g., executing an application). According to one embodiment, the auxiliary processor 123 (e.g., an image signal processor or a communication processor) may be implemented as a part of another component (e.g., the camera module 180 or the communication module 190) that is functionally related to the auxiliary processor 123.
[0045] The memory 130 may store various data used by at least one component of the electronic device 101 (e.g., the processor 120 or the sensor module 176). The various data may include, for example, software (e.g., the program 140) and input data or output data for commands related thereto. The memory 130 may include a volatile memory 132 or a nonvolatile memory 134.
[0046] The program 140 may be stored as software in the memory 130 , and may include, for example, an operating system (OS) 142 , middleware 144 , or application programs 146 .
[0047] The input device 150 may receive a command or data to be used by another component (e.g., processor 120) of the electronic device 101 from outside (e.g., user) of the electronic device 101. The input device 150 may include, for example, a microphone, a mouse, a keyboard, or a digital pen (e.g., a stylus).
[0048] The sound output device 155 can output sound signals to the outside of the electronic device 101. The sound output device 155 may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as playing multimedia or playing recordings, and the receiver may be used for incoming calls. According to one embodiment, the receiver may be implemented as a part of the speaker or as a part of the speaker.
[0049] The display device 160 can visually provide information to the outside of the electronic device 101 (e.g., a user). The display device 160 may include, for example, a display, a holographic device, or a projector, and a control circuit for controlling a corresponding one of the display, the holographic device, and the projector. According to one embodiment, the display device 160 may include a touch circuit suitable for detecting a touch, or a sensor circuit (e.g., a pressure sensor) suitable for measuring the strength of the force caused by the touch.
[0050] The audio module 170 can convert sound into an electrical signal, and vice versa. According to one embodiment, the audio module 170 can obtain sound via the input device 150, or output sound via the sound output device 155 or a headset of an external electronic device (e.g., electronic device 102) directly (e.g., wired) or wirelessly coupled to the electronic device 101.
[0051] The sensor module 176 may detect an operating state (e.g., power or temperature) of the electronic device 101 or an environmental state (e.g., a user's state) outside the electronic device 101, and then generate an electrical signal or data value corresponding to the detected state. According to one embodiment, the sensor module 176 may include, for example, a posture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or a light sensor.
[0052] The interface 177 may support one or more designated protocols for coupling the electronic device 101 directly (e.g., wired) or wirelessly with an external electronic device (e.g., the electronic device 102). According to one embodiment, the interface 177 may 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.
[0053] The connection terminal 178 may include a connector via which the electronic device 101 may be physically connected to an external electronic device (e.g., the electronic device 102). According to one embodiment, the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0054] The haptic module 179 may convert the electrical signal into mechanical stimulation (eg, vibration or motion) or electrical stimulation, which may be recognized by the user via his sense of touch or kinesthetic sense. According to one embodiment, the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulator.
[0055] The camera module 180 may capture still images or moving images. According to one embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.
[0056] The power management module 188 may manage power supplied to the electronic device 101. According to one embodiment, the power management module 188 may be implemented as, for example, at least a portion of a power management integrated circuit (PMIC).
[0057] The battery 189 may supply power to at least one component of the electronic device 101. According to one embodiment, the battery 189 may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0058] The communication module 190 may support establishing a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (e.g., electronic device 102, electronic device 104, or server 108), and perform communication via the established communication channel. The communication module 190 may include one or more communication processors that may operate independently of the processor 120 (e.g., an application processor (AP)) and support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module 190 may include a wireless communication module 192 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module), or a wired communication module 194 (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules can communicate with an external electronic device via a first network 198 (e.g., a short-range communication network such as Bluetooth™, Wireless Fidelity (Wi-Fi) Direct, or Infrared Data Association (IrDA)) or a second network 199 (e.g., a long-range communication network such as a cellular network, the Internet, or a computer network (e.g., a LAN or a wide area network WAN)). These various types of communication modules can be implemented as a single component (e.g., a single chip), or can be implemented as multiple components (e.g., multiple chips) separated from each other. The wireless communication module 192 can use the subscriber information (e.g., International Mobile Subscriber Identity (IMSI)) stored in the subscriber identification module 196 to identify and authenticate the electronic device 101 in the communication network (such as the first network 198 or the second network 199).
[0059] The antenna module 197 may transmit a signal or power to the outside of the electronic device 101 (e.g., an external electronic device) or receive a signal or power from the outside. According to one embodiment, the antenna module 197 may include an antenna including a radiating element composed of a conductive material or a conductive pattern formed in or on a substrate (e.g., a PCB). According to one embodiment, the antenna module 197 may include a plurality of antennas. In this case, at least one antenna suitable for a communication scheme used in a communication network (such as the first network 198 or the second network 199) may be selected from a plurality of antennas by the communication module 190 (e.g., the wireless communication module 192), for example. Then, via the selected at least one antenna, a signal or power is transmitted or received between the communication module 190 and the external electronic device. According to one embodiment, another component other than the radiating element (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module 197.
[0060] At least some of the above components can be coupled to each other and transmit signals (e.g., commands or data) therebetween via an inter-peripheral communication scheme (e.g., a bus, a general purpose input output (GPIO), a serial peripheral interface (SPI), or a mobile industry processor interface (MIPI)).
[0061] According to one embodiment, commands or data may be transmitted or received between the electronic device 101 and the external electronic device 104 via a server 108 coupled to the second network 199. Each of the electronic devices 102 and 104 may be a device of the same type or a different type as the electronic device 101. According to one embodiment, all or some of the operations to be performed at the electronic device 101 may be performed at one or more of the external electronic devices 102, 104, or 108. For example, if the electronic device 101 should automatically perform a function or service, or in response to a request from a user or another device, the electronic device 101 may not perform the function or service or, in addition to performing the function or service, request one or more external electronic devices to perform at least a portion of the function or service. The one or more external electronic devices that receive the request may perform at least a portion of the requested function or service, or another function or another service related to the request, and transmit the result of the execution to the electronic device 101. The electronic device 101 may provide the result as at least a part of the response to the request with or without further processing of the result. For this purpose, cloud computing, distributed computing or client-server computing techniques may be used, for example.
[0062] Figure 2A is a diagram illustrating a configuration of partitions included in a memory of an electronic device according to one embodiment. Figure 2B is a diagram illustrating components included in a processor of an electronic device according to one embodiment. Figure 3 It is shown that the Figure 2A Figure 1 shows an example of folders in a partition. Figure 4 It is shown that the Figure 3 FIG. 1 is a diagram of an example of files in a first data folder, a first key storage folder, and a first key backup folder. Figure 5A It shows that the generated Figure 4 FIG. 1 is a diagram of an example of a process for a first integrity file. Figure 5B It shows that the generated Figure 4 FIG. 1 is another example of a process for providing a first integrity file.
[0063] refer to FIG. 2A to FIG. 5B, the memory 130 may include a data partition 210 (e.g., / data) for storing user data, a key storage partition 220 (e.g., / keydata) for storing an encryption key corresponding to the user data, and a key backup partition 230 (e.g., / keyrefuge) for storing a backup encryption key by backing up the encryption key. For example, the processor 120 (e.g., processor 120) of the electronic device 101 (e.g., electronic device 101) may load an operating system 142 (e.g., operating system 142) at startup. The processor 120 may generate the data partition 210, the key storage partition 220, and the key backup partition 230 in the memory 130 through the operating system 142 at the first startup (e.g., the first use after the user purchases the electronic device or the first startup after the electronic device is initialized). A series of operations associated with the partitions, folders, and files described later may be performed by the operating system 142 executed by the processor 120.
[0064] According to one embodiment, a plurality of folders (or folder groups) (e.g., non-encrypted (NE), global device encrypted (DE), user DE, credential encrypted (user CE)) may be generated in the data partition 210. For example, the first to fourth data folders 211, 212, 213, and 214 may be generated in the data partition 210. For example, the first to third data folders 211, 212, and 213 may be managed by encryption, and the fourth data folder 214 (e.g., NE) may be managed without encryption. However, the number of data folders included in the data partition 210 is not limited thereto. The number of data folders included in the data partition 210 is exemplary, and the data partition 210 may include at least one data folder.
[0065] According to one embodiment, files associated with the operation of the electronic device may be stored in a first data folder 211 (e.g., global DE). Files associated with user information may be stored in a second data folder 212 and a third data folder 213. Files stored by the user (e.g., images, videos, or documents) may be stored in a second data folder 212 (e.g., user DE). Files associated with user security (e.g., credential files (e.g., pin, pattern, or lock)) may be stored in a third data folder 213 (e.g., user CE). According to various embodiments, when the electronic device is used by multiple users, a second data folder 212 and a third data folder 213 may be generated for each user. For example, a second data folder 212 and a third data folder 213 corresponding to multiple users (e.g., a first user and a second user), such as a DE folder for the first user, a CE folder for the first user, a DE folder for the second user, and a CE folder for the second user, may be generated in the data partition 210. In various embodiments, the third data folder 213 may be generated as a subfolder of the second data folder 212.
[0066] According to one embodiment, first to third key storage folders 221, 222, and 223 corresponding to the first to third data folders 211, 212, and 213 may be generated in the key storage partition 220. For example, a first encryption key corresponding to at least one file stored in the first data folder 211 may be stored in the first key storage folder 221. The first encryption key may include a key file (e.g., version, rot, keymaster_key_blob, or encrypted_key). A second encryption key corresponding to at least one file stored in the second data folder 212 may be stored in the second key storage folder 222. The second encryption key may include a key file (e.g., version, keymaster_key_blob, or encrypted_key). A third encryption key corresponding to at least one file stored in the third data folder 213 may be stored in the third key storage folder 223. The third encryption key may include a key file (e.g., version, salt, keymaster_key_blob, or encrypted_key).
[0067] According to one embodiment, first to third key backup folders 231, 232, and 233 corresponding to the first to third data storage folders 221, 222, and 223 may be generated in the key backup partition 230. For example, a first backup encryption key identical to the first encryption key stored in the first key storage folder 221 may be stored in the first key backup folder 231. The first backup encryption key may include the same key file (e.g., version, rot, keymaster_key_blob, or encrypted_key) as the first encryption key. A second backup encryption key identical to the second encryption key stored in the second key storage folder 222 may be stored in the second key backup folder 232. The second backup encryption key may include the same key file (e.g., version, keymaster_key_blob, or encrypted_key) as the second encryption key. A third backup encryption key identical to the third encryption key stored in the third key storage folder 223 may be stored in the third key backup folder 233. The third backup encryption key may include the same key file (e.g., version, salt, keymaster_key_blob, or encrypted_key) as the third encryption key. In various embodiments, a first integrity file 411 including a checksum of a first encryption key may be stored in a first key backup folder 231. A second integrity file including a checksum of a second encryption key may be stored in a second key backup folder 232. A third integrity file including a checksum of a third encryption key may be stored in a third key backup folder 233.
[0068] refer to Figure 4As an embodiment, at least one data file may be stored in the first data folder 211. For example, a single data file (e.g., the first data file 311) may be stored in the first data folder 211. Alternatively, a plurality of data files (e.g., the first to fourth data files 311, 312, 313, and 314) may be stored in the first data folder 211. A first encryption key (e.g., the first to third key files 321, 322, and 323) stored in the first key storage folder 221 may be generated based on the data files (e.g., at least one of the first to fourth data files 311, 312, 313, and 314) stored in the first data folder 211. A first backup encryption key (e.g., the first to third key backup files 331, 332, and 333) identical to the first encryption key may be backed up and stored in the first key backup folder 231. In addition, a first integrity file 411 including a checksum of the first encryption key may be stored in the first key backup folder 231. In various embodiments, the second encryption key or the third encryption key stored in the second key storage folder 222 or the third key storage folder 223 may be generated and stored in the same or similar manner as the first encryption key stored in the first key storage folder 221. In addition, the second backup encryption key or the third backup encryption key stored in the second key backup folder 232 or the third key backup folder 233 may be generated and stored in the same or similar manner as the first backup encryption key stored in the first key backup folder 231. In various embodiments, the first encryption key may include the first to third key files 321, 322, and 323. However, this is exemplary, and the number of key files included in the first encryption key is not limited thereto. The first encryption key may include at least one key file. In various embodiments, the number or content of the key files included in the first encryption key may be the same or different from the number or content of the key files included in the second encryption key or the third encryption key.
[0069] According to one embodiment, the first integrity file 411 may be generated by re-encrypting the first encryption key (e.g., the first to third key files 321, 322, and 323). Figure 5A, the processor 120 of the electronic device 101 may calculate the checksums (e.g., first to third sub-checksums 511, 512, and 513) of the corresponding first to third key files 321, 322, and 323 (e.g., first to third sub-checksums 511, 512, and 513) (e.g., first encryption operation 510). The processor 120 may calculate the checksum 521 of the first to third sub-checksums 511, 512, and 513 (e.g., second encryption operation 520). The processor 120 may store the first integrity file 411 including the checksum 521 in the first key backup folder 231 of the key backup partition 230. For example, the first encryption operation 510 and the second encryption operation 520 may be implemented using a cryptographic hash function (e.g., a secure hash algorithm) or various encryption algorithms (e.g., a Merkle tree). In various embodiments, the second integrity file stored in the second key backup folder 232 or the third integrity file stored in the third key backup folder 233 may be generated in the same or similar manner as the first integrity file 411.
[0070] According to various embodiments, the sub-checksum may be generated in units of file segments rather than in units of files. Figure 5B , the processor 120 of the electronic device 101 may divide the first to third key files 321, 322, and 323 into file segments of a specified size (e.g., 4KB) (e.g., first to fourth file segments 531, 532, 533, and 534). The processor 120 may calculate a checksum (e.g., first to fourth sub-checksums 511, 512, 513, and 514) based on the first to fourth file segments 531, 532, 533, and 534 (e.g., a first encryption operation 510). The processor 120 may calculate a checksum 521 of the first to fourth sub-checksums 511, 512, 513, and 514 (e.g., a second encryption operation 520).
[0071] According to various embodiments, the processor 120 of the electronic device 101 may include a key backup storage unit 240, an integrity check unit 250, and a key recovery unit 260. For example, referring to Figure 2B , the key backup storage unit 240, the integrity check unit 250, and the key recovery unit 260 may be implemented with hardware in a portion of the processor 120. Alternatively, the key backup storage unit 240, the integrity check unit 250, and the key recovery unit 260 may be stored as software in the memory 130; the processor 120 may execute the key backup storage unit 240, the integrity check unit 250, and the key recovery unit 260. Alternatively, the key backup storage unit 240, the integrity check unit 250, and the key recovery unit 260 may be implemented with a combination of hardware and software. The processor 120 may execute the key backup storage unit 240, the integrity check unit 250, and the key recovery unit 260 described below. Figures 6 to 14 operation.
[0072] According to various embodiments, the key backup storage unit 240 may back up the encryption key stored in the key storage partition 220 in the key backup partition 230. For example, in an operation that satisfies a specified condition (e.g., at the first startup, when a new user is registered, or when the content of a data folder is changed), the key backup storage unit 240 may generate a new encryption key, and may store the generated encryption key in the key storage partition 220. For example, the key backup storage unit 240 may generate a first encryption key (e.g., first to third key files 321, 322, and 323) corresponding to the first data folder 211, and may store the first encryption key in the first key storage folder 221. Similarly, the key backup storage unit 240 may generate a second encryption key corresponding to the second data folder 212 to store the second encryption key in the second key storage folder 222, and may generate a third encryption key corresponding to the third data folder 213 to store the third encryption key in the third key storage folder 223.
[0073] In addition, as an embodiment, the key backup storage unit 240 may back up the encryption key stored in the key storage partition 220 in the key backup partition 230. For example, the key backup storage unit 240 may store the first backup encryption key (e.g., the first to third key backup files 331, 332, and 333) identical to the first encryption key in the first key backup folder 231. Similarly, the key backup storage unit 240 may store the second backup encryption key identical to the second encryption key in the second key backup folder 232, and may store the third backup encryption key identical to the third encryption key in the third key backup folder 233.
[0074] In addition, in one embodiment, the key backup storage unit 240 may generate an integrity file corresponding to the encryption key, and may store the integrity file in the key backup partition 230. For example, the key backup storage unit 240 may generate the first integrity file 411 based on the first encryption key (e.g., the first to third key files 321, 322, and 323). Figure 5A The key backup storage unit 240 may calculate the sub-checksums 511, 512, and 513 of the corresponding first to third key files 321, 322, and 323, and may calculate the checksum 521 of the sub-checksums 511, 512, and 513 again to generate the first integrity file 411 including the checksum 521. Alternatively, using Figure 5BAccording to the method, the key backup storage unit 240 may calculate the sub-checksums 511, 512, 513 and 514 of the corresponding first to fourth file segments 531, 532, 533 and 534 obtained by dividing the first to third key files 321, 322 and 323 into specified sizes (e.g., 4KB), and may calculate the checksum 521 of the sub-checksums 511, 512, 513 and 514 again to generate the first integrity file 411 including the checksum 521. The key backup storage unit 240 may store the generated first integrity file 411 together with the first to third key backup files 331, 332 and 333 in the first key backup folder 231. Similarly, the key backup storage unit 240 may store the second integrity file generated based on the second encryption key in the second key backup folder 232, and may store the third integrity file generated based on the third encryption key in the third key backup folder 233.
[0075] According to various embodiments, when a specified condition occurs (e.g., a decryption error of one of the first to third data folders 211, 212, and 213), the integrity check unit 250 may determine whether the encryption key is recoverable by determining the integrity of the encryption key or the backup encryption key. For example, the processor 120 may use the first encryption key (hereinafter referred to as the first current encryption key) stored in the first key storage folder 221 to decrypt the first data folder 211 during a specified operation (e.g., at startup) to read out the data (e.g., files) stored in the first data folder 211. At this time, when a decryption error of the first data folder 211 occurs, the integrity check unit 250 may use the first integrity file 411 stored in the first key backup folder 231 to determine whether the first current encryption key is damaged. This will be described later. Fig.11 Detailed description of the method for determining whether the first current encryption key is damaged is given in . When the first current encryption key is normal, the processor 120 can perform the decryption operation of the first data folder 211 again. When the first current encryption key is damaged, the integrity check unit 250 can use the first backup encryption key stored in the first key backup folder 231 and the first integrity file 411 to determine whether the first current encryption key is recoverable. Fig.12 Similarly, the integrity check unit 250 can determine whether the second encryption key or the third encryption key is damaged or recoverable during a specified operation (eg, at startup or when switching users).
[0076] According to various embodiments, when it is possible to restore the current encryption key, the key recovery unit 260 may restore the current encryption key. For example, the key recovery unit 260 may replace the current encryption key stored in the key storage partition 220 (e.g., the first encryption key stored in the first key backup folder 231, the second encryption key stored in the second key backup folder 232, or the third encryption key stored in the third key backup folder 233) with the backup encryption key stored in the key backup partition 230 (e.g., the first backup encryption key stored in the first key backup folder 231, the second backup encryption key stored in the second key backup folder 232, or the third backup encryption key stored in the third key backup folder 233). For example, the key recovery unit 260 may delete the first encryption key from the first key storage folder 221, and may store the first backup encryption key in the first key storage folder 221. The key recovery unit 260 may delete the second encryption key from the second key storage folder 222, and may store the second backup encryption key in the second key storage folder 222. The key restoring unit 260 may delete the third encryption key from the third key storage folder 223 , and may store the third backup encryption key in the third key storage folder 223 .
[0077] As described above, the processor 120 may store an encryption key (e.g., a first encryption key, a second encryption key, or a third encryption key) corresponding to a data folder (e.g., the first to third data folders 211, 212, and 213) in a key storage folder (e.g., the first to third key storage folders 221, 222, and 223) of the key storage partition 220, which is an area separate from the data partition 210. Therefore, damage to the encryption key due to frequent input / output of the data folder can be prevented. In various embodiments, the processor 120 may store a backup of the encryption key (e.g., a backup encryption key) in a key backup partition 230, which is an area separate from the key storage partition 220. In addition, the processor 120 may store an integrity file obtained by repeatedly encrypting the encryption key in the key backup partition 230. The processor 120 may use the integrity file to determine whether the encryption key is damaged and recoverable, and then may use the backup encryption key to perform self-recovery on the encryption key. When self-recovery can be performed normally on the encryption key, the data folder may be decrypted normally by the restored encryption key, thereby preventing the loss of user data.
[0078] Figure 6 is a flowchart illustrating a startup operation of an electronic device according to one embodiment. Figure 7 is shown corresponding to Figure 6A1 and A2 are flowcharts of examples of operations of generating a key storage folder and a key backup folder. Figure 8 is shown corresponding to Figure 6 Flowchart of an example of an integrity verification operation of the first encryption keys of B1 and B2. Fig. 9 is shown corresponding to Figure 6 Flowchart of an example of an integrity verification operation of the second encryption keys of C1 and C2. Fig.10 is shown corresponding to Figure 6 Flowchart of an example of an integrity verification operation of the third encryption key of D1 and D2.
[0079] refer to Figures 6 to 10 , at startup, a processor (e.g., processor 120) of an electronic device (e.g., electronic device 101) may verify the stored Figure 3 The integrity of the first to third encryption keys in the first to third key storage folders 221, 222, and 223, and self-recovery can be performed when there is an error in the first to third encryption keys.
[0080] According to one embodiment, in operation 605, the processor may mount the stored Figure 3 In operation 610, the processor may determine whether the electronic device is started for the first time (for example, the user uses the electronic device for the first time after purchasing the electronic device, or the electronic device is started for the first time after initialization). When the startup is the first startup, after moving to node A1, the processor may execute Figure 7 When the boot is not the first boot, the processor may perform operation 615.
[0081] According to one embodiment, when it is determined in operation 610 that the boot is the first boot, the processor (eg, Figure 2B The key backup storage unit 240) can perform Figure 7 Operation 705 to operation 750. Reference Figure 7 In operation 705, the processor may Figure 3 A first key storage folder 221 is generated in the key storage partition 220 of the present invention, and a corresponding key storage folder 221 may be generated. Figure 3 The files (eg, Figure 4 A first encryption key (eg, Figure 4 321, 322, and 323 in the first to third key files 321, 322, and 323) to store the first encryption key in the first key storage folder 221. In operation 715, the processor may Figure 3The first key backup folder 231 is generated in the key backup partition 230 of the present invention, and the first backup encryption key (for example, Figure 4 231, 232, and 233) in the first key backup folder 231. In operation 720, the processor may back up (or store) the first integrity file (e.g., Figure 4 The first integrity file 411) is stored in the first key backup folder 231. Figure 5A or Figure 5B The first integrity file is generated using an encryption method.
[0082] According to one embodiment, in operation 725, the processor may generate a second key storage folder 222 in the key storage partition 220, and may generate a second encryption key corresponding to the file stored in the second data folder 212 (e.g., user DE) to store the second encryption key in the second key storage folder 222. In operation 730, the processor may generate a second key backup folder 232 in the key backup partition 230, and may back up (or store) a second backup encryption key identical to the second encryption key in the second key backup folder 232. In operation 735, the processor may store a second integrity file obtained by re-encrypting the second encryption key in the second key backup folder 232. Figure 5A or Figure 5B The second integrity file is generated using an encryption method.
[0083] According to one embodiment, in operation 740, the processor may generate a third key storage folder 223 in the key storage partition 220, and may generate a third encryption key corresponding to a file stored in a third data folder 213 (e.g., user CE) to store the third encryption key in the third key storage folder 223. In operation 745, the processor may generate a third key backup folder 233 in the key backup partition 230, and may back up (or store) a third backup encryption key identical to the third encryption key in the third key backup folder 233. In operation 750, the processor may store a third integrity file obtained by re-encrypting the third encryption key in the third key backup folder 233. Figure 5A or Figure 5B In various embodiments, the third key storage folder 223 may be generated in a subfolder of the second key storage folder 222. In addition, the third key backup folder 233 may be generated in a subfolder of the second key backup folder 232.
[0084] According to various embodiments, when there are multiple users, operations 725 to 750 may be repeatedly performed as many times as the number of users. After operations 705 to 750 may be performed, the processor may execute Figure 6 Operation 615.
[0085] According to one embodiment, in operation 615, the processor may determine whether the file stored in the first data folder 211 can be decrypted. For example, the processor may perform a decryption operation on the file stored in the first data folder 211 using the first encryption key stored in the first key storage folder 221. When the file stored in the first data folder 211 is completely decrypted, the processor may perform operation 620. When an error occurs during the decryption operation, after moving to the B1 node, the processor may Figure 8 An integrity check operation is performed on the first encryption key in.
[0086] According to one embodiment, when an error occurs during the decryption operation of the file stored in the first data folder 211 in operation 615, the processor may execute Figure 8 Operation 810 to operation 840. Figure 8 In operation 810, a processor (eg, Figure 2B The integrity check unit 250 of the processor may determine whether there is an error in the first current encryption key used in operation 615. For example, the processor may use Figure 5A or Figure 5B The processor may compare the current checksum with the first integrity file 411 pre-stored in the first key backup folder 231. When the current checksum is the same as the first integrity file 411, the processor may determine that there is no error in the first current encryption key and may perform the operation again after moving to the B2 node. Figure 6 When the current checksum is different from the first integrity file 411, the processor may determine that there is an error in the first current encryption key, and may perform operation 820.
[0087] According to one embodiment, in operation 820, a processor (e.g., Figure 2B The integrity check unit 250 of the processor can determine whether the first current encryption key is recoverable. For example, the processor can use Figure 5A or Figure 5BThe processor may calculate a backup checksum of the first backup encryption key stored in the first key backup folder 231 by a method. The processor may compare the backup checksum with the first integrity file 411 stored in the first key backup folder 231. When the backup checksum is the same as the first integrity file 411, the processor may determine that the first current encryption key is recoverable, and may perform operation 830. When the backup checksum is different from the first integrity file 411, the processor may determine that the first current encryption key is not recoverable; in operation 840, the processor may display content indicating that the electronic device is being initialized through a display device (e.g., display device 160).
[0088] According to one embodiment, when the backup checksum is the same as the first integrity file 411, in operation 830, the processor (e.g., Figure 2B The key recovery unit 260 of the processor may use the first backup encryption key to restore the first current encryption key. For example, the processor may delete the first current encryption key and may store the first backup encryption key in the first key storage folder 221. After moving to the B2 node, the processor may use the new first encryption key (e.g., the first backup encryption key) to execute again. Figure 6 Operation 615.
[0089] According to one embodiment, after decrypting the first data folder 211 in operation 615, the processor may determine whether the file stored in the second data folder 212 can be decrypted. For example, the processor may perform a decryption operation on the file stored in the second data folder 212 using the second encryption key stored in the second key storage folder 222. When the file stored in the second data folder 212 is completely decrypted, the processor may perform operation 625. When an error occurs during the decryption operation, after moving to the C1 node, the processor may Fig. 9 An integrity check operation is performed using the second encryption key in .
[0090] According to one embodiment, when an error occurs during the decryption operation of the file stored in the second data folder 212 in operation 620, the processor may execute Fig. 9 Operation 910 to operation 940. Fig. 9 In operation 910, a processor (eg, Figure 2B The integrity check unit 250 of the processor may determine whether there is an error in the second current encryption key used in operation 620. For example, the processor may use Figure 5A or Figure 5BThe processor may compare the current checksum with the second integrity file pre-stored in the second key backup folder 232. When the current checksum is the same as the second integrity file, the processor may determine that there is no error in the second current encryption key and may perform the operation again after moving to the C2 node. Figure 6 When the current checksum is different from the second integrity file, the processor may determine that there is an error in the second current encryption key, and may perform operation 920.
[0091] According to one embodiment, in operation 920, a processor (e.g., Figure 2B The integrity check unit 250 of the processor can determine whether the second current encryption key is recoverable. For example, the processor can use Figure 5A or Figure 5B The processor may calculate a backup checksum of the second backup encryption key stored in the second key backup folder 232 using a method. The processor may compare the backup checksum with the second integrity file stored in the second key backup folder 232. When the backup checksum is the same as the second integrity file, the processor may determine that the second current encryption key is recoverable, and may perform operation 930. When the backup checksum is different from the second integrity file, the processor may determine that the second current encryption key is not recoverable; in operation 940, the processor may display content indicating that the electronic device is being initialized through a display device (e.g., display device 160).
[0092] According to one embodiment, when the backup checksum is the same as the second integrity file, in operation 930, the processor (e.g., Figure 2B The key recovery unit 260 of the processor may use the second backup encryption key to restore the second current encryption key. For example, the processor may delete the second current encryption key and may store the second backup encryption key in the second key storage folder 222. After moving to the C2 node, the processor may use the new second encryption key (e.g., the second backup encryption key) to execute again. Figure 6 Operation 620.
[0093] According to one embodiment, after decrypting the second data folder 212 in operation 620, the processor may display a lock screen (e.g., a numeric password input screen or a pattern input screen) through a display device (e.g., display device 160) in operation 625. In operation 630, the processor may receive a user password (e.g., a pin or a pattern), and may compare the user password with the user password data stored in the third data folder 213 to unlock the lock screen. In order to obtain the user password data stored in the third data folder 213, in operation 635, the processor may determine whether the third data folder 213 can be decrypted.
[0094] According to one embodiment, in operation 635, the processor may determine whether the file stored in the third data folder 213 can be decrypted. For example, the processor may perform a decryption operation on the file stored in the third data folder 213 using the third encryption key stored in the third key storage folder 223. When the file stored in the third data folder 213 is completely decrypted, the processor may compare the user password data stored in the third data folder 213 with the user password received in operation 630 to unlock the lock screen and may terminate the boot. When an error occurs during the decryption operation, after moving to the D1 node, the processor may Fig.10 An integrity check operation is performed on the third encryption key.
[0095] According to one embodiment, when an error occurs during the decryption operation of the file stored in the third data folder 213 in operation 635, the processor may execute Fig.10 Operation 1010 to operation 1040. Reference Fig.10 In operation 1010, a processor (eg, Figure 2B The integrity check unit 250 of the processor may determine whether there is an error in the third current encryption key used in operation 635. For example, the processor may use Figure 5A or Figure 5B The processor may compare the current checksum with the third integrity file pre-stored in the third key backup folder 233. When the current checksum is the same as the third integrity file, the processor may determine that there is no error in the third current encryption key and may perform the operation again after moving to the D2 node. Figure 6 When the current checksum is different from the third integrity file, the processor may determine that there is an error in the third current encryption key, and may perform operation 1020.
[0096] According to one embodiment, in operation 1020, a processor (e.g., Figure 2BThe integrity check unit 250 of the processor can determine whether the third current encryption key is recoverable. For example, the processor can use Figure 5A or Figure 5B The processor may calculate a backup checksum of the third backup encryption key stored in the third key backup folder 233 by a method. The processor may compare the backup checksum with the third integrity file stored in the third key backup folder 233. When the backup checksum is the same as the third integrity file, the processor may determine that the third current encryption key is recoverable, and may perform operation 1030. When the backup checksum is different from the third integrity file, the processor may determine that the third current encryption key is not recoverable; in operation 1040, the processor may display content indicating that the electronic device is being initialized through a display device (e.g., display device 160).
[0097] According to one embodiment, when the backup checksum is the same as the third integrity file, in operation 1030, the processor (e.g., Figure 2B The key recovery unit 260 of the processor may use the third backup encryption key to restore the third current encryption key. For example, the processor may delete the third current encryption key and may store the third backup encryption key in the third key storage folder 223. After moving to the D2 node, the processor may use the new third encryption key (e.g., the third backup encryption key) to execute again. Figure 6 Operation 635.
[0098] According to various embodiments, when there are multiple users, the processor may add an operation of selecting a user before operation 620. In this case, the processor may perform operations 620 to 635 on the second data folder 212 and the third data folder 213 corresponding to the selected user.
[0099] According to various embodiments, encryption keys, backup encryption keys, or integrity files may be Figure 7 At least one operation of the encryption key, the backup encryption key, or the integrity file is pre-stored in the key storage partition 220 or the key backup partition 230. In a state where the encryption key, the backup encryption key, or the integrity file is stored in the memory (e.g., the memory 130), the processor can execute the encryption key separately during an operation that satisfies a specified condition (e.g., when an error occurs during decryption of the data folder). Figure 6 At least one of operations 615 to 635.
[0100] As mentioned above, the processor can Figure 8 , Fig. 9 or Fig.10The operation uses the integrity file to determine whether the encryption key is damaged and recoverable, and then the backup encryption key can be used to perform self-recovery on the encryption key. When the encryption key can be self-recovered normally, the data folder can be decrypted normally by the recovered encryption key, thereby preventing the loss of user data.
[0101] Fig.11 is a flow chart illustrating a method of determining the integrity of a current encryption key of an electronic device according to one embodiment. Fig.11 The integrity determination method can be expressed as Figure 8 Operation 810, Fig. 9 Operation 910 or Fig.10 An example of operation 1010. Fig.11 , when an error occurs during the decryption process of a data folder (e.g., one of the first to third data folders 211, 212, and 213) of the data partition 210, a processor (e.g., processor 120 or integrity check unit 250) of an electronic device (e.g., electronic device 101) may perform operations 1110 to 1150.
[0102] According to one embodiment, in operation 1110, the processor may obtain a current checksum of a current encryption key (eg, one of the first to third encryption keys) corresponding to the data folder. For example, the processor may obtain a current checksum of a current encryption key (eg, one of the first to third encryption keys) corresponding to the data folder. Figure 5A or Figure 5B The current checksum is calculated using the method
[0103] According to one embodiment, in operation 1120, the processor may obtain an integrity file corresponding to the current encryption key. For example, when the encryption key corresponding to the data folder is generated, the integrity file may be obtained by Figure 5A or Figure 5B The method generates and can then be stored in a key backup folder corresponding to the data folder.
[0104] According to one embodiment, in operation 1130, the processor may compare the current checksum with the integrity file. In operation 1140, when the current checksum is the same as the integrity file, the processor may determine that the current encryption key is normal (e.g., the current encryption key remains in the same state as when it was generated), and may perform the decryption operation of the data folder again (e.g., Figure 6 In operation 1150, when the current checksum is different from the integrity file, the processor may determine that the current encryption key is corrupted, and may perform a recovery operation on the current encryption key (see Fig.12 ).
[0105] Fig.12is a flow chart illustrating a method of determining whether a current encryption key of an electronic device is recoverable according to one embodiment. Fig.12 The method for determining whether the current encryption key is recoverable can be expressed as Figure 8 Operation 820, Fig. 9 Operation 920 or Fig.10 An example of operation 1020. Reference Fig.11 and Fig.12 ,exist Fig.11 In operation 1150, when it is determined that the current encryption key is damaged, the processor (eg, processor 120 or integrity check unit 250) of the electronic device (eg, electronic device 101) may perform operations 1210 to 1250.
[0106] According to one embodiment, in operation 1210, the processor may obtain a backup checksum of a backup encryption key (eg, one of the first to third backup encryption keys) corresponding to the damaged current encryption key. For example, the processor may obtain a backup checksum of a backup encryption key (eg, one of the first to third backup encryption keys) corresponding to the damaged current encryption key. Figure 5A or Figure 5B The backup checksum is calculated by the method
[0107] According to one embodiment, in operation 1220, the processor may obtain an integrity file corresponding to the backup encryption key. For example, when the encryption key corresponding to the data folder is generated, the integrity file may be obtained by Figure 5A or Figure 5B The method generates and can then be stored in a key backup folder corresponding to the data folder.
[0108] According to one embodiment, in operation 1230, the processor may compare the backup checksum with the integrity file. In operation 1240, when the backup checksum is the same as the integrity file, the processor may determine that the damaged current encryption key is recoverable, and the damaged current encryption key may be replaced with the backup encryption key (or the damaged current encryption key may be deleted from the key storage folder, and the backup encryption key may be stored in the key storage folder). In operation 1250, when the backup checksum is different from the integrity file, the processor may determine that the current encryption key is not recoverable; and content indicating that the electronic device is initialized may be displayed in a display device (e.g., display device 160). As described above, when self-recovery can be performed normally on the encryption key, the data folder can be decrypted normally by the recovered encryption key, thereby preventing the loss of user data.
[0109] Fig.13 is a flow chart illustrating a user switching operation of an electronic device according to one embodiment. Fig.14 is shown corresponding to Fig.13A3 and A4 are flowcharts of examples of operations of generating a key storage folder and a key backup folder.
[0110] refer to Fig.13 When switching users, the processor (e.g., processor 120) of the electronic device (e.g., electronic device 101) may verify the information stored in Figure 3 The integrity of the second encryption key and the third encryption key in the second key storage folder 222 and the third key storage folder 223 can be ensured, and self-recovery can be performed when there is an error in the second encryption key and the third encryption key. Fig.13 In the example, the electronic device may log out the first user and may perform login of the second user.
[0111] According to one embodiment, in operation 1305, the processor may store the memory of the first user who has logged out (e.g., the memory corresponding to the first user). Figure 3 The state of the second data folder 212 and the third data folder 213 is switched to a locked state.
[0112] According to one embodiment, in operation 1310, the processor may determine whether the login is the first login of the second user. When the login is not the first login of the second user, the processor may perform operation 1315. When the login is the first login of the second user, the processor (e.g., Figure 2B The key backup storage unit 240 in the A3 node can be executed after moving to the A3 node. Fig.14 Operations 1405 to 1430 in .
[0113] According to one embodiment, when the login is the first login of the second user, in operations 1405 to 1430, the processor may generate an encryption key, a key storage folder, and a key backup folder (e.g., Figure 3 The second key storage folder 222, the third key storage folder 223, the second key backup folder 232 and the third key backup folder 233). Because operations 1405 to 1430 can be the same as Figure 7 Operations 725 to 750 are the same or similar, so detailed descriptions of operations 1405 to 1430 may be omitted.
[0114] According to one embodiment, in operation 1315, a processor (e.g., Figure 2B The integrity check unit 250 or the key recovery unit 260 of the second user may determine the second data folder of the second user (eg, Figure 3For example, the processor may use the second encryption key of the second user stored in the second key storage folder of the second user (e.g., the second key storage folder 222) to perform a decryption operation on the file stored in the second data folder of the second user. When the file stored in the second data folder of the second user is completely decrypted, the processor may perform operation 1320. When an error occurs during the decryption operation, after moving to the C1 node, the processor may Fig. 9 The second encryption key described in the cipher performs an integrity check operation (see Fig. 9 ).
[0115] According to one embodiment, after decrypting the second data folder of the second user in operation 1315, the processor may display a lock screen (e.g., a numeric password input screen or a pattern input screen) through a display device (e.g., display device 160) in operation 1320. In operation 1325, the processor may receive a user password (e.g., a personal identification number or a pattern) of the second user, and may store the user password in a third data folder (e.g., a user CE or pattern) stored in the second user. Figure 3 In order to obtain the user password data of the second user stored in the third data folder of the second user, in operation 1330, the processor may determine whether decryption of the third data folder of the second user is possible.
[0116] According to one embodiment, in operation 1330, a processor (e.g., Figure 2B The integrity check unit 250 or the key recovery unit 260) can determine whether decryption of the file stored in the third data folder of the second user is possible. For example, the processor can use the third encryption key of the second user stored in the third key storage folder of the second user (for example, the third key storage folder 223) to perform a decryption operation on the file stored in the third data folder of the second user. When the file stored in the third data folder of the second user is completely decrypted, the processor can compare the user password data of the second user stored in the third data folder of the second user with the user password received in operation 1325, the lock screen can be unlocked, and the user switching can be terminated. When an error occurs during the decryption operation, after moving to the D1 node, the processor can Fig.10 The third encryption key in the integrity check operation is performed (see Fig.10 ).
[0117] According to various embodiments, encryption keys, backup encryption keys, or integrity files may be Fig.14At least one operation of the encryption key, the backup encryption key, or the integrity file is pre-stored in the key storage partition 220 or the key backup partition 230. In a state where the encryption key, the backup encryption key, or the integrity file is stored in the memory (e.g., the memory 130), the processor can execute the encryption key separately during an operation that satisfies a specified condition (e.g., when an error occurs during decryption of the data folder). Fig.13 At least one of operations 1315 to 1330.
[0118] The electronic device according to various embodiments may be one of various types of electronic devices. The electronic device may include, for example, 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 household appliance. According to one embodiment of the present disclosure, the electronic device is not limited to those devices described above.
[0119] It should be understood that the various embodiments of the present disclosure and the terms used herein are not intended to limit the technical features stated herein to specific embodiments, and include various changes, equivalent expressions or substitutions of the corresponding embodiments. With respect to the description of the drawings, similar reference numerals may be used to refer to similar or related elements. It will be understood that the singular form of the noun corresponding to the entry may include one or more of the things, unless the relevant context clearly indicates otherwise. As used herein, each of the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C", and "at least one of A, B or C" may include any one or all possible combinations of the terms enumerated together in the corresponding one of the phrases. As used herein, terms such as "1st" and "2nd" or "first" and "second" may be used to simply distinguish the corresponding component from another component, and do not limit the components in other aspects (e.g., importance or order). It will be understood that if an element (e.g., a first element) is referred to as being “coupled with,” “coupled to,” “connected with,” or “connected to” another element (e.g., a second element), with or without the term “operably” or “communicatively,” it means that the element can be coupled to the other element directly (e.g., wired), wirelessly, or via a third element.
[0120] As used herein, the term "module" may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with other terms, such as "logic," "logic block," "part," or "circuitry." A module may be a single integral component suitable for performing one or more functions, or its smallest unit or part. For example, according to one embodiment, the module may be implemented in the form of an application specific integrated circuit (ASIC).
[0121] Various embodiments as set forth herein may be implemented as software (e.g., program 140) that includes one or more instructions stored in a storage medium (e.g., internal memory 136 or external memory 138) that can be read by a machine (e.g., electronic device 101). For example, a processor (e.g., processor 120) of a machine (e.g., electronic device 101) may call at least one of the one or more instructions stored in the storage medium, and execute the instructions with or without one or more other components under the control of the processor. This allows the machine to be operated to perform at least one function according to at least one instruction called. The one or more instructions may include code generated by a compiler or code executable by a translation program. 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 signals (e.g., electromagnetic waves), but this term does not distinguish between a location where data is semi-permanently stored in the storage medium and a location where data is temporarily stored in the storage medium.
[0122] According to one embodiment, the method according to various embodiments of the present disclosure may include and be provided in a computer program product. The computer program product can be traded between a seller and a buyer as a product. The computer program product can be distributed in the form of a machine-readable storage medium (e.g., a compact disc read-only memory (CD-ROM)), or distributed online via an application store (e.g., PLAYSTORE) or directly distributed (e.g., downloaded or uploaded) between two user devices (e.g., smart phones). If distributed online, at least a portion of the computer program product can be temporarily generated or at least temporarily stored in a machine-readable storage medium (e.g., a server of a manufacturer, a server of an application store, or a memory of a relay server).
[0123] According to various embodiments, each of the above-mentioned components (e.g., a module or a program) may include a single entity or multiple entities. According to various embodiments, one or more of the above-mentioned components may be omitted, or one or more other components may be added. Alternatively or additionally, multiple components (e.g., a module or a program) may be integrated into a single component. In this case, according to various embodiments, the integrated component may still perform one or more functions of each of the multiple components in the same or similar manner as performed by a corresponding one of the multiple components before integration. According to various embodiments, the operations performed by a module, a program, or another component may be performed sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations may be performed or omitted in different orders, or one or more other operations may be added.
[0124] According to the embodiments disclosed in the specification, by storing the encryption key in a key storage partition different from the data partition, the loss of the encryption key due to the input / output of user data can be prevented.
[0125] According to the embodiments disclosed in the specification, in the event that an encryption key is damaged, self-recovery is possible by backing up the encryption key stored in the key storage partition in the key backup partition.
[0126] According to the embodiments disclosed in the specification, a small-size integrity file obtained by re-encrypting an encryption key can be used to identify the integrity of an encryption key stored in a key storage partition or a backup encryption key stored in a key backup partition; in addition, it can be determined whether the encryption key can be recovered.
[0127] According to the embodiments disclosed in the specification, when an encryption key is damaged due to a file system error, a data folder can be normally decrypted by backing up the encryption key.
[0128] According to the embodiments disclosed in the specification, when the area where the encryption key of the memory is stored is physically destroyed, the data folder can be normally decrypted by the backup encryption key.
[0129] In addition, various effects directly or indirectly understood through the present disclosure can be provided.
[0130] While the present disclosure has been shown and described with reference to various embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents.
[0131] Although the present disclosure has been described with various embodiments, various changes and modifications may be suggested to one skilled in the art. The present disclosure is intended to encompass such changes and modifications as fall within the scope of the appended claims.
Claims
1. An electronic device, comprising: A memory, in which the memory is divided into areas by a data partition, a key storage partition, and a key backup partition; as well as a processor operatively connected to the memory, wherein the processor is configured to: generating an encryption key for at least one data folder generated in the data partition to store the encryption key in the key storage partition, wherein the encryption key comprises a key file corresponding to the at least one data folder; storing a backup encryption key equal to the encryption key in the key backup partition; and storing an integrity file including a checksum of the encryption key in the key backup partition, The processor is further configured to: Calculating sub-checksums corresponding to the key files respectively; calculating a main checksum based on the sum of the sub-checksums; and The integrity file is generated based on the master checksum.
2. The electronic device according to claim 1, wherein the processor is further configured to: Dividing the encryption key into file segments of specified sizes; Calculating sub-checksums corresponding to the file fragments respectively; calculating a main checksum based on the sum of the sub-checksums; and The integrity file is generated based on the master checksum.
3. The electronic device of claim 1 , wherein the processor is further configured to: When an error occurs during decryption of the at least one data folder, calculating a current checksum of the encryption key; and The current checksum is compared to the integrity file to determine if the encryption key is corrupted.
4. The electronic device of claim 3, wherein the processor is further configured to: When the current checksum is equal to the integrity file, the decryption is performed again on the at least one data folder using the encryption key.
5. The electronic device of claim 3, wherein the processor is further configured to: When the current checksum is different from the integrity file, calculating a backup checksum of the backup encryption key; and The backup checksum is compared to the integrity file to determine whether the encryption key is recoverable.
6. The electronic device of claim 5, wherein the processor is further configured to: When the backup checksum is equal to the integrity file, the encryption key is restored using the backup encryption key.
7. The electronic device of claim 6, wherein the processor is further configured to: When the backup checksum is different from the integrity file, determining that the encryption key is unrecoverable; and Output terminal initialization instructions.
8. An electronic device comprising: A memory, in which the memory is divided into areas by a data partition, a key storage partition, and a key backup partition; as well as a processor operatively connected to the memory, The data partitions include: a first data folder in which files associated with a driver of the electronic device are stored; and a second data folder in which files associated with the user are stored, and wherein the processor is configured to: At first boot time: generating a first encryption key corresponding to the first data folder to store the first encryption key in a first key storage folder of the key storage partition, generating a first backup encryption key equal to the first encryption key, and storing the first backup encryption key in a first key backup folder, and generating a first integrity file including a first checksum calculated based on the first encryption key, and storing the first integrity file in a first key backup folder of the key backup partition; At the first boot time or when switching users: generating a second encryption key corresponding to the second data folder to store the second encryption key in a second key storage folder of the key storage partition, generating a second backup encryption key equal to the second encryption key and storing the second backup encryption key in a second key backup folder, and generating a second integrity file including a second checksum calculated based on the second encryption key, and storing the second integrity file in a second key backup folder of the key backup partition; and When an error occurs while decrypting the first data folder, calculating a first current checksum of the first encryption key; and The first current checksum is compared to the first integrity file.
9. The electronic device of claim 8, wherein the processor is further configured to: When the first current checksum is equal to the first integrity file, a decryption operation is performed again on the first data folder using the first encryption key.
10. The electronic device of claim 9, wherein the processor is further configured to: When the first current checksum is different from the first integrity file, calculating a first backup checksum of the first backup encryption key; and The first backup checksum is compared to the first integrity file.
11. The electronic device of claim 10, wherein the processor is further configured to: When the first backup checksum is equal to the first integrity file, deleting the first encryption key from the first key storage folder; and The first backup encryption key is stored in the first key storage folder.
12. The electronic device according to claim 8, wherein: The data partition includes a third data folder in which a file associated with a user password is stored, and The processor is further configured to: At the first startup time or when the user is switched, generating a third encryption key corresponding to the third data folder to store the third encryption key in a third key storage folder of the key storage partition; and storing a third backup encryption key equal to the third encryption key in a third key backup folder; and storing a third integrity file including a third checksum calculated based on the third encryption key in a third key backup folder of the key backup partition; and After the decryption operation on the first data folder and the second data folder, displaying a lock screen on the display; and The user password is received through an input device.
Citation Information
Patent Citations
Method and system for maintaining backup of portable storage devices
US20040236958A1
Methods and systems for storage of large data objects
US20140289539A1