CN112989356A - Blank security chip burning method and system, blank security chip and storage medium - Google Patents
Blank security chip burning method and system, blank security chip and storage medium Download PDFInfo
- Publication number
- CN112989356A CN112989356A CN202110253343.9A CN202110253343A CN112989356A CN 112989356 A CN112989356 A CN 112989356A CN 202110253343 A CN202110253343 A CN 202110253343A CN 112989356 A CN112989356 A CN 112989356A
- Authority
- CN
- China
- Prior art keywords
- ciphertext
- key
- burning
- blank
- chip
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000003860 storage Methods 0.000 title claims abstract description 14
- 238000004891 communication Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000002360 preparation method Methods 0.000 description 2
- 241001441724 Tetraodontidae Species 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- 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/572—Secure firmware programming, e.g. of basic input output system [BIOS]
-
- 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/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a blank security chip burning method, a system, a blank security chip and a storage medium, wherein the method comprises the steps of encrypting a burning program and contents to be burned by adopting a ciphertext key in advance to obtain an external ciphertext, encrypting the ciphertext key by adopting an encryption public key to obtain a key ciphertext, electrifying the blank security chip to operate a ROM program to obtain the external ciphertext and the key ciphertext, decrypting the key ciphertext by a decryption private key solidified in the ROM to obtain a ciphertext key, decrypting the external ciphertext by the ciphertext key to obtain the burning program and the contents to be burned, setting the ROM address where the decryption private key is located to be inaccessible, and executing the burning program to write the contents to be burned into the blank security chip. According to the invention, the acquisition and decryption of the external ciphertext are carried out in the chip, so that the plaintext is not visible outside the chip, the decryption private key solidified in the ROM is set to be inaccessible, the leakage risk of the decryption private key is effectively reduced, and the safety and reliability of the blank security chip for safety information burning are improved.
Description
Technical Field
The invention relates to the field of safe burning, in particular to a blank safe chip burning method and system, a blank safe chip and a storage medium.
Background
In the information age, chips are widely used in various electronic products and systems such as computers, mobile phones, household appliances, automobiles, high-speed rails, power grids, medical instruments, robots, industrial control and the like, and are the core cornerstones of high-end manufacturing industry. With the rapid development of science and technology and the continuous improvement of safety awareness of people, the chip application equipment needs to preset the safety information such as the ID and the secret key on the bottom chip, and how to safely burn the corresponding safety information into the chip also becomes a problem of great concern.
The burning of the safety information of the existing blank safety chip is mostly carried out in batches in a factory, and the corresponding protective measures are generally as follows: performing one or more layers of encryption on the content to be burned, then decrypting the content in a burning tool, and burning the content into a chip to be burned on a burning base; or a trusted operating system is operated on the chip, and the operating system is used for decrypting the burning content and burning the burning content into the chip. Although the existing protection measures can avoid the leakage of the safety information to a certain extent, the existing protection measures still have the defects that the encrypted burning content is decrypted in a burning tool or an operating system, so that an attacker is bound to be left with a chance, and the risk of information leakage is brought. Therefore, it is very necessary to provide a more reliable and confidential burning method for burning the security information of the blank security chip.
Disclosure of Invention
The invention aims to provide a burning method for burning self safety related information by a blank safety chip, which realizes the decryption process in the chip, ensures that a decrypted plaintext and a key used for decryption are invisible to the outside in the chip, overcomes the technical problem that the inside of the chip to be burned is easy to be intercepted outside the chip in the existing chip safety information burning process, and effectively avoids the risk of safety information leakage in the burning process.
In order to achieve the above object, it is necessary to provide a method and a system for burning a blank secure chip, a blank secure chip and a storage medium for solving the above technical problems.
In a first aspect, an embodiment of the present invention provides a method for burning a blank secure chip, where the method includes the following steps:
encrypting the burning program and the content to be burned by adopting a ciphertext key in advance to obtain an external ciphertext;
encrypting the cipher text key by adopting an encryption public key to obtain a key cipher text;
powering on a blank security chip, and acquiring the external ciphertext and the key ciphertext;
decrypting the key ciphertext through a decryption private key corresponding to the encryption public key to obtain a ciphertext key, and decrypting the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
and executing the burning program, and writing the content to be burnt into the blank security chip.
Further, the ciphertext key is generated by adopting a symmetric encryption algorithm.
Further, the encryption public key and the decryption private key are generated by adopting an asymmetric encryption algorithm.
Further, the step of powering on the blank security chip and acquiring the external ciphertext and the key ciphertext includes:
running a ROM program of the blank security chip;
and the ROM program acquires the external ciphertext and the key ciphertext according to a communication protocol and stores the external ciphertext and the key ciphertext into the RAM of the blank security chip.
Further, the key ciphertext is decrypted through a decryption private key corresponding to the encryption public key to obtain a ciphertext key, and the external ciphertext is decrypted through the ciphertext key to obtain the burning program and the content to be burned; the step of placing the decryption private key in the blank security chip comprises the following steps:
decrypting the key ciphertext by the ROM program according to the preset decryption private key to obtain the ciphertext key;
and decrypting the external ciphertext according to the ciphertext key to obtain a burning program and content to be burned.
Further, before the executing the burning program and writing the content to be burned into the blank security chip, the method further includes:
and configuring the ROM address for storing the decryption private key to be inaccessible through the hardware of the blank security chip, and configuring the ROM address for only 1 time after the ROM address is powered on.
Further, the step of configuring, by the hardware of the blank security chip, the ROM address storing the decryption private key to be inaccessible, and the configuration can be performed only 1 time after power-on, includes:
the method comprises the steps of using a first register to store and configure an inaccessible identifier in advance, and using a second register to store an inaccessible ROM address range; the initial values of the first register and the second register are both 0;
when an AHB bus requests to configure an inaccessible identifier of a first register, a verilog program acquires a value of the first register, judges whether the configured inaccessible identifier is 0, executes a configuration instruction if the configured inaccessible identifier is 0, and refuses to execute the configuration instruction if the configured inaccessible identifier is not 0;
when the AHB bus requests to write the inaccessible ROM address range into a second register, a verilog program acquires the value of the first register, judges whether the configuration inaccessible identifier is 0, executes the configuration instruction if the configuration inaccessible identifier is 0, and refuses to execute the configuration instruction if the configuration inaccessible identifier is not 0;
when the AHB requests to read ROM address data, the Verilog program can obtain the value of the second register, judge whether the ROM address is in the inaccessible ROM address range, if not, return the true value, otherwise, obtain the value of the first register, and judge whether the configuration inaccessible identifier is 0, if 0, return the true value, otherwise, return 0.
In a second aspect, an embodiment of the present invention provides a system for burning a blank secure chip, where the system includes:
the ciphertext module is used for encrypting the burning program and the content to be burned by adopting a ciphertext key in advance to obtain an external ciphertext;
the key encryption module is used for encrypting the ciphertext key by adopting an encryption public key to obtain a key ciphertext;
a cipher text downloading module for powering on a blank security chip and acquiring the external cipher text and the key cipher text;
the ciphertext decryption module is used for decrypting the key ciphertext through a decryption private key corresponding to the encrypted public key to obtain a ciphertext key, and decrypting the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
and the chip burning module is used for executing the burning program and writing the content to be burned into the blank security chip.
Further, before the chip burning module, the method further comprises:
and the configuration authority module is used for configuring the ROM address storing the decryption private key to be inaccessible through the hardware of the blank security chip, and can only be configured for 1 time after being electrified.
In a third aspect, an embodiment of the present invention further provides a blank security chip, where the blank security chip does not burn security information, and the blank security chip executes the steps of the method for burning the blank security chip.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the above method.
The application provides a blank security chip burning method, a system, a blank security chip and a storage medium, by the method, the burning program and the content to be burned are encrypted by adopting the ciphertext key of the symmetric encryption algorithm in advance, the ciphertext key is encrypted by adopting the encryption public key of the asymmetric encryption algorithm to obtain the corresponding external ciphertext and the corresponding key ciphertext, electrifying the blank security chip, running the ROM program to download the external ciphertext and the key ciphertext into the internal RAM for storage, decrypting the key ciphertext by using a decryption private key of an asymmetric encryption algorithm solidified in the ROM program to obtain a ciphertext key, decrypting the external ciphertext by using the ciphertext key to obtain a burning program and content to be burned, and then, after the ROM address for storing the decryption private key is set to be inaccessible through chip hardware, executing a burning program to write the content to be burned into the blank security chip. Compared with the prior art, the burning method for burning the self-safety information of the blank safety chip realizes the decryption process in the chip, ensures that the decrypted plaintext and the key used for decryption are invisible to the outside in the chip, realizes the function of configuring the ROM address where the decryption private key is not accessible, effectively reduces the leakage risk of the decryption private key while overcoming the technical problem that the inside of the chip to be burned is easily intercepted outside the chip in the existing protection measure, further avoids the leakage risk in the safety information burning process, and improves the safety and reliability of the burning of the self-safety-related information of the blank safety chip.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for burning a blank security chip according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of the step S13 in fig. 1 for obtaining the external ciphertext and the key ciphertext;
FIG. 3 is a flowchart illustrating another method for burning a blank security chip according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a system for burning a blank security chip according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another blank secure chip burning system according to an embodiment of the present invention.
Detailed Description
In order to make the purpose, technical solution and advantages of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments, and it is obvious that the embodiments described below are part of the embodiments of the present invention, and are used for illustrating the present invention only, but not for limiting the scope of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method for burning the blank security chip provided by the invention is a method for burning self security information of the blank security chip, effectively avoids the risk of security information leakage caused by the fact that the content to be burned and the related key are easily intercepted by an external attacker in the existing chip burning technology, and is a great progress in the blank security chip burning technology.
In one embodiment, as shown in fig. 1, a method for burning a blank secure chip is provided, which includes the following steps:
s11, encrypting the burning program and the content to be burned by adopting a ciphertext key in advance to obtain an external ciphertext;
the cipher text key is generated by adopting a symmetric encryption algorithm. The symmetric encryption algorithm is an encryption algorithm using the same key for encryption and decryption, namely, a data sending party processes a plaintext (original data) and an encryption key together through a special encryption algorithm to change the plaintext into a complex encrypted ciphertext and sends the complex encrypted ciphertext out, and after a receiving party receives the ciphertext, the ciphertext is decrypted by using the encryption key for encrypting the plaintext and an inverse algorithm of the same algorithm to restore the readable plaintext. Common symmetric encryption algorithms comprise AES, SM4, DES, 3DES, DESX, Blowfish, RC4, RC5, RC6 and the like, and can be selected according to actual application requirements and the characteristics of each algorithm. The symmetric encryption algorithm has the characteristics of algorithm openness, small calculated amount, high encryption speed, high encryption efficiency and the like, and ensures the privacy of encrypted contents and the convenience and quickness of encrypting a burning program and the contents to be burned.
S12, encrypting the ciphertext key by using the encryption public key to obtain a key ciphertext;
the encrypted public key and the decryption private key used subsequently are generated by adopting an asymmetric encryption algorithm. The asymmetric encryption algorithm is also called as public and private key encryption, and is different from the symmetric encryption algorithm in that different keys are used for encryption and decryption, namely two users need to encrypt and exchange data, two parties exchange public keys, one party is encrypted by the public key of the other party when the asymmetric encryption algorithm is used, and the other party can be decrypted by the private key of the other party. Common asymmetric encryption algorithms include RSA, SM2, DSA (for digital signature), ECC (for mobile device), Diffie-Hellman, El Gamal, etc., which can be selected according to the actual application requirements in combination with the characteristics of each algorithm. Although the security of the encryption by adopting the asymmetric encryption algorithm is improved, the operation speed of the encryption is higher than that of the symmetric encryption algorithm, and especially when a large amount of data is encrypted, the encryption efficiency is lower, so that the advantages of the two types of encryption algorithms can be integrated by adopting the symmetric encryption algorithm to encrypt the original data and then adopting the asymmetric encryption algorithm to manage the secret key of the symmetric encryption algorithm, the encryption speed is ensured, and the security and the reliability of the encryption are improved.
S13, powering on a blank security chip, and acquiring the external ciphertext and the key ciphertext;
after the chip is started, the ROM program inside the chip is started and executed, the ROM program may select an appropriate communication protocol according to actual requirements to obtain an external ciphertext and a key ciphertext, as shown in fig. 2, where the step S13 of powering on the blank security chip and obtaining the external ciphertext and the key ciphertext includes:
s131, running a ROM program of the blank security chip;
the ROM program is preset by the blank security chip, and a decryption private key for decrypting the key ciphertext is solidified in the ROM program. After the blank security chip is powered on, the ROM program in the chip is operated, and the ROM program completes the preparation work before the burning of the content to be burned.
S132, the ROM program acquires the external ciphertext and the key ciphertext according to a communication protocol and stores the external ciphertext and the key ciphertext into the RAM of the blank security chip.
After the external ciphertext and the key ciphertext are provided to the burning factory by the client, the burning factory arranges a burning environment in advance according to an actually used bus communication protocol to prepare burning. The selection of the communication protocol can be determined according to the requirements of actually used protocol interfaces, such as bus communication protocols corresponding to a UART bus interface, an SPI bus interface, an I2C bus interface, a nand flash interface, an LCD interface and the like. The ROM can download an external ciphertext and a key ciphertext from the bus interface according to a bus communication protocol corresponding to the bus interface, and store the external ciphertext and the key ciphertext in the RAM for subsequent burning.
S14, decrypting the key ciphertext through a decryption private key corresponding to the encryption public key to obtain a ciphertext key, and decrypting the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
the decryption private key of the blank security chip is pre-configured in the ROM program and is used for decrypting the key ciphertext, and the ciphertext key is the symmetric key used for encrypting the burning program and the content to be burned as described above. After the ROM program obtains the external ciphertext and the corresponding key ciphertext, the ROM program decrypts the key ciphertext by using a decryption private key and a corresponding asymmetric encryption algorithm to obtain a ciphertext key (namely, a symmetric key used for encrypting the burning program and the content to be burned), and after the ROM program obtains the ciphertext key (the symmetric key), the ROM program decrypts the external ciphertext by matching with the corresponding symmetric encryption algorithm to obtain the burning program and the plaintext information of the content to be burned.
In this embodiment, on the basis that the internal ROM program of the chip is used to download and store the external ciphertext and the corresponding key ciphertext into the internal RAM of the chip, the ROM program decrypts the key ciphertext and the external ciphertext in sequence by using the decryption private key to obtain the burning program and the plaintext information of the content to be burned, so that on the basis that the encrypted content and the external invisible of the encryption key chip are realized, the effects of the decryption private key and the decryption process that the external part of the chip is not sensed are also ensured, and the privacy of the security information is further enhanced.
And S15, executing the burning program, and writing the content to be burned into the blank secure chip.
The execution of the burning program is also realized in the chip, after the ROM program obtains the burning program and the content to be burned, the preparation work of burning is completed, the CPU is transferred to the burning program, the burning program is executed to write the content to be burned of the chip into the chip, and therefore the blank safety chip completes the burning of the safety information of the chip in the chip.
In the embodiment of the application, based on the problem that the existing burning protection measures for the internal safety information of the blank safety chip have the risk that burning contents and corresponding encryption keys are easily exposed outside the chip, the technical scheme is designed that the burning method for burning the self safety information of the blank safety chip is used for encrypting a burning program and the contents to be burned by using the encryption keys of a symmetric encryption algorithm in advance and further encrypting the encryption keys by using an encryption public key of an asymmetric encryption algorithm to obtain an external ciphertext and a corresponding key ciphertext, then the blank safety chip to be burned is electrified, an internal ROM program is executed to download and obtain the external ciphertext and the corresponding key ciphertext and store the external ciphertext and the key ciphertext in an internal RAM of the chip, the ROM program is used for sequentially decrypting the key ciphertext and the external ciphertext by using a preset decryption private key to obtain the burning program and plaintext information of the contents to be burned, and then the burning program is executed to write the contents to, the method has the advantages that the safety information and the decryption private key inside the blank safety chip are guaranteed to be invisible outside the chip in the whole burning process, on the basis of overcoming the problem that burning contents are easily intercepted outside the chip in the existing protection measures, reliable guarantee is provided for the privacy of the safety information, and then the risk of burning and divulging the secret of the safety information is effectively avoided.
In one embodiment, as shown in fig. 3, to further improve the security of the decryption private key, a method for burning a blank secure chip is provided, the method comprising the following steps:
s21, encrypting the burning program and the content to be burned by adopting a ciphertext key in advance to obtain an external ciphertext;
s22, encrypting the ciphertext key by using the encryption public key to obtain a key ciphertext;
s23, powering on a blank security chip, and acquiring the external ciphertext and the key ciphertext;
s24, decrypting the key ciphertext through a decryption private key corresponding to the encryption public key to obtain a ciphertext key, and decrypting the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
s25, configuring the ROM address storing the decryption private key to be inaccessible through the hardware of the blank secure chip, and configuring the ROM address for only 1 time after power-on.
The hardware function of the blank secure chip is realized by using a Verilog program, the blank secure chip has the function of configuring a part of ROM region to be inaccessible, once the blank secure chip is configured to be inaccessible, the configuration cannot be modified again, and the access and the reconfiguration can be recovered only by reset or power-on again.
Verilog is a hardware description language, which is a language for describing the structure and behavior of digital system hardware in text form, and can represent logic circuit diagrams, logic expressions, and logic functions performed by digital logic systems. In this embodiment, a Verilog program is used to make a ROM address range for storing a decryption private key configured by hardware inaccessible, and the inaccessible scheme is specifically set as follows: initializing a first register and a second register to be 0 values in advance, and when a part of addresses of a configuration ROM are inaccessible, using the first register to store whether an inaccessible identifier is configured, and using the second register to store an inaccessible ROM address range; when the AHB bus requests to read ROM address data, the Verilog program can obtain the value of the second register to be used for judging whether the ROM address is in the inaccessible ROM address range, if not, the real value is directly returned, otherwise, the value of the first register is obtained, whether the configured ROM partial address is inaccessible is judged by configuring whether the inaccessible identifier is 0, if the returned value is 0, the non-configuration is represented, the ROM address can be directly accessed, namely, the real value is returned, otherwise, the configuration is represented, and the 0 value needs to be returned.
The scheme that the configuration cannot be modified again after the corresponding implementation configuration is inaccessible is as follows:
when the AHB bus requests to write data into a first register, the verilog program can acquire the value of the first register to judge whether the configuration inaccessible identifier is 0, and if 0 indicates that the configuration inaccessible identifier is not configured, the configuration write instruction can be normally executed; if not, it indicates that the configuration is already configured, and returns directly without executing the configuration write command.
When the AHB bus requests to write data into the second register, the verilog program can acquire the value of the first register to judge whether the configuration inaccessible identifier is 0, if the configuration inaccessible identifier is 0, the configuration write instruction can be normally executed, namely, the inaccessible address is written into the second register; if not, it indicates that the configuration is already configured, and returns directly without executing the configuration write command.
It should be noted that, each time the system reset or the chip is powered on again, the values of the first register and the second register are restored to the default value 0, and the access and reconfiguration rights can be restored.
And S26, executing the burning program, and writing the content to be burned into the blank secure chip.
Based on the above embodiment, the external ciphertext and the key ciphertext are directly downloaded and stored in the internal RAM by the chip, and are decrypted inside the chip, so that on the basis that the plaintext and the key obtained after decryption are not visible outside the chip, the ROM address stored by the decryption private key for decrypting the key ciphertext is set to be inaccessible, then the burning program is executed for burning, the security protection on the decryption private key is strengthened, the leakage risk of the decryption private key is effectively reduced, and the safety of safety information burning is further improved.
It should be noted that, although the steps in the above-described flowcharts are shown in sequence as indicated by arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise.
In one embodiment, as shown in fig. 4, there is provided a blank secure chip burning system, the system comprising:
the ciphertext module 11 is configured to encrypt the burning program and the content to be burned by using a ciphertext key in advance to obtain an external ciphertext;
the key encryption module 12 is configured to encrypt the ciphertext key by using an encryption public key to obtain a key ciphertext;
a cipher text downloading module 13, configured to power on a blank security chip, and obtain the external cipher text and the key cipher text;
the ciphertext decryption module 14 is configured to decrypt the key ciphertext through a decryption private key corresponding to the encrypted public key to obtain a ciphertext key, and decrypt the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
and the chip burning module 15 is used for executing the burning program and writing the content to be burned into the blank security chip.
In one embodiment, as shown in fig. 5, there is provided a blank secure chip burning system, the system comprising:
the ciphertext module 21 is configured to encrypt the burning program and the content to be burned by using a ciphertext key in advance to obtain an external ciphertext;
the key encryption module 22 is configured to encrypt the ciphertext key by using an encryption public key to obtain a key ciphertext;
a cipher text downloading module 23, configured to power on a blank security chip, and obtain the external cipher text and the key cipher text;
the ciphertext decryption module 24 is configured to decrypt the key ciphertext through a decryption private key corresponding to the encrypted public key to obtain a ciphertext key, and decrypt the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
and the configuration permission module 25 is used for configuring the ROM address storing the decryption private key to be inaccessible through the hardware of the blank security chip, and the configuration can be performed only for 1 time after the power is on.
And the chip burning module 26 is used for executing the burning program and writing the content to be burned into the blank security chip.
It should be noted that the blank secure chip burning system in this example is different from the above system only in that the configuration permission module 25 is added, and the implementation manner of other modules is consistent with the above system embodiment. The application of burning self information of the actual blank security chip is as follows: a chip design manufacturer solidifies the decryption private key in a ROM program in a blank security chip and provides an encryption public key for a client to encrypt the encryption and decryption burning program and a ciphertext key of burning contents; the client sends the encrypted external ciphertext and the encrypted key ciphertext to a burning factory for burning in batches; the method comprises the steps that a burning factory stores an external ciphertext and a key ciphertext of a client according to a bus protocol needed to be used, a burning environment is prepared, a blank security chip to be burnt is powered on, a ROM (read only memory) program runs on the chip, the ROM program downloads the external ciphertext and the key ciphertext to an RAM (random access memory) in the chip through corresponding uart, spi and the like according to the bus communication protocol for storage, the key ciphertext and the external ciphertext are sequentially decrypted according to a solidified decryption private key of the ROM program to obtain a burning program and plaintext information of content to be burnt, and after the ROM address for storing the decryption private key is set to be inaccessible, the burning program is executed to write the content to be burnt into the blank security chip to complete writing of related.
For specific limitations of the system for burning the blank secure chip, reference may be made to the above limitations of the method for burning the blank secure chip, which are not described herein again. All modules in the blank security chip burning system can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a blank security chip is provided, which implements the steps of the above method when powered on.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
To sum up, the blank secure chip burning method, the system, the blank secure chip and the storage medium provided by the embodiments of the present invention generate the encrypted public key and the decrypted private key by using the asymmetric encryption algorithm in advance, the encrypted public key is used to encrypt the encrypted and decrypted burning program and the ciphertext key of the burning content to obtain the external ciphertext and the key ciphertext, and the decrypted private key is solidified in the ROM program in the blank secure chip, the ROM program is powered on to run the ROM program in the blank secure chip to be burned, the ROM program downloads the external ciphertext and the key ciphertext to the RAM in the chip through the corresponding interfaces such as UART, SPI and the like according to the bus communication protocol for storage, the key ciphertext and the external ciphertext are sequentially decrypted according to the solidified decrypted private key to obtain the burning program and the plaintext information of the burning content, and after the ROM address for storing and decrypting the private key is set to be inaccessible, the technical proposal of executing the burning program to write the content to be burned into the blank security chip to complete the writing of the related security information realizes the secure burning of the self security information by the blank security chip, not only ensures the privacy of the information to be burned outside the chip by using a symmetric encryption algorithm and an asymmetric encryption algorithm, and the method of decryption inside the chip ensures the decrypted plaintext and ciphertext keys, the decrypted private key, and the decryption process is invisible to the outside of the chip, so that the technical problem that the plaintext of the burning content is easy to intercept in a burning tool, namely the outside of the chip in the existing protection measure is solved, the private key is set by chip hardware to be inaccessible for storage, the leakage risk of the decryption private key is effectively reduced, the risk that an attacker obtains safety information is further avoided, and the safety and the reliability of the information burning of the blank safety chip are improved.
The embodiments in this specification are described in a progressive manner, and all the same or similar parts of the embodiments are directly referred to each other, and each embodiment is described with emphasis on differences from other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. It should be noted that, the technical features of the embodiments may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express some preferred embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, various modifications and substitutions can be made without departing from the technical principle of the present invention, and these should be construed as the protection scope of the present application. Therefore, the protection scope of the present patent shall be subject to the protection scope of the claims.
Claims (10)
1. A blank secure chip burning method is characterized by comprising the following steps:
encrypting the burning program and the content to be burned by adopting a ciphertext key in advance to obtain an external ciphertext;
encrypting the cipher text key by adopting an encryption public key to obtain a key cipher text;
powering on a blank security chip, and acquiring the external ciphertext and the key ciphertext;
decrypting the key ciphertext through a decryption private key corresponding to the encryption public key to obtain a ciphertext key, and decrypting the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
and executing the burning program, and writing the content to be burnt into the blank security chip.
2. The method for burning the blank secure chip of claim 1, wherein the ciphertext key is generated by a symmetric encryption algorithm.
3. The method for burning the blank secure chip as recited in claim 1, wherein the encrypted public key and the decrypted private key are generated by an asymmetric encryption algorithm.
4. The method for burning the blank secure chip according to claim 1, wherein the step of powering on the blank secure chip and obtaining the external ciphertext and the key ciphertext comprises:
running a ROM program of the blank security chip;
and the ROM program acquires the external ciphertext and the key ciphertext according to a communication protocol and stores the external ciphertext and the key ciphertext into the RAM of the blank security chip.
5. The method for burning the blank secure chip according to claim 1, wherein before the executing the burning program and writing the content to be burned into the blank secure chip, the method further comprises:
and configuring the ROM address for storing the decryption private key to be inaccessible through the hardware of the blank security chip, and configuring the ROM address for only 1 time after the ROM address is powered on.
6. The method for burning the blank secure chip according to claim 5, wherein the step of configuring, through the hardware of the blank secure chip, the ROM address storing the decryption private key to be inaccessible and to be configured only 1 time after power-on comprises:
the method comprises the steps of using a first register to store and configure an inaccessible identifier in advance, and using a second register to store an inaccessible ROM address range; the initial values of the first register and the second register are both 0;
when an AHB bus requests to configure an inaccessible identifier of a first register, a verilog program acquires a value of the first register, judges whether the configured inaccessible identifier is 0, executes a configuration instruction if the configured inaccessible identifier is 0, and refuses to execute the configuration instruction if the configured inaccessible identifier is not 0;
when the AHB bus requests to write the inaccessible ROM address range into a second register, a verilog program acquires the value of the first register, judges whether the configuration inaccessible identifier is 0, executes the configuration instruction if the configuration inaccessible identifier is 0, and refuses to execute the configuration instruction if the configuration inaccessible identifier is not 0;
when the AHB requests to read ROM address data, the Verilog program can obtain the value of the second register, judge whether the ROM address is in the inaccessible ROM address range, if not, return the true value, otherwise, obtain the value of the first register, and judge whether the configuration inaccessible identifier is 0, if 0, return the true value, otherwise, return 0.
7. A blank secure chip burning system, the system comprising:
the ciphertext module is used for encrypting the burning program and the content to be burned by adopting a ciphertext key in advance to obtain an external ciphertext;
the key encryption module is used for encrypting the ciphertext key by adopting an encryption public key to obtain a key ciphertext;
a cipher text downloading module for powering on a blank security chip and acquiring the external cipher text and the key cipher text;
the ciphertext decryption module is used for decrypting the key ciphertext through a decryption private key corresponding to the encrypted public key to obtain a ciphertext key, and decrypting the external ciphertext through the ciphertext key to obtain the burning program and the content to be burned; the decryption private key is arranged in the blank security chip;
and the chip burning module is used for executing the burning program and writing the content to be burned into the blank security chip.
8. The system for burning blank secure chips of claim 7, further comprising, before the chip burning module:
and the configuration authority module is used for configuring the ROM address storing the decryption private key to be inaccessible through the hardware of the blank security chip, and can only be configured for 1 time after being electrified.
9. A blank security chip, wherein security information is not burned into the blank security chip, and the blank security chip performs the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110253343.9A CN112989356B (en) | 2021-03-08 | 2021-03-08 | Blank security chip burning method, system, blank security chip and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110253343.9A CN112989356B (en) | 2021-03-08 | 2021-03-08 | Blank security chip burning method, system, blank security chip and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112989356A true CN112989356A (en) | 2021-06-18 |
CN112989356B CN112989356B (en) | 2023-11-10 |
Family
ID=76335640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110253343.9A Active CN112989356B (en) | 2021-03-08 | 2021-03-08 | Blank security chip burning method, system, blank security chip and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112989356B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113806774A (en) * | 2021-09-15 | 2021-12-17 | 惠州市德赛电池有限公司 | Encryption method, decryption method and system |
CN114629641A (en) * | 2022-03-17 | 2022-06-14 | 江南信安(北京)科技有限公司 | Code downloading starting safety protection method and device based on safety chip |
CN114662113A (en) * | 2022-02-15 | 2022-06-24 | 芯翼信息科技(上海)有限公司 | Secret key burning method and device, safe starting method and device, equipment and medium |
CN115129332A (en) * | 2022-08-30 | 2022-09-30 | 深圳市航顺芯片技术研发有限公司 | Firmware burning method, computer equipment and readable storage medium |
CN115454918A (en) * | 2022-11-11 | 2022-12-09 | 成都航天通信设备有限责任公司 | CX9261 chip configuration method based on FPGA |
WO2023236806A1 (en) * | 2022-06-09 | 2023-12-14 | 广州视源电子科技股份有限公司 | Data burning method and apparatus, and computer device and computer-readable storage medium |
CN118413391A (en) * | 2024-06-26 | 2024-07-30 | 合众新能源汽车股份有限公司 | Method, system, equipment and medium for encrypting and decrypting prefabricated file of intelligent driving controller |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102280133A (en) * | 2011-08-16 | 2011-12-14 | 杭州晟元芯片技术有限公司 | Anti-interception code encryption burning method |
CN106648713A (en) * | 2015-10-28 | 2017-05-10 | 深圳市博巨兴实业发展有限公司 | OTP programming method and device |
CN110719166A (en) * | 2019-10-15 | 2020-01-21 | 深圳市元征科技股份有限公司 | Chip burning method, chip burning device, chip burning system and storage medium |
CN112069515A (en) * | 2020-08-20 | 2020-12-11 | 博流智能科技(南京)有限公司 | Safe EFUSE burning method and system |
-
2021
- 2021-03-08 CN CN202110253343.9A patent/CN112989356B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102280133A (en) * | 2011-08-16 | 2011-12-14 | 杭州晟元芯片技术有限公司 | Anti-interception code encryption burning method |
CN106648713A (en) * | 2015-10-28 | 2017-05-10 | 深圳市博巨兴实业发展有限公司 | OTP programming method and device |
CN110719166A (en) * | 2019-10-15 | 2020-01-21 | 深圳市元征科技股份有限公司 | Chip burning method, chip burning device, chip burning system and storage medium |
CN112069515A (en) * | 2020-08-20 | 2020-12-11 | 博流智能科技(南京)有限公司 | Safe EFUSE burning method and system |
Non-Patent Citations (1)
Title |
---|
李君华;: "基于FPGA的信号发生器", 数字技术与应用 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113806774A (en) * | 2021-09-15 | 2021-12-17 | 惠州市德赛电池有限公司 | Encryption method, decryption method and system |
CN113806774B (en) * | 2021-09-15 | 2024-02-13 | 惠州市德赛电池有限公司 | Encryption method, decryption method and system |
CN114662113A (en) * | 2022-02-15 | 2022-06-24 | 芯翼信息科技(上海)有限公司 | Secret key burning method and device, safe starting method and device, equipment and medium |
CN114629641A (en) * | 2022-03-17 | 2022-06-14 | 江南信安(北京)科技有限公司 | Code downloading starting safety protection method and device based on safety chip |
WO2023236806A1 (en) * | 2022-06-09 | 2023-12-14 | 广州视源电子科技股份有限公司 | Data burning method and apparatus, and computer device and computer-readable storage medium |
CN115129332A (en) * | 2022-08-30 | 2022-09-30 | 深圳市航顺芯片技术研发有限公司 | Firmware burning method, computer equipment and readable storage medium |
CN115454918A (en) * | 2022-11-11 | 2022-12-09 | 成都航天通信设备有限责任公司 | CX9261 chip configuration method based on FPGA |
CN118413391A (en) * | 2024-06-26 | 2024-07-30 | 合众新能源汽车股份有限公司 | Method, system, equipment and medium for encrypting and decrypting prefabricated file of intelligent driving controller |
Also Published As
Publication number | Publication date |
---|---|
CN112989356B (en) | 2023-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112989356B (en) | Blank security chip burning method, system, blank security chip and storage medium | |
AU2019271965B2 (en) | POS System with white box encryption key sharing | |
US10419217B2 (en) | Security information configuration method, security verification method, and related chip | |
CN109583189A (en) | Firmware method for secure loading, device, computer equipment and storage medium | |
US20150095652A1 (en) | Encryption and decryption processing method, apparatus, and device | |
US20200026882A1 (en) | Methods and systems for activating measurement based on a trusted card | |
CN110971398A (en) | Data processing method, device and system | |
CN108880806A (en) | Encryption and decryption method, chip and readable storage medium storing program for executing | |
WO2022133165A1 (en) | Privacy-enhanced computation via sequestered encryption | |
US20230289424A1 (en) | Security Chip-Based Security Authentication Method and System, Security Chip, and Readable Storage Medium | |
CN114024711A (en) | Data transmission method and device and computer readable storage medium | |
CN110932853B (en) | Key management device and key management method based on trusted module | |
CN108256346B (en) | Key data protection method, encryption protection device and embedded system device | |
CN110858246B (en) | Authentication method and system of security code space, and registration method thereof | |
CN116048716A (en) | Direct storage access method and device and related equipment | |
CN113542303B (en) | Software importing system and method for secret key in non-trusted environment | |
Drimer et al. | Protecting multiple cores in a single FPGA design | |
CN114697113A (en) | Hardware accelerator card-based multi-party privacy calculation method, device and system | |
KR102512871B1 (en) | Centralized private key management method for multiple user devices related to a single public key | |
WO2023228373A1 (en) | Programmable logic controller, control method, and program | |
US20220191010A1 (en) | Key management in an integrated circuit | |
CN116383858B (en) | Disk data processing method, device, equipment and medium | |
CN110780884B (en) | Information processing method, device and equipment | |
CN115842675A (en) | Communication authentication method and system | |
CN115694805A (en) | Electronic device, integrated circuit design and manufacturing method and product operation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder |
Address after: 510555 No. 107 Bowen Road, Huangpu District, Guangzhou, Guangdong Patentee after: Guangzhou Ankai Microelectronics Co.,Ltd. Address before: Unit 301, 302, 303, 3 / F, C1 area, 182 science Avenue, Science City, Guangzhou hi tech Industrial Development Zone, Guangzhou, Guangdong 510000 Patentee before: Guangzhou Ankai Microelectronics Co.,Ltd. |
|
CP02 | Change in the address of a patent holder |