WO2024245301A1 - Information management method and apparatus, and electronic device - Google Patents
Information management method and apparatus, and electronic device Download PDFInfo
- Publication number
- WO2024245301A1 WO2024245301A1 PCT/CN2024/096147 CN2024096147W WO2024245301A1 WO 2024245301 A1 WO2024245301 A1 WO 2024245301A1 CN 2024096147 W CN2024096147 W CN 2024096147W WO 2024245301 A1 WO2024245301 A1 WO 2024245301A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- key
- rpmb
- ciphertext
- related information
- synthetic
- Prior art date
Links
- 238000007726 management method Methods 0.000 title claims abstract description 90
- 230000006870 function Effects 0.000 claims abstract description 80
- 230000015654 memory Effects 0.000 claims abstract description 67
- 238000000034 method Methods 0.000 claims abstract description 60
- 238000004891 communication Methods 0.000 claims abstract description 17
- 238000012217 deletion Methods 0.000 claims abstract description 10
- 230000037430 deletion Effects 0.000 claims abstract description 10
- 238000012544 monitoring process Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 claims description 2
- 230000015572 biosynthetic process Effects 0.000 abstract 2
- 238000003786 synthesis reaction Methods 0.000 abstract 2
- 238000005192 partition Methods 0.000 description 19
- 238000012545 processing Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 239000002131 composite material Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010926 purge Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0622—Securing storage systems in relation to access
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Definitions
- the present application belongs to the field of communication technology, and specifically relates to an information management method, device and electronic equipment.
- the purpose of the embodiments of the present application is to provide an information management method, device and electronic device, which can solve the problem in the prior art that when user data on an electronic device needs to be deleted, the success rate of physical erasure by completely overwriting is low.
- an embodiment of the present application provides an information management method, including:
- the key-related information is stored in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt the synthetic key, and the first ciphertext is the ciphertext obtained by encrypting the synthetic key;
- the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- an information management device including:
- a storage module configured to store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted from the synthetic key;
- An erasure module is used to call the RPMB erasure function upon receiving an instruction to delete user data, and physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the information management method described in the first aspect are implemented.
- an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the information management method described in the first aspect are implemented.
- an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the information management method as described in the first aspect.
- an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the information management method as described in the first aspect.
- an embodiment of the present application provides an electronic device, which is configured to execute the method described in the first aspect.
- key-related information is stored in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, wherein the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted from the synthetic key; upon receiving an instruction for instructing to delete user data, the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- FIG1 is a schematic diagram of an existing CE key protection method
- FIG2 is a schematic diagram of the existing functional framework for obtaining a CE key
- FIG. 3 is a flow chart of an information management method provided in an embodiment of the present application.
- FIG4 is a schematic diagram of an improved CE key protection method provided in an embodiment of the present application.
- FIG5 is one of the schematic diagrams of the improved functional framework for obtaining the CE key provided in an embodiment of the present application.
- FIG6 is a second schematic diagram of the improved functional framework for obtaining a CE key provided in an embodiment of the present application.
- FIG. 7 is a schematic diagram of the structure of an information management device provided in an embodiment of the present application.
- FIG8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- FIG. 9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
- first, second, etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first”, “second”, etc. are generally of one type, and the number of objects is not limited.
- the first object can be one or more.
- “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally indicates that the objects associated with each other are in an "or” relationship.
- Android 7.0 and higher versions support file-based encryption (FBE), which can generate a key for each file, that is, generate a per-file key, and then use the key to encrypt and decrypt the specified file to achieve the purpose of protecting the file.
- FBE file-based encryption
- the unique key of each file i.e., the per-file key, is ultimately derived from the user credential encrypted (CE) key through multiple layers of transformation. Therefore, in order to ensure the data security on the terminal, it is necessary to ensure the security of the CE key first.
- the protection method of the CE key is shown in Figure 1, and is as follows:
- Keymaster TA When the lock screen password is not set, Keymaster TA generates keymaster_key_blob, encrypts the CE key, obtains the CE key ciphertext EN_blob, and stores the ciphertext in the user data area (User Data Area, UDA) of the flash memory.
- UDA User Data Area
- the application framework in the Rich Execution Environment (REE) of the mobile device calls the main central processing unit (CPU) to generate two random numbers, namely P0 and P1, and derives the synthetic key (Synthetic Password) through the hash function (Hash);
- REE sends the synthetic key, CE key ciphertext EN_blob, keymaster_key_blob, etc. to TEE;
- Keymaster TA uses keymaster_key_blob to decrypt CE key ciphertext EN_blob to obtain plaintext CE key; then uses the synthetic key to re-encrypt CE key to obtain CE key ciphertext EN_sp, and deletes keymaster_key_blob;
- the synthetic key is encrypted for the first time, including the following operations:
- the application framework in REE calls the main CPU to generate a random number, namely secdis; the gatekeeper module in REE generates a password token (PasswordToken) through the key derivation function (KDF) according to the user credentials entered by the user; gatekeeperd in REE sends a message to the gatekeeper TA in TEE, which contains PasswordToken, secdis, user identifier (User Identifier, UID), etc.
- PasswordToken password token
- KDF key derivation function
- the gatekeeper TA in TEE After receiving the message, the gatekeeper TA in TEE generates a secure identifier (SID), which is a 64-bit random number used to identify the user credential type; it derives key 1 (key1) through a hash function based on PasswordToken and secdis; the Keymaster TA in TEE uses key1 to encrypt the synthetic key for the first time and obtains the synthetic key ciphertext EN_key1, which is spblob_key1.
- SID secure identifier
- the synthetic key is then encrypted for the second time, including the following operations:
- TEE obtains the Hardware Unique Key (HUK); generates other parameters 1 and other parameters 2, which include random numbers, device information, etc.;
- Keymaster TA derives the keymaster's root key KM based on HUK and other parameters 1 through the key generation function KDF;
- Keymaster TA derives the security key (secretKey), namely key 2 (key2), based on KM, security identifier SID and other parameters 2 through the key generation function KDF, where the security identifier SID and other parameters 2 will be stored in the user data area UDA of the flash memory through the keystore;
- Keymaster uses key2 to encrypt the composite key for the second time and obtains the ciphertext EN_key2 of EN_key1/spblob_key1, which is spblob; the security identifier SID and spblob are stored in the user data area UDA of the flash memory.
- gatekeeperd in REE sends PasswordToken to gatekeeper TA in TEE.
- Gatekeeper TA verifies PasswordToken. After successful verification, gatekeeper TA generates an authentication token (AuthToken) and returns AuthToken to gatekeeperd in REE.
- AuthToken authentication token
- gatekeeperd in REE sends the token AuthToken and security identifier SID to the keystore;
- keystore obtains the synthetic key ciphertext spblob and CE key ciphertext EN_sp from the flash user data area UDA according to SID;
- Keystore sends AuthToken, security identifier SID, synthetic key ciphertext spblob and CE key ciphertext EN_sp to Keymaster TA in TEE;
- the hardware unique key HUK, other parameters 1, other parameters 2 and security identifier SID are obtained; the Keymaster TA derives the keymaster root key KM based on HUK and other parameters 1 through the key generation function KDF; the Keymaster TA derives the secretKey, that is, key2*, based on KM, security identifier SID and other parameters 2 through the key generation function KDF.
- Keymaster TA uses key key2* to decrypt the synthetic key ciphertext spblob (i.e. EN_key2) to obtain spblob*;
- Keymaster TA derives the key key1* based on PasswordToken
- Keymaster TA uses key key1* to decrypt spblob* and obtain the composite key
- Keymaster TA uses the synthetic key to decrypt the CE key ciphertext EN_sp to obtain the CE key;
- TK temporary key
- TEE will regenerate a TK each time the device is turned on
- CE key ciphertext EN_tk
- CE key ciphertext EN_tk into the Kernel keyring
- Keymaster TA directly installs the plaintext CE key into the Kernel keyring.
- the CE key is at risk of leakage.
- the hardware encryption engine (Inline Crypto Engine, ICE) encrypts and decrypts the file based on the file key and performs the following operations:
- Keymaster TA will use the temporary key TK to decrypt the CE key ciphertext EN_tk, and further derive the file key based on the file information, and then set the plaintext of the file key to the hardware register of ICE through the functional modules in Figure 2, such as Universal Flash Storage (UFS), UFS driver, ICE driver, Per-File-Encryption (PFE) driver, Keymaster key management, etc.;
- UFS Universal Flash Storage
- PFE Per-File-Encryption
- the storage controller After the file key is set to the hardware register of ICE, the storage controller will initiate the actual read and write operation, and the file content data can be correctly decrypted or encrypted according to the file key.
- the CE key remains unchanged and the synthetic key will not be regenerated. Instead, the synthetic key will be re-encrypted using the key generated by the new lock screen password. Perform the following operations:
- the synthetic key ciphertext spblob is decrypted for the first time by the following operation:
- Keymaster TA derives the keymaster's root key KM through the key generation function KDF based on HUK and other parameters 1;
- Keymaster TA derives secretKey, i.e. key2*, through the key generation function KDF based on KM, security identifier SID and other parameters 2;
- Use key key2* to decrypt the synthetic key ciphertext spblob (i.e. ciphertext EN_key2) to obtain spblob*;
- Gatekeeperd in REE will send a message to gatekeeper TA in TEE, which contains PasswordToken_o, secdis, user identifier UID, etc.; gatekeeper TA derives the key key1_o through the hash function based on PasswordToken_o and secdis; use the key key1_o to decrypt spblob* to obtain the plaintext synthetic key.
- gatekeeperd In REE, gatekeeperd generates PasswordToken_n through the key generation function KDF according to the new user credentials input by the user; gatekeeperd in REE sends a message to gatekeeper TA in TEE, which contains PasswordToken_n, secdis, user identifier UID, etc.; gatekeeper TA derives the key key1_n through the hash function according to PasswordToken_n and secdis; key key1_n is used to encrypt the synthetic key for the first time to obtain the synthetic key ciphertext EN_key1_n, which is spblob_key1_n;
- the keymaster uses the key key2* obtained in the previous step of "decrypting the synthetic key ciphertext spblob for the first time” to encrypt the synthetic key for the second time to obtain the ciphertext EN_key2*, which is spblob_n.
- the ciphertext of the CE key and the ciphertext of the synthetic key used to encrypt the CE key are both stored in the UDA of the flash memory. If the electronic device is stolen or lost, the user's important information may be leaked. Because the security strength of the 4-digit or 6-digit PIN/Password/Pattern, fingerprint, etc. is limited, the attacker may obtain the CE key by brute-forcing the PIN/Password/Pattern, fingerprint, etc., and then obtain the user information, causing the user information to be leaked.
- flash memory is used to store user data on electronic devices.
- One feature of flash memory is that when writing data, the storage space needs to be erased before writing the data, that is, off-site update, that is, writing the updated data to a free storage page instead of the storage page where the original data is located. Therefore, the original data cannot be overwritten by overwriting (except for full disk overwriting) to make it invalid, but the original data will continue to exist for a period of time, that is, until the flash memory controller physically erases it through the relevant algorithm, the original data will become inaccessible.
- the flash memory Since the flash memory is updated off-site, it is unlikely to prevent user data leakage by physically deleting the CE key ciphertext and/or the synthetic key ciphertext through remote control when the electronic device is stolen or lost, because the CE key ciphertext and the synthetic key ciphertext are stored in the UDA of the flash memory, and the flash memory does not support physical erasure of the specified data.
- full disk overwrite can also be performed. For example, for a 128G flash memory, the entire flash memory is overwritten by writing about 128G of random numbers to achieve the purpose of physical erasure.
- this physical erasure method has strict requirements on time (such as 128G flash memory, full overwrite takes at least 10 minutes), device power (such as requiring the device to be connected to the power supply), whether interruption is allowed during operation (such as no interruption is allowed when the full disk is overwritten), etc. Therefore, when the electronic device is stolen or lost, due to the small time window, limited device power, and uncontrolled device, it is unlikely to achieve successful physical erasure by fully overwriting the flash memory through remote control.
- UFS flash memory is divided into 4 partitions, and there are two main partitions related to this application, namely the user data area UDA and the replay protected memory block (RPMB).
- the command for physical erasure of flash memory is limited to the flash memory controller's internal self-calling according to relevant algorithms such as wear leveling algorithm, and is not provided for external calls.
- the RPMB partition of flash memory can provide an RPMB erase (Purge) application programming interface (API) to the outside, supporting external calls to the API to physically erase data in RPMB.
- API application programming interface
- both the CE key ciphertext and the synthetic key ciphertext exist in the UDA of the flash memory.
- the UDA does not provide a physical erase API to the outside world. Therefore, you can consider storing the CE key ciphertext and the synthetic key ciphertext in the RPMB partition. When necessary, you can call the RPMB Purge API to physically erase them, thereby achieving the purpose of securely deleting user data.
- the present application improves the key management of the file system by generating a new parameter, which is stored in the RPMB partition; the encryption key of the synthetic key is derived based on the newly generated parameter.
- the present application also designs an optional solution to store the ciphertext of the synthetic key in the RPMB partition, and immediately remotely and physically erase the ciphertext of the synthetic key when the electronic device is lost or stolen.
- FIG. 3 is a flow chart of an information management method provided in an embodiment of the present application. As shown in FIG. 3, the method includes the following steps:
- Step 301 Store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext obtained by encrypting the synthetic key.
- the key-related information includes a first parameter or a first ciphertext
- the first parameter is used to encrypt a synthetic key
- the first ciphertext is a ciphertext obtained by encrypting the synthetic key.
- RPMB can provide an RPMB Purge API to support external calls to the API to physically erase the data in RPMB, so as to achieve the purpose of safely and quickly deleting user data by physically erasing key-related information related to the user data when user data needs to be deleted in scenarios such as when the electronic device is stolen or lost.
- the embodiments of the present application provide two solutions.
- One is to improve the key management of the file system, that is, by generating a new parameter, namely the first parameter, which can also be called the synthetic key protection factor, and using the parameter to participate in the encryption process of the synthetic key, and then storing the parameter in the RPMB partition.
- the first parameter is remotely physically erased, so that the key to decrypt the synthetic key cannot be derived.
- the second is to store the ciphertext of the synthetic key, that is, the first ciphertext, in the RPMB partition, and immediately remotely and physically erase the ciphertext of the synthetic key when user data needs to be deleted in scenarios such as when the electronic device is lost or stolen.
- the key-related information is the first parameter, namely, the synthetic key protection factor, or the first ciphertext, namely, the synthetic key ciphertext.
- the first parameter to participate in the encryption process of the synthetic key that is, on the basis of the existing synthetic key encryption method (that is, the step of encrypting the synthetic key when setting the lock screen password for the first time as introduced above)
- a new parameter is introduced to participate in the encryption calculation of the synthetic key.
- the parameter can be stored in RPMB, and the synthetic key ciphertext is stored in UDA according to the existing storage method.
- the first parameter is an M-bit random number, where M is a positive integer.
- the first parameter can be a random number generated by TEE.
- the number of bits of the random number can be much larger than the 4 or 6-digit user credentials, i.e., PIN/Password/Pattern.
- PIN/Password/Pattern For example, a 256-bit random number is much more secure than the 4 or 6-digit user credentials, i.e., PIN/Password/Pattern.
- electronic device loss or theft it can completely resist brute force attacks.
- the synthetic key ciphertext obtained after encryption can be stored in the RPMB, that is, the storage method of the synthetic key ciphertext is changed, and it is no longer stored in the UDA partition but is changed to the RPMB partition that supports physical erasure.
- Step 302 When receiving an instruction to delete user data, call the RPMB erase function to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- the key-related information in the RPMB can be immediately erased by sending relevant instructions such as sending a remote control instruction instructing the deletion of user data. That is, the user can use other electronic devices to send instructions for instructing the deletion of user data to the stolen or lost electronic device, so that the electronic device can call the RPMB erase function based on the instruction to immediately physically erase the key-related information stored in the RPMB.
- the key-related information is the first parameter, i.e., the synthetic key protection factor
- the first parameter in the RPMB partition can be physically erased immediately by calling the RPMB erase function to achieve the purpose of secure deletion of user data.
- the first ciphertext in the RPMB partition can be physically erased immediately by calling the RPMB erase function based on the user data deletion instruction, so as to achieve the purpose of secure deletion of user data.
- the key-related information includes the first parameter
- step 301 the method further includes:
- the step 301 includes:
- the first parameter is stored in the RPMB.
- the key-related information includes the first parameter, namely, a synthetic key protection factor, that is, a scheme of generating a new parameter to participate in the encryption calculation of the synthetic key and storing the parameter in the RPMB can be adopted.
- a synthetic key protection factor that is, a scheme of generating a new parameter to participate in the encryption calculation of the synthetic key and storing the parameter in the RPMB can be adopted.
- storing the first parameter in the RPMB includes:
- the first parameter is associated with the key identifier of the synthetic key and stored in the RPMB.
- the first parameter and the key identifier associated with the synthetic key can be stored in the RPMB in association
- the key identifier can be a security identifier SID involved in the encryption of the synthetic key
- the key identifier is used to identify the first parameter, so that the corresponding first parameter can be retrieved according to the key identifier.
- the specified first parameter can be erased according to the key identifier to achieve fine-grained physical erasure.
- the first parameter occupies less storage space than the synthetic key ciphertext
- using this solution will not cause excessive occupation of RPMB storage space, and by erasing this parameter, it can effectively prevent the decryption key of the synthetic key from being derived, and then the CE key cannot be decrypted, and ultimately the user data cannot be accessed, which greatly reduces the possibility of user data leakage.
- the encrypting the synthetic key according to the first parameter includes any of the following:
- the synthetic key is encrypted according to the first key to obtain a second ciphertext; the second ciphertext is encrypted according to the first parameter and the second key to obtain a fifth ciphertext, wherein the first key and the second key are determined in different ways.
- the first parameter can be applied to three different methods to encrypt the synthetic key to protect the synthetic key. They are as follows:
- Method 1 Add the first parameter, i.e., the synthetic key protection factor, to the calculation of the keymaster root key KM;
- Method 2 Add the first parameter, i.e. the synthetic key protection factor, to the calculation of secretKey, i.e. key2;
- Method 3 Add the first parameter, ie, the synthetic key protection factor, to the second encryption calculation of the synthetic key.
- the first parameter i.e., the synthetic key protection factor
- the Keymaster TA derives the root key KM through the key generation function KDF according to other parameters 1, HUK and the first parameter; the Keymaster TA then derives the secretKey, i.e., key2, through the key generation function KDF according to KM, the security identifier SID and other parameters 2; the Keymaster TA in the TEE uses the first key, i.e., key1, to encrypt the synthetic key for the first time, obtaining the ciphertext EN_key1, i.e., spblob_key1, and then uses key2 to encrypt the synthetic key for the second time, i.e., encrypting the first encrypted ciphertext EN_key1 of the synthetic key, obtaining the ciphertext EN_key2, i.e., spblob.
- the first parameter i.e., the synthetic key protection factor
- the first parameter is added to the calculation of secretKey, i.e., key2, i.e., Keymaster TA derives KM through the key generation function KDF according to other parameters 1 and HUK; Keymaster TA then derives secretKey, i.e., key2, through the key generation function KDF according to KM, security identifier SID, other parameters 2 and the first parameter; in TEE, Keymaster TA uses the first key, i.e., key1, to encrypt the synthetic key for the first time, obtaining the ciphertext EN_key1, i.e., spblob_key1, and then uses key2 to encrypt the synthetic key for the second time, i.e., encrypting the first encrypted ciphertext EN_key1 of the synthetic key, obtaining the ciphertext EN_key2, i.e., spblob.
- the first parameter i.e., the synthetic key protection factor
- the synthetic key is added to the second encryption calculation of the synthetic key, i.e., Keymaster TA derives KM through the key generation function KDF according to other parameters 1 and HUK; Keymaster TA then derives secretKey, i.e., key2, through the key generation function KDF according to KM, security identifier SID and other parameters 2; in TEE, Keymaster TA uses the first key, i.e., key1, to encrypt the synthetic key for the first time, and obtains the ciphertext EN_key1, i.e., spblob_key1, and then uses key2 and the first parameter to encrypt the synthetic key for the second time, i.e., encrypt the first encrypted ciphertext EN_key1 of the synthetic key, and obtain the ciphertext EN_key2, i.e., spblob.
- the corresponding step of decrypting the synthetic key is added to the second encryption calculation of the synthetic key
- this implementation supports three different ways to apply the first parameter, namely the synthetic key protection factor, to the encryption calculation process of the synthetic key, all of which can achieve protection of the synthetic key.
- the key-related information includes a first ciphertext
- step 301 the method further includes:
- the step 301 includes:
- the first ciphertext is stored in the RPMB.
- the key-related information includes a first ciphertext, i.e., a synthetic key ciphertext, i.e., an existing encryption method for the synthetic key can be used, i.e., the Keymaster TA in the TEE uses the first key, i.e., key1, to encrypt the synthetic key for the first time, and obtains a ciphertext EN_key1, i.e., spblob_key1, and then uses key2 to encrypt the synthetic key for the second time, i.e., encrypts the first encrypted ciphertext EN_key1 of the synthetic key, and obtains a ciphertext EN_key2, i.e., spblob.
- the storage method of the synthetic key ciphertext is changed, as shown in FIG4 , and the encrypted synthetic key ciphertext is stored in the RPMB.
- storing the first ciphertext in the RPMB includes:
- the first ciphertext is associated with the key identifier of the synthetic key and stored in the RPMB.
- the synthetic key ciphertext and the key identifier associated with the synthetic key can be stored in the RPMB in association, and the key identifier can be a security identifier SID involved in encrypting the synthetic key, and the key identifier is used to identify the synthetic key.
- the key ciphertext is stored in the memory so that the corresponding synthetic key ciphertext can be retrieved according to the key identifier. In this way, the specified synthetic key ciphertext can be erased according to the key identifier when necessary, realizing fine-grained physical erasure.
- step 301 includes:
- the key-related information is sent to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
- the UFS driver calls the RPMB storage function provided by the UFS controller to write the key-related information into the RPMB.
- a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as writing the key-related information in the RMPB; the message processing capability for the key-related information is added to functional modules such as the RPMB kernel driver (RPMB kernel driver), the REE file operation interface (REE file operation interface), and the RPMB listener module (RPMB listener) to support receiving, processing, and forwarding messages related to the writing of the key-related information; and related messages are added between modules such as the key management trusted application (Keymaster TA), RPMB TA, RPMB kernel driver, REE file operation interface, and RPMB listener to support functions such as writing the key-related information.
- the key management trusted application Keymaster TA
- RPMB TA the REE file operation interface
- RPMB listener RPMB listener
- the key-related information can be sent to the key information management module in the RPMB TA through the Keymaster TA, and then the key information management module in the RPMB TA sends the key-related information to the RPMB kernel driver, and the RPMB kernel driver sends the key-related information to the REE file operation interface, and the REE file operation interface continues to send the key-related information to the RPMB listener, and the RPMB listener further sends the key-related information to the UFS driver (UFSDriver), and finally the UFSDriver calls the RPMB storage function provided by the UFS controller (UFS Controller) to write the key-related information into the RPMB.
- UFS Controller UFS Controller
- calling a replay protection memory block RPMB erasing function to physically erase the key related information stored in the RPMB includes:
- the UFS driver calls the RPMB erasing function provided by the UFS controller to physically erase the key-related information stored in the RPMB.
- a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as writing and physically erasing the key-related information in the RMPB; message processing capabilities for the key-related information are added to functional modules such as the RPMB kernel driver, REE file operation interface, and RPMB listener to support receiving, processing, and forwarding messages related to physical erasure of the key-related information; and related messages are added between the Keymaster TA, RPMB TA, RPMB kernel driver, REE file operation interface, RPMB listener, and other modules to support functions such as physical erasure of the key-related information.
- functional modules such as the RPMB kernel driver, REE file operation interface, and RPMB listener to support receiving, processing, and forwarding messages related to physical erasure of the key-related information
- related messages are added between the Keymaster TA, RPMB TA, RPMB kernel driver, REE file operation interface, RPMB listener, and other modules to support functions such as physical erasure of
- the physical erase function of the flash memory RPMB partition is supported in hardware, and the RPMB Purge API is provided externally in the firmware.
- an RPMB erase message can be sent to the key information management module in the RPMB TA through the Keymaster TA, and then the key information management module in the RPMB TA sends the RPMB erase message to the RPMB kernel driver, and the RPMB kernel driver sends the RPMB erase message to the REE file operation interface, and the REE file operation interface continues to send the RPMB erase message to the RPMB listener, and the RPMB listener further sends the RPMB erase message to the UFS driver (UFSDriver), and finally the RPMB erase function provided by the UFS controller (UFSController) is called through the UFSDriver, that is, the RPMB Purge API is accessed to physically erase the key-related information in the RPMB.
- UFSDriver UFS driver
- UFSController the RPMB erase function provided by the UFS controller
- the method further includes:
- the key-related information is sent to the key management trusted application through the UFS driver, the RPMB monitoring module, the REE file operation interface, the RPMB kernel driver and the RPMB trusted application in sequence;
- the user credential encryption key CE key is decrypted according to the plain text of the synthetic key.
- a corresponding key information acquisition module needs to be added to the key management trusted application (Keymaster TA) to support the acquisition of the key-related information from the RPMB through the RPMB trusted application TA; a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as reading the key-related information in the RMPB.
- Keymaster TA key management trusted application
- a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as reading the key-related information in the RMPB.
- the message processing capability for the key-related information is added to the functional modules such as the RPMB kernel driver, REE file operation interface, and RPMB listener module to support the receiving, processing, and forwarding of messages related to the reading of the key-related information; and related messages are added between the Keymaster TA, RPMB TA, RPMB kernel driver, REE file operation interface, RPMB listener and other modules to support functions such as the reading of the key-related information.
- the functional modules such as the RPMB kernel driver, REE file operation interface, and RPMB listener module to support the receiving, processing, and forwarding of messages related to the reading of the key-related information
- related messages are added between the Keymaster TA, RPMB TA, RPMB kernel driver, REE file operation interface, RPMB listener and other modules to support functions such as the reading of the key-related information.
- the physical erase function of the flash memory RPMB partition is supported in hardware, and the RPMB Purge API is provided externally in the firmware.
- the key-related information in the RPMB can be read.
- the key information acquisition module in the Keymaster TA can send a key reading message to the key information management module in the RPMB TA, and then the key information management module in the RPMB TA sends the key reading message to the RPMB kernel driver, and the RPMB kernel driver sends the key reading message to the REE file operation interface, and the REE file operation interface continues to send the key reading message to the RPMB listener, and the RPMB listener further sends the key reading message to the UFS driver (UFSDriver), and finally the RPMB reading function provided by the UFS controller (UFS Controller) is called by the UFSDriver to read the key-related information from the RPMB.
- UFS Controller UFS Controller
- the read key-related information is then passed by the UFS driver in sequence to the RPMB listener, the REE file operation interface, the RPMB kernel driver and the key information management module in the RPMB TA, and finally the key information management module in the RPMB TA sends the key-related information to the key information acquisition module in the Keymaster TA.
- the keystore in the REE obtains the synthetic key ciphertext from the UDA, i.e., the second encrypted ciphertext of the synthetic key
- the Keymaster TA uses the first parameter, i.e., the synthetic key protection factor, to decrypt the second encrypted ciphertext of the synthetic key to obtain the first encrypted ciphertext of the synthetic key, and then uses the first key, i.e., key1, to decrypt the first encrypted ciphertext of the synthetic key to obtain the plaintext of the synthetic key, and finally uses the plaintext of the synthetic key to decrypt the user credential encryption key CE key, and subsequently the encrypted file can be decrypted using the CE key plaintext.
- the first parameter i.e., the synthetic key protection factor
- the Keymaster TA derives the root key KM according to the HUK and other parameters 1, and then derives the second key, i.e., key2, according to KM, SID and other parameters 2, and then uses the second key, i.e., key2, to decrypt the first ciphertext, i.e., the second encrypted ciphertext of the synthetic key, to obtain the first encrypted ciphertext of the synthetic key.
- the first encrypted ciphertext of the synthetic key is then decrypted using the first key, i.e. key1, to obtain the plaintext of the synthetic key.
- the plaintext of the synthetic key is used to decrypt the user credential encryption key CE key, and subsequently the encrypted file can be decrypted using the CE key plaintext.
- the key-related information includes the first parameter, i.e., the synthetic key protection factor
- the functional framework for obtaining the CE key in FIG2 is shown in FIG5 .
- a synthetic key protection factor acquisition module is added to the Keymaster TA to support obtaining the synthetic key protection factor from the RPMB through the RPMB TA when necessary, and the key generation module is improved to support the participation of the synthetic key protection factor in the encryption calculation of the synthetic key.
- a synthetic key ciphertext acquisition module is added to the Keymaster TA to support obtaining the synthetic key ciphertext from the RPMB through the RPMB TA when necessary.
- the user in scenarios where an electronic device is lost, stolen, abandoned or transferred, the user can proactively delete sensitive data on the electronic device quickly, efficiently and securely, so that even if an attacker obtains the user's electronic device, the deleted data cannot be recovered, thereby preventing the leakage of user sensitive information.
- the information management method in the embodiment of the present application stores key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext obtained by encrypting the synthetic key; when an instruction for instructing to delete user data is received,
- the RPMB erasure function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- the RPMB erasure interface can be controlled to be called to quickly physically erase the key-related information stored in the RPMB, thereby achieving the purpose of quickly and safely deleting the user data.
- the information management method provided in the embodiment of the present application can be executed by an information management device.
- the information management device provided in the embodiment of the present application is described by taking the information management device executing the information management method as an example.
- FIG. 7 is a schematic diagram of the structure of an information management device provided in an embodiment of the present application.
- the information management device 700 includes:
- a storage module 701 is used to store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext obtained by encrypting the synthetic key;
- the erasure module 702 is used to call the RPMB erasure function upon receiving an instruction to delete user data, and physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- the key-related information includes the first parameter
- the information management device 700 further includes:
- a first encryption module encrypting the synthetic key according to the first parameter
- the storage module 701 is used to store the first parameter in the RPMB.
- the first encryption module is used for any of the following:
- the synthetic key is encrypted according to the first key to obtain a second ciphertext; the second ciphertext is encrypted according to the first parameter and the second key to obtain a fifth ciphertext, wherein the first key and the second key are determined in different ways.
- the key-related information includes the first ciphertext
- the information management device 700 includes:
- a second encryption module configured to encrypt the synthetic key according to the first key to obtain a second ciphertext, and to encrypt the second ciphertext according to the second key to obtain the first ciphertext, wherein the first key and the second key are determined in different ways;
- the storage module 701 is used to store the first ciphertext in the RPMB.
- the erasing module 702 includes:
- a first sending unit is used to send an RPMB erase message to a universal flash storage UFS driver through a key management trusted application, an RPMB trusted application, an RPMB kernel driver, a REE file operation interface, and an RPMB monitoring module in sequence;
- An erasing unit is used to call the RPMB erasing function provided by the UFS controller through the UFS driver to physically erase the key-related information stored in the RPMB.
- the storage module 701 includes:
- a second sending unit is used to send the key-related information to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
- the writing unit is used to call the RPMB storage function provided by the UFS controller through the UFS driver to write the key related information into the RPMB.
- the information management device 700 further includes:
- a sending module used to send a key reading message to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
- a reading module configured to call an RPMB reading function provided by a UFS controller through the UFS driver to read the key-related information from the RPMB;
- a transmission module configured to send the read key-related information to the key management trusted application through the UFS driver, the RPMB listening module, the REE file operation interface, the RPMB kernel driver and the RPMB trusted application in sequence;
- a determination module used to determine the plaintext of the synthetic key according to the key-related information
- a decryption module is used to decrypt the user credential encryption key CE key according to the plain text of the synthetic key.
- the information management device in the embodiment of the present application stores key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, wherein the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted with the synthetic key; upon receiving an instruction for instructing to delete user data, the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- the information management device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip.
- the electronic device can be a terminal or other devices other than a terminal.
- the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR)/virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc.
- NAS Network Attached Storage
- PC Personal Computer
- TV Television
- ATM self-service machine
- the information management device in the embodiment of the present application may be a device having an operating system.
- the operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
- the information management device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 3. To avoid repetition, it will not be repeated here.
- an embodiment of the present application also provides an electronic device 800, including a processor 801 and a memory 802, and the memory 802 stores a program or instruction that can be executed on the processor 801.
- the program or instruction is executed by the processor 801
- the various steps of the above-mentioned information management method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
- FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
- the electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
- the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, so that the power management system can manage charging, discharging, and power consumption.
- a power source such as a battery
- the electronic device structure shown in FIG9 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
- the processor 910 is configured to store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted from the synthetic key;
- the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
- the key-related information includes the first parameter
- Processor 910 is also used to encrypt the synthetic key according to the first parameter; and store the first parameter in the RPMB.
- processor 910 is further configured to:
- the synthetic key is encrypted according to the first key to obtain a second ciphertext; the second ciphertext is encrypted according to the first parameter and the second key to obtain a fifth ciphertext, wherein the first key and the second key are determined in different ways.
- the key-related information includes the first ciphertext
- Processor 910 is also used to encrypt the synthetic key according to the first key to obtain a second ciphertext, and to encrypt the second ciphertext according to the second key to obtain the first ciphertext, wherein the first key and the second key are determined using different methods; and the first ciphertext is stored in the RPMB.
- the processor 910 is further configured to send an RPMB erase message to a universal flash storage UFS driver through a key management trusted application, an RPMB trusted application, an RPMB kernel driver, a REE file operation interface, and RPMB monitoring in sequence;
- the UFS driver calls the RPMB erasing function provided by the UFS controller to physically erase the key-related information stored in the RPMB.
- the processor 910 is further configured to send the key-related information to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
- the UFS driver calls the RPMB storage function provided by the UFS controller to write the key-related information into the RPMB.
- the processor 910 is further configured to send a key read message to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
- the key-related information is sent to the key management trusted application through the UFS driver, the RPMB monitoring module, the REE file operation interface, the RPMB kernel driver and the RPMB trusted application in sequence;
- the user credential encryption key CE key is decrypted according to the plain text of the synthetic key.
- the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode.
- the display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
- the user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072.
- the touch panel 9071 is also called a touch screen.
- the touch panel 9071 may include two parts: a touch detection device and a touch controller.
- Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
- the memory 909 can be used to store software programs and various data.
- the memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
- the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories.
- the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- the volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM).
- the memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
- the processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
- An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
- a program or instruction is stored.
- the various processes of the above-mentioned information management method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the processor is the processor in the electronic device described in the above embodiment.
- the readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
- An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned information management method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
- An embodiment of the present application provides a computer program product, which is stored in a storage medium.
- the program product is executed by at least one processor to implement the various processes of the above-mentioned information management method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
- a storage medium such as ROM/RAM, a disk, or an optical disk
- a terminal which can be a mobile phone, a computer, a server, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Human Computer Interaction (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Storage Device Security (AREA)
Abstract
Description
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2023年5月30日提交中国专利局、申请号为202310619851.3、名称为“信息管理方法、装置和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on May 30, 2023, with application number 202310619851.3 and title “Information Management Method, Device and Electronic Device”, the entire contents of which are incorporated by reference into this application.
本申请属于通信技术领域,具体涉及一种信息管理方法、装置和电子设备。The present application belongs to the field of communication technology, and specifically relates to an information management method, device and electronic equipment.
目前,人们经常利用手机等移动电子设备处理日常事务,因而电子设备中通常会存储着大量的用户相关信息和数据,当电子设备丢失或被盗时,其上的用户信息和数据也存在极大的泄露风险。现有技术中,常采用全磁盘覆写方法,迫使闪存内部控制器立即调用物理擦除机制,来彻底删除用户数据,以防止用户隐私泄露,例如,对于128G的闪存,可以通过写入大约128G的随机数来对整个闪存进行覆写,达到物理擦除目的。但这种物理擦除方式对时间、电量、操作时是否允许中断等都有严格要求,例如,对128G的闪存进行全部覆写至少需要10分钟,且要求设备接上电源,全盘覆写时不允许中断。因此,在需要删除手机等电子设备上的用户数据时,易受限于时间、电量、设备不受控等因素,导致通过远程控制对闪存进行全部覆写实现物理擦除的成功率较小。At present, people often use mobile electronic devices such as mobile phones to handle daily affairs, so a large amount of user-related information and data are usually stored in electronic devices. When an electronic device is lost or stolen, the user information and data on it are also at great risk of leakage. In the prior art, a full disk overwrite method is often used to force the internal controller of the flash memory to immediately call the physical erase mechanism to completely delete user data to prevent user privacy leakage. For example, for a 128G flash memory, the entire flash memory can be overwritten by writing about 128G of random numbers to achieve the purpose of physical erasure. However, this physical erasure method has strict requirements on time, power, and whether interruptions are allowed during operation. For example, it takes at least 10 minutes to completely overwrite a 128G flash memory, and the device is required to be connected to the power supply, and interruptions are not allowed during the full disk overwrite. Therefore, when it is necessary to delete user data on electronic devices such as mobile phones, it is easily limited by factors such as time, power, and uncontrolled devices, resulting in a low success rate of physical erasure by completely overwriting the flash memory through remote control.
发明内容Summary of the invention
本申请实施例的目的是提供一种信息管理方法、装置和电子设备,能够解决现有技术中在需要删除电子设备上的用户数据时,通过全部覆写实现物理擦除的成功率较小的问题。The purpose of the embodiments of the present application is to provide an information management method, device and electronic device, which can solve the problem in the prior art that when user data on an electronic device needs to be deleted, the success rate of physical erasure by completely overwriting is low.
第一方面,本申请实施例提供了一种信息管理方法,包括:In a first aspect, an embodiment of the present application provides an information management method, including:
将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文;The key-related information is stored in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt the synthetic key, and the first ciphertext is the ciphertext obtained by encrypting the synthetic key;
在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。In case of receiving an instruction for deleting user data, the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
第二方面,本申请实施例提供了一种信息管理装置,包括:In a second aspect, an embodiment of the present application provides an information management device, including:
存储模块,用于将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文; A storage module, configured to store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted from the synthetic key;
擦除模块,用于在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。An erasure module is used to call the RPMB erasure function upon receiving an instruction to delete user data, and physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的信息管理方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the information management method described in the first aspect are implemented.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的信息管理方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the information management method described in the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的信息管理方法。In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the information management method as described in the first aspect.
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的信息管理方法。In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the information management method as described in the first aspect.
第七方面,本申请实施例提供一种电子设备,所述电子设备被配置成用于执行如第一方面所述的方法。In a seventh aspect, an embodiment of the present application provides an electronic device, which is configured to execute the method described in the first aspect.
在本申请实施例中,将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文;在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。这样,通过将用户数据相关的密钥相关信息改存在RPMB中,使得在需要删除电子设备上的用户数据时,能够控制调用RPMB擦除功能对RPMB中存储的密钥相关信息进行快速物理擦除,实现快速安全删除用户数据的目的。In an embodiment of the present application, key-related information is stored in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, wherein the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted from the synthetic key; upon receiving an instruction for instructing to delete user data, the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data. In this way, by changing the key-related information related to user data to be stored in the RPMB, when it is necessary to delete user data on an electronic device, it is possible to control the call of the RPMB erase function to quickly physically erase the key-related information stored in the RPMB, thereby achieving the purpose of quickly and securely deleting user data.
图1是现有CE key的保护方式的示意图;FIG1 is a schematic diagram of an existing CE key protection method;
图2是现有获取CE key的功能框架示意图;FIG2 is a schematic diagram of the existing functional framework for obtaining a CE key;
图3是本申请实施例提供的信息管理方法的流程图;3 is a flow chart of an information management method provided in an embodiment of the present application;
图4是本申请实施例提供的改进的CE key的保护方式的示意图;FIG4 is a schematic diagram of an improved CE key protection method provided in an embodiment of the present application;
图5是本申请实施例提供的改进的获取CE key的功能框架示意图之一;FIG5 is one of the schematic diagrams of the improved functional framework for obtaining the CE key provided in an embodiment of the present application;
图6是本申请实施例提供的改进的获取CE key的功能框架示意图之二;FIG6 is a second schematic diagram of the improved functional framework for obtaining a CE key provided in an embodiment of the present application;
图7是本申请实施例提供的信息管理装置的结构示意图;7 is a schematic diagram of the structure of an information management device provided in an embodiment of the present application;
图8是本申请实施例提供的电子设备的结构示意图;FIG8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
图9是本申请实施例提供的电子设备的硬件结构示意图。 FIG. 9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally indicates that the objects associated with each other are in an "or" relationship.
为使本申请实施例更为清楚,下面先对本申请实施例中涉及的相关背景技术知识进行如下介绍:In order to make the embodiments of the present application clearer, the relevant background technology knowledge involved in the embodiments of the present application is first introduced as follows:
安卓(Android)7.0及更高版本支持文件级加密(File-Based Encryption,FBE),可以针对每一个文件生成一个密钥,即生成每个文件的密钥(per-file key),然后使用该密钥对这个指定的文件进行加解密,以达到对文件进行保护的目的。Android 7.0 and higher versions support file-based encryption (FBE), which can generate a key for each file, that is, generate a per-file key, and then use the key to encrypt and decrypt the specified file to achieve the purpose of protecting the file.
而每个文件的独有密钥即per-file key,最终都是通过用户凭证加密(Credential Encrypted,CE)密钥(key)经过多层变换推导得出的。因此,为了确保终端上的数据安全,首先需要确保CE key的安全。现有技术中,对CE key的保护方式如图1所示,具体如下:The unique key of each file, i.e., the per-file key, is ultimately derived from the user credential encrypted (CE) key through multiple layers of transformation. Therefore, in order to ensure the data security on the terminal, it is necessary to ensure the security of the CE key first. In the prior art, the protection method of the CE key is shown in Figure 1, and is as follows:
1、终端在首次开机时,执行如下操作:1. When the terminal is powered on for the first time, perform the following operations:
1)终端可信执行环境(Trusted Execution Environment,TEE)的密钥管理(Keymaster)可信应用(Trusted Application,TA)自动生成磁盘加密(Disk Encrypted,DE)key和CE key;1) The key management (Keymaster) of the terminal trusted execution environment (TEE) and the trusted application (TA) automatically generate the disk encryption (DE) key and CE key;
2)在未设置锁屏密码时,Keymaster TA生成keymaster_key_blob,对CE key加密,得到CE key密文即EN_blob,将该密文存在闪存的用户数据区(User Data Area,UDA)。2) When the lock screen password is not set, Keymaster TA generates keymaster_key_blob, encrypts the CE key, obtains the CE key ciphertext EN_blob, and stores the ciphertext in the user data area (User Data Area, UDA) of the flash memory.
2、在第一次设置锁屏密码时,执行如下操作:2. When setting the lock screen password for the first time, perform the following operations:
1)获取用户输入的用户凭证,即个人身份识别码(Personal Identification Number,PIN)/密码(Password)/图案(Pattern);1) Obtain user credentials entered by the user, i.e., Personal Identification Number (PIN)/Password/Pattern;
2)对CE key进行如下加密保护:2) Encrypt and protect the CE key as follows:
移动设备通用环境(Rich Execution Environment,REE)中应用框架调用主中央处理器(Central Processing Unit,CPU)生成2个随机数,即P0和P1,并通过哈希函数(Hash)推导出合成密钥(Synthetic Password);The application framework in the Rich Execution Environment (REE) of the mobile device calls the main central processing unit (CPU) to generate two random numbers, namely P0 and P1, and derives the synthetic key (Synthetic Password) through the hash function (Hash);
REE将合成密钥、CE key密文EN_blob、keymaster_key_blob等发送给TEE;REE sends the synthetic key, CE key ciphertext EN_blob, keymaster_key_blob, etc. to TEE;
TEE中Keymaster TA使用keymaster_key_blob对CE key密文EN_blob进行解密,得到明文CE key;再用合成密钥对CE key进行重新加密,从而得到CE key密文即EN_sp,并删除keymaster_key_blob;In TEE, Keymaster TA uses keymaster_key_blob to decrypt CE key ciphertext EN_blob to obtain plaintext CE key; then uses the synthetic key to re-encrypt CE key to obtain CE key ciphertext EN_sp, and deletes keymaster_key_blob;
将CE key密文EN_sp存在闪存的用户数据区UDA; Store the CE key ciphertext EN_sp in the user data area UDA of the flash memory;
3)对合成密钥进行如下加密保护:3) The synthetic key is encrypted and protected as follows:
首先对合成密钥进行第一次加密,包括如下操作:First, the synthetic key is encrypted for the first time, including the following operations:
REE中应用框架调用主CPU生成1个随机数即secdis;REE中看门模块(gatekeeperd)根据用户输入的用户凭证通过密钥生成函数(Key Derivation Function,KDF)生成密码令牌(PasswordToken);REE中gatekeeperd向TEE中看门(gatekeeper)TA发送消息,该消息包含有PasswordToken、secdis、用户标识(User Identifier,UID)等;The application framework in REE calls the main CPU to generate a random number, namely secdis; the gatekeeper module in REE generates a password token (PasswordToken) through the key derivation function (KDF) according to the user credentials entered by the user; gatekeeperd in REE sends a message to the gatekeeper TA in TEE, which contains PasswordToken, secdis, user identifier (User Identifier, UID), etc.
TEE中gatekeeper TA收到消息后,生成安全标识(Secure Identifier,SID),该SID是一个64位的随机数,用于标识用户凭证类型;根据PasswordToken和secdis通过哈希函数推导出密钥1(key1);TEE中Keymaster TA使用key1对合成密钥进行第一次加密,得到合成密钥密文EN_key1,即为spblob_key1。After receiving the message, the gatekeeper TA in TEE generates a secure identifier (SID), which is a 64-bit random number used to identify the user credential type; it derives key 1 (key1) through a hash function based on PasswordToken and secdis; the Keymaster TA in TEE uses key1 to encrypt the synthetic key for the first time and obtains the synthetic key ciphertext EN_key1, which is spblob_key1.
再对合成密钥进行第二次加密,包括如下操作:The synthetic key is then encrypted for the second time, including the following operations:
TEE获取硬件唯一密钥(Hardware Unique Key,HUK);生成其他参数1和其他参数2,这些参数包含随机数、设备信息等;Keymaster TA根据HUK和其他参数1通过密钥生成函数KDF推导出keymaster的根密钥KM;Keymaster TA根据KM、安全标识SID和其他参数2,通过密钥生成函数KDF推导出安全密钥(secretKey),即密钥2(key2),其中安全标识SID和其他参数2会通过密钥库(keystore)存在闪存的用户数据区UDA;Keymaster使用key2对合成密钥进行第二次加密,得到EN_key1/spblob_key1的密文EN_key2,即为spblob;将安全标识SID和spblob存在闪存的用户数据区UDA。TEE obtains the Hardware Unique Key (HUK); generates other parameters 1 and other parameters 2, which include random numbers, device information, etc.; Keymaster TA derives the keymaster's root key KM based on HUK and other parameters 1 through the key generation function KDF; Keymaster TA derives the security key (secretKey), namely key 2 (key2), based on KM, security identifier SID and other parameters 2 through the key generation function KDF, where the security identifier SID and other parameters 2 will be stored in the user data area UDA of the flash memory through the keystore; Keymaster uses key2 to encrypt the composite key for the second time and obtains the ciphertext EN_key2 of EN_key1/spblob_key1, which is spblob; the security identifier SID and spblob are stored in the user data area UDA of the flash memory.
3、在验证锁屏密码时,将CE key安装到内核(Kernel)密钥环(keyring)中,如图2所示,执行如下操作:3. When verifying the lock screen password, install the CE key into the kernel keyring, as shown in Figure 2, and perform the following operations:
1)获取输入的用户凭证(即PIN/Password/Pattern);1) Get the input user credentials (i.e. PIN/Password/Pattern);
2)REE中的gatekeeperd根据用户输入的用户凭证生成PasswordToken;2) gatekeeperd in REE generates PasswordToken based on the user credentials entered by the user;
3)REE中的gatekeeperd将PasswordToken发送给TEE中的gatekeeper TA,gatekeeper TA验证PasswordToken,验证成功后gatekeeper TA会生成一个身份验证令牌(AuthToken),并将AuthToken返回给REE中的gatekeeperd;3) gatekeeperd in REE sends PasswordToken to gatekeeper TA in TEE. Gatekeeper TA verifies PasswordToken. After successful verification, gatekeeper TA generates an authentication token (AuthToken) and returns AuthToken to gatekeeperd in REE.
4)REE中的gatekeeperd将令牌AuthToken和安全标识SID发给keystore;4) gatekeeperd in REE sends the token AuthToken and security identifier SID to the keystore;
5)keystore根据SID从闪存用户数据区UDA中获取合成密钥密文spblob和CE key密文EN_sp;5) keystore obtains the synthetic key ciphertext spblob and CE key ciphertext EN_sp from the flash user data area UDA according to SID;
6)keystore将AuthToken、安全标识SID、合成密钥密文spblob和CE key密文EN_sp发给TEE中的Keymaster TA;6) Keystore sends AuthToken, security identifier SID, synthetic key ciphertext spblob and CE key ciphertext EN_sp to Keymaster TA in TEE;
7)Keymaster TA验证AuthToken,验证成功后,进行如下操作:7) Keymaster TA verifies AuthToken. After successful verification, it performs the following operations:
获取硬件唯一密钥HUK、其他参数1、其他参数2和安全标识SID;Keymaster TA根据HUK和其他参数1通过密钥生成函数KDF推导出keymaster的根密钥KM;Keymaster TA根据KM、安全标识SID和其他参数2,通过密钥生成函数KDF推导出secretKey,即key2*。 The hardware unique key HUK, other parameters 1, other parameters 2 and security identifier SID are obtained; the Keymaster TA derives the keymaster root key KM based on HUK and other parameters 1 through the key generation function KDF; the Keymaster TA derives the secretKey, that is, key2*, based on KM, security identifier SID and other parameters 2 through the key generation function KDF.
8)Keymaster TA使用密钥key2*对合成密钥密文spblob(即EN_key2)进行解密,得到spblob*;8) Keymaster TA uses key key2* to decrypt the synthetic key ciphertext spblob (i.e. EN_key2) to obtain spblob*;
9)Keymaster TA根据PasswordToken推导出密钥key1*;9)Keymaster TA derives the key key1* based on PasswordToken;
10)Keymaster TA使用密钥key1*对spblob*进行解密,得到合成密钥;10) Keymaster TA uses key key1* to decrypt spblob* and obtain the composite key;
11)Keymaster TA使用合成密钥对CE key密文EN_sp进行解密得到CE key;11) Keymaster TA uses the synthetic key to decrypt the CE key ciphertext EN_sp to obtain the CE key;
12)Keymaster TA使用临时密钥(Temporary Key,TK)(每次开机时,TEE都会重新生成一个TK)对CE key加密,得到CE key密文EN_tk,然后将CE key密文EN_tk安装到Kernel keyring中;或者,Keymaster TA直接将明文CE key安装到Kernel keyring中,这种情况下,CE key面临泄漏的风险。12) Keymaster TA uses a temporary key (TK) (TEE will regenerate a TK each time the device is turned on) to encrypt the CE key, obtain the CE key ciphertext EN_tk, and then install the CE key ciphertext EN_tk into the Kernel keyring; or, Keymaster TA directly installs the plaintext CE key into the Kernel keyring. In this case, the CE key is at risk of leakage.
4、在读写文件时,由硬件加密引擎(Inline Crypto Engine,ICE)基于文件密钥对该文件进行加解密,执行如下操作:4. When reading and writing files, the hardware encryption engine (Inline Crypto Engine, ICE) encrypts and decrypts the file based on the file key and performs the following operations:
1)如图2所示,当实际发生磁盘的读写(Block IO)时,会在发起读写操作之前,通过一系列的回调函数找到文件系统索引节点(inode)中存放的密钥信息,如CE key密文EN_tk、文件信息等,并将该密钥信息发给Keymaster TA;1) As shown in Figure 2, when the disk is actually read or written (Block IO), before the read or write operation is initiated, a series of callback functions are used to find the key information stored in the file system index node (inode), such as CE key ciphertext EN_tk, file information, etc., and send the key information to the Keymaster TA;
2)Keymaster TA会使用临时密钥TK对CE key密文EN_tk进行解密,并根据文件信息进一步推导出文件密钥(file key),再通过图2中的功能模块如通用闪存存储(Universal Flash Storage,UFS)、UFS驱动(driver)、ICE driver、每文件加密(Per-File-Encryption,PFE)driver、Keymaster密钥管理(key management)等将该file key的明文设置到ICE的硬件寄存器;2) Keymaster TA will use the temporary key TK to decrypt the CE key ciphertext EN_tk, and further derive the file key based on the file information, and then set the plaintext of the file key to the hardware register of ICE through the functional modules in Figure 2, such as Universal Flash Storage (UFS), UFS driver, ICE driver, Per-File-Encryption (PFE) driver, Keymaster key management, etc.;
3)在file key被设置到ICE的硬件寄存器后,存储控制器才会发起实际的读写操作,文件内容数据就能够根据file key进行正确的解密或加密。3) After the file key is set to the hardware register of ICE, the storage controller will initiate the actual read and write operation, and the file content data can be correctly decrypted or encrypted according to the file key.
5、在修改锁屏密码时,CE key不变,合成密钥不会重新生成,而是使用新的锁屏密码生成的密钥,对合成密钥进行重新加密,执行如下操作:5. When changing the lock screen password, the CE key remains unchanged and the synthetic key will not be regenerated. Instead, the synthetic key will be re-encrypted using the key generated by the new lock screen password. Perform the following operations:
1)根据原来的用户凭证,解密得到合成密钥明文:1) According to the original user credentials, decrypt to obtain the synthetic key plaintext:
首先,通过如下操作对合成密钥密文spblob进行第一次解密:First, the synthetic key ciphertext spblob is decrypted for the first time by the following operation:
获取硬件唯一密钥HUK、其他参数1、其他参数2、安全标识SID;Keymaster TA根据HUK和其他参数1通过密钥生成函数KDF推导出keymaster的根密钥KM;Keymaster TA根据KM、安全标识SID和其他参数2,通过密钥生成函数KDF推导出secretKey,即key2*;使用密钥key2*对合成密钥密文spblob(即密文EN_key2)进行解密,得到spblob*;Obtain the hardware unique key HUK, other parameters 1, other parameters 2, and security identifier SID; Keymaster TA derives the keymaster's root key KM through the key generation function KDF based on HUK and other parameters 1; Keymaster TA derives secretKey, i.e. key2*, through the key generation function KDF based on KM, security identifier SID and other parameters 2; Use key key2* to decrypt the synthetic key ciphertext spblob (i.e. ciphertext EN_key2) to obtain spblob*;
再通过如下操作对合成密钥密文spblob进行第二次解密:Then decrypt the synthetic key ciphertext spblob for the second time through the following operations:
根据原来的用户凭证通过密钥生成函数KDF生成PasswordToken_o;REE中gatekeeperd会向TEE中gatekeeper TA发送消息,该消息包含PasswordToken_o、secdis、用户标识UID等;gatekeeper TA根据PasswordToken_o和secdis通过哈希函数推导出密钥key1_o;使用密钥key1_o对spblob*进行解密,得到明文的合成密钥。Generate PasswordToken_o through the key generation function KDF based on the original user credentials; gatekeeperd in REE will send a message to gatekeeper TA in TEE, which contains PasswordToken_o, secdis, user identifier UID, etc.; gatekeeper TA derives the key key1_o through the hash function based on PasswordToken_o and secdis; use the key key1_o to decrypt spblob* to obtain the plaintext synthetic key.
2)根据新输入的用户凭证,对合成密钥进行重新加密: 2) Re-encrypt the synthesized key based on the newly entered user credentials:
首先,通过如下操作对合成密钥进行第一次加密:First, encrypt the synthetic key for the first time by doing the following:
REE中gatekeeperd根据用户输入的新的用户凭证通过密钥生成函数KDF生成PasswordToken_n;REE中gatekeeperd会向TEE中gatekeeper TA发送消息,该消息包含PasswordToken_n、secdis、用户标识UID等;gatekeeper TA根据PasswordToken_n和secdis通过哈希函数推导出密钥key1_n;使用密钥key1_n对合成密钥进行第一次加密,得到合成密钥密文EN_key1_n,即为spblob_key1_n;In REE, gatekeeperd generates PasswordToken_n through the key generation function KDF according to the new user credentials input by the user; gatekeeperd in REE sends a message to gatekeeper TA in TEE, which contains PasswordToken_n, secdis, user identifier UID, etc.; gatekeeper TA derives the key key1_n through the hash function according to PasswordToken_n and secdis; key key1_n is used to encrypt the synthetic key for the first time to obtain the synthetic key ciphertext EN_key1_n, which is spblob_key1_n;
其次,通过如下操作对合成密钥进行第二次加密:Next, encrypt the synthesized key a second time by doing the following:
keymaster使用前面“对合成密钥密文spblob进行第一次解密”的步骤中得到的密钥key2*,对合成密钥进行第二次加密,得到密文EN_key2*,即为spblob_n。The keymaster uses the key key2* obtained in the previous step of "decrypting the synthetic key ciphertext spblob for the first time" to encrypt the synthetic key for the second time to obtain the ciphertext EN_key2*, which is spblob_n.
可见,现有技术中,CE key的密文以及用于加密CE key的合成密钥的密文,都存在闪存的UDA。如果电子设备被盗或丢失,用户的重要信息有可能泄漏,因为4位或6位的PIN/Password/Pattern、指纹等安全强度有限,攻击者可能通过暴力破解PIN/Password/Pattern、指纹等方式获得CE key,进而获得用户信息,造成用户信息泄露。It can be seen that in the prior art, the ciphertext of the CE key and the ciphertext of the synthetic key used to encrypt the CE key are both stored in the UDA of the flash memory. If the electronic device is stolen or lost, the user's important information may be leaked. Because the security strength of the 4-digit or 6-digit PIN/Password/Pattern, fingerprint, etc. is limited, the attacker may obtain the CE key by brute-forcing the PIN/Password/Pattern, fingerprint, etc., and then obtain the user information, causing the user information to be leaked.
目前,电子设备上用户数据的存储都使用闪存。闪存有一个特点是:数据写入时,需要先擦除存储空间再写入数据,即异地更新,也就是将更新后的数据写入空闲存储页,而不是写入原始数据所在的存储页。因此,通过覆写的方式,并不能将原来的数据进行覆盖(全磁盘覆写除外),使其失效,而是原有的数据会继续存在一段时间,即直到闪存控制器通过相关的算法进行物理擦除,原有的数据才不可访问。At present, flash memory is used to store user data on electronic devices. One feature of flash memory is that when writing data, the storage space needs to be erased before writing the data, that is, off-site update, that is, writing the updated data to a free storage page instead of the storage page where the original data is located. Therefore, the original data cannot be overwritten by overwriting (except for full disk overwriting) to make it invalid, but the original data will continue to exist for a period of time, that is, until the flash memory controller physically erases it through the relevant algorithm, the original data will become inaccessible.
由于闪存是异地更新,在电子设备被盗或丢失时,不太可能通过远程控制物理删除CE key密文和/或合成密钥密文,来防止用户数据泄露,因为CE key密文和合成密钥密文存储在闪存的UDA,而闪存不支持对指定的数据进行物理擦除。当然,也可以进行全磁盘覆写,例如,对于128G的闪存,通过写入大约128G的随机数来对整个闪存进行覆写,从而达到物理擦除的目的,然而,这种物理擦除方式对时间(如128G的闪存,进行全部覆写,至少需要10分钟)、设备电量(如要求设备接上电源)、操作时是否允许中断(如全盘覆写时不允许中断)等都有严格要求。因此,电子设备被盗或丢失时,由于时间窗口很小、设备电量受限、设备不受控等原因,通过远程控制对闪存进行全部覆写达到成功物理擦除的可能性较小。Since the flash memory is updated off-site, it is unlikely to prevent user data leakage by physically deleting the CE key ciphertext and/or the synthetic key ciphertext through remote control when the electronic device is stolen or lost, because the CE key ciphertext and the synthetic key ciphertext are stored in the UDA of the flash memory, and the flash memory does not support physical erasure of the specified data. Of course, full disk overwrite can also be performed. For example, for a 128G flash memory, the entire flash memory is overwritten by writing about 128G of random numbers to achieve the purpose of physical erasure. However, this physical erasure method has strict requirements on time (such as 128G flash memory, full overwrite takes at least 10 minutes), device power (such as requiring the device to be connected to the power supply), whether interruption is allowed during operation (such as no interruption is allowed when the full disk is overwritten), etc. Therefore, when the electronic device is stolen or lost, due to the small time window, limited device power, and uncontrolled device, it is unlikely to achieve successful physical erasure by fully overwriting the flash memory through remote control.
为了提高电子设备被盗或丢失时用户数据安全删除成功的可能性,需要在短时间内对指定的数据如CE key密文、合成密钥密文,进行物理擦除,以防止用户数据泄漏。In order to increase the possibility of successful secure deletion of user data when an electronic device is stolen or lost, it is necessary to physically erase specified data such as CE key ciphertext and synthetic key ciphertext within a short period of time to prevent user data leakage.
通常情况下,UFS闪存分为4个分区,与本申请相关的主要有两个分区,即用户数据区UDA和重放保护内存块(Replay Protected Memory Block,RPMB)。为了延长UFS闪存的使用寿命,闪存物理擦除的命令仅限于闪存控制器内部根据相关的算法如磨损均衡算法自行调用,并不提供给外部调用。但从UFS 4.0(2022年12月发布)开始,闪存的RPMB分区能向外提供RPMB擦除(Purge)应用程序接口(Application Programming Interface,API),支持外部调用该API对RPMB中的数据进行物理擦除。 Normally, UFS flash memory is divided into 4 partitions, and there are two main partitions related to this application, namely the user data area UDA and the replay protected memory block (RPMB). In order to extend the service life of UFS flash memory, the command for physical erasure of flash memory is limited to the flash memory controller's internal self-calling according to relevant algorithms such as wear leveling algorithm, and is not provided for external calls. However, starting with UFS 4.0 (released in December 2022), the RPMB partition of flash memory can provide an RPMB erase (Purge) application programming interface (API) to the outside, supporting external calls to the API to physically erase data in RPMB.
CE key密文和合成密钥密文目前都存在闪存的UDA,然而,UDA并不对外提供物理擦除API,因此,可考虑将CE key密文、合成密钥密文存放到RPMB分区,在需要时,可以调用RPMB Purge API对其进行物理擦除,从而达到用户数据安全删除的目的。Currently, both the CE key ciphertext and the synthetic key ciphertext exist in the UDA of the flash memory. However, the UDA does not provide a physical erase API to the outside world. Therefore, you can consider storing the CE key ciphertext and the synthetic key ciphertext in the RPMB partition. When necessary, you can call the RPMB Purge API to physically erase them, thereby achieving the purpose of securely deleting user data.
但是将CE key密文、合成密钥密文从原来存放在UDA分区,改为存放到RPMB分区,需要对原有系统有较大改动,尤其是将CE key密文存放到RPMB分区时,需要对REE中的keystore、TEE中的keymaster等功能模块进行修改,且功能模块之间的消息也需要进行修改。另外,RPMB分区较小,而同一个用户有多个CE key,且不同用户有不同的CE key和合成密钥,因此,它们的密文会占用RPMB分区更多的空间。However, changing the CE key ciphertext and synthetic key ciphertext from the original UDA partition to the RPMB partition requires major changes to the original system. In particular, when storing the CE key ciphertext in the RPMB partition, it is necessary to modify the keystore in REE, the keymaster in TEE and other functional modules, and the messages between functional modules also need to be modified. In addition, the RPMB partition is small, and the same user has multiple CE keys, and different users have different CE keys and synthetic keys. Therefore, their ciphertexts will occupy more space in the RPMB partition.
为了降低实现成本,需要尽可能地兼容原来的实现方式,即在原来实现方式改动最小的情况下,实现用户数据安全删除。因此,本申请对文件系统的密钥管理进行了改进,通过生成一个新的参数,该新生成的参数存储在RPMB分区中;基于该新生成的参数推导出合成密钥的加密密钥。在电子设备丢失或被盗等场景下需要删除用户数据时,只需要远程控制调用RPMB Purge API,物理擦除该新生成的参数,使得无法解密获得合成密钥,进而不能解密获得CE key,最终访问不了用户数据,降低了用户数据泄露的可能性。由于只需要物理擦除一个新生成的参数,实现效率很高,完全能满足用户在电子设备丢失或被盗时立即安全删除用户数据的需求。另外,本申请还设计了一个可选方案,将合成密钥的密文存放在RPMB分区,在电子设备丢失或被盗时立即远程物理擦除合成密钥的密文,不过如果同一个终端有多个用户账号,则需要存储多个合成密钥的密文,且物理擦除时,需要擦除RPMB中所有的合成密钥的密文。In order to reduce the implementation cost, it is necessary to be compatible with the original implementation as much as possible, that is, to achieve secure deletion of user data with minimal changes to the original implementation. Therefore, the present application improves the key management of the file system by generating a new parameter, which is stored in the RPMB partition; the encryption key of the synthetic key is derived based on the newly generated parameter. When user data needs to be deleted in scenarios such as electronic equipment being lost or stolen, it is only necessary to remotely control the call of the RPMB Purge API to physically erase the newly generated parameter, so that it is impossible to decrypt and obtain the synthetic key, and then it is impossible to decrypt and obtain the CE key, and finally the user data cannot be accessed, reducing the possibility of user data leakage. Since only a newly generated parameter needs to be physically erased, the implementation efficiency is very high, which can fully meet the user's needs to immediately and securely delete user data when the electronic device is lost or stolen. In addition, the present application also designs an optional solution to store the ciphertext of the synthetic key in the RPMB partition, and immediately remotely and physically erase the ciphertext of the synthetic key when the electronic device is lost or stolen. However, if there are multiple user accounts on the same terminal, it is necessary to store the ciphertext of multiple synthetic keys, and when physically erasing, it is necessary to erase the ciphertext of all synthetic keys in the RPMB.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的信息管理方法进行详细地说明。The information management method provided by the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
请参见图3,图3为本申请实施例提供的信息管理方法的流程图,如图3所示,该方法包括以下步骤:Please refer to FIG. 3, which is a flow chart of an information management method provided in an embodiment of the present application. As shown in FIG. 3, the method includes the following steps:
步骤301、将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文。Step 301: Store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext obtained by encrypting the synthetic key.
本申请实施例中,可以借助RPMB能向外提供RPMB Purge API,支持外部调用该API对RPMB中的数据进行物理擦除的功能,来实现在电子设备被盗或丢失等场景下需要删除用户数据时,通过物理擦除与用户数据相关的密钥相关信息,达到安全快速删除用户数据的目的。In the embodiments of the present application, RPMB can provide an RPMB Purge API to support external calls to the API to physically erase the data in RPMB, so as to achieve the purpose of safely and quickly deleting user data by physically erasing key-related information related to the user data when user data needs to be deleted in scenarios such as when the electronic device is stolen or lost.
为此,本申请实施例提供两种解决方案,其一是对文件系统的密钥管理进行了改进,即通过生成一个新的参数即第一参数,也可以叫合成密钥保护因子,利用该参数参与对合成密钥的加密过程,然后将该参数存储在RPMB分区中。在电子设备丢失或被盗等场景下需要删除用户数据时,远程物理擦除所述第一参数,使得不能推导出对合成密钥解密的密 钥。其二是将合成密钥的密文也即第一密文存放在RPMB分区,在电子设备丢失或被盗等场景下需要删除用户数据时立即远程物理擦除该合成密钥的密文。To this end, the embodiments of the present application provide two solutions. One is to improve the key management of the file system, that is, by generating a new parameter, namely the first parameter, which can also be called the synthetic key protection factor, and using the parameter to participate in the encryption process of the synthetic key, and then storing the parameter in the RPMB partition. When the user data needs to be deleted in the scenario of electronic device loss or theft, the first parameter is remotely physically erased, so that the key to decrypt the synthetic key cannot be derived. The second is to store the ciphertext of the synthetic key, that is, the first ciphertext, in the RPMB partition, and immediately remotely and physically erase the ciphertext of the synthetic key when user data needs to be deleted in scenarios such as when the electronic device is lost or stolen.
上述密钥相关信息即为所述第一参数,即合成密钥保护因子,或者为所述第一密文,即合成密钥密文。The key-related information is the first parameter, namely, the synthetic key protection factor, or the first ciphertext, namely, the synthetic key ciphertext.
在利用所述第一参数参与对合成密钥的加密过程时,即在现有合成密钥加密方式(即前述介绍的在第一次设置锁屏密码时对合成密钥进行加密的步骤)的基础上引入一位新的参数参与合成密钥的加密计算,可以在加密完后,将该参数存储在RPMB中,合成密钥密文则按现有存储方式存储在UDA中。When using the first parameter to participate in the encryption process of the synthetic key, that is, on the basis of the existing synthetic key encryption method (that is, the step of encrypting the synthetic key when setting the lock screen password for the first time as introduced above), a new parameter is introduced to participate in the encryption calculation of the synthetic key. After encryption, the parameter can be stored in RPMB, and the synthetic key ciphertext is stored in UDA according to the existing storage method.
可选地,所述第一参数为一个M位的随机数,M为正整数。Optionally, the first parameter is an M-bit random number, where M is a positive integer.
即所述第一参数可以是由TEE生成的随机数。为了保证较高的安全性,该随机数的位数可远大于4或6位用户凭证即PIN/Password/Pattern,如为一个256位的随机数,这样比4或6位的用户凭证即PIN/Password/Pattern的安全性高很多,在电子设备丢失或被盗等场景下,能够完全能抵抗暴力破解的攻击。That is, the first parameter can be a random number generated by TEE. In order to ensure higher security, the number of bits of the random number can be much larger than the 4 or 6-digit user credentials, i.e., PIN/Password/Pattern. For example, a 256-bit random number is much more secure than the 4 or 6-digit user credentials, i.e., PIN/Password/Pattern. In the case of electronic device loss or theft, it can completely resist brute force attacks.
在使用现有合成密钥加密方式时,可以将加密后得到的合成密钥密文存储在RPMB中,即更改对合成密钥密文的存储方式,不再是存储在UDA分区而是改存在支持物理擦除的RPMB分区。When using the existing synthetic key encryption method, the synthetic key ciphertext obtained after encryption can be stored in the RPMB, that is, the storage method of the synthetic key ciphertext is changed, and it is no longer stored in the UDA partition but is changed to the RPMB partition that supports physical erasure.
步骤302、在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。Step 302: When receiving an instruction to delete user data, call the RPMB erase function to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
在需要删除电子设备中的用户数据时,例如,在电子设备丢失或被盗时,可以通过发送相关指令如发送指示删除用户数据的远程控制指令来立即擦除RPMB中的密钥相关信息,即用户可以利用其它电子设备向被盗或丢失的电子设备发送用于指示删除用户数据的指令,从而该电子设备可以基于该指令,调用RPMB擦除功能,立即对所述RPMB中存储的所述密钥相关信息进行物理擦除。When it is necessary to delete user data in an electronic device, for example, when the electronic device is lost or stolen, the key-related information in the RPMB can be immediately erased by sending relevant instructions such as sending a remote control instruction instructing the deletion of user data. That is, the user can use other electronic devices to send instructions for instructing the deletion of user data to the stolen or lost electronic device, so that the electronic device can call the RPMB erase function based on the instruction to immediately physically erase the key-related information stored in the RPMB.
在所述密钥相关信息为所述第一参数即合成密钥保护因子时,在电子设备丢失或被盗等场景下,可基于用户数据删除指令,通过调用RPMB擦除功能,立即物理擦除RPMB分区中的所述第一参数,以实现用户数据安全删除的目的。When the key-related information is the first parameter, i.e., the synthetic key protection factor, in scenarios such as when the electronic device is lost or stolen, based on the user data deletion instruction, the first parameter in the RPMB partition can be physically erased immediately by calling the RPMB erase function to achieve the purpose of secure deletion of user data.
在所述密钥相关信息为所述第一密文即合成密钥密文时,在电子设备丢失或被盗等场景下,可基于用户数据删除指令,通过调用RPMB擦除功能,立即物理擦除RPMB分区中的所述第一密文,以实现用户数据安全删除的目的。When the key-related information is the first ciphertext, i.e., the synthetic key ciphertext, in scenarios such as when the electronic device is lost or stolen, the first ciphertext in the RPMB partition can be physically erased immediately by calling the RPMB erase function based on the user data deletion instruction, so as to achieve the purpose of secure deletion of user data.
可选地,所述密钥相关信息包括所述第一参数;Optionally, the key-related information includes the first parameter;
所述步骤301之前,所述方法还包括:Before step 301, the method further includes:
根据所述第一参数对合成密钥进行加密;encrypting the synthetic key according to the first parameter;
所述步骤301包括:The step 301 includes:
将所述第一参数存储至所述RPMB中。 The first parameter is stored in the RPMB.
一种实施方式中,所述密钥相关信息包括所述第一参数即合成密钥保护因子,即可以采用生成一个新的参数,来参与对合成密钥的加密计算,并将该参数存储在RPMB中的方案。In one implementation, the key-related information includes the first parameter, namely, a synthetic key protection factor, that is, a scheme of generating a new parameter to participate in the encryption calculation of the synthetic key and storing the parameter in the RPMB can be adopted.
进一步地,所述将所述第一参数存储至所述RPMB中,包括:Further, storing the first parameter in the RPMB includes:
将所述第一参数与所述合成密钥的密钥标识关联存储在RPMB中。The first parameter is associated with the key identifier of the synthetic key and stored in the RPMB.
即可以将所述第一参数及合成密钥所关联的密钥标识关联存储在RPMB中,所述密钥标识可以是参与所述合成密钥加密的安全标识SID,所述密钥标识用于标识所述第一参数,以便于根据密钥标识检索到对应的第一参数。这样,在必要时可以根据密钥标识来擦除指定的第一参数,实现细颗粒度的物理擦除。That is, the first parameter and the key identifier associated with the synthetic key can be stored in the RPMB in association, the key identifier can be a security identifier SID involved in the encryption of the synthetic key, and the key identifier is used to identify the first parameter, so that the corresponding first parameter can be retrieved according to the key identifier. In this way, when necessary, the specified first parameter can be erased according to the key identifier to achieve fine-grained physical erasure.
该实施方式中,由于所述第一参数相比合成密钥密文占用存储空间小,从而利用该方案不会造成对RPMB存储空间的过多占用,且通过擦除该参数,能够有效防止通过推导获得合成密钥的解密密钥,进而不能解密获得CE key,最终访问不了用户数据,极大降低了用户数据泄露的可能性。In this implementation, since the first parameter occupies less storage space than the synthetic key ciphertext, using this solution will not cause excessive occupation of RPMB storage space, and by erasing this parameter, it can effectively prevent the decryption key of the synthetic key from being derived, and then the CE key cannot be decrypted, and ultimately the user data cannot be accessed, which greatly reduces the possibility of user data leakage.
可选地,所述述根据所述第一参数对合成密钥进行加密,包括如下任一项:Optionally, the encrypting the synthetic key according to the first parameter includes any of the following:
根据第一密钥对合成密钥进行加密,得到第二密文;根据第三密钥对所述第二密文进行加密,得到第三密文,其中,所述第三密钥为根据根密钥确定的,所述根密钥为根据所述第一参数确定的;Encrypting the synthetic key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to the third key to obtain a third ciphertext, wherein the third key is determined according to the root key, and the root key is determined according to the first parameter;
根据第一密钥对合成密钥进行加密,得到第二密文;根据第四密钥对所述第二密文进行加密,得到第四密文,其中,所述第四密钥为根据所述第一参数确定的;Encrypting the synthetic key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a fourth key to obtain a fourth ciphertext, wherein the fourth key is determined according to the first parameter;
根据第一密钥对合成密钥进行加密,得到第二密文;根据所述第一参数和第二密钥对所述第二密文进行加密,得到第五密文,其中,所述第一密钥与所述第二密钥是使用不同方式确定的。The synthetic key is encrypted according to the first key to obtain a second ciphertext; the second ciphertext is encrypted according to the first parameter and the second key to obtain a fifth ciphertext, wherein the first key and the second key are determined in different ways.
即可以将该所述第一参数应用三种不同方式来对合成密钥进行加密,以对合成密钥进行保护。分别如下:That is, the first parameter can be applied to three different methods to encrypt the synthetic key to protect the synthetic key. They are as follows:
方式1:将所述第一参数即合成密钥保护因子加入到keymaster根密钥KM的计算中;Method 1: Add the first parameter, i.e., the synthetic key protection factor, to the calculation of the keymaster root key KM;
方式2:将所述第一参数即合成密钥保护因子加入到secretKey即key2的计算中;Method 2: Add the first parameter, i.e. the synthetic key protection factor, to the calculation of secretKey, i.e. key2;
方式3:将所述第一参数即合成密钥保护因子加入到合成密钥的第二次加密计算中。Method 3: Add the first parameter, ie, the synthetic key protection factor, to the second encryption calculation of the synthetic key.
如图4中方式1所示,将所述第一参数即合成密钥保护因子加入到根密钥KM的计算中,即Keymaster TA根据其他参数1、HUK和所述第一参数,通过密钥生成函数KDF推导出根密钥KM;Keymaster TA再根据KM、安全标识SID和其他参数2,通过密钥生成函数KDF推导出secretKey,即key2;TEE中Keymaster TA使用第一密钥即key1对合成密钥进行第一次加密,得到密文EN_key1,即为spblob_key1,再使用key2对所述合成密钥进行第二次加密,即对所述合成密钥的第一次加密密文EN_key1进行加密,得到密文EN_key2,即为spblob。需说明的是,相对应的利用所述第一参数解密合成密钥密文即spblob的步骤则与之对应。 As shown in method 1 in FIG4 , the first parameter, i.e., the synthetic key protection factor, is added to the calculation of the root key KM, i.e., the Keymaster TA derives the root key KM through the key generation function KDF according to other parameters 1, HUK and the first parameter; the Keymaster TA then derives the secretKey, i.e., key2, through the key generation function KDF according to KM, the security identifier SID and other parameters 2; the Keymaster TA in the TEE uses the first key, i.e., key1, to encrypt the synthetic key for the first time, obtaining the ciphertext EN_key1, i.e., spblob_key1, and then uses key2 to encrypt the synthetic key for the second time, i.e., encrypting the first encrypted ciphertext EN_key1 of the synthetic key, obtaining the ciphertext EN_key2, i.e., spblob. It should be noted that the corresponding step of decrypting the synthetic key ciphertext, i.e., spblob, using the first parameter corresponds to it.
如图4中方式2所示,将所述第一参数即合成密钥保护因子加入到secretKey即key2的计算中,即Keymaster TA根据其他参数1和HUK,通过密钥生成函数KDF推导出KM;Keymaster TA再根据KM、安全标识SID、其他参数2和所述第一参数,通过密钥生成函数KDF推导出secretKey,即key2;TEE中Keymaster TA使用第一密钥即key1对合成密钥进行第一次加密,得到密文EN_key1,即为spblob_key1,再使用key2对所述合成密钥进行第二次加密,即对所述合成密钥的第一次加密密文EN_key1进行加密,得到密文EN_key2,即为spblob。需说明的是,相对应的利用所述第一参数解密合成密钥密文即spblob的步骤则与之对应。As shown in method 2 in FIG. 4 , the first parameter, i.e., the synthetic key protection factor, is added to the calculation of secretKey, i.e., key2, i.e., Keymaster TA derives KM through the key generation function KDF according to other parameters 1 and HUK; Keymaster TA then derives secretKey, i.e., key2, through the key generation function KDF according to KM, security identifier SID, other parameters 2 and the first parameter; in TEE, Keymaster TA uses the first key, i.e., key1, to encrypt the synthetic key for the first time, obtaining the ciphertext EN_key1, i.e., spblob_key1, and then uses key2 to encrypt the synthetic key for the second time, i.e., encrypting the first encrypted ciphertext EN_key1 of the synthetic key, obtaining the ciphertext EN_key2, i.e., spblob. It should be noted that the corresponding step of decrypting the synthetic key ciphertext, i.e., spblob, using the first parameter corresponds to it.
如图4中方式3所示,将所述第一参数即合成密钥保护因子加入到合成密钥的第二次加密计算中,即Keymaster TA根据其他参数1和HUK,通过密钥生成函数KDF推导出KM;Keymaster TA再根据KM、安全标识SID和其他参数2,通过密钥生成函数KDF推导出secretKey,即key2;TEE中Keymaster TA使用第一密钥即key1对合成密钥进行第一次加密,得到密文EN_key1,即为spblob_key1,再使用key2和所述第一参数,对所述合成密钥进行第二次加密,即对所述合成密钥的第一次加密密文EN_key1进行加密,得到密文EN_key2,即为spblob。需说明的是,相对应的利用所述第一参数解密合成密钥密文即spblob的步骤则与之对应。As shown in method 3 in FIG. 4 , the first parameter, i.e., the synthetic key protection factor, is added to the second encryption calculation of the synthetic key, i.e., Keymaster TA derives KM through the key generation function KDF according to other parameters 1 and HUK; Keymaster TA then derives secretKey, i.e., key2, through the key generation function KDF according to KM, security identifier SID and other parameters 2; in TEE, Keymaster TA uses the first key, i.e., key1, to encrypt the synthetic key for the first time, and obtains the ciphertext EN_key1, i.e., spblob_key1, and then uses key2 and the first parameter to encrypt the synthetic key for the second time, i.e., encrypt the first encrypted ciphertext EN_key1 of the synthetic key, and obtain the ciphertext EN_key2, i.e., spblob. It should be noted that the corresponding step of decrypting the synthetic key ciphertext, i.e., spblob, using the first parameter corresponds to it.
这样,该实施方式支持三种不同方式来将所述第一参数即合成密钥保护因子应用到合成密钥的加密计算过程中,均可实现对合成密钥的保护。In this way, this implementation supports three different ways to apply the first parameter, namely the synthetic key protection factor, to the encryption calculation process of the synthetic key, all of which can achieve protection of the synthetic key.
可选地,所述密钥相关信息包括第一密文;Optionally, the key-related information includes a first ciphertext;
所述步骤301之前,所述方法还包括:Before step 301, the method further includes:
根据第一密钥对合成密钥进行加密,得到第二密文,以及根据第二密钥对所述第二密文进行加密,得到所述第一密文,所述第一密钥与所述第二密钥是使用不同方式确定的;Encrypting the synthetic key according to the first key to obtain a second ciphertext, and encrypting the second ciphertext according to the second key to obtain the first ciphertext, wherein the first key and the second key are determined in different ways;
所述步骤301包括:The step 301 includes:
将所述第一密文存储至所述RPMB中。The first ciphertext is stored in the RPMB.
另一种实施方式中,所述密钥相关信息包括第一密文即合成密钥密文,即可以采用现有对合成密钥的加密方式,即TEE中Keymaster TA使用第一密钥即key1对合成密钥进行第一次加密,得到密文EN_key1,即为spblob_key1,再使用key2对所述合成密钥进行第二次加密,即对所述合成密钥的第一次加密密文EN_key1进行加密,得到密文EN_key2,即为spblob。但更改合成密钥密文的存储方式,如图4所示,将加密后的合成密钥密文存储在RPMB中。In another implementation, the key-related information includes a first ciphertext, i.e., a synthetic key ciphertext, i.e., an existing encryption method for the synthetic key can be used, i.e., the Keymaster TA in the TEE uses the first key, i.e., key1, to encrypt the synthetic key for the first time, and obtains a ciphertext EN_key1, i.e., spblob_key1, and then uses key2 to encrypt the synthetic key for the second time, i.e., encrypts the first encrypted ciphertext EN_key1 of the synthetic key, and obtains a ciphertext EN_key2, i.e., spblob. However, the storage method of the synthetic key ciphertext is changed, as shown in FIG4 , and the encrypted synthetic key ciphertext is stored in the RPMB.
进一步地,所述将所述第一密文存储至所述RPMB中,包括:Further, storing the first ciphertext in the RPMB includes:
将所述第一密文与所述合成密钥的密钥标识关联存储至所述RPMB中。The first ciphertext is associated with the key identifier of the synthetic key and stored in the RPMB.
即可以将合成密钥密文及所述合成密钥所关联的密钥标识关联存储在RPMB中,所述密钥标识可以是参与所述合成密钥加密的安全标识SID,所述密钥标识用于标识所述合成密 钥密文,以便于根据密钥标识检索到对应的合成密钥密文。这样,在必要时可以根据密钥标识来擦除指定的合成密钥密文,实现细颗粒度的物理擦除。That is, the synthetic key ciphertext and the key identifier associated with the synthetic key can be stored in the RPMB in association, and the key identifier can be a security identifier SID involved in encrypting the synthetic key, and the key identifier is used to identify the synthetic key. The key ciphertext is stored in the memory so that the corresponding synthetic key ciphertext can be retrieved according to the key identifier. In this way, the specified synthetic key ciphertext can be erased according to the key identifier when necessary, realizing fine-grained physical erasure.
这样,无需生成新的参数,也无需更改合成密钥加密方式,只需将合成密钥密文改存储在RPMB中即可,且通过擦除该合成密钥密文,使得他人无法获得合成密钥密文,从而不能通过解密合成密钥密文来获得合成密钥,进而不能解密获得CE key,最终访问不了用户数据,极大降低了用户数据泄露的可能性。In this way, there is no need to generate new parameters or change the synthetic key encryption method. You only need to store the synthetic key ciphertext in RPMB. By erasing the synthetic key ciphertext, others cannot obtain the synthetic key ciphertext, and thus cannot obtain the synthetic key by decrypting the synthetic key ciphertext, and then cannot decrypt to obtain the CE key, and ultimately cannot access user data, greatly reducing the possibility of user data leakage.
可选地,所述步骤301包括:Optionally, step 301 includes:
依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,将所述密钥相关信息发送至UFS驱动;The key-related information is sent to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
通过所述UFS驱动调用UFS控制器提供的RPMB存储功能,将所述密钥相关信息写入所述RPMB中。The UFS driver calls the RPMB storage function provided by the UFS controller to write the key-related information into the RPMB.
一种实施方式中,为支持将所述密钥相关信息存储至RPMB中,需要对相关模块进行改进,包括增加相关模块之间的通信功能和消息处理功能。In one implementation, in order to support the storage of the key-related information in the RPMB, it is necessary to improve the relevant modules, including adding communication functions and message processing functions between relevant modules.
具体地,RPMB可信应用TA中需要增加相应的密钥信息管理模块,用于支持对所述RMPB中所述密钥相关信息的写入等功能;在RPMB内核驱动(RPMB kernel driver)、REE文件操作接口(REE file operation interface)、RPMB监听模块(RPMB listener)等功能模块中增加对所述密钥相关信息的消息处理能力,以支持接收、处理和转发与所述密钥相关信息的写入等相关消息;并且所述密钥管理可信应用(Keymaster TA)、RPMB TA、RPMB kernel driver、REE file operation interface、RPMB listener等各模块之间增加相关消息,以支持所述密钥相关信息的写入等功能。Specifically, a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as writing the key-related information in the RMPB; the message processing capability for the key-related information is added to functional modules such as the RPMB kernel driver (RPMB kernel driver), the REE file operation interface (REE file operation interface), and the RPMB listener module (RPMB listener) to support receiving, processing, and forwarding messages related to the writing of the key-related information; and related messages are added between modules such as the key management trusted application (Keymaster TA), RPMB TA, RPMB kernel driver, REE file operation interface, and RPMB listener to support functions such as writing the key-related information.
此外,还需增加所述Keymaster TA与所述RPMB TA之间的通信功能,以支持所述Keymaster TA向所述RPMB TA发送所述密钥相关信息。In addition, it is necessary to increase the communication function between the Keymaster TA and the RPMB TA to support the Keymaster TA to send the key-related information to the RPMB TA.
这样,在需要将所述密钥相关信息存储至所述RPMB中时,可以通过所述Keymaster TA将所述密钥相关信息发送至所述RPMB TA中的密钥信息管理模块,再由所述RPMB TA中的密钥信息管理模块将所述密钥相关信息发送至RPMB kernel driver,所述RPMB kernel driver再将所述密钥相关信息发送至REE file operation interface,所述REE file operation interface继续将所述密钥相关信息发送至RPMB listener,所述RPMB listener进一步将所述密钥相关信息发送至UFS驱动(UFSDriver),最后通过所述UFSDriver调用UFS控制器(UFS Controller)提供的RPMB存储功能,将所述密钥相关信息写入所述RPMB中。In this way, when the key-related information needs to be stored in the RPMB, the key-related information can be sent to the key information management module in the RPMB TA through the Keymaster TA, and then the key information management module in the RPMB TA sends the key-related information to the RPMB kernel driver, and the RPMB kernel driver sends the key-related information to the REE file operation interface, and the REE file operation interface continues to send the key-related information to the RPMB listener, and the RPMB listener further sends the key-related information to the UFS driver (UFSDriver), and finally the UFSDriver calls the RPMB storage function provided by the UFS controller (UFS Controller) to write the key-related information into the RPMB.
可选地,所述调用重放保护内存块RPMB擦除功能,对RPMB中存储的所述密钥相关信息进行物理擦除,包括:Optionally, calling a replay protection memory block RPMB erasing function to physically erase the key related information stored in the RPMB includes:
依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,向通用闪存存储UFS驱动发送RPMB擦除消息;Sending RPMB erase message to the universal flash storage UFS driver through the key management trusted application, RPMB trusted application, RPMB kernel driver, REE file operation interface and RPMB monitoring module in sequence;
通过所述UFS驱动调用UFS控制器提供的RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除。 The UFS driver calls the RPMB erasing function provided by the UFS controller to physically erase the key-related information stored in the RPMB.
一种实施方式中,为支持调用RPMB擦除功能对所述RPMB中的所述密钥相关信息进行物理擦除,需要对相关模块进行改进,包括增加相关模块之间的通信功能和消息处理功能。In one implementation, in order to support calling the RPMB erase function to physically erase the key-related information in the RPMB, it is necessary to improve the relevant modules, including adding communication functions and message processing functions between relevant modules.
具体地,RPMB可信应用TA中需要增加相应的密钥信息管理模块,用于支持对所述RMPB中所述密钥相关信息的写物理擦除等功能;在RPMB内核驱动(RPMB kernel driver)、REE文件操作接口(REE file operation interface)、RPMB监听模块(RPMB listener)等功能模块中增加对所述密钥相关信息的消息处理能力,以支持接收、处理和转发与所述密钥相关信息的物理擦除等相关消息;并且所述Keymaster TA、RPMB TA、RPMB kernel driver、REE file operation interface、RPMB listener等各模块之间增加相关消息,以支持所述密钥相关信息的物理擦除等功能。Specifically, a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as writing and physically erasing the key-related information in the RMPB; message processing capabilities for the key-related information are added to functional modules such as the RPMB kernel driver, REE file operation interface, and RPMB listener to support receiving, processing, and forwarding messages related to physical erasure of the key-related information; and related messages are added between the Keymaster TA, RPMB TA, RPMB kernel driver, REE file operation interface, RPMB listener, and other modules to support functions such as physical erasure of the key-related information.
此外,还需增加所述Keymaster TA与所述RPMB TA之间的通信功能,以支持所述Keymaster TA向所述RPMB TA发送所述密钥相关信息的擦除消息。In addition, it is necessary to increase the communication function between the Keymaster TA and the RPMB TA to support the Keymaster TA to send an erase message of the key-related information to the RPMB TA.
其中需说明的是,本申请实施例中,在硬件上支持闪存RPMB分区的物理擦除功能,固件上向外提供RPMB Purge API。It should be noted that in the embodiment of the present application, the physical erase function of the flash memory RPMB partition is supported in hardware, and the RPMB Purge API is provided externally in the firmware.
这样,在需要擦除所述RPMB中的所述密钥相关信息时,可以通过所述Keymaster TA向所述RPMB TA中的密钥信息管理模块发送RPMB擦除消息,再由所述RPMB TA中的密钥信息管理模块将所述RPMB擦除消息发送至RPMB kernel driver,所述RPMB kernel driver再将所述RPMB擦除消息发送至REE file operation interface,所述REE file operation interface继续将所述RPMB擦除消息发送至RPMB listener,所述RPMB listener进一步将所述RPMB擦除消息发送至UFS驱动(UFSDriver),最后通过所述UFSDriver调用UFS控制器(UFS Controller)提供的RPMB擦除功能即访问RPMB Purge API,物理擦除所述RPMB中的所述密钥相关信息。In this way, when it is necessary to erase the key-related information in the RPMB, an RPMB erase message can be sent to the key information management module in the RPMB TA through the Keymaster TA, and then the key information management module in the RPMB TA sends the RPMB erase message to the RPMB kernel driver, and the RPMB kernel driver sends the RPMB erase message to the REE file operation interface, and the REE file operation interface continues to send the RPMB erase message to the RPMB listener, and the RPMB listener further sends the RPMB erase message to the UFS driver (UFSDriver), and finally the RPMB erase function provided by the UFS controller (UFSController) is called through the UFSDriver, that is, the RPMB Purge API is accessed to physically erase the key-related information in the RPMB.
可选地,所述步骤301之后,所述接收到用于指示删除用户数据的指令之前,所述方法还包括:Optionally, after step 301 and before receiving an instruction for instructing to delete user data, the method further includes:
依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,向UFS驱动发送密钥读取消息;Send a key read message to the UFS driver through the key management trusted application, RPMB trusted application, RPMB kernel driver, REE file operation interface and RPMB monitoring module in sequence;
通过所述UFS驱动调用UFS控制器提供的RPMB读取功能,从所述RPMB中读取所述密钥相关信息;Calling the RPMB reading function provided by the UFS controller through the UFS driver to read the key related information from the RPMB;
依次通过所述UFS驱动、所述RPMB监听模块、所述REE文件操作接口、所述RPMB内核驱动和所述RPMB可信应用,将所述密钥相关信息发送至所述密钥管理可信应用;The key-related information is sent to the key management trusted application through the UFS driver, the RPMB monitoring module, the REE file operation interface, the RPMB kernel driver and the RPMB trusted application in sequence;
根据所述密钥相关信息确定合成密钥的明文;Determine the plaintext of the synthetic key according to the key-related information;
根据所述合成密钥的明文对用户凭证加密密钥CE key进行解密。The user credential encryption key CE key is decrypted according to the plain text of the synthetic key.
一种实施方式中,为支持读取所述RPMB中的所述密钥相关信息对合成密钥密文进行解密,需要对相关模块进行改进,包括增加相关模块之间的通信功能和消息处理功能。 In one implementation, in order to support reading the key-related information in the RPMB to decrypt the synthetic key ciphertext, it is necessary to improve the relevant modules, including adding communication functions and message processing functions between relevant modules.
具体地,密钥管理可信应用(Keymaster TA)中需增加相应的密钥信息获取模块,用于支持通过RPMB可信应用TA从所述RPMB中获取所述密钥相关信息;RPMB可信应用TA中需要增加相应的密钥信息管理模块,用于支持对所述RMPB中所述密钥相关信息的读取等功能。Specifically, a corresponding key information acquisition module needs to be added to the key management trusted application (Keymaster TA) to support the acquisition of the key-related information from the RPMB through the RPMB trusted application TA; a corresponding key information management module needs to be added to the RPMB trusted application TA to support functions such as reading the key-related information in the RMPB.
在RPMB内核驱动(RPMB kernel driver)、REE文件操作接口(REE file operation interface)、RPMB监听模块(RPMB listener)等功能模块中增加对所述密钥相关信息的消息处理能力,以支持接收、处理和转发与所述密钥相关信息的读取等相关消息;并且所述Keymaster TA、RPMB TA、RPMB kernel driver、REE file operation interface、RPMB listener等各模块之间增加相关消息,以支持所述密钥相关信息的读取等功能。The message processing capability for the key-related information is added to the functional modules such as the RPMB kernel driver, REE file operation interface, and RPMB listener module to support the receiving, processing, and forwarding of messages related to the reading of the key-related information; and related messages are added between the Keymaster TA, RPMB TA, RPMB kernel driver, REE file operation interface, RPMB listener and other modules to support functions such as the reading of the key-related information.
此外,还需增加所述Keymaster TA与所述RPMB TA之间的通信功能,以支持所述Keymaster TA从所述RPMB TA获得所述密钥相关信息。In addition, it is necessary to increase the communication function between the Keymaster TA and the RPMB TA to support the Keymaster TA in obtaining the key-related information from the RPMB TA.
其中需说明的是,本申请实施例中,在硬件上支持闪存RPMB分区的物理擦除功能,固件上向外提供RPMB Purge API。It should be noted that in the embodiment of the present application, the physical erase function of the flash memory RPMB partition is supported in hardware, and the RPMB Purge API is provided externally in the firmware.
这样,在需要对电子设备中的相关加密文件进行解密时,可以读取所述RPMB中的所述密钥相关信息,具体可以通过所述Keymaster TA中的密钥信息获取模块向所述RPMB TA中的密钥信息管理模块发送密钥读取消息,再由所述RPMB TA中的密钥信息管理模块向RPMB kernel driver发送所述密钥读取消息,所述RPMB kernel driver再向REE file operation interface发送所述密钥读取消息,所述REE file operation interface继续向RPMB listener发送所述密钥读取消息,所述RPMB listener进一步向UFS驱动(UFSDriver)发送所述密钥读取消息,最后通过所述UFSDriver调用UFS控制器(UFS Controller)提供的RPMB读取功能,从所述RPMB中读取所述密钥相关信息。In this way, when it is necessary to decrypt the relevant encrypted files in the electronic device, the key-related information in the RPMB can be read. Specifically, the key information acquisition module in the Keymaster TA can send a key reading message to the key information management module in the RPMB TA, and then the key information management module in the RPMB TA sends the key reading message to the RPMB kernel driver, and the RPMB kernel driver sends the key reading message to the REE file operation interface, and the REE file operation interface continues to send the key reading message to the RPMB listener, and the RPMB listener further sends the key reading message to the UFS driver (UFSDriver), and finally the RPMB reading function provided by the UFS controller (UFS Controller) is called by the UFSDriver to read the key-related information from the RPMB.
读取的所述密钥相关信息再由所述UFS驱动依次传递至所述RPMB listener、所述REE file operation interface、所述RPMB kernel driver和所述RPMB TA中的密钥信息管理模块,最后再由所述RPMB TA中的密钥信息管理模块将所述密钥相关信息发送至所述Keymaster TA中的密钥信息获取模块。The read key-related information is then passed by the UFS driver in sequence to the RPMB listener, the REE file operation interface, the RPMB kernel driver and the key information management module in the RPMB TA, and finally the key information management module in the RPMB TA sends the key-related information to the key information acquisition module in the Keymaster TA.
在所述密钥相关信息为所述第一参数即合成密钥保护因子时,REE中的keystore从UDA中获取合成密钥密文,也即合成密钥的第二次加密密文,所述Keymaster TA则利用所述第一参数即合成密钥保护因子对所述合成密钥的第二次加密密文进行解密,获得所述合成密钥的第一次加密密文,然后利用第一密钥即key1对所述合成密钥的第一次加密密文进行解密,获得所述合成密钥的明文,最后利用所述合成密钥的明文对用户凭证加密密钥CE key进行解密,后续则可以利用CE key明文对加密文件进行解密。When the key-related information is the first parameter, i.e., the synthetic key protection factor, the keystore in the REE obtains the synthetic key ciphertext from the UDA, i.e., the second encrypted ciphertext of the synthetic key, and the Keymaster TA uses the first parameter, i.e., the synthetic key protection factor, to decrypt the second encrypted ciphertext of the synthetic key to obtain the first encrypted ciphertext of the synthetic key, and then uses the first key, i.e., key1, to decrypt the first encrypted ciphertext of the synthetic key to obtain the plaintext of the synthetic key, and finally uses the plaintext of the synthetic key to decrypt the user credential encryption key CE key, and subsequently the encrypted file can be decrypted using the CE key plaintext.
在所述密钥相关信息为所述第一密文即合成密钥密文时,该合成密钥密文也是合成密钥的第二次加密密文,所述Keymaster TA根据HUK和其他参数1推导出根密钥KM,再根据KM、SID和其他参数2推导出第二密钥即key2,然后使用所述第二密钥即key2对所述第一密文即所述合成密钥的第二次加密密文进行解密,获得所述合成密钥的第一次加密密 文,然后利用第一密钥即key1对所述合成密钥的第一次加密密文进行解密,获得所述合成密钥的明文,最后利用所述合成密钥的明文对用户凭证加密密钥CE key进行解密,后续则可以利用CE key明文对加密文件进行解密。When the key-related information is the first ciphertext, i.e., the synthetic key ciphertext, which is also the second encrypted ciphertext of the synthetic key, the Keymaster TA derives the root key KM according to the HUK and other parameters 1, and then derives the second key, i.e., key2, according to KM, SID and other parameters 2, and then uses the second key, i.e., key2, to decrypt the first ciphertext, i.e., the second encrypted ciphertext of the synthetic key, to obtain the first encrypted ciphertext of the synthetic key. The first encrypted ciphertext of the synthetic key is then decrypted using the first key, i.e. key1, to obtain the plaintext of the synthetic key. Finally, the plaintext of the synthetic key is used to decrypt the user credential encryption key CE key, and subsequently the encrypted file can be decrypted using the CE key plaintext.
下面分别针对两种不同的解决方案中需要改进的功能框架进行说明:The following describes the functional frameworks that need to be improved in two different solutions:
在所述密钥相关信息包括第一参数即合成密钥保护因子时,需要对图2中获取CE key的功能框架进行改进,改进后的功能框架如图5所示。When the key-related information includes the first parameter, i.e., the synthetic key protection factor, it is necessary to improve the functional framework for obtaining the CE key in FIG2 . The improved functional framework is shown in FIG5 .
具体地,Keymaster TA中增加合成密钥保护因子获取模块,支持在必要时通过RPMB TA从RPMB中获取所述合成密钥保护因子,以及对密钥生成模块进行改进,以支持让合成密钥保护因子参与对合成密钥的加密计算。Specifically, a synthetic key protection factor acquisition module is added to the Keymaster TA to support obtaining the synthetic key protection factor from the RPMB through the RPMB TA when necessary, and the key generation module is improved to support the participation of the synthetic key protection factor in the encryption calculation of the synthetic key.
RPMB TA中增加合成密钥保护因子管理模块,以支持对RMPB中的合成密钥保护因子的写入、读取、物理擦除等;Add a synthetic key protection factor management module in RPMB TA to support writing, reading, and physical erasing of synthetic key protection factors in RMPB;
在RPMB kernel driver、REE file operation interface、RPMB listener等功能模块中增加合成密钥保护因子的消息处理能力,以支持接收、处理和转发与合成密钥保护因子的写入、读取、物理擦除等相关的消息;各功能模块之间增加相关消息,以支持合成密钥保护因子的写入、读取、物理擦除等功能;Add the message processing capability of synthetic key protection factor in the RPMB kernel driver, REE file operation interface, RPMB listener and other functional modules to support the reception, processing and forwarding of messages related to the writing, reading and physical erasure of synthetic key protection factor; add relevant messages between functional modules to support the writing, reading and physical erasure of synthetic key protection factor;
Keymaster TA与RPMB TA之间通信的改进,增加消息以支持Keymaster TA从RPMB TA获得合成密钥保护因子。Improvements to the communication between Keymaster TA and RPMB TA, adding messages to support Keymaster TA to obtain synthetic key protection factors from RPMB TA.
在所述密钥相关信息包括合成密钥密文时,需要对图2中获取CE key的功能框架进行改进,改进后的功能框架如图6所示。When the key-related information includes synthetic key ciphertext, it is necessary to improve the functional framework for obtaining the CE key in Figure 2. The improved functional framework is shown in Figure 6.
具体地,Keymaster TA中增加合成密钥密文获取模块,支持在必要时通过RPMB TA从RPMB中获取所述合成密钥密文。Specifically, a synthetic key ciphertext acquisition module is added to the Keymaster TA to support obtaining the synthetic key ciphertext from the RPMB through the RPMB TA when necessary.
RPMB TA中增加合成密钥密文管理模块,以支持对RMPB中的合成密钥密文的写入、读取、物理擦除等;Add a synthetic key ciphertext management module in RPMB TA to support writing, reading, and physical erasing of synthetic key ciphertext in RMPB;
在RPMB kernel driver、REE file operation interface、RPMB listener等功能模块中增加合成密钥密文的消息处理能力,以支持接收、处理和转发与合成密钥密文的写入、读取、物理擦除等相关的消息;各功能模块之间增加相关消息,以支持合成密钥密文的写入、读取、物理擦除等功能;Add the message processing capability of synthetic key ciphertext in the RPMB kernel driver, REE file operation interface, RPMB listener and other functional modules to support the reception, processing and forwarding of messages related to the writing, reading and physical erasure of synthetic key ciphertext; add related messages between functional modules to support the writing, reading and physical erasure of synthetic key ciphertext;
Keymaster TA与RPMB TA之间通信的改进,增加消息以支持Keymaster TA从RPMB TA获得合成密钥密文。Improvements to the communication between Keymaster TA and RPMB TA, adding messages to support Keymaster TA to obtain synthetic key ciphertext from RPMB TA.
通过本申请实施例,在电子设备丢失、被盗、弃用或转让等场景下,用户能主动对电子设备上的敏感数据进行快速、高效地安全删除,从而使得攻击者即使获得用户的电子设备,也不能恢复出已被删除的数据,从而防止用户敏感信息泄露。Through the embodiments of the present application, in scenarios where an electronic device is lost, stolen, abandoned or transferred, the user can proactively delete sensitive data on the electronic device quickly, efficiently and securely, so that even if an attacker obtains the user's electronic device, the deleted data cannot be recovered, thereby preventing the leakage of user sensitive information.
本申请实施例中的信息管理方法,将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文;在接收到用于指示删除用户数据的指令的情 况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。这样,通过将用户数据相关的密钥相关信息改存在RPMB中,使得在需要删除电子设备上的用户数据时,能够控制调用RPMB擦除接口对RPMB中存储的密钥相关信息进行快速物理擦除,实现快速安全删除用户数据的目的。The information management method in the embodiment of the present application stores key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext obtained by encrypting the synthetic key; when an instruction for instructing to delete user data is received, In this case, the RPMB erasure function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data. In this way, by changing the key-related information related to the user data to be stored in the RPMB, when the user data on the electronic device needs to be deleted, the RPMB erasure interface can be controlled to be called to quickly physically erase the key-related information stored in the RPMB, thereby achieving the purpose of quickly and safely deleting the user data.
本申请实施例提供的信息管理方法,执行主体可以为信息管理装置。本申请实施例中以信息管理装置执行信息管理方法为例,说明本申请实施例提供的信息管理装置。The information management method provided in the embodiment of the present application can be executed by an information management device. In the embodiment of the present application, the information management device provided in the embodiment of the present application is described by taking the information management device executing the information management method as an example.
请参见图7,图7为本申请实施例提供的信息管理装置的结构示意图,如图7所示,信息管理装置700包括:Please refer to FIG. 7 , which is a schematic diagram of the structure of an information management device provided in an embodiment of the present application. As shown in FIG. 7 , the information management device 700 includes:
存储模块701,用于将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文;A storage module 701 is used to store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext obtained by encrypting the synthetic key;
擦除模块702,用于在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。The erasure module 702 is used to call the RPMB erasure function upon receiving an instruction to delete user data, and physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
可选地,所述密钥相关信息包括所述第一参数;Optionally, the key-related information includes the first parameter;
信息管理装置700还包括:The information management device 700 further includes:
第一加密模块,根据所述第一参数对合成密钥进行加密;A first encryption module, encrypting the synthetic key according to the first parameter;
存储模块701用于将所述第一参数存储至所述RPMB中。The storage module 701 is used to store the first parameter in the RPMB.
可选地,第一加密模块用于如下任一项:Optionally, the first encryption module is used for any of the following:
根据第一密钥对合成密钥进行加密,得到第二密文;根据第三密钥对所述第二密文进行加密,得到第三密文,其中,所述第三密钥为根据根密钥确定的,所述根密钥为根据所述第一参数确定的;Encrypting the synthetic key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to the third key to obtain a third ciphertext, wherein the third key is determined according to the root key, and the root key is determined according to the first parameter;
根据第一密钥对合成密钥进行加密,得到第二密文;根据第四密钥对所述第二密文进行加密,得到第四密文,其中,所述第四密钥为根据所述第一参数确定的;Encrypting the synthetic key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a fourth key to obtain a fourth ciphertext, wherein the fourth key is determined according to the first parameter;
根据第一密钥对合成密钥进行加密,得到第二密文;根据所述第一参数和第二密钥对所述第二密文进行加密,得到第五密文,其中,所述第一密钥与所述第二密钥是使用不同方式确定的。The synthetic key is encrypted according to the first key to obtain a second ciphertext; the second ciphertext is encrypted according to the first parameter and the second key to obtain a fifth ciphertext, wherein the first key and the second key are determined in different ways.
可选地,所述密钥相关信息包括所述第一密文;Optionally, the key-related information includes the first ciphertext;
信息管理装置700包括:The information management device 700 includes:
第二加密模块,用于根据第一密钥对合成密钥进行加密,得到第二密文,以及根据第二密钥对所述第二密文进行加密,得到所述第一密文,所述第一密钥与所述第二密钥是使用不同方式确定的;a second encryption module, configured to encrypt the synthetic key according to the first key to obtain a second ciphertext, and to encrypt the second ciphertext according to the second key to obtain the first ciphertext, wherein the first key and the second key are determined in different ways;
存储模块701用于将所述第一密文存储至所述RPMB中。The storage module 701 is used to store the first ciphertext in the RPMB.
可选地,擦除模块702包括: Optionally, the erasing module 702 includes:
第一发送单元,用于依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,向通用闪存存储UFS驱动发送RPMB擦除消息;A first sending unit is used to send an RPMB erase message to a universal flash storage UFS driver through a key management trusted application, an RPMB trusted application, an RPMB kernel driver, a REE file operation interface, and an RPMB monitoring module in sequence;
擦除单元,用于通过所述UFS驱动调用UFS控制器提供的RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除。An erasing unit is used to call the RPMB erasing function provided by the UFS controller through the UFS driver to physically erase the key-related information stored in the RPMB.
可选地,存储模块701包括:Optionally, the storage module 701 includes:
第二发送单元,用于依次通过密钥管理可信应用、依次经RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,将所述密钥相关信息发送至UFS驱动;A second sending unit is used to send the key-related information to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
写入单元,用于通过所述UFS驱动调用UFS控制器提供的RPMB存储功能,将所述密钥相关信息写入所述RPMB中。The writing unit is used to call the RPMB storage function provided by the UFS controller through the UFS driver to write the key related information into the RPMB.
可选地,信息管理装置700还包括:Optionally, the information management device 700 further includes:
发送模块,用于依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,向UFS驱动发送密钥读取消息;A sending module, used to send a key reading message to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
读取模块,用于通过所述UFS驱动调用UFS控制器提供的RPMB读取功能,从所述RPMB中读取所述密钥相关信息;A reading module, configured to call an RPMB reading function provided by a UFS controller through the UFS driver to read the key-related information from the RPMB;
传输模块,用于依次通过所述UFS驱动、所述RPMB监听模块、所述REE文件操作接口、所述RPMB内核驱动和所述RPMB可信应用,将读取的所述密钥相关信息发送至所述密钥管理可信应用;A transmission module, configured to send the read key-related information to the key management trusted application through the UFS driver, the RPMB listening module, the REE file operation interface, the RPMB kernel driver and the RPMB trusted application in sequence;
确定模块,用于根据所述密钥相关信息确定合成密钥的明文;A determination module, used to determine the plaintext of the synthetic key according to the key-related information;
解密模块,用于根据所述合成密钥的明文对用户凭证加密密钥CE key进行解密。A decryption module is used to decrypt the user credential encryption key CE key according to the plain text of the synthetic key.
本申请实施例中的信息管理装置,将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文;在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。这样,通过将用户数据相关的密钥相关信息改存在RPMB中,使得在需要删除电子设备上的用户数据时,能够控制调用RPMB擦除接口对RPMB中存储的密钥相关信息进行快速物理擦除,实现快速安全删除用户数据的目的。The information management device in the embodiment of the present application stores key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, wherein the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted with the synthetic key; upon receiving an instruction for instructing to delete user data, the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data. In this way, by changing the key-related information related to user data to be stored in the RPMB, when it is necessary to delete user data on an electronic device, it is possible to control the call of the RPMB erase interface to quickly physically erase the key-related information stored in the RPMB, thereby achieving the purpose of quickly and securely deleting user data.
本申请实施例中的信息管理装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(Augmented Reality,AR)/虚拟现实(Virtual Reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(Ultra-Mobile Personal Computer,UMPC)、上网本或者个人数字助理(Personal Digital Assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(Personal Computer,PC)、电视机(Television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The information management device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR)/virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), television (Television, TV), ATM or self-service machine, etc., the embodiments of the present application are not specifically limited.
本申请实施例中的信息管理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The information management device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
本申请实施例提供的信息管理装置能够实现图3的方法实施例实现的各个过程,为避免重复,这里不再赘述。The information management device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 3. To avoid repetition, it will not be repeated here.
可选地,如图8所示,本申请实施例还提供一种电子设备800,包括处理器801和存储器802,存储器802上存储有可在所述处理器801上运行的程序或指令,该程序或指令被处理器801执行时实现上述信息管理方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 8, an embodiment of the present application also provides an electronic device 800, including a processor 801 and a memory 802, and the memory 802 stores a program or instruction that can be executed on the processor 801. When the program or instruction is executed by the processor 801, the various steps of the above-mentioned information management method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
图9为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备900包括但不限于:射频单元901、网络模块902、音频输出单元903、输入单元904、传感器905、显示单元906、用户输入单元907、接口单元908、存储器909、以及处理器910等部件。The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
本领域技术人员可以理解,电子设备900还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器910逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图9中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The electronic device structure shown in FIG9 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
其中,处理器910,用于将密钥相关信息存储至重放保护内存块RPMB中,其中,所述密钥相关信息包括第一参数或第一密文,所述第一参数用于对合成密钥加密,所述第一密文是对合成密钥加密得到的密文;The processor 910 is configured to store key-related information in a replay protection memory block RPMB, wherein the key-related information includes a first parameter or a first ciphertext, the first parameter is used to encrypt a synthetic key, and the first ciphertext is a ciphertext encrypted from the synthetic key;
在接收到用于指示删除用户数据的指令的情况下,调用RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除,其中,所述密钥相关信息用于确定对所述用户数据加密的密钥。In case of receiving an instruction for deleting user data, the RPMB erase function is called to physically erase the key-related information stored in the RPMB, wherein the key-related information is used to determine the key for encrypting the user data.
可选地,所述密钥相关信息包括所述第一参数;Optionally, the key-related information includes the first parameter;
处理器910,还用于根据所述第一参数对合成密钥进行加密;将所述第一参数存储至所述RPMB中。Processor 910 is also used to encrypt the synthetic key according to the first parameter; and store the first parameter in the RPMB.
可选地,处理器910,还用于如下任一项:Optionally, the processor 910 is further configured to:
根据第一密钥对合成密钥进行加密,得到第二密文;根据第三密钥对所述第二密文进行加密,得到第三密文,其中,所述第三密钥为根据根密钥确定的,所述根密钥为根据所述第一参数确定的; Encrypting the synthetic key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to the third key to obtain a third ciphertext, wherein the third key is determined according to the root key, and the root key is determined according to the first parameter;
根据第一密钥对合成密钥进行加密,得到第二密文;根据第四密钥对所述第二密文进行加密,得到第四密文,其中,所述第四密钥为根据所述第一参数确定的;Encrypting the synthetic key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a fourth key to obtain a fourth ciphertext, wherein the fourth key is determined according to the first parameter;
根据第一密钥对合成密钥进行加密,得到第二密文;根据所述第一参数和第二密钥对所述第二密文进行加密,得到第五密文,其中,所述第一密钥与所述第二密钥是使用不同方式确定的。The synthetic key is encrypted according to the first key to obtain a second ciphertext; the second ciphertext is encrypted according to the first parameter and the second key to obtain a fifth ciphertext, wherein the first key and the second key are determined in different ways.
可选地,所述密钥相关信息包括所述第一密文;Optionally, the key-related information includes the first ciphertext;
处理器910,还用于根据第一密钥对合成密钥进行加密,得到第二密文,以及根据第二密钥对所述第二密文进行加密,得到所述第一密文,所述第一密钥与所述第二密钥是使用不同方式确定的;将所述第一密文存储至所述RPMB中。Processor 910 is also used to encrypt the synthetic key according to the first key to obtain a second ciphertext, and to encrypt the second ciphertext according to the second key to obtain the first ciphertext, wherein the first key and the second key are determined using different methods; and the first ciphertext is stored in the RPMB.
可选地,处理器910,还用于依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听,向通用闪存存储UFS驱动发送RPMB擦除消息;Optionally, the processor 910 is further configured to send an RPMB erase message to a universal flash storage UFS driver through a key management trusted application, an RPMB trusted application, an RPMB kernel driver, a REE file operation interface, and RPMB monitoring in sequence;
通过所述UFS驱动调用UFS控制器提供的RPMB擦除功能,对所述RPMB中存储的所述密钥相关信息进行物理擦除。The UFS driver calls the RPMB erasing function provided by the UFS controller to physically erase the key-related information stored in the RPMB.
可选地,处理器910,还用于依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,将所述密钥相关信息发送至UFS驱动;Optionally, the processor 910 is further configured to send the key-related information to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
通过所述UFS驱动调用UFS控制器提供的RPMB存储功能,将所述密钥相关信息写入所述RPMB中。The UFS driver calls the RPMB storage function provided by the UFS controller to write the key-related information into the RPMB.
可选地,处理器910,还用于依次通过密钥管理可信应用、RPMB可信应用、RPMB内核驱动、REE文件操作接口和RPMB监听模块,向UFS驱动发送密钥读取消息;Optionally, the processor 910 is further configured to send a key read message to the UFS driver through the key management trusted application, the RPMB trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
通过所述UFS驱动调用UFS控制器提供的RPMB读取功能,从所述RPMB中读取所述密钥相关信息;Calling the RPMB reading function provided by the UFS controller through the UFS driver to read the key related information from the RPMB;
依次通过所述UFS驱动、所述RPMB监听模块、所述REE文件操作接口、所述RPMB内核驱动和所述RPMB可信应用,将所述密钥相关信息发送至所述密钥管理可信应用;The key-related information is sent to the key management trusted application through the UFS driver, the RPMB monitoring module, the REE file operation interface, the RPMB kernel driver and the RPMB trusted application in sequence;
根据所述密钥相关信息确定合成密钥的明文;Determine the plaintext of the synthetic key according to the key-related information;
根据所述合成密钥的明文对用户凭证加密密钥CE key进行解密。The user credential encryption key CE key is decrypted according to the plain text of the synthetic key.
应理解的是,本申请实施例中,输入单元904可以包括图形处理器(Graphics Processing Unit,GPU)9041和麦克风9042,图形处理器9041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元906可包括显示面板9061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板9061。用户输入单元907包括触控面板9071以及其他输入设备9072中的至少一种。触控面板9071,也称为触摸屏。触控面板9071可包括触摸检测装置和触摸控制器两个部分。其他输入设备9072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。 It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
存储器909可用于存储软件程序以及各种数据。存储器909可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器909可以包括易失性存储器或非易失性存储器,或者,存储器909可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器909包括但不限于这些和任意其它适合类型的存储器。The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
处理器910可包括一个或多个处理单元;可选地,处理器910集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器910中。The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述信息管理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned information management method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述信息管理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned information management method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述信息管理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned information management method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所 固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes the elements required for such process, method, article or device. Inherent elements. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims (17)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310619851.3A CN116594567A (en) | 2023-05-30 | 2023-05-30 | Information management method, device and electronic device |
CN202310619851.3 | 2023-05-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024245301A1 true WO2024245301A1 (en) | 2024-12-05 |
Family
ID=87593539
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2024/096147 WO2024245301A1 (en) | 2023-05-30 | 2024-05-29 | Information management method and apparatus, and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116594567A (en) |
WO (1) | WO2024245301A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116594567A (en) * | 2023-05-30 | 2023-08-15 | 维沃移动通信有限公司 | Information management method, device and electronic device |
CN117221012B (en) * | 2023-11-07 | 2024-01-26 | 新华三技术有限公司 | Decryption and encryption method and device |
CN118473651B (en) * | 2023-12-11 | 2025-02-11 | 荣耀终端有限公司 | Data processing method, electronic device and related device applied to multiple TEEs |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220164487A1 (en) * | 2020-11-25 | 2022-05-26 | Micron Technology, Inc. | Purging data at a memory device |
CN115357930A (en) * | 2022-08-12 | 2022-11-18 | 维沃移动通信有限公司 | Data deletion method and electronic device |
CN116594567A (en) * | 2023-05-30 | 2023-08-15 | 维沃移动通信有限公司 | Information management method, device and electronic device |
-
2023
- 2023-05-30 CN CN202310619851.3A patent/CN116594567A/en active Pending
-
2024
- 2024-05-29 WO PCT/CN2024/096147 patent/WO2024245301A1/en unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220164487A1 (en) * | 2020-11-25 | 2022-05-26 | Micron Technology, Inc. | Purging data at a memory device |
CN115357930A (en) * | 2022-08-12 | 2022-11-18 | 维沃移动通信有限公司 | Data deletion method and electronic device |
CN116594567A (en) * | 2023-05-30 | 2023-08-15 | 维沃移动通信有限公司 | Information management method, device and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN116594567A (en) | 2023-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11263020B2 (en) | System and method for wiping encrypted data on a device having file-level content protection | |
JP6055989B1 (en) | Computer program, secret management method and system | |
US7912223B2 (en) | Method and apparatus for data protection | |
US8571221B2 (en) | On-chip storage, creation, and manipulation of an encryption key | |
US8589680B2 (en) | System and method for synchronizing encrypted data on a device having file-level content protection | |
WO2024245301A1 (en) | Information management method and apparatus, and electronic device | |
WO2021164166A1 (en) | Service data protection method, apparatus and device, and readable storage medium | |
US20120260099A1 (en) | Incremental secure backup and restore of user settings and data | |
JP6231504B2 (en) | Method, apparatus and mobile terminal for information security management of mobile terminal | |
WO2023207975A1 (en) | Data transmission method and apparatus, and electronic device | |
US20090150680A1 (en) | Data Security in Mobile Devices | |
US9147087B2 (en) | Method of accessing a data storage device | |
CN114020705A (en) | File processing method and device and storage medium | |
JP6343869B2 (en) | Portable terminal device and decryption processing program | |
CN118821104A (en) | Data authorization management method and related equipment applied to trusted data space | |
CN103532712B (en) | digital media file protection method, system and client | |
CN101604296A (en) | Disk-data sector-level encryption method | |
KR20040048161A (en) | DRM Method for PDA Terminal in Wireless Telephony Network | |
CN114490552A (en) | Data transmission method, device and electronic device | |
KR100952300B1 (en) | Terminal device, memory, and method thereof for secure data management of storage media | |
CN111597575B (en) | Data storage method, device, equipment and storage medium | |
CN103260001A (en) | Self-authentication protective method used for multi-media | |
CN101763319A (en) | Disk FDE (Full Disk Encryption) system and method | |
CN116933284A (en) | File processing method and device and electronic equipment | |
JP2006139475A (en) | Secret information protection system for existing application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24814498 Country of ref document: EP Kind code of ref document: A1 |