A data encryption method
Through collaboration between the client and the server, data encryption is encrypted using the initial key and encryption key, and the encrypted data packets are decrypted by mapping configuration tables, the problem of insufficient confidentiality of data transmission in the prior art is solved, and high confidentiality of data during transmission is achieved.
Patent Information
- Application Number
- CN202111487354.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-12-07
AI Technical Summary
Existing software algorithm protection methods are easily decompiled and cracked, resulting in insufficient confidentiality of data transmission.
Through collaboration between the client and the server, data encryption is encrypted using the initial key and encryption key, and the encrypted packets are decrypted through the mapping configuration table to ensure the confidentiality of the data during transmission.
It effectively improves the confidentiality of data, so that even if the transmitted data is intercepted, the required data cannot be decrypted to prevent data leakage.
Abstract
Description
[Technical field]
[0001] The invention relates to a data encryption method. [Background Technology]
[0002] Traditional software algorithm protection is mostly encrypted by means of code obfuscation and shelling. Nowadays, people are becoming more and more proficient in decompilation in software development, so the existing transmitted algorithm data can be easily decompiled and cracked, causing losses. [Summary of the invention]
[0003] The present invention overcomes the deficiencies of the above-mentioned technology and provides a data encryption method.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] A data encryption method, the steps of which are as follows:
[0006] S1. The client sends an authorization authentication request to the server;
[0007] S2. The server confirms the client's authority and returns the initial key to the client;
[0008] S3: The client encrypts the initial key locally on the client and converts it into an encryption key;
[0009] S4, the client sends an encryption key request mapping configuration table to the server;
[0010] S5. The server returns a mapping configuration table to the client according to the encryption key;
[0011] S6. The client decrypts the mapping configuration table according to the initial key and the encryption key to obtain the calling parameters;
[0012] S7, the client sends calling parameters to the algorithm library;
[0013] S8, the algorithm library returns the encrypted data packet to the client according to the calling parameters;
[0014] S9. The client decrypts the encrypted data packet according to the initial key, encryption key, and mapping configuration table to obtain the required data.
[0015] The data encryption method as described above has the following steps: In S4, the client sends an encryption key request mapping configuration table to the server within a valid time.
[0016] The data encryption method as described above has the following steps: in S7, the server is connected to the algorithm library for communication, the client sends a call parameter to the server, and the server receives the call parameter and sends it to the algorithm library; in S8, the algorithm library returns the encrypted data packet to the client through the server.
[0017] The beneficial effects of the present invention are:
[0018] The present invention returns an initial key to the client according to the client authority on the server, the client encrypts the initial key into an encryption key, and requests a mapping configuration table from the server through the encryption key, the client decrypts the mapping configuration table through the initial key and the encryption key to obtain calling parameters, the server sends an encrypted data packet to the client through the calling parameters, the client decrypts the encrypted data packet through the initial key, the encryption key, and the mapping configuration table to obtain required data, and encrypts the data packet using the mapping configuration table method, so that the encrypted data in the data packet cannot be obtained after any transmission data is intercepted, thereby greatly improving the confidentiality of the data. [Specific implementation method]
[0019] The technical solutions in the embodiments of the present invention will be described clearly and completely below.
[0020] A data encryption method, the steps of which are as follows:
[0021] S1. The administrator sets the permissions of each client in the server, and the client sends a permission authentication request to the server;
[0022] S2. The server confirms the client's authority and returns the initial key to the client;
[0023] S3: The client encrypts the initial key locally on the client and converts it into an encryption key;
[0024] S4, the client sends an encryption key request mapping configuration table to the server, where the encryption key is set with a valid usage time;
[0025] S5. The server returns a mapping configuration table to the client according to the encryption key;
[0026] S6. The client decrypts the mapping configuration table according to the initial key and the encryption key to obtain the calling parameters;
[0027] S7, the client sends calling parameters to the algorithm library;
[0028] S8, the algorithm library returns the encrypted data packet to the client according to the calling parameters;
[0029] S9. The client decrypts the encrypted data packet according to the initial key, encryption key, and mapping configuration table to obtain the required data. The required data can be the data collected and uploaded to the server by the client on a daily basis and sorted by the server, such as the client's name, weight, height and other information and the summarized change data; it can also be the software data packet independently developed by the enterprise for the client to use. By setting the client permissions, the number and type of software that the client can receive and decrypt from the server and algorithm library can be limited.
[0030] The first five steps mentioned above are all based on obtaining the mapping configuration table. The purpose of introducing the mapping configuration table here is to avoid putting the detailed algorithm implementation into the algorithm library, so as to ensure that the algorithm can only be obtained from the server, and the server only stores the algorithm configuration. Finally, the client uses the initial key, encryption key and mapping configuration table to decrypt the encrypted data packet and obtain the required data; when decryption is required, the initial key, encryption key, mapping configuration table and encrypted data packet are required, so even if a part of them is intercepted, the required data cannot be decrypted, which improves the security of data use.
[0031] Among them, in S7, the server is connected to the algorithm library for communication, the client sends the calling parameters to the server, and the server receives the calling parameters and sends them to the algorithm library; in S8, the algorithm library returns the encrypted data packet to the client through the server.
[0032] The mapping configuration table mentioned above works by converting mathematical calculation symbols into fixed eigenvalues.
[0033] For example, characters are mapped to represent mathematical addition, subtraction, multiplication, division, integer division, power operations, and relational operations. According to the mathematical calculation logic, each set of calculation formulas is mapped into characters, and then the characters are encrypted. For example, to implement (x / 2+x+3)*3, we can define the unknown number as X, A as arithmetic addition, B as arithmetic subtraction, C as arithmetic multiplication, and D as arithmetic division, which can be mapped as XD2AXA3C3. This string is then sent to the algorithm library through conventional encryption methods. The algorithm library can parse the rules that the algorithm needs to calculate based on the mapping formula, and return the calculation rules to the client. The client decrypts the encrypted data through the key and mapping configuration table, thereby realizing algorithm protection.
Claims
1. A data encryption method, the steps of which are as follows: S1. The client sends an authorization authentication request to the server; S2. The server confirms the client's authority and returns the initial key to the client; S3: The client encrypts the initial key locally on the client and converts it into an encryption key; S4, the client sends an encryption key request mapping configuration table to the server; S5. The server returns a mapping configuration table to the client according to the encryption key; S6. The client decrypts the mapping configuration table according to the initial key and the encryption key to obtain the calling parameters; S7, the client sends calling parameters to the algorithm library; S8, the algorithm library returns the encrypted data packet to the client according to the calling parameters; S9, the client decrypts the encrypted data packet according to the initial key, encryption key, and mapping configuration table to obtain the required data; The mapping configuration table does not put the detailed algorithm implementation into the algorithm library, thereby ensuring that the algorithm can only be obtained from the server, and the server only stores the algorithm configuration; the mapping configuration table, its principle is to convert mathematical calculation symbols into fixed eigenvalues, map characters to represent mathematical addition, subtraction, multiplication, division, integer division, power operations and relational operations, and map each set of calculation formulas into characters according to the mathematical calculation logic, and finally encrypt the characters.
2. According to a data encryption method according to claim 1, the steps are as follows: In S4, the client sends an encryption key request mapping configuration table to the server within a valid time.
3. According to the data encryption method described in claim 1, the steps are as follows: in S7, the server is connected to the algorithm library for communication, the client sends the calling parameters to the server, and the server receives the calling parameters and sends them to the algorithm library; in S8, the algorithm library returns the encrypted data packet to the client through the server.
Citation Information
Patent Citations
Encryption / decryption method and system for data transmission
CN102118392A
Data processing method and device
CN112257094A