Content file tamper-proofing method, device, storage medium, program product, and apparatus
By integrating a trusted platform control module into the content delivery network server, a trust chain is established and integrity verification is performed, which solves the problems of insufficient security and high operation and maintenance costs in the content delivery network, and realizes the trusted operation of content files and cost optimization.
Patent Information
- Application Number
- CN202411078876.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Existing technologies in content delivery networks suffer from insufficient security and high maintenance costs. Attackers can tamper with dialing or encryption systems, and additional server maintenance is required.
By integrating a trusted platform control module into the content delivery network server, a trust chain is established from the physical layer to the application layer. The expected metric values of the content files are obtained and stored, and integrity verification is performed to ensure a trusted operating environment for the files.
It improves the security of content files, reduces operation and maintenance costs, and eliminates the need for additional third-party security testing servers.
Smart Images

Figure CN119051912B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of trusted computing, in particular to a content file tamper-proofing method and device, computer readable storage medium, computer program product and electronic equipment. BACKGROUND
[0002] With the large-scale application of operator content network, users can browse short videos, TV series, movies and the like more quickly, but the security of content distribution poses a huge challenge to operators. In order to ensure the consistency of files obtained from a source station and received by users, operators currently mainly use two ways to prevent content tampering. The first way is a dialing test method, which externally hangs a dialing test system on a content delivery network (CDN) server, and tests in real time whether large files and small files in the CDN server match the source station, and if not, an alarm is triggered. The second way is an encryption method, which externally hangs an encryption system on the CDN server, and MD5 encrypts large files and small files obtained from the content source, and compares the MD5 values during content distribution, and if the MD5 values are consistent, the distribution continues, and if not, the distribution stops.
[0003] However, the above existing technology still has the following obvious defects:
[0004] (1) Insufficient security: the existing technology relies on third-party software implementation, once the server is broken and the master authority is obtained, the attacker can completely control the dialing test or encryption system, resulting in no alarm triggering or matching results being tampered with.
[0005] (2) Increase additional maintenance costs: since the existing technology needs to configure additional dialing test and encryption servers outside the CDN server, the operation and maintenance personnel need to continuously maintain and monitor the additional servers, which increases the operation and maintenance cost. SUMMARY
[0006] The purpose of the embodiments of the present application is to provide a content file tamper-proofing method, device, computer readable storage medium, computer program product and electronic equipment, which can significantly improve the security of content files in the content distribution server and reduce the operation and maintenance cost of the content distribution network.
[0007] The first aspect of the present application provides a content file tamper-proofing method, which is executed by a content distribution network server configured with a trusted platform control module, and the method comprises:
[0008] establishing a trust chain from a trusted root of a physical layer to a system service of an application layer; wherein the trust chain is used to provide a trusted running environment for the content distribution network server;
[0009] In the trusted operating environment, expected metric values of each content file injected into the content distribution network server are obtained from a source station, and all the expected metric values are stored in the trusted platform control module, so that the content distribution network server can read each expected metric value to check the integrity of the corresponding content file.
[0010] Optionally, the method further comprises:
[0011] checking the integrity of each injected content file based on the corresponding expected metric value of each content file;
[0012] If the integrity check is successful, the corresponding content file is added to the content file set.
[0013] Optionally, the method further comprises:
[0014] Upon receiving a resource scheduling request, a content file to be scheduled is obtained from the content file set, and an expected metric value of the content file to be scheduled is read from the trusted platform control module;
[0015] checking the integrity of the content file to be scheduled based on the expected metric value of the content file to be scheduled.
[0016] Optionally, the method further comprises:
[0017] Based on a preset time period, a specific content file is obtained from the content file set, and an expected metric value of the specific content file is read from the trusted platform control module;
[0018] checking the integrity of the specific content file based on the expected metric value of the specific content file.
[0019] Further, the establishment of the trust chain from the trusted root of the physical layer to the system service of the application layer comprises:
[0020] starting the trusted platform control module, and sequentially performing active measurement on components involved in the system startup process by the trusted platform control module; wherein the components include: basic input / output system, operating system loader, operating system kernel and system service; the active measurement is used to transmit the trust range from the trusted platform control module of the physical layer to the system service of the application layer.
[0021] Further, the checking of the integrity of each injected content file based on the corresponding expected metric value of each content file comprises:
[0022] performing metric calculation on each injected content file to obtain a corresponding first integrity metric value;
[0023] determining whether the expected metric value of each of the injected content files is equal to the corresponding first integrity metric value;
[0024] If equal, the integrity check of the corresponding content file is successful.
[0025] If not equal, the integrity check of the corresponding content file fails.
[0026] Further, the integrity check of the to-be-scheduled content file based on the expected metric value of the to-be-scheduled content file comprises:
[0027] performing metric calculation on the to-be-scheduled content file to obtain a second integrity metric value;
[0028] determining whether the expected metric value of the to-be-scheduled content file is equal to the second integrity metric value;
[0029] If equal, the integrity check of the to-be-scheduled content file is successful, and the to-be-scheduled content file is forwarded.
[0030] If not equal, the integrity check of the to-be-scheduled content file fails.
[0031] Further, the integrity check of the specific content file based on the expected metric value of the specific content file comprises:
[0032] performing metric calculation on the specific content file to obtain a third integrity metric value;
[0033] determining whether the expected metric value of the specific content file is equal to the third integrity metric value;
[0034] If equal, the integrity check of the specific content file is successful.
[0035] If not equal, the integrity check of the specific content file fails.
[0036] Further, in the case of integrity check failure, the content file corresponding to the integrity check failure and the corresponding expected metric value are deleted, and the content distribution network server initiates a new content injection request to the source station.
[0037] The second aspect embodiment of the present application provides a content file tamper-proofing device for implementing the content file tamper-proofing method of the first aspect, and the device comprises:
[0038] a trust chain establishing module, configured to establish a trust chain from a trusted root of a physical layer to a system service of an application layer; wherein the trust chain is configured to provide a trusted running environment for the content distribution network server;
[0039] an expected metric value obtaining module, configured to obtain, in the trusted running environment, expected metric values of each content file injected into the content distribution network server from a source station, and store all the expected metric values into the trusted platform control module, so that the content distribution network server can read each of the expected metric values to perform integrity check on the corresponding content file.
[0040] The third aspect of the present application provides a computer readable storage medium, which comprises a stored computer program; wherein the computer program, when executed, controls a device where the computer readable storage medium is located to perform the content file tamper-proofing method of any one of the first aspect.
[0041] The fourth aspect of the present application provides a computer program product comprising a computer program, which, when executed by a processor, implements the content file tamper-proofing method of any one of the first aspect.
[0042] The fifth aspect of the present application also provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the content file tamper-proofing method of any one of the first aspect.
[0043] Compared with the prior art, the embodiments of the present application provide a content file tamper-proofing method, device, computer readable storage medium, computer program product and electronic device, the method is executed by a content distribution network server configured with a trusted platform control module, comprising: establishing a trust chain from a trusted root of a physical layer to a system service of an application layer; wherein the trust chain is used to provide a trusted running environment for the content distribution network server; in the trusted running environment, obtaining expected metric values of each content file injected into the content distribution network server from a source station, and storing all the expected metric values into the trusted platform control module, so that the content distribution network server can read each of the expected metric values to perform integrity check on the corresponding content file.
[0044] The content distribution network server in the embodiment of the present application has hardware-level protection measures, that is, realized by a trusted platform control module integrated in the content distribution network server. The trusted platform control module only allows access when the system is in a predefined trusted state, so even if an attacker obtains the master authority of the content distribution network server, the attacker cannot directly access or modify the expected measurement value in the trusted platform control module, which ensures the accuracy and reliability of the result when the content file is subsequently subjected to integrity verification. Based on this, the present application can significantly improve the security of the content file in the content distribution network server; and since a third-party security detection server does not need to be configured, the present application can also effectively reduce the operation and maintenance cost. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 is a flowchart of one embodiment of the content file tamper-proofing method provided by the present application;
[0046] Figure 2 is a flowchart of one embodiment of the tamper-proofing verification on the injected content file in the content file tamper-proofing method provided by the present application;
[0047] Figure 3 is a flowchart of one embodiment of the tamper-proofing verification on the content file to be dispatched in the content file tamper-proofing method provided by the present application;
[0048] Figure 4 is a flowchart of one embodiment of the tamper-proofing verification on the specific content file in the content file tamper-proofing method provided by the present application;
[0049] Figure 5 is a structural diagram of one embodiment of the content file tamper-proofing device provided by the present application;
[0050] Figure 6 is a structural diagram of one embodiment of the electronic device provided by the present application. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0052] In order to clearly describe the technical solutions in the embodiments of the present application, refer to Table 1, which is a brief explanation of some terms and concepts involved in the embodiments of the present application.
[0053] Table 1 Explanation of Term Concepts
[0054] Chinese expression Complete English expression English abbreviation Content Delivery Network Content Delivery Network CDN Trusted Platform Control Module Trusted Platform Control Module TPCM Trusted Secure Boot Trusted Secure Boot TSB Platform Configuration Register Platform Configuration Register PCR Basic Input Output System Basic Input Output System BIOS Operating System Loader Operating System Loader OSLoader Operating System Kernel Operating System Kernel OSKernel DNS Forwarding DNS Forwarding DNS forward Canonical Name Record Canonical Name Record CNAME
[0055] Referring to Figure 1 is a flowchart of an embodiment of the content file tamper-proofing method provided by the present application.
[0056] The first aspect embodiment of the present application provides a content file tamper-proofing method, which is executed by a content distribution network server configured with a trusted platform control module, and comprises steps S11-S12, which are specifically as follows:
[0057] Step S11: establishing a trust chain from a trusted root of a physical layer to a system service of an application layer; wherein the trust chain is used to provide a trusted running environment for the content distribution network server;
[0058] Step S12: in the trusted running environment, obtaining an expected measurement value of each content file injected into the content distribution network server from a source station, and storing all the expected measurement values into the trusted platform control module, so that the content distribution network server can read each expected measurement value to perform integrity verification on the corresponding content file.
[0059] It should be noted that the CDN server in the embodiment of the present application is a trusted computing server, which is integrated with physical hardware, embedded systems, external interfaces and other components of TPCM; wherein the TPCM realizes the transmission and expansion of trust through step-by-step measurement / verification, forms a complete trust chain (i.e. extends from the trusted root of the physical layer to the system service of the application layer), thereby ensuring that the CDN server is in a trusted running environment and preventing it from being tampered with by malicious software. In addition, the TPCM also provides hardware-level key storage and encryption operations, further enhancing the security of data.
[0060] Specifically, when the content of the source station is created or updated, a new content file is formed. At this time, the source station performs measurement calculation on the content file to generate an expected measurement value. When the CDN server is in a trusted running environment, the content network transmits the new content file and its attached expected measurement value from the source station to the CDN server through a content injection mechanism (such as DNS forward, CNAME, cache, etc.). After receiving the content file and the expected measurement value, the CDN server stores the expected measurement value in its TPCM and records the current storage / injection time as T0. In other words, for each content file injected into the CDN server, the CDN server will store the corresponding expected measurement value in the TPCM to enable subsequent direct reading / calling of the expected measurement value in the TPCM to perform integrity verification on the injected content file.
[0061] It is worth mentioning that the CDN server in the embodiment of the present application has a hardware level protection measure, that is, the TPCM hardware security module integrated in the CDN server is used to realize the protection measure. The TPCM only allows access when the system is in a predefined trusted state, even if an attacker obtains the master authority of the CDN server, the attacker cannot directly access or modify the expected measurement value in the TPCM hardware module, which ensures the accuracy and credibility of the result when the CDN server performs the integrity check on the content file subsequently. Based on this, the embodiment of the present application can significantly improve the security of the content file in the CDN server; and since a third-party security detection server does not need to be configured, the present application can also effectively reduce the operation and maintenance cost.
[0062] Further, the step S11 of establishing the trust chain from the trusted root of the physical layer to the system service of the application layer comprises:
[0063] The trusted platform control module is started, and the components involved in the system starting process are sequentially actively measured by the trusted platform control module; wherein the components include a basic input output system, an operating system loader, an operating system kernel and a system service; the active measurement is used to transmit the trust range from the trusted platform control module of the physical layer to the system service of the application layer.
[0064] The embodiment of the present application starts the trusted measurement from the moment when the CDN server is started, and uses the TPCM as the trusted root of the trust chain, realizes the transmission and expansion of the trust through one level of measurement, one level of trust, and so on, until the system service of the application layer, so that it is ensured that each step from the starting to the running of the CDN server is safe, and it is ensured that the CDN server enters a trusted running environment after starting.
[0065] In the embodiment, the TPCM starts before the CPU of the computing subsystem; when the TPCM operating system and the TSB are loaded, the initial environment verification measurement actively measures the BIOS and basic configuration information, and if the measurement result is trusted, the BIOS starts; before the OSLoader is executed, the TPCM operating system initiates the verification measurement to actively measure the OSLoader, and if the measurement result is trusted, the OSLoader starts; before the OSKernel is executed, the kernel verification measurement actively measures the OSKernel, and if the measurement result is trusted, the OSKernel starts; before the system service is executed, the system verification measurement actively measures the system service, and if the measurement result is trusted, the system service starts, otherwise, the system service is determined to be untrusted and is not released. The measurement result of each stage in the startup process of the CDN server is represented by a startup measurement value PCR1, that is, PCR1={1} represents that the current startup stage is safe; similarly, PCR1={0} represents that the current startup stage is unsafe, and if tampering is detected at any stage, PCR1={0}, and the CDN server will abort the startup process.
[0066] Referring to Figure 2 FIG. 1 is a flowchart of an embodiment of the content file anti-tampering method provided by the present application.
[0067] In an optional embodiment, the method further comprises:
[0068] Step S21: integrity check of each of the injected content files based on the expected measurement value corresponding to each of the content files;
[0069] Step S22: if the integrity check is successful, the corresponding content file is added to the content file set.
[0070] Specifically, step S21: the integrity check of each of the injected content files based on the expected measurement value corresponding to each of the content files comprises:
[0071] measuring each of the injected content files to obtain a corresponding first integrity measurement value;
[0072] determining whether the expected measurement value of each of the injected content files is equal to the corresponding first integrity measurement value;
[0073] if yes, the integrity check of the corresponding content file is successful;
[0074] if no, the integrity check of the corresponding content file fails.
[0075] It should be noted that, in the trusted running environment, the content network pre-injects the content files in the source station into the CDN server through a content injection mechanism (such as DNS forward, CNAME, cache, etc.) before the terminal initiates access. This enables the CDN server to directly provide services when the terminal accesses, without the need to obtain content from the source station each time, thereby significantly reducing the back-to-source traffic and improving the experience of the terminal user. For example, the content network will pre-store popular web pages, video content files generated by the source station on the CDN server close to the user, and when the user accesses, the content can be obtained from the nearest server, without having to obtain it from the source station each time.
[0076] To ensure that each injected content file is consistent with the original content file provided by the source station, the embodiment of the application first performs a cryptographic operation (metric calculation) on the injected content file to generate a first integrity metric value I1, and records the current metric time T1, which is represented by a storage trusted metric value PCR2. Specifically, PCR2={ID1 number, storage location Z1, first integrity metric value I1, metric time T1}; wherein ID1 number is a unique number of the storage trusted metric (the unique number of the metric calculation operation on the injected content file stored in the location Z1 at the time T1), the storage location Z1 is the physical location identifier of the content file, and the metric time T1 is the timestamp of the metric calculation. Then, the expected metric value (the timestamp of the initial storage in the TPCM is T0) of the injected content file in the TPCM is called to perform integrity verification, that is, to determine whether the first integrity metric value I1 at the time T1 is consistent with the expected metric value of the content file at the time T0; if consistent, it indicates that the integrity verification of the content file is successful (not tampered with), and it is added to the content file set of the CDN server; if the integrity verification fails, a deletion instruction is initiated to delete the content file stored in the location Z1 and the corresponding expected metric value, and a new content injection request is initiated from the CDN server to the source station.
[0077] Referring to Figure 3 , is a flowchart of an embodiment of the content file tamper-proofing method provided by the application.
[0078] In an optional embodiment, the method further comprises:
[0079] Step S31: In the case of receiving a resource scheduling request, obtaining a content file to be scheduled from the content file set, and reading an expected metric value of the content file to be scheduled from the trusted platform control module;
[0080] Step S32: Based on the expected metric value of the content file to be scheduled, performing integrity verification on the content file to be scheduled.
[0081] Specifically, the step S32: performing integrity check on the to-be-scheduled content file based on the expected metric value of the to-be-scheduled content file, comprises:
[0082] performing metric calculation on the to-be-scheduled content file to obtain a second integrity metric value;
[0083] judging whether the expected metric value of the to-be-scheduled content file is equal to the second integrity metric value;
[0084] if yes, the integrity check of the to-be-scheduled content file is successful, and the to-be-scheduled content file is forwarded;
[0085] if no, the integrity check of the to-be-scheduled content file fails.
[0086] In a specific implementation, when receiving a resource scheduling request, the CDN server obtains a to-be-scheduled content file from the content file set, performs metric calculation on the content file to generate a second integrity metric value I2, and records a current metric time T2, and uses a forwarding trusted metric value PCR3 to represent. Specifically, PCR3={forwarding ID No. 2, storage location Z2, first integrity metric value I2, metric time T2}; wherein the forwarding ID No. 2 is a unique number of metric this time forwarding (a unique number of metric calculation operation on the to-be-scheduled content file stored in the location Z2 at the time T2). The expected metric value of the to-be-scheduled content file in the TPCM (the time stamp initially stored in the TPCM is T0) is read, and the integrity check on the content file is performed, that is, whether the second integrity metric value I2 at the time T2 is consistent with the expected metric value of the to-be-scheduled content file at the time T0 is judged; if yes, it indicates that the integrity check of the to-be-scheduled content file is successful (not tampered), and the to-be-scheduled content file can be forwarded; if the integrity check fails, a deletion instruction is initiated, the content file stored in the location Z2 and the corresponding expected metric value are deleted, and a new content injection request is initiated by the CDN server to the source station.
[0087] Referring to Figure 4 is a flowchart of an embodiment of the content file tamper-proofing method provided by the application.
[0088] In an optional embodiment, the method further comprises:
[0089] Step S41: obtaining a specific content file from the content file set based on a preset time period, and reading an expected metric value of the specific content file from the trusted platform control module;
[0090] Step S42: integrity check of the specific content file based on the expected metric value of the specific content file.
[0091] Specifically, the integrity check of the specific content file based on the expected metric value of the specific content file in step S42 comprises:
[0092] metric calculation of the specific content file to obtain a third integrity metric value;
[0093] judgment of whether the expected metric value of the specific content file is equal to the third integrity metric value;
[0094] if yes, the integrity check of the specific content file is successful;
[0095] if no, the integrity check of the specific content file fails.
[0096] In order to discover potential security threats in time, the embodiment of the present application verifies the integrity of a specific content file in the content file set periodically, first performs metric calculation of the specific content file at a periodic T n moment to generate a third integrity metric value I3, and records the current metric moment T n with a dynamic trusted metric value PCR4. Specifically, PCR4={dynamic ID3 number, storage location Z3, file integrity metric value I3, metric moment T n}; wherein the dynamic ID3 number is a unique number of the metric calculation of the current dynamic trusted (the unique number of the metric calculation operation of the specific content file stored in the location Z3 at T n moment). The expected metric value of the specific content file corresponding to the TPCM (the time stamp initially stored in the TPCM is T0) is read, and the integrity check of the content file is performed, i.e. judgment of whether the third integrity metric value I3 at T n moment is consistent with the expected metric value of the specific content file at T0 moment; if yes, it indicates that the integrity check of the specific content file is successful (not tampered); if the integrity check fails, a deletion instruction is initiated to delete the specific content file stored in the location Z3 and the corresponding expected metric value, and a new content injection request is initiated by the CDN server to the source station.
[0097] In an optional embodiment, in the case of integrity check failure, the content file corresponding to the integrity check failure and the corresponding expected metric value are deleted, and the content distribution network server initiates a new content injection request to the source station.
[0098] It is worth mentioning that if a content file fails in integrity check, the CDN server only updates the changed content file instead of the whole set of content files, which can effectively reduce the use of broadband.
[0099] To sum up, the content file tamper-proofing method provided by the embodiment of the present application starts from a trusted root established by the TPCM, extends to the trust chain of system services, and provides a trusted running environment for the CDN server. The embodiment of the present application can comprehensively detect unauthorized changes, and can continuously monitor and verify the integrity of files during the startup of the CDN server, storage, forwarding or normal operation, thereby significantly improving the tamper-proofing capability of the CDN server and the security of the content files. In addition, the embodiment of the present application can realize file tamper-proofing protection without relying on a third-party security detection server, thereby effectively reducing the operation and maintenance cost.
[0100] In the prior art, content networks are usually provided with devices by multiple device manufacturers, and devices of different device manufacturers may use different protocols and data formats. If the stress test or encryption function is to be realized among multiple devices, a compatible interface needs to be developed among the devices, and a large amount of complex work is required every time a new function is developed or the system is upgraded, to ensure that the devices provided by all device manufacturers can work normally. However, the CDN server in the embodiment of the present application integrates the TPCM, can directly use a standardized trusted computing interface, and improves the compatibility among different devices, thereby eliminating the need to consider the interface calling problem among different content platforms.
[0101] Referring to Figure 5 is a structural schematic diagram of an embodiment of the content file tamper-proofing device provided by the present application.
[0102] The second aspect embodiment of the present application provides a content file tamper-proofing device for realizing the content file tamper-proofing method of the first aspect embodiment described above, and the device specifically comprises:
[0103] The trust chain establishment module 11 is configured to establish a trust chain from a trusted root of a physical layer to system services of an application layer, and the trust chain is configured to provide a trusted running environment for the content distribution network server.
[0104] The expected measurement value acquisition module 12 is configured to acquire, in the trusted running environment, an expected measurement value of each content file injected into the content distribution network server from a source station, and store all the expected measurement values in the trusted platform control module, so that the content distribution network server can read each expected measurement value to perform integrity check on the corresponding content file.
[0105] Optionally, the device further comprises:
[0106] The injected content file verification module is configured to verify the integrity of each of the injected content files based on the expected measurement value corresponding to each of the content files.
[0107] The content file set updating module is configured to add the corresponding content file to the content file set if the integrity verification is successful.
[0108] Optionally, the apparatus further comprises:
[0109] The content file to be scheduled obtaining module is configured to obtain a content file to be scheduled from the content file set and read the expected measurement value of the content file to be scheduled from the trusted platform control module upon receiving a resource scheduling request.
[0110] The content file to be scheduled verification module is configured to verify the integrity of the content file to be scheduled based on the expected measurement value of the content file to be scheduled.
[0111] Optionally, the apparatus further comprises:
[0112] The specific content file obtaining module is configured to obtain a specific content file from the content file set and read the expected measurement value of the specific content file from the trusted platform control module based on a preset time period.
[0113] The specific content file verification module is configured to verify the integrity of the specific content file based on the expected measurement value of the specific content file.
[0114] Further, the trust chain establishing module 11 comprises:
[0115] The measurement starting unit is configured to start the trusted platform control module and perform active measurement on components involved in the system starting process in sequence by the trusted platform control module, wherein the components include a basic input / output system, an operating system loader, an operating system kernel and a system service, and the active measurement is configured to transmit the trust range from the trusted platform control module at the physical layer to the system service at the application layer.
[0116] Further, the injected content file verification module comprises:
[0117] The first measurement calculating unit is configured to perform measurement calculation on each of the injected content files to obtain a corresponding first integrity measurement value.
[0118] The first consistency judging unit is configured to judge whether the expected measurement value of each of the injected content files is equal to the corresponding first integrity measurement value.
[0119] The first unit for checking success is used for checking the integrity of the corresponding content file successfully if the two are equal.
[0120] The first unit for checking failure is used for checking the integrity of the corresponding content file unsuccessfully if the two are not equal.
[0121] Further, the content file to be scheduled checking module comprises:
[0122] The second unit for calculating metric is used for calculating the metric of the content file to be scheduled, and obtaining a second integrity metric value;
[0123] The second unit for judging consistency is used for judging whether the expected metric value of the content file to be scheduled is equal to the second integrity metric value;
[0124] The second unit for checking success is used for checking the integrity of the content file to be scheduled successfully if the two are equal, and forwarding the content file to be scheduled;
[0125] The second unit for checking failure is used for checking the integrity of the content file to be scheduled unsuccessfully if the two are not equal.
[0126] Further, the specific content file checking module comprises:
[0127] The third unit for calculating metric is used for calculating the metric of the specific content file, and obtaining a third integrity metric value;
[0128] The third unit for judging consistency is used for judging whether the expected metric value of the specific content file is equal to the third integrity metric value;
[0129] The third unit for checking success is used for checking the integrity of the specific content file successfully if the two are equal.
[0130] The third unit for checking failure is used for checking the integrity of the specific content file unsuccessfully if the two are not equal.
[0131] Further, in the case of integrity checking failure, the content file corresponding to the integrity checking failure and the corresponding expected metric value are deleted, and the content distribution network server initiates a new content injection request to the source station.
[0132] It should be noted that the content file tamper-proofing device provided by the second aspect of the present application can realize all the processes of the content file tamper-proofing method of the first aspect of the present application, and the functions and technical effects of each module in the device are the same as those of the content file tamper-proofing method of the first aspect of the present application, which will not be repeated here.
[0133] The third aspect of the present application provides a computer readable storage medium, which comprises a stored computer program; wherein the computer program, when executed, controls a device where the computer readable storage medium is located to perform the content file tamper-proofing method of any of the embodiments of the first aspect.
[0134] The fourth aspect of the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the content file tamper-proofing method of any of the embodiments of the first aspect.
[0135] Referring to Figure 6 is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0136] The fifth aspect of the present application further provides an electronic device, comprising a processor 21, a memory 22, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the content file tamper-proofing method of any of the embodiments of the first aspect.
[0137] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, …), which are stored in the memory 22 and executed by the processor 21 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device.
[0138] The processor 21 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 21 can also be any conventional processor. The processor 21 is the control center of the electronic device, and connects various parts of the electronic device through various interfaces and lines.
[0139] The memory 22 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, and the like, and the data storage area can store relevant data and the like. In addition, the memory 22 can be a high-speed random access memory, and can also be a non-volatile memory such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like, or the memory 22 can also be another volatile solid-state storage device.
[0140] It should be noted that the above electronic device can include, but is not limited to, a processor, a memory, and the like, and those skilled in the art can understand that Figure 5 The structural schematic diagram shown is only an example of the structure of the above electronic device, and does not constitute a limitation on the structure of the above electronic device. The above electronic device can include more or fewer components than those shown, or combine certain components, or different components.
[0141] The above is only a preferred embodiment of the present application, and it should be noted that those skilled in the art can make several improvements and modifications without departing from the technical principles of the present application, and these improvements and modifications should also be considered within the protection scope of the present application.
Claims
1. A content file tamper-proofing method characterized by comprising: The method is executed by a content distribution network server configured with a trusted platform control module, and comprises the following steps of: establishing a trust chain from a trusted root of a physical layer to a system service of an application layer, wherein the trust chain is used to provide a trusted running environment for the content distribution network server; in the trusted running environment, obtaining an expected measurement value of each content file injected into the content distribution network server from a source station, and storing all the expected measurement values into the trusted platform control module, so that the content distribution network server can read each expected measurement value to perform integrity check on the corresponding content file.
2. The content file tamper-proofing method of claim 1, wherein The method further comprises the following steps of: performing integrity check on each injected content file based on the corresponding expected measurement value of each content file; if the integrity check is successful, adding the corresponding content file into a content file set.
3. The content file tamper-proofing method of claim 2, wherein The method further comprises the following steps of: in the case of receiving a resource scheduling request, obtaining a to-be-scheduled content file from the content file set, and reading an expected measurement value of the to-be-scheduled content file from the trusted platform control module; performing integrity check on the to-be-scheduled content file based on the expected measurement value of the to-be-scheduled content file.
4. The content file tamper-proofing method of claim 2, wherein The method further comprises the following steps of: obtaining a specific content file from the content file set based on a preset time period, and reading an expected measurement value of the specific content file from the trusted platform control module; performing integrity check on the specific content file based on the expected measurement value of the specific content file.
5. The content file tamper-proofing method of claim 1, wherein, The step of establishing a trust chain from a trusted root of a physical layer to a system service of an application layer comprises the following steps of: starting the trusted platform control module, and performing active measurement on components involved in a system starting process by the trusted platform control module in sequence, wherein the components include a basic input and output system, an operating system loader, an operating system kernel and a system service; and the active measurement is used to transmit a trust range from the trusted platform control module of the physical layer to the system service of the application layer.
6. The content file tamper-proofing method of claim 2, wherein, The step of performing integrity check on each injected content file based on the corresponding expected measurement value of each content file comprises the following steps of: performing measurement calculation on each injected content file to obtain a corresponding first integrity measurement value; judging whether the expected measurement value of each injected content file is equal to the corresponding first integrity measurement value; if yes, the integrity check of the corresponding content file is successful; if no, the integrity check of the corresponding content file fails.
7. The content file tamper-proofing method of claim 3, wherein The step of performing integrity check on the to-be-scheduled content file based on the expected measurement value of the to-be-scheduled content file comprises the following steps of: performing measurement calculation on the to-be-scheduled content file to obtain a second integrity measurement value; judging whether the expected measurement value of the to-be-scheduled content file is equal to the second integrity measurement value; if yes, the integrity check of the to-be-scheduled content file is successful, and the to-be-scheduled content file is forwarded; if no, the integrity check of the to-be-scheduled content file fails.
8. The content file tamper-proofing method of claim 4, wherein, The step of performing integrity check on the specific content file based on the expected measurement value of the specific content file comprises the following steps of: calculating a metric of the specific content file to obtain a third integrity metric value; judging whether the expected metric value of the specific content file is equal to the third integrity metric value; if yes, the integrity check of the specific content file is successful; if no, the integrity check of the specific content file is failed.
9. The content file tamper-proofing method according to any one of claims 6 to 8, wherein, In the case of integrity check failure, the content file corresponding to the integrity check failure and the corresponding expected metric value are deleted, and the content distribution network server initiates a new content injection request to the source station.
10. A content file tamper-proofing apparatus characterized by comprising: The method comprises: a trust chain establishing module, configured to establish a trust chain from a trusted root at a physical layer to a system service at an application layer, wherein the trust chain is configured to provide a trusted running environment for a content distribution network server; an expected metric value obtaining module, configured to obtain, in the trusted running environment, an expected metric value of each content file injected into the content distribution network server from a source station, and store all the expected metric values in a trusted platform control module, so that the content distribution network server can read each of the expected metric values to perform integrity check on the corresponding content file.
11. A computer readable storage medium, characterized in that, The computer readable storage medium comprises a stored computer program; wherein the computer program, when executed, controls a device in which the computer readable storage medium is located to perform the content file tamper-proofing method according to any one of claims 1-9.
12. A computer program product, characterised in that, The computer program, when executed by a processor, implements the content file tamper-proofing method according to any one of claims 1-9.
13. An electronic device, comprising: The device comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the content file tamper-proofing method according to any one of claims 1-9.
Citation Information
Patent Citations
Trust chain transfer method for trusted computing platform
CN102332070A
File verification method and device
CN110889143A