US20210124820A1 - Application program integrity verification method and network device - Google Patents
Application program integrity verification method and network device Download PDFInfo
- Publication number
- US20210124820A1 US20210124820A1 US17/090,588 US202017090588A US2021124820A1 US 20210124820 A1 US20210124820 A1 US 20210124820A1 US 202017090588 A US202017090588 A US 202017090588A US 2021124820 A1 US2021124820 A1 US 2021124820A1
- Authority
- US
- United States
- Prior art keywords
- application program
- digest
- data
- digital signature
- key pair
- 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.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/51—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/562—Static detection
- G06F21/565—Static detection by checking file integrity
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1408—Protection against unauthorised use of memory or access to memory by using cryptography
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
- H04L63/061—Network architectures or network communication protocols for network security for supporting key management in a packet data network for key exchange, e.g. in peer-to-peer networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3234—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving additional secure or trusted devices, e.g. TPM, smartcard, USB or software token
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1052—Security improvement
Definitions
- Embodiments of the present disclosure relate to an application program integrity verification method and a network device.
- a security central processing unit (CPU) and a trusted platform module (TPM) chip may be disposed in a network device.
- CPU central processing unit
- TPM trusted platform module
- the security CPU in the network device performs hash calculation on the data of the application program to obtain a second hash digest of the application program, obtains the digital signature of the application program from the TPM chip of the network device, and decrypts the obtained digital signature by using an embedded manufacturer public key, to obtain the first hash digest of the application program.
- the first hash digest is compared with the second hash digest. If the two are the same, it is determined that the application program is not tampered with, and integrity verification of the application program passes; otherwise, it is determined that the application program is tampered with, and integrity verification of the application program does not pass.
- patching needs to be performed on the application program.
- Patches are generally distributed on multiple data fragments of the application program, and the stored digital signature in the TPM chip of the network device is obtained by means of signing when the application program is published, that is, the stored digital signature in the TPM chip is obtained based on original data of the application program. Therefore, data obtained after patching is performed on the application program is different from the original data, and integrity verification cannot be performed, based on the digital signature of the original data, on the application program obtained after patching is performed.
- Embodiments of the present disclosure provide an application program integrity verification method and a network device.
- an application program integrity verification method includes:
- the method before the performing characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program, the method further includes:
- the performing characteristic value calculation on the data of the application program to obtain the second digest of the application program includes:
- the storing the digital signature of the application program includes:
- the method before the decrypting a stored digital signature of the application program according to a public key in an embedded key pair to obtain the second digest of the application program, the method further includes:
- a network device includes:
- a first calculation module configured to perform characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program
- a decryption module configured to decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is a manufacturer key pair corresponding to the application program;
- a determining module configured to determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the network device further includes:
- a second calculation module configured to perform characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program
- a signature module configured to sign the second digest according to the private key to obtain the digital signature of the application program
- a storage module configured to store the digital signature of the application program.
- the second calculation module includes:
- a read-in unit configured to read the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU;
- a reading unit configured to read the data in the SRAM by using a security engine inside the security CPU;
- a calculation unit configured to perform characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- the storage module includes:
- a storage unit configured to store the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU.
- the network device further includes:
- an obtaining module configured to obtain the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU.
- each time an application program in a network device is updated data of the application program is updated.
- the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program.
- Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- FIG. 1 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure
- FIG. 2 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure
- FIG. 3 is a schematic diagram of an internal structure of a security CPU according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
- FIG. 5 is a schematic structural diagram of another network device according to an embodiment of the present disclosure.
- a villain may tamper with an application program in a network device to steal user private information such as an account number and a password, which poses a threat to property safety of a user. Therefore, each time the application program starts, the network device needs to perform integrity verification on the application program, so as to determine whether the application program is tampered with. However, as time goes by, a vulnerability may exist in the application program of the network device. In this case, patching needs to be performed on the application program in the network device.
- Patches are generally distributed on multiple data fragments of the application program; consequently, integrity verification cannot be performed, according to a method for separately performing integrity verification on the application program and on the patches, on the application program obtained after patching is performed.
- a stored digital signature in a trusted platform module (TPM) chip of the network device is obtained based on original data of the application program, and data of the application program obtained after patching is performed is different from the original data. Therefore, integrity verification cannot be performed, based on the digital signature of the original data, on the application program obtained after patching is performed.
- the embodiments of the present disclosure provide a method for application program integrity verification, in which the network device may still perform integrity verification on the application program after patching is performed on the application program.
- FIG. 1 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure. The method is executed by a network device, and a manufacturer key pair corresponding to an application program is stored in a trusted location of the network device. Referring to FIG. 1 , the method includes the following steps.
- S 101 Perform characteristic value calculation on data of the application program when the application program starts, to obtain a first digest of the application program.
- the characteristic value calculation may be hash calculation.
- the characteristic value calculation may alternatively be another calculation method, which is not specifically limited in the embodiment of the present disclosure.
- an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- S 102 Decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is the manufacturer key pair corresponding to the application program.
- S 103 Determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- each time an application program in a network device is updated data of the application program is updated.
- the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program.
- Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- the method before the performing characteristic value calculation on data of the application program when the application program starts, to obtain a first digest of the application program, the method further includes:
- the performing characteristic value calculation on the data of the application program to obtain the second digest of the application program includes:
- the storing the digital signature of the application program includes:
- NVRAM non-volatile random access memory
- the method before the decrypting a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, the method further includes:
- FIG. 2 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure.
- the method may be executed by a network device, and a manufacturer key pair corresponding to an application program is stored in a trusted location of the network device.
- the method includes the following steps.
- S 201 Perform characteristic value calculation on data of the application program when an update completion instruction is received, to obtain a second digest of the application program.
- the network device needs to perform patching on the application program, or a manufacturer upgrades the application program, and the network device needs to upgrade the application program.
- the network device receives an update completion instruction.
- the update completion instruction may be obtained by means of triggering by the network device, or may be obtained by means of triggering by the network device when the network device receives a completion response from a server, where the server is a device storing the application program.
- the data of the application program in the network device change. In this case, the second digest of the application program needs to be recalculated, and then the application program is re-signed.
- a security CPU may be disposed in the network device.
- a diagram of an internal structure of the security CPU is shown in FIG. 3 .
- the security CPU includes a security engine, a processor, an SRAM, a key-pair storage device, and a trusted NVRAM, where the security engine, the SRAM, the key-pair storage device, and the trusted NVRAM are all secure and trusted.
- the security engine is configured to: read data in the SRAM and process the read data; the SRAM is configured to store data of a trusted application program; the key-pair storage device is configured to store a manufacturer key pair; the trusted NVRAM is configured to store a digital signature of the application program.
- an operation of performing characteristic value calculation on the data of the application program to obtain the second digest of the application program may specifically be: reading the data of the application program in a memory into the static random access memory SRAM inside the security central processing unit CPU by the security CPU; reading the data in the SRAM by using the security engine inside the security CPU; and performing characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- the security engine may read the data from the SRAM, but the processor cannot read the data from the SRAM, which ensures that the data in the SRAM is not infected, so as to ensure credibility and reliability of the data.
- the characteristic value calculation may be hash calculation.
- the characteristic value calculation may alternatively be another calculation method, which is not specifically limited in the embodiment of the present disclosure.
- an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- the application program involved in the embodiment of the present disclosure may be an operating system, where the operating system may further have an application APP installed.
- the application program may alternatively be a third party application program, which is not specifically limited in the embodiment of the present disclosure.
- the network device involved in the embodiment of the present disclosure may be a network device such as a router, and an operating system of the network device may be an embedded operating system.
- application program integrity verification may be performed based on a method same as or similar to the embodiment of the present disclosure.
- the device on which the common operating system is installed may be a computer, a mobile phone, a palmtop computer, or the like, which is also not specifically limited in the embodiment of the present disclosure.
- S 202 Sign the second digest according to a private key in an embedded key pair to obtain a digital signature of the application program, where the key pair is the manufacturer key pair corresponding to the application program.
- the security engine obtains the private key in the key pair from the key-pair storage device, and signs the second digest according to the obtained private key to obtain the digital signature of the application program.
- the digital signature of the application program may be stored to a trusted non-volatile random access memory NVRAM inside the security central processing unit CPU.
- a region, in the trusted NVRAM, of storing the digital signature is only allowed to be read by the security engine rather than the processor, which ensures that the region, in the NVRAM, of storing the digital signature is not infected, so as to ensure credibility and reliability of the stored digital signature.
- the network device may also calculate the digital signature of the application program according to a method similar to the method that includes S 201 to S 203 , and store the digital signature in the trusted NVRAM.
- the network device signs data of the application program according to the private key in the key pair and based on the steps S 201 to S 203 , to obtain a digital signature of the application program, and then replaces the stored digital signature in the trusted NVRAM with the currently calculated digital signature of the application program.
- the digital signature of the application program is not stored to a TPM chip, but is stored to the trusted NVRAM inside the CPU. Therefore, a TPM chip does not need to be disposed in the network device, which reduces costs of application program integrity verification.
- the stored digital signature in the network device is obtained by means of signing based on data of the updated application program, rather than being obtained by means of signing based on original data of the application program, which ensures that the stored digital signature in the network device is the latest, so as to perform integrity verification on the application program according to S 204 to S 206 .
- S 204 Perform characteristic value calculation on data of the application program when the application program starts, to obtain a first digest of the application program.
- the data of the application program in the memory is read into the SRAM inside the security CPU by the security CPU; the data in the SRAM is read by using the security engine inside the security CPU; and characteristic value calculation is performed on the read data by using the security engine, to obtain the first digest of the application program.
- S 205 Decrypt the stored digital signature of the application program according to a public key in the key pair to obtain the second digest of the application program.
- the digital signature of the application program may be stored to the trusted NVRAM inside the security CPU. Therefore, before the decrypting the stored digital signature of the application program by using the security engine according to a public key in the key pair to obtain the second digest of the application program, the method further includes: obtaining the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU, so as to ensure that the stored digital signature in the trusted NVRAM is not infected.
- An algorithm of decrypting the stored digital signature of the application according to the public key in the key pair is the same as the signature algorithm in S 202 , which is also not specifically limited in the embodiment of the present disclosure.
- the security engine compares the first digest with the second digest. If the first digest and the second digest are the same, it is determined that the application program is not tampered with, and integrity verification of the application program passes. If the first digest and the second digest are different, it is determined that the application program is tampered with, and integrity verification of the application program does not pass. Further, when it is determined that the integrity verification of the application program does not pass, the network device may display prompt information to remind a user that the application program is tampered with, so that the user may no longer use the application program, Therefore, occurrence of security incidents, that is, stealing private information such as an account number and a password of the user, is prevented.
- the calculated second digest in the foregoing S 201 is obtained by means of calculation based on the data of the updated application program, that is, the second digest is a reference digest. If the application program is tampered with by a villain, the calculated first digest in the foregoing S 204 is obtained by means of calculation based on data of an application program that has been tampered with. Therefore, integrity verification may be performed on the application program according to the first digest and the second digest.
- the network device performs digital signature on the application program to entirely transfer an integrity protection mechanism of the application program to the network device side, and integrity of the application program no longer relies on privacy of a manufacturer private key.
- security decoupling is implemented between a manufacturer and a user, and the manufacturer and the user no longer rely on each other.
- a villain tampers with the application program and a security incident occurs, responsibilities of the security incident are relatively clear.
- patching or upgrading may be performed on the application program online, which avoids interrupting a service running in the telecommunications device.
- each time an application program in a network device is updated data of the application program is updated.
- the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program.
- Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
- a manufacturer key pair corresponding to an application program is stored in a trusted location of the network device.
- the network device includes: a first calculation module 401 , a decryption module 402 and a determining module 403 .
- the first calculation module 401 is configured to perform characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program.
- the decryption module 402 is configured to decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is the manufacturer key pair corresponding to the application program.
- the determining module 403 is configured to: determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the network device further includes:
- a second calculation module configured to perform characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program
- a signature module configured to sign the second digest according to the private key in the key pair to obtain the digital signature of the application program
- a storage module configured to store the digital signature of the application program.
- the second calculation module includes:
- a read-in unit configured to read the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU;
- a reading unit configured to read the data in the SRAM by using a security engine inside the security CPU;
- a calculation unit configured to perform characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- the storage module includes:
- a storage unit configured to store the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU.
- the network device further includes:
- an obtaining module configured to obtain the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU.
- an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- SHA secure hash algorithm
- SHA2 SHA2
- SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration or the like, which is not specifically limited in the embodiment of the present disclosure.
- each time an application program in a network device is updated data of the application program is updated.
- the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program.
- Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- the division of the foregoing functional modules is used merely as an example for describing application program integrity verification performed by the network device provided in the foregoing embodiment.
- the foregoing functions may be allocated to different functional modules as required for implementation, that is, the internal structure of the network device is divided into different functional modules to complete all or some of the foregoing functions.
- the network device provided in the foregoing embodiment belongs to the same concept as method embodiments of application program integrity verification. For a specific implementation process of the network device, reference may be made to the method embodiments, and details are not described herein again.
- FIG. 5 is a schematic structural diagram of another network device according to an embodiment of the present disclosure.
- the network device includes: a security processor 501 and a trusted memory 502 .
- the security processor 501 is configured to: perform characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program; decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is a manufacturer key pair corresponding to the application program; determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the security processor 501 is further configured to: perform characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program; sign the second digest according to the private key in the key pair to obtain the digital signature of the application program.
- the trusted memory 502 is configured to store the digital signature of the application program.
- the security processor 501 is further configured to: read the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU; read the data in the SRAM; and perform characteristic value calculation on the read data to obtain the second digest of the application program.
- the security central processing unit CPU may be located in the security processor 501 .
- the security central processing unit CPU may be disposed separately with the security processor 501 .
- the security processor 501 is further configured to store the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU.
- the security processor 501 is further configured to obtain the stored digital signature in the trusted NVRAM.
- an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- SHA secure hash algorithm
- SHA2 SHA2
- SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration or the like, which is not specifically limited in the embodiment of the present disclosure.
- each time an application program in a network device is updated data of the application program is updated.
- the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program.
- Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different.
- the manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- a person of ordinary skill in the art may understand that all or some of the steps in the foregoing embodiments may be implemented by hardware, or by a program instructing related hardware.
- the program may be stored in a computer readable storage medium, and the foregoing storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Virology (AREA)
- Bioethics (AREA)
- Storage Device Security (AREA)
Abstract
Description
- This application is a continuation of U.S. patent application Ser. No. 15/594,264, filed on May 12, 2017, which is a continuation of International Application No. PCT/CN2015/086262, filed on Aug. 6, 2015, which claims priority to Chinese Patent Application No. 201410647567.8, filed on Nov. 14, 2014. All of the aforementioned applications are hereby incorporated by reference in their entireties.
- Embodiments of the present disclosure relate to an application program integrity verification method and a network device.
- With rapid development of the internet, people perform network operations such as online transfer and online shopping through the internet more frequently. Meanwhile, some villains tamper with an application program in a network device to steal user private information such as an account number and a password, which poses a threat to property safety of a user. Therefore, a verification on integrity for an application program is urgently required, to determine whether the application program is tampered with.
- At present, to further ensure integrity of an application program and prevent a villain from tampering with an application program, a security central processing unit (CPU) and a trusted platform module (TPM) chip may be disposed in a network device. In this way, when a manufacturer publishes an application program, hash calculation is performed on data of the application program to obtain a first hash digest of the application program, information about the first hash digest is signed by using a manufacturer private key, to obtain a digital signature of the application program, the digital signature of the application program and the data of the application program are packed as a program package, and then the program package is published. When downloading the program package of the application program, the network device stores the digital signature in the program package to the TPM chip. Subsequently, when the network device starts the application program, the security CPU in the network device performs hash calculation on the data of the application program to obtain a second hash digest of the application program, obtains the digital signature of the application program from the TPM chip of the network device, and decrypts the obtained digital signature by using an embedded manufacturer public key, to obtain the first hash digest of the application program. The first hash digest is compared with the second hash digest. If the two are the same, it is determined that the application program is not tampered with, and integrity verification of the application program passes; otherwise, it is determined that the application program is tampered with, and integrity verification of the application program does not pass.
- When a vulnerability exists in the application program of the network device, patching needs to be performed on the application program. Patches are generally distributed on multiple data fragments of the application program, and the stored digital signature in the TPM chip of the network device is obtained by means of signing when the application program is published, that is, the stored digital signature in the TPM chip is obtained based on original data of the application program. Therefore, data obtained after patching is performed on the application program is different from the original data, and integrity verification cannot be performed, based on the digital signature of the original data, on the application program obtained after patching is performed.
- Embodiments of the present disclosure provide an application program integrity verification method and a network device.
- Technical solutions are as follows.
- According to a first aspect, an application program integrity verification method is provided, where the method includes:
- performing characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program;
- decrypting a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is a manufacturer key pair corresponding to the application program; and
- determining that integrity verification of the application program passes if the first digest and the second digest are the same, or determining that integrity verification of the application program does not pass if the first digest and the second digest are different.
- With reference to the first aspect, in a first possible implementation manner of the first aspect, before the performing characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program, the method further includes:
- performing characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program;
- signing the second digest according to the private key to obtain the digital signature of the application program; and
- storing the digital signature of the application program.
- With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the performing characteristic value calculation on the data of the application program to obtain the second digest of the application program includes:
- reading the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU;
- reading the data in the SRAM by using a security engine inside the security CPU; and
- performing characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- With reference to the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the storing the digital signature of the application program includes:
- storing the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU.
- With reference to any one of the first to the third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, before the decrypting a stored digital signature of the application program according to a public key in an embedded key pair to obtain the second digest of the application program, the method further includes:
- obtaining the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU.
- According to a second aspect, a network device is provided, and the network device includes:
- a first calculation module, configured to perform characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program;
- a decryption module, configured to decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is a manufacturer key pair corresponding to the application program; and
- a determining module, configured to determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- With reference to the second aspect, in a first possible implementation manner of the second aspect, the network device further includes:
- a second calculation module, configured to perform characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program;
- a signature module, configured to sign the second digest according to the private key to obtain the digital signature of the application program; and
- a storage module, configured to store the digital signature of the application program.
- With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the second calculation module includes:
- a read-in unit, configured to read the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU;
- a reading unit, configured to read the data in the SRAM by using a security engine inside the security CPU; and
- a calculation unit, configured to perform characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- With reference to the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the storage module includes:
- a storage unit, configured to store the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU.
- With reference to the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect or the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the network device further includes:
- an obtaining module, configured to obtain the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU.
- In the embodiments of the present disclosure, each time an application program in a network device is updated, data of the application program is updated. In this case, the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program. Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different. The manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- To illustrate technical solutions of embodiments of the present disclosure more clearly, the following briefly describes the accompanying drawings required in description of the embodiments. Apparently, the accompanying drawings described below are merely some of the embodiments of the present disclosure, and a person of ordinary skill in the art may still derive other drawings according to these accompanying drawings without creative efforts.
-
FIG. 1 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure; -
FIG. 2 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure; -
FIG. 3 is a schematic diagram of an internal structure of a security CPU according to an embodiment of the present disclosure; -
FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present disclosure; and -
FIG. 5 is a schematic structural diagram of another network device according to an embodiment of the present disclosure. - To make objectives, technical solutions, and advantages of the present disclosure clearer, the following further details implementation manners of the present disclosure with reference to the accompanying drawings.
- Before the present disclosure is explained in detail, an application scenario of embodiments of the present disclosure is first described. A villain may tamper with an application program in a network device to steal user private information such as an account number and a password, which poses a threat to property safety of a user. Therefore, each time the application program starts, the network device needs to perform integrity verification on the application program, so as to determine whether the application program is tampered with. However, as time goes by, a vulnerability may exist in the application program of the network device. In this case, patching needs to be performed on the application program in the network device. Patches are generally distributed on multiple data fragments of the application program; consequently, integrity verification cannot be performed, according to a method for separately performing integrity verification on the application program and on the patches, on the application program obtained after patching is performed. In addition, a stored digital signature in a trusted platform module (TPM) chip of the network device is obtained based on original data of the application program, and data of the application program obtained after patching is performed is different from the original data. Therefore, integrity verification cannot be performed, based on the digital signature of the original data, on the application program obtained after patching is performed. In this case, the embodiments of the present disclosure provide a method for application program integrity verification, in which the network device may still perform integrity verification on the application program after patching is performed on the application program.
-
FIG. 1 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure. The method is executed by a network device, and a manufacturer key pair corresponding to an application program is stored in a trusted location of the network device. Referring toFIG. 1 , the method includes the following steps. - S101: Perform characteristic value calculation on data of the application program when the application program starts, to obtain a first digest of the application program.
- In the embodiment of the present disclosure, the characteristic value calculation may be hash calculation. Certainly, the characteristic value calculation may alternatively be another calculation method, which is not specifically limited in the embodiment of the present disclosure. In addition, when the characteristic value calculation is the hash calculation, an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- S102: Decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is the manufacturer key pair corresponding to the application program.
- S103: Determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- In the embodiment of the present disclosure, each time an application program in a network device is updated, data of the application program is updated. In this case, the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program. Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different. The manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- Optionally, before the performing characteristic value calculation on data of the application program when the application program starts, to obtain a first digest of the application program, the method further includes:
- performing characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program;
- signing the second digest according to the private key in the key pair to obtain the digital signature of the application program; and
- storing the digital signature of the application program.
- Optionally, the performing characteristic value calculation on the data of the application program to obtain the second digest of the application program includes:
- reading the data of the application program in a memory into a static random access memory (SRAM) inside a security CPU;
- reading the data in the SRAM by using a security engine inside the security CPU; and
- performing characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- Optionally, the storing the digital signature of the application program includes:
- storing the digital signature of the application program to a trusted non-volatile random access memory (NVRAM) inside the security CPU.
- Optionally, before the decrypting a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, the method further includes:
- obtaining the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU.
- All foregoing optional technical solutions may form an optional embodiment of the present disclosure in any combination, and details are not described in the embodiment of the present disclosure again.
-
FIG. 2 is a flowchart of an application program integrity verification method according to an embodiment of the present disclosure. The method may be executed by a network device, and a manufacturer key pair corresponding to an application program is stored in a trusted location of the network device. Referring toFIG. 2 , the method includes the following steps. - S201: Perform characteristic value calculation on data of the application program when an update completion instruction is received, to obtain a second digest of the application program.
- Because a vulnerability may exist in the application program of the network device, the network device needs to perform patching on the application program, or a manufacturer upgrades the application program, and the network device needs to upgrade the application program. When completing patching or upgrading of the application program, the network device receives an update completion instruction. The update completion instruction may be obtained by means of triggering by the network device, or may be obtained by means of triggering by the network device when the network device receives a completion response from a server, where the server is a device storing the application program. After updating the application program in the network device, the data of the application program in the network device change. In this case, the second digest of the application program needs to be recalculated, and then the application program is re-signed.
- In addition, to further ensure integrity of the application program and prevent a villain from tampering with the application program, a security CPU may be disposed in the network device. A diagram of an internal structure of the security CPU is shown in
FIG. 3 . The security CPU includes a security engine, a processor, an SRAM, a key-pair storage device, and a trusted NVRAM, where the security engine, the SRAM, the key-pair storage device, and the trusted NVRAM are all secure and trusted. The security engine is configured to: read data in the SRAM and process the read data; the SRAM is configured to store data of a trusted application program; the key-pair storage device is configured to store a manufacturer key pair; the trusted NVRAM is configured to store a digital signature of the application program. Therefore, an operation of performing characteristic value calculation on the data of the application program to obtain the second digest of the application program may specifically be: reading the data of the application program in a memory into the static random access memory SRAM inside the security central processing unit CPU by the security CPU; reading the data in the SRAM by using the security engine inside the security CPU; and performing characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program. - The security engine may read the data from the SRAM, but the processor cannot read the data from the SRAM, which ensures that the data in the SRAM is not infected, so as to ensure credibility and reliability of the data. In addition, the characteristic value calculation may be hash calculation. Certainly, the characteristic value calculation may alternatively be another calculation method, which is not specifically limited in the embodiment of the present disclosure. Moreover, when the characteristic value calculation is the hash calculation, an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- It should be noted that, the application program involved in the embodiment of the present disclosure may be an operating system, where the operating system may further have an application APP installed. Certainly, the application program may alternatively be a third party application program, which is not specifically limited in the embodiment of the present disclosure. In addition, the network device involved in the embodiment of the present disclosure may be a network device such as a router, and an operating system of the network device may be an embedded operating system. Certainly, for a device on which a common operating system is installed, application program integrity verification may be performed based on a method same as or similar to the embodiment of the present disclosure. For example, the device on which the common operating system is installed may be a computer, a mobile phone, a palmtop computer, or the like, which is also not specifically limited in the embodiment of the present disclosure.
- S202: Sign the second digest according to a private key in an embedded key pair to obtain a digital signature of the application program, where the key pair is the manufacturer key pair corresponding to the application program.
- Specifically, the security engine obtains the private key in the key pair from the key-pair storage device, and signs the second digest according to the obtained private key to obtain the digital signature of the application program.
- There may be various algorithms of signing the second digest according to the obtained private key, such as an RSA, an ElGamal, a Fiat-Shamir, or a Schnorr, and the embodiment of the present disclosure does not specifically limit the used signature algorithm.
- S203: Store the digital signature of the application program.
- The digital signature of the application program may be stored to a trusted non-volatile random access memory NVRAM inside the security central processing unit CPU. A region, in the trusted NVRAM, of storing the digital signature is only allowed to be read by the security engine rather than the processor, which ensures that the region, in the NVRAM, of storing the digital signature is not infected, so as to ensure credibility and reliability of the stored digital signature.
- It should be noted that, when the network device downloads the application program for the first time and receives a download completion instruction, the network device may also calculate the digital signature of the application program according to a method similar to the method that includes S201 to S203, and store the digital signature in the trusted NVRAM. Each time the application program is updated, the network device signs data of the application program according to the private key in the key pair and based on the steps S201 to S203, to obtain a digital signature of the application program, and then replaces the stored digital signature in the trusted NVRAM with the currently calculated digital signature of the application program.
- In addition, in the embodiment of the present disclosure, the digital signature of the application program is not stored to a TPM chip, but is stored to the trusted NVRAM inside the CPU. Therefore, a TPM chip does not need to be disposed in the network device, which reduces costs of application program integrity verification.
- After the application program in the network device is updated and the digital signature of the application program is updated according to S201 to S203, the stored digital signature in the network device is obtained by means of signing based on data of the updated application program, rather than being obtained by means of signing based on original data of the application program, which ensures that the stored digital signature in the network device is the latest, so as to perform integrity verification on the application program according to S204 to S206.
- S204: Perform characteristic value calculation on data of the application program when the application program starts, to obtain a first digest of the application program.
- Specifically, when the application program starts, the data of the application program in the memory is read into the SRAM inside the security CPU by the security CPU; the data in the SRAM is read by using the security engine inside the security CPU; and characteristic value calculation is performed on the read data by using the security engine, to obtain the first digest of the application program.
- S205: Decrypt the stored digital signature of the application program according to a public key in the key pair to obtain the second digest of the application program.
- The digital signature of the application program may be stored to the trusted NVRAM inside the security CPU. Therefore, before the decrypting the stored digital signature of the application program by using the security engine according to a public key in the key pair to obtain the second digest of the application program, the method further includes: obtaining the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU, so as to ensure that the stored digital signature in the trusted NVRAM is not infected.
- An algorithm of decrypting the stored digital signature of the application according to the public key in the key pair is the same as the signature algorithm in S202, which is also not specifically limited in the embodiment of the present disclosure.
- S206: Determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different.
- Specifically, the security engine compares the first digest with the second digest. If the first digest and the second digest are the same, it is determined that the application program is not tampered with, and integrity verification of the application program passes. If the first digest and the second digest are different, it is determined that the application program is tampered with, and integrity verification of the application program does not pass. Further, when it is determined that the integrity verification of the application program does not pass, the network device may display prompt information to remind a user that the application program is tampered with, so that the user may no longer use the application program, Therefore, occurrence of security incidents, that is, stealing private information such as an account number and a password of the user, is prevented.
- The calculated second digest in the foregoing S201 is obtained by means of calculation based on the data of the updated application program, that is, the second digest is a reference digest. If the application program is tampered with by a villain, the calculated first digest in the foregoing S204 is obtained by means of calculation based on data of an application program that has been tampered with. Therefore, integrity verification may be performed on the application program according to the first digest and the second digest.
- In addition, the network device performs digital signature on the application program to entirely transfer an integrity protection mechanism of the application program to the network device side, and integrity of the application program no longer relies on privacy of a manufacturer private key. In this way, security decoupling is implemented between a manufacturer and a user, and the manufacturer and the user no longer rely on each other. Once a villain tampers with the application program and a security incident occurs, responsibilities of the security incident are relatively clear. Moreover, when patching or upgrading is performed on the application program in the network device and the network device is a large telecommunications device, a serious consequence is caused once a service is interrupted because the telecommunications device requires that the ongoing service cannot be interrupted. Therefore, according to the method provided in the embodiment of the present disclosure, patching or upgrading may be performed on the application program online, which avoids interrupting a service running in the telecommunications device.
- In the embodiment of the present disclosure, each time an application program in a network device is updated, data of the application program is updated. In this case, the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program. Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different. The manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
-
FIG. 4 is a schematic structural diagram of a network device according to an embodiment of the present disclosure. A manufacturer key pair corresponding to an application program is stored in a trusted location of the network device. Referring toFIG. 4 , the network device includes: afirst calculation module 401, adecryption module 402 and a determiningmodule 403. - The
first calculation module 401 is configured to perform characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program. - The
decryption module 402 is configured to decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is the manufacturer key pair corresponding to the application program. - The determining
module 403 is configured to: determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different. - Optionally, the network device further includes:
- a second calculation module, configured to perform characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program;
- a signature module, configured to sign the second digest according to the private key in the key pair to obtain the digital signature of the application program; and
- a storage module, configured to store the digital signature of the application program.
- Optionally, the second calculation module includes:
- a read-in unit, configured to read the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU;
- a reading unit, configured to read the data in the SRAM by using a security engine inside the security CPU; and
- a calculation unit, configured to perform characteristic value calculation on the read data by using the security engine, to obtain the second digest of the application program.
- Optionally, the storage module includes:
- a storage unit, configured to store the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU.
- Optionally, the network device further includes:
- an obtaining module, configured to obtain the stored digital signature in the trusted NVRAM by using the security engine inside the security CPU.
- Optionally, when the characteristic value calculation is hash calculation, an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- In the embodiment of the present disclosure, each time an application program in a network device is updated, data of the application program is updated. In this case, the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program. Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different. The manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- It should be noted that, the division of the foregoing functional modules is used merely as an example for describing application program integrity verification performed by the network device provided in the foregoing embodiment. In actual application, the foregoing functions may be allocated to different functional modules as required for implementation, that is, the internal structure of the network device is divided into different functional modules to complete all or some of the foregoing functions. In addition, the network device provided in the foregoing embodiment belongs to the same concept as method embodiments of application program integrity verification. For a specific implementation process of the network device, reference may be made to the method embodiments, and details are not described herein again.
- All foregoing optional technical solutions may form an optional embodiment of the present disclosure in any combination, and details are not described in the embodiment of the present disclosure again.
-
FIG. 5 is a schematic structural diagram of another network device according to an embodiment of the present disclosure. Referring toFIG. 5 , the network device includes: asecurity processor 501 and a trustedmemory 502. - The
security processor 501 is configured to: perform characteristic value calculation on data of an application program when the application program starts, to obtain a first digest of the application program; decrypt a stored digital signature of the application program according to a public key in an embedded key pair to obtain a second digest of the application program, where the digital signature is obtained, according to a private key in the key pair, by signing data of the application program each time the application program is updated, and the key pair is a manufacturer key pair corresponding to the application program; determine that integrity verification of the application program passes if the first digest and the second digest are the same, or determine that integrity verification of the application program does not pass if the first digest and the second digest are different. - Optionally, the
security processor 501 is further configured to: perform characteristic value calculation on the data of the application program when receiving an update completion instruction, to obtain the second digest of the application program; sign the second digest according to the private key in the key pair to obtain the digital signature of the application program. - The trusted
memory 502 is configured to store the digital signature of the application program. - Optionally, the
security processor 501 is further configured to: read the data of the application program in a memory into a static random access memory SRAM inside a security central processing unit CPU; read the data in the SRAM; and perform characteristic value calculation on the read data to obtain the second digest of the application program. - Optionally, the security central processing unit CPU may be located in the
security processor 501. - Optionally, the security central processing unit CPU may be disposed separately with the
security processor 501. - Optionally, the
security processor 501 is further configured to store the digital signature of the application program to a trusted non-volatile random access memory NVRAM inside the security CPU. - Optionally, the
security processor 501 is further configured to obtain the stored digital signature in the trusted NVRAM. - Optionally, when the characteristic value calculation is hash calculation, an algorithm of the hash calculation may be a secure hash algorithm (SHA), an SHA2 algorithm, an SM3 cryptographic hash algorithm of Chinese commercial cryptographic hash algorithm standard published by State Cryptography Administration, or the like, which is not specifically limited in the embodiment of the present disclosure.
- All foregoing optional technical solutions may form an optional embodiment of the present disclosure in any combination, and details are not described in the embodiment of the present disclosure again.
- In the embodiment of the present disclosure, each time an application program in a network device is updated, data of the application program is updated. In this case, the network device signs data of the application program according to a private key in an embedded key pair to obtain a digital signature of the application program. Characteristic value calculation is performed on data of the application program when the application program starts, to obtain a first digest of the application program, and the digital signature of the application program is decrypted according to a public key in the key pair to obtain a second digest of the application program. It is determined that integrity verification of the application program passes if the first digest and the second digest are the same, or it is determined that integrity verification of the application program does not pass if the first digest and the second digest are different. The manufacturer key pair is embedded in the network device, and the data of the application program is signed according to the private key in the key pair each time the network device updates the application program, so that the digital signature of the application program is updated, and consequently, the second digest is also updated, which ensures that integrity verification of the application program can be performed after the application program is updated.
- A person of ordinary skill in the art may understand that all or some of the steps in the foregoing embodiments may be implemented by hardware, or by a program instructing related hardware. The program may be stored in a computer readable storage medium, and the foregoing storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.
- The foregoing is only exemplary embodiments of the present disclosure, which is not intended to limit the present disclosure. Any modification, equivalent replacement and improvement made without departing from the spirit and principal of the present disclosure shall fall within the protection scope of the present disclosure.
Claims (21)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US17/090,588 US20210124820A1 (en) | 2014-11-14 | 2020-11-05 | Application program integrity verification method and network device |
Applications Claiming Priority (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410647567.8 | 2014-11-14 | ||
| CN201410647567.8A CN104462965B (en) | 2014-11-14 | 2014-11-14 | Application integrity verification method and the network equipment |
| PCT/CN2015/086262 WO2016074506A1 (en) | 2014-11-14 | 2015-08-06 | Method and network device for authenticating application program integrity |
| US15/594,264 US10846393B2 (en) | 2014-11-14 | 2017-05-12 | Application program integrity verification method and network device |
| US17/090,588 US20210124820A1 (en) | 2014-11-14 | 2020-11-05 | Application program integrity verification method and network device |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/594,264 Continuation US10846393B2 (en) | 2014-11-14 | 2017-05-12 | Application program integrity verification method and network device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| US20210124820A1 true US20210124820A1 (en) | 2021-04-29 |
Family
ID=52908990
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/594,264 Active 2035-10-25 US10846393B2 (en) | 2014-11-14 | 2017-05-12 | Application program integrity verification method and network device |
| US17/090,588 Abandoned US20210124820A1 (en) | 2014-11-14 | 2020-11-05 | Application program integrity verification method and network device |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/594,264 Active 2035-10-25 US10846393B2 (en) | 2014-11-14 | 2017-05-12 | Application program integrity verification method and network device |
Country Status (4)
| Country | Link |
|---|---|
| US (2) | US10846393B2 (en) |
| EP (1) | EP3196797B1 (en) |
| CN (1) | CN104462965B (en) |
| WO (1) | WO2016074506A1 (en) |
Families Citing this family (22)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104462965B (en) | 2014-11-14 | 2018-03-13 | 华为技术有限公司 | Application integrity verification method and the network equipment |
| CN106161027A (en) * | 2015-04-15 | 2016-11-23 | 李京海 | A kind of mobile phone quasi-digital certificate subsystem and system and method thereof |
| US9749141B2 (en) * | 2015-09-25 | 2017-08-29 | Qualcomm Incorporated | Secure boot devices, systems, and methods |
| WO2017067490A1 (en) * | 2015-10-22 | 2017-04-27 | 李京海 | Digital certificate subsystem |
| US10616197B2 (en) * | 2016-04-18 | 2020-04-07 | Atmel Corporation | Message authentication with secure code verification |
| CN108667594B (en) * | 2017-03-27 | 2022-10-11 | 格尔软件股份有限公司 | Software program module integrity detection method based on PKI public key algorithm |
| CN107545181B (en) * | 2017-08-16 | 2021-04-27 | 上海策赢网络科技有限公司 | Program running method, terminal and computer-readable storage medium |
| CN110971414B (en) * | 2017-11-10 | 2021-05-04 | 财付通支付科技有限公司 | Method, device, terminal and server for generating signature |
| CN107908962A (en) * | 2017-12-05 | 2018-04-13 | 深圳鼎智通讯股份有限公司 | Self checking method applied to Android intelligent terminal |
| CN108255505A (en) * | 2018-01-10 | 2018-07-06 | 浪潮(北京)电子信息产业有限公司 | A kind of firmware update, device, equipment and computer readable storage medium |
| CN108363929B (en) * | 2018-02-09 | 2022-05-13 | 广州旭能信息科技有限公司 | System and method for generating information elimination report of storage device and preventing tampering |
| CN111046436A (en) * | 2018-10-11 | 2020-04-21 | 中国人民解放军战略支援部队航天工程大学 | Signature authentication method and server based on system-level package management |
| JP7174237B2 (en) * | 2018-11-29 | 2022-11-17 | 富士通株式会社 | Key generation device, key update method and key update program |
| CN109814934B (en) * | 2019-01-31 | 2022-05-06 | 安谋科技(中国)有限公司 | Data processing method, device, readable medium and system |
| US20220374510A1 (en) * | 2019-09-27 | 2022-11-24 | Nec Corporation | Information processing apparatus, information processing method, and non-transitorycomputer readable medium storing program |
| US11582036B1 (en) * | 2019-10-18 | 2023-02-14 | Splunk Inc. | Scaled authentication of endpoint devices |
| JP7249968B2 (en) * | 2020-03-09 | 2023-03-31 | 株式会社東芝 | Information processing equipment and storage |
| WO2022091232A1 (en) * | 2020-10-28 | 2022-05-05 | 日本電気株式会社 | Monitoring range determination device, monitoring range determination method, and computer-readable medium |
| CN112433742B (en) * | 2020-11-26 | 2024-12-17 | 中电金融设备系统(深圳)有限公司 | Secure firmware updating method, apparatus, device and storage medium |
| CN112613030A (en) * | 2020-12-15 | 2021-04-06 | 深圳市燃气集团股份有限公司 | Credible safe starting method and system based on Internet of things gas meter |
| CN114064462A (en) * | 2021-11-01 | 2022-02-18 | 中金金融认证中心有限公司 | An apparatus, method and related products for verifying application programs |
| CN115329315A (en) * | 2022-08-16 | 2022-11-11 | 亿咖通(湖北)技术有限公司 | Service authentication method, device, storage medium and electronic device |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130110294A1 (en) * | 2010-02-15 | 2013-05-02 | Siemens Aktiengesellschaft | Method for operating an energy automation system and energy automation system |
| US20160203313A1 (en) * | 2013-08-23 | 2016-07-14 | British Telecommunications Public Limited Company | Method and apparatus for modifying a computer program in a trusted manner |
Family Cites Families (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5643086A (en) * | 1995-06-29 | 1997-07-01 | Silicon Gaming, Inc. | Electronic casino gaming apparatus with improved play capacity, authentication and security |
| US5835594A (en) * | 1996-02-09 | 1998-11-10 | Intel Corporation | Methods and apparatus for preventing unauthorized write access to a protected non-volatile storage |
| US5944821A (en) * | 1996-07-11 | 1999-08-31 | Compaq Computer Corporation | Secure software registration and integrity assessment in a computer system |
| US6694434B1 (en) * | 1998-12-23 | 2004-02-17 | Entrust Technologies Limited | Method and apparatus for controlling program execution and program distribution |
| US7043641B1 (en) * | 2000-03-08 | 2006-05-09 | Igt | Encryption in a secure computerized gaming system |
| US7203841B2 (en) * | 2001-03-08 | 2007-04-10 | Igt | Encryption in a secure computerized gaming system |
| US7093132B2 (en) | 2001-09-20 | 2006-08-15 | International Business Machines Corporation | Method and apparatus for protecting ongoing system integrity of a software product using digital signatures |
| US7240201B2 (en) * | 2003-08-01 | 2007-07-03 | Hewlett-Packard Development Company, L.P. | Method and apparatus to provide secure communication between systems |
| KR100888594B1 (en) * | 2006-03-15 | 2009-03-16 | 삼성전자주식회사 | License generation method, content providing method using same, and apparatus therefor |
| US9280337B2 (en) * | 2006-12-18 | 2016-03-08 | Adobe Systems Incorporated | Secured distribution of software updates |
| US8001390B2 (en) * | 2007-05-09 | 2011-08-16 | Sony Computer Entertainment Inc. | Methods and apparatus for secure programming and storage of data using a multiprocessor in a trusted mode |
| CN101251883B (en) * | 2008-03-11 | 2010-07-21 | 北京深思洛克软件技术股份有限公司 | Method for performing safety controllable remote upgrade for software protecting device |
| US8788841B2 (en) * | 2008-10-23 | 2014-07-22 | Samsung Electronics Co., Ltd. | Representation and verification of data for safe computing environments and systems |
| JP5458657B2 (en) | 2009-05-01 | 2014-04-02 | ソニー株式会社 | Information processing apparatus, key update method, and program |
| CN103731395B (en) * | 2012-10-10 | 2017-11-14 | 中兴通讯股份有限公司 | The processing method and system of file |
| US9201642B2 (en) * | 2013-03-15 | 2015-12-01 | International Business Machines Corporation | Extending platform trust during program updates |
| CN103577748B (en) | 2013-11-20 | 2017-01-18 | 北京可信华泰信息技术有限公司 | Dynamic measuring method based on dependable computing and management system |
| CN103810421B (en) * | 2014-02-19 | 2017-01-04 | 北京视博数字电视科技有限公司 | The method of calibration of application program, device and terminal unit |
| CN104462965B (en) | 2014-11-14 | 2018-03-13 | 华为技术有限公司 | Application integrity verification method and the network equipment |
-
2014
- 2014-11-14 CN CN201410647567.8A patent/CN104462965B/en active Active
-
2015
- 2015-08-06 EP EP15859659.3A patent/EP3196797B1/en active Active
- 2015-08-06 WO PCT/CN2015/086262 patent/WO2016074506A1/en active Application Filing
-
2017
- 2017-05-12 US US15/594,264 patent/US10846393B2/en active Active
-
2020
- 2020-11-05 US US17/090,588 patent/US20210124820A1/en not_active Abandoned
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130110294A1 (en) * | 2010-02-15 | 2013-05-02 | Siemens Aktiengesellschaft | Method for operating an energy automation system and energy automation system |
| US20160203313A1 (en) * | 2013-08-23 | 2016-07-14 | British Telecommunications Public Limited Company | Method and apparatus for modifying a computer program in a trusted manner |
Also Published As
| Publication number | Publication date |
|---|---|
| EP3196797A1 (en) | 2017-07-26 |
| US10846393B2 (en) | 2020-11-24 |
| CN104462965B (en) | 2018-03-13 |
| EP3196797B1 (en) | 2025-01-01 |
| EP3196797A4 (en) | 2017-09-06 |
| CN104462965A (en) | 2015-03-25 |
| WO2016074506A1 (en) | 2016-05-19 |
| US20170249456A1 (en) | 2017-08-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20210124820A1 (en) | Application program integrity verification method and network device | |
| US10721080B2 (en) | Key-attestation-contingent certificate issuance | |
| US10530753B2 (en) | System and method for secure cloud computing | |
| JP5690412B2 (en) | Hardware device key provisioning method and apparatus | |
| US20240330470A1 (en) | Rollback Resistant Security | |
| US8874922B2 (en) | Systems and methods for multi-layered authentication/verification of trusted platform updates | |
| US8732445B2 (en) | Information processing device, information processing method, information processing program, and integrated circuit | |
| WO2019218919A1 (en) | Private key management method and apparatus in blockchain scenario, and system | |
| US11182469B2 (en) | Application security authentication method, terminal and storage medium | |
| EP2051181A1 (en) | Information terminal, security device, data protection method, and data protection program | |
| US10229272B2 (en) | Identifying security boundaries on computing devices | |
| CN110378104A (en) | A method of upgrading is anti-to distort | |
| US20080313475A1 (en) | Methods and systems for tamper resistant files | |
| CN114662087A (en) | Multi-terminal verification security chip firmware updating method and device | |
| JP2018117185A (en) | Information processing apparatus, information processing method | |
| US20200233964A1 (en) | Trojan detection in cryptographic hardware adapters | |
| CN119128887A (en) | Firmware upgrade package verification method, device, terminal and storage medium | |
| CN108242997B (en) | Method and apparatus for secure communication | |
| JP7559841B2 (en) | Information processing device, program execution system, information processing method, and program | |
| CN114879980A (en) | Vehicle-mounted application installation method and device, computer equipment and storage medium | |
| US20250238534A1 (en) | Data protection | |
| US20250080345A1 (en) | Key management method and related device | |
| US20250300812A1 (en) | Cryptographic agility | |
| JP2013197810A (en) | Encryption processing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AS | Assignment |
Owner name: HUAWEI TECHNOLOGIES CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:FU, TIANFU;ZHOU, CHONG;REEL/FRAME:054289/0796 Effective date: 20170922 |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: APPLICATION DISPATCHED FROM PREEXAM, NOT YET DOCKETED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: FINAL REJECTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: ADVISORY ACTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: FINAL REJECTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE AFTER FINAL ACTION FORWARDED TO EXAMINER |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: ADVISORY ACTION MAILED |
|
| STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |