Distributed software security protection method and system based on PUF (Physical Unclonable Function)
By employing a PUF-based distributed software security protection method, which utilizes hardware features and PUF stimulus response values for layered encryption and dynamic key management, the problems of piracy, tampering, and reverse engineering in software protection are solved. This achieves efficient and accurate multi-platform protection, adapting to distributed deployment and operating environments.
Patent Information
- Application Number
- CN202511574322.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-01-23
AI Technical Summary
Existing software protection technologies face threats such as piracy, tampering, and reverse engineering, and conventional methods are difficult to provide effective protection without affecting product performance.
A distributed software security protection method based on PUF is adopted. By adding hardware features and PUF stimulus response values to the runtime environment, selecting the operating system and protection mode, performing layered encryption, and performing secondary encryption during program runtime, dynamic key generation and hardware fingerprint recognition are realized by combining a key management system.
It improves the software's long-term resistance to cracking, reduces the cost of invalid encryption, ensures the accuracy and efficiency of the encryption process, adapts to multiple platforms and program formats, is suitable for distributed deployment, and resists static analysis and dynamic debugging.
Smart Images

Figure CN121389158A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of asset protection technology, and in particular to a distributed software security protection method and system based on PUF. Background Technology
[0002] As various network platforms become increasingly intelligent and systematic, software complexity is also rising, making the security of software intellectual property rights paramount. Embedded systems used in industrial applications typically require software intellectual property protection measures that are simple in structure yet inherently more robust in performance. The premise of protecting software is that it should not affect the normal operation of the product; that is, the product's real-time performance, startup time, restart time, weight, size, and reliability must all be guaranteed.
[0003] Common software protection methods mainly include software-based protection and hardware-software combined protection. Among software-based protection methods, the most mainstream is software packing technology. This technology attaches a program responsible for protecting the software from illegal modification or decompilation to the original protected program. This program executes before the original program, decrypts the original program during execution, and returns control back to the original program.
[0004] Software-based protection technologies, which combine hardware and software, require hardware support. Their protection strategies primarily include authentication, data encryption, access control, key generation, unique serial numbers, reliable data transmission, and hardware identification. A common form of protection is the dongle, typically installed in hardware circuitry on serial, parallel, or USB interfaces. It contains built-in drivers and encryption programs, exchanging data and running key detection programs with the connected computer to determine user legitimacy. Encryption chips, on the other hand, utilize manufacturing variations in their internal logic gates or wiring to map one set of binary codes (input) to another set of binary codes (output). The unclonability, uniqueness, reliability, and security of encryption chips have made them the optimal hardware implementation solution for encryption locks.
[0005] Currently, software products are all written in plain text and are mainly threatened by three types of threats: (1) Piracy, where software is illegally copied, used, and resold without authorization to make huge profits; (2) Tampering, where software copyright verification information is illegally altered without authorization, the software copyright verification function is removed, or the software copyright is claimed as one's own, so as to achieve the purpose of arbitrary use; (3) Reverse engineering, where important information such as core algorithms is obtained through decompilation and other technical means, and the purpose of quickly surpassing them is achieved through simple improvements.
[0006] Therefore, it is necessary to improve one or more of the problems existing in the above-mentioned related technical solutions.
[0007] It should be noted that this section is intended to provide background or context for the technical solutions of this disclosure as set forth in the claims. The description herein does not constitute an admission that it is prior art simply because it is included in this section. Summary of the Invention
[0008] The purpose of this invention is to provide a distributed software security protection method and system based on PUF, thereby overcoming, to at least a certain extent, one or more problems caused by the limitations and defects of related technologies.
[0009] This invention first provides a distributed software security protection method based on PUF, comprising: S1, add the hardware characteristics of the operating environment of the program to be protected and the PUF stimulus response value, select the operating system according to the program to be protected, upload the program to be protected, select the protection mode and protection algorithm; S2, run the environmental hardware characteristics and PUF stimulus response values; S3, verify the compatibility between the program to be protected and the selected operating system, and start the protection process for the matching program to be protected; S4, the program to be protected is encrypted once according to the selected protection mode and protection algorithm; S5 compresses the encrypted program to be protected and generates a shell program. After the shell program finishes running, it obtains a new key through PUF to complete the second encryption.
[0010] In this invention, the operating system includes at least one of Windows, Linux, VxWorks, Tianmai, and DSP, and the format of the program to be protected matches the corresponding operating system.
[0011] In this invention, in S1, the protection mode includes a pure software encryption mode and a combined software and hardware encryption mode; the protection algorithm includes a symmetric encryption algorithm, an asymmetric encryption algorithm, and a compression algorithm, wherein the symmetric encryption algorithm is selected from at least one of DES, 3DES, AES, and RC4, the asymmetric encryption algorithm is selected from at least one of ECC and RSA, and the compression algorithm is selected from at least one of LZMA, LZO, UCL, and ZSTD.
[0012] In this invention, in S4, the encryption is a layered encryption, specifically: first, the function segment of the program to be protected is encrypted, then the specified memory segment of the program to be protected is encrypted, and finally the entire program to be protected is encrypted. In the layered encryption process, a selected symmetric encryption algorithm is used to encrypt the data, and a selected asymmetric encryption algorithm is used to encrypt and protect the key used for symmetric encryption.
[0013] In this invention, the protection method further includes: S6, the shell program after secondary encryption, automatically unpacks, decrypts, decompresses, and starts running at runtime.
[0014] In this invention, S6 includes: S61, the shell program interacts with the PUF, inputting stimulus to obtain response values; S62, the shell program decompresses; S63, decryption of the shell program segment and decryption of the entire program; S64, the program resumes and acquires execution rights to begin execution; S65 executes and decrypts functions based on the timing of function calls during program execution.
[0015] The present invention further provides a distributed software security protection system based on PUF, comprising: The key management system is used for user registration and login. After a user registers and logs into the key management system, the system adds the hardware characteristics of the runtime environment and the PUF stimulus response value of the program to be protected. The system then selects an operating system based on the program to be protected, uploads the program, selects a protection mode and a protection algorithm, and runs the program based on the hardware characteristics of the runtime environment and the PUF stimulus response value. The operating system is used to encrypt the program to be encrypted according to the selected protection mode and protection algorithm; to compress and pack the program to be encrypted to generate a shell program; and to obtain a new key through PUF after the shell program finishes running to complete the second encryption. The PUF encryption board is used to provide PUF stimulus response values and keys. It connects to the operating system through an interface, and the data of the PUF encryption board is synchronized to the key management system through system interaction.
[0016] In this invention, the operating system includes at least one of Windows, Linux, VxWorks, Tianmai, and DSP.
[0017] In this invention, the operating system supports initial key verification, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption operation based on the PUF encryption chip.
[0018] The technical solution provided by this invention may include the following beneficial effects: This invention discloses a distributed software security protection method and system based on PUF, which provides multiple protection modes and protection algorithms by configuring the operating environment, adapting to multiple platforms and program formats, meeting the protection needs in different scenarios, and adapting to distributed deployment; by verifying matching, it avoids encryption failure or abnormal operation, ensures the accuracy of the protection process, and reduces the cost of invalid encryption; through primary encryption and secondary encryption, it resists static analysis and dynamic debugging, and greatly improves the long-term anti-cracking capability. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0020] Figure 1 A flowchart illustrating a PUF-based distributed software security protection method in an exemplary embodiment of this disclosure is shown. Figure 2 This diagram illustrates the composition of a PUF-based distributed software security protection system in an exemplary embodiment of this disclosure. Figure 3 This diagram illustrates the internal interconnections of a PUF-based distributed software security protection system in an exemplary embodiment of this disclosure. Figure 4 This diagram illustrates the static relationship between the key management system, the front-end module of the PUF-based distributed software security protection system in an exemplary embodiment of this disclosure. Figure 5 This diagram illustrates the static relationship between Windows encryption platform modules in an exemplary embodiment of this disclosure. Figure 6 This diagram illustrates the static relationship between Linux encryption platform modules in an exemplary embodiment of this disclosure. Figure 7 This diagram illustrates the static relationship between the VxWorks encryption platform modules in an exemplary embodiment of this disclosure. Figure 8 This diagram illustrates the static relationship between the DSP encryption platform modules in an exemplary embodiment of this disclosure. Figure 9 This diagram illustrates the static relationship between the Tianmai platform modules in an exemplary embodiment of this disclosure. Figure 10 This diagram illustrates the interaction process between the backend program and the frontend interface in an exemplary embodiment of this disclosure. Figure 11 This diagram illustrates a flowchart of the function encryption process in an exemplary embodiment of this disclosure. Figure 12This diagram illustrates a segment encryption process in an exemplary embodiment of this disclosure. Figure 13 This diagram illustrates the overall encryption process in an exemplary embodiment of this disclosure. Figure 14 This diagram illustrates the overall compression flowchart of the program in an exemplary embodiment of this disclosure; Figure 15 This diagram illustrates the program decompression flowchart in an exemplary embodiment of this disclosure; Figure 16 This diagram illustrates the decryption flowchart of the encrypted program in an exemplary embodiment of this disclosure. Figure 17 This diagram illustrates the secondary encryption process in an exemplary embodiment of this disclosure. Figure 18 A flowchart illustrating the operation monitoring process in an exemplary embodiment of this disclosure is shown. Detailed Implementation
[0021] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0022] Furthermore, the accompanying drawings are merely illustrative diagrams of embodiments of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0023] This example implementation first provides a distributed software security protection method based on PUF. Please refer to [link / reference]. Figure 1 This method may include: S1-S5. Specifically: S1, add the hardware characteristics of the operating environment of the program to be protected and the PUF stimulus response value, select the operating system according to the program to be protected, upload the program to be protected, and select the protection mode and protection algorithm.
[0024] The operating system includes at least one of Windows, Linux, VxWorks, Tianmai, and DSP, and the format of the program to be protected matches the corresponding operating system.
[0025] The protection modes include pure software encryption mode and hardware-software combined encryption mode; the protection algorithms include symmetric encryption algorithms, asymmetric encryption algorithms and compression algorithms, wherein the symmetric encryption algorithm is selected from at least one of DES, 3DES, AES and RC4, the asymmetric encryption algorithm is selected from at least one of ECC and RSA, and the compression algorithm is selected from at least one of LZMA, LZO, UCL and ZSTD.
[0026] S2, run the environment hardware characteristics and PUF stimulus response values.
[0027] S3, verify the compatibility between the program to be protected and the selected operating system, and start the protection process for the matching program to be protected.
[0028] S4. The program to be protected is encrypted once according to the selected protection mode and protection algorithm.
[0029] The encryption process is layered encryption, which involves: first, encrypting the function segments of the program to be protected; then, encrypting the specified memory segments of the program to be protected; and finally, encrypting the entire program to be protected. In the layered encryption process, a selected symmetric encryption algorithm is used to encrypt the data, while a selected asymmetric encryption algorithm is used to encrypt and protect the key used for symmetric encryption.
[0030] S5 compresses the encrypted program to be protected and generates a shell program. After the shell program finishes running, it obtains a new key through PUF to complete the second encryption.
[0031] In this embodiment, by configuring the operating environment, multiple protection modes and protection algorithms are provided to adapt to multiple platforms and program formats, meet the protection needs in different scenarios, and adapt to distributed deployment; by verifying matching, encryption failure or abnormal operation is avoided, ensuring the accuracy of the protection process and reducing the cost of invalid encryption; by using primary and secondary encryption, static analysis and dynamic debugging are resisted, and the long-term anti-cracking capability is greatly improved.
[0032] Based on the above embodiments, the protection method further includes: S6, the shell program after secondary encryption, automatically unpacks, decrypts, decompresses, and starts running at runtime.
[0033] Furthermore, S6 specifically includes: S61, the shell program interacts with the PUF, inputting stimulus to obtain response values; S62, the shell program decompresses; S63, decryption of the shell program segment and decryption of the entire program; S64, the program resumes and acquires execution rights to begin execution; S65 executes and decrypts functions based on the timing of function calls during program execution.
[0034] The compressed shell program integrates "automatic unpacking, decryption, and decompression" logic, ensuring that the program is encrypted during storage / transmission (to prevent theft) and can run normally in a legitimate environment without manual intervention, balancing protection and ease of use; at the same time, compression can optimize the program size, so that the efficiency of the encrypted software decreases by no more than 1%, ensuring that the running performance is not significantly affected.
[0035] Please refer to Figure 2 and Figure 3 This example implementation further provides a PUF-based distributed software security protection system, including: The key management system is used for user registration and login. After a user registers and logs into the key management system, the system adds the hardware characteristics of the runtime environment and the PUF stimulus response value of the program to be protected. The system then selects an operating system based on the program to be protected, uploads the program, selects a protection mode and a protection algorithm, and runs the program based on the hardware characteristics of the runtime environment and the PUF stimulus response value. The operating system is used to encrypt the program to be encrypted according to the selected protection mode and protection algorithm; to compress and pack the program to be encrypted to generate a shell program; and to obtain a new key through PUF after the shell program finishes running to complete the second encryption. The PUF encryption board is used to provide PUF stimulus response values and keys. It connects to the operating system through an interface, and the data of the PUF encryption board is synchronized to the key management system through system interaction.
[0036] Specifically, the key management system is used to implement unified management functions, database table design, data structure design, front-end human-machine interface design, and front-end and five types of back-end interactive communication logic design, conforming to the GJB5000B process requirements for "PUF chip - encryption key - software product - software-related device product tree". It also achieves encrypted protection for the entire lifecycle of device software through a combination of hardware and software methods. Please refer to [reference needed]. Figure 4 The key management system mainly includes: user login and registration module, software protection module, software upgrade protection module, software configuration information management module, PUF information module, component information module, product information module, customer information module, user information module, protection configuration template information module, log information module, parameter setting module, etc.
[0037] The Windows encryption platform system uses mainstream encryption algorithms to compress, encrypt, and pack PE files and .NET programs. The encryption process includes three layers of symmetric encryption for the executable program and asymmetric encryption for the encryption key. After compression, encryption, and packing, the program can automatically unpack, decrypt, decompress, and start automatically at runtime. After each run, the protected software automatically obtains a dynamically generated true random key from the PUF chip uniquely bound to the software and uses this key to perform secondary encryption on the executable program. It supports initial key verification based on the PUF encryption chip, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption execution.
[0038] This Linux encryption platform system supports compression, encryption, and packing of ELF programs under both Linux-x86 and Linux-arm architectures. The encryption process includes three layers of symmetric encryption for the executable program and asymmetric encryption of the encryption key. After compression, encryption, and packing, the program can automatically unpack, decrypt, decompress, and restart at runtime. After each run, the protected software automatically obtains a dynamically generated true random key from the PUF chip uniquely bound to the software and uses this key to perform secondary encryption on the executable program. It supports initial key verification based on the PUF encryption chip, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption execution.
[0039] The VxWorks encryption platform system supports compression, encryption, and packing of .out executable programs on the PowerPC (VxWorks) platform. The encryption process includes three layers of symmetric encryption for the executable program and asymmetric encryption of the encryption key. After compression, encryption, and packing, the program can automatically unpack, decrypt, decompress, and automatically start running at runtime. After each run, the protected software automatically obtains a dynamically generated true random key from the PUF chip uniquely bound to the software and uses this key to perform secondary encryption on the executable program. It supports initial key verification based on the PUF encryption chip, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption execution.
[0040] The Tianmai encryption platform system supports compression, encryption, and packing of .bin executable programs on the Phytium (Tianmai) platform. The encryption process includes three layers of symmetric encryption for the executable program and asymmetric encryption of the encryption key. After compression, encryption, and packing, the program can automatically unpack, decrypt, decompress, and start automatically at runtime. After each run, the protected software automatically obtains a dynamically generated true random key from the PUF chip uniquely bound to the software and uses this key to perform secondary encryption on the executable program. It supports initial key verification based on the PUF encryption chip, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption execution.
[0041] The DSP encryption platform system supports compression, encryption, and packing of .out executable programs on DSPs. The encryption process includes three layers of symmetric encryption for the executable program and asymmetric encryption of the encryption key. After compression, encryption, and packing, the program can automatically unpack, decrypt, decompress, and automatically start running at runtime. After each run, the protected software automatically obtains a dynamically generated true random key from the PUF chip uniquely bound to the software and uses this key to perform secondary encryption on the executable program. It supports initial key verification based on the PUF encryption chip, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption.
[0042] The above five operating systems (Windows, Linux, VxWorks, DSP, and Tianmai) can execute seven file encryption integration methods, four symmetric encryption algorithms (DES, 3DES, AES, RC4) integration methods, two asymmetric encryption algorithms (ECC, RSA) integration methods, four compression algorithms (LZMA, LZO, UCL, ZSTD) integration methods, and provide three-layer encryption for executable programs: function encryption, segment encryption, and overall encryption.
[0043] The PUF-based distributed software security protection system of this application realizes independent and parallel encryption / decryption of application software of various operating systems in the local area network; realizes the separation of front-end and back-end of database, server and human-computer interaction interface and distributed deployment and management, thereby improving the system's anti-interference and maintainability.
[0044] The interactive working method of the front-end key management system includes the following steps; Step 1: Register an account and log in; Step 2: Add the hardware characteristics of the operating environment of the program that needs protection, and the PUF stimulus response value; Step 3: Select the operating system and architecture on which the program to be protected works; Step 4: Upload the executable program that needs protection; Step 5: Select protection mode: software encryption or a combination of software and hardware encryption; Step 6: Select the protection algorithm to use: symmetric encryption algorithm, compression algorithm, asymmetric encryption algorithm, whether to use dynamic encryption, and whether to use obfuscation; Step 7: Select the hardware characteristics of the operating environment and the PUF stimulus response value; Step 8: Verify that the executable program architecture matches the selected operating system and platform; Step 9: If Step 8 is completed normally, the corresponding software protection process will be started according to the currently protected program. If Step 8 is not completed normally, a prompt message will be given and the process will be terminated.
[0045] The encryption of executable programs across five operating system encryption platforms includes the following steps: Step 1: Front-end interaction; Step 2: Encrypt program functions; Step 3: Encrypt the program segment; Step 4: Encrypt the entire program; Step 5: Program compression.
[0046] After front-end interaction, the initial key is obtained, the executable program is loaded into memory and parsed, the symbol table is traversed to obtain functions that meet the encryption conditions, the functions are encrypted, and then the program segment encryption and overall encryption are completed.
[0047] Please refer to Figure 16 The self-decryption operation of an encrypted program mainly includes the following steps: Step 1: The shell program interacts with the PUF, inputting stimuli to obtain response values; Step 2: Decompress the program; Step 3: Decrypt the program segment; Step 4: Decrypt the entire program; Step 5: The protected program is restored and acquires execution rights to begin execution; Step 6: Decrypt the function while it is running, based on the timing of the function call.
[0048] The program interacts with the hardware PUF to obtain a response value, which is used as a key for program encryption. The background program monitors the exit of the protected program. After exiting, it obtains a new response from the PUF and uses it as a new key for secondary encryption.
[0049] The interface design of each module of the PUF-based distributed software security protection system in this application is shown in Table 1: Table 1 Internal Interface Composition
[0050] The design of the front-end key management system will be described below.
[0051] Please refer to Figure 4 The front-end key management system includes modules such as login, registration, protection, software configuration management, PUF, component management, PUF-CPU component-product instance-product mapping, customer-user management, protection configuration, runtime environment feature configuration, and logs. The key management system conforms to the GJB5000B process requirements for unified management of the "PUF chip-encryption key-software product-software-device product tree," including database table design, data structure design, front-end human-computer interaction interface design, and front-end communication logic with five back-end systems.
[0052] The specific design of the operating system will be explained below.
[0053] Figures 5-9 The diagram shows the static relationship between the Windows, Linux, VxWorks, DSP, and Tianmai encryption platform systems, in that order. The detailed design of the Linux encryption platform system is explained using this example.
[0054] a) The front-end and back-end interaction interface is responsible for sending messages from the front-end and receiving information from the back-end. The entry function is shown in Table 2.
[0055] Table 2 Front-end and back-end interaction entry function table
[0056] (b) The encryption module is responsible for program key acquisition and program encryption. The hardware-software hybrid scheme combines the hardware characteristics of Physically Unclonable Functions (PUFs) with software algorithms. It uses a purely software-based approach to randomly generate stimuli that interact with the PUF device to produce a response. Based on the response, the required byte length for different encryption algorithms is determined to form the key. The asymmetric encryption algorithm key is generated using the built-in key generation algorithm corresponding to the algorithm standard. The asymmetric key is generated using a random number generator, which performs permutation and calculations on the generated random numbers to generate a private key. The public key is then calculated from the private key. The PUF responds to stimuli based on its unique physical characteristics, which stem from minute differences in the hardware manufacturing process, providing each PUF device with a unique identifier.
[0057] This application innovatively proposes a layered encryption protection method for various executable programs. It designs layered encryption protection schemes such as overall encryption, segment encryption, and function encryption, achieving encryption for various programs including EXE, ELF, OUT, and BIN. Without affecting runtime efficiency, the executable program cannot be dynamically debugged or statically analyzed, exhibiting strong compatibility and security. The system simultaneously supports pure software encryption and a combination of hardware and software encryption protection.
[0058] The entry function for the function encryption program is shown in Table 3.
[0059] Table 3 Encryption Entry Function
[0060] The entry function of the command scheduling module is shown in Table 4.
[0061] Table 4 Entry functions of the command scheduling module
[0062] The entry function of the overall encryption module is shown in Table 5 (example).
[0063] Table 5 Entry functions of the command scheduling module
[0064] c) The decryption module is responsible for decrypting the input program file. The input and output are shown in Table 6.
[0065] Table 6 Entry function of the function decryption module
[0066] The flowchart of function encryption is as follows: Figure 11 As shown, the flowchart of segment encryption is as follows: Figure 12 As shown, the overall encryption process flowchart is as follows: Figure 13 As shown.
[0067] The shell program's secondary encryption module is mainly responsible for updating the external encryption key after program execution, re-encrypting the executable file, and then updating the original executable file. Its main structure is as follows: Figure 17 As shown.
[0068] The overall compression flowchart is as follows: Figure 14 As shown, the program decompression process flowchart is as follows: Figure 15 As shown, the program decryption flowchart is as follows: Figure 16 As shown.
[0069] d) The shell program's secondary encryption is responsible for performing secondary encryption on the protected program. The shell program's secondary encryption module is mainly responsible for updating the external encryption key after program execution, re-encrypting the executable file, and then updating the original executable file. Its main structure is as follows: Figure 17 As shown.
[0070] e) The runtime monitoring module is responsible for monitoring whether the program enters a trap point. The input and output (entry function of the runtime monitoring module) are shown in Table 7 below.
[0071] Table 7 Entry Functions of Command Scheduling Module
[0072] The monitoring module monitors the child processes based on the input parameters, determines their running status, and then controls their execution. Its main process is as follows: Figure 18 As shown. After the monitoring starts running, it outputs trap point information and encryption function information, initializes memory allocation and the thread list, and then checks whether there are any running threads. If so, it listens for events. If an event occurs, it triggers a thread creation event, processes the created thread, and then terminates. If it is a thread exit event, it processes the thread exit and then terminates; if it is an exec event, it processes the thread and then terminates; if it enters a trap point, it decrypts the function and then terminates.
[0073] In summary, this invention discloses a distributed software security protection system ("Luban Lock") based on PUF, which can solve the problems of software piracy, unauthorized decryption, unauthorized installation, and unauthorized tampering, belonging to the field of software security encryption. It can be applied to desktop / embedded software core algorithm protection, software copyright protection, and communication data security protection, etc. It has the following beneficial effects: a) Multi-faceted protection of the core algorithm from being deciphered: Implements three-layer deep encryption for the executable program to prevent static analysis and achieve runtime protection; performs well in embedded environments, with the software running efficiency decreasing by no more than 1% after encryption.
[0074] b) Secure boot mechanism achieves comprehensive copyright protection: extracts the holographic fingerprint of the software runtime environment and binds it uniquely to the software; adds a chip-level dynamic key generation module based on PUF; software restart delay does not exceed 1%.
[0075] c) The encryption engine is highly scalable: it has multiple built-in mainstream encryption and compression algorithms.
[0076] d) Distributed deployment, supporting multi-platform, multi-system, and multi-language software protection: Supports mainstream hardware environments such as x86, PowerPC, ARM, and DSP; adapts to mainstream OSes such as Windows, Vxworks, Linux, and Tianmai; supports multiple program formats: exe, elf, out, and bin; supports languages such as C, C++, .NET, and JAVA.
[0077] e) Develop a key and software product management system that meets the process requirements of GJB5000B, realize unified management of "PUF chip - encryption key - software product - software to which the device product tree belongs", realize batch generation and management of PUF "stimulus-response pairs" and use the response pair software executable program for dynamic encryption processing, help realize support for a) and b), and realize encryption protection for the entire life cycle of device software.
[0078] f) The software can be upgraded remotely. When the product software needs to be upgraded, the system can achieve local response encryption based on the support of the key management system, and only store the PUF stimulus. The corresponding product PUF in the field can be directly decrypted.
[0079] g) Based on the development of this system, a standard of AVIC Group, "General Requirements for Software Security Protection of XX System", has been released.
[0080] It should be noted that although several modules of the system for executing actions are mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules for embodiment. 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 achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without any inventive effort.
[0081] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A distributed software security protection method based on PUF, characterized in that, include: S1, add the hardware characteristics of the operating environment of the program to be protected and the PUF stimulus response value, select the operating system according to the program to be protected, and upload the program to be protected; Select the protection mode and protection algorithm; S2, run the environmental hardware characteristics and PUF stimulus response values; S3, verify the compatibility between the program to be protected and the selected operating system, and start the protection process for the matching program to be protected; S4, the program to be protected is encrypted once according to the selected protection mode and protection algorithm; S5 compresses the encrypted program to be protected and generates a shell program. After the shell program finishes running, it obtains a new key through PUF to complete the second encryption.
2. The distributed software security protection method based on PUF according to claim 1, characterized in that, In S1, the operating system includes at least one of Windows, Linux, VxWorks, Tianmai, and DSP, and the format of the program to be protected matches the corresponding operating system.
3. The PUF-based distributed software security protection method according to claim 1, characterized in that, In S1, the protection mode includes a pure software encryption mode and a combined software and hardware encryption mode; the protection algorithm includes a symmetric encryption algorithm, an asymmetric encryption algorithm, and a compression algorithm, wherein the symmetric encryption algorithm is selected from at least one of DES, 3DES, AES, and RC4, the asymmetric encryption algorithm is selected from at least one of ECC and RSA, and the compression algorithm is selected from at least one of LZMA, LZO, UCL, and ZSTD.
4. The PUF-based distributed software security protection method according to claim 1, characterized in that, In S4, the encryption is a layered encryption, and the specific process is as follows: first, the function segment of the program to be protected is encrypted, then the specified memory segment of the program to be protected is encrypted, and finally the entire program to be protected is encrypted. In the layered encryption process, the selected symmetric encryption algorithm is used to encrypt the data, and the selected asymmetric encryption algorithm is used to encrypt and protect the key used for symmetric encryption.
5. The PUF-based distributed software security protection method according to claim 1, characterized in that, The protection method also includes: S6, the shell program after secondary encryption, automatically unpacks, decrypts, decompresses, and starts running at runtime.
6. The distributed software security protection method based on PUF according to claim 5, characterized in that, S6 include: S61, the shell program interacts with the PUF, inputting stimulus to obtain response values; S62, the shell program decompresses; S63, decryption of the shell program segment and decryption of the entire program; S64, the program resumes and acquires execution rights to begin execution; S65 executes and decrypts functions based on the timing of function calls during program execution.
7. A distributed software security protection system based on PUF, characterized in that, include: The key management system is used for user registration and login. After a user registers and logs into the key management system, the system adds the hardware characteristics of the runtime environment and the PUF stimulus response value of the program to be protected. The system then selects an operating system based on the program to be protected, uploads the program, selects a protection mode and a protection algorithm, and runs the program based on the hardware characteristics of the runtime environment and the PUF stimulus response value. The operating system is used to encrypt the program to be encrypted according to the selected protection mode and protection algorithm; to compress and pack the program to be encrypted to generate a shell program; and to obtain a new key through PUF after the shell program finishes running to complete the second encryption. The PUF encryption board is used to provide PUF stimulus response values and keys. It connects to the operating system through an interface, and the data of the PUF encryption board is synchronized to the key management system through system interaction.
8. The PUF-based distributed software security protection system according to claim 7, characterized in that, The operating system includes at least one of Windows, Linux, VxWorks, Tianmai, and DSP.
9. The PUF-based distributed software security protection system according to claim 8, characterized in that, The operating system supports initial key verification, dynamic key generation, hardware fingerprint recognition, dynamic encryption / decryption control, and software self-encryption / decryption operation based on the PUF encryption chip.
