Python script encryption running lock

By encrypting and running Python scripts within the SoC chip, combined with SHA256 verification, the problem of Python scripts being easily tampered with is solved, achieving integrity and security protection during runtime, making it suitable for rapidly evolving technological fields.

CN120832656APending Publication Date: 2025-10-24周微宇
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410473748.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively protect the integrity and security of Python scripts, especially since they are easily tampered with and copied while running. Traditional encryption methods suffer from compatibility and reliability issues and are unable to adapt to the rapidly developing fields of AI and big data.

Method used

The user's core Python script is written into the SoC chip and runs encrypted. It runs in conjunction with the computer through the Python interpreter firmware on the SoC chip, ensuring that the script is not visible outside the computer and using SHA256 integrity verification to prevent tampering.

Benefits of technology

It prevents the source code of Python scripts from being leaked or tampered with while the program is running, ensuring program integrity and security, and adapting to the rapidly evolving technological field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832656A_ABST
    Figure CN120832656A_ABST
Patent Text Reader

Abstract

The invention discloses a Python script encryption running lock, and belongs to the technical field of computer software security. According to the Python script encryption running lock (110), a Python interpreter firmware (140) based on an SoC chip (150) is adopted for encrypting and running a user core Python script program (120), the Python script encryption running lock (110) is connected with a computer through a data interface (130) and cooperatively runs with a computer Python program (220), and due to the fact that the user core Python script program (120) runs on the SoC chip (150) in the lock and is not imported into the computer, it is ensured that the Python script program is complete and reliable and is prevented from being tampered and copied.
Need to check novelty before this filing date? Find Prior Art

Description

1.TECHNICAL FIELD

[0001] The application belongs to the technical field of computer software security, and particularly relates to a Python script software encryption running device. 2.BACKGROUND

[0002] Python computer script programming language is widely used in network operation and maintenance, image processing, big data, cloud computing and AI artificial intelligence and the like, but the inherent source code interpretation running mode of the script language leads to the fact that the Python script program is easy to be tampered with and copied, and the source code integrity and security cannot be ensured, which causes loss to developers and users, in order to effectively solve the above problems, the application provides a Python script encryption running lock.

[0003] The current software encryption technology mainly includes dongle key authentication technology, file reading and writing encryption technology and Python transcoding and compiling technology.

[0004] A Chinese patent with the patent number CN101996293A discloses a software authentication method based on a dongle, which comprises the following steps: binding software with a dongle; detecting whether the dongle bound with the software is accessed each time the software is started, if not, access is denied, if yes, detecting whether the use state of the dongle is a used state, if not, marking the used state in the dongle and allowing access, if yes, detecting whether the authorization information can be obtained from the host running the software, if yes, allowing access, otherwise, denying access. The technology can reliably protect binary executable files and Python interpreter software, but Python script is a source code file, users can view and modify it and normally run it on the public unencrypted Python interpreter software, so the technology cannot effectively protect Python script.

[0005] A Chinese patent with the patent number CN1725196A discloses a computer data encryption protection and read-write control method, which adopts a universal serial bus dongle or software identity authentication and sector-level read-write interception method to realize encryption of hard disk data, the process is to intercept all read-write operations by the sector-level read-write interception method, to perform encryption and decryption conversion in the encryption core, and to realize encryption and read-write control of hard disk data under the condition that the corresponding identity authentication exists. The technology can encrypt script files and effectively protect user programs in a non-running state, but since Python script must be decrypted and imported into the interpreter to be normally run, the source code can be obtained by using the public MetaPathFinder import hook function or the source code can be obtained by directly intercepting the imported file and then using uncompyle6 and the like to decompile, so the technology cannot effectively protect Python script programs.

[0006] Python transcode compilation technology converts Python scripts into C / C++ language, and then compiles them into binary programs, such as Cython, Nuitka packaging and compiling software, etc. Python script programs can be compiled into executable files, which have good protection effect. However, due to the need for complex C / C++ development tool chain support, Python programmers without C language development experience find it difficult to use. At the same time, due to the rapid development of Python language, the version is updated frequently, and the transcode compilation software technology is difficult to develop, the development cycle is long, and it is difficult to keep up with the development of Python, causing serious reliability and compatibility problems, which cannot be applied to large projects and rapidly developing AI artificial intelligence, big data and other technical fields.

[0007] With the development of integrated circuit technology, SoC (System on Chip) chip products have been widely used in industries including mobile phones, Internet of Things, AI artificial intelligence, etc. Among them, the Chinese patent No. CN111506540A discloses a hardware programmable heterogeneous multi-core system on a chip. The system on a chip combines multi-core DSP, multi-core MPU, GPU, FPGA and numerous IP components through on-chip high-speed bus interconnection network to form a hardware programmable, multi-core heterogeneous system on a chip with the characteristics of small size, low power consumption, rich IP component resources and high running efficiency, providing a hardware basis for implementing chip-level Python interpreter firmware. 3. SUMMARY

[0008] The purpose of the present application is to write user core Python script programs into the SoC chip in the lock for encrypted running, so that the external code is invisible, thereby preventing user core Python program source code from being leaked and ensuring the integrity and security of Python script programs.

[0009] The present application is implemented as follows: a Python script encrypted running lock (110) comprising a data interface (130), an SoC chip (150), a Python interpreter firmware (140), and a Python drive plug-in (230), wherein the SoC chip (150) is configured to burn the Python interpreter firmware (140), run user core Python script programs (120), and connect the Python drive plug-in (230) and the Python interpreter software (240) installed in the computer (210) through the data interface (130), to realize cooperative running with the computer Python program (220).

[0010] Since the user core Python script program (120) runs on the SoC chip (150) in the Python script encryption running lock (110) and is not imported into the computer, the existing decompilation tools, hook class functions and file interception technologies cannot obtain the user core Python script program. When the program is running, the user core Python script program (120) performs a SHA256 integrity check on the Python program (220) in the computer, thereby ensuring that the Python script program is complete and reliable and preventing malicious tampering and copying. 4. Description of the Figures

[0011] Figure 1 This is a structural functional block diagram of the present invention.

[0012] Figure 1 It also serves as an abstract attachment.

[0013] In the figure: 110, Python script encryption runtime lock, 120, user core Python script program, 130, data interface, 140, Python interpreter firmware, 150, SoC chip, 210, computer, 220, Python program, 230, Python driver plug-in, 240, Python interpreter software. 5. Specific implementation methods

[0014] like Figure 1 As shown, the SoC chip (150) and the data interface (130) are connected to form the Python script encryption operation lock (110) hardware, the Python interpreter firmware (140) based on the SoC chip is configured and burned, the user core Python script program (120) is written, and then the Python script encryption operation lock (110) is connected to the computer through the data interface (130), and the Python driver plug-in (230) is installed on the computer Python interpreter software (240), and the user core Python script program (120) in the Python script encryption operation lock (110) is connected with the Python program (220) in the computer to realize the function of overall collaborative encryption operation.

Claims

1. A Python script encryption run lock, characterized in that: The user core Python script program is encrypted and run by using a Python interpreter firmware based on a SoC chip, and a computer is connected through a data interface of the SoC chip to cooperatively run a computer Python program.

Citation Information

Patent Citations

  • Software authentication method based on softdog

    CN101996293A

  • Hardware programmable heterogeneous multi-core system-on-chip

    CN111506540A

  • Enciphered protection and read write control method for computer data

    CN1725196A