A method and terminal for executing data encryption based on program memory

By creating executable and non-executable images in program memory and encrypting according to random encryption rules, the problem of inefficiency in traditional executable memory execution is solved, which improves execution efficiency and protects the security of non-executable data.

CN119740240APending Publication Date: 2025-04-01FUJIAN TQ ONLINE INTERACTIVE INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411614402.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The inefficiency problem caused by the use of nested encryption combinations during traditional executable memory execution is also difficult to effectively protect the security of non-executable data.

Method used

By creating executable and non-executable images, copy executable and non-executable data in program memory and encrypt it according to preset random encryption rules. When the program is executed, the encrypted data is decrypted and encrypted by resetting the device. After the program is executed, the memory data is re-acquisitioned and encrypted to clear the memory data in the mirror.

Benefits of technology

It solves the problem of inefficiency in traditional executable memory execution, improves the execution efficiency of executable memory data, and effectively protects the security of non-executable data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740240A_ABST
    Figure CN119740240A_ABST
Patent Text Reader

Abstract

The present invention discloses a method and a terminal for encrypting data based on program memory execution, which create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; encrypt the executable data and the non-executable data according to a preset random encryption rule by a preset reset device; when the program is executed, decrypt the encrypted executable data or non-executable data called by the current execution process by the reset device, and restore it to the original encryption state after execution; clear the memory data in the executable image and the non-executable image by the reset device after the program is executed; realize the dynamic and static execution of the executable memory and the non-executable memory in the execution process of the program, and solve the low efficiency problem caused by the use of nested encryption combinations in the execution process of the traditional executable memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and a terminal for performing data encryption based on program memory. Background Art

[0002] In today's digital age, data security is of vital importance. As a key part of the operation of computer systems, memory data faces many challenges in terms of security.

[0003] Existing encryption technologies mainly include symmetric encryption (such as AES, DES, etc.) and asymmetric encryption (such as RSA, ECC, etc.). Symmetric encryption uses the same key for encryption and decryption, while asymmetric encryption uses public and private keys. Based on the encryption scenario, there are dynamic encryption and static encryption. The dynamic encryption process changes in real time, such as the encryption of web data interfaces using random keys; static encryption is determined by a fixed decryption method and stored in a fixed structure.

[0004] Memory data is currently divided into executable data and non-executable data. For non-executable data, dynamic and static encryption schemes have been implemented. However, there are many problems in executable memory data. On the one hand, there is no technical solution related to dynamic encryption of executable memory data; on the other hand, based on the existing encryption scheme, there is inefficiency in the processing of executable memory data.

[0005] As the complexity of computer systems increases and data security requirements increase, traditional encryption methods are difficult to meet the security needs of memory data. Therefore, a technical solution that can effectively encrypt memory data is needed to prevent data from being stolen and tampered with, so as to ensure the safe operation of key program processes. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a method and terminal for encrypting data based on program memory execution, so as to solve the problem of low efficiency caused by using nested encryption combinations in the traditional executable memory execution process, while also protecting the security of non-executable data.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for performing data encryption based on program memory, comprising the steps of: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule by a preset resetting device; S3, when the program is executed, calling the executable data and non-executable data required for program execution to the executable image and the non-executable image; S4, decrypting the encrypted executable data or non-executable data called by the current execution process through the reset device, and restoring it to the original encryption state after execution; S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

[0008] In order to solve the above technical problems, another technical solution adopted by the present invention is: A terminal for performing data encryption based on program memory, characterized in that it includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule by a preset resetting device; S3, when the program is executed, calling the executable data and non-executable data required for program execution to the executable image and the non-executable image; S4, decrypting the encrypted executable data or non-executable data called by the current execution process through the reset device, and restoring it to the original encryption state after execution; S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

[0009] The beneficial effects of the present invention are as follows: a method and terminal for encrypting program memory-based execution data separates executable memory data from non-executable memory data, stores them in images respectively, and encrypts them according to random encryption rules; when the program is executed, the memory data is decrypted and encrypted at the same time by resetting the device and the image; after the program is executed, the memory data is retrieved and re-encrypted, which solves the problem of inefficiency caused by the use of nested encryption combinations in the traditional executable memory execution process, improves the execution efficiency of executable memory data, and protects the security of non-executable data. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flowchart of a method for performing data encryption based on program memory according to an embodiment of the present invention; Figure 2 An internal flow chart of a method for performing data encryption based on program memory according to an embodiment of the present invention; Figure 3 A schematic diagram of a reset device flow chart of a method for executing data encryption based on program memory according to this embodiment; Figure 4 This is a structural diagram of a terminal that performs data encryption based on program memory according to this embodiment; Description of labels: 1. A terminal for performing data encryption based on program memory; 2. A processor; 3. A memory. DETAILED DESCRIPTION

[0011] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0012] Please refer to Figures 1 to 3 The present invention provides a method for performing data encryption based on program memory, comprising the steps of: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule by a preset resetting device; S3, when the program is executed, calling the executable data and non-executable data required for program execution to the executable image and the non-executable image; S4, decrypting the encrypted executable data or non-executable data called by the current execution process through the reset device, and restoring it to the original encryption state after execution; S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

[0013] From the above description, it can be seen that the beneficial effects of the present invention are: the executable memory data and the non-executable memory data are separated, stored in images respectively, and encrypted according to random encryption rules. When the program is executed, the memory data is decrypted and encrypted at the same time by resetting the device and the image. After the program is executed, the memory data is retrieved and re-encrypted, which solves the inefficiency problem caused by the use of nested encryption combinations in the traditional executable memory execution process, improves the execution efficiency of the executable memory data, and protects the security of the non-executable data.

[0014] Furthermore, step S2 is specifically as follows: If the executable data does not exist in the executable image or the non-executable data does not exist in the non-executable image, encrypting only the executable data or the non-executable data according to a preset random encryption rule by a preset resetting device; Otherwise, the executable data and the non-executable data are encrypted according to a preset random encryption rule by a preset resetting device.

[0015] From the above description, it can be seen that the executable memory data and the non-executable memory data are separated and stored and managed independently. Both executable data and non-executable data can be encrypted according to preset random encryption rules, which ensures the security of the data and improves the stability of the program flow during execution. It can effectively protect data security in various situations.

[0016] Furthermore, the preset reset device in step S2 is specifically: The reset device is initialized in advance according to a preset random encryption rule to set the executable data encryption algorithm and the non-executable data encryption algorithm.

[0017] From the above description, it can be seen that the reset device initializes the reset device through a preset random encryption rule, and the initial state of each encryption operation is unpredictable, which can effectively prevent the encrypted data from being cracked and thus affect data security, thereby improving the security of program execution.

[0018] Furthermore, the preset encryption rule in step S2 is specifically: Building an encryption library of the reset device based on multiple encryption algorithms, and storing the encryption algorithms in the encryption library in a binary tree manner; A node of the binary tree is randomly obtained, and encryption is performed according to an encryption algorithm corresponding to the node.

[0019] From the above description, it can be seen that multiple encryption algorithms are used to build an encryption library, which increases the complexity of encryption. The encryption algorithms are stored in the form of a binary tree. Based on the characteristics of the binary tree, it is easy to quickly locate and obtain the encryption algorithm corresponding to the node, thereby improving the encryption efficiency. At the same time, when encryption is required, the encryption algorithm corresponding to the node is randomly obtained for encryption, making the encryption process unpredictable and improving the security of memory data.

[0020] Furthermore, after step S5, the following steps are further included: The executable image and the non-executable image respectively obtain the executable data and the non-executable data associated with the next program in the memory.

[0021] From the above description, it can be seen that when the previous program is executed, the reset device destroys the data in the current executable image and the non-executable image, calls back to the initial state, avoids the generation of dirty data, and is conducive to the acquisition and encryption of memory data when the next program is executed.

[0022] Please refer to Figure 4 The present invention also provides a terminal for performing data encryption based on program memory, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule by a preset resetting device; S3, when the program is executed, calling the executable data and non-executable data required for program execution to the executable image and the non-executable image; S4, decrypting the encrypted executable data or non-executable data called by the current execution process through the reset device, and restoring it to the original encryption state after execution; S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

[0023] From the above description, it can be seen that the beneficial effects of the present invention are: the executable memory data and the non-executable memory data are separated, stored in images respectively, and encrypted according to random encryption rules. When the program is executed, the memory data is decrypted and encrypted at the same time by resetting the device and the image. After the program is executed, the memory data is retrieved and re-encrypted, which solves the inefficiency problem caused by the use of nested encryption combinations in the traditional executable memory execution process, improves the execution efficiency of the executable memory data, and protects the security of the non-executable data.

[0024] Furthermore, step S2 is specifically as follows: If the executable data does not exist in the executable image or the non-executable data does not exist in the non-executable image, encrypting only the executable data or the non-executable data according to a preset random encryption rule by a preset resetting device; Otherwise, the executable data and the non-executable data are encrypted according to a preset random encryption rule by a preset resetting device.

[0025] From the above description, it can be seen that the executable memory data and the non-executable memory data are separated and stored and managed independently. Both executable data and non-executable data can be encrypted according to preset random encryption rules, which ensures the security of the data and improves the stability of the program flow during execution. It can effectively protect data security in various situations.

[0026] Furthermore, the preset reset device in step S2 is specifically: The reset device is initialized in advance according to a preset random encryption rule to set the executable data encryption algorithm and the non-executable data encryption algorithm.

[0027] From the above description, it can be seen that the reset device initializes the reset device through a preset random encryption rule, and the initial state of each encryption operation is unpredictable, which can effectively prevent the encrypted data from being cracked and thus affect data security, thereby improving the security of program execution.

[0028] Furthermore, the preset encryption rule in step S2 is specifically: Building an encryption library of the reset device based on multiple encryption algorithms, and storing the encryption algorithms in the encryption library in a binary tree manner; A node of the binary tree is randomly obtained, and encryption is performed according to an encryption algorithm corresponding to the node.

[0029] From the above description, it can be seen that multiple encryption algorithms are used to build an encryption library, which increases the complexity of encryption. The encryption algorithms are stored in the form of a binary tree. Based on the characteristics of the binary tree, it is easy to quickly locate and obtain the encryption algorithm corresponding to the node, thereby improving the encryption efficiency. At the same time, when encryption is required, the encryption algorithm corresponding to the node is randomly obtained for encryption, making the encryption process unpredictable and improving the security of memory data.

[0030] Furthermore, after step S5, the following steps are further included: The executable image and the non-executable image respectively obtain the executable data and the non-executable data associated with the next program in the memory.

[0031] From the above description, it can be seen that when the previous program is executed, the reset device destroys the data in the current executable image and the non-executable image, calls back to the initial state, avoids the generation of dirty data, and is conducive to the acquisition and encryption of memory data when the next program is executed.

[0032] The invention discloses a method and a terminal for encrypting data based on program memory execution, which are applicable to dynamic and static encryption of executable memory data and non-executable memory data during program execution.

[0033] Please refer to Figures 1 to 3 , Embodiment 1 of the present invention is: A method for performing data encryption based on program memory, comprising the steps of: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image.

[0034] In this embodiment, the data in the program memory is divided into executable memory data and non-executable memory data, and the two are sticky, which is equivalent to having both executable data and non-executable data in a segment of memory. The two are in a data context relationship and are copied to the executable image and the non-executable image respectively.

[0035] S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule through a preset resetting device.

[0036] Step S2 is specifically as follows: If the executable data does not exist in the executable image or the non-executable data does not exist in the non-executable image, encrypting only the executable data or the non-executable data according to a preset random encryption rule by a preset resetting device; Otherwise, the executable data and the non-executable data are encrypted according to a preset random encryption rule by a preset resetting device.

[0037] The preset reset device is specifically: The reset device is initialized in advance according to a preset random encryption rule to set the executable data encryption algorithm and the non-executable data encryption algorithm.

[0038] In this embodiment, an encryption library is provided in the reset device, and the encryption library contains a variety of encryption algorithms and random encryption rules for initializing encryption properties of executable memory data and non-executable memory data.

[0039] Specifically, the preset encryption rules are: Building an encryption library of the reset device based on multiple encryption algorithms, and storing the encryption algorithms in the encryption library in a binary tree manner; A node of the binary tree is randomly obtained, and encryption is performed according to an encryption algorithm corresponding to the node.

[0040] In this embodiment, the encryption algorithms of executable memory data and non-executable memory data are stored in the form of a binary tree, that is, the encryption attributes of executable memory and non-executable memory are stored through the child nodes under the binary tree nodes. For example, node one corresponds to two child nodes, one of which stores the key information of the encryption algorithm AES corresponding to the non-executable memory data, and the other stores the key information of the encryption algorithm XOR corresponding to the executable memory data; or one child node in node two stores the key information of the encryption algorithm DES corresponding to the executable memory data, and the other child node stores part of the replacement data of the non-executable memory, that is, the node can be used as a random target to implement the random encryption rule.

[0041] S3. When the program is executed, the executable data and non-executable data required for program execution are called from the executable image and the non-executable image.

[0042] In this embodiment, when the program is executed, the required executable data or the non-executable data associated with the executable data is called in sequence according to the flow sequence of the program execution.

[0043] S4. Decrypt the encrypted executable data or non-executable data called by the current execution process through the reset device, and restore it to the original encryption state after execution.

[0044] In this embodiment, it is assumed that the memory data of the program is A0-B0-C0 before execution, and is encrypted to A1-B1-C1 by the reset device using random encryption rules. When the program executes to A1, the reset device will restore it to the original memory data, i.e. A0, for calling and executing the current process of the program. After the current process of the program is executed, it will be restored to the original encryption state, i.e. A1. Then the program progresses to B1, and the reset device continues to decrypt and restore it to the original encryption state after execution until the program execution is completed.

[0045] S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

[0046] In this embodiment, after all program flows are executed and all memory data calls are completed, the reset device destroys the memory data stored in the executable image and the non-executable image to avoid the generation of dirty data.

[0047] After step S5, the following steps are also included: The executable image and the non-executable image respectively obtain the executable data and the non-executable data associated with the next program in the memory.

[0048] In this embodiment, after the previous round of program execution is completed, the data in the executable image and the non-executable image are cleared. When the next program application needs to be executed, the executable data is obtained from the memory space corresponding to the next program and copied to the executable image, and the non-executable data associated with the executable data is obtained and copied to the non-executable image, waiting for the next step of resetting the device.

[0049] Please refer to Figure 4 , Embodiment 2 of the present invention is: A terminal 1 for performing data encryption based on program memory includes a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps of a method for performing data encryption based on program memory in embodiment 1 are implemented.

[0050] In summary, the present invention provides a method and terminal for encrypting program memory-based execution data, which separates executable memory data from non-executable memory data, stores them in images respectively, and encrypts them according to random encryption rules. When the program is executed, the memory data is decrypted and encrypted at the same time by resetting the device and the image. After the program is executed, the memory data is retrieved and re-encrypted, which solves the problem of inefficiency caused by the use of nested encryption combinations in the traditional executable memory execution process, improves the execution efficiency of executable memory data, and protects the security of non-executable data.

[0051] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for performing data encryption based on program memory, characterized in that: Includes steps: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule by a preset resetting device; S3, when the program is executed, calling the executable data and non-executable data required for program execution to the executable image and the non-executable image; S4, decrypting the encrypted executable data or non-executable data called by the current execution process through the reset device, and restoring it to the original encryption state after execution; S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

2. The method for data encryption based on program memory according to claim 1, characterized in that: Step S2 is specifically as follows: If the executable data does not exist in the executable image or the non-executable data does not exist in the non-executable image, encrypting only the executable data or the non-executable data according to a preset random encryption rule by a preset resetting device; Otherwise, the executable data and the non-executable data are encrypted according to a preset random encryption rule by a preset resetting device.

3. The method for data encryption based on program memory according to claim 1, characterized in that: The preset reset device in step S2 is specifically: The reset device is initialized in advance according to a preset random encryption rule to set the executable data encryption algorithm and the non-executable data encryption algorithm.

4. The method for data encryption based on program memory according to claim 1, characterized in that: The preset encryption rules in step S2 are specifically: Building an encryption library of the reset device based on multiple encryption algorithms, and storing the encryption algorithms in the encryption library in a binary tree manner; A node of the binary tree is randomly obtained, and encryption is performed according to an encryption algorithm corresponding to the node.

5. The method for data encryption based on program memory according to claim 1, characterized in that: After step S5, the following steps are also included: The executable image and the non-executable image respectively obtain the executable data and the non-executable data associated with the next program in the memory.

6. A terminal for performing data encryption based on program memory, characterized in that: The invention comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Create an executable image and a non-executable image, copy the executable data in the program memory to the executable image, and copy the non-executable data associated with the executable data to the non-executable image; S2. Encrypting the executable data in the executable image and the non-executable data in the non-executable image according to a preset random encryption rule by a preset resetting device; S3, when the program is executed, calling the executable data and non-executable data required for program execution to the executable image and the non-executable image; S4, decrypting the encrypted executable data or non-executable data called by the current execution process through the reset device, and restoring it to the original encryption state after execution; S5. Clearing the memory data in the executable image and the non-executable image through the reset device after the program execution is completed.

7. A terminal for performing data encryption based on program memory according to claim 6, characterized in that: Step S2 is specifically as follows: If the executable data does not exist in the executable image or the non-executable data does not exist in the non-executable image, encrypting only the executable data or the non-executable data according to a preset random encryption rule by a preset resetting device; Otherwise, the executable data and the non-executable data are encrypted according to a preset random encryption rule by a preset resetting device.

8. A terminal for performing data encryption based on program memory according to claim 6, characterized in that: The preset reset device in step S2 is specifically: The reset device is initialized in advance according to a preset random encryption rule to set the executable data encryption algorithm and the non-executable data encryption algorithm.

9. A terminal for performing data encryption based on program memory according to claim 6, characterized in that: The preset encryption rules in step S2 are specifically: Building an encryption library of the reset device based on multiple encryption algorithms, and storing the encryption algorithms in the encryption library in a binary tree manner; A node of the binary tree is randomly obtained, and encryption is performed according to an encryption algorithm corresponding to the node.

10. A terminal for performing data encryption based on program memory according to claim 6, characterized in that: After step S5, the following steps are also included: The executable image and the non-executable image respectively obtain the executable data and the non-executable data associated with the next program in the memory.