Method for generating anti-channeling identification code, verification method, device, equipment, medium and product
By generating and encrypting a unique hardware identifier during the hardware manufacturing stage, the problem of easy copying of the unique hardware identifier is solved, thus achieving individual differentiation of hardware devices and effective protection of software.
Patent Information
- Application Number
- CN202510690470.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, the unique identification code of hardware is easily copied, leading to software theft and making it impossible to effectively prevent cross-selling.
During the hardware manufacturing stage, a unique hardware identification code is generated using a random number algorithm. This code is then encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code, which is then written into a one-time programmable storage area.
This improves the security and anti-counterfeiting properties of the anti-counterfeiting identification code, ensuring its authenticity and permanence, and preventing software theft.
Smart Images

Figure CN123179364A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular to methods, verification methods, devices, equipment, media and products for generating anti-counterfeiting identification codes. Background Technology
[0002] Currently, to prevent the theft of digital assets, a common practice is to use one-time programming technology to write a unique hardware identifier into the hardware device, and then bind the software license to the unique hardware identifier to protect the product or data. However, this method still has the problem of the unique hardware identifier being copied, leading to software theft. Summary of the Invention
[0003] This application provides a method, verification method, apparatus, equipment, medium, and product for generating anti-counterfeiting identification codes, in order to solve the problem that the identification codes of existing hardware devices can be copied, leading to software theft.
[0004] Firstly, this application provides a method for generating an anti-counterfeiting identification code, applied in the production stage of hardware equipment, including:
[0005] A unique hardware identification code is generated based on a random number algorithm.
[0006] The unique identification code of the hardware is encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code.
[0007] Write the unique hardware identifier and the target anti-counterfeiting identifier into the one-time programming storage area of the hardware device.
[0008] In one possible design, the encryption of the hardware unique identifier based on the public and private keys of the digital asset owner to generate a target anti-counterfeiting identifier includes:
[0009] Generate data to be signed based on the hardware unique identifier and the public key;
[0010] The data to be signed is converted using a hash algorithm to generate an initial anti-counterfeiting identification code;
[0011] The initial anti-counterfeiting identification code is digitally signed based on the private key to generate the target anti-counterfeiting identification code.
[0012] In one possible design, generating the data to be signed based on the hardware unique identifier and the public key includes:
[0013] The hardware unique identifier is converted based on a hash algorithm to generate a hardware unique salt value;
[0014] The hardware-unique salt value is concatenated with the public key to generate the data to be signed.
[0015] In one possible design, writing the hardware unique identifier and the target anti-counterfeiting identifier into the one-time programming storage area of the hardware device includes:
[0016] The unique hardware identification code is written into the first storage area using electronic fuse technology; and the target anti-counterfeiting identification code is written into the second storage area using electronic fuse technology.
[0017] Secondly, this application provides a verification method for an anti-counterfeiting identification code, applied during the software startup phase, including:
[0018] In response to receiving a software startup command, the system obtains the unique hardware identifier and the target anti-counterfeiting identifier written in the one-time programming storage area of the hardware device.
[0019] The target anti-counterfeiting identification code is verified based on the obtained unique hardware identification code and the public and private keys of the digital asset owner.
[0020] Upon successful verification of the target anti-counterfeiting identification code, the software startup process is executed.
[0021] In one possible design, the verification of the target anti-counterfeiting identification code based on the acquired unique hardware identifier and the public and private keys of the digital asset owner includes:
[0022] Data to be verified is generated based on the hardware unique identifier and the public key;
[0023] The data to be verified is transformed using a hash algorithm to generate the target verification data;
[0024] The target anti-counterfeiting identification code is signed and decrypted based on the public key to obtain the initial anti-counterfeiting identification code;
[0025] The target verification data is compared with the initial anti-counterfeiting identification code to verify the target anti-counterfeiting identification code.
[0026] In one possible design, generating the data to be verified based on the hardware unique identifier and the public key includes:
[0027] The hardware unique identifier is converted based on a hash algorithm to generate a hardware unique salt value;
[0028] The hardware-unique salt value is concatenated with the public key to generate the data to be verified.
[0029] One possible design also includes:
[0030] In response to the failure of the target anti-counterfeiting identification code verification, the software startup process is terminated, and the abnormal status indicator light of the hardware device is triggered.
[0031] Thirdly, this application provides an anti-counterfeiting identification code generation device, applied in the production stage of hardware equipment, including:
[0032] The generation module is used to generate a unique hardware identifier based on a random number algorithm.
[0033] The generation module is also used to encrypt the unique identification code of the hardware based on the public and private keys of the digital asset owner in order to generate the target anti-counterfeiting identification code.
[0034] The writing module is used to write the hardware unique identification code and the target anti-counterfeiting identification code into the one-time programming storage area of the hardware device.
[0035] Fourthly, this application provides a verification device for an anti-counterfeiting identification code, applied during the software startup phase, including:
[0036] The acquisition module is used to acquire the unique hardware identification code and the target anti-counterfeiting identification code written in the one-time programming storage area of the hardware device in response to the received software start command.
[0037] The verification module is used to verify the target anti-counterfeiting identification code based on the acquired hardware unique identification code and the public and private keys of the digital asset owner;
[0038] The execution module is used to execute the software startup process in response to the successful verification of the target anti-counterfeiting identification code.
[0039] Fifthly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0040] The memory stores computer-executed instructions;
[0041] The processor executes computer execution instructions stored in the memory to implement the method as described in either the first or second aspect.
[0042] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in either the first or second aspect.
[0043] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in either the first or second aspect.
[0044] This application provides a method, verification method, apparatus, device, medium, and product for generating an anti-counterfeiting identification code. The method for generating the anti-counterfeiting identification code involves, during the hardware device manufacturing stage, utilizing the randomness and uniqueness of a random number algorithm to generate a unique hardware identification code for each hardware device, thus achieving individual differentiation. Then, the unique hardware identification code is encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code, effectively preventing tampering or theft and improving its security and anti-counterfeiting properties. Finally, by writing the unique hardware identification code and the target anti-counterfeiting identification code into a one-time programmable storage area, its immutable nature ensures their authenticity and permanence. The verification method for the anti-counterfeiting identification code involves, during the software startup stage, acquiring the unique hardware identification code and the target anti-counterfeiting identification code stored in the hardware device, and verifying the target anti-counterfeiting identification code to determine its authenticity and integrity. By binding the software startup to the anti-counterfeiting identification code verification of the hardware device, only certified hardware devices can start the software normally, thus preventing the abuse of the software by uncertified hardware devices. Attached Figure Description
[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0046] Figure 1 An application scenario diagram corresponding to the method for generating anti-counterfeiting identification codes according to an embodiment of this application is provided;
[0047] Figure 2 A flowchart illustrating a method for generating an anti-counterfeiting identification code according to an embodiment of this application;
[0048] Figure 3 A flowchart illustrating a method for generating an anti-counterfeiting identification code, as provided in another embodiment of this application;
[0049] Figure 4 A flowchart illustrating a method for verifying anti-counterfeiting identification codes provided in an embodiment of this application;
[0050] Figure 5 A flowchart illustrating a method for verifying an anti-counterfeiting identification code, as provided in another embodiment of this application;
[0051] Figure 6 A schematic diagram of the structure of an anti-counterfeiting identification code generation device provided in an embodiment of this application;
[0052] Figure 7 A schematic diagram of the structure of a verification device for anti-counterfeiting identification codes provided in an embodiment of this application;
[0053] Figure 8 This is a structural example diagram of an electronic device provided in an embodiment of this application.
[0054] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0055] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0056] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail first.
[0057] Currently, there are instances where intermediaries purchase hardware platforms and then copy software digital assets, severely damaging the rights of software developers. To protect developers' interests, binding software digital assets to the hardware platform is crucial. To prevent digital asset theft, a common practice is to use one-time programming technology to write a unique hardware identifier into the hardware device, and then bind the software license to this identifier to protect the product or data. However, this method still suffers from the problem of the hardware identifier being copied, leading to software theft.
[0058] Therefore, in the face of the technical problems of the existing technology, in order to avoid the easy copying of hardware unique identifiers leading to software theft, a unique hardware identifier is generated during the hardware device manufacturing stage using a random number algorithm to ensure its uniqueness. Then, the unique hardware identifier is encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identifier. Finally, both are written into the one-time programming storage area of the hardware device. This encryption method increases the difficulty of copying the unique hardware identifier, achieving more effective product or data protection and preventing the theft of software digital assets.
[0059] To facilitate understanding of the method for generating anti-counterfeiting identification codes provided in the embodiments of this application, the following will be combined with... Figure 1The application scenarios involved in the embodiments of this application will be described.
[0060] Figure 1 This diagram illustrates an application scenario corresponding to the method for generating anti-counterfeiting identification codes provided in this application. For example... Figure 1 As shown in the diagram, in this embodiment, the anti-counterfeiting system includes a user device 11, an anti-counterfeiting device 12, and a hardware device 13. The user device 11 is communicatively connected to the anti-counterfeiting device 12, and the anti-counterfeiting device 12 is also communicatively connected to the hardware device 13. During the production stage of the hardware device 13, when it is necessary to generate an anti-counterfeiting identification code, the user device 11 sends an identification code generation instruction to the anti-counterfeiting device 12. After receiving the identification code generation instruction, the anti-counterfeiting device 12 first generates a unique hardware identification code based on a random number algorithm; then, it encrypts the unique hardware identification code based on a public key and a private key to generate the anti-counterfeiting identification code; finally, it writes the unique hardware identification code and the anti-counterfeiting identification code into the one-time programming storage area of the hardware device 13.
[0061] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0062] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0063] Figure 2 A flowchart of a method for generating an anti-counterfeiting identification code according to an embodiment of this application is shown below. Figure 2 As shown, the execution entity in this embodiment is an anti-counterfeiting identification code generation device. This device can be implemented using a computer program, or using a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; alternatively, it can be implemented using a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a computer or a server, etc. The anti-counterfeiting identification code generation method provided in this embodiment includes the following steps:
[0064] Specifically, the method for generating anti-counterfeiting identification codes provided in this embodiment is applied to the production stage of hardware equipment.
[0065] Alternatively, the hardware device may be a chip.
[0066] Step S201: Generate a unique hardware identification code based on a random number algorithm.
[0067] Random number algorithms are a class of methods used to generate numerical sequences that appear random but actually follow specific algorithmic rules. Through mathematical calculations, random number algorithms can generate numerical sequences with high randomness and uniqueness.
[0068] Specifically, during the hardware manufacturing process, a unique identification code is generated for each hardware device using a random number algorithm. This unique identification code is like the hardware device's "ID number," ensuring that each hardware device can be accurately distinguished and identified.
[0069] The random number generation method can effectively avoid the occurrence of duplicate hardware identification codes, providing a reliable guarantee for the accurate identification of hardware devices from the root.
[0070] Optionally, the random number algorithm can be KLAD (Key Ladder Algorithm). KLAD is a key derivation algorithm that converts an initial random number into a device-specific hardware-unique identifier through multi-level key derivation.
[0071] Step S202: Encrypt the unique hardware identifier based on the public and private keys of the digital asset owner to generate the target anti-counterfeiting identifier.
[0072] Among them, the digital asset owner refers to the entity that has legal control, management rights and ownership rights over hardware devices or related digital assets.
[0073] Digital asset owners generate key pairs, namely public and private keys, through a PKI / CA (Certificate Authority). Optionally, there are various algorithms that can be used to generate the key pairs, such as SM2 (ShangMi 2), ECC (Elliptic Curve Cryptography), and RSA (Rivest-Shamir-Adleman). Specifically, this embodiment does not limit the algorithm used to generate the key pairs.
[0074] The owner of a digital asset possesses a pair of keys: a public key and a private key. The public key can be freely distributed to devices, users, or third-party systems for verifying signatures or encrypting communications; the private key is kept by the digital asset owner and is used only for internal signing operations, never exposed to any third party in plaintext.
[0075] Among them, the target anti-counterfeiting identification code refers to the identification code obtained by encrypting the unique hardware identification code using the public key of the digital asset owner.
[0076] Alternatively, there are several schemes for generating a target anti-counterfeiting identification code by encrypting the hardware unique identification code based on the public and private keys.
[0077] For example, a symmetric key is used to encrypt the hardware unique identifier, and the digital asset owner's private key is used to perform asymmetric encryption on the symmetric key. The encrypted hardware unique identifier and the encrypted symmetric key are then combined to form the target anti-counterfeiting identifier.
[0078] For example, when generating a target anti-counterfeiting identification code, the signed or encrypted data can be attached by directly signing or encrypting the hardware's unique identifier using the digital asset owner's private key.
[0079] For example, the unique hardware identifier is hashed, and the hash value is signed using the digital asset owner's private key. The unique hardware identifier and the signature are then combined to form the target anti-counterfeiting identifier.
[0080] It should be noted that in this embodiment, there is no limitation on how to encrypt the hardware unique identification code based on the public and private keys to generate the target anti-counterfeiting scheme, which can be selected according to actual production needs.
[0081] It should also be noted that, since only the digital asset owner with the corresponding private key can decrypt the target anti-counterfeiting identification code, it can effectively prevent the target anti-counterfeiting identification code from being tampered with or stolen, thus greatly improving the security and anti-counterfeiting properties of the target anti-counterfeiting identification code.
[0082] Step S203: Write the hardware unique identification code and the target anti-counterfeiting identification code into the one-time programming storage area of the hardware device.
[0083] One-Time Programmable (OTP) storage areas have the characteristic that once data is written to them, it cannot be modified again.
[0084] It should be noted that after writing the unique hardware identifier and the target anti-counterfeiting identifier into this area, the write function of the one-time programming storage area is disabled. Therefore, the unique hardware identifier and the target anti-counterfeiting identifier will be permanently fixed in the hardware device and will not be tampered with due to external factors or human operation. This effectively prevents the unique hardware identifier and the target anti-counterfeiting identifier from being altered.
[0085] Optionally, the hardware device has multiple one-time programming storage areas, with the hardware unique identification code and the target anti-counterfeiting identification code stored in different one-time programming storage areas.
[0086] The method for generating anti-counterfeiting identification codes provided in this application embodiment generates a unique hardware identification code for the hardware device during the hardware device manufacturing stage using the randomness and uniqueness of a random number algorithm, thereby achieving individual differentiation of the hardware device; then, the unique hardware identification code is encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code, thereby effectively preventing the target anti-counterfeiting identification code from being tampered with or stolen, improving the security and anti-counterfeiting properties of the target anti-counterfeiting identification code; finally, by writing the unique hardware identification code and the target anti-counterfeiting identification code into a one-time programmable storage area, the authenticity and permanence of the unique hardware identification code and the target anti-counterfeiting identification code are ensured by utilizing its immutable characteristics.
[0087] As an optional implementation, based on any of the above embodiments, the hardware unique identification code is encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code; specifically, the following steps are included:
[0088] First, generate data to be signed based on the hardware unique identifier and public key.
[0089] Optionally, the hardware unique identifier and the public key can be combined in a specific format, such as by concatenating them in a certain order or by integrating them through a specific data structure, to form the data to be signed.
[0090] It should be noted that generating data to be signed is to prepare for subsequent encryption processing. By associating the hardware's unique identifier with the public key, the encryption process can be based on the information from both, further enhancing the security and effectiveness of the encryption.
[0091] Secondly, a hash algorithm is used to transform the data to be signed in order to generate an initial anti-counterfeiting identification code.
[0092] A hash algorithm is a function that maps data of arbitrary length to data of fixed length. It has one-wayness and an avalanche effect. One-wayness means that the original data cannot be derived from the hash value. The avalanche effect means that a small change in the original data will lead to a huge difference in the hash value.
[0093] By processing the data to be signed using a hash algorithm, it is converted into a fixed-length and highly unique initial anti-counterfeiting identification code. This not only compresses the length of the data to be signed, making it easier for subsequent processing, but also further ensures the security of the data to be signed, because even if a small amount of information in the data to be signed is tampered with, the hash value will be completely different.
[0094] Finally, the initial anti-counterfeiting identification code is digitally signed based on the private key to generate the target anti-counterfeiting identification code.
[0095] Digital signatures are a technology used to verify the authenticity and integrity of data and confirm its source. Through digital signature technology, anti-counterfeiting codes have a clear source identifier. During the verification process, only anti-counterfeiting codes whose digital signatures can be successfully verified using the corresponding public key are valid, thus improving the anti-counterfeiting capabilities of the anti-counterfeiting codes and making it more difficult for counterfeiters to forge them and evade supervision.
[0096] By employing an asymmetric encryption algorithm to encrypt the unique hardware identification code, only the private key of the digital asset owner can decrypt it, effectively preventing the target anti-counterfeiting identification code from being obtained and tampered with, thus improving the security of the target anti-counterfeiting identification code.
[0097] It should be noted that during the subsequent verification process, anyone can use the corresponding public key to verify the digital signature in the target anti-counterfeiting identification code, thereby confirming whether the target anti-counterfeiting identification code was generated by the digital asset owner and whether the target anti-counterfeiting identification code has been tampered with during transmission and storage.
[0098] The method for generating anti-counterfeiting identification codes provided in this application combines a unique hardware identifier and a public key to generate data to be signed, then uses a hash algorithm to convert it into an initial anti-counterfeiting identification code, and finally uses a private key to digitally sign the target anti-counterfeiting identification code. Through multi-step encryption and signing operations, the security and anti-counterfeiting properties of the anti-counterfeiting identification code are improved. Furthermore, the introduction of hash algorithms and digital signatures further enhances the security of the target anti-counterfeiting identification code. The hash algorithm prevents data from being reverse engineered, and the digital signature ensures the legitimacy of the identification code's source and the integrity of the data. Compared to conventional encryption methods, it can more effectively resist attacks and data tampering, reducing the possibility of counterfeiting exploiting vulnerabilities in the unique hardware identifier.
[0099] As an optional implementation, based on any of the above embodiments, data to be signed is generated based on a hardware unique identifier and a public key; specifically, the following steps are included:
[0100] First, the hardware unique identifier is converted based on a hash algorithm to generate a hardware unique salt value.
[0101] In cryptography, a salt is a random value used to enhance data security. In this embodiment, the hardware-unique salt refers to the random value generated after processing the hardware-unique identifier using a hash algorithm. Because hash algorithms are one-way, meaning the original hardware-unique identifier cannot be derived from the generated hardware-unique salt, and because they exhibit an avalanche effect—even a very slight change in the hardware-unique identifier will result in a completely different generated hardware-unique salt—the hardware-unique salt possesses a high degree of randomness and uniqueness.
[0102] Secondly, the hardware-unique salt value is concatenated with the public key to generate the data to be signed.
[0103] Specifically, a new data string is formed by combining the hardware's unique salt value with the public key in a specific order; this data string is the data to be signed.
[0104] It should be noted that the data to be signed contains both unique information corresponding to the hardware device (the hardware's unique salt value) and the identity identifier of the digital asset owner (the public key). This provides a more complex and secure foundation for subsequent encryption processing, enhancing data security and immutability. Furthermore, concatenating the hardware's unique salt value with the public key to generate the data to be signed tightly links the hardware device's unique identifier to the digital asset owner's identity information. In subsequent verification and management processes, not only can the identity of the hardware device be confirmed, but the source of the data can also be clearly identified, facilitating more accurate and effective anti-counterfeiting management and tracking.
[0105] The method for generating anti-counterfeiting identification codes provided in this application converts the hardware unique identification code into a hardware unique salt value using a hash algorithm. Then, the hardware unique salt value is concatenated with a public key to generate data to be signed. This method leverages the irreversibility of the hash algorithm and the uniqueness of the concatenation. Counterfeiters not only need to crack the encryption algorithm but also need to obtain the correct hardware unique salt value generation logic and the key pair of the digital asset owner, thereby ensuring the uniqueness and security of the data to be signed.
[0106] As an optional implementation, based on any of the above embodiments, the unique hardware identifier and the target anti-counterfeiting identifier are written into the one-time programming storage area of the hardware device, including:
[0107] Electronic fuse technology is used to write the unique hardware identification code into the first storage area; and electronic fuse technology is used to write the target anti-counterfeiting identification code into the second storage area.
[0108] Among them, electronic fuse technology is a one-time programmable memory technology based on semiconductor manufacturing processes. Its core principle is that by applying a specific high voltage or high current, the fuse in the memory cell undergoes a physical change, thereby altering the electrical characteristics of the memory cell to record data.
[0109] For example, when writing the hardware unique identifier into the first storage area, the corresponding electronic fuse is controlled to perform programming operations according to the data content of the hardware unique identifier. For example, for each bit of data, if it is "1", the original state of the corresponding fuse is maintained; if it is "0", a high voltage or a large current is applied to make the fuse blow, thereby realizing the writing of data.
[0110] Both the first and second storage areas are one-time programmable storage areas. A hardware device may have multiple one-time programmable storage areas.
[0111] Optionally, by writing the unique hardware identifier and the target anti-counterfeiting identifier into different storage areas, and utilizing the characteristics of electronic fuse technology, even if one storage area malfunctions due to external factors (such as electromagnetic interference, physical damage, etc.), the data in the other storage area can still be completely preserved. This effectively reduces the risk of loss or damage to the unique hardware identifier and the target anti-counterfeiting identifier due to storage failure, and improves the overall data reliability.
[0112] The method for generating anti-counterfeiting identification codes provided in this application uses electronic fuse technology to write the hardware unique identification code and the target anti-counterfeiting identification code into different storage areas. The one-time programming characteristic of electronic fuse technology ensures that the written hardware unique identification code and target anti-counterfeiting identification code cannot be erased or modified, providing stronger anti-tampering capabilities compared to other storage methods. By storing the hardware unique identification code and the target anti-counterfeiting identification code in different storage areas, staff can more easily retrieve and compare the data of the hardware unique identification code and the target anti-counterfeiting identification code separately during anti-counterfeiting verification and management, improving verification efficiency and management accuracy.
[0113] Figure 3 A flowchart illustrating a method for generating an anti-counterfeiting identification code, as provided in another embodiment of this application. (See attached flowchart.) Figure 3 As shown, the execution subject of this embodiment is an anti-counterfeiting identification code generation device. This device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; alternatively, it can be implemented through a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a computer or a server, etc. This embodiment provides a complete method for generating anti-counterfeiting identification codes during the hardware production stage, specifically including the following steps:
[0114] S301. Generate a unique hardware identification code based on a random number algorithm.
[0115] S302. Convert the hardware unique identifier based on the hash algorithm to generate a hardware unique salt value.
[0116] S303. Concatenate the hardware-unique salt value with the public key to generate data to be signed.
[0117] S304. Use a hash algorithm to transform the data to be signed in order to generate an initial anti-counterfeiting identification code.
[0118] S305. Digitally sign the initial anti-counterfeiting identification code based on the private key to generate the target anti-counterfeiting identification code.
[0119] S306. Electronic fuse technology is used to write the unique hardware identification code into the first storage area and the target anti-counterfeiting identification code into the second storage area.
[0120] It should be noted that the technical effects of the method steps for generating the anti-counterfeiting identification code in this embodiment have been described in the above embodiment, and will not be repeated here.
[0121] Figure 4 A flowchart of a verification method for anti-counterfeiting identification codes provided in an embodiment of this application is shown below. Figure 4 As shown, the execution subject of this embodiment is a verification device for anti-counterfeiting identification codes. This verification device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; alternatively, it can be implemented through a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a computer or a server, etc. The anti-counterfeiting identification code verification method provided in this embodiment is applied to the software startup phase and specifically includes the following steps:
[0122] S401. In response to receiving the software start command, obtain the hardware unique identification code and the target anti-counterfeiting identification code written in the one-time programming storage area of the hardware device.
[0123] Specifically, after the software startup command is issued, the system communicates with the hardware device and reads the pre-written unique hardware identifier and target anti-counterfeiting identifier from the hardware device's one-time programming storage area for use in subsequent verification processes. Due to the immutable nature of the one-time programming storage area, it ensures that the obtained unique hardware identifier and target anti-counterfeiting identifier are original, authentic, and valid.
[0124] S402. Verify the target anti-counterfeiting identification code based on the obtained unique hardware identifier and the public and private keys of the digital asset owner.
[0125] Alternatively, there are several schemes for verifying the target anti-counterfeiting identification code based on the obtained unique hardware identifier and the public and private keys of the digital asset owner.
[0126] For example, the symmetric key can be decrypted using the digital asset owner's public key, then the hardware unique identifier can be decrypted using the symmetric key, and finally the decrypted hardware unique identifier can be compared with the obtained hardware unique identifier.
[0127] For example, the public key of the digital asset owner can be used to decrypt or verify the signature to confirm the legitimacy of the hardware's unique identifier.
[0128] For example, recalculate the hash value of the hardware's unique identifier and verify the signature using the digital asset owner's public key.
[0129] It should be noted that in this embodiment, no limitation is made on how to verify the target anti-counterfeiting identification code based on the obtained hardware unique identification code and the public and private keys of the digital asset owner. The method can be selected according to actual production needs.
[0130] It should be noted that during the verification process in the software startup phase, the cryptographic algorithm and the tamper-proof unique hardware identification code and target anti-counterfeiting identification code in the hardware device can accurately determine the legitimacy of the hardware device, effectively avoid misjudgment and omission, and provide reliable technical support for anti-counterfeiting management.
[0131] S403. In response to the successful verification of the target anti-counterfeiting identification code, the software startup process is executed.
[0132] Specifically, the software will only start running normally after the target anti-counterfeiting identification code is verified, ensuring that the software runs on legitimate hardware devices and preventing the use of software on hardware devices used for counterfeiting, thereby further strengthening anti-counterfeiting management.
[0133] Optionally, if the target anti-counterfeiting identification code fails to be verified, the software startup process can be terminated directly, or a verification error message can be sent as a reminder.
[0134] It's important to note that secure boot technology is applied during the software startup process. Specifically, the entire secure boot technology system includes a root of trust. Based on this root of trust, whenever a software version in the system needs to launch a new version, the legitimacy of that new version must be verified. Through the root of trust and subsequent verification of version legitimacy, it can be ensured that no version is tampered with during the entire software startup process.
[0135] The root of trust is the first component to boot in the entire system, and it is typically stored in a read-only boot storage area (Bootrom). The root of trust's primary responsibility is to verify the legitimacy of the hardware device it boots using public key infrastructure (PKI) and certificate authority (CA) signature and verification technologies. In other words, it needs to use the public key to confirm that the booted hardware device version is signed by the paired private key.
[0136] The anti-counterfeiting identification code verification method provided in this application embodiment obtains the unique hardware identification code and the target anti-counterfeiting identification code stored in the hardware device during the software startup phase, and verifies the target anti-counterfeiting identification code to determine its authenticity and completeness. By binding software startup with the verification of the hardware device's anti-counterfeiting identification code, only legitimate hardware devices can start the software normally, preventing the abuse of the software by uncertified hardware devices.
[0137] As an optional implementation, based on any of the above embodiments, when verifying the target anti-counterfeiting identification code based on the obtained hardware unique identification code and the public and private keys of the digital asset owner, the specific steps include:
[0138] First, data to be verified is generated based on the hardware unique identifier and public key.
[0139] Specifically, in this embodiment, the method of generating data to be verified using a unique hardware identifier and a public key is similar to the logic of generating data to be signed during the hardware device manufacturing stage.
[0140] Optionally, the hardware unique identifier can be converted into a hardware unique salt value through a hash algorithm, and then the hardware unique salt value and the public key can be concatenated and combined in a specific order to obtain the data to be verified.
[0141] Secondly, a hash algorithm is used to transform the data to be verified in order to generate the target verification data.
[0142] Specifically, a hash algorithm is used to transform the data to be verified into fixed-length and unique target verification data. The one-way nature of the hash algorithm ensures that the original data to be verified cannot be obtained from the target verification data, while the avalanche effect ensures that any slight change in the data to be verified will lead to a significant difference in the target verification data, thus guaranteeing the security and accuracy of the target verification data.
[0143] It should be noted that the hash algorithm used during the software startup phase is the same as that used during the hardware production phase. This ensures the accuracy of the target verification data.
[0144] It should also be noted that in the process of generating the data to be verified and the target verification data, the characteristics of the hash algorithm and the consistency with the data generation logic in the hardware equipment production stage are fully utilized to ensure the accuracy and reliability of the data in the verification process, reduce the possibility of misjudgment or omission due to defects in the verification logic, and make the anti-counterfeiting verification results more accurate.
[0145] Next, the target anti-counterfeiting identification code is signed and decrypted based on the public key to obtain the initial anti-counterfeiting identification code.
[0146] Specifically, since the target anti-counterfeiting identification code is generated by digitally signing the initial anti-counterfeiting identification code with a private key during the hardware production stage, the initial anti-counterfeiting identification code can be restored by decrypting the digital signature part of the target anti-counterfeiting identification code with the corresponding public key during the software startup verification stage.
[0147] It should be noted that this signature decryption step utilizes the pairing property of public and private keys in asymmetric encryption algorithms to ensure that only the correct public key can correctly decrypt the digital signature.
[0148] Finally, the target verification data is compared with the initial anti-counterfeiting identification code to verify the target anti-counterfeiting identification code.
[0149] Specifically, after obtaining the target verification data and the initial anti-counterfeiting identification code, the target verification data is compared with the initial anti-counterfeiting identification code to verify the target anti-counterfeiting identification code. If the target verification data and the initial anti-counterfeiting identification code are completely consistent, it indicates that the target anti-counterfeiting identification code was not tampered with after being generated during the hardware device production stage, and was indeed generated by the legitimate digital asset owner; therefore, the hardware device is legitimate. If the target verification data and the initial anti-counterfeiting identification code are not completely consistent, it is determined that the hardware device is abnormal and may be a device used for counterfeiting.
[0150] The anti-counterfeiting identification code verification method provided in this application generates verification data using a unique hardware identification code and a public key, performs hash conversion, decrypts the target anti-counterfeiting identification code using the public key, and finally compares the target verification data with the initial anti-counterfeiting identification code. This multi-step verification ensures the authenticity and integrity of the target anti-counterfeiting identification code, guaranteeing the accuracy and reliability of anti-counterfeiting verification.
[0151] As an optional implementation, based on any of the above embodiments, the verification method for the anti-counterfeiting identification code further includes:
[0152] The hardware unique identifier is converted using a hash algorithm to generate a hardware unique salt value. This hardware unique salt value is then concatenated with the public key to generate the data to be verified.
[0153] Specifically, a hash algorithm is used to generate a unique hardware salt value, increasing the randomness and complexity of the data. The one-way nature and avalanche effect of the hash algorithm make the generated unique hardware salt value highly random and unique. It is difficult for attackers to reverse-engineer the unique hardware identification code by obtaining information such as the data to be verified, effectively resisting various attacks and improving the security of identification code verification.
[0154] It should be noted that the hash algorithm used in this embodiment is the same as the hash algorithm used to generate the unique salt value of the hardware during the hardware manufacturing stage.
[0155] Specifically, the data to be verified, formed by concatenating public keys, is linked to the unique information of the hardware device and the identifier of the digital asset owner.
[0156] It should be noted that the method of concatenating the hardware unique salt value and the public key in this embodiment is the same as the method of concatenating the hardware unique salt value and the public key during the hardware device manufacturing stage.
[0157] The anti-counterfeiting identification code verification method provided in this application converts the hardware unique identification code using a hash algorithm to generate a hardware unique salt value; the hardware unique salt value is then concatenated with a public key to generate the data to be verified. This ensures the security and uniqueness of the data to be verified, providing a reliable data foundation for subsequent anti-counterfeiting verification.
[0158] As an optional implementation, based on any of the above embodiments, it further includes:
[0159] In response to the failure of the target anti-counterfeiting identification code verification, the software startup process is terminated, and the abnormal status indicator light of the hardware device is triggered.
[0160] Specifically, when the target anti-counterfeiting identification code verification fails, the software startup program is immediately interrupted to prevent the counterfeiting hardware device from running the software, thus cutting off the way for the counterfeiting hardware device to be stolen from the software level.
[0161] Optionally, the pre-set abnormal status indicator light on the hardware device can be triggered to visually send an alarm signal to the operator or maintenance personnel through flashing lights, color changes, etc., so that they can quickly identify that there is an abnormality in the hardware device, which may involve cross-selling issues, and facilitate timely further inspection and handling measures, such as isolating the hardware device and tracing the source of the hardware device.
[0162] It should be noted that triggering the abnormal status indicator light on the hardware device can quickly and clearly convey abnormal information to relevant personnel. Compared to software prompts or background records, visual alerts allow operators to identify problems immediately, shortening the response time for troubleshooting and handling, and improving the efficiency of dealing with cross-selling issues.
[0163] The anti-counterfeiting identification code verification method provided in this application terminates the software startup process when the target anti-counterfeiting identification code fails verification, preventing the counterfeiting hardware device from operating normally using the software; and triggers the abnormal status indicator light of the hardware device, providing abnormal feedback and warnings from both software and hardware perspectives, forming a complete anti-counterfeiting and abnormal handling process; in addition, it also facilitates staff to quickly locate the problematic hardware device.
[0164] Figure 5 A flowchart illustrating a method for verifying an anti-counterfeiting identification code, as provided in another embodiment of this application. (See attached flowchart.) Figure 5 As shown, the execution entity in this embodiment is a verification device for anti-counterfeiting identification codes. This verification device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; alternatively, it can be implemented through a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a computer or a server, etc. This embodiment provides a complete anti-counterfeiting identification code verification method during the software startup phase, specifically including the following steps:
[0165] S501: Obtain the unique hardware identifier and the target anti-counterfeiting identifier written in the one-time programming storage area of the hardware device.
[0166] S502. Convert the hardware unique identifier based on the hash algorithm to generate a hardware unique salt value.
[0167] S503: Concatenate the hardware-unique salt value with the public key to generate the data to be verified.
[0168] S504. Use a hash algorithm to transform the data to be verified in order to generate the target verification data.
[0169] S505. Sign and decrypt the target anti-counterfeiting identification code based on the public key to obtain the initial anti-counterfeiting identification code.
[0170] S506. Compare the target verification data with the initial anti-counterfeiting identification code.
[0171] S507. In response to the successful verification of the target anti-counterfeiting identification code, the software startup process is executed.
[0172] S508, in response to the failure of the target anti-counterfeiting identification code verification, terminates the software startup process and triggers the abnormal status indicator light of the hardware device.
[0173] It should be noted that the technical effects of the verification method steps for the anti-counterfeiting identification code in this embodiment have been described in the verification method for the anti-counterfeiting identification code provided in the above embodiments, and will not be repeated here.
[0174] The method for generating anti-counterfeiting identification codes provided in this application generates a unique hardware identification code using a random number algorithm during the hardware device manufacturing stage. This code is then generated using encryption technology, and reliably stored in the hardware device's one-time programmable storage area using electronic fuse technology, providing the hardware device with an unalterable identity. The method for verifying the anti-counterfeiting identification code provided in this application acquires the target anti-counterfeiting identification code from the hardware device during the software startup stage. By comparing the generated data with the decrypted data, the authenticity and integrity of the target anti-counterfeiting identification code are determined. Only after successful verification will the software start. This achieves a closed-loop anti-counterfeiting management system combining hardware and software, ensuring that the hardware device operates within a legitimate usage system. It is evident that from the generation and storage of the target anti-counterfeiting identification code during the hardware device manufacturing stage to the verification of the target anti-counterfeiting identification code during the software startup stage, a complete anti-counterfeiting chain is formed. This not only prevents the hardware device itself from being counterfeited but also further restricts the use of counterfeit hardware devices through software verification, achieving comprehensive and multi-layered anti-counterfeiting management and improving the effectiveness of anti-counterfeiting measures.
[0175] Furthermore, a combination of hash algorithms and asymmetric encryption algorithms is used to verify the target anti-counterfeiting identification code. By comparing the generated target verification data with the decrypted initial anti-counterfeiting identification code, the legitimacy of the hardware device is determined, ensuring that only legitimate devices can start the software, thus forming a hardware-software combined anti-counterfeiting mechanism. The hash algorithm is applied twice, from generating a unique salt value for the hardware to forming the target verification data, ensuring the uniqueness and accuracy of the verification data, reducing the probability of false positives and false negatives, and making the anti-counterfeiting verification results more accurate.
[0176] Figure 6 This is a schematic diagram of the structure of an anti-counterfeiting identification code generation device provided in an embodiment of this application, as shown below. Figure 6 As shown, the anti-counterfeiting identification code generation device provided in this embodiment is located in an electronic device. The anti-counterfeiting identification code generation device provided in this embodiment is applied in the production stage of hardware equipment. The anti-counterfeiting identification code generation device 60 provided in this embodiment includes: a generation module 61 and a writing module 62.
[0177] Specifically, the generation module 61 is used to generate a unique hardware identification code based on a random number algorithm; the generation module 61 is also used to encrypt the unique hardware identification code based on the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code; the writing module 62 is used to write the unique hardware identification code and the target anti-counterfeiting identification code to the one-time programming storage area of the hardware device.
[0178] Optionally, the generation module 61, when encrypting the hardware unique identifier based on the public and private keys of the digital asset owner to generate the target anti-counterfeiting identifier, is specifically used for: generating data to be signed based on the hardware unique identifier and the public key; converting the data to be signed using a hash algorithm to generate an initial anti-counterfeiting identifier; and digitally signing the initial anti-counterfeiting identifier based on the private key to generate the target anti-counterfeiting identifier.
[0179] Optionally, the generation module 61, when generating data to be signed based on the hardware unique identifier and the public key, is specifically used to: convert the hardware unique identifier based on a hash algorithm to generate a hardware unique salt value; and concatenate the hardware unique salt value with the public key to generate the data to be signed.
[0180] Optionally, when writing the hardware unique identifier and the target anti-counterfeiting identifier to the one-time programming storage area, the writing module 62 is specifically used to: write the hardware unique identifier to the first storage area using electronic fuse technology; and write the target anti-counterfeiting identifier to the second storage area using electronic fuse technology.
[0181] Figure 7 This is a schematic diagram of the structure of a verification device for anti-counterfeiting identification codes provided in an embodiment of this application, as shown below. Figure 7 As shown, the anti-counterfeiting identification code verification device provided in this embodiment is located in an electronic device. The anti-counterfeiting identification code verification device provided in this embodiment is applied during the software startup phase. The anti-counterfeiting identification code verification device 70 provided in this embodiment includes: an acquisition module 71, a verification module 72, and an execution module 73.
[0182] Specifically, the acquisition module 71 is used to acquire the hardware unique identifier and the target anti-counterfeiting identifier written in the one-time programming storage area of the hardware device in response to receiving the software start instruction; the verification module 72 is used to verify the target anti-counterfeiting identifier based on the acquired hardware unique identifier and the public and private keys of the digital asset owner; and the execution module 73 is used to execute the software start process in response to the target anti-counterfeiting identifier being verified.
[0183] Optionally, when verifying the target anti-counterfeiting identification code based on the acquired hardware unique identifier and the public and private keys of the digital asset owner, the verification module 72 is specifically used for: generating data to be verified based on the hardware unique identifier and the public key; converting the data to be verified using a hash algorithm to generate target verification data; signing and decrypting the target anti-counterfeiting identification code based on the public key to obtain the initial anti-counterfeiting identification code; and comparing the target verification data with the initial anti-counterfeiting identification code to verify the target anti-counterfeiting identification code.
[0184] Optionally, the verification module 72, when generating data to be verified based on the hardware unique identifier and the public key, is specifically used to: convert the hardware unique identifier based on a hash algorithm to generate a hardware unique salt value; and concatenate the hardware unique salt value with the public key to generate the data to be verified.
[0185] Optionally, the execution module 73 is also configured to: terminate the software startup process in response to the failure of the target anti-counterfeiting identification code verification, and trigger the abnormal status indicator light of the hardware device.
[0186] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, as shown below. Figure 8 As shown, the electronic device 80 provided in this embodiment includes a processor 81 and a memory 82 that is communicatively connected to the processor.
[0187] The memory 82 stores computer execution instructions; the processor 81 executes the computer execution instructions stored in the memory 82 to implement the method provided in any of the above embodiments.
[0188] The program may include program code, which includes computer-executable instructions. Memory 82 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.
[0189] In this embodiment, the memory 82 and the processor 81 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single straight line, but this does not mean that there is only one bus or one type of bus.
[0190] This application also provides a computer-readable storage medium, including computer-executable instructions stored in the computer-readable storage medium, which, when executed by a processor, are used to implement the method provided in any of the above embodiments.
[0191] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in any of the above embodiments.
[0192] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0193] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0194] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0195] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0196] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0197] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0198] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0199] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0200] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0201] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for generating an anti-counterfeiting identification code, characterized in that, Applied to the production stage of hardware devices, including: A unique hardware identification code is generated based on a random number algorithm. The unique identification code of the hardware is encrypted using the public and private keys of the digital asset owner to generate a target anti-counterfeiting identification code. Write the unique hardware identifier and the target anti-counterfeiting identifier into the one-time programming storage area of the hardware device.
2. The method according to claim 1, characterized in that, The method of encrypting the unique hardware identifier based on the public and private keys of the digital asset owner to generate a target anti-counterfeiting identifier includes: Generate data to be signed based on the hardware unique identifier and the public key; The data to be signed is converted using a hash algorithm to generate an initial anti-counterfeiting identification code; The initial anti-counterfeiting identification code is digitally signed based on the private key to generate the target anti-counterfeiting identification code.
3. The method according to claim 2, characterized in that, The step of generating data to be signed based on the hardware unique identifier and the public key includes: The hardware unique identifier is converted based on a hash algorithm to generate a hardware unique salt value; The hardware-unique salt value is concatenated with the public key to generate the data to be signed.
4. The method according to claim 1, characterized in that, The step of writing the hardware unique identification code and the target anti-counterfeiting identification code into the one-time programming storage area of the hardware device includes: The unique hardware identification code is written into the first storage area using electronic fuse technology; and the target anti-counterfeiting identification code is written into the second storage area using electronic fuse technology.
5. A method for verifying an anti-counterfeiting identification code, characterized in that, Applied to the software startup phase, including: In response to receiving a software startup command, the system obtains the unique hardware identifier and the target anti-counterfeiting identifier written in the one-time programming storage area of the hardware device. The target anti-counterfeiting identification code is verified based on the obtained unique hardware identification code and the public and private keys of the digital asset owner. Upon successful verification of the target anti-counterfeiting identification code, the software startup process is executed.
6. The method according to claim 5, characterized in that, The verification of the target anti-counterfeiting identification code based on the acquired unique hardware identifier and the public and private keys of the digital asset owner includes: Data to be verified is generated based on the hardware unique identifier and the public key; The data to be verified is transformed using a hash algorithm to generate the target verification data; The target anti-counterfeiting identification code is signed and decrypted based on the public key to obtain the initial anti-counterfeiting identification code; The target verification data is compared with the initial anti-counterfeiting identification code to verify the target anti-counterfeiting identification code.
7. The method according to claim 6, characterized in that, The step of generating verification data based on the hardware unique identifier and the public key includes: The hardware unique identifier is converted based on a hash algorithm to generate a hardware unique salt value; The hardware-unique salt value is concatenated with the public key to generate the data to be verified.
8. The method according to claim 5, characterized in that, Also includes: In response to the failure of the target anti-counterfeiting identification code verification, the software startup process is terminated, and the abnormal status indicator light of the hardware device is triggered.
9. A device for generating an anti-counterfeiting identification code, characterized in that, Applied to the production stage of hardware devices, including: The generation module is used to generate a unique hardware identifier based on a random number algorithm. The generation module is also used to encrypt the unique identification code of the hardware based on the public and private keys of the digital asset owner in order to generate the target anti-counterfeiting identification code. The writing module is used to write the hardware unique identification code and the target anti-counterfeiting identification code into the one-time programming storage area of the hardware device.
10. A verification device for an anti-counterfeiting identification code, characterized in that, Applied to the software startup phase, including: The acquisition module is used to acquire the unique hardware identification code and the target anti-counterfeiting identification code written in the one-time programming storage area of the hardware device in response to the received software start command. The verification module is used to verify the target anti-counterfeiting identification code based on the acquired hardware unique identification code and the public and private keys of the digital asset owner; The execution module is used to execute the software startup process in response to the successful verification of the target anti-counterfeiting identification code.
11. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-4 or 5-8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-4 or 5-8.
13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-4 or 5-8.
