Data integrity protection method and apparatus
Abstract
A data integrity protection method is applied to an electronic device, and the electronic device stores vendor data and first verification information. The first verification information is stored in a first storage area of the electronic device and is used to perform integrity verification on the vendor data. The method includes: First data is obtained. Digital signature is performed on the first data to generate second data and second verification information. The second data and the second verification information are stored, where the second verification information is stored in a second storage area of the electronic device. According to the data integrity protection method provided in this embodiment of this application, firmware or software customized by a third-party integrator is supported in being reloaded to a system for running, thereby simplifying a process and improving integrated development efficiency of an electronic device.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 18 · Forward citations: 1.
Claims (17 — 4 Independent, 13 Dependent)
- Claim 1Independent Claim
A data integrity protection method, applied to an electronic device, wherein the electronic device stores vendor data and first verification information, the first verification information is stored in a first storage area of the electronic device and the vendor data is stored on the electronic device, the first verification information is used to perform integrity verification on the vendor data, the first verification information includes a hash value of a first root public key that corresponds to a first root private key provided by a device provider of the electronic device, the vendor data includes first unified extensible firmware interface (UEFI) firmware, and the method comprises: obtaining first data that includes second UEFI firmware; performing digital signature on the first data to generate second data and second verification information by using a second root private key provided by a third-party integrator; obtaining the second verification information corresponding to the digital signature, wherein the second verification information includes a hash value of a second root public key and a secure boot policy that is used to indicate using the second verification information to perform integrity verification on the second UEFI firmware, the second root public key corresponding to the second root private key; storing the second data and the second verification information, wherein the second verification information is stored in a second storage area of the electronic device and the second data is stored on the electronic device; obtaining to-be-verified data that includes the second UEFI firmware and a certificate chain that corresponds to the second UEFI firmware; and in response to failing to perform integrity verification on the to-be-verified data by comparing the hash value of the first root public key of the first verification information to a hash value from a root public key parsed from the certificate chain: executing and loading the second UEFI firmware in response to performing the integrity verification on the to-be-verified data by comparing the hash value from the root public key parsed from the certificate chain to the hash value of the second root public key of the second verification information.
- Claim 2Depends on #1
The method according to claim 1, wherein both the first storage area and the second storage area are one-time writing storage areas.
- Claim 3Depends on #1
The method according to claim 1, wherein the first data comprises data obtained after the third-party integrator modifies the vendor data, and the performing digital signature on the first data to the generate second data comprises: obtaining a public-private key pair provided by the third-party integrator; and performing digital signature on the first data based on a private key in the public-private key pair to generate the second data.
- Claim 4Depends on #1
The method according to claim 1, wherein the secure boot policy is used to indicate a rule for performing the integrity verification on the second data.
- Claim 5Depends on #1
The method according to claim 1, wherein the second verification information comprises a root of trust.
- Claim 6Depends on #1
The method according to claim 1, wherein the first verification information includes a first root of trust provided by the device provider and the second verification information includes a second root of trust provided by the third-party integrator.
- Claim 7Depends on #1
The method according to claim 1, wherein the second data includes the first data.
- Claim 8Independent Claim
A data integrity protection method, applied to an electronic device, wherein the electronic device stores vendor data and first verification information, the first verification information is stored in a first storage area of the electronic device and the vendor data is stored on the electronic device, the first verification information being used to perform integrity verification on the vendor data, the first verification information including a hash value of a first root public key that corresponds to a first root private key provided by a device provider of the electronic device, the vendor data including first unified extensible firmware interface (UEFI) firmware and a first driver, and the method comprising: obtaining first data that includes second UEFI firmware and a second driver; performing digital signature on the second UEFI firmware of the first data but not the second driver to generate second data and second verification information by using a second root private key provided by a third-party integrator; obtaining the second verification information corresponding to the digital signature, wherein the second verification information includes a hash value of a second root public key and a secure boot policy that is used to indicate using the second verification information to perform integrity verification on the second driver, the second root public key corresponding to the second root private key; storing the second data and the second verification information, wherein the second verification information is stored in a second storage area of the electronic device and the second data is stored on the electronic device, wherein both the first storage area and the second storage area are one-time writing storage areas; obtaining to-be-verified data that includes the second driver; and in response to failing to perform integrity verification on the to-be-verified by the first verification information based on no digital signature being performed for the second driver: executing and loading the second driver in response to performing the integrity verification on the to-be-verified data based on the secure boot policy of the second verification information.
- Claim 9Depends on #8
The method according to claim 8, wherein the second verification information comprises at least one of the following provided by the third-party integrator: a root of trust, and the secure boot policy is used to indicate a rule for performing integrity verification on the to-be-verified data.
- Claim 10Depends on #8
The method according to claim 8, wherein before the performing integrity verification on the to-be-verified data based on at least one of the first verification information and the second verification information, the method further comprises: determining that the second storage area is in a write-protected state.
- Claim 11Independent Claim
A data integrity protection apparatus, comprising an electronic device, wherein the electronic device stores vendor data and first verification information, the first verification information is stored in a first storage area of the electronic device and the vendor data is stored on the electronic device, and the first verification information is used to perform integrity verification on the vendor data, the first verification information includes a hash value of a first root public key that corresponds to a first root private key provided by a device provider of the electronic device, the vendor data includes first unified extensible firmware interface (UEFI) firmware, and wherein the electronic device comprises: a memory; and a processor coupled to the memory and configured to execute instructions to: obtain first data that include second UEFI firmware; perform digital signature on the first data to generate second data and second verification information by using a second root private key provided by a third-party integrator wherein the second verification information corresponds to the digital signature, wherein the second verification information includes a hash value of a second root public key and a secure boot policy that is used to indicate using the second verification information to perform integrity verification on the second UEFI firmware, the second root public key corresponding to the second root private key; store the second data and the second verification information, wherein the second verification information is stored in a second storage area of the electronic device and the second data is stored on the electronic device; obtain to-be-verified data that includes the second UEFI firmware and a certificate chain that corresponds to the second UEFI firmware; and in response to failing to perform integrity verification on the to-be-verified data by comparing the hash value of the first root public key of the first verification information to a hash value from a root public key parsed from the certificate chain: execute and load the second UEFI firmware in response to performing the integrity verification on the to-be-verified data by comparing the hash value from the root public key parsed from the certificate chain to the hash value of the second root public key of the second verification information.
- Claim 12Depends on #11
The apparatus according to claim 11, wherein both the first storage area and the second storage area are one-time writing storage areas.
- Claim 13Depends on #11
The apparatus according to claim 11, wherein the first data comprises data obtained after the third-party integrator modifies the vendor data, and the processor is further configured to execute instructions to: obtain a public-private key pair provided by the third-party integrator; and perform the digital signature on the first data based on a private key in the public-private key pair to generate the second data and the second verification information.
- Claim 14Depends on #11
The apparatus according to claim 11, wherein the secure boot policy is used to indicate a rule for performing the integrity verification on the second data.
- Claim 15Independent Claim
A data integrity protection apparatus, comprising an electronic device, wherein the electronic device stores vendor data and first verification information, the first verification information is stored in a first storage area of the electronic device and the vendor data is stored on the electronic device, and the first verification information is used to perform integrity verification on the vendor data, the first verification information includes a hash value of a first root public key that corresponds to a first root private key provided by a device provider of the electronic device, the vendor data includes first unified extensible firmware interface (UEFI) firmware and a first driver, wherein the data integrity protection apparatus comprises: a memory; and a processor coupled to the memory and configured to execute instructions to: obtain first data that includes second UEFI firmware and a second driver; perform digital signature on the second UEFI firmware of the first data but not the second driver to generate second data and second verification information by using a second root private key provided by a third-party integrator; obtain the second verification information corresponding to the digital signature, wherein the second verification information includes a hash value of a second root public key and a secure boot policy that is used to indicate using the second verification information to perform integrity verification on the second driver, the second root public key corresponding to the second root private key; store the second data and the second verification information, wherein the second verification information is stored in a second storage area of the electronic device and the second data is stored on the electronic device, wherein both the first storage area and the second storage area are one-time writing storage areas; obtain to-be-verified data that includes the second driver; and in response to failing to perform integrity verification on the to-be-verified by the first verification information based on no digital signature being performed for the second driver: execute and load the second driver in response to performing the integrity verification on the to-be-verified data based on the secure boot policy of the second verification information.
- Claim 16Depends on #15
The apparatus according to claim 15, wherein the second verification information comprises at least one of the following provided by the third-party integrator: a root of trust, and the secure boot policy is used to indicate a rule for performing integrity verification on the to-be-verified data.
- Claim 17Depends on #15
The apparatus according to claim 15, wherein the processor is further configured to execute instructions to: before performing integrity verification on the to-be-verified data based on at least one of the first verification information and the second verification information, determine that the second storage area is in a write-protected state.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Application No. PCT/CN2021/098744, filed on Jun. 7, 2021, which claims priority to Chinese Patent Application No. 202010518090.9, filed on Jun. 9, 2020. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD Embodiments of this application relate to the computing field, and in particular, to a data integrity protection method and a data integrity protection apparatus. BACKGROUND Firmware, software, and the like stored in a device may be attacked, and consequently may be tampered with or implanted with Trojan horses. This endangers device running security. To protect data such as firmware and software in a device, a trusted computing system usually uses a digital signature verification method. Generally, when a device is powered on and started, firmware or software is started level by level starting from a system trusted root. Before starting lower-level firmware or software, integrity verification is performed on the firmware or software, and the firmware or software is started only after the integrity verification is successful. With the development of communications technologies and refined division of labor, a co-construction system involving multiple vendors becomes more and more popular. After devices are delivered, third-party integrators may need to customize firmware or software to adapt to service requirements. Currently, the firmware or software customized by a third-party integrator cannot be reloaded to a system for running after delivery. The device needs to be returned to the original manufacturer for re-signing before loading. The process is complex, and device integration development efficiency is low. SUMMARY Embodiments of this application provide a data integrity protection method and a data integrity protection apparatus, to support reloading of firmware or software, customized by a thir
Cited By — Indexed Forward Citations (1 of 1 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 12,651,068 B2 | Method and apparatus for updating firmware | 2026 | 0 |
References Cited — Backward Prior Art (18)
| Patent | Title | Year | Citations |
|---|