WO2021232982A1 - 一种基于冗余密码算法进行安全启动的方法及设备 - Google Patents
一种基于冗余密码算法进行安全启动的方法及设备 Download PDFInfo
- Publication number
- WO2021232982A1 WO2021232982A1 PCT/CN2021/085909 CN2021085909W WO2021232982A1 WO 2021232982 A1 WO2021232982 A1 WO 2021232982A1 CN 2021085909 W CN2021085909 W CN 2021085909W WO 2021232982 A1 WO2021232982 A1 WO 2021232982A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cryptographic
- information
- algorithm
- cryptographic algorithm
- resource
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 278
- 238000012795 verification Methods 0.000 claims abstract description 104
- 230000008569 process Effects 0.000 claims abstract description 72
- 230000015654 memory Effects 0.000 claims description 119
- 238000004891 communication Methods 0.000 claims description 70
- 239000000725 suspension Substances 0.000 claims description 53
- 230000008859 change Effects 0.000 claims description 8
- 230000004044 response Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 description 22
- 238000010586 diagram Methods 0.000 description 21
- 238000005516 engineering process Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 206010000210 abortion Diseases 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- 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/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0891—Revocation or update of secret information, e.g. encryption key update or rekeying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/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
- G06F21/575—Secure boot
-
- 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/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/045—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 hybrid encryption, i.e. combination of symmetric and asymmetric encryption
-
- 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/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0825—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
-
- 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/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
-
- 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
-
- 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/3263—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 certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/03—Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
- G06F2221/034—Test or assess a computer or a system
Definitions
- This application relates to the field of security technology, in particular to a method and device for secure startup based on a redundant cryptographic algorithm, and in particular to a method and device for managing cryptographic resources used by network devices in the secure startup process.
- the secure boot technology is an effective measure to protect the integrity of the software during the startup of network devices through cryptographic methods.
- the image file of the application to be loaded is verified first, and the image file of the application is loaded after the verification is passed, so as to ensure the integrity and legality of the image file of the application loaded during the boot process.
- the embodiments of the present application provide a method and device for secure startup based on redundant cryptographic algorithms, which can safely update baseline information of cryptographic resources, so that network devices can flexibly use different cryptographic algorithms based on different security requirements Perform a secure boot to ensure the security of network equipment.
- the embodiments of the present application provide a method for managing cryptographic resources used for secure boot.
- the method is implemented by a network device.
- the method may include, for example, acquiring first instruction information and second instruction information, and according to The first indication information and the second indication information update the baseline information of the first cryptographic resource.
- the first indication information is used to uniquely identify the first cryptographic algorithm, and the second indication information is used to instruct the network device to update the baseline information of the first cryptographic resource stored in the secure storage entity.
- the baseline information of a cryptographic resource is used to verify the integrity of the first cryptographic resource used by the network device in the secure startup process, and the first cryptographic resource corresponds to the first cryptographic resource used by the network device during the secure boot
- the first cryptographic algorithm and the first public key of the first cryptographic resource the baseline information of the first cryptographic resource includes the state information of the first cryptographic algorithm, and the state information of the first cryptographic algorithm is used to indicate the status of the first cryptographic algorithm status of use.
- the first encryption algorithm can be any of the following algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography (English: Elliptic Curve Cryptography, abbreviation: ECC) algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm ( English: Secure Hash Algorithm, abbreviated as SHA) or SM3.
- RSA elliptic Curve Cryptography
- ECC Elliptic Curve Cryptography
- SM2 national secret
- secure hash algorithm English: Secure Hash Algorithm, abbreviated as SHA
- SM3 Secure Hash Algorithm
- the baseline information of the corresponding cryptographic resource causes the state information of the cryptographic algorithm to change to indicate that the cryptographic algorithm enters a different state of use, so as to achieve the purpose of online adjustment of the cryptographic algorithm for secure startup based on different requirements, so as to make the cryptographic algorithm according to different security It is possible to perform safe booting on demand adaptability, which improves the security of network equipment.
- the secure storage entity may be a one-time programmable storage space in the processor; or, in another case, the secure storage entity may also be a secure chip independent of the processor.
- the second indication information is specifically used to indicate that the first cryptographic algorithm is enabled.
- updating the baseline information of the first cryptographic resource may include: changing the state information of the first cryptographic algorithm to set the use state of the first cryptographic algorithm to the enabled state.
- Setting the use state of the first cryptographic algorithm to the enabled state may include: setting the enable identification information corresponding to the first cryptographic algorithm to indicate that the use state of the first cryptographic algorithm is the enabled state.
- the baseline information of the cryptographic resource is stored in the secure storage entity of the network device in the form of hardware programming, the baseline information of the first cryptographic resource is compared according to the first instruction information and the second instruction information.
- the updating of the information may include, for example, setting the enable identification information in the baseline information of the first cryptographic resource corresponding to the first cryptographic algorithm to an enabled state.
- the baseline information of the cryptographic resource is securely stored in the network device in the form of software
- the baseline information of the first cryptographic resource is updated according to the first instruction information and the second instruction information For example, it may include: setting the software status bit corresponding to the first cryptographic algorithm to the enabled state.
- the updated baseline information of the first cryptographic resource further includes a first public key baseline value
- the first public key baseline value is used to verify the integrity of the first public key.
- enabling the first cryptographic algorithm can also mean enabling the corresponding first cryptographic algorithm.
- the baseline value of the first public key in the baseline information of the first cryptographic resource if there are multiple preset cryptographic algorithms, only the public key baseline value corresponding to the enabled cryptographic algorithm is stored in the secure storage entity, and the baseline value of the cryptographic resource corresponding to the unenabled cryptographic algorithm is saved in the secure storage entity.
- the information reserves the space to be written in the corresponding public key baseline value.
- updating the baseline information of the first cryptographic resource corresponding to the first cryptographic algorithm may also include: the network device obtains the first cryptographic algorithm corresponding to the first cryptographic algorithm.
- the public key baseline value, the first public key baseline value is stored in a secure storage entity, for example, the first public key baseline value is written into the first public key baseline at a position corresponding to the baseline information of the first cryptographic resource corresponding to the first cryptographic algorithm in the secure storage entity value.
- the first public key baseline value corresponding to the first cryptographic algorithm can also be carried in the first update file, then the network device obtains the first update file.
- the first public key baseline value corresponding to the cryptographic algorithm may be: the network device obtains the first public key baseline value from the first update file.
- the baseline value of the first public key is the hash value of the first public key or the plaintext of the first public key.
- the baseline value of the first public key uniquely corresponds to the first public key, and is used to verify the integrity of the first public key.
- the baseline value of the first public key is used to verify the value of the first public key carried in the first update file. Integrity; on the other hand, when the first cryptographic algorithm is valid, the first public key baseline value is used to verify the integrity of the first public key in the cryptographic resources stored in the non-volatile memory during the secure startup of the network device .
- non-volatile memory may be, for example, read-only memory (English: Read-only memory, abbreviation: ROM), programmable read-only memory (English: Programmable read-only memory, abbreviation: PROM), electrical Rewritable read-only memory (English: Electrically alterable read only memory, referred to as EAROM), erasable programmable read-only memory (English: Erasable programmable read only memory, referred to as EPROM), electrically erasable programmable read-only memory (English: Erasable programmable read only memory, referred to as EPROM) : Electrically erasable programmable read only memory, abbreviated as EEPROM), flash memory (English: Flash memory), etc., which are not specifically limited in the embodiments of this application.
- the embodiment of the present application may further include: The second password resource stored in the volatile memory is updated to the first password resource.
- the embodiment of the present application may further include: performing a secure boot based on the updated baseline information of the first cryptographic resource and the first cryptographic resource.
- the secure boot process may include, for example, based on the updated first cryptographic resource.
- the baseline information of the cryptographic resource performs integrity verification on the updated first cryptographic resource stored in the non-volatile memory; if the first cryptographic resource stored in the non-volatile memory passes the integrity verification, Then, according to the first public key and the first cryptographic algorithm in the first cryptographic resource, the image file of the application digitally signed by the first private key that is loaded during the secure boot process is verified.
- the performing the integrity verification on the updated first cryptographic resource stored in the non-volatile memory based on the updated baseline information of the first cryptographic resource may include, for example: using the first cryptographic resource A public key baseline value verifies the integrity of the first public key stored in the non-volatile memory.
- the first indication information and the second indication information may include: obtaining a first update file, where the first update file carries the first indication information and the second indication information.
- the first update file may be, for example, a certificate.
- the format of the certificate can be customized, or the standard X.509 format (that is, the standard format of the cryptographic process certificate) can be used.
- the first update file can also be another file in any format that can carry the first instruction information and the second instruction information and can be recognized and parsed by the network device.
- the first update file is not specifically limited in the embodiment of the present application. .
- the first update file is signed using a second private key and a second cryptographic algorithm
- the secure storage entity stores baseline information of the second cryptographic resource
- the baseline information of the second cryptographic resource is used to
- the second cryptographic resource used by the network device in the secure boot process performs integrity verification
- the second cryptographic resource corresponds to the second cryptographic algorithm and the second public key
- the network device is using all Before the first cryptographic resource performs a secure boot, the second cryptographic resource is used to perform a secure boot.
- the first update file may further include the second public key
- the embodiment of the present application may further include: verifying the signature of the first update file according to the second cryptographic algorithm and the second public key.
- the second public key is the root public key of the network device or the second public key is a public key derived based on the root key of the network device, for example, may be the secondary public key of the network device. It can be seen that when the verification of the first update file is passed, it is considered that the first update file has not been tampered with and the source is credible, and it is determined that the first update file is reliable, which can be based on the first indication information in the first update file and The second instruction information updates the password resource.
- the second public key baseline value is preset in the secure storage entity, and then the first public key is verified according to the second cryptographic algorithm and the second public key.
- the embodiment of the present application may further include: verifying the integrity of the second public key carried in the first update file based on the baseline value of the second public key, if the second public key After passing the integrity verification, the signature of the first update file is verified according to the second cryptographic algorithm and the second public key, which is more secure.
- the first update file may further include device identification information of the network device, and the device identification information is used to identify the network device.
- the device identification information of the network device includes any one of the following information: the chip identification in the network device, the hardware identification of the network device, the user identification to which the network device belongs, and the network device to which the network device belongs.
- IP Internet Protocol
- MAC Media Access Control
- the device identification information in the first update file and the network device can be matched and verified, and after the verification is passed, it is determined that the first update file is for the network device.
- the file based on the first update, implements the method provided in this embodiment of the application to complete the update of the password resource on the network device.
- the secure storage entity also stores baseline information of a second cryptographic resource, and the baseline information of the second cryptographic resource is used to determine the second cryptographic resource used by the network device in the secure boot process.
- Two cryptographic resources are used for integrity verification, the second cryptographic resource corresponds to a second cryptographic algorithm and a second public key, and the network device uses the second cryptographic resource to perform a secure boot. If the cryptographic resource is started securely, the embodiment of the present application may further include: acquiring third instruction information and fourth instruction information, where the third instruction information is used to uniquely identify the second cryptographic algorithm, and the fourth instruction information The instruction information is used to instruct to stop using the second cryptographic algorithm.
- the third indication information and the fourth indication information may be carried in the first update file, that is, the first indication information, the second indication information, the third indication information, and the fourth indication information are all carried in the first update file middle.
- the third indication information and the fourth indication information may also be carried in the second update file, that is, the first indication information and the second indication information are carried in the first update file, and the third indication information and the fourth indication information are carried in the first update file.
- the instruction information is carried in the second update file.
- the second update file may be a certificate or another file in any format that can be recognized and parsed by the network device, and the second update file is not specifically limited in the embodiment of the present application.
- the embodiment of the present application may further include: suspending the use of the second cryptographic algorithm according to the third instruction information and the fourth instruction information.
- suspending the use of the second cryptographic algorithm for example, may include: suspending the use of the second cryptographic algorithm after the baseline information of the first cryptographic resource is updated.
- the foregoing suspension of the use of the second cryptographic algorithm may include: disabling the second cryptographic algorithm or revoking the second cryptographic algorithm.
- disabling the second cryptographic algorithm may, for example, include: setting the use state of the second cryptographic algorithm to a disabled state; and revoking the second cryptographic algorithm may include, for example: changing the second cryptographic algorithm
- the usage status of is set to revocation status.
- setting the use status of the second cryptographic algorithm to the revocation status may specifically be: setting the revocation identification information corresponding to the second cryptographic algorithm to indicate that the use status of the second cryptographic algorithm is the revocation status.
- the second cryptographic algorithm may be any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the first cipher algorithm and the second cipher algorithm are different cipher algorithms.
- the second indication information is specifically used to instruct the network device to stop using the first cryptographic algorithm.
- updating the baseline information of the first cryptographic resource is specifically: changing the state information of the first cryptographic algorithm to set the use state of the first password to a suspended state.
- the foregoing suspension of the use of the first cryptographic algorithm may include: disabling the first cryptographic algorithm or revoking the first cryptographic algorithm.
- updating the baseline information of the first cryptographic resource may include, for example: changing the state information of the first cryptographic algorithm to change the status information of the first cryptographic algorithm.
- the use state is set to the disabled state; in the case of revoking the first cryptographic algorithm, updating the baseline information of the first cryptographic resource may, for example, include: changing the state information of the first cryptographic algorithm to change the state information of the first cryptographic algorithm.
- the use state of the first password is set to a revoked state.
- the state information of the first cryptographic algorithm includes revocation identification information
- the changing the state information of the first cryptographic algorithm to set the use state of the first password to the revocation state includes: setting the revocation identification Information to set the use state of the first cryptographic algorithm to a revoked state.
- the network device can enable a new cryptographic algorithm, and after using the newly enabled cryptographic algorithm to securely start the network device, stop the cryptographic algorithm that cannot meet the requirements, making the cryptographic algorithm that does not meet the requirements It is no longer used for the safe startup of network equipment, and the security of the network equipment is improved.
- the embodiments of the present application also provide a secure boot method, which is implemented by a network device.
- the method may include, for example, updating the first cryptographic algorithm used for secure boot to the second cryptographic algorithm, and, The first public key baseline value used for secure boot is updated to the second public key baseline value; thus, the second public key baseline value is used to verify the integrity of the second public key, wherein the second password
- the algorithm and the second public key that passed the integrity verification are used to verify the image file loaded during the secure boot process.
- the first cryptographic algorithm in the multiple cryptographic algorithms can be any of the following algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the second cryptographic algorithm can be any of the following algorithms: RSA, ECC algorithm, SM2, SHA, or SM3.
- the first cipher algorithm is different from the second cipher algorithm.
- the secure storage entity used to securely store the baseline information of the cryptographic resource in the network device may be a one-time programmable storage space in the processor; or, the secure storage entity may also be a secure chip independent of the processor.
- the baseline information of the cryptographic resource may include baseline information of the first cryptographic resource and baseline information of the second cryptographic resource.
- the baseline information of the first cryptographic resource includes the state information of the first cryptographic algorithm, and the state information of the first cryptographic algorithm is used to indicate the use state of the first cryptographic algorithm.
- the baseline information of the second cryptographic resource includes the first cryptographic algorithm. 2. State information of the cryptographic algorithm, where the state information of the second cryptographic algorithm is used to indicate the use state of the second cryptographic algorithm.
- the baseline information of the first cryptographic resource is used to verify the integrity of the first cryptographic resource used by the network device in the secure startup process, and the first cryptographic resource corresponds to the network device performing the security The first cryptographic algorithm and the first public key used for startup; similarly, the baseline information of the second cryptographic resource is used to verify the integrity of the second cryptographic resource used by the network device in the secure startup process, The second cryptographic resource corresponds to a second cryptographic algorithm and a second public key used by the network device to perform the secure boot. Then, the embodiment of the present application is performing the above-mentioned "update the first cryptographic algorithm for secure startup to the second cryptographic algorithm" and "update the baseline value of the first public key for secure startup to the second public key baseline value". After that, the baseline information of the second cryptographic resource can be used to verify the integrity of the second cryptographic resource, and the second cryptographic resource that has passed the integrity verification can be used to verify the image file loaded during the secure boot process.
- updating the first cryptographic algorithm to the second cryptographic algorithm may include, for example, suspending the first cryptographic algorithm and enabling the second cryptographic algorithm.
- suspending the first cryptographic algorithm includes two possible meanings of revoking the first cryptographic algorithm or disabling the first cryptographic algorithm.
- the embodiment of the present application may further include: if the second public key passes the integrity verification, the network device can use the second public key and the second cryptographic algorithm to perform the security startup process The signature of the loaded image file is verified.
- the second public key baseline value may be preset in the network device In the secure storage entity, then, enabling the second cryptographic algorithm means that the second public key baseline value in the baseline information of the second cryptographic resource corresponding to the cryptographic second code algorithm is enabled.
- the network device can also obtain the first public key baseline value corresponding to the first cryptographic algorithm. Then, in the embodiment of the application, it will be used for secure startup. Updating the first public key baseline value to the second public key baseline value may include: obtaining the second public key baseline value, and saving the second public key baseline value in a secure storage entity of the network device.
- the manner of obtaining the baseline value of the second public key may include, for example, obtaining a first update file, the first update file carrying the second public key baseline value; and obtaining the second public key from the first update file.
- Key baseline value is saved in the secure storage entity of the network device, for example, the second cryptographic resource corresponding to the second cryptographic algorithm in the secure storage entity is written in a position corresponding to the baseline information of the second cryptographic resource. 2. The baseline value of the public key.
- the baseline value of the second public key is the hash value of the second public key or the plaintext of the second public key.
- the second public key baseline value uniquely corresponds to the second public key, and is used to verify the integrity of the second public key.
- the second public key baseline value is used to verify the second public key carried in the first update file. Integrity; on the other hand, when the second cryptographic algorithm is valid, the second public key baseline value is used to complete the integrity of the second public key in the cryptographic resources stored in the non-volatile memory during the secure startup of the network device verify.
- the embodiment of the present application may further include: storing in a non-volatile memory
- the first cryptographic resource used for secure startup is updated to a second cryptographic resource
- the second cryptographic resource includes the second public key.
- using the second public key baseline value to verify the integrity of the second public key may include: using the second public key baseline value to verify the second public key stored in the non-volatile memory. Second, the public key is used for integrity verification.
- the second cryptographic resource stored in the non-volatile memory passes the integrity verification, then, according to the second public key and the second cryptographic algorithm, the application program that is digitally signed by the second private key The image file is signed and verified.
- a secure startup can be performed based on the cryptographic algorithm that meets the requirements, which improves the security of the network device and the user experience thereof.
- updating the first cryptographic algorithm used for secure startup to the second cryptographic algorithm may include, for example, obtaining first indication information and second indication information, where the first indication information is used to uniquely identify the The second cryptographic algorithm, the second instruction information is used to instruct the network device to enable the second cryptographic algorithm; then, according to the first instruction information and the second instruction information, the second cryptographic algorithm is enabled Password algorithm.
- enabling the second cryptographic algorithm may be, for example, setting the use state of the second cryptographic algorithm to an enabled state.
- the setting the use state of the second cryptographic algorithm to the enabled state may include: setting the enable identification information corresponding to the second cryptographic algorithm to indicate that the use state of the second cryptographic algorithm is the enabled state .
- obtaining the first indication information and the second indication information may include, for example, obtaining a first update file, where the first update file carries the first indication information and the second indication information.
- the first update file may be, for example, a certificate.
- the format of the certificate can be customized, or the standard X.509 format (that is, the standard format of the cryptographic process certificate) can be used.
- the first update file can also be another file in any format that can carry the first instruction information and the second instruction information and can be recognized and parsed by the network device. In this embodiment of the application, the first update file is not specific. limited.
- the first update file may be signed using the first private key and the first cryptographic algorithm, wherein the network device uses the first password before using the second cryptographic resource for secure boot The resource is started securely, and the baseline information of the first cryptographic resource is used to verify the integrity of the first cryptographic resource used by the network device in the secure booting process, and the first cryptographic resource corresponds to the first cryptographic resource.
- the cryptographic algorithm and the first public key may further include a first public key, and the embodiment of the present application may further include: verifying the signature of the first update file according to the first cryptographic algorithm and the first public key.
- the first public key is the root public key of the network device or the first public key is a public key derived based on the root key of the network device, such as the secondary public key of the network device. It can be seen that when the verification of the first update file is passed, it is considered that the first update file has not been tampered with and the source is credible, and it is determined that the first update file is reliable, which can be based on the first indication information in the first update file and The second instruction information updates the password resource.
- the embodiment may further include: performing integrity verification on the first public key carried in the first update file based on the first public key baseline value, and if the integrity verification of the second public key is passed, then executing the The second cryptographic algorithm and the second public key verify the signature of the first update file, which is more secure.
- the device identification information is used to identify the network device.
- the device identification information of the network device includes any one of the following information: the chip identification in the network device, the hardware identification of the network device, the user identification to which the network device belongs, and the network device to which the network device belongs. The manufacturer ID of the device, the domain ID to which the device belongs, the IP address of the network device, the MAC address of the network device, or the network segment address to which the network device belongs.
- the device identification information in the first update file and the network device can be matched and verified. After the verification is passed, it is determined that the first update file is for the network device.
- the function file is implemented based on the first update to implement the method provided in the embodiment of this application to complete the secure startup of the network device.
- the first update file may also include third indication information and fourth indication information, where the third indication information is used to uniquely identify the first cryptographic algorithm, and the fourth indication The information is used to indicate the suspension of the use of the first cryptographic algorithm. According to the third instruction information and the fourth instruction information, the use of the first cryptographic algorithm is suspended. Wherein, the execution timing of suspending the use of the first cryptographic algorithm may be, for example, after updating the first cryptographic algorithm for secure startup to the second cryptographic algorithm.
- this embodiment of the present application may further include: acquiring third instruction information and fourth instruction information, where , The third indication information is used to uniquely identify the first cryptographic algorithm, and the fourth indication information is used to instruct to suspend the use of the first cryptographic algorithm.
- the third instruction information and the fourth instruction information for example, can be carried in the second update file. Then, acquiring the third instruction information and the fourth instruction information can be obtained from the second update file. Information and the fourth instruction information. In this way, the network device can suspend the use of the first cryptographic algorithm according to the third instruction information and the fourth instruction information.
- the network device suspends the execution timing of the first cryptographic algorithm, for example, after updating the first cryptographic algorithm for secure startup to the second cryptographic algorithm.
- the foregoing suspension of the use of the first cryptographic algorithm may include: disabling the first cryptographic algorithm or revoking the first cryptographic algorithm.
- disabling the first cryptographic algorithm may include, for example: setting the use state of the first cryptographic algorithm to a disabled state; and revoking the first cryptographic algorithm may include, for example: changing the first cryptographic algorithm
- the usage status of is set to revocation status.
- setting the use state of the first cryptographic algorithm to the revoked state may specifically be: setting the revocation identification information corresponding to the first cryptographic algorithm to indicate that the use state of the first cryptographic algorithm is the revoked state.
- the embodiment of the present application may further include, for example, obtaining a first update file, where the first update file is used to indicate that the second cryptographic algorithm is enabled.
- the embodiment of the present application may further include, for example, obtaining a second update file, where the second update file is used to instruct to revoke the first cryptographic algorithm.
- updating the first cryptographic algorithm for secure booting to the second cryptographic algorithm may include, for example, enabling the second cryptographic algorithm according to the first update file; and revoking the company according to the second update file. Describe the first cryptographic algorithm. In this way, the flexible adjustment of the cryptographic algorithm used for the secure startup of the network device is realized, and the security of the network device is improved.
- an embodiment of the present application also provides a communication device, which includes a transceiver unit and a processing unit.
- the transceiving unit is used to perform the transceiving operations performed by the communication device in the method provided in the first aspect or the second aspect;
- the processing unit is used to perform the transceiving operations performed by the communication device in the method provided in the first aspect or the second aspect. Operations other than those.
- the transceiving unit may be used to obtain the first indication information and the second indication information; the processing unit may be used to obtain the first indication information and the second indication information;
- the first indication information and the second indication information update the baseline information of the first cryptographic resource.
- the transceiving unit may be used to obtain the first indication information and the second indication information; the processing unit may be used to The first cryptographic algorithm for secure boot is updated to the second cryptographic algorithm, the baseline value of the first public key used for secure boot is updated to the second public key baseline value, and the second public key baseline value is used to pair the second public key The completeness is verified.
- an embodiment of the present application also provides a communication device, which includes a communication interface and a processor.
- the communication interface is used to perform the sending and receiving operations performed by the communication device in the method provided in the foregoing first aspect, any one of the possible implementations of the first aspect, the second aspect, or any one of the second implementations; processing;
- the device is used to perform the method provided by the communication device in the method provided by the foregoing first aspect, any one of the first aspect, any one of the first aspect, or any one of the second aspect, in addition to the above-mentioned transceiving operations Other operations.
- an embodiment of the present application also provides a communication device, which includes a memory and a processor.
- the memory includes computer-readable instructions; the processor in communication with the memory is used to execute the computer-readable instructions, so that the communication device is used to execute the above first aspect, any one of the possible implementation manners of the first aspect, The method provided by the second aspect or any one of the possible implementation manners of the second aspect.
- the communication device includes a security chip independent of the processor or processing unit, the security chip is connected to the processor or the processing unit, and the security chip uses Baseline information for storing password resources.
- the processor or processing unit of the communication device includes a one-time programmable storage space, and the one-time programmable storage space is used to store baseline information of a cryptographic resource.
- an embodiment of the present application also provides a security chip, which includes a communication interface and a secure storage entity.
- the storage entity stores baseline information of multiple cryptographic resources, and the multiple cryptographic resources respectively correspond to the cryptographic algorithm information and secret key information that the network device needs to use during multiple secure startup processes, and the value of each cryptographic resource
- the baseline information corresponds to each secure startup one-to-one, and the baseline information of each type of cryptographic resource is used to verify the integrity of the cryptographic resource used for each secure startup; wherein, the baseline information of the multiple cryptographic resources
- the baseline information of the first cryptographic resource and the baseline information of the second cryptographic resource are included; the baseline information of the first cryptographic resource is used to complete the first cryptographic resource used by the network device during the first secure boot It is verified that the first cryptographic resource corresponds to a first cryptographic algorithm and a first public key, the baseline information of the first cryptographic resource includes state information of the first cryptographic algorithm, and the state information of the first cryptographic algorithm is used for Indicates the use status of the first
- the security chip communicates with a processor through the communication interface, and the processor is used to manage baseline information of the multiple cryptographic resources stored in the security chip.
- the baseline information of the first cryptographic resource includes a first public key baseline value, and the first public key baseline value is used to verify the integrity of the first public key;
- the baseline information of the second cryptographic resource includes a second public key A public key baseline value, where the second public key baseline value is used to verify the integrity of the second public key.
- the first cryptographic algorithm includes any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the second cryptographic algorithm includes any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA, or cryptographic hash algorithm SM3.
- the state information of the first cryptographic algorithm may include first suspension identification information.
- the first suspension identification information may include revocation identification information and/or disabling identification information.
- the state information of the first cryptographic algorithm may also include first enable identification information.
- the state information of the second cryptographic algorithm may include second suspension identification information.
- the second suspension identification information may include revocation identification information and/or disabling identification information.
- the state information of the second cryptographic algorithm may also include second enable identification information.
- the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which when run on a computer, causes the computer to execute the first aspect and the first aspect above.
- the method provided by any possible implementation manner of the aspect, the second aspect, or any one of the possible implementation manners of the second aspect.
- the embodiments of the present application also provide a computer program product, including a computer program or computer readable instructions, when the computer program or the computer readable instructions are run on a computer, the computer can execute the aforementioned first aspect, A method provided by any possible implementation manner of the first aspect, the second aspect, or any possible implementation manner of the second aspect.
- FIG. 1 is a schematic diagram of a secure startup process of a network device in an embodiment of this application
- FIG. 2a is a schematic structural diagram of a network device 10 in an embodiment of this application.
- FIG. 2b is a schematic structural diagram of a network device 10 in an embodiment of this application.
- FIG. 3a is a schematic structural diagram of baseline information of cryptographic resources before the ECC algorithm is enabled in an embodiment of this application;
- FIG. 3b is a schematic structural diagram of baseline information of cryptographic resources after the ECC algorithm is enabled in an embodiment of the application;
- FIG. 3c is a schematic structural diagram of baseline information of cryptographic resources after the RSA algorithm is revoked in an embodiment of the application;
- FIG. 3d is another schematic diagram of the structure of baseline information of cryptographic resources before the ECC algorithm is enabled in an embodiment of this application;
- FIG. 4 is a schematic flowchart of a method 100 for managing password resources used for secure startup in an embodiment of this application;
- Figure 5a is a schematic structural diagram of a certificate 1 in an embodiment of the application.
- Figure 5b is a schematic structural diagram of a certificate 2 in an embodiment of the application.
- FIG. 6a is a schematic structural diagram of a Flash memory before updating in an embodiment of the application.
- FIG. 6b is a schematic structural diagram of an updated Flash memory in an embodiment of the application.
- FIG. 7 is a schematic flowchart of a method 200 for managing password resources used for secure startup in an embodiment of this application;
- Figure 8a is a schematic structural diagram of a certificate 3 in an embodiment of the application.
- FIG. 8b is a schematic diagram of the structure of a certificate 4 in an embodiment of the application.
- FIG. 9 is a schematic flowchart of a method 300 for secure startup in an embodiment of this application.
- FIG. 10 is a schematic flowchart of a method 400 for managing password resources used for secure startup in an embodiment of this application;
- FIG. 11 is a schematic flowchart of a method 500 for secure startup in an embodiment of this application.
- FIG. 12 is a schematic structural diagram of a communication device 1200 in an embodiment of this application.
- FIG. 13 is a schematic structural diagram of a communication device 1300 in an embodiment of this application.
- FIG. 14 is a schematic structural diagram of a communication device 1400 in an embodiment of this application.
- FIG. 15a is a schematic structural diagram of a communication device 1500 in an embodiment of this application.
- FIG. 15b is a schematic structural diagram of a communication device 1500 in an embodiment of this application.
- FIG. 16 is a schematic structural diagram of a security chip 1600 in an embodiment of the application.
- FIG 1 is a schematic diagram of a secure startup process of a network device.
- BSBC Bootrom Security Boot Code
- OS on-chip boot medium
- APP application
- a trusted signature system such as a certificate authority (English: Certificate Authority, abbreviation: CA) server
- CA Certificate Authority, abbreviation: CA
- the signature system uses cryptographic algorithm 1 to digitally sign Bootrom code, BootLoader code, OS code, and APP code to obtain Bootrom code signature 1, BootLoader code signature 2, OS code signature 3, and APP code signature 4.
- the BSBC can be regarded as the root of trust (English: Root of Trust, RoT for short) of the network device, there is no need to digitally sign the BSBC.
- the secure boot process of the network device may include, for example, after the network device is powered on, first execute the BSBC, and the BSBC uses the corresponding public key to verify the signature 1 of the Bootrom code, and executes the Bootrom only after the verification is passed; then, the Bootrom uses the corresponding The public key verifies the signature 2 of the BootLoader code, and executes BootLoader only after the verification is passed; then, BootLoader uses the corresponding public key to verify the signature 3 of the OS code, and after the verification is passed, it boots the execution of the OS; then, the OS uses the corresponding public key The key verifies the signature 4 of the APP code. After the verification is passed, the APP is executed. It should be noted that if any signature verification fails, it is determined that this safe boot fails.
- the digital signature process of the APP code can include: before the APP code is downloaded to the network device, the signature system first obtains the digital digest digest X1 of the APP code through a hash algorithm, and then uses the private key a to digitally sign the digest X1 to obtain digestEncode X1 .
- the APP code and digestEncode X1 are sent to the network device.
- the process of verifying the signature of the APP code can include: before loading the APP code, the network device can first use the same hash algorithm for signing the APP code to generate the digital digest digest X2, and then use the public key A to verify digestEncode X1 Sign digestDecode X3, and judge whether digestDecode X3 and digest X2 are the same. If they are the same, it can be determined that the APP code has not been tampered with and is issued by a legal manufacturer, thereby ensuring that the APP code loaded by the network device is safe and reliable.
- the private key a and the public key A are a pair of keys provided by the manufacturer of the network device, the public key A is publicly visible, and the private key a is confidential, and only the signature system corresponding to the manufacturer is visible.
- digital signature technology can be regarded as a combination of digital digest technology and public-private key technology. It can be used to verify whether the software package has been tampered with through digital digest technology, and it can also verify whether the digital digest is legal through public and private key technology. It is a safe startup The process provides fast and comprehensive software integrity protection and verification technology.
- the network device 10 includes a processor 110 and a Flash memory 130, and a secure storage entity 120 is integrated in the processor 110.
- the characteristic of the secure storage entity 120 is that the written content cannot be modified or erased.
- the secure storage entity 120 is a one-time programmable memory (English: One Time Programmable, abbreviated: OTP) in the processor 110, and the OTP
- OTP One Time Programmable
- the storage function can be realized by electric fuses (English: Electronic Fuses, abbreviated as: eFUSE) to ensure high security.
- the network device 10 includes a processor 110, a secure storage entity 120, and a non-volatile memory 130.
- the secure storage entity 120 is independent of the processor 110 and is used to provide secure storage space.
- the secure storage entity 120 For example, it may be an independent security chip, and the secure storage entity 120 and the processor 110 are in communication connection.
- the processor 110 communicates with the secure storage entity 120 and the non-volatile memory 130 respectively.
- the processor 110 usually consists of a central processing unit (English: Central Processing Unit, abbreviated as: CPU), a microprocessor (English: Microprocessor Unit, abbreviated as: MPU), a micro-control unit (English: Microcontroller Unit, abbreviated as: MCU), Field Programmable Gate Array (English: Field Programmable Gate Array, abbreviated as: FPGA) and other chip implementations with control capabilities are the starting point of the trust chain during the startup of the network device 10, and the integrity of the processor 110 is strictly protected by the hardware. It can be considered credible in the embodiments of this application.
- the non-volatile memory 130 is a non-volatile memory.
- the non-volatile memory 130 may be a memory that has electronic erasable and programmable performance and can quickly read data so that the data will not be lost due to power failure.
- the non-volatile memory 130 may be used to store BootLoader code, OS code, application program code and other data.
- the non-volatile memory 130 includes but is not limited to ROM, PROM, EAROM, EPROM, EEPROM, and Flash memory. In the following description, the non-volatile memory 130 is the Flash memory 130 as an example.
- a cryptographic algorithm and a public key baseline value corresponding to the cryptographic algorithm are preset in the processor 110 of the network device 10.
- the image file of the application stored in the Flash memory 130 is loaded into the static random access memory (English: Static Random-Access Memory, referred to as SRAM), based on the preset in the secure storage entity 120
- SRAM Static Random-Access Memory
- the baseline information of the cryptographic resource corresponding to the cryptographic algorithm is invoked to call the unique cryptographic algorithm preset in the processor 110 to verify the image file of the application program and complete the secure boot.
- the baseline information of the cryptographic resource includes the state information of the cryptographic algorithm and the baseline value of the public key corresponding to the cryptographic algorithm.
- the baseline value of the public key may be the plaintext of the public key or the hash value of the public key.
- the only password algorithm and public key baseline value used for secure startup are usually preset into the network equipment, and its content cannot be modified and updated online.
- the network equipment The preset unique password algorithm for secure boot may not meet the demand.
- the security protection strength of the unique cryptographic algorithm preset in the network equipment is reduced, and it is impossible to effectively protect the secure startup process of the network equipment;
- the embodiments of the present application provide a method for managing cryptographic resources used for secure startup, and the cryptographic algorithm used for secure startup can be adjusted online based on different requirements.
- the baseline information of the cryptographic resource is pre-stored in the secure storage entity of the network device.
- the baseline information of the cryptographic resource includes baseline information of multiple cryptographic resources, baseline information of multiple cryptographic resources and multiple There is a one-to-one correspondence between the cryptographic algorithms, and the baseline information of each cryptographic resource includes the state information of the corresponding cryptographic algorithm.
- a variety of cryptographic algorithms include cryptographic algorithm 1 and cryptographic algorithm 2, the baseline information 1 of cryptographic resources corresponding to cryptographic algorithm 1, baseline information of cryptographic resources 1 includes the state information of cryptographic algorithm 1, and the state information of cryptographic algorithm 1 is used to indicate The use state of cryptographic algorithm 1, the baseline information of cryptographic resources corresponding to cryptographic algorithm 2, and the baseline information of cryptographic resources 2 include the state information of cryptographic algorithm 2, and the state information of cryptographic algorithm 2 is used to indicate the use of cryptographic algorithm 2.
- the baseline information 1 of the cryptographic resource is used to verify the integrity of the cryptographic resource 1 used by the network device in the secure boot process, and the cryptographic resource 1 corresponds to the cryptographic algorithm 1 used by the network device during the secure boot.
- the baseline information 2 of the cryptographic resource is used to verify the integrity of the cryptographic resource 2 used by the network device in the secure boot process, and the cryptographic resource 2 corresponds to the network device performing the secure boot Used cryptographic algorithm 2 and public key A.
- the network device can obtain indication information 1 and indication information 2, where the indication information 1 is used to uniquely identify the cryptographic algorithm 1, and the indication information 2 is used to indicate that the network device is in a secure storage entity
- the stored baseline information 1 of the cryptographic resource is updated, so that the network device can update the baseline information 1 of the cryptographic resource corresponding to cryptographic algorithm 1 based on the instruction information 1 and instruction information 2, for example, the network device enable password Algorithm 1, another example, the network device aborts the password algorithm 1.
- the baseline information of multiple cryptographic resources in the secure storage entity of the network device when the cryptographic algorithm needs to be updated during the operation of the network device on the live network, the baseline information of the cryptographic resource corresponding to the cryptographic algorithm can be updated.
- To change the use status of the cryptographic algorithm to achieve the purpose of online adjustment of the cryptographic algorithm for secure startup based on different requirements, so that it is possible to adaptively perform secure startup according to different security requirements, and improve the security of network equipment .
- the embodiments of the present application provide a secure boot method, which can implement a secure boot of a network device based on a cryptographic algorithm that meets security requirements based on an online adjusted cryptographic algorithm.
- the multiple cryptographic algorithms pre-stored in the secure storage entity of the network device include cryptographic algorithm 1 and cryptographic algorithm 2.
- the network device can update cryptographic algorithm 2 for secure boot to cryptographic algorithm 1, and will use
- the public key baseline value a for secure startup is updated to the public key baseline value b; then, the public key baseline value b can be used to verify the integrity of the public key B, and the cryptographic algorithm 1 and the public key B that passed the integrity verification are used To verify the signature of the image file loaded during the secure boot process.
- the cryptographic algorithm can be updated to achieve different It is required to adjust the cryptographic algorithm for secure startup online, so that it is possible to flexibly call the corresponding cryptographic algorithm for secure startup according to different security requirements, and improve the security of network devices.
- the secure storage entity 120 of the network device 10 presets baseline information of cryptographic resources, and the baseline information of the cryptographic resources includes five cryptographic resources corresponding to five cryptographic algorithms.
- the baseline information of each cryptographic resource includes: two identification information and a public key baseline value.
- the five cryptographic algorithms are: RSA algorithm, ECC algorithm, SM2 algorithm, SHA algorithm and SM3 algorithm.
- the corresponding baseline information of the 5 types of cryptographic resources are: baseline information of cryptographic resources 1: enable identification information corresponding to ECC algorithm 2, suspension identification information 2 and public key baseline value 2, and baseline information of cryptographic resources 2: RSA algorithm correspondence Algorithm identification information 1, suspension identification information 1 and public key baseline value 1, baseline information of cryptographic resources 3: enable identification information corresponding to SM2 algorithm 3, suspension identification information 3 and public key baseline value 3, baseline information of cryptographic resources 4: Enable identification information corresponding to SHA algorithm 4, suspension identification information 4 and public key baseline value 4, and baseline information of cryptographic resources 5: enable identification information corresponding to SM3 algorithm 5, suspension identification information 5 and public key baseline value 5. It should be noted that each identification information cannot be modified once it is programmed.
- the enable identification information 2 has been programmed, it means that the status of the RSA algorithm is enabled, and the suspension identification information 2 is programmed, which means that the status of the RSA algorithm is In the suspended state, only the enable identification information corresponding to the cryptographic algorithm is in the enabled state and the suspended identification information is in the unsuspended state, can it be used as an effective cryptographic algorithm for safe startup.
- a cryptographic resource is stored in the Flash memory 130 of the network device 10, and the cryptographic resource may at least include a public key corresponding to a valid cryptographic algorithm.
- the Flash memory 130 also includes a mirror image file of the application digitally signed using a private key corresponding to a valid cryptographic algorithm.
- the structure of the baseline information of the password resource preset in the secure storage entity 120 of the network device 10 can be seen in FIG. 3a, where the enable identification information 2 is programmed, the position corresponding to the public key baseline value 2 is written into the public key baseline value a, and the other identification information and positions corresponding to the public key baseline value are all in the state to be programmed.
- the network device 10 After the network device 10 is powered on, it can firstly complete the storage of cryptographic resources (including at least the public key A corresponding to the RSA algorithm) in the Flash memory 130 based on the effective RSA algorithm in the secure storage entity 120 and the corresponding public key baseline value a.
- the security verification uses the password resource in the Flash memory 130 that has passed the verification to verify the signature of the image file of the application program. After the verification is passed, the image file of the application program is loaded to complete the secure booting of the network device 10.
- the public key baseline value a can be the hash value of the public key A or the plaintext of the public key A, and the private key A corresponding to the public key A is used to digitally sign the image file of the application.
- the network device 10 is configured to use the RSA algorithm when it leaves the factory. Based on the new requirements, the user needs to use the ECC algorithm for a secure boot. Then, the network device 10 obtains the certificate 1, and according to the certificate 1, the network device 10 updates For the baseline information of the cryptographic resource in the secure storage entity 120, the structure of the updated baseline information of the cryptographic resource can be seen in FIG. 3b. Compared with the structure shown in FIG. 3a, the difference is that the enable identification information 1 is burned , The position corresponding to the public key baseline value 1 is written into the public key baseline value b. In addition, the flash memory 130 of the network device 10 also updates the password resource and the image file of the application program.
- the updated password resource may at least include the public key B corresponding to the ECC algorithm.
- the image file of the updated application program corresponds to the public key B.
- the private key B is digitally signed.
- the network device 10 restarts, and can first perform a check on the cryptographic resources stored in the Flash memory 130 (including at least the public key B corresponding to the ECC algorithm) based on the effective ECC algorithm in the secure storage entity 120 and the corresponding public key baseline value b. Integrity verification is to verify the signature of the image file of the application program using the password resource that has passed the verification in the Flash memory 130. After the verification is passed, the image file of the application program is loaded to complete the secure booting of the network device 10.
- the network device 10 can also perform the failed RSA algorithm to ensure safety.
- the specific process of suspension may include: obtaining the certificate 2, according to the certificate 2, the network device 10 updates the baseline information of the cryptographic resource in the secure storage entity 120, and the structure of the updated baseline information of the cryptographic resource can be shown in FIG. 3c, Compared with the structure shown in FIG.
- the difference is: the suspension identification information 2 is burned, so that the RSA algorithm in the secure storage entity 120 of the network device 10 is suspended, which can effectively avoid the fallback attack, that is, effectively It is avoided that the replaced cryptographic algorithm that is not sufficiently secure or non-compliant is used for secure startup, and the security of the network device 10 is improved.
- the baseline information of the cryptographic resources in the secure storage entity of the network device can be safely updated in the live network environment, and the cryptographic algorithm that meets the requirements can be flexibly updated based on different security requirements.
- a secure boot is performed based on a cryptographic algorithm that meets the security requirements.
- the embodiment of the present application provides a method for managing password resources used for secure startup, which is suitable for network equipment or general embedded equipment and other equipment.
- the execution subject of the method may be, for example, network equipment.
- the processor in the network device is used to execute the following method 100 or method 200 to realize the management of cryptographic resources.
- the baseline information of cryptographic resources includes baseline information of multiple cryptographic resources, and the baseline information of multiple cryptographic resources corresponds to multiple cryptographic algorithms one-to-one, that is, the baseline information of each cryptographic resource uniquely corresponds to one.
- a cryptographic algorithm the baseline information of each cryptographic resource includes the state information of the unique corresponding cryptographic algorithm.
- multiple cryptographic algorithms can include at least cryptographic algorithm 1 and cryptographic algorithm 2
- the baseline information of multiple cryptographic resources corresponding to multiple cryptographic algorithms can at least include cryptographic resource baseline information 1 and cryptographic resource baseline information 2
- cryptographic resource baseline information Baseline information 1 includes state information 1 for indicating the use state of cryptographic algorithm 1
- baseline information 2 of cryptographic resources includes state information 2 indicating the state of use of cryptographic algorithm 2.
- the baseline information 1 of the password resource is used to verify the integrity of the password resource 1 used by the network device in the secure boot process, and the password resource 1 corresponds to the password used by the network device in the secure boot process.
- Algorithm 1 and public key B the baseline information of the cryptographic resource 2 is used to verify the integrity of the cryptographic resource 2 used by the network device in the secure boot process, and the cryptographic resource 2 corresponds to the network device performing the security Start the used cryptographic algorithm 2 and public key A.
- the baseline information of each cryptographic resource can also include the baseline value of the public key corresponding to each cryptographic algorithm in a variety of cryptographic algorithms. In one case, only the currently valid cryptographic algorithm is stored in the secure storage entity and the cryptographic algorithm has been suspended.
- the cryptographic algorithm corresponds to the public key baseline value, and the storage area is reserved for the cryptographic algorithm that has not been enabled and has not been suspended. It is used to store the corresponding public key baseline value. When the cryptographic algorithm is enabled, the corresponding The corresponding public key baseline value is written in the reserved storage area to ensure the effective progress of secure startup.
- the structure of the baseline information of the cryptographic resource of the cryptographic resource can be shown in FIG. 3a to FIG. 3c, for example.
- the corresponding public key baseline value is saved for each cryptographic algorithm, and the currently effective cryptographic algorithm and the public key baseline value corresponding to the cryptographic algorithm are used for secure startup, which corresponds to the above Figure 3a
- the structure of the baseline information of the cryptographic resource of the cryptographic resource can be referred to, for example, as shown in FIG. 3d.
- the suspension of the cryptographic algorithm can include two possible meanings of the disabling the cryptographic algorithm and the revocation of the cryptographic algorithm.
- Disabling a cryptographic algorithm means temporarily setting the cryptographic algorithm to an unavailable state, temporarily not using the cryptographic algorithm for secure startup, but you can re-enable the cryptographic algorithm according to actual needs in the future; revoking the cryptographic algorithm refers to terminating the use of the cryptographic algorithm ,
- the password algorithm is permanently invalid in the network equipment, and the password algorithm cannot be re-enabled in the future.
- the cryptographic algorithm 1 may be, for example, any of the following algorithms: RSA algorithm, ECC algorithm, SHA algorithm, SM3 algorithm, or SM2 algorithm.
- the cryptographic algorithm 2 may be, for example, any of the following cryptographic algorithms: RSA algorithm, ECC algorithm, SHA algorithm, SM3 algorithm, or SM2 algorithm.
- the cryptographic algorithm 2 and the cryptographic algorithm 1 are different.
- FIG. 4 is a schematic flowchart of a method 100 for managing password resources used for secure startup in an embodiment of this application.
- the method 100 may include, for example:
- indication information 1 and indication information 2 where indication information 1 is used to uniquely identify cryptographic algorithm 1, and indication information 2 is used to instruct network equipment to update baseline information 1 of cryptographic resources of cryptographic resources stored in a secure storage entity .
- the network device can obtain the instruction information 1 and the instruction information 2.
- the manner in which the network device obtains the instruction information 1 and the instruction information 2 includes but is not limited to: method one, the network device receives an update instruction sent by the user or supplier, and the update instruction is used to instruct to update the baseline information 1 of the cryptographic resource,
- the update instruction carries the instruction information 1 and the instruction information 2.
- a user or a supplier sends a command line to a network device through a network manager.
- the command line is used to instruct to update the baseline information 1 of the password resource, and the command line carries the instruction information 1 and the instruction information 2.
- Manner 2 The network device obtains the update file 1, and the update file 1 includes the instruction information 1 and the instruction information 2.
- the update file 1 may be generated by the device corresponding to the user or supplier according to actual needs and sent to the network device; as another example, the update file 1 may also be generated by the user or supplier in the network device according to actual needs.
- Manner 3 The network device obtains the network device and directly establishes a communication connection with a trusted authentication tool, and the authentication tool stores instruction information 1 and instruction information 2.
- Method 4 The network device receives an update instruction sent by the user or supplier.
- the update instruction is used to instruct to update the baseline information 1 of the cryptographic resource.
- the network device sends a trusted device (such as a certificate authority) (English: Certificate Authority, abbreviated as: CA) server) Request to update file 1, and the requested update file 1 includes the instruction information 1 and instruction information 2.
- a trusted device such as a certificate authority
- CA Certificate Authority
- the method for the network device to obtain the update file 1 includes but is not limited to: Method 1: The network device receives an update instruction sent by a user or a supplier, and the update instruction Used to instruct to update the baseline information 1 of the password resource.
- the update instruction carries the update file 1.
- a user or supplier sends a command line to the network device through the network management system. The command line is used to indicate the baseline information 1 of the password resource.
- the update file 1 is carried in the command line; mode two, the network device receives an update instruction sent by the user or supplier, the update instruction is used to instruct to update the baseline information 1 of the cryptographic resource, in response to the update instruction ,
- the network device requests an update file 1 from a trusted device (such as a CA server); mode three, the network device directly establishes a communication connection with a trusted authentication tool, and the update file 1 is stored in the authentication tool.
- the tool directly transmits the update file 1 to the network device.
- the transmission protocol used by the network device to obtain the update file 1 or update instruction includes but is not limited to: Simple Network Management Protocol (English: Simple Network Management Protocol, abbreviated: SNMP), Network Configuration Protocol (English: Network Configuration Protocol, abbreviated: NETCONF) or YANG model.
- Simple Network Management Protocol English: Simple Network Management Protocol, abbreviated: SNMP
- Network Configuration Protocol English: Network Configuration Protocol, abbreviated: NETCONF
- YANG model YANG model.
- the instruction information 1 is used to uniquely identify the cryptographic algorithm 1.
- a binary value of several bits may be used to identify the indication information 1.
- the binary value corresponding to the 3-bit code can be used to represent different indication information 1.
- the processor presets the corresponding relationship between the encoding and the cryptographic algorithm shown in Table 1, so that the processor can determine the identified cryptographic algorithm according to the specific binary value corresponding to the indication information 1.
- the indication information 1 when the code is ⁇ 0,0,0 ⁇ , that is, when the corresponding binary value of the code is 0, the indication information 1 is used to identify the RSA algorithm; for another example, when the code is ⁇ 0,0 ,1 ⁇ , that is, when the binary value corresponding to the code is 1, the indication information 1 is used to identify the ECC algorithm.
- the indication information 1 may also be expressed in a bit mapping manner. As an example, as shown in Table 2, an 8-bit code can be set to represent different indication information 1, and each bit has a one-to-one correspondence with each cryptographic algorithm. The corresponding relationship between the preset bits in the processor and the cryptographic algorithm.
- the processor can determine the identified cryptographic algorithm according to the bit corresponding to the indication information 1. For example, as shown in Table 2 below, when the indication information 1 is 00000001, that is, the lowest position of the preset bit is 1, the indication information is used to uniquely identify the RSA algorithm; for another example, when the indication information 1 is 00000010, That is, when the second lowest bit of the preset bit is 1, the indication information is used to uniquely identify the ECC algorithm.
- Password algorithm name coding illustrate RSA algorithm 000 Asymmetric encryption algorithm RSA ECC algorithm 001 Elliptic Curve Cryptography ECC Algorithm SM2 algorithm 010 National secret asymmetric encryption algorithm SM2
- Password algorithm name coding illustrate RSA algorithm 00000001 Asymmetric encryption algorithm RSA ECC algorithm 00000010 Elliptic Curve Cryptography ECC Algorithm SM2 algorithm 00000100 National secret asymmetric encryption algorithm SM2
- the indication information 2 is used to instruct the network device to update the baseline information 1 of the cryptographic resource stored in the secure storage entity.
- the enable indication information 1 identifies The password algorithm 1, or, the password algorithm 1 is aborted.
- the indication information 2 may be used to indicate that the cryptographic algorithm 1 is enabled; as another example, the indication information 2 may also be used to indicate that the cryptographic algorithm 1 is suspended.
- the different meanings of the indication information 2 can be expressed by updating the value of a specific field in the file 1.
- the indication information 2 may be a field used to indicate the file type in the update file 1.
- the indication information 2 is used to indicate the enable password algorithm 1; when the update file 1 is used to indicate the file
- the value of the type field is 0, indicating that the update file 1 is a suspended file, then the indication information 2 is used to indicate the suspension of the cryptographic algorithm 1.
- the indication information 2 may also be a separate field in the update file 1.
- the specific meaning of the indication information 2 may be indicated by means of binary value or bit mapping.
- the update file 1 may include, in addition to the instruction information 1 and instruction information 2, also: Public key A and signature X.
- the signature X is obtained after digitally signing the update file 1 using the private key A and the cryptographic algorithm 2.
- the update file 1 may also carry the identification of the currently effective cryptographic algorithm 2 for verifying the update file 1.
- the verification process performed may include: S11, based on the identification of the cryptographic algorithm 2 in the update file 1, obtain the baseline information of the cryptographic resource corresponding to the cryptographic algorithm 2 in the baseline information of the cryptographic resource 2; S12, based on the enable identification information 2 and the suspension identification information 2 in the baseline information 2 of the cryptographic resource, determine that the cryptographic algorithm 2 is a valid cryptographic algorithm that is enabled and has not been suspended; S13, the network device obtains the corresponding cryptographic algorithm 2 The public key baseline value a in the baseline information 2 of the cryptographic resource, use the public key baseline value a to verify the integrity of the public key A in the update file 1; S14, the network device uses the cryptographic algorithm 2 and the verified public key A , Verify the signature X; S15, if the verification of the signature X is passed, it is determined that the update file 1 is complete and credible.
- the following S102 can be performed, for example, based on the indication information 1 and the indication
- the public key A in the aforementioned update file 1 may be the root public key of the network device; or, in order to reduce the number of exposures of the root private key, improve the security and reliability of the network device, and save data in the secure storage entity Storage resources, the public key A in the update file 1 can also be a public key derived from the root public key by the network device.
- the secondary public key of a network device is the primary public key
- the secondary public key refers to the result obtained by processing the root public key using a secure hash algorithm (English: Secure Hash Algorithm, abbreviated as: SHA) (for example, SHA256).
- SHA Secure Hash Algorithm
- the public key baseline value a pre-stored in the secure storage entity of the network device uniquely corresponds to the public key A, and is used to verify the integrity of the public key A.
- the public key baseline value a may be, for example, the plaintext or the public key of the public key A.
- the hash value of A On the one hand, the public key baseline value a is used to verify the integrity of the public key A carried in the update file 1. On the other hand, when the cryptographic algorithm 2 is valid, the public key baseline value a is used in the secure startup process of the network device Perform integrity verification on the public key A in the cryptographic resource stored in the flash memory.
- the update file 1 may also include device identification information of the network device, and the device identification information is used to identify the network device.
- the device identification information of a network device includes any one of the following information: the chip identification in the network device, the hardware identification of the network device, the user identification to which the network device belongs, the manufacturer identification to which the network device belongs, and the domain identification to which the device belongs , The IP address of the network device, the MAC address of the network device, or the network segment address to which the network device belongs.
- S15 in the verification process performed after the network device receives the update file 1 may include, for example, after the verification of the signature X is passed, the device identification information of the network device is obtained from the update file 1, and the device identification information is matched and verified. . If the device identification information of the network device matches the network device, the update file 1 is considered to be credible; otherwise, the update file 1 is considered to be untrustworthy, and S102 is no longer executed.
- the embodiments of the present application may further include: S16, obtaining baseline information 1 of the cryptographic resource corresponding to cryptographic algorithm 1 in the baseline information of the cryptographic resource; S17, based on cryptographic resource The enabling identification information 1 and the suspension identification information 1 in the baseline information 1, determine that the cryptographic algorithm 1 is a cryptographic algorithm that is not enabled and not suspended. In this way, it is ensured that the baseline information 1 of the cryptographic resource corresponding to the cryptographic algorithm 1 to be enabled is in a state that can be updated, and reliable verification is performed for performing the following S102.
- the update file 1 may also include: Public key B and signature Y.
- the signature Y is obtained after digitally signing the update file 1 using the private key B and the cryptographic algorithm 1.
- the update file 1 may also carry the identification of the currently valid cryptographic algorithm 1 for verifying the update file 1.
- the verification process performed may include: S21, based on the identification of the cryptographic algorithm 1 in the update file 1, obtain the baseline information of the cryptographic resource 1 in the cryptographic resource baseline corresponding to the cryptographic algorithm 1 Information 1; S22, based on the enable identification information 1 and the suspension identification information 1 in the baseline information 1 of the cryptographic resource, determine that the cryptographic algorithm 1 is a valid cryptographic algorithm that is enabled and has not been suspended; S23, the network device obtains the cryptographic algorithm 1 The public key baseline value b in the baseline information 1 of the corresponding cryptographic resource is used to verify the integrity of the public key B in the update file 1 using the public key baseline value b; S24, the network device uses the cryptographic algorithm 1 and the verified public key B, verify the signature Y; S25, if the verification of the signature Y is passed, it is determined that the update file 1 is complete and authentic.
- the following S102 may be executed, for example: based on the indication information 1 and the indication information 2
- the public key B in the aforementioned update file 1 may be the root public key of the network device or a public key derived from the root public key by the network device.
- the public key baseline value b pre-stored in the secure storage entity of the network device uniquely corresponds to the public key B, and is used to verify the integrity of the public key A.
- the public key baseline value b may be, for example, the plaintext or the public key of the public key B The hash value of B.
- the public key baseline value b is used to verify the integrity of the public key B carried in the update file 1.
- the public key baseline value b is used to Perform integrity verification on the public key B in the cryptographic resource stored in the flash memory.
- the update file 1 may also include device identification information of the network device, and the device identification information is used to identify the network device. Then, S25 in the verification process performed after the network device receives the update file 1 may include, for example, after the verification of the signature Y is passed, obtain the device identification information of the network device from the update file 1, and perform matching verification on the device identification information . If the device identification information of the network device matches the network device, the update file 1 is considered to be credible; otherwise, the update file 1 is considered to be untrustworthy, and S102 is no longer executed.
- the update file 1 may be, for example, a certificate.
- certificate 1 with cryptographic algorithm 1 enabled as shown in Figure 5a, for example, it can carry: certificate type, public key A, cryptographic algorithm 1, and signature X; in addition, certificate 1 can also carry public key baseline value b and cryptographic algorithm 2 and the device identification information of the network device.
- the certificate type can be used as the indication information 2 to indicate that the certificate 1 is an enabling certificate;
- the cryptographic algorithm 1 can be, for example, 001 or 00000010, which is used as the indication information 1 to indicate the ECC algorithm.
- the certificate 2 applied to the suspended cryptographic algorithm 1 as shown in FIG.
- the certificate 5b can carry: the certificate type, the cryptographic algorithm 1, the public key B, and the signature Y; in addition, the certificate 2 can also carry the device identification information of the network device.
- the certificate type can be used as the indication information 2 to indicate that the certificate 2 is a suspended certificate;
- the cryptographic algorithm 1 can be, for example, 000 or 00000001, which is used as the indication information 1 to indicate the RSA algorithm.
- the format of the certificate 1 and certificate 2 can be customized, or the standard X.509 format (that is, the standard format of the cryptographic process certificate) can be used.
- the format of the update file 1 is not specifically limited in the embodiments of the present application, as long as it can carry the instruction information 1 and the instruction information 2, any form of file can be used as the update file 1.
- the network device may set the use state of the cryptographic algorithm 1 to the enabled state based on the indication information 2.
- S102 may include, for example, setting the enable identification information 1 in the baseline information 1 of the cryptographic resource to indicate the cryptographic algorithm The use state of 1 is the enabled state.
- S102 may include, for example, setting the software status bit corresponding to cryptographic algorithm 1 to the enabled state.
- enabling cryptographic algorithm 1 may also mean enabling the password corresponding to cryptographic algorithm 1.
- the baseline information reserves the space to be written in the corresponding public key baseline value. Then, in S102, the baseline information 1 of the cryptographic resource is updated.
- the network device obtains the public key baseline value b corresponding to the cryptographic algorithm 1
- the public key baseline value b is stored in a secure storage entity.
- the public key baseline value b is written in a location corresponding to the public key baseline value 1 of the baseline information 1 of the cryptographic resource corresponding to the cryptographic algorithm 1 in the secure storage entity.
- the network device obtains the public key baseline corresponding to the cryptographic algorithm 1
- the value b may be: the network device obtains the public key baseline value b from the update file 1.
- the format of the baseline information of the cryptographic resource can be seen in Figure 3a.
- the baseline information of the cryptographic resource The format can be seen in Figure 3b.
- the password resource in the Flash memory and the image file of the application program can also be updated accordingly, in order to ensure that the network device can be based on the restart
- the newly enabled password algorithm 1 performs a secure boot.
- the password resource in the Flash memory is used to verify the integrity of the image file of the application program loaded by the network device
- the baseline information of the password resource in the secure storage entity is used to verify the integrity of the password resource in the Flash memory.
- the cryptographic resources in the updated Flash memory include at least but not limited to: the public key B corresponding to cryptographic algorithm 1.
- the password resource 1 can include at least the public key A
- the image file 1 of the application program can include: Bootrom code, Bootrom code signature 1, BootLoader code, BootLoader code signature 2, OS code, OS code signature 3, APP code and APP code signature 4, among which signature 1 to signature 4 are based on cryptographic algorithm 2 and password
- the private key A corresponding to Algorithm 2 is digitally signed.
- the process of secure booting based on cryptographic algorithm 2 may include: S31, network equipment is powered on; S32, based on baseline information 2 in the baseline information of the cryptographic resource before executing S102, perform cryptographic resource 1 in the Flash memory Integrity verification; S33, if the integrity verification of the password resource 1 in the Flash memory is passed, use the password resource 1 in the Flash memory to perform integrity verification on the mirror file 1 of the application to complete the secure boot.
- the structure of the Flash memory is shown in Figure 6b, where the password resource in the updated Flash memory is recorded as the password resource 2, and the password resource 2 can be at least Including the public key B corresponding to the cryptographic algorithm 1,
- the image file 2 of the application can include: Bootrom code, Bootrom code signature 1', BootLoader code, BootLoader code signature 2', OS code, OS code signature 3', APP The signature 4'of the code and the APP code, wherein the signature 1'to the signature 4'are digitally signed based on the cryptographic algorithm 1 and the private key B corresponding to the cryptographic algorithm 1.
- the process of securely booting based on cryptographic algorithm 1 may include: S41, network equipment is powered on; S42, based on the baseline information 1 of the cryptographic resource in the baseline information of the cryptographic resource after S102 is executed, and the password in the Flash memory Resource 2 performs integrity verification; S43, if the integrity verification of the password resource 2 in the Flash memory is passed, use the password resource 2 in the Flash memory to perform integrity verification on the mirror file 2 of the application to complete the secure boot.
- the Bootrom code, BootLoader code, OS code, and APP code in the application image file 2 can be the same as or different from the Bootrom code, BootLoader code, OS code, and APP code in the application image file 1.
- the software upgrade is performed while the baseline information of the password resource is updated, part or all of the code in the application mirror file 2 and the application mirror file 1 are different.
- the integrity verification of the cryptographic resource 2 in the Flash memory may include: S421, based on the cryptographic resource corresponding to the cryptographic algorithm 1.
- the public key baseline b in the baseline information 1 verifies the integrity of the public key B in the cryptographic resource 2 in the Flash memory.
- S421 may include, for example, calculating the hash value of the public key B in the cryptographic resource 2 in the Flash memory, and comparing Whether the hash value and the public key baseline value b are the same, if they are the same, it is determined that the integrity verification of the cryptographic resource 2 in the Flash memory has passed.
- S421 may include, for example, comparing whether the public key B and the public key baseline value b in the cryptographic resource 2 in the Flash memory are the same, If they are the same, it is determined that the integrity verification of the cryptographic resource 2 in the Flash memory has passed.
- S42 may also include: S422, verifying whether the cryptographic algorithm 1 in the baseline information 1 of the cryptographic resource and the cryptographic algorithm 1 in the cryptographic resource 2 are consistent.
- the network device may set the state of the cryptographic algorithm 1 to the suspended state based on the indication information 2.
- the suspension password algorithm 1 may include the disable password algorithm 1 and the revocation password algorithm 1.
- S102 may include, for example, disabling the cryptographic algorithm 1, that is, setting the use state of the cryptographic algorithm 1 to the disabled state.
- S102 may include, for example, the revocation of the cryptographic algorithm 1, that is, the use state of the cryptographic algorithm 1 is set to the revocation state.
- Set the use status of cryptographic algorithm 1 to the revocation status for example: set the revocation identification information 1 corresponding to cryptographic algorithm 1 to indicate that the use status of cryptographic algorithm 1 is the revocation status, that is, burn the revocation identification information corresponding to cryptographic algorithm 1 1.
- S102 can set the software status bit corresponding to cryptographic algorithm 1 to the disabled state, so that when there is a need to use cryptographic algorithm 1 later, it is convenient to reset the software status bit corresponding to cryptographic algorithm 1 It is the enabled state.
- the cryptographic algorithm 1 corresponding to the baseline information 1 of the cryptographic resource in the network device does not meet the current security requirements and has no possibility of being used back, or the baseline information 1 of the cryptographic resource is stored in the form of hardware programming .
- the revocation identification information 1 corresponding to the cryptographic algorithm 1 can be set to the revocation status. Once the revocation identification information 1 is set to the revocation status, the cryptographic algorithm 1 will always be invalid, and the cryptographic algorithm 1 cannot be used back.
- the preset condition may refer to: the network device uses a newly enabled cryptographic algorithm to perform a predetermined number of successful secure startups or the network device operates normally for a preset period of time after a successful secure startup.
- the format of the baseline information of the cryptographic resource can be seen in Figure 3a, 3b or 3d, and after the method 100 is executed, the format of the baseline information of the cryptographic resource can be seen in Shown in Figure 3c.
- the network device obtains the instruction information online, and presets the security storage entity of the network device based on the instruction information
- the baseline information of the password resource is updated to enable the password algorithm that meets the requirements or stop the password algorithm that does not meet the requirements.
- the baseline information of the updated password resource is used to start the network device securely, even if the password algorithm in the secure boot There is no need to recall and redesign the network equipment or the chip therein.
- the password resource can be updated conveniently and flexibly to meet the changed security requirements and realize online based on different requirements. Adjust different cryptographic algorithms to achieve the purpose of secure startup according to requirements, thereby improving the security of network equipment.
- the network device when the current cryptographic algorithm 2 cannot meet the demand, the network device can enable the new cryptographic algorithm 1, suspend the cryptographic algorithm 2, and manage cryptographic resources to meet the requirements. Based on this, the embodiment of the present application also provides a method 200 for managing password resources used for secure startup. As shown in FIG. 7, the method 200 may include, for example:
- S201 Obtain indication information 1 and indication information 2, where indication information 1 is used to uniquely identify cryptographic algorithm 1, and indication information 2 is used to indicate that cryptographic algorithm 1 is enabled.
- S201 may include: a network device obtains an update file 1, and the update file 1 carries instruction information 1 and instruction information 2.
- S203 Obtain indication information 3 and indication information 4.
- the indication information 3 is used to uniquely identify the cryptographic algorithm 2, and the indication information 4 is used to indicate the suspension of the use of the cryptographic algorithm 2.
- the cryptographic algorithm 2 in the baseline information of the suspended cryptographic resource may include, for example, two possible meanings of the disabled cryptographic algorithm 2 and the revocation cryptographic algorithm 2.
- the cryptographic algorithm 1 in S102 please refer to the related description of the suspended cryptographic algorithm 1 in S102.
- instruction information 3 and the instruction information 4 may be carried in the update file, and the method of obtaining the update file may refer to the related description of the method of obtaining the update file 1 in S101.
- the indication information 3 may be, for example, the encoded binary value corresponding to the cryptographic algorithm 2.
- the indication information 3 is ⁇ 0,0,0 ⁇ , which is used to identify the RSA algorithm; or, the indication information 3 may be, for example, the cryptographic algorithm 2.
- the corresponding bit position, for example, the indication information 3 is 00000001, which is used to identify the RSA algorithm.
- the instruction information 4 is used to instruct the network device to suspend the cryptographic algorithm 2. If the indication information 3 and the indication information 4 are carried in the update file, then, in a specific example, the value of a specific field in the update file can be used to indicate different meanings of the indication information 4.
- the indication information 4 may be a field used to indicate the file type in the update file. In another specific example, the indication information 4 may also be a separate field in the update file.
- the specific meaning of the indication information 4 may be indicated by means of binary value or bit mapping.
- S203 may be: the network device obtains the update file 2, and the update file 2 may include the indication information 3 and the indication information 4.
- Update file 2 and update file 1 are two different files for managing password resources.
- the file type of update file 1 is an enable file, and the type of update file 2 is a suspension file.
- the update file 2 may be generated by the device corresponding to the user or supplier according to actual needs and sent to the network device; another example: the update file 2 may also be configured on the network device by the user or supplier according to actual needs.
- the method for obtaining the update file 2 can refer to the related description of the method for obtaining the update file 1 in S101.
- the update file 2 may include the public key B and the signature Z in addition to the instruction information 3 and the instruction information 4.
- the signature Z is obtained by digitally signing the update file 2 using the private key B corresponding to the newly enabled cryptographic algorithm 1 and the cryptographic algorithm 1.
- the update file 2 may also include the identification of the currently effective cryptographic algorithm 1, which is used to verify the update file 2 and improve the security of the network device.
- the verification process performed may include: S51, based on the identification of the cryptographic algorithm 1 in the update file 2, obtain the baseline information of the cryptographic resource corresponding to the cryptographic algorithm 1 in the baseline information of the cryptographic resource 1; S52, based on the enable identification information 1 and the suspension identification information 1 in the baseline information 1 of the cryptographic resource, determine that the cryptographic algorithm 1 is a valid cryptographic algorithm that is enabled and has not been suspended; S53, the network device obtains the baseline of the cryptographic resource The public key baseline value b in the information 1 is used to verify the integrity of the public key B in the update file 2 using the public key baseline value b; S54, the network device uses the cryptographic algorithm 1 and the verified public key B to verify the signature Z ; S55, if the verification of the signature Z is passed, the update file 2 is considered to be complete and credible.
- the suspension identification information 2 in the baseline information 2 of the cryptographic resource corresponding to the cryptographic algorithm 2 is set to indicate the use of the cryptographic algorithm 2.
- the status is suspended.
- the public key B in the update file 2 can be the root public key of the network device; or, the public key B in the update file 2 can also be the public key derived from the root public key by the network device, such as the network device.
- the secondary public key of the device can be the public key of the device.
- the update file 2 may also include the device identification information of the network device.
- S55 in the verification process performed after the network device receives the update file 2 may include, for example, after the verification of the signature Z is passed, Obtain the device identification information of the network device from the update file 2, and perform matching verification on the device identification information. If the device identification information of the network device matches the network device, the update file 2 is considered to be credible; otherwise, the update file 2 is considered to be untrustworthy, and S204 is no longer executed.
- the update file carrying the instruction information may be, for example, a certificate.
- the update file 1 can be the certificate 1 shown in Fig. 5a
- the update file 2 can be as shown in Fig. 8a
- the certificate 3 can carry: the certificate type, the cryptographic algorithm 2, the public key B, and the signature Z; in addition, the certificate 3 can also carry the device identification information of the network device.
- the certificate type can be used as the indication information 4 to indicate that the certificate 3 is a suspended certificate
- the cryptographic algorithm 2 can be, for example, 000 or 00000001, as the indication information 3, which is used to indicate the RSA algorithm.
- one update file carries instruction information 1 and instruction information 2
- another update file carries instruction information 3 and instruction information 4.
- it can be controlled to enable and stabilize the new cryptographic algorithm. After being used for secure boot, the previously used cryptographic algorithm is suspended, which effectively avoids the problem of unsuccessful or unstable secure boot using the newly enabled cryptographic algorithm, which leads to network equipment not working properly, and improves the reliability of network equipment .
- S203 may be: the network device obtains the instruction information 3 and the instruction information 4 from the update file 1.
- the update file 1 may include instruction information 1 to instruction information 4.
- the file type of the update file 1 is an enable and a suspension file, that is, the update file 1 has the functions of enabling the cryptographic algorithm 1 and discontinuing the cryptographic algorithm 2.
- the value of the file type corresponding field of the update file can be 0, 1, and 2.
- the network device determines that the update file is an enable file; if If the value of the file type corresponding field of the update file 1 is 1, the network device determines that the update file is a suspended file; if the file type corresponding field of the update file 1 has a value of 2, then the network device determines that the update file is Enable and abort files.
- the update file 1 may also include: a public key A, a public key baseline value b, and a signature W.
- the signature W is obtained after digitally signing the update file 1 with the private key A and the cryptographic algorithm 2 corresponding to the invalid cryptographic algorithm 2.
- the verification process implemented before executing S202 can be referred to the above S11 ⁇ S15; before the implementation of S204, the verification process implemented can include: S61, the network device obtains the baseline information of the password resource in 2 Use the public key baseline value a to verify the integrity of the public key A in the update file 1; S62, the network device uses the cryptographic algorithm 2 and the verified public key A to verify the signature W; S63, If the verification of the signature W is passed, the update file 1 is considered to be complete and credible. In this way, the following S204 may be performed, for example: based on the indication information 3 and the indication information 4 in the update file 1, the suspension identification information 2 in the baseline information 2 of the cryptographic resource corresponding to the cryptographic algorithm 2 is set to the suspended state.
- the public key A in the update file 1 can be the root public key of the network device; or, the public key A in the update file 1 can also be a public key derived from the root public key by the network device, such as network The secondary public key of the device.
- the update file 1 may also include the device identification information of the network device.
- the verification process performed by the network device after receiving the update file 1 may include, for example: The device identification information of the network device is obtained in the update file 1, and the device identification information is matched and verified. If the device identification information of the network device matches the network device, the update file 1 is considered to be credible; otherwise, the update file 1 is considered to be untrustworthy, and S204 is no longer executed.
- the update file carrying the instruction information may be, for example, a certificate.
- the update file 1 can be, for example, the certificate 4 shown in Figure 8b.
- the certificate 4 can carry: certificate type, cryptographic algorithm 1, public key A, cryptographic algorithm 2 and signature W; in addition, the certificate 4 can also carry a public key baseline The value b and the device identification information of the network device.
- the certificate type can be used as indication information 2 and indication information 4, which are used to indicate that the certificate 4 is an enabling and suspending certificate;
- the cryptographic algorithm 1 can be, for example, 001 or 00000010, which is used as indication information 1, which is used to indicate the ECC algorithm;
- cryptographic algorithm 2 can be, for example, 000 or 00000001, as indication information 3, used to indicate the RSA algorithm.
- the signature W is obtained by digitally signing the certificate 4 using the cryptographic algorithm 2 and the private key A corresponding to the cryptographic algorithm 2.
- S203 may include: after the network device uses the newly enabled cryptographic algorithm 1 to securely boot the network device, the certificate 4 is verified by the above S61-S63, and the instruction information 3 and the certificate are obtained from the certificate 4 after the verification is passed. Instructing information 4, based on the following S204, the cryptographic algorithm 2 is suspended.
- one update file carries instruction information 1 to instruction information 4.
- only one update file can realize the enablement of the new cryptographic algorithm and the suspension of the previously used cryptographic algorithm. , To reduce the interaction of information in the network and save network resources.
- the network device can follow the instruction information 3 and the instruction information 4. Suspend cryptographic algorithm 2.
- the instruction information 3 and the instruction information 4 may be carried in the suspension instruction, or the network device may request the instruction information 3 and the instruction information 4 according to the instruction information 3 and the instruction information 4 from a trusted device in response to the instruction of the suspension instruction.
- the preset conditions for example, can refer to: the preset number of successful secure boot or the preset duration after the successful secure boot. The network device is operating normally. When the secure boot using the password algorithm 1 meets the preset conditions, it can be considered that the updated password is used.
- the cryptographic algorithm 1 and the public key baseline value b in the baseline information 1 of the resource can stably complete the secure startup.
- the network device configures a flag bit after S202
- the value of the flag bit is used to indicate that the cryptographic algorithm 1 is used for the first time. Then, after the network device restarts, it can be determined that the cryptographic algorithm 1 is used for the first time according to the flag bit, then the network device obtains the instruction information 3 and the instruction information 4, and suspends the cryptographic algorithm 2. In this way, the network device does not need to receive the suspend instruction, and can suspend the cryptographic algorithm 2 used before S202 through the indication of the flag bit.
- the flag bit can also be modified after the cryptographic algorithm 2 is suspended, so that the value of the flag bit is used to indicate that the cryptographic algorithm 1 is not used for the first time, so as to ensure that the subsequent cryptographic algorithm is no longer based on the indication of the flag bit. Aborted.
- the network device can set the use state of the cryptographic algorithm 2 to the disabled state or the revoked state based on the instruction information 4.
- S204 may include: disabling the identifier in the baseline information 2 of the cryptographic resource corresponding to the cryptographic algorithm 2 Information 2 is set to the disabled state or the revocation identification information 2 is set to the revocation state.
- S204 may include, for example, setting the software status bit corresponding to cryptographic algorithm 2 to a disabled state or a revoked state.
- the format of the baseline information of the cryptographic resource can be seen in FIG. 3a; after S202 of the method 200 is executed, the cryptographic resource The format of the baseline information can be shown in FIG. 3b; after S204 of the method 200 is executed, the structure of the baseline information of the cryptographic resource can be shown in FIG. 3c.
- the termination of the cryptographic algorithm 2 used before S202 can also be completed based on a strategy configured locally by the network device.
- the network device after the network device enables the password algorithm 1, the network device locally detects that there is no abnormality in the secure startup using the password algorithm 1 within the preset time period, or the password algorithm 1 is used to perform the preset number of secure startups. If it succeeds, it is determined that the conditions for suspending cryptographic algorithm 2 in the local policy are met, and cryptographic algorithm 2 is suspended. In this way, the network device does not need to receive an additional update file for suspending cryptographic algorithm 2, nor does it need to obtain instruction information 3 and instruction information 4 after enabling cryptographic algorithm 1.
- the local simplified configuration can not only avoid enabling cryptographic algorithm 1.
- the instruction information is obtained online, based on the baseline of the previously used cryptographic resource in the secure storage entity of the network device based on the instruction information.
- the information suspension can not only prevent the use of unqualified password algorithms for secure startup, but also overcome the problem that the secure startup of network equipment cannot meet the security requirements or user requirements, so that the network equipment can effectively adjust the security startup according to the needs. Password resources, thereby improving the security of network equipment.
- FIG. 9 is a schematic flowchart of another method 300 for secure startup in an embodiment of this application.
- the method 300 may include, for example:
- S301 may include: S301a, enabling cryptographic algorithm 1; S301b, discontinuing cryptographic algorithm 2.
- S301a enabling cryptographic algorithm 1 in the above method 100
- S201 to S202 in the above method 200
- S301b refer to the related description of the suspension password algorithm 1 in the above method 100, or refer to the related description of S203 to S204 in the above method 200.
- update file 1 is used to enable cryptographic algorithm 1
- update file 2 is used to suspend cryptographic algorithm 2.
- S301a may include, for example: Encryption algorithm 1
- S301b for example, may include: suspending encryption algorithm 2 according to the update file 2.
- the cryptographic algorithm 1 is the ECC algorithm
- the cryptographic algorithm 2 is the RSA algorithm
- the specific format of the update file 1 is the certificate 1 shown in Figure 5a
- the format of the update file 2 is shown in the certificate 3 shown in Figure 8a.
- the structure of the baseline information of the cryptographic resource in the secure storage entity of the network device can be seen in Figure 3a or Figure 3d; after performing S302, the structure of the baseline information of the cryptographic resource in the secure storage entity of the network device can be seen in Figure 3c.
- the update file 2 can also be used to revoke the password algorithm 2.
- S301b may include: according to the update file 2, the password algorithm 2 is revoked, for example.
- S301a may include, for example, enabling cryptographic algorithm 1 according to update file 1
- S301b may, for example, Including: According to the update file 1, the password algorithm 2 is suspended.
- the cryptographic algorithm 1 is the ECC algorithm
- the cryptographic algorithm 2 is the RSA algorithm
- the specific format of the update file 1 is the certificate 4 shown in Figure 8b
- the baseline information of the cryptographic resource in the secure storage entity of the network device The structure of can be seen in Figure 3a or Figure 3d; after S302 is executed, the structure of the baseline information of the cryptographic resource in the secure storage entity of the network device can be seen in Figure 3c.
- suspension of the use of cryptographic algorithm 2 can specifically be the disabling of cryptographic algorithm 2 or the revocation of cryptographic algorithm 2.
- enabling cryptographic algorithm 1 may also mean enabling the password corresponding to cryptographic algorithm 1.
- the public key baseline value b in the resource baseline information 1 indicates that the public key baseline value a used for secure startup is updated to the public key baseline value b.
- S302 may include, for example, storing the public key baseline value b in In the secure storage entity, for example, the public key baseline value b is written in a position corresponding to the public key baseline value 1 of the baseline information 1 of the cryptographic resource corresponding to the cryptographic algorithm 1 in the secure storage entity.
- the public key baseline value b corresponding to the cryptographic algorithm 1 can also be carried in the update file 1, then the network device obtains the public key baseline corresponding to the cryptographic algorithm 1
- the value b may be: the network device obtains the public key baseline value b from the update file 1.
- the public key baseline value b uniquely corresponds to the public key B, and is used to verify the integrity of the public key B.
- the public key baseline value b may be, for example, the plaintext of the public key B or the hash value of the public key B.
- the format of the baseline information of the cryptographic resource can be seen in Figure 3a.
- the baseline of the cryptographic resource After executing the above S301 ⁇ S302, the baseline of the cryptographic resource The format of the information can be seen in Figure 3b.
- the password resources in the Flash memory and the image file of the application program can also be updated accordingly to ensure that the security can be based on the newly enabled password algorithm 1 after the network device is restarted. start up.
- the password resource in the Flash memory is used to verify the integrity of the image file of the application program loaded by the network device
- the baseline information of the password resource in the secure storage entity is used to verify the integrity of the password resource in the Flash memory.
- the second cryptographic resource in the updated Flash memory includes at least but not limited to: the public key B corresponding to cryptographic algorithm 1.
- the method 300 may further include:
- the image file loaded during the safe boot process may include, but is not limited to, Bootrom code, BootLoader code, OS and APP code, for example.
- S304 refer to the corresponding description in FIG. 1.
- BSBC uses public key B and cryptographic algorithm 1 to verify the signature 1 of the Bootrom code, and executes Bootrom only after the verification is passed; then, Bootrom uses public key B and cryptographic algorithm 1 to pair The signature 2 of the BootLoader code is verified, and the BootLoader is executed after the verification is passed; then, the BootLoader uses the public key B and the cryptographic algorithm 2 to verify the signature 3 of the OS code, and after the verification is passed, it boots the execution of the OS; then, the OS uses the public key B And the password algorithm 1 verifies the signature 4 of the APP code.
- the APP is executed. It should be noted that the above-mentioned signatures 1 to 4 are all obtained by a trusted signature system based on the public key B and cryptographic algorithm 1 by digitally signing the Bootrom code, BootLoader code, OS and APP code.
- the credible signature system uses public key B and cryptographic algorithm 1 to digitally sign the APP code.
- the process can include: first use a hash algorithm to hash the APP code to obtain the digital digest digest Y1, and then use the private key B Digitally sign the digest Y1 to obtain the signature digestEncode Y1.
- the trusted signature system can send the APP code and digestEncode Y1 to the network device, and the APP code and digestEncode Y1 are stored in the Flash memory of the network device.
- the process of verifying the signature digestEncode Y1 of the APP code can include: before the network device loads the APP code, the APP code can be hashed using the same hash algorithm as the signature to generate the digital digest digest Y2 , And then use the public key B to verify digestEncode Y1 to obtain digestDecode Y3, and determine whether digestDecode Y3 and digest Y2 are the same. If they are the same, you can determine that the APP code has not been tampered with and is issued by a legal manufacturer, thus ensuring the network device The APP code to be loaded is safe and reliable.
- the private key B and the public key B are a pair of keys provided by the manufacturer of the network device, the public key B is publicly visible, and the private key B is confidential, and only the signature system corresponding to the manufacturer is visible.
- the network device will update the cryptographic algorithm used for secure startup and the corresponding public key baseline value online to enable compliance
- the required cryptographic algorithm in this way, through the convenient and flexible enabling of the new cryptographic algorithm, the secure startup of the network device using the newly-enabled cryptographic algorithm is realized without the need to recall the network device or the chip in it to make it safe Start to meet changing security requirements, and realize online adjustment of different cryptographic algorithms based on different requirements to achieve the purpose of securely booting in accordance with the cryptographic algorithm that meets the requirements, thereby improving the security of network devices.
- FIG. 10 shows a schematic flowchart of a method 400 for managing network resources in an embodiment of the present application.
- the method 400 is implemented by a network device.
- the method 400 for managing network resources may include, for example:
- the baseline information of the cryptographic resource is updated, where the baseline information of the first cryptographic resource is used to verify the integrity of the first cryptographic resource used by the network device in the secure boot process, and the first cryptographic resource corresponds to For the first cryptographic algorithm and the first public key used by the network device to perform the secure boot, the baseline information of the first cryptographic resource includes state information of the first cryptographic algorithm, and the first cryptographic algorithm
- the status information of is used to indicate the use status of the first cryptographic algorithm
- S402. Update the baseline information of the first cryptographic resource according to the first indication information and the second indication information.
- the first cryptographic algorithm among the multiple cryptographic algorithms can be any of the following algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the secure storage entity may be a one-time programmable storage space in the processor; or, in another case, the secure storage entity may also be a secure chip independent of the processor.
- the network device in the method 400 may specifically be the network device in the above method 100 or the network device in the method 200.
- S401 to S402 may refer to S101 to S102 in method 100 or S201 to S202 in method 200.
- the first instruction information may be instruction information 1 in method 100 or method 200
- the second instruction information may be instruction information 2 in method 100 or method 200
- the first cryptographic algorithm may be a password in method 100 or method 200.
- Algorithm 1 The baseline information of the first cryptographic resource may be baseline information 1 of the cryptographic resource in method 100.
- the second indication information is specifically used to indicate that the first cryptographic algorithm is enabled.
- updating the baseline information of the first cryptographic resource in S402 may include, for example, changing the state information of the first cryptographic algorithm to set the use state of the first cryptographic algorithm to the enabled state.
- Setting the use state of the first cryptographic algorithm to the enabled state may include: setting the enable identification information corresponding to the first cryptographic algorithm to indicate that the use state of the first cryptographic algorithm is the enabled state.
- S402 may include, for example: enabling the baseline information of the first cryptographic resource corresponding to the first cryptographic algorithm The identification information is set to the enabled state.
- S402 may include, for example, setting the software status bit corresponding to the first cryptographic algorithm to the enabled state.
- the updated baseline information of the first cryptographic resource further includes a first public key baseline value
- the first public key baseline value is used to verify the integrity of the first public key.
- enabling the first cryptographic algorithm may also mean enabling the first cryptographic algorithm corresponding to the cryptographic algorithm.
- the baseline value of the first public key in the baseline information of a cryptographic resource if there are multiple preset cryptographic algorithms, only the baseline value of the public key corresponding to the cryptographic algorithm that has been enabled is stored in the secure storage entity, and the cryptographic resource corresponding to the cryptographic algorithm that is not enabled is stored in the secure storage entity.
- updating the baseline information of the first cryptographic resource in S402 may include: the network device obtains the first public key baseline value corresponding to the first cryptographic algorithm Storing the first public key baseline value in a secure storage entity, for example, writing the first public key baseline value in a location corresponding to the baseline information of the first cryptographic resource corresponding to the first cryptographic algorithm in the secure storage entity.
- the first indication information and the second indication information are carried in the first update file
- the first public key baseline value corresponding to the first cryptographic algorithm can also be carried in the first update file
- the network device obtains the first update file.
- the first public key baseline value corresponding to the cryptographic algorithm may be: the network device obtains the first public key baseline value from the first update file.
- the baseline value of the first public key is the hash value of the first public key or the plaintext of the first public key.
- the baseline value of the first public key uniquely corresponds to the first public key, and is used to verify the integrity of the first public key.
- the baseline value of the first public key is used to verify the value of the first public key carried in the first update file. Integrity; on the other hand, when the first cryptographic algorithm is valid, the first public key baseline value is used to complete the integrity of the first public key in the cryptographic resources stored in the non-volatile memory during the secure startup of the network device verify.
- the method 400 may further include: updating the second cryptographic resource in the non-volatile memory to the first cryptographic resource, and the updated first cryptographic resource includes all the cryptographic resources.
- the first cryptographic algorithm and the first public key are described.
- the method 400 may further include: performing a secure boot based on the updated baseline information of the first cryptographic resource.
- the secure boot process may include, for example, pairing based on the updated baseline information of the first cryptographic resource.
- the updated baseline information of the first cryptographic resource includes a first public key baseline value
- the updated baseline information of the first cryptographic resource is based on the updated baseline information stored in the non-volatile memory.
- Performing integrity verification on the first cryptographic resource may include, for example, using the first public key baseline value to perform integrity verification on the first public key stored in the non-volatile memory.
- the first update file may be, for example, a certificate.
- the format of the certificate can be customized, or the standard X.509 format (that is, the standard format of the cryptographic process certificate) can be used.
- the first update file can also be another file in any format that can carry the first instruction information and the second instruction information and can be recognized and parsed by the network device.
- the first update file is not specifically limited in the embodiment of the present application. .
- the first update file is signed using a second private key and a second cryptographic algorithm
- the multiple cryptographic algorithms include the second cryptographic algorithm
- the secure storage entity stores a baseline of the second cryptographic resource Information
- the baseline information of the second cryptographic resource is used to verify the integrity of the second cryptographic resource used by the network device in the secure boot process
- the second cryptographic resource corresponds to the second cryptographic algorithm and The second public key
- the network device uses the second cryptographic resource to perform a secure boot before using the first cryptographic resource to perform a secure boot
- the first update file further includes the second public key
- the method 400 may further include: verifying the signature of the first update file according to the second cryptographic algorithm and the second public key.
- the second public key is the root public key of the network device or the second public key is a public key derived based on the root key of the network device, for example, may be the secondary public key of the network device. It can be seen that when the verification of the first update file is passed, it is considered that the first update file has not been tampered with and the source is credible, and it is determined that the first update file is reliable, which can be based on the first indication information in the first update file and The second instruction information updates the password resource.
- the second public key baseline value is preset in the secure storage entity, and then the first public key is verified according to the second cryptographic algorithm and the second public key.
- the method 400 may further include: performing integrity on the second public key carried in the first update file based on the second public key baseline value stored in the secure storage entity Verification: If the integrity verification of the second public key is passed, the verification of the signature of the first update file according to the second cryptographic algorithm and the second public key is performed, and the security is higher.
- the first update file may further include device identification information of the network device, and the device identification information is used to identify the network device.
- the device identification information of the network device includes any one of the following information: the chip identification in the network device, the hardware identification of the network device, the user identification to which the network device belongs, and the network device to which the network device belongs. The manufacturer ID of the device, the domain ID to which the device belongs, the Internet Protocol IP address of the network device, the media access control MAC address of the network device, or the network segment address to which the network device belongs.
- the device identification information in the first update file and the network device can also be matched and verified. After the verification is passed, it is determined that the first update file is for the network device, based on The first update implements the method 400 to complete the update of the cryptographic resource.
- the secure storage entity also stores baseline information of a second cryptographic resource, and the baseline information of the second cryptographic resource is used to determine the second cryptographic resource used by the network device in the secure boot process.
- Two cryptographic resources are used for integrity verification, the second cryptographic resource corresponds to a second cryptographic algorithm and a second public key, and the network device uses the second cryptographic resource to perform a secure boot.
- the method 400 may further include: obtaining third indication information and fourth indication information, where the third indication information is used to uniquely identify the second cryptographic algorithm, and the fourth indication The information is used to indicate the suspension of the use of the second cryptographic algorithm.
- the third indication information and the fourth indication information may be carried in the first update file, that is, the first indication information, the second indication information, the third indication information, and the fourth indication information are all carried in the first update file middle.
- the third indication information and the fourth indication information may also be carried in the second update file, that is, the first indication information and the second indication information are carried in the first update file, and the third indication information and the fourth indication information are carried in the first update file.
- the instruction information is carried in the second update file.
- the second update file may be a certificate or another file in any format that can be recognized and parsed by the network device, and the second update file is not specifically limited in the embodiment of the present application.
- the method 400 may further include: suspending the use of the second cryptographic algorithm according to the third instruction information and the fourth instruction information.
- suspending the use of the second cryptographic algorithm for example, may include: suspending the use of the second cryptographic algorithm after the baseline information of the first cryptographic resource is updated.
- the foregoing suspension of the use of the second cryptographic algorithm may include: disabling the second cryptographic algorithm or revoking the second cryptographic algorithm.
- disabling the second cryptographic algorithm may, for example, include: setting the use state of the second cryptographic algorithm to a disabled state; and revoking the second cryptographic algorithm may include, for example: changing the second cryptographic algorithm The usage status of is set to revocation status.
- setting the use state of the second cryptographic algorithm to the revoked state may specifically be: setting the revocation identification information corresponding to the second cryptographic algorithm to indicate that the use state of the second cryptographic algorithm is the revoked state.
- the second cryptographic algorithm may be any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the first cipher algorithm and the second cipher algorithm are different cipher algorithms.
- the foregoing related embodiments regarding the suspension of the second cryptographic algorithm can be specifically referred to the operations performed by the network device in S203 to S204 in the foregoing method 200.
- the third indication information may be indication information 3 in method 200
- the fourth indication information may be indication information 4 in method 200
- the second cryptographic algorithm may be cryptographic algorithm 2 in method 200.
- the second indication information is specifically used to instruct the network device to stop using the first cryptographic algorithm.
- updating the baseline information of the first cryptographic resource in S402 is specifically: changing the state information of the first cryptographic algorithm to set the use state of the first cryptographic to a suspended state.
- the foregoing suspension of the use of the first cryptographic algorithm may include: disabling the first cryptographic algorithm or revoking the first cryptographic algorithm.
- updating the baseline information of the first cryptographic resource may include, for example: changing the state information of the first cryptographic algorithm to change the status information of the first cryptographic algorithm.
- the use state is set to the disabled state; in the case of revoking the first cryptographic algorithm, updating the baseline information of the first cryptographic resource may, for example, include: changing the state information of the first cryptographic algorithm to change the state information of the first cryptographic algorithm.
- the use state of the first password is set to a revoked state.
- the state information of the first cryptographic algorithm includes revocation identification information
- the changing the state information of the first cryptographic algorithm to set the use state of the first password to the revocation state includes: setting the revocation identification Information to set the use state of the first cryptographic algorithm to a revoked state.
- the third indication information may be indication information 1 in method 100
- the fourth indication information may be indication information 2 in method 100
- the first cryptographic algorithm may be cryptographic algorithm 1 in method 100.
- the network device can enable a new cryptographic algorithm, and after using the newly enabled cryptographic algorithm to securely start the network device, stop the cryptographic algorithm that cannot meet the requirements, making the cryptographic algorithm that does not meet the requirements It is no longer used for the safe startup of network equipment, and realizes a safe startup that meets the requirements, thereby improving the security of the network equipment.
- the network device obtains the instruction information online, and pre-registers the security storage entity of the network device based on the instruction information.
- the baseline information of the set password resource is updated, and the password algorithm that meets the requirements is enabled or the password algorithm that does not meet the requirements is enabled.
- the baseline information of the updated password resource is used to securely start the network device, even if the password in the secure boot
- the requirements of the algorithm are changed, and there is no need to recall the network equipment or the chip therein.
- the password resource can be updated conveniently and flexibly to meet the changed security requirements, and realize the requirements based on different requirements. Different password algorithms can be adjusted online to achieve the purpose of secure startup according to requirements, thereby improving the security of network equipment.
- FIG. 11 shows a schematic flowchart of a method 500 for secure startup in an embodiment of the present application.
- the method 500 is implemented by a network device.
- the method 500 for secure startup may include, for example:
- S502 Update the baseline value of the first public key used for secure startup to the baseline value of the second public key
- the first cryptographic algorithm in the multiple cryptographic algorithms can be any of the following algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the second cryptographic algorithm can be any of the following algorithms: RSA, ECC algorithm, SM2, SHA, or SM3.
- the first cipher algorithm is different from the second cipher algorithm.
- the secure storage entity used to securely store the baseline information of the password resource in the network device may be a one-time programmable storage space in the processor; or, in another case, the secure storage entity It can also be a processor-independent security chip.
- the baseline information of the cryptographic resource may include baseline information of the first cryptographic resource and baseline information of the second cryptographic resource.
- the baseline information of the first cryptographic resource includes the state information of the first cryptographic algorithm, and the state information of the first cryptographic algorithm is used to indicate the use state of the first cryptographic algorithm.
- the baseline information of the second cryptographic resource includes the first cryptographic algorithm. 2. State information of the cryptographic algorithm, where the state information of the second cryptographic algorithm is used to indicate the use state of the second cryptographic algorithm.
- the baseline information of the first cryptographic resource is used to verify the integrity of the first cryptographic resource used by the network device in the secure startup process, and the first cryptographic resource corresponds to the network device performing the security The first cryptographic algorithm and the first public key used for startup; similarly, the baseline information of the second cryptographic resource is used to verify the integrity of the second cryptographic resource used by the network device in the secure startup process, The second cryptographic resource corresponds to a second cryptographic algorithm and a second public key used by the network device to perform the secure boot. Then, after S502, the baseline information of the second cryptographic resource can be used to verify the integrity of the second cryptographic resource, and the second cryptographic resource that has passed the integrity verification can be used to verify the image file loaded during the secure boot process.
- the network device in the method 500 may specifically be the network device in the above-mentioned method 300, and related operations may refer to the operations performed by the network device in the method 300.
- S501 to S503 refer to S301 to S303 in the method 300.
- the first cryptographic algorithm can be cryptographic algorithm 1 in method 300
- the second cryptographic algorithm can be cryptographic algorithm 2 in method 300
- the first public key baseline value can be the public key baseline value a in method 300
- the second cryptographic algorithm can be the public key baseline value a in method 300
- the public key baseline value may be the public key baseline value b in the method 300
- the second public key may be the public key B in the method 300.
- updating the first cryptographic algorithm to the second cryptographic algorithm in S501 may include: S501a, suspending the first cryptographic algorithm; S501b, enabling the second cryptographic algorithm.
- the suspension of the first cryptographic algorithm in S501b includes two possible meanings of revoking the first cryptographic algorithm or disabling the first cryptographic algorithm.
- the method 500 may further include: if the second public key passes the integrity verification, the network device can use the second public key and the second cryptographic algorithm to perform the The loaded image file is verified.
- the second public key baseline value in S502 may be preset at all.
- enabling the second cryptographic algorithm also means that the second public key baseline value in the baseline information of the second cryptographic resource corresponding to the cryptographic second code algorithm is enabled.
- the network device may also obtain the first public key baseline value corresponding to the first cryptographic algorithm.
- S502 may include: obtaining the second public key baseline value ; Save the second public key baseline value to the secure storage entity of the network device.
- the manner of obtaining the baseline value of the second public key may include, for example, obtaining a first update file, the first update file carrying the second public key baseline value; and obtaining the second public key from the first update file.
- Key baseline value Save the second public key baseline value in the secure storage entity of the network device.
- the second public key may be written into the second public key at a location corresponding to the baseline information of the second cryptographic resource corresponding to the second cryptographic algorithm in the secure storage entity. Key baseline value.
- the baseline value of the second public key is the hash value of the second public key or the plaintext of the second public key.
- the second public key baseline value uniquely corresponds to the second public key, and is used to verify the integrity of the second public key.
- the second public key baseline value is used to verify the second public key carried in the first update file. Integrity; on the other hand, when the second cryptographic algorithm is valid, the second public key baseline value is used to complete the integrity of the second public key in the cryptographic resources stored in the non-volatile memory during the secure startup of the network device verify.
- the method 500 may further include: updating the first cryptographic resource used for secure boot stored in the non-volatile memory to the second cryptographic resource, and the first cryptographic resource is The second cryptographic resource includes the second public key.
- the S503 may include, for example, using the second public key baseline value to perform integrity verification on the second public key stored in the non-volatile memory. If the second cryptographic resource stored in the non-volatile memory passes the integrity verification, then, according to the second public key and the second cryptographic algorithm, the application program that is digitally signed by the second private key The image file is signed and verified. In this way, through this embodiment, after flexibly updating the cryptographic algorithm that meets the requirements, a secure startup can be performed based on the cryptographic algorithm that meets the requirements, which improves the security of the network device and the user experience thereof.
- the updating of the first cryptographic algorithm for secure booting to the second cryptographic algorithm in S501 may include: acquiring first indication information and second indication information, where the first indication information is used to uniquely identify the first indication information. 2.
- a cryptographic algorithm the second instruction information is used to instruct the network device to enable the second cryptographic algorithm; then, the second cryptographic algorithm is enabled according to the first instruction information and the second instruction information algorithm.
- enabling the second cryptographic algorithm may be, for example, setting the use state of the second cryptographic algorithm to an enabled state.
- the setting of the use state of the second cryptographic algorithm to the enabled state may include: setting the enable identification information corresponding to the second cryptographic algorithm to indicate that the use state of the second cryptographic algorithm is the enabled state.
- obtaining the first indication information and the second indication information may include, for example, obtaining a first update file, where the first update file carries the first indication information and the second indication information.
- the first update file may be, for example, a certificate.
- the format of the certificate can be customized, or the standard X.509 format (that is, the standard format of the cryptographic process certificate) can be used.
- the first update file can also be another file in any format that can carry the first instruction information and the second instruction information and can be recognized and parsed by the network device. In this embodiment of the application, the first update file is not specific. limited.
- the first update file may be signed using the first private key and the first cryptographic algorithm, wherein the network device uses the first password before using the second cryptographic resource for secure boot The resource is started securely, and the baseline information of the first cryptographic resource is used to verify the integrity of the first cryptographic resource used by the network device in the secure booting process, and the first cryptographic resource corresponds to the first cryptographic resource.
- the cryptographic algorithm and the first public key may further include a first public key, and the method 500 may further include: verifying the signature of the first update file according to the first cryptographic algorithm and the first public key.
- the first public key is the root public key of the network device or the first public key is a public key derived based on the root key of the network device, such as the secondary public key of the network device. It can be seen that when the verification of the first update file is passed, it is considered that the first update file has not been tampered with and the source is credible, and it is determined that the first update file is reliable, which can be based on the first indication information in the first update file and The second instruction information updates the password resource.
- the The method 500 may further include: performing integrity verification on the first public key carried in the first update file based on the first public key baseline value, and if the integrity verification of the second public key is passed, then executing the basis The second cryptographic algorithm and the second public key verify the signature of the first update file, which is more secure.
- the device identification information is used to identify the network device.
- the device identification information of the network device includes any one of the following information: the chip identification in the network device, the hardware identification of the network device, the user identification to which the network device belongs, and the network device to which the network device belongs. The manufacturer ID of the device, the domain ID to which the device belongs, the IP address of the network device, the MAC address of the network device, or the network segment address to which the network device belongs.
- the device identification information in the first update file and the network device can be matched and verified. After the verification is passed, it is determined that the first update file is for the network device.
- the file of effect is implemented based on the first update to implement the method 500 to complete the secure startup of the network device.
- the first update file may also include third indication information and fourth indication information, where the third indication information is used to uniquely identify the first cryptographic algorithm, and the fourth indication The information is used to indicate the suspension of the use of the first cryptographic algorithm. According to the third instruction information and the fourth instruction information, the use of the first cryptographic algorithm is suspended. Wherein, the execution timing of suspending the use of the first cryptographic algorithm may be, for example, after updating the first cryptographic algorithm for secure startup to the second cryptographic algorithm.
- the method 500 may further include: acquiring third instruction information and fourth instruction information, where: The third indication information is used to uniquely identify the first cryptographic algorithm, and the fourth indication information is used to instruct to suspend the use of the first cryptographic algorithm.
- the third instruction information and the fourth instruction information can be carried in the second update file. Then, acquiring the third instruction information and the fourth instruction information can be obtained from the second update file. Information and the fourth instruction information. In this way, the network device can suspend the use of the first cryptographic algorithm according to the third instruction information and the fourth instruction information. The network device suspends the execution timing of the first cryptographic algorithm, for example, after updating the first cryptographic algorithm for secure startup to the second cryptographic algorithm.
- the foregoing suspension of the use of the first cryptographic algorithm may include: disabling the first cryptographic algorithm or revoking the first cryptographic algorithm.
- disabling the first cryptographic algorithm may include, for example: setting the use state of the first cryptographic algorithm to a disabled state; and revoking the first cryptographic algorithm may include, for example: changing the first cryptographic algorithm
- the usage status of is set to revocation status.
- setting the use state of the first cryptographic algorithm to the revoked state may specifically be: setting the revocation identification information corresponding to the first cryptographic algorithm to indicate that the use state of the first cryptographic algorithm is the revoked state.
- the method 500 may further include, for example, obtaining a first update file, where the first update file is used to indicate that the second cryptographic algorithm is enabled.
- the method 500 may further include, for example, obtaining a second update file, where the second update file is used to instruct to revoke the first cryptographic algorithm.
- S501 may include, for example, enabling the second cryptographic algorithm according to the first update file; and revoking the first cryptographic algorithm according to the second update file. In this way, the flexible adjustment of the cryptographic algorithm used for the secure startup of the network device is realized, and the security of the network device is improved.
- the network device online updates the cryptographic algorithm used for secure startup and the corresponding public key baseline value, and enables Comply with the required cryptographic algorithm.
- the newly enabled cryptographic algorithm can be used to securely start the network device without the need to recall the network device or the chip in it to redesign it. Secure startup meets changing security requirements, and realizes online adjustment of different cryptographic algorithms based on different requirements to achieve the purpose of secure startup according to the cryptographic algorithm that meets the requirements, thereby improving the security of network devices.
- an embodiment of the present application also provides a communication device 1200, as shown in FIG. 12.
- the communication device 1200 includes a transceiver unit 1201 and a processing unit 1202.
- the transceiving unit 1201 is used to perform the transceiving operations implemented by the network device in any one of the embodiments shown in the above method 100 to method 500;
- the processing unit 1202 is used to perform the network in any one of the embodiments shown in the above method 100 to method 500 Operations performed by the device except for receiving and sending operations.
- the transceiving unit 1201 may be used to obtain the instruction information 1 and the instruction information 2; the processing unit 1202 may be used to obtain the instruction information according to the instruction information 1 and instruction information 2, update the baseline information 1 of the cryptographic resource corresponding to cryptographic algorithm 1.
- the transceiving unit 1201 can be used to obtain the instruction information 1 and the instruction information 2, or the transceiving unit 1201 can also be used To obtain instruction information 3 and instruction information 4; the processing unit 1202 may be used to update the cryptographic algorithm 2 used for secure startup to the cryptographic algorithm 1, or the processing unit 1202 may also be used for The public key baseline value a is updated to the public key baseline value b. Alternatively, the processing unit 1202 may also be used to verify the integrity of the public key B using the public key baseline value b.
- an embodiment of the present application also provides a communication device 1300, as shown in FIG. 13.
- the communication device 1300 includes a communication interface 1301 and a processor 1302.
- the communication interface 1301 includes a first communication interface 1301a and a second communication interface 1301b.
- the first communication interface 1301a is used to execute the receiving operation performed by the network device in any one of the embodiments shown in the aforementioned method 100 to method 500;
- the second communication interface 1301b is used to execute any one of the embodiments shown in the aforementioned method 100 to method 500
- the processor 1302 is configured to perform other operations performed by the network device in any one of the embodiments shown in the foregoing method 100 to method 500 except for the receiving operation and the sending operation.
- the processor 1302 may perform the operation in the embodiment of the method 100: according to the instruction information 1 and the instruction information 2, the baseline information 1 of the cryptographic resource corresponding to the cryptographic algorithm 1 is updated.
- the processor 1302 may perform the operations in the embodiment of the method 300: update the cryptographic algorithm 2 for secure startup to the cryptographic algorithm 1, and update the public key baseline value a for secure startup to the public key baseline value b , Using the public key baseline value b to verify the integrity of the public key B.
- an embodiment of the present application also provides a communication device 1400, as shown in FIG. 14.
- the communication device 1400 includes a memory 1401 and a processor 1402 that communicates with the memory 1401.
- the memory 1401 includes computer-readable instructions; the processor 1402 is configured to execute the computer-readable instructions, so that the communication device 1400 executes the method executed by the network device in any one of the embodiments shown in the method 100 to the method 500.
- the processor may be a central processing unit (English: central processing unit, abbreviation: CPU), a network processor (English: network processor, abbreviation: NP), or a combination of CPU and NP.
- the processor may also be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviation: ASIC), a programmable logic device (English: programmable logic device, abbreviation: PLD) or a combination thereof.
- the above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), field programmable logic gate array (English: field-programmable gate array, abbreviation: FPGA), general array logic (English: generic array) logic, abbreviation: GAL) or any combination thereof.
- the processor may refer to one processor or may include multiple processors.
- the memory may include volatile memory (English: volatile memory), such as random access memory (English: random-access memory, abbreviation: RAM); the memory may also include non-volatile memory (English: non-volatile memory), For example, read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid state drive (English: solid-state drive, Abbreviation: SSD); the memory can also include a combination of the above-mentioned types of memory.
- the memory may refer to one memory, or may include multiple memories.
- computer-readable instructions are stored in the memory, and the computer-readable instructions include multiple software modules, such as a sending module, a processing module, and a receiving module. After executing each software module, the processor can perform corresponding operations according to the instructions of each software module. In this embodiment, an operation performed by a software module actually refers to an operation performed by the processor according to an instruction of the software module. After the processor executes the computer-readable instructions in the memory, it can perform all operations that can be performed by the network device according to the instructions of the computer-readable instructions.
- the communication interface 1301 of the communication device 1300 can be specifically used as the transceiver unit 1201 in the communication device 1200 to implement communication between the communication device and other devices.
- an embodiment of the present application further provides a communication device 1500, which includes a processor 1510, and the processor 1510 is configured to execute the network device implementation in any one of the embodiments shown in the method 100 to the method 500. Operation.
- the processor 1510 may be, for example, the processing unit 1202 in the communication device 1200 described above, the processor 1302 in the communication device 1300, or the processor 1402 in the communication device 1400.
- the communication device 1500 may include a processor 1510 and a security chip 1520, the security chip 1520 is connected to the processor 1510, and the security chip 1520 is used to store a variety of cryptographic resources.
- the baseline information of the multiple cryptographic resources corresponds to multiple cryptographic algorithms one-to-one, and the multiple cryptographic algorithms are all suitable for secure startup.
- the communication device 1500 includes a processor 1510, the processor 1510 includes a one-time programmable storage space 1511, and the one-time programmable storage space 1511 is used to store a variety of passwords.
- the baseline information of the multiple cryptographic resources corresponds to multiple cryptographic algorithms one-to-one, and the multiple cryptographic algorithms are all suitable for secure startup.
- the multiple cryptographic algorithms include any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3 .
- an embodiment of the present application also provides a security chip 1600, as shown in FIG. 16.
- the security chip 1600 includes a communication interface 1610 and a storage entity 1620.
- the storage entity 1620 stores baseline information of a variety of cryptographic resources, and the multiple cryptographic resources correspond to the network equipment during multiple secure startup processes.
- the cryptographic algorithm information and secret key information to be used the baseline information of each cryptographic resource corresponds to each secure startup one-to-one, and the baseline information of each cryptographic resource is used to determine the cryptographic resource used for each secure startup Perform integrity verification; wherein, the baseline information of the multiple cryptographic resources includes the baseline information of the first cryptographic resource and the baseline information of the second cryptographic resource; the baseline information of the first cryptographic resource is used to check the network device Perform integrity verification on a first cryptographic resource used during a first secure boot, the first cryptographic resource corresponds to a first cryptographic algorithm and a first public key, and the baseline information of the first cryptographic resource includes the first password
- the state information of the algorithm, the state information of the first cryptographic algorithm is used to indicate the use state of the first cryptographic algorithm; the baseline information of the second cryptographic resource is used to perform the second secure boot of the network device Integrity verification is performed on a second cryptographic resource used, the second cryptographic resource corresponds to a second cryptographic algorithm and a second public key, and the baseline information of the
- the security chip 1600 communicates with a processor through the communication interface 1610, and the processor is configured to manage baseline information of the multiple cryptographic resources stored in the security chip 1600.
- the processor may be, for example, the processing unit 1202 in the communication device 1200 described above, the processor 1602 in the communication device 1600, the processor 1402 in the communication device 1400, or the processor 1510 in the communication device 1500.
- the baseline information of the first cryptographic resource includes a first public key baseline value, and the first public key baseline value is used to verify the integrity of the first public key;
- the baseline information of the second cryptographic resource includes A second public key baseline value, where the second public key baseline value is used to verify the integrity of the second public key.
- the security chip 1600 may be, for example, the security chip 1520 in the communication device 1500 shown in FIG. 15a.
- the first cryptographic algorithm includes any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA or cryptographic hash algorithm SM3.
- the second cryptographic algorithm includes any of the following cryptographic algorithms: asymmetric encryption algorithm RSA, elliptic curve cryptography ECC algorithm, national secret asymmetric encryption algorithm SM2, secure hash algorithm SHA, or cryptographic hash algorithm SM3.
- the state information of the first cryptographic algorithm may include first suspension identification information.
- the first suspension identification information may include revocation identification information and/or disabling identification information.
- the state information of the first cryptographic algorithm may also include first enable identification information.
- the state information of the second cryptographic algorithm may include second suspension identification information.
- the second suspension identification information may include revocation identification information and/or disabling identification information.
- the state information of the second cryptographic algorithm may also include second enable identification information.
- the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which when run on a computer, causes the computer to execute the methods shown in the above methods 100 to 500 The method executed by the network device in any one of the embodiments.
- embodiments of the present application also provide computer program products, including computer programs or computer-readable instructions.
- the computer programs or computer-readable instructions When the computer programs or computer-readable instructions are run on a computer, the computer can execute the methods 100 to 500 described above. The method executed by the network device in any one of the embodiments shown.
- the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the difference from other embodiments.
- the description is relatively simple, and the relevant parts can be referred to the part of the description of the method embodiment.
- the above-described device and device embodiments are only illustrative.
- the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
- Storage Device Security (AREA)
Abstract
本申请公开了一种基于冗余密码算法进行安全启动的方法及设备,该方法包括:获取第一指示信息和第二指示信息,根据第一指示信息和第二指示信息对第一基线信息进行更新。其中,第一指示信息用于唯一标识第一密码算法,该第二指示信息用于指示网络设备对安全存储实体中存储的第一密码资源的基线信息进行更新,第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证。这样,网络设备能够通过更新密码算法对应的基线信息,实现基于不同的需求在线调整用于安全启动的密码算法的目的,从而使得按照不同的安全需求适应性的进行安全启动成为可能,提高了网络设备的安全性。
Description
本申请要求于2020年07月08提交中国国家知识产权局、申请号为202010652854.3、申请名称为“一种基于冗余密码算法进行安全启动的方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。本申请要求于2020年05月22日提交的申请号为202010442242.1、发明名称为“一种更新密码资源的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及安全技术领域,特别是涉及一种基于冗余密码算法进行安全启动的方法及设备,还特别涉及一种对网络设备在安全启动过程中所使用的密码资源进行管理的方法及设备。
为了确保网络设备在启动过程中的安全性,通常采用安全启动技术进行启动。安全启动技术是通过密码学的方法保护网络设备启动中软件完整性的有效措施。安全启动过程中,先对待加载的应用程序的镜像文件进行验证,验证通过后才加载该应用程序的镜像文件,这样,确保启动过程中所加载的应用程序的镜像文件的完整性和合法性。
目前,网络设备内通常仅保存一种用于安全启动的密码算法,基于该密码算法对待加载的应用程序的镜像文件进行验证,该密码算法通常保存在该网络设备的安全存储实体中,无法进行修改和更新。这样,当网络设备内仅有一种密码算法无法满足更高的安全需求时,或者,该密码算法不符合部分用户的安全要求时,该网络设备无法再借助安全启动技术对启动中软件完整性进行安全保护,从而威胁网络设备的安全。
发明内容
基于此,本申请实施例提供了一种基于冗余密码算法进行安全启动的方法及设备,能够安全的更新密码资源的基线信息,使得网络设备能够基于不同的安全需求灵活的使用不同的密码算法进行安全启动,从而确保网络设备的安全性。
第一方面,本申请实施例提供了对安全启动所使用的密码资源进行管理的方法,该方法由网络设备实施,该方法例如可以包括:获取第一指示信息和第二指示信息,并且,根据所述第一指示信息和所述第二指示信息,对所述第一密码资源的基线信息进行更新。其中,该第一指示信息用于唯一标识第一密码算法,该第二指示信息用于指示所述网络设备对安全存储实体中存储的第一密码资源的基线信息进行更新,其中,所述第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述网络设备在进行所述安全启动所使用的第一密码算法和第一公钥,所述第一密码资源的基线信息包括所述第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态。其中,第一密码算法可以为以下任一种算法:非对称加密算法RSA、椭圆曲线密码学(英文:Elliptic Curve Cryptography,简 称:ECC)算法、国密非对称加密算法SM2、安全散列算法(英文:Secure Hash Algorithm,简称:SHA)或密码杂凑算法SM3。这样,通过在网络设备的安全存储实体中预置与多种密码算法对应的多种密码资源的基线信息,在网络设备现网运行的过程中,当需要更新密码算法时,能够通过更新密码算法对应的密码资源的基线信息,使得密码算法的状态信息发生改变以指示该密码算法进入不同的使用状态,实现基于不同的需求在线调整用于安全启动的密码算法的目的,从而使得按照不同的安全需求适应性的进行安全启动成为可能,提高了网络设备的安全性。
需要说明的是,一种情况下,安全存储实体可以为处理器中的一次性可编程存储空间;或者,另一种情况下,安全存储实体也可以为独立于处理器的安全芯片。
在一种可能的实现方式中,第二指示信息具体用于指示使能第一密码算法。那么,对所述第一密码资源的基线信息进行更新,例如可以包括:更改第一密码算法的状态信息,以将所述第一密码算法的使用状态设置为使能状态。将所述第一密码算法的使用状态设置为使能状态,例如可以包括:设置第一密码算法对应的使能标识信息以指示所述第一密码算法的使用状态为使能状态。一种情况下,当密码资源的基线信息通过硬件烧写的形式存储在网络设备的安全存储实体时,根据所述第一指示信息和所述第二指示信息对所述第一密码资源的基线信息进行更新,例如可以包括:将第一密码算法对应的第一密码资源的基线信息中的使能标识信息设置为使能状态。另一种情况下,当密码资源的基线信息通过软件的形式安全存储在网络设备中时,根据所述第一指示信息和所述第二指示信息对所述第一密码资源的基线信息进行更新,例如可以包括:将第一密码算法对应的软件状态位设置为使能状态。
其中,更新后的第一密码资源的基线信息还包括第一公钥基线值,所述第一公钥基线值用于对所述第一公钥进行完整性验证。一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中均已经保存了对应的公钥基线值,则,使能第一密码算法也可以表示启用该第一密码算法对应的第一密码资源的基线信息中的第一公钥基线值。另一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中仅保存了已使能的密码算法对应的公钥基线值,未使能的密码算法对应的密码资源的基线信息中预留了待写入对应公钥基线值的空间,则,对第一密码算法对应的第一密码资源的基线信息进行更新,还可以包括:网络设备获取第一密码算法对应的第一公钥基线值,将第一公钥基线值存储在安全存储实体中,例如,在安全存储实体中与第一密码算法对应的第一密码资源的基线信息相应的位置写入第一公钥基线值。其中,如果第一指示信息和第二指示信息携带在第一更新文件中,第一密码算法对应的第一公钥基线值也可以携带在该第一更新文件中,那么,网络设备获取第一密码算法对应的第一公钥基线值可以是:网络设备从第一更新文件中获取第一公钥基线值。
其中,第一公钥基线值为第一公钥的哈希值或者第一公钥的明文。第一公钥基线值与第一公钥唯一对应,用于对第一公钥进行完整性验证,一方面,第一公钥基线值用于验证第一更新文件中携带的第一公钥的完整性;另一方面,当第一密码算法有效时,在网络设备安全启动过程中,第一公钥基线值用于对非易失性存储器保存的密码资源中第一公钥进 行完整性验证。需要说明的是,非易失性存储器例如可以是:只读内存(英文:Read-only memory,简称:ROM)、可编程只读内存(英文:Programmable read-only memory,简称:PROM)、电可改写只读内存(英文:Electrically alterable read only memory,简称:EAROM)、可擦可编程只读内存(英文:Erasable programmable read only memory,简称:EPROM)、电可擦可编程只读内存(英文:Electrically erasable programmable read only memory,简称:EEPROM)、闪存(英文:Flash memory)等,在本申请实施例中不作具体限定。
作为一个示例,在根据所述第一指示信息和所述第二指示信息对所述第一密码资源的基线信息进行更新之后,在所述安全启动之前,本申请实施例还可以包括:将非易失性存储器中存储的第二密码资源更新为第一密码资源。此时,本申请实施例还可以包括:根据更新后的所述第一密码资源的基线信息和第一密码资源进行安全启动,该安全启动的过程例如可以包括:基于更新后的所述第一密码资源的基线信息对所述非易失性存储器中存储的更新后的所述第一密码资源进行完整性验证;如果所述非易失性存储器中存储的第一密码资源通过完整性验证,则,根据第一密码资源中的所述第一公钥和所述第一密码算法,对所述安全启动过程中加载的通过第一私钥进行数字签名的应用程序的镜像文件进行验证。其中,所述基于更新后的所述第一密码资源的基线信息对所述非易失性存储器中存储的更新后的所述第一密码资源进行完整性验证,例如可以包括:采用所述第一公钥基线值对所述非易失性存储器中存储的所述第一公钥进行完整性验证。如此,通过该实施例,能够在灵活更新符合需求的密码算法后,基于符合需求的密码算法进行安全启动,提高了网络设备的安全性和对其的使用体验。
对于获取第一指示信息和第二指示信息,例如可以包括:获取第一更新文件,所述第一更新文件携带所述第一指示信息和所述第二指示信息。其中,为了保证第一更新文件的完整性及真实性,该第一更新文件例如可以是证书。该证书的格式可以自定义,也可以采用标准的X.509格式(即密码学里标工艺证书的标准格式)。此外,该第一更新文件也可以是其他能够携带第一指示信息和第二指示信息且能够被网络设备识别和解析的任意格式的文件,在本申请实施例中对第一更新文件不作具体限定。
作为一个示例,该第一更新文件采用第二私钥和第二密码算法进行签名,所述安全存储实体中存储有第二密码资源的基线信息,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于所述第二密码算法和第二公钥,其中,所述网络设备在使用所述第一密码资源进行安全启动之前,使用所述第二密码资源进行安全启动。所述第一更新文件中还可以包括所述第二公钥,本申请实施例还可以包括:根据所述第二密码算法和所述第二公钥,验证所述第一更新文件的签名。其中,第二公钥为所述网络设备的根公钥或所述第二公钥为基于所述网络设备的根密钥派生得到的公钥,例如可以是网络设备的二级公钥。可见,当第一更新文件的验证通过,则认为该第一更新文件未被篡改且来源可信,确定该第一更新文件是可靠的,可以基于该第一更新文件中的第一指示信息和第二指示信息进行密码资源的更新。
一种可能的实施例中,所述安全存储实体中预置有所述第二公钥基线值,那么,在所述根据所述第二密码算法和所述第二公钥验证所述第一更新文件的签名之前,本申请实施 例还可以包括:基于所所述第二公钥基线值对所述第一更新文件中携带的所述第二公钥进行完整性验证,如果第二公钥的完整性验证通过,才执行根据所述第二密码算法和所述第二公钥验证所述第一更新文件的签名,安全性更高。
另一种可能的实施例中,所述第一更新文件还可以包括网络设备的设备标识信息,所述设备标识信息用于标识所述网络设备。例如,所述网络设备的设备标识信息包括下述信息中的任意一个:所述网络设备中的芯片标识、所述网络设备的硬件标识、所述网络设备所属的用户标识、所述网络设备所属的制造商标识、所述设备所属的域标识、所述网络设备的互联网协议(英文:Internet Protocol,简称:IP)地址、所述网络设备的媒体访问控制(英文:Media Access Control,简称:MAC)地址或所述网络设备所属的网段地址。那么,当第一更新文件的验证通过后,还可以对第一更新文件中的设备标识信息和网络设备进行匹配验证,当验证通过后,确定该第一更新文件是针对该网络设备起作用的文件,基于第一更新实施该本申请实施例提供的方法,完成对该网络设备上密码资源的更新。
在一些可能的实现方式中,所述安全存储实体中还存储有第二密码资源的基线信息,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于第二密码算法和第二公钥,其中,所述网络设备在使用所述第一密码资源进行安全启动之前,使用所述第二密码资源进行安全启动,那么,本申请实施例还可以包括:获取第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第二密码算法,所述第四指示信息用于指示中止使用所述第二密码算法。作为一个示例,第三指示信息和第四指示信息可以携带在第一更新文件中,即,第一指示信息、第二指示信息、第三指示信息和第四指示信息均携带在第一更新文件中。作为另一个示例,第三指示信息和第四指示信息也可以携带在第二更新文件中,即,第一指示信息和第二指示信息携带在第一更新文件中,第三指示信息和第四指示信息携带在第二更新文件中。需要说明的是,该第二更新文件可以是证书或者其他能够被网络设备识别和解析的任意格式的文件,在本申请实施例中对第二更新文件不作具体限定。
该实现方式中,本申请实施例还可以包括:根据所述第三指示信息和所述第四指示信息,中止使用所述第二密码算法。其中,中止使用所述第二密码算法,例如可以包括:在所述对所述第一密码资源的基线信息进行更新之后,中止使用所述第二密码算法。
上述中止使用所述第二密码算法,可以包括:去使能所述第二密码算法或吊销所述第二密码算法。其中,去使能所述第二密码算法例如可以包括:将所述第二密码算法的使用状态设置为去使能状态;吊销所述第二密码算法例如可以包括:将所述第二密码算法的使用状态设置为吊销状态。例如,将所述第二密码算法的使用状态设置为吊销状态,具体可以是:设置所述第二密码算法对应的吊销标识信息以指示所述第二密码算法的使用状态为吊销状态。
其中,所述第二密码算法可以为以下任一种密码算法:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3,第一密码算法和第二密码算法为不同的密码算法。
在另一种可能的实现方式中,所述第二指示信息具体用于指示所述网络设备中止使用 所述第一密码算法。那么,对所述第一密码资源的基线信息进行更新,具体为:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为中止状态。上述中止使用所述第一密码算法,可以包括:去使能所述第一密码算法或吊销所述第一密码算法。其中,对于去使能所述第一密码算法的情况,对所述第一密码资源的基线信息进行更新例如可以包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为去使能状态;对于吊销所述第一密码算法的情况,对所述第一密码资源的基线信息进行更新例如可以包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为吊销状态。例如,第一密码算法的状态信息包括吊销标识信息,那么,所述更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为吊销状态包括:设置所述吊销标识信息以将所述第一密码算法的使用状态设置为吊销状态。这样,通过上述实施例,网络设备能够在使能新的密码算法,并且在使用新使能的密码算法对网络设备进行安全启动后,中止无法满足需求的密码算法,使得不满足需求的密码算法不再用于网络设备的安全启动,提高了网络设备的安全性。
第二方面,本申请实施例还提供了一种安全启动的方法,该方法由网络设备实施,该方法例如可以包括:将用于安全启动的第一密码算法更新为第二密码算法,并且,将用于安全启动的第一公钥基线值更新为第二公钥基线值;从而,采用所述第二公钥基线值对第二公钥的完整性进行验证,其中,所述第二密码算法和所述通过完整性验证的所述第二公钥用于对所述安全启动过程中加载的镜像文件进行验证。其中,多种密码算法中的第一密码算法可以为以下任一种算法:非对称加密算法RSA,椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。第二密码算法可以为以下任一种算法:RSA、ECC算法、SM2、SHA或SM3。第一密码算法和第二密码算法不同。这样,通过在网络设备的安全存储实体中预置多种密码算法,在网络设备现网运行的过程中,当需要使用新的密码算法进行安全启动时,能够通过更新密码算法,实现基于不同的需求在线调整用于安全启动的密码算法,从而使得按照不同的安全需求灵活的调用对应的密码算法进行安全启动成为可能,提高了网络设备的安全性。
其中,网络设备内用于安全保存密码资源的基线信息的安全存储实体可以为处理器中的一次性可编程存储空间;或者,安全存储实体也可以为独立于处理器的安全芯片。其中,密码资源的基线信息可以包括第一密码资源的基线信息和第二密码资源的基线信息。第一密码资源的基线信息包括第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态,同理,第二密码资源的基线信息包括第二密码算法的状态信息,所述第二密码算法的状态信息用于指示所述第二密码算法的使用状态。所述第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述网络设备在进行所述安全启动所使用的第一密码算法和第一公钥;同理,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于所述网络设备在进行所述安全启动所使用的第二密码算法和第二公钥。那么,本申请实施例在执行上述“将用于安全启动的第一密码算法更新为第二密码算法”以及“将用于安全启动的第一公钥基 线值更新为第二公钥基线值”之后,可以使用第二密码资源的基线信息对第二密码资源进行完整性验证,再使用通过完整性验证的第二密码资源对安全启动过程中加载的镜像文件进行验证。
其中,将所述第一密码算法更新为所述第二密码算法,例如可以包括:中止所述第一密码算法,使能所述第二密码算法。其中,中止所述第一密码算法,包括吊销所述第一密码算法或去使能所述第一密码算法两种可能的含义。
作为一个示例,本申请实施例中还可以包括:如果第二公钥通过完整性验证,则,网络设备即可采用所述第二公钥和所述第二密码算法,对所述安全启动过程中加载的镜像文件的签名进行验证。
一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中均已经保存了对应的公钥基线值,则,第二公钥基线值可以是预置在所述网络设备的安全存储实体中的,那么,使能第二密码算法也即表示启用了该密第二码算法对应的第二密码资源的基线信息中的第二公钥基线值。
另一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中仅保存了已经使能过的密码算法对应的公钥基线值,未使能的密码算法对应的密码资源的基线信息中预留了待写入对应公钥基线值的空间,则,网络设备也可以获取第一密码算法对应的第一公钥基线值,那么,本申请实施例中将用于安全启动的第一公钥基线值更新为第二公钥基线值可以包括:获取第二公钥基线值,将第二公钥基线值保存到网络设备的安全存储实体中。其中,获取第二公钥基线值的方式例如可以包括:获取第一更新文件,所述第一更新文件中携带所述第二公钥基线值;从第一更新文件中获取所述第二公钥基线值。其中,将所述第二公钥基线值保存到所述网络设备的安全存储实体中,例如,在安全存储实体中与第二密码算法对应的第二密码资源的基线信息相应的位置写入第二公钥基线值。
其中,第二公钥基线值为第二公钥的哈希值或者第二公钥的明文。第二公钥基线值与第二公钥唯一对应,用于对第二公钥进行完整性验证,一方面,第二公钥基线值用于验证第一更新文件中携带的第二公钥的完整性;另一方面,当第二密码算法有效时,在网络设备安全启动过程中,第二公钥基线值用于对非易失性存储器存储器保存的密码资源中第二公钥进行完整性验证。
作为一个示例,在将用于安全启动的第一公钥基线值更新为第二公钥基线值之后,在所述安全启动之前,本申请实施例还可以包括:将非易失性存储器中存储的用于安全启动的第一密码资源更新为第二密码资源,所述第二密码资源包括所述第二公钥。此时,采用所述第二公钥基线值对第二公钥的完整性进行验证,例如可以包括:采用所述第二公钥基线值对所述非易失性存储器中存储的所述第二公钥进行完整性验证。如果所述非易失性存储器中存储的第二密码资源通过完整性验证,则,根据所述第二公钥和所述第二密码算法,对通过第二私钥进行数字签名的应用程序的镜像文件进行签名验证。如此,通过该实施例,能够在灵活更新符合需求的密码算法后,基于符合需求的密码算法进行安全启动,提高了网络设备的安全性和对其的使用体验。
作为一个示例,将用于安全启动的第一密码算法更新为第二密码算法,例如可以包括: 获取第一指示信息和第二指示信息,其中,所述第一指示信息用于唯一标识所述第二密码算法,所述第二指示信息用于指示所述网络设备使能所述第二密码算法;接着,根据所述第一指示信息和所述第二指示信息,使能所述第二密码算法。其中,使能所述第二密码算法,例如可以为:将所述第二密码算法的使用状态设置为使能状态。而所述将所述第二密码算法的使用状态设置为使能状态,可以包括:设置所述第二密码算法对应的使能标识信息以指示所述第二密码算法的使用状态为使能状态。
其中,获取第一指示信息和第二指示信息,例如可以包括:获取第一更新文件,所述第一更新文件携带所述第一指示信息和所述第二指示信息。为了保证第一更新文件的完整性及真实性,该第一更新文件例如可以是证书。该证书的格式可以自定义,也可以采用标准的X.509格式(即密码学里标工艺证书的标准格式)。此外,该第一更新文件也可以是其他能够携带第一指示信息和第二指示信息且能够给被网络设备识别和解析的任意格式的文件,在本申请实施例中对第一更新文件不作具体限定。
作为一个示例,该第一更新文件可以采用第一私钥和所述第一密码算法进行签名,其中,所述网络设备在使用所述第二密码资源进行安全启动之前,使用所述第一密码资源进行安全启动,所述第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述第一密码算法和第一公钥。第一更新文件中还可以包括第一公钥,本申请实施例还可以包括:根据所述第一密码算法和所述第一公钥,验证所述第一更新文件的签名。其中,该第一公钥为所述网络设备的根公钥或所述第一公钥为基于所述网络设备的根密钥派生得到的公钥,例如网络设备的二级公钥。可见,当第一更新文件的验证通过,则认为该第一更新文件未被篡改且来源可信,确定该第一更新文件是可靠的,可以基于该第一更新文件中的第一指示信息和第二指示信息进行密码资源的更新。
如果第一公钥基线值预置在所述网络设备的安全存储实体中,在所述根据所述第一密码算法和所述第一公钥验证所述第一更新文件的签名之前,本申请实施例还可以包括:基于所述第一公钥基线值对所述第一更新文件中携带的所述第一公钥进行完整性验证,如果第二公钥的完整性验证通过,才执行根据所述第二密码算法和所述第二公钥验证所述第一更新文件的签名,安全性更高。
如果所述第一更新文件还包括网络设备的设备标识信息,所述设备标识信息用于标识所述网络设备。例如:所述网络设备的设备标识信息包括下述信息中的任意一个:所述网络设备中的芯片标识、所述网络设备的硬件标识、所述网络设备所属的用户标识、所述网络设备所属的制造商标识、所述设备所属的域标识、所述网络设备的IP地址、所述网络设备的MAC地址或所述网络设备所属的网段地址。该情况下,当第一更新文件的验证通过后,还可以对第一更新文件中的设备标识信息和网络设备进行匹配验证,当验证通过后,确定该第一更新文件是针对该网络设备起作用的文件,基于第一更新实施本申请实施例提供的方法,完成对网络设备的安全启动。
在一些可能的实现方式中,该第一更新文件还可以包括第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第一密码算法,所述第四指示信息用于指示中 止使用所述第一密码算法。根据所述第三指示信息和所述第四指示信息,中止使用所述第一密码算法。其中,所述中止使用所述第一密码算法的执行时机,例如可以在将用于安全启动的第一密码算法更新为第二密码算法之后。
在另一些可能的实现方式中,网络设备基于所述第二密码算法和所述第二公钥进行安全启动后,本申请实施例还可以包括:获取第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第一密码算法,所述第四指示信息用于指示中止使用所述第一密码算法。该第三指示信息和第四指示信息,例如可以携带在第二更新文件中,那么,获取第三指示信息和第四指示信息即可以是从所述第二更新文件中获取所述第三指示信息和所述第四指示信息。这样,网络设备即可根据所述第三指示信息和所述第四指示信息,中止使用所述第一密码算法。而网络设备中止使用所述第一密码算法的执行时机,例如可以在将用于安全启动的第一密码算法更新为第二密码算法之后。
上述中止使用所述第一密码算法,可以包括:去使能所述第一密码算法或吊销所述第一密码算法。其中,去使能所述第一密码算法例如可以包括:将所述第一密码算法的使用状态设置为去使能状态;吊销所述第一密码算法例如可以包括:将所述第一密码算法的使用状态设置为吊销状态。例如,将所述第一密码算法的使用状态设置为吊销状态,具体可以是:设置所述第一密码算法对应的吊销标识信息以指示第一密码算法的使用状态为吊销状态。
作为一个示例,本申请实施例例如还可以包括:获取第一更新文件,第一更新文件用于指示使能第二密码算法。本申请实施例例如还可以包括:获取第二更新文件,所述第二更新文件用于指示吊销所述第一密码算法。那么,将用于安全启动的第一密码算法更新为第二密码算法,例如可以包括:根据所述第一更新文件,使能所述第二密码算法;根据所述第二更新文件,吊销所述第一密码算法。如此,实现对用于网络设备安全启动的密码算法的灵活调整,提高网络设备的安全性。
第三方面,本申请实施例还提供了通信装置,该通信装置包括收发单元和处理单元。其中,收发单元用于执行上述第一方面或第二方面提供的方法中通信装置实施的收发操作;处理单元用于执行上述第一方面或第二方面提供的方法中通信装置实施的除了收发操作以外的其他操作。例如:当所述通信装置执行所述第一方面中通信装置所实施的方法时,所述收发单元可以用于获取第一指示信息和第二指示信息;所述处理单元可以用于根据所述第一指示信息和所述第二指示信息,对所述第一密码资源的基线信息进行更新。又例如:当所述通信装置执行所述第二方面中通信装置所实施的方法时,所述收发单元可以用于获取第一指示信息和第二指示信息;所述处理单元可以用于将用于安全启动的第一密码算法更新为第二密码算法,将用于安全启动的第一公钥基线值更新为第二公钥基线值,采用所述第二公钥基线值对第二公钥的完整性进行验证。
第四方面,本申请实施例还提供了一种通信装置,该通信装置包括通信接口和处理器。其中,通信接口用于执行前述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式所提供的方法中通信装置实施的收发操作;处理器,用于执行前述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种 可能的实现方式所提供的方法中通信装置实施的除所述收发操作以外的其他操作。
第五方面,本申请实施例还提供了一种通信装置,该通信装置包括存储器和处理器。其中,该存储器包括计算机可读指令;与该存储器通信的处理器用于执行所述计算机可读指令,使得所述通信装置用于执行以上第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式所提供的方法。
对于上述各方面提供的通信装置,作为一个示例,所述通信装置包括独立于所述处理器或处理单元的安全芯片,所述安全芯片与所述处理器或处理单元连接,所述安全芯片用于存储密码资源的基线信息。作为另一个示例,所述通信装置的处理器或处理单元包括一次性可编程存储空间,所述一次性可编程存储空间用于存储密码资源的基线信息。
第六方面,本申请实施例还提供了一种安全芯片,所述安全芯片包括通信接口和安全的存储实体。所述存储实体中存储有多种密码资源的基线信息,所述多种密码资源分别对应于网络设备在多次安全启动过程中所需使用的密码算法信息和秘钥信息,每种密码资源的基线信息与每次安全启动一一对应,所述每种密码资源的基线信息用于对所述每次安全启动所采用的密码资源进行完整性验证;其中,所述多种密码资源的基线信息包括第一密码资源的基线信息和第二密码资源的基线信息;所述第一密码资源的基线信息用于对所述网络设备在进行第一安全启动时所使用的第一密码资源进行完整性验证,所述第一密码资源对应第一密码算法和第一公钥,所述第一密码资源的基线信息包括所述第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态;所述第二密码资源的基线信息用于对所述网络设备在进行第二安全启动时所使用的第二密码资源进行完整性验证,所述第二密码资源对应于第二密码算法和第二公钥,所述第二密码资源的基线信息包括所述第二密码算法的状态信息,所述第二密码算法的状态信息用于指示所述第二密码算法的使用状态;所述第二安全启动为所述网络设备在进行所述第一安全启动之后所进行的安全启动,所述第一密码算法与所述第二密码算法不同。
其中,所述安全芯片通过所述通信接口与处理器通信,所述处理器用于对所述安全芯片中存储的所述多种密码资源的基线信息进行管理。第一密码资源的基线信息包括第一公钥基线值,所述第一公钥基线值用于对所述第一公钥的完整性进行验证;所述第二密码资源的基线信息包括第二公钥基线值,所述第二公钥基线值用于对所述第二公钥的完整性进行验证。
需要说明的是,第一密码算法包括下述密码算法中的任意多种:非对称加密算法RSA,椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。所述第二密码算法包括下述密码算法中的任意多种:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
其中,所述第一密码算法的状态信息可以包括第一中止标识信息。所述第一中止标识信息可以包括吊销标识信息和/或去使能标识信息。所述第一密码算法的状态信息也可以包括第一使能标识信息。同理,所述第二密码算法的状态信息可以包括第二中止标识信息。所述第二中止标识信息可以包括吊销标识信息和/或去使能标识信息。所述第二密码算法的状态信息也可以包括第二使能标识信息。
第七方面,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式所提供的方法。
第八方面,本申请实施例还提供了计算机程序产品,包括计算机程序或计算机可读指令,当所述计算机程序或所述计算机可读指令在计算机上运行时,使得计算机执行前述第一方面、第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式所提供的方法。
图1为本申请实施例中一种网络设备的安全启动过程示意图;
图2a为本申请实施例中一种网络设备10的结构示意图;
图2b为本申请实施例中一种网络设备10的结构示意图;
图3a为本申请实施例中使能ECC算法之前密码资源的基线信息的一结构示意图;
图3b为本申请实施例中使能ECC算法之后密码资源的基线信息的一结构示意图;
图3c为本申请实施例中吊销RSA算法之后密码资源的基线信息的一结构示意图;
图3d为本申请实施例中使能ECC算法之前密码资源的基线信息的另一结构示意图;
图4为本申请实施例中一种对安全启动所使用的密码资源进行管理的方法100的流程示意图;
图5a为本申请实施例中一种证书1的结构示意图;
图5b为本申请实施例中一种证书2的结构示意图;
图6a为本申请实施例中一种更新前的Flash存储器的结构示意图;
图6b为本申请实施例中一种更新后的Flash存储器的结构示意图;
图7为本申请实施例中一种对安全启动所使用的密码资源进行管理的方法200的流程示意图;
图8a为本申请实施例中一种证书3的结构示意图;
图8b为本申请实施例中一种证书4的结构示意图;
图9为本申请实施例中一种安全启动的方法300的流程示意图;
图10为本申请实施例中一种对安全启动所使用的密码资源进行管理的方法400的流程示意图;
图11为本申请实施例中一种安全启动的方法500的流程示意图;
图12为本申请实施例中一种通信装置1200的结构示意图;
图13为本申请实施例中一种通信装置1300的结构示意图;
图14为本申请实施例中一种通信装置1400的结构示意图;
图15a为本申请实施例中一种通信装置1500的结构示意图;
图15b为本申请实施例中一种通信装置1500的结构示意图;
图16为本申请实施例中一种安全芯片1600的结构示意图。
下面将结合附图,对本申请实施例中的技术方案进行描述。本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请中的“1”、“2”、“3”、“第一”、“第二”以及“第三”等序数词用于对多个对象进行区分,不用于限定多个对象的顺序。
本申请中提及的“A和/或B”,应该理解为包括以下情形:仅包括A,仅包括B,或者同时包括A和B。
图1为一种网络设备的安全启动过程示意图。参见图1,网络设备上电后,首先,执行安全启动代码(英文:Bootrom Security Boot Code,简称:BSBC),再执行片上启动介质(英文:Bootrom);然后,通过引导代码BootLoader加载操作系统(英文:Operating System,简称:OS),具体加载Linux/VxWorks/Windows等OS对应的代码;接着,OS启动后,加载对应的应用程序(英文:Application,简称:APP)。为了确保该网络设备启动过程的安全性,使用可信的签名系统(如证书颁发机构(英文:Certificate Authority,简称:CA)服务器)为各应用程序的镜像文件分别进行数字签名,例如:参见图1,签名系统采用密码算法1对Bootrom代码、BootLoader代码、OS代码和APP代码分别进行数字签名,得到Bootrom代码的签名1、BootLoader代码的签名2、OS代码的签名3和APP代码的签名4,需要说明的是,由于BSBC可以视作该网络设备可信根(英文:Root of Trust,简称:RoT),所以无需对BSBC进行数字签名。网络设备的安全启动的过程例如可以包括:网络设备上电后,首先,执行BSBC,BSBC使用相应的公钥对Bootrom代码的签名1进行验证,验证通过后才执行Bootrom;然后,Bootrom使用相应的公钥对BootLoader代码的签名2进行验证,验证通过后才执行BootLoader;然后,BootLoader使用相应的公钥对OS代码的签名3进行验证,验证通过后,引导执行OS;接着,OS使用相应的公钥对APP代码的签名4进行验证,验证通过后,执行该APP。需要说明的是,任意一个签名验证不通过,则,确定此次安全启动失败。
以网络设备中的APP为例,对为APP代码进行数字签名和签名的验证过程进行说明。对APP代码的数字签名过程可以包括:在APP代码下至网络设备之前,签名系统先经过哈希算法得到APP代码的数字摘要digest X1,再利用私钥a对该digest X1进行数字签名得到digestEncode X1。在将APP代码下至网络设备上时,发送给网络设备的包括APP代码和digestEncode X1。对APP代码的签名进行验证的过程可以包括:网络设备在加载APP代码之前,可以先对APP代码采用签名时相同的哈希算法,生成数字摘要digest X2,然后用公钥A对digestEncode X1进行验签得到digestDecode X3,判断digestDecode X3和digest X2是否相同,如果相同,则可以确定该APP代码未被篡改且为合法制造商发布的,从而确保该网络设备加载的APP代码是安全和可靠的。其中,私钥a和公钥A是网络设备的制造商提供的一对密钥,公钥A是公开可见的,而私钥a则是保密的,只有制造商对应的签名系 统可见。可见,数字签名技术可以视作数字摘要技术和公私钥技术的结合,既可以通过数字摘要技术验证软件包是否被篡改,也可以通过公私钥技术验证数字摘要是否合法,是一种能够为安全启动过程提供快速和全面的软件完整性保护和校验的技术。
图2a和图2b为网络设备10的两种结构示意图。参见图2a,该网络设备10包括处理器110和Flash存储器130,处理器110中集成有安全存储实体120。安全存储实体120的特点为:写入的内容无法进行修改和擦除,例如:安全存储实体120为处理器110中的一次性可编程存储器(英文:One Time Programmable,简称:OTP),该OTP可以通过电熔丝(英文:Electronic Fuses,简称:eFUSE)实现存储功能,确保较高的安全性。参见图2b,该网络设备10包括处理器110,安全存储实体120和非易失性存储器130,其中,安全存储实体120独立于所述处理器110,用于提供安全存储空间,安全存储实体120例如可以是独立的安全芯片,安全存储实体120和处理器110进行通信连接。在图2a和图2b中,处理器110分别和安全存储实体120、非易失性存储器130进行通信连接。其中,处理器110通常由中央处理器(英文:Central Processing Unit,简称:CPU)、微处理器(英文:Microprocessor Unit,简称:MPU)、微控制单元(英文:Microcontroller Unit,简称:MCU)、现场可编程逻辑门阵列(英文:Field Programmable Gate Array,简称:FPGA)等具备控制能力的芯片实现,是网络设备10启动过程中信任链的起点,处理器110的完整性受硬件的严格保护,在本申请实施例中可以认为是可信的。非易失性存储器130是一种非易失性存储器,例如可以是具备电子可擦除可编程的性能,能够快速读取数据,使数据不会因为断电而丢失的存储器。非易失性存储器130可以用于存储BootLoader代码、OS代码以及应用程序代码等数据。非易失性存储器130包括但不限于ROM、PROM、EAROM、EPROM、EEPROM、Flash存储器,下文中以非易失性存储器130为Flash存储器130为例进行说明。
通常,在网络设备10的处理器110的内部会预置一种密码算法以及该密码算法对应的公钥基线值。当网络设备10上电时,将Flash存储器130中保存的应用程序的镜像文件加载到静态随机存取存储器(英文:Static Random-Access Memory,简称:SRAM)中,基于安全存储实体120中预置的该密码算法对应的密码资源的基线信息,调用处理器110中预置的该唯一的密码算法,对应用程序的镜像文件进行验证,完成安全启动。其中,密码资源的基线信息包括密码算法的状态信息和密码算法对应的公钥基线值,公钥基线值可以是公钥的明文或公钥的哈希值。
考虑到网络设备的安全性,通常将用于安全启动的唯一的密码算法和公钥基线值分别预置到网络设备中,其内容无法进行在线修改和更新,但是,很多情况下,网络设备内预置的用于安全启动的唯一密码算法很可能无法满足需求。例如:随着网络设备内处理器运算能力的提高或者密码理论的演进,网络设备内预置的该唯一的密码算法的安全保护强度削减,无法对网络设备的安全启动过程进行有效的安全保护;又例如:由于各用户的安全标准的差异化,网络设备内预置的该唯一的密码算法很可能无法满足部分用户的安全标准的要求,在面临当前使用的密码算法和公钥不能满足需求时,往往需要召回已经出厂的网络设备或芯片进行重新设计,导致出现过程复杂、成本较高且用户体验较差等一系列问题。
基于此,本申请实施例提供了一种对安全启动所使用的密码资源进行管理的方法,能够基 于不同的需求在线调整用于安全启动的密码算法。本申请实施例提供的技术方案中,在网络设备的安全存储实体中预先存储密码资源的基线信息,该密码资源的基线信息包括多种密码资源的基线信息,多种密码资源的基线信息与多种密码算法一一对应,每种密码资源的基线信息包括对应的密码算法的状态信息。例如:多种密码算法包括密码算法1和密码算法2,密码算法1对应的密码资源的基线信息1,密码资源的基线信息1包括密码算法1的状态信息,密码算法1的状态信息用于指示密码算法1的使用状态,密码算法2对应的密码资源的基线信息2,密码资源的基线信息2包括密码算法2的状态信息,密码算法2的状态信息用于指示密码算法2的使用状态。密码资源的基线信息1用于对所述网络设备在安全启动过程中所使用的密码资源1进行完整性验证,密码资源1对应于所述网络设备在进行所述安全启动所使用的密码算法1和公钥B,密码资源的基线信息2用于对所述网络设备在安全启动过程中所使用的密码资源2进行完整性验证,密码资源2对应于所述网络设备在进行所述安全启动所使用的密码算法2和公钥A。假设网络设备需要更新密码资源,那么,该网络设备可以获取指示信息1和指示信息2,其中,指示信息1用于唯一标识密码算法1,指示信息2用于指示该网络设备对安全存储实体中存储的所述密码资源的基线信息1进行更新,这样,网络设备即可基于该指示信息1和指示信息2对密码算法1对应的密码资源的基线信息1进行更新,如,网络设备使能密码算法1,又如,网络设备中止密码算法1。如此,通过在网络设备的安全存储实体中预置多种密码资源的基线信息,在网络设备现网运行的过程中,当需要更新密码算法时,能够通过更新密码算法对应的密码资源的基线信息,使得密码算法的使用状态发生改变,实现基于不同的需求在线调整用于安全启动的密码算法的目的,从而使得按照不同的安全需求适应性的进行安全启动成为可能,提高了网络设备的安全性。
而且,本申请实施例提供了一种安全启动的方法,能够基于在线调整后的密码算法,实现基于满足安全需求的密码算法对网络设备的安全启动。例如:在网络设备的安全存储实体中预先存储的多种密码算法包括密码算法1和密码算法2。假设网络设备当前用于安全启动的密码算法2,根据需求需要使能密码算法1进行安全启动,那么,该网络设备可以将用于安全启动的密码算法2更新为密码算法1,并且,将用于安全启动的公钥基线值a更新为公钥基线值b;接着,可以采用公钥基线值b对公钥B的完整性进行验证,而密码算法1和通过完整性验证的公钥B用于对所述安全启动过程中加载的镜像文件的签名进行验证。如此,通过在网络设备的安全存储实体中预置多种密码算法,在网络设备现网运行的过程中,当需要使用新的密码算法进行安全启动时,能够通过更新密码算法,实现基于不同的需求在线调整用于安全启动的密码算法,从而使得按照不同的安全需求灵活的调用对应的密码算法进行安全启动成为可能,提高了网络设备的安全性。
举例来说,以图2所示的网络设备10为例,网络设备10的安全存储实体120中预置密码资源的基线信息,该密码资源的基线信息包括5种密码算法对应的5种密码资源的基线信息,每种密码资源的基线信息包括:两个标识信息和一个公钥基线值。其中,5种密码算法分别为:RSA算法、ECC算法、SM2算法、SHA算法和SM3算法。对应的5种密码资源的基线信息分别为:密码资源的基线信息1:ECC算法对应的使能标识信息2、中止标识 信息2和公钥基线值2,密码资源的基线信息2:RSA算法对应的算法标识信息1、中止标识信息1和公钥基线值1,密码资源的基线信息3:SM2算法对应的使能标识信息3、中止标识信息3和公钥基线值3,密码资源的基线信息4:SHA算法对应的使能标识信息4、中止标识信息4和公钥基线值4,以及密码资源的基线信息5:SM3算法对应的使能标识信息5、中止标识信息5和公钥基线值5。需要说明的是,各个标识信息一经烧写即不可修改,例如:使能标识信息2已烧写,表示RSA算法的状态为使能状态,中止标识信息2被烧写,表示RSA算法的状态为中止状态,只有密码算法对应的使能标识信息为被使能状态且中止标识信息为未被中止状态,才可以作为有效的密码算法被用于安全启动。网络设备10的Flash存储器130中保存有密码资源,该密码资源至少可以包括有效的密码算法对应的公钥。此外,该Flash存储器130还包括使用有效的密码算法对应的私钥进行数字签名的应用程序的镜像文件。
作为一个示例,假设网络设备10出厂时配置为使用RSA算法,那么,网络设备10的安全存储实体120中预置的密码资源的基线信息的结构可以参见图3a所示,其中,使能标识信息2被烧写,公钥基线值2对应的位置写入公钥基线值a,其他的标识信息和公钥基线值对应的位置均为待烧写状态。当网络设备10上电后,可以先基于安全存储实体120中有效的RSA算法和对应的公钥基线值a,对Flash存储器130中保存密码资源(至少包括RSA算法对应的公钥A)进行完整性验证,使用Flash存储器130中验证通过的密码资源对应用程序的镜像文件的签名进行验证,验证通过后,才加载该应用程序的镜像文件,完成网络设备10的安全启动。其中,公钥基线值a可以是公钥A的哈希值也可以是公钥A的明文,对应用程序的镜像文件进行数字签名的是公钥A对应的私钥A。
作为另一个示例,假设网络设备10出厂时配置为使用RSA算法,基于新的需求,用户需要使用ECC算法进行安全启动,那么,网络设备10获取到证书1,根据该证书1,网络设备10更新安全存储实体120中的密码资源的基线信息,更新后的密码资源的基线信息的结构可以参见图3b所示,与图3a所示的结构相比,区别在于:使能标识信息1被烧写,公钥基线值1对应的位置写入公钥基线值b。此外,网络设备10的Flash存储器130中也更新密码资源和应用程序的镜像文件,更新后的密码资源至少可以包括ECC算法对应的公钥B,更新后的应用程序的镜像文件采用公钥B对应的私钥B进行数字签名。更新完成之后,网络设备10重启,可以先基于安全存储实体120中有效的ECC算法和对应的公钥基线值b,对Flash存储器130中保存密码资源(至少包括ECC算法对应的公钥B)进行完整性验证,使用Flash存储器130中验证通过的密码资源对应用程序的镜像文件的签名进行验证,验证通过后,才加载该应用程序的镜像文件,完成网络设备10的安全启动。
作为再一个示例,假设网络设备10用于安全启动的密码算法从RSA算法更新到ECC算法之后,使用ECC算法进行安全启动成功时,网络设备10为了确保安全,还可以将已经失效的RSA算法进行中止,具体过程可以包括:获取到证书2,根据该证书2,网络设备10更新安全存储实体120中的密码资源的基线信息,更新后的密码资源的基线信息的结构可以参见图3c所示,与图3b所示的结构相比,区别在于:中止标识信息2被烧写,这样,网络设备10的安全存储实体120中的RSA算法被中止,能够有效的避免回退攻击,即, 有效的避免该已被替换的不够安全或者不合规的密码算法被用于安全启动,提高网络设备10的安全性。
可见,通过本申请实施例提供的技术方案,能够安全的在现网环境下更新网络设备的安全存储实体中的密码资源的基线信息,实现基于不同的安全需求灵活的更新符合需求的密码算法,从而基于符合安全需求的密码算法进行安全启动。
需要说明的是,本申请实施例中的更新安全存储实体中的密码资源的基线信息的过程,在上述示例中未进行详细说明,具体细节实现参见下述图4、图7、图9-图11所示的实施例中的相关说明。
可以理解的是,上述场景仅是本申请实施例提供的一个场景示例,本申请实施例并不限于此场景。
下面结合附图,通过实施例来详细说明本申请实施例中一种基于冗余密码算法进行安全启动的方法的具体实现方式。
本申请实施例提供的一种对安全启动所使用的密码资源进行管理的方法,适用于网络设备或通用的嵌入式设备等设备,以网络设备为例,该方法的执行主体例如可以是网络设备内的处理器。该网络设备内的处理器用于执行下述方法100或方法200,实现对密码资源的管理。
网络设备的安全存储实体中,密码资源的基线信息包括多种密码资源的基线信息,多种密码资源的基线信息与多种密码算法一一对应,即,每种密码资源的基线信息唯一对应一种密码算法,每种密码资源的基线信息包括该唯一对应的密码算法的状态信息。其中,多种密码算法至少可以包括密码算法1和密码算法2,多种密码算法对应的多种密码资源的基线信息至少可以包括密码资源的基线信息1和密码资源的基线信息2,密码资源的基线信息1包括用于指示密码算法1使用状态的状态信息1,密码资源的基线信息2包括指示密码算法2使用状态的状态信息2。其中,密码资源的基线信息1用于对所述网络设备在安全启动过程中所使用的密码资源1进行完整性验证,密码资源1对应于所述网络设备在进行所述安全启动所使用的密码算法1和公钥B,密码资源的基线信息2用于对所述网络设备在安全启动过程中所使用的密码资源2进行完整性验证,密码资源2对应于所述网络设备在进行所述安全启动所使用的密码算法2和公钥A。此外,每种密码资源的基线信息还可以包括与多种密码算法中的每种密码算法对应的公钥基线值,一种情况下,安全存储实体中,仅保存当前有效的密码算法以及已经中止的密码算法对应的公钥基线值,而为未被使能且未被中止的密码算法预留存储区域,用于存储对应的公钥基线值,在使能该密码算法的同时可以在对应的预留存储区域中写入对应的公钥基线值,以确保安全启动的有效进行,例如:密码资源的密码资源的基线信息的结构例如可以参见图3a~图3c所示。另一种情况下,安全存储实体中,为每种密码算法保存对应的公钥基线值,当前有效的密码算法以及该密码算法对应的公钥基线值被用于安全启动,与上述图3a对应,该情况下密码资源的密码资源的基线信息的结构例如可以参见图3d所示。
其中,中止密码算法可以包括去使能密码算法和吊销密码算法两种可能的含义。去使能密 码算法是指将密码算法暂时设置为不可用状态,暂时不使用该密码算法进行安全启动,但是,后续还可以根据实际需求重新启用该密码算法;吊销密码算法是指终止使用密码算法,该密码算法在网络设备中永久失效,后续也无法重新启用该密码算法。
其中,密码算法1例如可以是以下任一种算法:RSA算法、ECC算法、SHA算法、SM3算法或SM2算法。密码算法2例如可以是以下任一种密码算法:RSA算法,ECC算法、SHA算法、SM3算法或SM2算法,密码算法2和密码算法1不同。
图4为本申请实施例中一种对安全启动所使用的密码资源进行管理的方法100的流程示意图。参见图4,该方法100例如可以包括:
S101,获取指示信息1和指示信息2,其中,指示信息1用于唯一标识密码算法1,指示信息2用于指示网络设备对安全存储实体中存储的密码资源的密码资源的基线信息1进行更新。
网络设备在现网运行过程中,如果用户或供应商根据实际需求,需要对当前有效的密码算法1进行更新,则,网络设备可以获取指示信息1和指示信息2。
网络设备获取指示信息1和指示信息2的方式,包括但不限于:方式一,网络设备接收到用户或供应商发送的更新指令,该更新指令用于指示对密码资源的基线信息1进行更新,该更新指令中携带所述指示信息1和指示信息2。例如,用户或供应商通过网管向网络设备发送命令行,该命令行用于指示对密码资源的基线信息1进行更新,该命令行中携带该指示信息1和指示信息2。方式二,网络设备获取更新文件1,在该更新文件1中包括该指示信息1和指示信息2。作为一个示例,该更新文件1可以是用户或供应商对应的设备根据实际需求生成并发送给网络设备的;作为另一个示例,该更新文件1也可以是用户或供应商根据实际需求在网络设备上配置的。方式三,网络设备获取网络设备和可信的鉴权工具直接建立通信连接,该鉴权工具中保存有指示信息1和指示信息2。方式四,网络设备接收到用户或供应商发送的更新指令,该更新指令用于指示对密码资源的基线信息1进行更新,响应于该更新指令,网络设备向可信的设备(例如证书颁发机构(英文:Certificate Authority,简称:CA)服务器)请求更新文件1,在请求到的更新文件1中包括所述指示信息1和指示信息2。
在通过更新文件1获取指示信息1和指示信息2的示例中,网络设备获取更新文件1的方式,包括但不限于:方式一,网络设备接收到用户或供应商发送的更新指令,该更新指令用于指示对密码资源的基线信息1进行更新,该更新指令中携带更新文件1,例如,用户或供应商通过网管向网络设备发送命令行,该命令行用于指示对密码资源的基线信息1进行更新,该命令行中携带该更新文件1;方式二,网络设备接收到用户或供应商发送的更新指令,该更新指令用于指示对密码资源的基线信息1进行更新,响应于该更新指令,网络设备向可信的设备(例如CA服务器)请求更新文件1;方式三,网络设备和可信的鉴权工具直接建立通信连接,该鉴权工具中保存有更新文件1,由该鉴权工具直接将更新文件1传输给网络设备。
其中,网络设备获取更新文件1或者更新指令所使用的传输协议包括但不限于:简单网络管理协议(英文:Simple Network Management Protocol,简称:SNMP)、网络配置协议(英 文:Network Configuration Protocol,简称:NETCONF)或YANG模型。
指示信息1用于唯一标识密码算法1。一个具体的实施方式中,可以采用若干个比特的二进制取值来标识指示信息1。作为一个示例,如表1所示,可以用3个比特的编码对应的二进制取值来表示不同的指示信息1。处理器中预置表1所示的编码和密码算法之间的对应关系,如此,处理器可以根据指示信息1所对应的具体的二进制值,确定其所标识的密码算法。例如,如下表1所示,当编码为{0,0,0},即编码所对应的二进制取值为0时,指示信息1用于标识RSA算法;又例如,当编码为{0,0,1}时,即编码对应的二进制的值为1时,指示信息1用于标识ECC算法。另一个具体的实施方式中,也可以采用比特映射的方式来表示指示信息1。作为一个示例,如表2所示,可以设置8个比特位的编码来表示不同的指示信息1,每个比特位和每种密码算法一一对应。处理器中预置比特位和密码算法之间的对应关系,如此,处理器可以根据指示信息1所对应的比特位,确定其所标识的密码算法。例如,如下表2所示,当指示信息1为00000001,即,预设的比特位的最低位置位为1时,该指示信息用于唯一标识RSA算法;又例如,当指示信息1为00000010,即,预设的比特位的次低位置位为1时,该指示信息用于唯一标识ECC算法。
表1编码和密码算法之间的对应关系
密码算法名称 | 编码 | 说明 |
RSA算法 | 000 | 非对称加密算法RSA |
ECC算法 | 001 | 椭圆曲线密码学ECC算法 |
SM2算法 | 010 | 国密非对称加密算法SM2 |
表2比特位和密码算法之间的对应关系
密码算法名称 | 编码 | 说明 |
RSA算法 | 00000001 | 非对称加密算法RSA |
ECC算法 | 00000010 | 椭圆曲线密码学ECC算法 |
SM2算法 | 00000100 | 国密非对称加密算法SM2 |
指示信息2,用于指示网络设备对安全存储实体中存储的所述密码资源的基线信息1进行更新,对密码资源的基线信息1进行更新有两种可能的意思:使能指示信息1所标识的密码算法1,或者,中止密码算法1。作为一个示例,指示信息2可以用于指示使能密码算法1;作为另一个示例,指示信息2也可以用于指示中止密码算法1。
以更新文件1中携带指示信息2为例,对如何获取指示信息2进行举例说明。一个具体的示例中,可以通过更新文件1中特定字段的取值来表示指示信息2的不同含义。例如,指示信息2可以是更新文件1中用于指示文件类型的字段。当更新文件1中用于指示文件类型的字段取值为1,表明该更新文件1为使能文件,则,指示信息2用于指示使能密码算法1;当更新文件1中用于指示文件类型的字段取值为0,表明该更新文件1为中止文件,则,指示信息2用于指示中止密码算法1。另一个具体的示例中,指示信息2还可以是更新文件1中的单独的字段,例如可以通过二进制取值或者比特映射的方式,来表明指示信息2的具体含义。
在一些可能的实现方式中,对于更新文件1为使能文件的情况,假设当前有效的密码算法为密码算法2,则,更新文件1中除了包括指示信息1和指示信息2,还可以包括:公钥A和签名X。其中,签名X为采用私钥A和密码算法2对更新文件1进行数字签名后得到的。此外,该更新文件1中还可以携带当前有效的密码算法2的标识,用于验证更新文件1。
具体实现时,网络设备接收到更新文件1后,执行的验证过程可以包括:S11,基于更新文件1中密码算法2的标识,获取密码资源的基线信息中密码算法2对应的密码资源的基线信息2;S12,基于密码资源的基线信息2中的使能标识信息2和中止标识信息2,确定该密码算法2为使能且未被中止的有效密码算法;S13,网络设备获取密码算法2对应的密码资源的基线信息2中的公钥基线值a,利用公钥基线值a对更新文件1中的公钥A进行完整性验证;S14,网络设备利用密码算法2和验证通过的公钥A,对签名X进行验证;S15,如果对签名X的验证通过,则,确定该更新文件1是完整且可信的。如此,可以执行下述S102,例如:基于该更新文件1中的指示信息1和指示信息2,将密码算法1对应的密码资源的基线信息1中的使能标识信息1设置为使能状态。
需要说明的是,上述更新文件1中的公钥A可以是网络设备的根公钥;或者,为了减少根私钥的暴露次数,提高网络设备的安全性和可靠性,节约安全存储实体中的存储资源,更新文件1中的公钥A也可以是网络设备根据根公钥派生得到的公钥。例如网络设备的二级公钥。其中,根公钥为一级公钥,二级公钥是指利用安全哈希算法(英文:Secure Hash Algorithm,简称:SHA)(例如:SHA256)对根公钥处理得到的结果。
网络设备的安全存储实体中预先保存的公钥基线值a与公钥A唯一对应,用于对公钥A进行完整性验证,该公钥基线值a例如可以是公钥A的明文或公钥A的哈希值。一方面,公钥基线值a用于验证更新文件1中携带的公钥A的完整性;另一方面,当密码算法2有效时,在网络设备安全启动过程中,公钥基线值a用于对闪存Flash存储器保存的密码资源中公钥A进行完整性验证。
此外,为了增加安全性,该更新文件1还可以包括网络设备的设备标识信息,该设备标识信息用于标识该网络设备。例如:网络设备的设备标识信息包括下述信息中的任意一个:网络设备中的芯片标识、网络设备的硬件标识、网络设备所属的用户标识、网络设备所属的制造商标识、设备所属的域标识、网络设备的IP地址、网络设备的MAC地址或所述网络设备所属的网段地址。那么,网络设备接收到更新文件1后执行的验证过程中的S15例如可以包括:对签名X的验证通过后,从更新文件1中获取网络设备的设备标识信息,对该设备标识信息进行匹配验证。如果网络设备的设备标识信息和该网络设备匹配,则,认为该更新文件1是可信的;否则,认为更新文件1不可信,不再执行S102。
一个具体的实施方式中,在S15之后,S102之前,本申请实施例还可以包括:S16,获取密码资源的基线信息中的密码算法1对应的密码资源的基线信息1;S17,基于密码资源的基线信息1中的使能标识信息1和中止标识信息1,确定该密码算法1为未使能且未被中止的密码算法。这样,确保待使能的密码算法1对应的密码资源的基线信息1为可以被更新的状态,为执行下述S102进行了可靠的验证。
在另一些可能的实现方式中,对于更新文件1为中止文件的情况,假设当前有效的密码算法为密码算法1,则,更新文件1中除了包括指示信息1和指示信息2,还可以包括:公钥B和签名Y。其中,签名Y为采用私钥B和密码算法1对更新文件1进行数字签名后得到的。此外,该更新文件1中还可以携带当前有效的密码算法1的标识,用于验证更新文件1。
具体实现时,网络设备接收到更新文件1后,执行的验证过程可以包括:S21,基于更新文件1中密码算法1的标识,获取密码资源的基线信息1中密码算法1对应的密码资源的基线信息1;S22,基于密码资源的基线信息1中的使能标识信息1和中止标识信息1,确定该密码算法1为使能且未被中止的有效密码算法;S23,网络设备获取密码算法1对应的密码资源的基线信息1中的公钥基线值b,利用公钥基线值b对更新文件1中的公钥B进行完整性验证;S24,网络设备利用密码算法1和验证通过的公钥B,对签名Y进行验证;S25,如果对签名Y的验证通过,则,确定该更新文件1是完整且可信的。如此,可以执行下述S102,例如:基于该更新文件1中的指示信息1和指示信息2,将密码算法1对应的密码资源的基线信息1中的中止标识信息1设置为中止状态。
需要说明的是,上述更新文件1中的公钥B可以是网络设备的根公钥或者网络设备根据根公钥派生得到的公钥。
网络设备的安全存储实体中预先保存的公钥基线值b与公钥B唯一对应,用于对公钥A进行完整性验证,该公钥基线值b例如可以是公钥B的明文或公钥B的哈希值。一方面,公钥基线值b用于验证更新文件1中携带的公钥B的完整性;另一方面,当密码算法1有效时,在网络设备安全启动过程中,公钥基线值b用于对闪存Flash存储器保存的密码资源中公钥B进行完整性验证。
此外,为了增加安全性,该更新文件1还可以包括网络设备的设备标识信息,该设备标识信息用于标识该网络设备。那么,网络设备接收到更新文件1后执行的验证过程中的S25例如可以包括:对签名Y的验证通过后,从更新文件1中获取网络设备的设备标识信息,对该设备标识信息进行匹配验证。如果网络设备的设备标识信息和该网络设备匹配,则,认为该更新文件1是可信的;否则,认为更新文件1不可信,不再执行S102。
为了保证更新文件1的完整性及真实性,该更新文件1例如可以是证书。对于使能密码算法1的证书1,如图5a所示,例如可以携带:证书类型、公钥A、密码算法1和签名X;此外,该证书1还可以携带公钥基线值b、密码算法2和网络设备的设备标识信息。其中,证书类型可以作为指示信息2,用于指示该证书1为使能证书;密码算法1例如可以是001或00000010,作为指示信息1,用于指示ECC算法。对应用于中止密码算法1的证书2,如图5b所示,例如可以携带:证书类型、密码算法1、公钥B和签名Y;此外,该证书2还可以携带网络设备的设备标识信息。其中,证书类型可以作为指示信息2,用于指示该证书2为中止证书;密码算法1例如可以是000或00000001,作为指示信息1,用于指示RSA算法。需要说明的是,该证书1和证书2的格式可以自定义,也可以采用标准的X.509格式(即密码学里标工艺证书的标准格式)。
需要说明的是,更新文件1的形式在本申请实施例中不作具体限定,只要能够携带指示信息1和指示信息2,任何形式的文件都可以作为更新文件1。
S102,根据指示信息1和指示信息2,对密码算法1对应的密码资源的基线信息1进行更新。
作为一个示例,如果指示信息2用于指示使能密码算法1,那么,网络设备可以基于指示信息2将密码算法1的使用状态设置为使能状态。一种情况下,当密码资源的基线信息通过硬件烧写的形式存储在网络设备的安全存储实体时,S102例如可以包括:设置密码资源的基线信息1中的使能标识信息1以指示密码算法1的使用状态为使能状态。另一种情况下,当密码资源的基线信息通过软件的形式安全存储在网络设备中时,S102例如可以包括:将密码算法1对应的软件状态位设置为使能状态。一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中均已经保存了对应的公钥基线值,则,使能密码算法1也可以表示启用该密码算法1对应的密码资源的基线信息1中的公钥基线值b。另一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中仅保存了已经使能过的密码算法对应的公钥基线值,未使能的密码算法对应的密码资源的基线信息中预留了待写入对应公钥基线值的空间,那么,S102中对密码资源的基线信息1进行更新,例如可以包括:网络设备获取密码算法1对应的公钥基线值b,将公钥基线值b存储在安全存储实体中,例如,在安全存储实体中与密码算法1对应的密码资源的基线信息1的公钥基线值1对应的位置写入公钥基线值b。其中,如果指示信息1和指示信息2携带在更新文件1中,密码算法1对应的公钥基线值b也可以携带在该更新文件1中,那么,网络设备获取密码算法1对应的公钥基线值b可以是:网络设备从更新文件1中获取公钥基线值b。
举例来说,假设密码算法2为RSA算法,密码算法1为ECC算法,在执行方法100之前,密码资源的基线信息的格式可以参见图3a所示,执行方法100之后,密码资源的基线信息的格式可以参见图3b所示。
在更新密码资源的基线信息的同时,或者,在更新密码资源的基线信息之后,也可以对Flash存储器中的密码资源以及应用程序的镜像文件进行相应的更新,为确保在网络设备重启后可以基于新使能的密码算法1进行安全启动。其中,Flash存储器中的密码资源用于对网络设备加载的应用程序的镜像文件进行完整性验证,安全存储实体中的密码资源的基线信息用于对Flash存储器中的密码资源进行完整性验证。更新后的Flash存储器中的密码资源至少包括但不限于:密码算法1对应的公钥B。
例如:在更新Flash存储器中的密码资源1以及应用程序的镜像文件1之前,Flash存储器的结构参见图6a,其中,密码资源1中至少可以包括公钥A,应用程序的镜像文件1可以包括:Bootrom代码、Bootrom代码的签名1、BootLoader代码、BootLoader代码的签名2、OS代码、OS代码的签名3、APP代码和APP代码的签名4,其中,签名1~签名4为基于密码算法2以及密码算法2对应的私钥A进行数字签名获得的。具体实现时,基于密码算法2进行安全启动的过程可以包括:S31,网络设备上电;S32,基于执行S102之前的密码资源的基线信息中的基线信息2,对Flash存储器中的密码资源1进行完整性验证; S33,如果Flash存储器中的密码资源1的完整性验证通过,则使用Flash存储器中的密码资源1对应用程序的镜像文件1进行完整性验证,完成安全启动。
在更新Flash存储器中的密码资源1以及应用程序的镜像文件1之后,Flash存储器的结构参见图6b,其中,更新后的Flash存储器中的密码资源记作密码资源2,该密码资源2中至少可以包括密码算法1对应的公钥B,应用程序的镜像文件2可以包括:Bootrom代码、Bootrom代码的签名1’、BootLoader代码、BootLoader代码的签名2’、OS代码、OS代码的签名3’、APP代码和APP代码的签名4’,其中,签名1’~签名4’为基于密码算法1以及密码算法1对应的私钥B进行数字签名获得的。具体实现时,基于密码算法1进行安全启动的过程可以包括:S41,网络设备上电;S42,基于执行S102之后的密码资源的基线信息中的密码资源的基线信息1,对Flash存储器中的密码资源2进行完整性验证;S43,如果Flash存储器中的密码资源2的完整性验证通过,则使用Flash存储器中的密码资源2对应用程序的镜像文件2进行完整性验证,完成安全启动。
需要说明的是,应用程序的镜像文件2中的Bootrom代码、BootLoader代码、OS代码以及APP代码,可以和应用程序镜像文件1中的Bootrom代码、BootLoader代码、OS代码以及APP代码相同,也可以不同,在本申请实施例中不作具体限定。如果在更新密码资源的基线信息的同时进行软件升级,则,应用程序的镜像文件2和应用程序镜像文件1中代码的部分或全部不同。
其中,S42中基于图3b所示密码资源的基线信息中的密码资源的基线信息1,对Flash存储器中的密码资源2进行完整性验证,可以包括:S421,基于密码算法1对应的密码资源的基线信息1中的公钥基线b,验证Flash存储器中的密码资源2中的公钥B的完整性。其中,如果密码资源的基线信息1中的公钥基线值b为公钥B的哈希值,则,S421例如可以包括:计算Flash存储器中的密码资源2中公钥B的哈希值,比较该哈希值和公钥基线值b是否相同,如果相同,则,确定Flash存储器中的密码资源2的完整性验证通过。如果密码资源的基线信息1中的公钥基线值b为公钥B的明文,则,S421例如可以包括:比较Flash存储器中的密码资源2中的公钥B和公钥基线值b是否相同,如果相同,则,确定Flash存储器中的密码资源2的完整性验证通过。此外,S42还可以包括:S422,验证密码资源的基线信息1中的密码算法1和密码资源2中的密码算法1是否一致。
作为另一个示例,如果指示信息2用于指示中止密码算法1,那么,网络设备可以基于指示信息2将密码算法1的状态设置为中止状态。其中,中止密码算法1可以包括去使能密码算法1和吊销密码算法1。一种情况下,如果指示信息2用于指示去使能密码算法1,那么,S102例如可以包括:去使能密码算法1,即,将密码算法1的使用状态设置为去使能状态。另一种情况下,如果指示信息2用于指示吊销密码算法1,那么,S102例如可以包括:吊销密码算法1,即,将密码算法1的使用状态设置为吊销状态。将密码算法1的使用状态设置为吊销状态,例如可以是:设置密码算法1对应的吊销标识信息1以指示密码算法1的使用状态为吊销状态,即,烧写密码算法1对应的吊销标识信息1。这样,通过中止不能满足用户需求或安全需求的密码算法,保证网络设备的安全启动能够有效的被实施,提高了网络设备的安全性。
举例来说,如果网络设备中密码资源的基线信息1对应的密码算法1仅是不符合目前的安全需求,还有被回退使用的可能性,且该密码资源的基线信息1通过软件的形式进行安全存储,则,S102例如可以将密码算法1对应的软件状态位设置为去使能状态,以便后续有回退使用密码算法1的需求时,方便将密码算法1对应的软件状态位再设置为使能状态。或者,如果网络设备中密码资源的基线信息1对应的密码算法1不符合目前的安全需求且没有被回退使用的可能性,或者,该密码资源的基线信息1通过硬件烧写的形式进行存储,则,可以将密码算法1对应的吊销标识信息1设置为吊销状态,一旦吊销标识信息1设置为吊销状态,则该密码算法1将永远失效,无法再回退使用密码算法1。
一个具体的实施方式中,在执行S102之前,如果网络设备的安全启动符合预设条件,则,可以认为使用新使能的密码算法能够稳定的完成安全启动,网络设备可以实施该S102,将之前所使用的密码算法1进行中止。其中,预设条件,例如可以指:网络设备使用新使能的密码算法进行安全启动成功预设次数或安全启动成功后预设时长网络设备运行正常。
举例来说,假设密码算法1为RSA算法,在执行方法100之前,密码资源的基线信息的格式可以参见图3a、3b或3d所示,执行方法100之后,密码资源的基线信息的格式可以参见图3c所示。
这样,通过中止不能满足用户需求或安全需求的密码算法,保证网络设备的安全启动能够有效的被实施,一定程度上提高了网络安全性。
可见,通过本申请实施例提供的方法,一旦当前使用的密码算法不能够满足安全需求或者用户的要求时,网络设备在线获取指示信息,并基于指示信息对该网络设备的安全存储实体中预置的密码资源的基线信息进行更新,使能符合要求的密码算法或中止不符合要求的密码算法,这样,使用更新的密码资源的基线信息对网络设备进行安全启动,即使对安全启动中的密码算法的需求发生改变,也无需将网络设备或其中的芯片召回重新设计,通过本申请实施例提供的方法,就能够方便、灵活的更新密码资源以满足变化后的安全需求,实现基于不同的需求在线调整不同的密码算法以达到按照要求进行安全启动的目的,从而提高了网络设备的安全性。
本申请实施例中,在当前的密码算法2无法满足需求时,网络设备可以通过使能新的密码算法1,中止密码算法2,管理密码资源以满足需求。基于此,本申请实施例还提供了一种对安全启动所使用的密码资源进行管理的方法200,如图7所示,该方法200例如可以包括:
S201,获取指示信息1和指示信息2,其中,指示信息1用于唯一标识密码算法1,指示信息2用于指示使能密码算法1。
S202,根据指示信息1和指示信息2,使能密码算法1。
例如,S201可以包括:网络设备获取更新文件1,该更新文件1中携带指示信息1和指示信息2。
需要说明的是,上述S201~S202的相关描述,可以参见上述方法100的S101~S102中关于使能密码算法1的相关说明。
S203,获取指示信息3和指示信息4,指示信息3用于唯一标识密码算法2,指示信息4用于指示中止使用密码算法2。
其中,中止密码资源的基线信息中的密码算法2,例如可以包括去使能密码算法2和吊销密码算法2两种可能的含义,具体说明可以参见S102中关于中止密码算法1的相关描述。
网络设备获取指示信息3和指示信息4的方式,可以参见上述方法100中关于网络设备获取指示信息1和指示信息2的方式的相关描述。
需要说明的是,指示信息3和指示信息4可以携带在更新文件中,该更新文件的获取方式可以参见S101中对更新文件1的获取方式的相关描述。
指示信息3,用于唯一标识密码算法2。该指示信息3例如可以是密码算法2对应的编码的二进制取值,例如:指示信息3为{0,0,0},用于标识RSA算法;或者,该指示信息3例如可以是密码算法2对应的比特位,例如:指示信息3为00000001,用于标识RSA算法。
指示信息4,用于指示网络设备对密码算法2进行中止。如果指示信息3和指示信息4携带在更新文件中,那么,一个具体的示例中,可以通过更新文件中的特定字段的取值表示该指示信息4的不同含义。例如:指示信息4可以是更新文件中用于指示文件类型的字段。另一个具体的示例中,指示信息4还可以是更新文件中的单独的字段,例如可以通过二进制取值或者比特映射的方式,来表明指示信息4的具体含义。
作为一个示例,S203可以是:网络设备获取更新文件2,该更新文件2中可以包括指示信息3和指示信息4。更新文件2与更新文件1是两个不同的用于管理密码资源的文件,更新文件1的文件类型为使能文件,更新文件2的类型为中止文件。例如:该更新文件2可以是用户或供应商对应的设备根据实际需求生成并发送给网络设备的;又例如:该更新文件2也可以是用户或供应商根据实际需求在网络设备上配置的。需要说明的是,该更新文件2的获取方式可以参见S101中对更新文件1的获取方式的相关描述。
其中,更新文件2除了包括指示信息3和指示信息4,还可以包括:公钥B、签名Z。其中,签名Z为采用新使能的密码算法1对应的私钥B和密码算法1对更新文件2进行数字签名后得到的。此外,该更新文件2中还可以包括当前有效的密码算法1的标识,用于对更新文件2进行验证,提高网络设备的安全性。
具体实现时,网络设备接收到更新文件2后,执行的验证过程可以包括:S51,基于更新文件2中密码算法1的标识,获取密码资源的基线信息中密码算法1对应的密码资源的基线信息1;S52,基于密码资源的基线信息1中的使能标识信息1和中止标识信息1,确定该密码算法1为使能且未被中止的有效密码算法;S53,网络设备获取密码资源的基线信息1中的公钥基线值b,利用公钥基线值b对更新文件2中的公钥B进行完整性验证;S54,网络设备利用密码算法1和验证通过的公钥B对签名Z进行验证;S55,如果对签名Z的验证通过,则,认为该更新文件2是完整且可信的。如此,可以执行下述S204,例如:基于该更新文件2中的指示信息3和指示信息4,设置密码算法2对应的密码资源的基线信息2中的中止标识信息2以指示密码算法2的使用状态为中止状态。
需要说明的是,上述更新文件2中的公钥B可以是网络设备的根公钥;或者,更新文件2中的公钥B也可以是网络设备根据根公钥派生得到的公钥,例如网络设备的二级公钥。
此外,为了增加安全性,该更新文件2还可以包括网络设备的设备标识信息,那么,网络设备接收到更新文件2后执行的验证过程中的S55例如可以包括:对签名Z的验证通过后,从更新文件2中获取网络设备的设备标识信息,对该设备标识信息进行匹配验证。如果网络设备的设备标识信息和该网络设备匹配,则,认为该更新文件2是可信的;否则,认为更新文件2不可信,不再执行S204。
为了保证携带指示信息的更新文件的完整性和真实性,携带指示信息的更新文件例如可以是证书。如果指示信息1和指示信息2携带在更新文件1,指示信息3和指示信息4携带在更新文件2,则,更新文件1可以是图5a所示的证书1,更新文件2可以是如图8a所示的证书3,该证书3中可以携带:证书类型、密码算法2、公钥B和签名Z;此外,该证书3还可以携带网络设备的设备标识信息。其中,证书类型可以作为指示信息4,用于指示该证书3为中止证书;密码算法2例如可以是000或00000001,作为指示信息3,用于指示RSA算法。
这样,通过一个更新文件携带指示信息1和指示信息2,另一个更新文件携带指示信息3和指示信息4,在提高网络设备的安全性的基础上,能够控制在新密码算法使能且稳定的被用于安全启动之后,才中止之前所使用的密码算法,有效的避免使用新使能的密码算法进行安全启动不成功或者不稳定导致网络设备无法正常工作的问题,提高了网络设备的可靠性。
作为另一个示例,S203可以是:网络设备从更新文件1中获取指示信息3和指示信息4。其中,该更新文件1中可以包括指示信息1~指示信息4,如此,网络设备可以同时实施S201和S203。更新文件1的文件类型为使能和中止文件,即,该更新文件1具有使能密码算法1以及中止密码算法2的功能。例如:该更新文件的文件类型对应字段的取值可以为0、1和2,如果更新文件1的文件类型对应字段的取值为0,则,网络设备确定该更新文件为使能文件;如果更新文件1的文件类型对应字段的取值为1,则,网络设备确定该更新文件为中止文件;如果更新文件1的文件类型对应字段的取值为2,则,网络设备确定该更新文件为使能和中止文件。
其中,更新文件1除了包括指示信息1~指示信息4,还可以包括:公钥A、公钥基线值b和签名W。其中,签名W为采用已失效的密码算法2对应的私钥A和密码算法2对更新文件1进行数字签名后得到的。
具体实现时,网络设备接收到更新文件1后,执行S202之前实施的验证过程可以参见上述S11~S15;执行S204之前,实施的验证过程可以包括:S61,网络设备获取密码资源的基线信息2中的公钥基线值a,利用公钥基线值a对更新文件1中的公钥A进行完整性验证;S62,网络设备利用密码算法2和验证通过的公钥A对签名W进行验证;S63,如果对签名W的验证通过,则,认为该更新文件1是完整且可信的。如此,可以执行下述S204,例如:基于该更新文件1中的指示信息3和指示信息4,将密码算法2对应的密码资源的基线信息2中的中止标识信息2设置为中止状态。
需要说明的是,上述更新文件1中的公钥A可以是网络设备的根公钥;或者,更新文件1中的公钥A也可以是网络设备根据根公钥派生得到的公钥,例如网络设备的二级公钥。
此外,为了增加安全性,该更新文件1还可以包括网络设备的设备标识信息,那么,网络设备接收到更新文件1后执行的验证过程中的例如可以包括:对签名W的验证通过后,从更新文件1中获取网络设备的设备标识信息,对该设备标识信息进行匹配验证。如果网络设备的设备标识信息和该网络设备匹配,则,认为该更新文件1是可信的;否则,认为更新文件1不可信,不再执行S204。
为了保证携带指示信息的更新文件的完整性和真实性,携带指示信息的更新文件例如可以是证书。更新文件1例如可以是图8b所示的证书4,该证书4中可以携带:证书类型、密码算法1、公钥A、密码算法2和签名W;此外,该证书4还可以携带公钥基线值b和网络设备的设备标识信息。其中,证书类型可以作为指示信息2和指示信息4,用于指示该证书4为使能和中止证书;密码算法1例如可以是001或00000010,作为指示信息1,用于指示ECC算法;密码算法2例如可以是000或00000001,作为指示信息3,用于指示RSA算法。签名W为使用密码算法2和该密码算法2对应的私钥A对证书4进行数字签名获得的。该情况下,S203可以包括:网络设备使用新使能的密码算法1对网络设备进行安全启动后,对证书4进行上述S61~S63的验证,验证通过后从该证书4中获取指示信息3和指示信息4,从而基于下述S204,中止密码算法2。
这样,通过一个更新文件携带指示信息1~指示信息4,在提高网络设备的安全性的基础上,由于仅通过一个更新文件即可实现新密码算法的使能和之前所使用的密码算法的中止,减少网络中信息的交互,节约了网络资源。
S204,根据指示信息3和指示信息4,中止使用密码算法2。
作为一个示例,在S202之后,如果网络设备使用密码资源的基线信息中的密码算法1和公钥基线值b进行安全启动符合预设条件,则,网络设备可以根据指示信息3和指示信息4,中止密码算法2。该示例中,根据指示信息3和指示信息4例如可以携带在中止指令中,或者,网络设备响应中止指令的指示从可信的设备请求根据指示信息3和指示信息4。其中,预设条件,例如可以指:安全启动成功预设次数或安全启动成功后预设时长网络设备运行正常,当使用密码算法1进行安全启动符合预设条件,则可以认为使用更新后的密码资源的基线信息1中的密码算法1和公钥基线值b能够稳定的完成安全启动。
作为另一个示例,如果S202之后网络设备配置标志位,该标志位的值用于指示密码算法1为首次使用。那么,当网络设备重启后,根据该标志位能够确定该密码算法1首次使用,则,网络设备获取指示信息3和指示信息4,中止密码算法2。这样,网络设备无需接收中止指令,通过标志位的指示即可将S202之前所使用的密码算法2进行中止。该示例中,还可以在中止密码算法2之后,修改该标志位,使得该标志位的值用于指示密码算法1为非首次使用,以确保后续不再基于该标志位的指示进行密码算法的中止。
如果指示信息4用于指示中止密码算法2,那么,网络设备可以基于指示信息4将密码算法2的使用状态设置为去使能状态或吊销状态。一种情况下,当密码资源的基线信息通过硬件烧写的形式存储在网络设备的安全存储实体时,S204例如可以包括:将密码算法 2对应的密码资源的基线信息2中的去使能标识信息2设置为去使能状态或吊销标识信息2设置为吊销状态。另一种情况下,当密码资源的基线信息通过软件的形式安全存储在网络设备中时,S204例如可以包括:将密码算法2对应的软件状态位设置为去使能状态或吊销状态。
举例来说,假设密码算法2为RSA算法,密码算法1为ECC算法,在执行方法200之前,密码资源的基线信息的格式可以参见图3a所示;执行方法200的S202之后S204之前,密码资源的基线信息的格式可以参见图3b所示;执行方法200的S204之后,密码资源的基线信息的结构可以参见图3c所示。
在一些可能的实现方式中,中止S202之前所使用的密码算法2,还可以基于网络设备本地配置的策略完成。具体实现时,当网络设备使能密码算法1之后,网络设备本地监测到预设时长内使用该密码算法1进行安全启动均无异常,或者,使用该密码算法1进行预设次数的安全启动均成功,则,确定符合本地策略中中止密码算法2的条件,将密码算法2进行中止。这样,网络设备无需额外接收用于中止密码算法2的更新文件,也不用在使能密码算法1之后再获取指示信息3和指示信息4,通过本地的简化配置,不仅能够避免使能密码算法1之后又回退到使用密码算法2进行安全启动导致不能满足需求的问题,还能够解决从密码算法2更新到密码算法1失败时过早的中止密码算法2导致网络设备无法启动的问题,节约了网络资源,提高了网络设备的安全性。
可见,该实现方式中,在确保使能新的密码算法能够成功完成网络设备的安全启动之后,通过在线获取指示信息,基于指示信息对该网络设备的安全存储实体中之前使用的密码资源的基线信息进行中止,不仅能够防止使用不符合要求的密码算法进行安全启动,克服网络设备的安全启动无法满足安全性需求或用户的要求的问题,使得网络设备能够有效的按照需求调整用于安全启动的密码资源,从而提高了网络设备的安全性。
图9为本申请实施例中另一种安全启动的方法300的流程示意图。参见图9,该方法300例如可以包括:
S301,将用于安全启动的密码算法2更新为密码算法1。
具体实现时,S301可以包括:S301a,使能密码算法1;S301b,中止密码算法2。其中,S301a的具体实现方式的相关描述,可以参见上述方法100中关于使能密码算法1的相关说明,或者,也可以参见上述方法200中S201~S202的相关说明。S301b的具体实现方式的相关描述,可以参见上述方法100中关于中止密码算法1的相关说明,或者,也可以参见上述方法200中S203~S204的相关说明。
作为一个示例,假设网络设备获取更新文件1和更新文件2,更新文件1用于使能密码算法1,更新文件2用于中止密码算法2,那么,S301a例如可以包括:根据更新文件1,使能密码算法1;S301b例如可以包括:根据更新文件2,中止密码算法2。其中,假设密码算法1为ECC算法,密码算法2为RSA算法,更新文件1的具体格式为图5a所示的证书1,更新文件2的格式具体参见图8a所示的证书3,那么,执行S301之前,网络设备的安全存储实体中密码资源的基线信息的结构可以参见图3a或图3d所示;执行S302之后, 网络设备的安全存储实体中密码资源的基线信息的结构可以参见图3c所示。其中,更新文件2也可以用于吊销密码算法2,那么,S301b例如可以包括:根据更新文件2,吊销密码算法2。
作为另一个示例,假设网络设备获取更新文件1,更新文件1用于使能密码算法1并中止密码算法2,那么,S301a例如可以包括:根据更新文件1,使能密码算法1;S301b例如可以包括:根据更新文件1,中止密码算法2。其中,假设密码算法1为ECC算法,密码算法2为RSA算法,更新文件1的具体格式为图8b所示的证书4,那么,执行S301之前,网络设备的安全存储实体中密码资源的基线信息的结构可以参见图3a或图3d所示;执行S302之后,网络设备的安全存储实体中密码资源的基线信息的结构可以参见图3c所示。
需要说明的是,中止使用密码算法2,具体可以是去使能密码算法2或吊销密码算法2。
S302,将用于安全启动的公钥基线值a更新为公钥基线值b。
一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中均已经保存了对应的公钥基线值,则,使能密码算法1也可以表示启用该密码算法1对应的密码资源的基线信息1中的公钥基线值b,表征将用于安全启动的公钥基线值a更新为公钥基线值b。
另一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中仅保存了已经使能过的密码算法对应的公钥基线值,未使能的密码算法对应的密码资源的基线信息中预留了待写入对应公钥基线值的空间,则,网络设备也可以获取密码算法1对应的公钥基线值b,那么,S302例如可以包括:将公钥基线值b存储在安全存储实体中,例如,在安全存储实体中与密码算法1对应的密码资源的基线信息1的公钥基线值1对应的位置写入公钥基线值b。其中,如果指示信息1和指示信息2携带在更新文件1中,密码算法1对应的公钥基线值b也可以携带在该更新文件1中,那么,网络设备获取密码算法1对应的公钥基线值b可以是:网络设备从更新文件1中获取公钥基线值b。
其中,公钥基线值b与公钥B唯一对应,用于对公钥B进行完整性验证,该公钥基线值b例如可以是公钥B的明文或公钥B的哈希值。
举例来说,假设密码算法2为RSA算法,密码算法1为ECC算法,在执行上述S301之前,密码资源的基线信息的格式可以参见图3a所示,执行上述S301~S302之后,密码资源的基线信息的格式可以参见图3b所示。
S303,采用所述公钥基线值b对公钥B的完整性进行验证,其中,密码算法1和所述通过完整性验证的公钥B用于对所述安全启动过程中加载的镜像文件的签名进行验证。
在S301~S302的同时,或者,在S302之后,也可以对Flash存储器中的密码资源以及应用程序的镜像文件进行相应的更新,确保在网络设备重启后可以基于新使能的密码算法1进行安全启动。其中,Flash存储器中的密码资源用于对网络设备加载的应用程序的镜像文件进行完整性验证,安全存储实体中的密码资源的基线信息用于对Flash存储器中的密码资源进行完整性验证。更新后的Flash存储器中的第二密码资源至少包括但不限于:密码算法1对应的公钥B。
需要说明的是,S303中公钥基线值b对公钥B的完整性进行验证的相关说明可以参见方法100中关于图6a、S31~S33、图6b以及S41~S43的相关说明。
在一些可能的实现方式中,在S303之后,该方法300还可以包括:
S304,响应于公钥B通过完整性验证,采用公钥B和密码算法1,对安全启动过程中加载的镜像文件进行验证。
需要说明的是,其中,安全启动过程中加载的镜像文件,例如可以包括但不限于:Bootrom代码、BootLoader代码、OS和APP代码。S304具体可以参见图1对应的描述。例如:网络设备上电后,首先,执行BSBC,BSBC使用公钥B和密码算法1对Bootrom代码的签名1进行验证,验证通过后才执行Bootrom;然后,Bootrom使用公钥B和密码算法1对BootLoader代码的签名2进行验证,验证通过后才执行BootLoader;然后,BootLoader使用公钥B和密码算法2对OS代码的签名3进行验证,验证通过后,引导执行OS;接着,OS使用公钥B和密码算法1对APP代码的签名4进行验证,验证通过后,执行该APP。需要说明的是,上述签名1~4均是可信的签名系统基于公钥B和密码算法1分别对Bootrom代码、BootLoader代码、OS和APP代码进行数字签名获得的。
其中,可信的签名系统采用公钥B和密码算法1对APP代码进行数字签名的过程可以包括:先利用哈希算法对APP代码进行哈希计算,得到数字摘要digest Y1,再利用私钥B对该digest Y1进行数字签名,得到签名digestEncode Y1。该可信的签名系统可以将APP代码和digestEncode Y1发送给网络设备,网络设备的Flash存储器上保存有该APP代码和digestEncode Y1。在安全启动中,对APP代码的签名digestEncode Y1进行验证的过程可以包括:网络设备在加载APP代码之前,可以先对APP代码采用签名时相同的哈希算法进行哈希计算,生成数字摘要digest Y2,然后用公钥B对digestEncode Y1进行验签得到digestDecode Y3,判断digestDecode Y3和digest Y2是否相同,如果相同,则可以确定该APP代码未被篡改且为合法制造商发布的,从而确保该网络设备待加载的APP代码是安全和可靠的。其中,私钥B和公钥B是网络设备的制造商提供的一对密钥,公钥B是公开可见的,而私钥B则是保密的,只有制造商对应的签名系统可见。
可见,通过本申请实施例提供的方法,一旦当前使用的密码算法不能够满足安全需求或者用户的要求时,网络设备在线更新用于安全启动的密码算法和对应的公钥基线值,使能符合要求的密码算法,这样,通过方便、灵活的使能新的密码算法,实现使用新使能的密码算法对网络设备进行安全启动,无需将网络设备或其中的芯片召回重新设计,即可使得安全启动满足变化的安全需求,实现基于不同的需求在线调整不同的密码算法以达到按照满足要求的密码算法进行安全启动的目的,从而提高了网络设备的安全性。
图10示出了本申请实施例中一种管理网络资源的方法400的流程示意图,该方法400由网络设备实施,该管理网络资源的方法400例如可以包括:
S401,获取第一指示信息和第二指示信息,其中,该第一指示信息用于唯一标识第一密码算法,该第二指示信息用于指示所述网络设备对安全存储实体中存储的第一密码资源的基线信息进行更新,其中,所述第一密码资源的基线信息用于对所述网络设备在安全启 动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述网络设备在进行所述安全启动所使用的第一密码算法和第一公钥,所述第一密码资源的基线信息包括所述第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态;
S402,根据所述第一指示信息和所述第二指示信息,对所述第一密码资源的基线信息进行更新。
其中,多种密码算法中的第一密码算法可以为以下任一种算法:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
需要说明的是,一种情况下,安全存储实体可以为处理器中的一次性可编程存储空间;或者,另一种情况下,安全存储实体也可以为独立于处理器的安全芯片。
其中,该方法400中的网络设备具体可以是上述方法100中的网络设备或方法200中的网络设备,相关操作具体可以参见方法100或方法200中网络设备执行的操作。具体而言,S401~S402的相关描述可以参见方法100中的S101~S102或方法200中的S201~S202。其中,第一指示信息可以是方法100或方法200中的指示信息1,第二指示信息可以是方法100或方法200中的指示信息2,第一密码算法可以是方法100或方法200中的密码算法1,第一密码资源的基线信息可以是方法100中的密码资源的基线信息1。
在一种可能的实现方式中,第二指示信息具体用于指示使能第一密码算法。那么,S402中对所述第一密码资源的基线信息进行更新,例如可以包括:更改第一密码算法的状态信息,以将所述第一密码算法的使用状态设置为使能状态。将所述第一密码算法的使用状态设置为使能状态,例如可以包括:设置第一密码算法对应的使能标识信息以指示所述第一密码算法的使用状态为使能状态。一种情况下,当密码资源的基线信息通过硬件烧写的形式存储在网络设备的安全存储实体时,S402例如可以包括:将第一密码算法对应的第一密码资源的基线信息中的使能标识信息设置为使能状态。另一种情况下,当密码资源的基线信息通过软件的形式安全存储在网络设备中时,S402例如可以包括:将第一密码算法对应的软件状态位设置为使能状态。
其中,更新后的第一密码资源的基线信息还包括第一公钥基线值,所述第一公钥基线值用于对所述第一公钥进行完整性验证。一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中均已经保存了对应的公钥基线值,则,使能第一密码算法也可以表示启用该密码算法对应的第一密码资源的基线信息中的第一公钥基线值。另一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中仅保存了已经使能过的密码算法对应的公钥基线值,未使能的密码算法对应的密码资源的基线信息中预留了待写入对应公钥基线值的空间,那么,S402中对第一密码资源的基线信息进行更新,可以包括:网络设备获取第一密码算法对应的第一公钥基线值,将第一公钥基线值存储在安全存储实体中,例如,在安全存储实体中与第一密码算法对应的第一密码资源的基线信息相应的位置写入第一公钥基线值。其中,如果第一指示信息和第二指示信息携带在第一更新文件中,第一密码算法对应的第一公钥基线值也可以携带在该第一更新文件中,那么,网络设备获 取第一密码算法对应的第一公钥基线值可以是:网络设备从第一更新文件中获取第一公钥基线值。
其中,第一公钥基线值为第一公钥的哈希值或者第一公钥的明文。第一公钥基线值与第一公钥唯一对应,用于对第一公钥进行完整性验证,一方面,第一公钥基线值用于验证第一更新文件中携带的第一公钥的完整性;另一方面,当第一密码算法有效时,在网络设备安全启动过程中,第一公钥基线值用于对非易失性存储器存储器保存的密码资源中第一公钥进行完整性验证。
作为一个示例,在S402之后,在所述安全启动之前,该方法400还可以包括:将非易失性存储器中的第二密码资源更新为第一密码资源,更新后的第一密码资源包括所述第一密码算法和第一公钥。此时,该方法400还可以包括:根据更新后的所述第一密码资源的基线信息进行安全启动,该安全启动的过程例如可以包括:基于更新后的所述第一密码资源的基线信息对所述非易失性存储器中存储的更新后的所述密码资源进行完整性验证;如果所述非易失性存储器中存储的密码资源通过完整性验证,则,根据所述第一公钥和所述第一密码算法,对通过第一私钥进行数字签名的应用程序的镜像文件进行验证。其中,更新后的所述第一密码资源的基线信息包括第一公钥基线值,所述基于更新后的所述第一密码资源的基线信息对所述非易失性存储器中存储的更新后的所述第一密码资源进行完整性验证,例如可以包括:采用所述第一公钥基线值对所述非易失性存储器中存储的所述第一公钥进行完整性验证。如此,通过该实施例,能够在灵活更新符合需求的密码算法后,基于符合需求的密码算法进行安全启动,提高了网络设备的安全性和对其的使用体验。
对于S401,例如可以包括:获取第一更新文件,所述第一更新文件携带所述第一指示信息和所述第二指示信息。其中,为了保证第一更新文件的完整性及真实性,该第一更新文件例如可以是证书。该证书的格式可以自定义,也可以采用标准的X.509格式(即密码学里标工艺证书的标准格式)。此外,该第一更新文件也可以是其他能够携带第一指示信息和第二指示信息且能够被网络设备识别和解析的任意格式的文件,在本申请实施例中对第一更新文件不作具体限定。
作为一个示例,该第一更新文件采用第二私钥和第二密码算法进行签名,所述多种密码算法包括所述第二密码算法,所述安全存储实体中存储有第二密码资源的基线信息,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于所述第二密码算法和第二公钥,其中,所述网络设备在使用所述第一密码资源进行安全启动之前,使用所述第二密码资源进行安全启动,所述第一更新文件中还包括所述第二公钥,在对所述第一密码资源的基线信息进行更新之前,所述方法400还可以包括:根据所述第二密码算法和所述第二公钥,验证所述第一更新文件的签名。其中,第二公钥为所述网络设备的根公钥或所述第二公钥为基于所述网络设备的根密钥派生得到的公钥,例如可以是网络设备的二级公钥。可见,当第一更新文件的验证通过,则认为该第一更新文件未被篡改且来源可信,确定该第一更新文件是可靠的,可以基于该第一更新文件中的第一指示信息和第二指示信息进行密码资源的更新。
一种可能的实施例中,所述安全存储实体中预置有所述第二公钥基线值,那么,在所述根据所述第二密码算法和所述第二公钥验证所述第一更新文件的签名之前,所述方法400还可以包括:基于所述安全存储实体中存储的所述第二公钥基线值对所述第一更新文件中携带的所述第二公钥进行完整性验证,如果第二公钥的完整性验证通过,才执行根据所述第二密码算法和所述第二公钥验证所述第一更新文件的签名,安全性更高。
另一种可能的实施例中,所述第一更新文件还可以包括网络设备的设备标识信息,所述设备标识信息用于标识所述网络设备。例如,所述网络设备的设备标识信息包括下述信息中的任意一个:所述网络设备中的芯片标识、所述网络设备的硬件标识、所述网络设备所属的用户标识、所述网络设备所属的制造商标识、所述设备所属的域标识、所述网络设备的互联网协议IP地址、所述网络设备的媒体访问控制MAC地址或所述网络设备所属的网段地址。那么,当第一更新文件的验证通过后,还可以对第一更新文件中的设备标识信息和网络设备进行匹配验证,当验证通过后,确定该第一更新文件是针对该网络设备的,基于第一更新实施该方法400,完成对密码资源的更新。
在一些可能的实现方式中,所述安全存储实体中还存储有第二密码资源的基线信息,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于第二密码算法和第二公钥,其中,所述网络设备在使用所述第一密码资源进行安全启动之前,使用所述第二密码资源进行安全启动,那么,该方法400还可以包括:获取第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第二密码算法,所述第四指示信息用于指示中止使用所述第二密码算法。作为一个示例,第三指示信息和第四指示信息可以携带在第一更新文件中,即,第一指示信息、第二指示信息、第三指示信息和第四指示信息均携带在第一更新文件中。作为另一个示例,第三指示信息和第四指示信息也可以携带在第二更新文件中,即,第一指示信息和第二指示信息携带在第一更新文件中,第三指示信息和第四指示信息携带在第二更新文件中。需要说明的是,该第二更新文件可以是证书或者其他能够被网络设备识别和解析的任意格式的文件,在本申请实施例中对第二更新文件不作具体限定。
该实现方式中,方法400还可以包括:根据所述第三指示信息和所述第四指示信息,中止使用所述第二密码算法。其中,中止使用所述第二密码算法,例如可以包括:在所述对所述第一密码资源的基线信息进行更新之后,中止使用所述第二密码算法。
上述中止使用所述第二密码算法,可以包括:去使能所述第二密码算法或吊销所述第二密码算法。其中,去使能所述第二密码算法例如可以包括:将所述第二密码算法的使用状态设置为去使能状态;吊销所述第二密码算法例如可以包括:将所述第二密码算法的使用状态设置为吊销状态。例如,将所述第二密码算法使用状态设置为吊销状态,具体可以是:设置所述第二密码算法对应的吊销标识信息以指示第二密码算法的使用状态为吊销状态。
其中,所述第二密码算法可以为以下任一种密码算法:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3,第一密码算法和第二密码算法为不同的密码算法。
其中,上述关于中止第二密码算法的相关实施例,具体可以参见上述方法200中S203~S204中网络设备执行的操作。其中,第三指示信息可以是方法200中的指示信息3,第四指示信息可以是方法200中的指示信息4,第二密码算法可以是方法200中的密码算法2。
在另一种可能的实现方式中,所述第二指示信息具体用于指示所述网络设备中止使用所述第一密码算法。那么,S402中对所述第一密码资源的基线信息进行更新,具体为:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为中止状态。上述中止使用所述第一密码算法,可以包括:去使能所述第一密码算法或吊销所述第一密码算法。其中,对于去使能所述第一密码算法的情况,对所述第一密码资源的基线信息进行更新例如可以包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为去使能状态;对于吊销所述第一密码算法的情况,对所述第一密码资源的基线信息进行更新例如可以包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为吊销状态。例如,第一密码算法的状态信息包括吊销标识信息,那么,所述更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为吊销状态包括:设置所述吊销标识信息以将所述第一密码算法的使用状态设置为吊销状态。
其中,上述关于中止第一密码算法的相关实施例,具体可以参见上述方法100中网络设备执行的中止第一密码算法的相关操作。其中,第三指示信息可以是方法100中的指示信息1,第四指示信息可以是方法100中的指示信息2,第一密码算法可以是方法100中的密码算法1。
这样,通过上述实施例,网络设备能够在使能新的密码算法,并且在使用新使能的密码算法对网络设备进行安全启动后,中止无法满足需求的密码算法,使得不满足需求的密码算法不再用于网络设备的安全启动,实现满足需求的安全启动,从而提高了网络设备的安全性。
可见,通过本申请实施例提供的方法400,一旦当前使用的密码算法不能够满足安全需求或者用户的要求时,网络设备在线获取指示信息,并基于指示信息对该网络设备的安全存储实体中预置的密码资源的基线信息进行更新,使能符合要求的密码算法或中止不符合要求的密码算法,这样,使用更新的密码资源的基线信息对网络设备进行安全启动,即使对安全启动中的密码算法的需求发生改变,也无需将网络设备或其中的芯片召回重新设计,通过本申请实施例提供的方法,就能够方便、灵活的更新密码资源以满足变化后的安全需求,实现基于不同的需求在线调整不同的密码算法以达到按照要求进行安全启动的目的,从而提高了网络设备的安全性。
需要说明的是,本申请实施例中的方法400,具体实现方式以及达到的效果可以参见上述图4和图7所示实施例中的相关说明。
图11示出了本申请实施例中一种安全启动的方法500的流程示意图,该方法500由网络设备实施,该安全启动的方法500例如可以包括:
S501,将用于安全启动的第一密码算法更新为第二密码算法;
S502,将用于安全启动的第一公钥基线值更新为第二公钥基线值;
S503,采用所述第二公钥基线值对第二公钥的完整性进行验证,其中,所述第二密码算法和所述通过完整性验证的所述第二公钥用于对所述安全启动过程中加载的镜像文件进行验证。
其中,多种密码算法中的第一密码算法可以为以下任一种算法:非对称加密算法RSA,椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。第二密码算法可以为以下任一种算法:RSA、ECC算法、SM2、SHA或SM3。第一密码算法和第二密码算法不同。
需要说明的是,一种情况下,网络设备内用于安全保存密码资源的基线信息的安全存储实体可以为处理器中的一次性可编程存储空间;或者,另一种情况下,安全存储实体也可以为独立于处理器的安全芯片。其中,密码资源的基线信息可以包括第一密码资源的基线信息和第二密码资源的基线信息。第一密码资源的基线信息包括第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态,同理,第二密码资源的基线信息包括第二密码算法的状态信息,所述第二密码算法的状态信息用于指示所述第二密码算法的使用状态。所述第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述网络设备在进行所述安全启动所使用的第一密码算法和第一公钥;同理,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于所述网络设备在进行所述安全启动所使用的第二密码算法和第二公钥。那么,在S502之后,可以使用第二密码资源的基线信息对第二密码资源进行完整性验证,再使用通过完整性验证的第二密码资源对安全启动过程中加载的镜像文件进行验证。
其中,该方法500中的网络设备具体可以是上述方法300中的网络设备,相关操作具体可以参见方法300中网络设备执行的操作。具体而言,S501~S503的相关描述可以参见方法300中的S301~S303。其中,第一密码算法可以是方法300中的密码算法1,第二密码算法可以是方法300中的密码算法2,第一公钥基线值可以是方法300中的公钥基线值a,第二公钥基线值可以是方法300中的公钥基线值b,第二公钥可以是方法300中的公钥B。
其中,S501中将所述第一密码算法更新为所述第二密码算法,例如可以包括:S501a,中止所述第一密码算法;S501b,使能所述第二密码算法。其中,S501b中的中止所述第一密码算法,包括吊销所述第一密码算法或去使能所述第一密码算法两种可能的含义。
作为一个示例,该方法500中还可以包括:如果第二公钥通过完整性验证,则,网络设备即可采用所述第二公钥和所述第二密码算法,对所述安全启动过程中加载的镜像文件进行验证。
一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中均已经保存了对应的公钥基线值,则,S502中的第二公钥基线值,可以是预置在所述网络设备的安全存储实体中的,那么,使能第二密码算法也即表示启用了该密第二码算法对应的第二密码资源的基线信息中的第二公钥基线值。
另一个具体的实施方式中,如果针对预置的多种密码算法,安全存储实体中仅保存了已经使能过的密码算法对应的公钥基线值,未使能的密码算法对应的密码资源的基线信息中预留了待写入对应公钥基线值的空间,则,网络设备也可以获取第一密码算法对应的第一公钥基线值,那么,S502可以包括:获取第二公钥基线值;将所述第二公钥基线值保存到所述网络设备的安全存储实体中。其中,获取第二公钥基线值的方式例如可以包括:获取第一更新文件,所述第一更新文件中携带所述第二公钥基线值;从第一更新文件中获取所述第二公钥基线值。将所述第二公钥基线值保存到所述网络设备的安全存储实体中,例如可以在安全存储实体中与第二密码算法对应的第二密码资源的基线信息相应的位置写入第二公钥基线值。
其中,第二公钥基线值为第二公钥的哈希值或者第二公钥的明文。第二公钥基线值与第二公钥唯一对应,用于对第二公钥进行完整性验证,一方面,第二公钥基线值用于验证第一更新文件中携带的第二公钥的完整性;另一方面,当第二密码算法有效时,在网络设备安全启动过程中,第二公钥基线值用于对非易失性存储器存储器保存的密码资源中第二公钥进行完整性验证。
作为一个示例,在502之后,在所述安全启动之前,该方法500还可以包括:将非易失性存储器中存储的用于安全启动的第一密码资源更新为第二密码资源,所述第二密码资源包括所述第二公钥。此时,该S503例如可以包括:采用所述第二公钥基线值对所述非易失性存储器中存储的所述第二公钥进行完整性验证。如果所述非易失性存储器中存储的第二密码资源通过完整性验证,则,根据所述第二公钥和所述第二密码算法,对通过第二私钥进行数字签名的应用程序的镜像文件进行签名验证。如此,通过该实施例,能够在灵活更新符合需求的密码算法后,基于符合需求的密码算法进行安全启动,提高了网络设备的安全性和对其的使用体验。
对于S501中将用于安全启动的第一密码算法更新为第二密码算法,例如可以包括:获取第一指示信息和第二指示信息,其中,所述第一指示信息用于唯一标识所述第二密码算法,所述第二指示信息用于指示所述网络设备使能所述第二密码算法;接着,根据所述第一指示信息和所述第二指示信息,使能所述第二密码算法。其中,使能所述第二密码算法,例如可以为:将所述第二密码算法的使用状态设置为使能状态。而所述将所述第二密码算法的使用状态设置为使能状态,可以包括:设置所述第二密码算法对应的使能标识信息以指示第二密码算法的使用状态为使能状态。
其中,获取第一指示信息和第二指示信息,例如可以包括:获取第一更新文件,所述第一更新文件携带所述第一指示信息和所述第二指示信息。为了保证第一更新文件的完整性及真实性,该第一更新文件例如可以是证书。该证书的格式可以自定义,也可以采用标准的X.509格式(即密码学里标工艺证书的标准格式)。此外,该第一更新文件也可以是其他能够携带第一指示信息和第二指示信息且能够给被网络设备识别和解析的任意格式的文件,在本申请实施例中对第一更新文件不作具体限定。
作为一个示例,该第一更新文件可以采用第一私钥和所述第一密码算法进行签名,其中,所述网络设备在使用所述第二密码资源进行安全启动之前,使用所述第一密码资源进 行安全启动,所述第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述第一密码算法和第一公钥。第一更新文件中还可以包括第一公钥,该方法500还可以包括:根据所述第一密码算法和所述第一公钥,验证所述第一更新文件的签名。其中,该第一公钥为所述网络设备的根公钥或所述第一公钥为基于所述网络设备的根密钥派生得到的公钥,例如网络设备的二级公钥。可见,当第一更新文件的验证通过,则认为该第一更新文件未被篡改且来源可信,确定该第一更新文件是可靠的,可以基于该第一更新文件中的第一指示信息和第二指示信息进行密码资源的更新。
如果第一公钥基线值预置在所述网络设备的安全存储实体中,在所述根据所述第一密码算法和所述第一公钥验证所述第一更新文件的签名之前,所述方法500还可以包括:基于所述第一公钥基线值对所述第一更新文件中携带的所述第一公钥进行完整性验证,如果第二公钥的完整性验证通过,才执行根据所述第二密码算法和所述第二公钥验证所述第一更新文件的签名,安全性更高。
如果所述第一更新文件还包括网络设备的设备标识信息,所述设备标识信息用于标识所述网络设备。例如:所述网络设备的设备标识信息包括下述信息中的任意一个:所述网络设备中的芯片标识、所述网络设备的硬件标识、所述网络设备所属的用户标识、所述网络设备所属的制造商标识、所述设备所属的域标识、所述网络设备的IP地址、所述网络设备的MAC地址或所述网络设备所属的网段地址。该情况下,当第一更新文件的验证通过后,还可以对第一更新文件中的设备标识信息和网络设备进行匹配验证,当验证通过后,确定该第一更新文件是针对该网络设备起作用的文件,基于第一更新实施该方法500,完成对网络设备的安全启动。
在一些可能的实现方式中,该第一更新文件还可以包括第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第一密码算法,所述第四指示信息用于指示中止使用所述第一密码算法。根据所述第三指示信息和所述第四指示信息,中止使用所述第一密码算法。其中,所述中止使用所述第一密码算法的执行时机,例如可以在将用于安全启动的第一密码算法更新为第二密码算法之后。
在另一些可能的实现方式中,网络设备基于所述第二密码算法和所述第二公钥进行安全启动后,该方法500还可以包括:获取第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第一密码算法,所述第四指示信息用于指示中止使用所述第一密码算法。该第三指示信息和第四指示信息,例如可以携带在第二更新文件中,那么,获取第三指示信息和第四指示信息即可以是从所述第二更新文件中获取所述第三指示信息和所述第四指示信息。这样,网络设备即可根据所述第三指示信息和所述第四指示信息,中止使用所述第一密码算法。而网络设备中止使用所述第一密码算法的执行时机,例如可以在将用于安全启动的第一密码算法更新为第二密码算法之后。
上述中止使用所述第一密码算法,可以包括:去使能所述第一密码算法或吊销所述第一密码算法。其中,去使能所述第一密码算法例如可以包括:将所述第一密码算法的使用状态设置为去使能状态;吊销所述第一密码算法例如可以包括:将所述第一密码算法的使 用状态设置为吊销状态。例如,将所述第一密码算法的使用状态设置为吊销状态,具体可以是:设置所述第一密码算法对应的吊销标识信息以指示第一密码算法的使用状态为吊销状态。
作为一个示例,所述方法500例如还可以包括:获取第一更新文件,第一更新文件用于指示使能第二密码算法。所述方法500例如还可以包括:获取第二更新文件,所述第二更新文件用于指示吊销所述第一密码算法。那么,S501例如可以包括:根据所述第一更新文件,使能所述第二密码算法;根据所述第二更新文件,吊销所述第一密码算法。如此,实现对用于网络设备安全启动的密码算法的灵活调整,提高网络设备的安全性。
可见,通过本申请实施例提供的方法500,一旦当前使用的密码算法不能够满足安全需求或者用户的要求时,网络设备在线更新用于安全启动的密码算法和对应的公钥基线值,使能符合要求的密码算法,这样,通过方便、灵活的使能新的密码算法,实现使用新使能的密码算法对网络设备进行安全启动,无需将网络设备或其中的芯片召回重新设计,即可使得安全启动满足变化的安全需求,实现基于不同的需求在线调整不同的密码算法以达到按照满足要求的密码算法进行安全启动的目的,从而提高了网络设备的安全性。
需要说明的是,本申请实施例中的方法500,具体实现方式以及达到的效果可以参见上述图9所示实施例中的相关说明。
相应的,本申请实施例还提供了通信装置1200,参见图12所示。该通信装置1200包括收发单元1201和处理单元1202。其中,收发单元1201用于执行上述方法100~方法500所示的任意一个实施例中网络设备实施的收发操作;处理单元1202用于执行上述方法100~方法500所示的任意一个实施例中网络设备实施的除了收发操作以外的其他操作。例如:当所述通信装置1200执行所述方法100中网络设备所实施的方法时,所述收发单元1201可以用于获取指示信息1和指示信息2;所述处理单元1202可以用于根据指示信息1和指示信息2,对密码算法1对应的密码资源的基线信息1进行更新。又例如:当所述通信装置1200执行所述方法300中网络设备所实施的方法时,所述收发单元1201可以用于获取指示信息1和指示信息2,或者,所述收发单元1201也可以用于获取指示信息3和指示信息4;所述处理单元1202可以用于将用于安全启动的密码算法2更新为密码算法1,或者,所述处理单元1202还可以用于将用于安全启动的公钥基线值a更新为公钥基线值b,再或者,所述处理单元1202还可以用于采用所述公钥基线值b对公钥B的完整性进行验证。
此外,本申请实施例还提供了一种通信装置1300,参见图13所示。该通信装置1300包括通信接口1301和处理器1302。其中,通信接口1301包括第一通信接口1301a和第二通信接口1301b。第一通信接口1301a用于执行前述方法100~方法500所示的任意一个实施例中网络设备执行的接收操作;第二通信接口1301b用于执行前述方法100~方法500所示的任意一个实施例中网络设备执行的发送操作;处理器1302用于执行前述方法100~方法500所示的任意一个实施例中网络设备执行的除了接收操作和发送操作之外的其他操作。例如:处理器1302可以执行方法100中实施例中的操作:根据指示信息1和指示信息2,对密码算法1对应的密码资源的基线信息1进行更新。又例如:处理器1302可以执行 方法300中实施例中的操作:将用于安全启动的密码算法2更新为密码算法1,将用于安全启动的公钥基线值a更新为公钥基线值b,采用所述公钥基线值b对公钥B的完整性进行验证。
此外,本申请实施例还提供了一种通信装置1400,参见图14所示。该通信装置1400包括存储器1401和与存储器1401通信的处理器1402。其中,存储器1401包括计算机可读指令;处理器1402用于执行所述计算机可读指令,使得该通信装置1400执行以上方法100~方法500所示的任意一个实施例中的网络设备执行的方法。
可以理解的是,上述实施例中,处理器可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP)或者CPU和NP的组合。处理器还可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其任意组合。处理器可以是指一个处理器,也可以包括多个处理器。存储器可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器也可以包括非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD);存储器还可以包括上述种类的存储器的组合。存储器可以是指一个存储器,也可以包括多个存储器。在一个具体实施方式中,存储器中存储有计算机可读指令,所述计算机可读指令包括多个软件模块,例如发送模块,处理模块和接收模块。处理器执行各个软件模块后可以按照各个软件模块的指示进行相应的操作。在本实施例中,一个软件模块所执行的操作实际上是指处理器根据所述软件模块的指示而执行的操作。处理器执行存储器中的计算机可读指令后,可以按照所述计算机可读指令的指示,执行网络设备可以执行的全部操作。
可以理解的是,上述实施例中,通信装置1300的通信接口1301,具体可以被用作通信装置1200中的收发单元1201,实现通信装置和其他设备之间的通信。
需要说明的是,本申请实施例还提供了通信装置1500,该通信装置1500包括处理器1510,所述处理器1510用于执行上述方法100~方法500所示的任意一个实施例中网络设备实施的操作。处理器1510例如可以是上述通信装置1200中的处理单元1202、通信装置1300中的处理器1302或者通信装置1400中的处理器1402。作为一个示例,如图15a所示,所述通信装置1500可以包括处理器1510和安全芯片1520,所述安全芯片1520和所述处理器1510连接,所述安全芯片1520用于存储多种密码资源的基线信息,所述多种密码资源的基线信息与多种密码算法一一对应,所述多种密码算法均适用安全启动。作为另一个示例,如图15b所示,所述通信装置1500包括处理器1510,所述处理器1510包括一次性可编程存储空间1511,所述一次性可编程存储空间1511用于存储多种密码资源的基线信息,所述多种密码资源的基线信息与多种密码算法一一对应,所述多种密码算法均适用安 全启动。例如:所述多种密码算法包括下述密码算法中的任意多种:非对称加密算法RSA,椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
此外,本申请实施例还提供了一种安全芯片1600,如图16所示。该安全芯片1600包括通信接口1610和存储实体1620,其中,所述存储实体1620中存储有多种密码资源的基线信息,所述多种密码资源分别对应于网络设备在多次安全启动过程中所需使用的密码算法信息和秘钥信息,每种密码资源的基线信息与每次安全启动一一对应,所述每种密码资源的基线信息用于对所述每次安全启动所采用的密码资源进行完整性验证;其中,所述多种密码资源的基线信息包括第一密码资源的基线信息和第二密码资源的基线信息;所述第一密码资源的基线信息用于对所述网络设备在进行第一安全启动时所使用的第一密码资源进行完整性验证,所述第一密码资源对应第一密码算法和第一公钥,所述第一密码资源的基线信息包括所述第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态;所述第二密码资源的基线信息用于对所述网络设备在进行第二安全启动时所使用的第二密码资源进行完整性验证,所述第二密码资源对应于第二密码算法和第二公钥,所述第二密码资源的基线信息包括所述第二密码算法的状态信息,所述第二密码算法的状态信息用于指示所述第二密码算法的使用状态;所述第二安全启动为所述网络设备在进行所述第一安全启动之后所进行的安全启动,所述第一密码算法与所述第二密码算法不同。
其中,所述安全芯片1600通过所述通信接口1610与处理器通信,所述处理器用于对所述安全芯片1600中存储的所述多种密码资源的基线信息进行管理。该处理器例如可以是上述通信装置1200中的处理单元1202、通信装置1600中的处理器1602、通信装置1400中的处理器1402或者通信装置1500中的处理器1510。其中,第一密码资源的基线信息包括第一公钥基线值,所述第一公钥基线值用于对所述第一公钥的完整性进行验证;所述第二密码资源的基线信息包括第二公钥基线值,所述第二公钥基线值用于对所述第二公钥的完整性进行验证。
需要说明的是,该安全芯片1600例如可以是图15a所示的通信装置1500中的安全芯片1520。
需要说明的是,第一密码算法包括下述密码算法中的任意多种:非对称加密算法RSA,椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。所述第二密码算法包括下述密码算法中的任意多种:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
其中,所述第一密码算法的状态信息可以包括第一中止标识信息。所述第一中止标识信息可以包括吊销标识信息和/或去使能标识信息。所述第一密码算法的状态信息也可以包括第一使能标识信息。同理,所述第二密码算法的状态信息可以包括第二中止标识信息。所述第二中止标识信息可以包括吊销标识信息和/或去使能标识信息。所述第二密码算法的状态信息也可以包括第二使能标识信息。
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上方法100~方法500所示的任意一个实施例中的网络设备执行的方法。
此外,本申请实施例还提供了计算机程序产品,包括计算机程序或计算机可读指令,当所述计算机程序或所述计算机可读指令在计算机上运行时,使得计算机执行前述方法100~方法500所示的任意一个实施例中的网络设备执行的方法。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如只读存储器(英文:read-only memory,ROM)/RAM、磁碟、光盘等,包括若干程序代码或指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如路由器等网络通信设备)执行本申请各个实施例或者实施例的某些部分所述的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例和设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及装置实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本申请的优选实施方式,并非用于限定本申请的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。
Claims (53)
- 一种对安全启动所使用的密码资源进行管理的方法,其特征在于,应用于网络设备,所述方法包括:获取第一指示信息和第二指示信息,其中,所述第一指示信息用于唯一标识第一密码算法,所述第二指示信息用于指示所述网络设备对安全存储实体中存储的第一密码资源的基线信息进行更新,其中,所述第一密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第一密码资源进行完整性验证,所述第一密码资源对应于所述网络设备在进行所述安全启动时所使用的第一密码算法和第一公钥,所述第一密码资源的基线信息包括所述第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态;根据所述第一指示信息和所述第二指示信息,对所述第一密码资源的基线信息进行更新。
- 根据权利要求1所述的方法,其特征在于,所述第二指示信息具体用于指示使能所述第一密码算法。
- 根据权利要求2所述的方法,其特征在于,所述对所述第一密码资源的基线信息进行更新,包括:更改所述第一密码算法的状态信息,以将所述第一密码算法的使用状态设置为使能状态。
- 根据权利要求3所述的方法,其特征在于,所述第一密码算法的状态信息包括使能标识信息,所述更改所述第一密码算法的状态信息,包括:设置所述使能标识信息以指示所述第一密码算法的使用状态为使能状态。
- 根据权利要求1-4任一项所述的方法,其特征在于,更新后的所述第一密码资源的基线信息还包括第一公钥基线值,其中,所述第一公钥基线值用于对所述第一公钥进行完整性验证。
- 根据权利要求5所述的方法,其特征在于,所述对所述第一密码资源的基线信息进行更新,还包括:获取所述第一公钥基线值,将所述第一公钥基线值存储到所述安全存储实体。
- 根据权利要求5所述的方法,其特征在于,所述第一公钥基线值预置在所述安全存储实体中。
- 根据权利要求5-7任一项所述的方法,其特征在于,所述第一公钥基线值为所述第一公钥的哈希值或者所述第一公钥的明文。
- 根据权利要求5-8任一项所述的方法,其特征在于,在对所述第一密码资源的基线信息进行更新之后,所述方法还包括:根据更新后的所述第一密码资源的基线信息和所述第一密码资源,进行所述安全启动。
- 根据权利要求9所述的方法,其特征在于,在进行所述安全启动之前,所述方法还包括:将非易失性存储器中存储的第二密码资源更新为所述第一密码资源。
- 根据权利要求10所述的方法,其特征在于,所述根据更新后的所述第一密码资源的基线信息进行所述安全启动,包括:基于更新后的所述第一密码资源的基线信息对所述非易失性存储器中存储的所述第一密码资源进行完整性验证。
- 根据权利要求11所述的方法,其特征在于,所述基于更新后的所述第一密码资源的基线信息对所述非易失性存储器中存储的所述第一密码资源进行完整性验证,包括:采用所述第一公钥基线值对所述非易失性存储器中存储的所述第一公钥进行完整性验证。
- 根据权利要求11或12所述的方法,其特征在于,所述根据更新后的所述第一密码资源的基线信息进行所述安全启动,还包括:响应于所述非易失性存储器中存储的所述第一密码资源通过完整性验证,根据所述第一公钥和所述第一密码算法,对所述安全启动过程中加载的通过第一私钥进行数字签名的应用程序的镜像文件进行验证。
- 根据权利要求1-13任一项所述的方法,其特征在于,所述获取第一指示信息和第二指示信息,包括:获取第一更新文件,所述第一更新文件携带所述第一指示信息和所述第二指示信息。
- 根据权利要求14所述方法,其特征在于,所述第一更新文件为证书。
- 根据权利要求14或15所述的方法,其特征在于,所述第一更新文件基于第二私钥和第二密码算法进行签名,所述安全存储实体中存储有第二密码资源的基线信息,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于所述第二密码算法和第二公钥,其中,所述网络设备在使用所述第一密码资源进行安全启动之前,使用所述第二密码资源进行安全启动,所述第一更新文件中还包括所述第二公钥,在对所述第一密码资源的基线信息进行更新之前,所述方法还包括:根据所述第二密码算法和所述第二公钥,验证所述第一更新文件的签名。
- 根据权利要求16所述的方法,其特征在于,所述第二公钥为所述网络设备的根公钥或所述第二公钥为基于所述网络设备的根密钥派生得到的公钥。
- 根据权利要求16或17所述的方法,其特征在于,所述第二密码资源的基线信息还包括第二公钥基线值,在验证所述第一更新文件的签名之前,所述方法还包括:基于所述第二公钥基线值对所述第一更新文件中携带的所述第二公钥进行完整性验证。
- 根据权利要求14-18任一项所述的方法,其特征在于,所述第一更新文件还包括网络设备的设备标识信息,所述设备标识信息用于标识所述网络设备。
- 根据权利要求19所述的方法,其特征在于,所述网络设备的设备标识信息包括下述信息中的任意一个:所述网络设备中的芯片标识、所述网络设备的硬件标识、所述网络设备所属的用户标识、所述网络设备所属的制造商标识、所述设备所属的域标识、所述网络设备的互联网协议IP地址、所述网络设备的媒体访问控制MAC地址或所述网络设备所 属的网段地址。
- 根据权利要求16-18任一项所述的方法,其特征在于,所述第一更新文件还包括第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第二密码算法,所述第四指示信息用于指示中止使用所述第二密码算法。
- 根据权利要求1-15任一项所述的方法,其特征在于,所述安全存储实体中还存储有第二密码资源的基线信息,所述第二密码资源的基线信息用于对所述网络设备在安全启动过程中所使用的第二密码资源进行完整性验证,所述第二密码资源对应于第二密码算法和第二公钥,其中,所述网络设备在使用所述第一密码资源进行安全启动之前,使用所述第二密码资源进行安全启动,所述方法还包括:获取第三指示信息和第四指示信息,其中,所述第三指示信息用于唯一标识所述第二密码算法,所述第四指示信息用于指示中止使用所述第二密码算法。
- 根据权利要求22所述的方法,其特征在于,所述获取第三指示信息和第四指示信息,包括:获取第二更新文件,所述第二更新文件携带所述第三指示信息和所述第四指示信息。
- 根据权利要求21-23任一项所述的方法,其特征在于,所述方法还包括:根据所述第三指示信息和所述第四指示信息,中止使用所述第二密码算法。
- 根据权利要24所述的方法,其特征在于,所述中止使用所述第二密码算法,包括:在所述对所述第一密码资源的基线信息进行更新之后,中止使用所述第二密码算法。
- 根据权利要求24或25所述的方法,其特征在于,所述中止使用所述第二密码算法,包括:去使能所述第二密码算法。
- 根据权利要求26所述的方法,其特征在于,所述去使能所述第二密码算法,包括:将所述第二密码算法的使用状态设置为去使能状态。
- 根据权利要求24或25所述的方法,其特征在于,所述中止使用所述第二密码算法,包括:吊销所述第二密码算法。
- 根据权利要求28所述的方法,其特征在于,所述吊销所述第二密码算法,包括:将所述第二密码算法的使用状态设置为吊销状态。
- 根据权利要求29所述的方法,其特征在于,所述将所述第二密码算法的使用状态设置为吊销状态,包括:设置所述第二密码算法对应的吊销标识信息以指示所述第二密码算法的使用状态为吊销状态。
- 根据权利要求16-30任一项所述的方法,其特征在于,所述第二密码算法为以下任一种密码算法:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3,所述第一密码算法和所述第二密码算法为不同的密码算法。
- 根据权利要求1所述的方法,其特征在于,所述第二指示信息具体用于指示所述网 络设备中止使用所述第一密码算法。
- 根据权利要求32所述的方法,其特征在于,所述对所述第一密码资源的基线信息进行更新,包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为中止状态。
- 根据权利要求33所述的方法,其特征在于,所述中止状态包括去使能状态,所述对所述第一密码资源的基线信息进行更新,具体包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为去使能状态。
- 根据权利要求33所述的方法,其特征在于,所述中止状态包括吊销状态,所述对所述第一密码资源的基线信息进行更新,具体包括:更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为吊销状态。
- 根据权利要求35所述的方法,其特征在于,所述第一密码算法的状态信息包括吊销标识信息,所述更改所述第一密码算法的状态信息,以将所述第一密码的使用状态设置为吊销状态包括:设置所述吊销标识信息以将所述第一密码算法的使用状态设置为吊销状态。
- 根据权利要求1-36任一项所述的方法,其特征在于,所述安全存储实体为处理器中的一次性可编程存储空间或独立于处理器的安全芯片。
- 根据权利要求1-37任一项所述的方法,其特征在于,所述第一密码算法为以下任一种算法:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
- 一种通信装置,其特征在于,包括:存储器,所述存储器包括计算机可读指令;与所述存储器通信的处理器,所述处理器用于执行所述计算机可读指令,使得所述通信装置执行权利要求1-38任一项所述的方法。
- 根据权利要求39所述的通信装置,其特征在于,所述通信装置包括独立于所述处理器的安全芯片,所述安全芯片和所述处理器连接,所述安全芯片用于存储所述第一密码资源的基线信息。
- 根据权利要求39所述的通信装置,其特征在于,所述处理器包括一次性可编程存储空间,所述一次性可编程存储空间用于存储所述第一密码资源的基线信息。
- 一种安全芯片,其特征在于,所述安全芯片包括通信接口和安全的存储实体,所述存储实体中存储有多种密码资源的基线信息,所述多种密码资源分别对应于网络设备在多次安全启动过程中所需使用的密码算法信息和秘钥信息,每种密码资源的基线信息与每次安全启动一一对应,所述每种密码资源的基线信息用于对所述每次安全启动所采用的密码资源进行完整性验证;其中,所述多种密码资源的基线信息包括第一密码资源的基线信息和第二密码资源的基线信息;所述第一密码资源的基线信息用于对所述网络设备在进行第一安全启动时所使用的第一密码资源进行完整性验证,所述第一密码资源对应第一密码算法和第一公钥,所述第一密码资源的基线信息包括所述第一密码算法的状态信息,所述第一密码算法的状态信息用于指示所述第一密码算法的使用状态;所述第二密码资源 的基线信息用于对所述网络设备在进行第二安全启动时所使用的第二密码资源进行完整性验证,所述第二密码资源对应于第二密码算法和第二公钥,所述第二密码资源的基线信息包括所述第二密码算法的状态信息,所述第二密码算法的状态信息用于指示所述第二密码算法的使用状态;所述第二安全启动为所述网络设备在进行所述第一安全启动之后所进行的安全启动,所述第一密码算法与所述第二密码算法不同。
- 根据权利要求42所述的安全芯片,其特征在于,所述安全芯片通过所述通信接口与处理器通信,所述处理器用于对所述安全芯片中存储的所述多种密码资源的基线信息进行管理。
- 根据权利要求42或43所述的安全芯片,其特征在于,所述第一密码资源的基线信息包括第一公钥基线值,所述第一公钥基线值用于对所述第一公钥的完整性进行验证;所述第二密码资源的基线信息包括第二公钥基线值,所述第二公钥基线值用于对所述第二公钥的完整性进行验证。
- 根据权利要求42-44任一项所述的安全芯片,其特征在于,所述第一密码算法包括下述密码算法中的任意多种:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
- 根据权利要求42-45任一项所述的安全芯片,其特征在于,所述第二密码算法包括下述密码算法中的任意多种:非对称加密算法RSA、椭圆曲线密码学ECC算法、国密非对称加密算法SM2、安全散列算法SHA或密码杂凑算法SM3。
- 根据权利要求42-46任一项所述的安全芯片,其特征在于,所述第一密码算法的状态信息包括第一中止标识信息。
- 根据权利要求47所述的安全芯片,其特征在于,所述第一中止标识信息包括吊销标识信息和/或去使能标识信息。
- 根据权利要求42-48任一项所述的安全芯片,其特征在于,所述第一密码算法的状态信息包括第一使能标识信息。
- 根据权利要求42-49任一项所述的安全芯片,其特征在于,所述第二密码算法的状态信息包括第二中止标识信息。
- 根据权利要求50所述的安全芯片,其特征在于,所述第二中止标识信息包括吊销标识信息和/或去使能标识信息。
- 根据权利要求42-51任一项所述的安全芯片,其特征在于,所述第二密码算法的状态信息包括第二使能标识信息。
- 一种计算机可读存储介质,其特征在于,包括程序或指令,当其在计算机上运行时,使得计算机执行如权利要求1-38任一项所述的方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022571329A JP7479517B2 (ja) | 2020-05-22 | 2021-04-08 | 冗長暗号化アルゴリズムに基づいてセキュアブートを実行するための方法およびデバイス |
EP21808357.4A EP4142207A4 (en) | 2020-05-22 | 2021-04-08 | METHOD AND DEVICE FOR SECURE BOOT BASED ON REDUNDANT CRYPTOGRAPHIC ALGORITHM |
US18/057,717 US12021982B2 (en) | 2020-05-22 | 2022-11-21 | Method for performing secure boot based on redundant cryptographic algorithm and device |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010442242.1 | 2020-05-22 | ||
CN202010442242 | 2020-05-22 | ||
CN202010652854.3 | 2020-07-08 | ||
CN202010652854.3A CN113708920A (zh) | 2020-05-22 | 2020-07-08 | 一种基于冗余密码算法进行安全启动的方法及设备 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/057,717 Continuation US12021982B2 (en) | 2020-05-22 | 2022-11-21 | Method for performing secure boot based on redundant cryptographic algorithm and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021232982A1 true WO2021232982A1 (zh) | 2021-11-25 |
Family
ID=78646724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/085909 WO2021232982A1 (zh) | 2020-05-22 | 2021-04-08 | 一种基于冗余密码算法进行安全启动的方法及设备 |
Country Status (5)
Country | Link |
---|---|
US (1) | US12021982B2 (zh) |
EP (1) | EP4142207A4 (zh) |
JP (1) | JP7479517B2 (zh) |
CN (2) | CN113708920A (zh) |
WO (1) | WO2021232982A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113708921A (zh) * | 2020-05-22 | 2021-11-26 | 华为技术有限公司 | 一种基于冗余密码算法进行安全启动的方法及设备 |
EP4354329A1 (en) * | 2022-10-10 | 2024-04-17 | Huawei Technologies Co., Ltd. | Boot verification method and related apparatus |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140258729A1 (en) * | 2013-03-07 | 2014-09-11 | Atmel Corporation | Stored Authorization Status for Cryptographic Operations |
CN104424441A (zh) * | 2013-08-21 | 2015-03-18 | 恩智浦有限公司 | 处理系统 |
CN110363010A (zh) * | 2019-07-17 | 2019-10-22 | 中国大恒(集团)有限公司北京图像视觉技术分公司 | 一种基于MPSoC芯片的系统安全启动方法 |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9026803B2 (en) | 2009-11-30 | 2015-05-05 | Hewlett-Packard Development Company, L.P. | Computing entities, platforms and methods operable to perform operations selectively using different cryptographic algorithms |
KR20120092222A (ko) * | 2011-02-11 | 2012-08-21 | 삼성전자주식회사 | 보안 부팅 방법 및 보안 부트 이미지 생성 방법 |
US9021246B2 (en) * | 2011-10-28 | 2015-04-28 | GM Global Technology Operations LLC | Method to replace bootloader public key |
CN103595530B (zh) * | 2012-08-17 | 2017-04-26 | 华为技术有限公司 | 软件密钥更新方法和装置 |
CA3018526C (en) * | 2015-05-22 | 2023-06-20 | John A. Nix | Cryptographic unit for public key infrastructure (pki) operations |
CN107925565B (zh) * | 2015-06-30 | 2020-08-07 | 华为技术有限公司 | 算法更新方法、待更新设备及服务器 |
US10210333B2 (en) * | 2016-06-30 | 2019-02-19 | General Electric Company | Secure industrial control platform |
DE102016225360A1 (de) * | 2016-12-16 | 2018-06-21 | Bundesdruckerei Gmbh | Nachladen kryptographischer Programminstruktionen |
EP3792802B1 (en) * | 2019-09-11 | 2022-11-09 | Secure Thingz Limited | A processor system with a communication interface |
CN113708920A (zh) * | 2020-05-22 | 2021-11-26 | 华为技术有限公司 | 一种基于冗余密码算法进行安全启动的方法及设备 |
-
2020
- 2020-07-08 CN CN202010652854.3A patent/CN113708920A/zh active Pending
- 2020-07-08 CN CN202011131415.4A patent/CN113708921B/zh active Active
-
2021
- 2021-04-08 WO PCT/CN2021/085909 patent/WO2021232982A1/zh unknown
- 2021-04-08 EP EP21808357.4A patent/EP4142207A4/en active Pending
- 2021-04-08 JP JP2022571329A patent/JP7479517B2/ja active Active
-
2022
- 2022-11-21 US US18/057,717 patent/US12021982B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140258729A1 (en) * | 2013-03-07 | 2014-09-11 | Atmel Corporation | Stored Authorization Status for Cryptographic Operations |
CN104424441A (zh) * | 2013-08-21 | 2015-03-18 | 恩智浦有限公司 | 处理系统 |
CN110363010A (zh) * | 2019-07-17 | 2019-10-22 | 中国大恒(集团)有限公司北京图像视觉技术分公司 | 一种基于MPSoC芯片的系统安全启动方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4142207A4 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113708921A (zh) * | 2020-05-22 | 2021-11-26 | 华为技术有限公司 | 一种基于冗余密码算法进行安全启动的方法及设备 |
US12021982B2 (en) | 2020-05-22 | 2024-06-25 | Huawei Technologies Co., Ltd. | Method for performing secure boot based on redundant cryptographic algorithm and device |
EP4354329A1 (en) * | 2022-10-10 | 2024-04-17 | Huawei Technologies Co., Ltd. | Boot verification method and related apparatus |
Also Published As
Publication number | Publication date |
---|---|
US20230095143A1 (en) | 2023-03-30 |
JP2023526656A (ja) | 2023-06-22 |
EP4142207A1 (en) | 2023-03-01 |
JP7479517B2 (ja) | 2024-05-08 |
US12021982B2 (en) | 2024-06-25 |
CN113708921A (zh) | 2021-11-26 |
EP4142207A4 (en) | 2023-10-18 |
CN113708920A (zh) | 2021-11-26 |
CN113708921B (zh) | 2023-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10719606B2 (en) | Security processor for an embedded system | |
US12021982B2 (en) | Method for performing secure boot based on redundant cryptographic algorithm and device | |
TWI436280B (zh) | 存取基本輸入輸出系統設定的認證方法 | |
US7194619B2 (en) | Remotely booting devices in a dense server environment without manually installing authentication parameters on the devices to be booted | |
US9596085B2 (en) | Secure battery authentication | |
US20220224546A1 (en) | Software integrity protection method and apparatus, and software integrity verification method and apparatus | |
WO2021073375A1 (zh) | 一种组合式设备远程证明模式的协商方法及相关设备 | |
US10282549B2 (en) | Modifying service operating system of baseboard management controller | |
US20200026882A1 (en) | Methods and systems for activating measurement based on a trusted card | |
EP3284000A1 (en) | Secure software authentication and verification | |
US20080022124A1 (en) | Methods and apparatus to offload cryptographic processes | |
US20230273977A1 (en) | Managing ownership of an electronic device | |
US20220182248A1 (en) | Secure startup method, controller, and control system | |
CN114764312A (zh) | 通过计算机网络控制存储器装置 | |
JP7508571B2 (ja) | 車両の安全始動方法、安全始動装置、電子制御ユニット及び記憶媒体 | |
EP4106292A1 (en) | Auto-thermal evaporative liquid-phase synthesis method for cathode material for battery | |
TWI726406B (zh) | 認證方法 | |
US12056262B2 (en) | Applying trusted backup configuration to a node | |
CN116501353B (zh) | 固件更新方法、装置及设备和介质 | |
US20240037216A1 (en) | Systems And Methods For Creating Trustworthy Orchestration Instructions Within A Containerized Computing Environment For Validation Within An Alternate Computing Environment | |
CN114817909A (zh) | 一种安全防御方法、装置、设备及存储介质 | |
KR20240034588A (ko) | 보안 부팅 시스템 및 그것의 동작 방법 | |
CN112487500A (zh) | 认证方法 | |
KR20070017455A (ko) | 프로세서 내에서의 보호된 리소스들로의 억세스에 대한안전한 보호 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21808357 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2022571329 Country of ref document: JP Kind code of ref document: A |
|
ENP | Entry into the national phase |
Ref document number: 2021808357 Country of ref document: EP Effective date: 20221122 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |