CN116594567A - Information management method and device and electronic equipment - Google Patents

Information management method and device and electronic equipment Download PDF

Info

Publication number
CN116594567A
CN116594567A CN202310619851.3A CN202310619851A CN116594567A CN 116594567 A CN116594567 A CN 116594567A CN 202310619851 A CN202310619851 A CN 202310619851A CN 116594567 A CN116594567 A CN 116594567A
Authority
CN
China
Prior art keywords
key
rpmb
ciphertext
related information
encrypting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310619851.3A
Other languages
Chinese (zh)
Inventor
胡志远
吴华琛
何文登
丁杭超
洪文博
郑寅锋
张栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202310619851.3A priority Critical patent/CN116594567A/en
Publication of CN116594567A publication Critical patent/CN116594567A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting 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/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The application discloses an information management method, an information management device and electronic equipment, and belongs to the technical field of communication. Storing key related information into a Replay Protection Memory Block (RPMB), wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting a synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key; and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data.

Description

Information management method and device and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to an information management method, an information management device and electronic equipment.
Background
At present, people often use mobile electronic devices such as mobile phones to process daily transactions, so that a large amount of user related information and data are usually stored in the electronic devices, and when the electronic devices are lost or stolen, the user information and data on the electronic devices also have a great leakage risk. In the prior art, a full-disk overwriting method is often adopted, so that an internal controller of the flash memory is forced to immediately call a physical erasing mechanism to thoroughly delete user data, so as to prevent user privacy disclosure, for example, 128G flash memory can be overwritten by writing a random number of about 128G, and the purpose of physical erasing is achieved. However, the physical erasing method has strict requirements on time, electric quantity, whether interruption is allowed during operation, and the like, for example, at least 10 minutes is required for all the flash memory of 128G, the equipment is required to be connected with a power supply, and interruption is not allowed during all the flash memory. Therefore, when user data on electronic equipment such as a mobile phone needs to be deleted, the user data is easily limited by factors such as time, electric quantity, uncontrolled equipment and the like, so that the success rate of realizing physical erasure by performing all overwrite on the flash memory through remote control is low.
Disclosure of Invention
The embodiment of the application aims to provide an information management method, an information management device and electronic equipment, which can solve the problem that the success rate of physical erasure is low through all overwrite when user data on the electronic equipment is required to be deleted in the prior art.
In a first aspect, an embodiment of the present application provides an information management method, including:
storing key related information into a Replay Protection Memory Block (RPMB), wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting a synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key;
and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data.
In a second aspect, an embodiment of the present application provides an information management apparatus, including:
the storage module is used for storing key related information into the playback protection memory block RPMB, wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting the synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key;
And the erasing module is used for calling an RPMB erasing function under the condition of receiving an instruction for indicating to delete the user data and physically erasing the key related information stored in the RPMB, wherein the key related information is used for determining a key for encrypting the user data.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing a program or instructions executable on the processor, the program or instructions implementing the steps of the information management method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the information management method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement an information management method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the information management method according to the first aspect.
In the embodiment of the application, key related information is stored in a replay protection memory block RPMB, wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting a synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key; and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data. Therefore, by changing the key related information related to the user data into the RPMB, when the user data on the electronic equipment needs to be deleted, the RPMB erasure function can be controlled to be invoked to carry out quick physical erasure on the key related information stored in the RPMB, and the purpose of quick and safe deletion of the user data is realized.
Drawings
FIG. 1 is a schematic diagram of a prior art CE key protection scheme;
FIG. 2 is a schematic diagram of a functional framework for acquiring CE keys in the prior art;
FIG. 3 is a flowchart of an information management method provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an improved CE key protection scheme provided by an embodiment of the present application;
FIG. 5 is one of the improved functional framework diagrams for obtaining CE keys provided by an embodiment of the present application;
FIG. 6 is a second schematic diagram of an improved CE key acquisition functional framework provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of an information management apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In order to make the embodiments of the present application more clear, the following description will be given to the related background knowledge related to the embodiments of the present application:
android (Android) 7.0 and higher supports File-Based Encryption (FBE), a key can be generated for each File, i.e., a per-File key is generated for each File, and then the designated File is encrypted and decrypted by using the key, so as to achieve the purpose of protecting the File.
The unique key of each file, i.e., the per-file key, is finally derived by multi-layer transformation of the user credential encryption (Credential Encrypted, CE) key. Therefore, in order to secure data on the terminal, security of the CE key needs to be secured first. In the prior art, the protection manner for the CE key is shown in fig. 1, and specifically is as follows:
1. when the terminal is started for the first time, the following operations are executed:
1) A key management (Keymaster) trusted application (Trusted Application, TA) of a terminal trusted execution environment (Trusted Execution Environment, TEE) automatically generates Disk Encrypted (DE) keys and CE keys;
2) When the screen locking password is not set, the Keymaster TA generates keymaster_key_blob, encrypts the CE key to obtain a CE key ciphertext, namely EN_blob, and stores the ciphertext in a User Data Area (UDA) of the flash memory.
2. When the screen locking password is set for the first time, the following operations are executed:
1) Acquiring user credentials input by a user, namely personal identification number (Personal Identification Number, PIN)/Password (Password)/Pattern (Pattern);
2) The CE key is encrypted and protected as follows:
an application framework in the mobile device generic environment (Rich Execution Environment, REE) invokes the main central processing unit (Central Processing Unit, CPU) to generate 2 random numbers, P0 and P1, and derives a composite key (Synthetic Password) by a Hash function (Hash);
the REE sends the synthesized key, the CE key ciphertext EN_ blob, keymaster _key_blob and the like to the TEE;
the key master TA in the TEE decrypts the CE key ciphertext EN_blob by using the key master_key_blob to obtain a plaintext CE key; re-encrypting the CE key by using the synthesized key to obtain a CE key ciphertext, namely EN_sp, and deleting the key_key_blob;
the CE key ciphertext EN_sp is stored in a user data area UDA of the flash memory;
3) The synthesized key is encrypted and protected as follows:
first, the synthesized key is encrypted for the first time, including the following operations:
the application framework in REE calls the main CPU to generate 1 random number, namely secsis; a gate-looking module (gatekeep) in the REE generates a password token (PasswordToken) through a key generation function (Key Derivation Function, KDF) according to user credentials input by a user; the gatekeeper in REE sends a message to a gatekeeper TA in TEE, wherein the message comprises PasswordToken, secdis, user Identifier (UID) and the like;
After receiving the message, gatekeeper TA in TEE generates security identifier (Secure Identifier, SID), which is a 64-bit random number for identifying user credential type; deriving a key1 (key 1) by a hash function according to the PasswordToken and the secsis; and (3) carrying out primary encryption on the synthetic key by using key1 by using a KeyMaster TA in the TEE to obtain a synthetic key ciphertext EN_Key1, namely, the blob_Key1.
And then carrying out secondary encryption on the synthesized key, which comprises the following operations:
the TEE obtains a hardware unique key (Hardware Unique Key, HUK); generating other parameters 1 and other parameters 2, wherein the parameters comprise random numbers, equipment information and the like; the Keymaster TA derives a root key KM of the Keymaster through a key generation function KDF according to the HUK and other parameters 1; the key master TA derives a secure key (secret key) through a key generation function KDF according to the KM, the secure identification SID and other parameters 2, namely a key2 (key 2), wherein the secure identification SID and other parameters 2 can exist in a user data area UDA of the flash memory through a key library (key); the key master uses key2 to encrypt the synthesized key for the second time to obtain a ciphertext EN_key2 of EN_key 1/blob_key 1, namely the blob; the security identification SID and the blob are stored in the user data area UDA of the flash memory.
3. Upon verification of the lock screen password, the CE key is installed into a Kernel (Kernel) key ring (key ring), as shown in fig. 2, performing the following operations:
1) Acquiring an input user credential (namely PIN/Password/Pattern);
2) The gatekeeper in REE generates a PasswordToken according to the user credentials input by the user;
3) The gatekeeper in the REE sends the passage token to the gatekeeper TA in the TEE, the gatekeeper TA verifies the passage token, the gatekeeper TA generates an authentication token (AuthToken) after the verification is successful, and the AuthToken is returned to the gatekeeper in the REE;
4) The gatekeeper in REE sends the token AuthToken and security ID SID to the keystore;
5) The key obtains a synthesized key ciphertext blob and a CE key ciphertext EN_sp from a flash memory user data area UDA according to the SID;
6) The keystore sends an AuthToken, a security identification SID, a synthetic key ciphertext blob and a CE key ciphertext EN_sp to a Keymaster TA in the TEE;
7) The Keymaster TA verifies the AuthToken, and after verification is successful, the following operation is performed:
acquiring a hardware unique key HUK, other parameters 1, other parameters 2 and a security identification SID; the Keymaster TA derives a root key KM of the Keymaster through a key generation function KDF according to the HUK and other parameters 1; the Keymaster TA derives a secret key, i.e. key2, from KM, the security identification SID and other parameters 2 by means of a key generation function KDF.
8) Decrypting the synthetic key ciphertext spoblob (namely EN_key2) by using the key2 by the Keymaster TA to obtain the spoblob;
9) Key master TA derives key1 from PasswordToken;
10 Decrypting the blob by key1 to obtain a composite key;
11 Decrypting the CE key ciphertext EN_sp by using the synthesized key to obtain a CE key by the Keymaster TA;
12 Key master TA encrypts the CE Key with a Temporary Key (TK) (when the TEE is booted each time, the TEE regenerates a TK) to obtain a CE Key ciphertext en_tk, and then installs the CE Key ciphertext en_tk into the Kernel Key; alternatively, the Keymaster TA installs the plaintext CE key directly into the Kernel key, in which case the CE key is at risk of leakage.
4. When the file is read and written, the hardware encryption engine (Inline Crypto Engine, ICE) encrypts and decrypts the file based on the file key, and the following operation is performed:
1) As shown in fig. 2, when the read-write (Block IO) of the disk actually occurs, before initiating the read-write operation, key information stored in a file system index node (inode), such as CE key ciphertext en_tk, file information, etc., is found through a series of callback functions, and the key information is sent to a Keymaster TA;
2) The Keymaster TA decrypts the CE key ciphertext en_tk by using the temporary key TK, further derives a File key (File key) according to the File information, and sets the plaintext of the File key to a hardware register of the ICE through a functional module in fig. 2, such as a general flash memory (Universal Flash Storage, UFS), UFS driver, ICE driver, per-File-Encryption (PFE) driver, keymaster key management (key management), etc.;
3) After the file key is set to the hardware register of the ICE, the memory controller initiates the actual read-write operation, and the file content data can be decrypted or encrypted correctly according to the file key.
5. When the screen locking password is modified, the CE key is unchanged, the synthesized key is not regenerated, the key generated by the new screen locking password is used for re-encrypting the synthesized key, and the following operations are executed:
1) Decrypting according to the original user credentials to obtain a synthetic key plaintext:
first, the synthetic key ciphertext blob is decrypted a first time by:
acquiring a hardware unique key HUK, other parameters 1, other parameters 2 and a security identification SID; the Keymaster TA derives a root key KM of the Keymaster through a key generation function KDF according to the HUK and other parameters 1; the key master TA derives a secret key, namely key2, through a key generation function KDF according to the KM, the security identification SID and other parameters 2; decrypting the synthetic key ciphertext blob (i.e., ciphertext en_key2) using the key2 x to obtain a blob x;
And then performing secondary decryption on the synthesized key ciphertext blob by the following operation:
generating a passwordtoken_o through a key generation function KDF according to the original user certificate; the gatekeeper in REE sends a message to gatekeeper TA in TEE, wherein the message comprises a passwordtoken_o, a secsis, a user identification UID and the like; the gatekeeper TA derives a key key1_o through a hash function according to the passwordtoken_o and the secsis; and decrypting the blob by using the key key1_o to obtain a plaintext synthetic key.
2) Re-encrypting the composite key based on the newly entered user credentials:
first, the composite key is first encrypted by:
the gatekeeper in REE generates a passwordtoken_n through a key generation function KDF according to a new user credential input by a user; the gatekeeper in REE sends a message to gatekeeper TA in TEE, wherein the message comprises a passwordtoken_n, a secsis, a user identification UID and the like; the gatekeeper TA derives a key ken1_n through a hash function according to the passwordtoken_n and the secsis; performing primary encryption on the synthesized key by using the key ken1_n to obtain a synthesized key ciphertext EN_ken1_n, namely, a blob_ken1_n;
second, the composite key is encrypted a second time by:
The key2 obtained in the previous step of decrypting the ciphertext blob of the synthetic key is used by keymaster to encrypt the synthetic key a second time, so as to obtain ciphertext en_key2, namely, blob_n.
It can be seen that in the prior art, both the ciphertext of the CE key and the ciphertext of the composite key used to encrypt the CE key exist in the UDA of the flash memory. If the electronic device is stolen or lost, important information of the user may leak, because security intensity of 4-bit or 6-bit PIN/Password/Pattern, fingerprint and the like is limited, an attacker may obtain the CE key by violently cracking the PIN/Password/Pattern, fingerprint and the like, so that user information is obtained, and user information is leaked.
Currently, flash memory is used for storing user data on electronic devices. Flash memory has one feature: when writing data, the storage space needs to be erased first and then the data needs to be written, namely the data is updated in different places, namely the updated data is written into an idle storage page instead of the storage page where the original data is. Therefore, by overwriting, the original data cannot be overwritten (except for full magnetic disk overwriting), so that the original data is disabled, but the original data continues to exist for a period of time, that is, the original data cannot be accessed until the flash memory controller performs physical erasure by the related algorithm.
Because the flash memory is updated in different places, when the electronic equipment is stolen or lost, the CE key ciphertext and/or the synthetic key ciphertext are/is not likely to be deleted physically by remote control to prevent the user data from being leaked, 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 the physical erasure of the appointed data. Of course, full-disk overwriting may be performed, for example, for a 128G flash memory, the whole flash memory is overwritten by writing a random number of about 128G, so as to achieve the purpose of physical erasing, however, such a physical erasing method has strict requirements on time (for example, the 128G flash memory needs at least 10 minutes for full overwriting), device power (for example, the device needs to be powered on), whether interruption is allowed during operation (for example, interruption is not allowed during full-disk overwriting), and the like. Therefore, when the electronic equipment is stolen or lost, the probability of successful physical erasure is less by performing all the overwriting on the flash memory through the remote control due to the reasons of small time window, limited equipment electric quantity, uncontrolled equipment and the like.
In order to increase the possibility of successful secure deletion of user data when electronic equipment is stolen or lost, it is necessary to physically erase specified data such as CE key ciphertext and synthetic key ciphertext in a short time to prevent leakage of user data.
Typically, UFS flash memory is divided into 4 partitions, and there are mainly two partitions related to the present application, namely a user data area UDA and a playback-protected memory block (Replay Protected Memory Block, RPMB). In order to extend the useful life of UFS flash, commands for physical erasure of flash are limited to self-invoking within the flash controller according to related algorithms, such as wear leveling algorithms, and are not provided to external invocation. But starting from UFS 4.0 (release 12 of 2022), the RPMB partition of the flash memory can provide an RPMB erase (Purge) application program interface (Application Programming Interface, API) externally, supporting external calls to the API to physically erase the data in the RPMB.
At present, the CE key ciphertext and the synthetic key ciphertext both exist in the UDA of the flash memory, however, the UDA does not provide a physical erasure API for the outside, so that the CE key ciphertext and the synthetic key ciphertext can be considered to be stored in the RPMB partition, and the RPMB PurgeAPI can be called to carry out physical erasure when needed, thereby achieving the aim of safely deleting user data.
However, the CE key ciphertext and the synthesized key ciphertext are stored in the RPMB partition instead of the original CE key ciphertext stored in the UDA partition, so that the original system needs to be greatly changed, particularly when the CE key ciphertext is stored in the RPMB partition, the functional modules such as the keystore in the REE and the keymaster in the TEE need to be modified, and the messages between the functional modules need to be modified. In addition, the RPMB partition is smaller, and the same user has multiple CE keys, and different users have different CE keys and composite keys, so their ciphertext occupies more space in the RPMB partition.
In order to reduce the implementation cost, the original implementation manner needs to be compatible as far as possible, that is, the user data is safely deleted under the condition that the original implementation manner is changed minimally. Thus, the present application improves key management of a file system by generating a new parameter that is stored in an RPMB partition; an encryption key for the composite key is derived based on the newly generated parameters. When user data is required to be deleted in the situations of electronic equipment loss or theft and the like, only the RPMB PurgeAPI is required to be called by remote control, and the newly generated parameters are physically erased, so that the synthesized key cannot be decrypted and obtained, then the CE key cannot be decrypted and obtained, the user data cannot be accessed finally, and the possibility of user data leakage is reduced. Because only one newly generated parameter needs to be physically erased, the realization efficiency is very high, and the requirement of immediately and safely deleting the user data when the electronic equipment is lost or stolen can be completely met. In addition, the application also designs an alternative scheme, the ciphertext of the synthesized key is stored in the RPMB partition, and the ciphertext of the synthesized key is immediately and remotely and physically erased when the electronic equipment is lost or stolen, but if one terminal has a plurality of user accounts, the ciphertext of a plurality of synthesized keys is required to be stored, and when the electronic equipment is physically erased, the ciphertext of all the synthesized keys in the RPMB is required to be erased.
The information management method provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart of an information management method according to an embodiment of the present application, as shown in fig. 3, the method includes the following steps:
step 301, storing key related information into a playback protection memory block RPMB, where the key related information includes a first parameter or a first ciphertext, where the first parameter is used to encrypt a composite key, and the first ciphertext is a ciphertext obtained by encrypting the composite key.
In the embodiment of the application, the RPMB Purge API can be provided outwards by means of the RPMB, and the function of physically erasing the data in the RPMB by calling the API externally is supported, so that when the user data is required to be deleted in the situations of theft or loss of the electronic equipment, the purpose of safely and quickly deleting the user data is realized by physically erasing the key related information related to the user data.
To this end, the embodiments of the present application provide two solutions, one of which is to improve key management of a file system, namely by generating a new parameter, i.e. the first parameter, or a synthetic key protection factor, using the parameter to participate in the encryption process of the synthetic key, and then storing the parameter in the RPMB partition. When user data needs to be deleted in the situations of electronic equipment loss or theft and the like, the first parameter is remotely and physically erased, so that a key for decrypting the composite key cannot be deduced. And secondly, storing the ciphertext of the synthesized key, namely the first ciphertext, in an RPMB partition, and immediately and remotely physically erasing the ciphertext of the synthesized key when user data needs to be deleted in the scene of loss or theft of the electronic equipment and the like.
The key related information is the first parameter, i.e. the synthesized key protection factor, or the first ciphertext, i.e. the synthesized key ciphertext.
When the first parameter is used to participate in the encryption process of the synthetic key, that is, a new parameter is introduced to participate in the encryption calculation of the synthetic key on the basis of the existing synthetic key encryption mode (that is, the step of encrypting the synthetic key when the screen locking password is set for the first time in the foregoing description), after the encryption is finished, the parameter can be stored in the RPMB, and the synthetic key ciphertext is stored in the UDA according to the existing storage mode.
Optionally, the first parameter is an M-bit random number, and M is a positive integer.
I.e. the first parameter may be a random number generated by the TEE. In order to ensure higher security, the number of bits of the random number can be far greater than that of a 4 or 6-bit user certificate, namely PIN/Password/Pattern, for example, the random number is 256 bits, so that the random number is far higher than that of a 4 or 6-bit user certificate, namely PIN/Password/Pattern, and can completely resist the attack of brute force cracking under the scene of losing or being stolen of electronic equipment and the like.
When the existing synthetic key encryption mode is used, the synthetic key ciphertext obtained after encryption can be stored in the RPMB, namely, the storage mode of the synthetic key ciphertext is changed, and the synthetic key ciphertext is not stored in the UDA partition any more but is stored in the RPMB partition supporting physical erasure.
Step 302, when an instruction for indicating to delete user data is received, an RPMB erase function is called, and physical erasure is performed on the key related information stored in the RPMB, where the key related information is used to determine a key for encrypting the user data.
When user data in the electronic device need to be deleted, for example, when the electronic device is lost or stolen, key related information in the RPMB can be immediately erased by sending related instructions such as a remote control instruction for indicating to delete the user data, namely, a user can send an instruction for indicating to delete the user data to the stolen or lost electronic device by utilizing other electronic devices, so that the electronic device can call an RPMB erasing function based on the instruction, and immediately perform physical erasing on the key related information stored in the RPMB.
When the key related information is the first parameter, namely the synthesized key protection factor, under the scene of loss or theft of the electronic equipment and the like, the first parameter in the RPMB partition can be immediately and physically erased by calling an RPMB erasing function based on a user data deleting instruction so as to realize the purpose of safely deleting the user data.
When the key related information is the first ciphertext, namely the synthesized key ciphertext, under the scene of loss or theft of the electronic equipment and the like, the first ciphertext in the RPMB partition can be immediately and physically erased by calling an RPMB erasing function based on a user data deleting instruction so as to realize the aim of safely deleting the user data.
Optionally, the key related information includes the first parameter;
prior to the step 301, the method further comprises:
encrypting the synthesized key according to the first parameter;
the step 301 includes:
the first parameter is stored into the RPMB.
In one embodiment, the key related information includes the first parameter, i.e., the composite key protection factor, i.e., a scheme that generates a new parameter to participate in the encryption calculation of the composite key and stores the parameter in the RPMB may be employed.
Further, the storing the first parameter into the RPMB includes:
the first parameter is stored in the RPMB in association with a key identification of the composite key.
The first parameter and the key identifier associated with the composite key can be stored in the RPMB, the key identifier can be a security identifier SID participating in the encryption of the composite key, and the key identifier is used for identifying the first parameter so as to facilitate the retrieval of the corresponding first parameter according to the key identifier. In this way, the specified first parameter can be erased as necessary based on the key identification, enabling fine-grained physical erasure.
In this embodiment, since the first parameter occupies less storage space than the ciphertext of the synthetic key, the scheme is not used to occupy too much storage space of the RPMB, and by erasing the parameter, the decryption key of the synthetic key can be effectively prevented from being obtained through derivation, and further, the CE key cannot be obtained through decryption, and finally, the user data cannot be accessed, thereby greatly reducing the possibility of user data leakage.
Optionally, the encrypting the composite key according to the first parameter includes any one of the following:
encrypting the synthesized key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a third key to obtain a third ciphertext, wherein the third key is determined according to a root key, and the root key is determined according to the first parameter;
encrypting the synthesized 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;
encrypting the synthesized key according to the first key to obtain a second ciphertext; and encrypting the second ciphertext 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 manners.
The first parameter may be encrypted in three different ways to protect the composite key. The method comprises the following steps:
mode 1: adding the first parameter, namely the synthesized key protection factor, to the calculation of a keymaster root key KM;
mode 2: adding the first parameter, namely the synthesized key protection factor, to the calculation of the secret key, namely key2;
mode 3: and adding the first parameter, namely the synthesized key protection factor, to the second encryption calculation of the synthesized key.
As shown in mode 1 in fig. 4, the first parameter, i.e. the synthesized 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 the other parameters 1, HUK and the first parameter; the Key master TA derives a secret Key, namely key2, through a key generation function KDF according to the KM, the security identification SID and other parameters 2; the key master TA in the TEE encrypts the synthesized key for the first time by using a first key, namely key1, so as to obtain a ciphertext EN_key1, namely a blob_key1, and encrypts the synthesized key for the second time by using key2, namely the first encrypted ciphertext EN_key1 of the synthesized key is encrypted, so as to obtain a ciphertext EN_key2, namely the blob. It should be noted that the corresponding step of decrypting the synthetic key ciphertext, i.e., the blob, using the first parameter corresponds to the step.
As shown in mode 2 in fig. 4, the first parameter, namely the synthesized key protection factor, is added into the computation of the secret key, namely key2, namely the Keymaster TA derives KM through a key generation function KDF according to other parameters 1 and HUK; the Key master TA derives a secret Key, namely key2, through a key generation function KDF according to the KM, the security identification SID, other parameters 2 and the first parameter; the key master TA in the TEE encrypts the synthesized key for the first time by using a first key, namely key1, so as to obtain a ciphertext EN_key1, namely a blob_key1, and encrypts the synthesized key for the second time by using key2, namely the first encrypted ciphertext EN_key1 of the synthesized key is encrypted, so as to obtain a ciphertext EN_key2, namely the blob. It should be noted that the corresponding step of decrypting the synthetic key ciphertext, i.e., the blob, using the first parameter corresponds to the step.
As shown in the mode 3 in fig. 4, the first parameter, i.e. the synthesized key protection factor, is added to the second encryption calculation of the synthesized key, i.e. the Keymaster TA derives KM from the other parameters 1 and HUK through the key generation function KDF; the Key master TA derives a secret Key, namely key2, through a key generation function KDF according to the KM, the security identification SID and other parameters 2; the key master TA in the TEE encrypts the synthesized key for the first time by using a first key, namely key1, so as to obtain a ciphertext EN_key1, namely a blob_key1, and encrypts the synthesized key for the second time by using key2 and the first parameter, namely the first encrypted ciphertext EN_key1 of the synthesized key, so as to obtain a ciphertext EN_key2, namely the blob. It should be noted that the corresponding step of decrypting the synthetic key ciphertext, i.e., the blob, using the first parameter corresponds to the step.
Thus, this embodiment supports three different ways to apply the first parameter, i.e. the synthetic key protection factor, to the encryption calculation of the synthetic key, all enabling protection of the synthetic key.
Optionally, the key-related information includes a first ciphertext;
prior to the step 301, the method further comprises:
encrypting a synthesized key according to a 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 manners;
the step 301 includes:
and storing the first ciphertext into the RPMB.
In another embodiment, the key related information includes a first ciphertext, i.e., a synthesized key ciphertext, that is, an existing encryption manner of the synthesized key may be adopted, i.e., a key master TA in the TEE encrypts the synthesized key for the first time by using the first key, i.e., key1, to obtain a ciphertext en_key1, i.e., a blob_key1, and encrypts the synthesized key for the second time by using key2, i.e., encrypts the first encrypted ciphertext en_key1 of the synthesized key, to obtain a ciphertext en_key2, i.e., a blob. However, the storage mode of the synthesized key ciphertext is changed, and as shown in fig. 4, the encrypted synthesized key ciphertext is stored in RPMB.
Further, the storing the first ciphertext into the RPMB includes:
and storing the first ciphertext and the key identification of the synthesized key in the RPMB in an associated manner.
The synthesized key ciphertext and the key identifier associated with the synthesized key can be stored in the RPMB in an associated mode, the key identifier can be a security identifier SID participating in the synthesized key encryption, and the key identifier is used for identifying the synthesized key ciphertext so as to conveniently retrieve the corresponding synthesized key ciphertext according to the key identifier. Thus, the appointed synthesized key ciphertext can be erased according to the key identification when necessary, and fine-granularity physical erasure is realized.
Therefore, new parameters are not required to be generated, the encryption mode of the synthetic key is not required to be changed, only the synthetic key ciphertext is required to be stored in the RPMB, and by erasing the synthetic key ciphertext, other people cannot obtain the synthetic key ciphertext, so that the synthetic key cannot be obtained by decrypting the synthetic key ciphertext, then the CE key cannot be obtained by decrypting, finally, the user data cannot be accessed, and the possibility of user data leakage is greatly reduced.
Optionally, the step 301 includes:
the key related information is sent to the UFS driver through a key management trusted application, an RPMB kernel driver, an REE file operation interface and an RPMB monitoring module in sequence;
And calling an RPMB storage function provided by the UFS controller through the UFS driver, and writing the key related information into the RPMB.
In one embodiment, to support the storage of the key related information into the RPMB, improvements to the related modules are required, including adding communication functions and message processing functions between related modules.
Specifically, a corresponding key information management module needs to be added in the RPMB trusted application TA, and is used for supporting functions such as writing of the key related information in the RMPB; adding message processing capacity of the key related information in functional modules such as an RPMB kernel driver (RPMB kernel driver), a REE file operation interface (REE file operation interface) and an RPMB monitoring module (RPMB listner) so as to support receiving, processing and forwarding related messages such as writing of the key related information; and related information is added among the modules of the key management trusted application (Keymaster TA), the RPMB TA, RPMB kernel driver, REE file operation interface, the RPMB listener and the like so as to support the functions of writing the key related information and the like.
In addition, a communication function between the Keymaster TA and the RPMB TA needs to be added to support the Keymaster TA to send the key related information to the RPMB TA.
Thus, when the key related information needs to be stored in the RPMB, the key related information may be sent to a key information management module in the RPMB TA through the Keymaster TA, then the key related information is sent to RPMB kernel Driver through a key information management module in the RPMB TA, the RPMB kernel Driver further sends the key related information to REE file operation interface, the REE file operation interface further sends the key related information to an RPMB Listener, the RPMB Listener further sends the key related information to a UFS Driver, and finally the UFS Driver invokes an RPMB storage function provided by a UFS Controller (UFS Controller) to write the key related information in the RPMB.
Optionally, the calling the function of erasing the RPMB of the replay protection memory block physically erases the key related information stored in the RPMB, including:
the method comprises the steps that an RPMB erasure message is sent to a universal flash memory storage UFS driver sequentially through a key management trusted application, an RPMB kernel driver, an REE file operation interface and an RPMB monitoring module;
and calling an RPMB erasing function provided by a UFS controller through the UFS driver, and physically erasing the key related information stored in the RPMB.
In one embodiment, to support the physical erasure of the key related information in the RPMB by invoking RPMB erasure functionality, improvements to related modules are required, including the addition of communication functions and message handling functions between related modules.
Specifically, a corresponding key information management module needs to be added in the RPMB trusted application TA, and is used for supporting functions such as writing, physical erasing and the like of the key related information in the RMPB; adding message processing capacity of the key related information in functional modules such as an RPMB kernel driver (RPMB kernel driver), a REE file operation interface (REE file operation interface) and an RPMB monitoring module (RPMB listner) so as to support receiving, processing and forwarding of the key related information physical erasure and other related messages; and related information is added among the modules of the Keymaster TA, the RPMB TA, the RPMB kernel driver, the REE file operation interface, the RPMB listner and the like so as to support the functions of physical erasure and the like of the key related information.
In addition, a communication function between the Keymaster TA and the RPMB TA needs to be added to support the Keymaster TA to send the erasure message of the key related information to the RPMB TA.
It should be noted that, in the embodiment of the present application, the physical erase function of the RPMB partition of the flash memory is supported on hardware, and the RPMB Purge API is provided on firmware.
In this way, when the key related information in the RPMB needs to be erased, an RPMB erasure message may be sent to a key information management module in the RPMB TA through the Keymaster TA, then the key information management module in the RPMB TA sends the RPMB erasure message to RPMB kernel Driver, the RPMB kernel Driver sends the RPMB erasure message to REE file operation interface, the REE file operation interface continues to send the RPMB erasure message to an RPMB border, the RPMB border further sends the RPMB erasure message to a UFS Driver (UFS Driver), and finally the UFS Driver calls an RPMB erasure function provided by a UFS Controller (UFS Controller), that is, accesses an RPMB Purge API, to physically erase the key related information in the RPMB.
Optionally, after the step 301, before the receiving an instruction for instructing to delete user data, the method further includes:
sequentially sending a key reading message to the UFS driver through a key management trusted application, an RPMB kernel driver, an REE file operation interface and an RPMB monitoring module;
The UFS driver is used for calling an RPMB reading function provided by the UFS controller, and the key related information is read from the 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;
determining a plaintext of the synthesized key according to the key related information;
and decrypting the encryption key CE key of the user certificate according to the plaintext of the synthesized key.
In one embodiment, to support the reading of the key related information in the RPMB to decrypt the synthetic key ciphertext, improvements to the related modules are required, including the addition of communication functions and message processing functions between related modules.
Specifically, a corresponding key information acquisition module needs to be added in a key management trusted application (Keymaster TA) for supporting the acquisition of the key related information from the RPMB through the RPMB trusted application TA; the corresponding key information management module needs to be added in the RPMB trusted application TA, and is used for supporting functions such as reading the key related information in the RMPB.
Adding message processing capacity of the key related information in functional modules such as an RPMB kernel driver (RPMB kernel driver), a REE file operation interface (REE file operation interface) and an RPMB monitoring module (RPMB listner) so as to support receiving, processing and forwarding related messages such as reading the key related information; and related information is added among the modules of the Keymaster TA, the RPMB TA, the RPMB kernel driver, the REE file operation interface, the RPMB listner and the like so as to support functions of reading related information of the secret key and the like.
In addition, a communication function between the Keymaster TA and the RPMB TA needs to be added to support the Keymaster TA to obtain the key related information from the RPMB TA.
It should be noted that, in the embodiment of the present application, the physical erase function of the RPMB partition of the flash memory is supported on hardware, and the RPMB Purge API is provided on firmware.
In this way, when the related encrypted file in the electronic device needs to be decrypted, the key related information in the RPMB may be read, specifically, a key reading message may be sent to a key information management module in the RPMB TA by a key information acquisition module in the Keymaster TA, then the key reading message is sent to RPMB kernel Driver by a key information management module in the RPMB TA, the RPMB kernel Driver sends the key reading message to REE file operation interface, the REE file operation interface continues to send the key reading message to the RPMB listner, the RPMB listner further sends the key reading message to a UFS Driver (UFS Driver), and finally, the RPMB reading function provided by the UFS Controller (UFS Controller) is called by the UFS Driver, so as to read the key related information from the RPMB.
And the read key related information is sequentially transmitted to the key information management modules in the RPMB listner, the REE file operation interface, the RPMB kernel driver and the RPMB TA by the UFS driver, and finally the key information management module in the RPMB TA transmits the key related information to the key information acquisition module in the Keymaster TA.
When the key related information is the first parameter, namely a synthetic key protection factor, a key in the REE acquires a synthetic key ciphertext, namely a second encrypted ciphertext of the synthetic key, from the UDA, the key master TA decrypts the second encrypted ciphertext of the synthetic key by using the first parameter, namely the synthetic key protection factor, acquires a first encrypted ciphertext of the synthetic key, decrypts the first encrypted ciphertext of the synthetic key by using a first key, namely key1, acquires a plaintext of the synthetic key, decrypts a user credential encryption key CE key by using the plaintext of the synthetic key, and then decrypts an encrypted file by using the CE key plaintext.
When the key related information is the first ciphertext, namely the synthesized key ciphertext, the synthesized key ciphertext is also the second encrypted ciphertext of the synthesized key, the Keymaster TA deduces a root key KM according to the HUK and other parameters 1, deduces a second key, namely a key2 according to the KM, the SID and other parameters 2, decrypts the first ciphertext, namely the second encrypted ciphertext of the synthesized key, by using the second key, namely the key2 to obtain the first encrypted ciphertext of the synthesized key, decrypts the first encrypted ciphertext of the synthesized key by using the first key, namely the key1 to obtain a plaintext of the synthesized key, decrypts the CE key by using the plaintext of the synthesized key, and then decrypts the encrypted file by using the CE key.
The following description is directed to the functional framework that needs to be improved in two different solutions:
when the key related information includes the first parameter, i.e. the composite key protection factor, an improvement needs to be made to the functional framework for obtaining the CE key in fig. 2, and the improved functional framework is shown in fig. 5.
Specifically, a synthetic key protection factor acquisition module is added in the Keymaster TA to support the acquisition of 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 protection factor management module is added in the RPMB TA to support writing, reading, physical erasing and the like of the synthetic key protection factor in the RMPB;
adding message processing capability of the synthesized key protection factor in the RPMB kernel driver, REE file operation interface, RPMB listner and other functional modules to support receiving, processing and forwarding messages related to writing, reading, physical erasing and the like of the synthesized key protection factor; related information is added among the functional modules to support the functions of writing, reading, physical erasing and the like of the synthesized key protection factors;
An improvement in communication between Keymaster TA and RPMB TA adds a message to support the Keymaster TA to obtain a synthetic key protection factor from the RPMB TA.
When the key related information includes the synthesized key ciphertext, an improvement needs to be made on the functional framework for acquiring the CE key in fig. 2, and the improved functional framework is shown in fig. 6.
Specifically, a synthetic key ciphertext acquisition module is added in the Keymaster TA to support the acquisition of the synthetic key ciphertext from the RPMB through the RPMB TA when necessary.
A synthetic key ciphertext management module is added in the RPMB TA to support writing, reading, physical erasing and the like of the synthetic key ciphertext in the RMPB;
adding the message processing capability of the synthesized key ciphertext in the RPMB kernel driver, REE file operation interface, RPMB listner and other functional modules to support receiving, processing and forwarding messages related to writing, reading, physical erasing and the like of the synthesized key ciphertext; related information is added among the functional modules to support the functions of writing, reading, physical erasing and the like of the synthesized key ciphertext;
the improvement of communication between Keymaster TA and RPMB TA adds a message to support Keymaster TA to obtain the synthetic key ciphertext from RPMB TA.
According to the embodiment of the application, under the scenes of losing, stolen, abandoned or transferred electronic equipment and the like, a user can actively and safely delete the sensitive data on the electronic equipment, so that an attacker cannot recover the deleted data even if the attacker obtains the electronic equipment of the user, and the sensitive information of the user is prevented from being leaked.
The information management method in the embodiment of the application stores key related information into a Replay Protection Memory Block (RPMB), wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting a synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key; and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data. Therefore, by changing the key related information related to the user data into the RPMB, when the user data on the electronic equipment needs to be deleted, the RPMB erasure interface can be controlled to be called to carry out quick physical erasure on the key related information stored in the RPMB, so that the purpose of quick and safe deletion of the user data is realized.
According to the information management method provided by the embodiment of the application, the execution subject can be an information management device. In the embodiment of the present application, an information management device is described by taking an information management method performed by an information management device as an example.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an information management device according to an embodiment of the present application, and as shown in fig. 7, an information management device 700 includes:
the storage module 701 is configured to store key related information into the replay protection memory block RPMB, where the key related information includes a first parameter or a first ciphertext, where the first parameter is used to encrypt a composite key, and the first ciphertext is a ciphertext obtained by encrypting the composite key;
and the erasing module 702 is configured to invoke an RPMB erasing function to physically erase the key related information stored in the RPMB, where the key related information is used to determine a key for encrypting the user data, when an instruction for instructing to delete the user data is received.
Optionally, the key related information includes the first parameter;
the information management apparatus 700 further includes:
the first encryption module encrypts the synthesized key according to the first parameter;
the storage module 701 is configured to store the first parameter into the RPMB.
Optionally, the first encryption module is configured to:
encrypting the synthesized key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a third key to obtain a third ciphertext, wherein the third key is determined according to a root key, and the root key is determined according to the first parameter;
Encrypting the synthesized 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;
encrypting the synthesized key according to the first key to obtain a second ciphertext; and encrypting the second ciphertext 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 manners.
Optionally, the key-related information includes the first ciphertext;
the information management apparatus 700 includes:
the second encryption module is used for encrypting the synthesized 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 manners;
the storage module 701 is configured to store the first ciphertext into the RPMB.
Optionally, the erase module 702 includes:
the first sending unit is used for sending an RPMB erasure message to the universal flash memory storage UFS driver sequentially through the key management trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module;
And the erasing unit is used for calling an RPMB erasing function provided by the UFS controller through the UFS driver and physically erasing the key related information stored in the RPMB.
Optionally, the storage module 701 includes:
the second sending unit is used for sending the key related information to the UFS driver sequentially through the key management trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module;
and the writing unit is used for calling an RPMB storage function provided by the UFS controller through the UFS driver and writing the key related information into the RPMB.
Optionally, the information management apparatus 700 further includes:
the sending module is used for sequentially sending a key reading message to the UFS driver through the key management trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module;
the reading module is used for calling an RPMB reading function provided by the UFS controller through the UFS driver and reading the key related information from the RPMB;
the transmission module is used for transmitting the read key related information 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 determining module is used for determining the plaintext of the synthesized key according to the key related information;
and the decryption module is used for decrypting the encryption key CE key of the user certificate according to the plaintext of the synthesized key.
The information management device in the embodiment of the application stores key related information into a Replay Protection Memory Block (RPMB), wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting a synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key; and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data. Therefore, by changing the key related information related to the user data into the RPMB, when the user data on the electronic equipment needs to be deleted, the RPMB erasure interface can be controlled to be called to carry out quick physical erasure on the key related information stored in the RPMB, so that the purpose of quick and safe deletion of the user data is realized.
The information management device in the embodiment of the application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet, notebook, palmtop, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented Reality (Augmented Reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-Mobile Personal Computer, UMPC, netbook or personal digital assistant (Personal Digital Assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (Personal Computer, PC), television (Television, TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
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, and the embodiment of the present application is not limited specifically.
The information management device provided in the embodiment of the present application can implement each process implemented by the method embodiment of fig. 3, and in order to avoid repetition, details are not repeated here.
Optionally, as shown in fig. 8, the embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, where the memory 802 stores a program or an instruction that can be executed on the processor 801, and the program or the instruction implements each step of the embodiment of the information management method described above when executed by the processor 801, and the steps achieve the same technical effects, so that repetition is avoided, and no further description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 9 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.
Those skilled in the art will appreciate that the electronic device 900 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 910 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
The processor 910 is configured to store key related information into the playback protection memory block RPMB, where the key related information includes a first parameter or a first ciphertext, where the first parameter is used to encrypt a composite key, and the first ciphertext is a ciphertext obtained by encrypting the composite key;
and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data.
Optionally, the key related information includes the first parameter;
A processor 910, configured to encrypt a composite key according to the first parameter; the first parameter is stored into the RPMB.
Optionally, the processor 910 is further configured to:
encrypting the synthesized key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a third key to obtain a third ciphertext, wherein the third key is determined according to a root key, and the root key is determined according to the first parameter;
encrypting the synthesized 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;
encrypting the synthesized key according to the first key to obtain a second ciphertext; and encrypting the second ciphertext 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 manners.
Optionally, the key-related information includes the first ciphertext;
the processor 910 is further configured to encrypt the composite key according to a first key to obtain a second ciphertext, and encrypt the second ciphertext according to a second key to obtain the first ciphertext, where the first key and the second key are determined in different manners; and storing the first ciphertext into the RPMB.
Optionally, the processor 910 is further configured to send an RPMB erasure message to the universal flash storage UFS driver sequentially through a key management trusted application, an RPMB kernel driver, a REE file operation interface, and an RPMB listening;
and calling an RPMB erasing function provided by a UFS controller through the UFS driver, and physically erasing the key related information stored in the RPMB.
Optionally, the processor 910 is further configured to send the key related information to the UFS driver through a key management trusted application, an RPMB kernel driver, a re file operation interface, and an RPMB listening module in sequence;
and calling an RPMB storage function provided by the UFS controller through the UFS driver, and writing the key related information into the RPMB.
Optionally, the processor 910 is further configured to send a key reading message to the UFS driver sequentially through a key management trusted application, an RPMB kernel driver, a REE file operation interface, and an RPMB listening module;
the UFS driver is used for calling an RPMB reading function provided by the UFS controller, and the key related information is read from the 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;
Determining a plaintext of the synthesized key according to the key related information;
and decrypting the encryption key CE key of the user certificate according to the plaintext of the synthesized key.
It should be appreciated that in an embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing 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, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. Touch panel 9071, also referred to as 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 (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 909 may include a volatile memory or a nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memories. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 909 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, and the like, and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 910.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements each process of the above-mentioned information management method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the processes of the embodiment of the information management method, and can achieve the same technical effects, so that repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above-described information management method embodiments, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (14)

1. An information management method, comprising:
storing key related information into a Replay Protection Memory Block (RPMB), wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting a synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key;
and under the condition that an instruction for indicating to delete the user data is received, an RPMB erasure function is called, and the key related information stored in the RPMB is subjected to physical erasure, wherein the key related information is used for determining a key for encrypting the user data.
2. The method of claim 1, wherein the key-related information comprises the first parameter;
before storing the key related information in the RPMB, the method further includes:
encrypting the synthesized key according to the first parameter;
the storing the key related information in the RPMB includes:
storing the first parameter into the RPMB;
or alternatively, the process may be performed,
the key-related information includes the first ciphertext;
before storing the key related information in the RPMB, the method further includes:
Encrypting a synthesized key according to a 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 manners;
the storing the key related information in the RPMB includes:
and storing the first ciphertext into the RPMB.
3. The method of claim 2, wherein encrypting the composite key according to the first parameter comprises any one of:
encrypting the synthesized key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a third key to obtain a third ciphertext, wherein the third key is determined according to a root key, and the root key is determined according to the first parameter;
encrypting the synthesized 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;
encrypting the synthesized key according to the first key to obtain a second ciphertext; and encrypting the second ciphertext 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 manners.
4. The method of claim 1, wherein the invoking the RPMB erase function to physically erase the key-related information stored in RPMB comprises:
the method comprises the steps that an RPMB erasure message is sent to a universal flash memory storage UFS driver sequentially through a key management trusted application, an RPMB kernel driver, an REE file operation interface and an RPMB monitoring module;
and calling an RPMB erasing function provided by a UFS controller through the UFS driver, and physically erasing the key related information stored in the RPMB.
5. The method of claim 1, wherein storing key related information into the RPMB comprises:
the key related information is sent to the UFS driver through a key management trusted application, an RPMB kernel driver, an REE file operation interface and an RPMB monitoring module in sequence;
and calling an RPMB storage function provided by the UFS controller through the UFS driver, and writing the key related information into the RPMB.
6. The method of claim 1, wherein after storing the key related information in the RPMB, the method further comprises, prior to receiving the instruction for instructing deletion of the user data:
Sequentially sending a key reading message to the UFS driver through a key management trusted application, an RPMB kernel driver, an REE file operation interface and an RPMB monitoring module;
the UFS driver is used for calling an RPMB reading function provided by the UFS controller, and the key related information is read from the RPMB;
the read 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;
determining a plaintext of the synthesized key according to the key related information;
and decrypting the encryption key CE key of the user certificate according to the plaintext of the synthesized key.
7. An information management apparatus, comprising:
the storage module is used for storing key related information into the playback protection memory block RPMB, wherein the key related information comprises a first parameter or a first ciphertext, the first parameter is used for encrypting the synthesized key, and the first ciphertext is a ciphertext obtained by encrypting the synthesized key;
and the erasing module is used for calling an RPMB erasing function under the condition of receiving an instruction for indicating to delete the user data and physically erasing the key related information stored in the RPMB, wherein the key related information is used for determining a key for encrypting the user data.
8. The information management apparatus according to claim 7, wherein the key-related information includes the first parameter;
the information management apparatus further includes:
the first encryption module encrypts the synthesized key according to the first parameter;
the storage module is used for storing the first parameter into the RPMB;
or alternatively, the process may be performed,
the key-related information includes the first ciphertext;
the information management apparatus includes:
the second encryption module is used for encrypting the synthesized 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 manners;
the storage module is used for storing the first ciphertext into the RPMB.
9. The information management apparatus according to claim 8, wherein the first encryption module is configured to:
encrypting the synthesized key according to the first key to obtain a second ciphertext; encrypting the second ciphertext according to a third key to obtain a third ciphertext, wherein the third key is determined according to a root key, and the root key is determined according to the first parameter;
Encrypting the synthesized 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;
encrypting the synthesized key according to the first key to obtain a second ciphertext; and encrypting the second ciphertext 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 manners.
10. The information management apparatus according to claim 7, wherein the erasing module includes:
the first sending unit is used for sending an RPMB erasure message to the UFS driver through the key management trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
and the erasing unit is used for calling an RPMB erasing function provided by the UFS controller through the UFS driver and physically erasing the key related information stored in the RPMB.
11. The information management apparatus according to claim 7, wherein the storage module includes:
the second sending unit is used for sending the key related information to the UFS driver through the key management trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module in sequence;
And the writing unit is used for calling an RPMB storage function provided by the UFS controller through the UFS driver and writing the key related information into the RPMB.
12. The information management apparatus according to claim 7, characterized in that the information management apparatus further comprises:
the sending module is used for sequentially sending a key reading message to the UFS driver through the key management trusted application, the RPMB kernel driver, the REE file operation interface and the RPMB monitoring module;
the reading module is used for calling an RPMB reading function provided by the UFS controller through the UFS driver and reading the key related information from the RPMB;
the transmission module is used for transmitting the read key related information 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 determining module is used for determining the plaintext of the synthesized key according to the key related information;
and the decryption module is used for decrypting the CE key according to the plaintext of the synthesized key.
13. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the information management method of any of claims 1-6.
14. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the information management method according to any of claims 1-6.
CN202310619851.3A 2023-05-30 2023-05-30 Information management method and device and electronic equipment Pending CN116594567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310619851.3A CN116594567A (en) 2023-05-30 2023-05-30 Information management method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310619851.3A CN116594567A (en) 2023-05-30 2023-05-30 Information management method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116594567A true CN116594567A (en) 2023-08-15

Family

ID=87593539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310619851.3A Pending CN116594567A (en) 2023-05-30 2023-05-30 Information management method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116594567A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221012A (en) * 2023-11-07 2023-12-12 新华三技术有限公司 Decryption and encryption method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221012A (en) * 2023-11-07 2023-12-12 新华三技术有限公司 Decryption and encryption method and device
CN117221012B (en) * 2023-11-07 2024-01-26 新华三技术有限公司 Decryption and encryption method and device

Similar Documents

Publication Publication Date Title
US11263020B2 (en) System and method for wiping encrypted data on a device having file-level content protection
US10348497B2 (en) System and method for content protection based on a combination of a user pin and a device specific identifier
US8589680B2 (en) System and method for synchronizing encrypted data on a device having file-level content protection
US8433901B2 (en) System and method for wiping encrypted data on a device having file-level content protection
US8412934B2 (en) System and method for backing up and restoring files encrypted with file-level content protection
US9652638B2 (en) Unlocking a storage device
JP4398145B2 (en) Method and apparatus for automatic database encryption
JP5362114B2 (en) Secure USB storage medium generation and decoding method, and medium on which a program for generating a secure USB storage medium is recorded
WO2016173264A1 (en) Electronic data protection method and device, and terminal device
US8694799B2 (en) System and method for protection of content stored in a storage device
CN103731395A (en) Processing method and system for files
CN116594567A (en) Information management method and device and electronic equipment
CN110764797A (en) Method, device and system for upgrading file in chip and server
CN109344632A (en) A kind of OPENSTACK volumes of encryption method based on hardware encryption card
JP4885015B2 (en) Terminal device, data management device, and computer program
JP2008219177A (en) Terminal device, data managing device, and computer program
CN113342896B (en) Scientific research data safety protection system based on cloud fusion and working method thereof
CN101763319A (en) Disk FDE (Full Disk Encryption) system and method
JP2008219178A (en) Terminal device, data managing device, and computer program
CN114091049A (en) File viewing method and device
CN116933284A (en) File processing method and device and electronic equipment
KR20230070772A (en) Blockchain based cloud storage system and the method of controlling access right in the cloud storage system
CN117131522A (en) File processing method and device and electronic equipment
CN111597575A (en) Data storage method, device, equipment and storage medium
KR20140093401A (en) Security Method for Computer Network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination