A Microcomputer-Based Encryption Communication Method and Device

By splitting and randomly combining the encrypted data, the problem of difficult to implement encrypted communication in resource-constrained environments such as microcomputers is solved, efficient and secure encrypted communication is achieved, and dependence on hardware resources and computing capabilities is reduced.

CN119996087BActive Publication Date: 2025-07-01SHENZHEN CITY MAIDIJIE ELECTRONICS TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510465938.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-01
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

Existing encrypted communication methods are difficult to implement in resource-constrained environments such as microcomputers, and require strong computing power or complex hardware support.

Method used

By segmenting and randomly combining the encrypted data, multiple target encrypted data blocks are generated and sent in random order. The method includes obtaining the data to be encrypted and segmenting, generating the first sub-data block and the second sub-data block, randomly combining and obfuscating processing, and finally generating the target encrypted data.

Benefits of technology

Efficient encrypted communication on devices with weak computing power enhances the unpredictability and security of data transmission and reduces dependence on hardware resources and computing power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996087B_ABST
    Figure CN119996087B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the technical field of data encryption, and provides an encryption communication method and device based on a microcomputer. The encryption communication method based on the microcomputer includes: obtaining data to be encrypted, and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; performing segmentation processing at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; randomly combining a plurality of first data blocks and a plurality of second data blocks to obtain a plurality of target encrypted data; and sequentially sending the plurality of target encrypted data to a target microcomputer in a random order. Through the innovative encryption data segmentation and random combination methods, this technical solution not only effectively improves the security and transmission efficiency of encrypted communication, but also greatly reduces the dependence on hardware resources and computing power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data encryption, and particularly relates to an encryption communication method and device based on a microcomputer. Background Art

[0002] With the rapid development of information technology, data security and communication encryption have become important topics in the modern communication field. Among many encryption communication methods, traditional encryption algorithms often have certain limitations, such as large consumption of computing resources, complex encryption processes, and easy cracking of encryption keys. Especially on some devices with limited resources and weak computing capabilities, traditional encryption algorithms often cannot be effectively applied, resulting in threats to the security of data transmission.

[0003] A microcomputer, as a computer system with strong processing capabilities but small size and low power consumption, has been widely used in recent years. Microcomputers are widely used in scenarios such as intelligent devices, embedded systems, and the Internet of Things. They can perform various data processing tasks. However, due to hardware resource limitations, microcomputers usually do not have powerful computing capabilities. Therefore, how to achieve efficient encryption communication on a microcomputer has become a key issue in improving the security of data transmission.

[0004] Some existing encryption communication methods can effectively implement data encryption, but they often require strong computing capabilities or complex hardware support, which makes it difficult to implement them in resource-constrained environments such as microcomputers. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide an encryption communication method and device based on a microcomputer to solve the technical problem that some existing encryption communication methods can effectively implement data encryption but often require strong computing capabilities or complex hardware support.

[0006] The first aspect of the embodiments of the present invention provides an encryption communication method based on a microcomputer, and the encryption communication method based on a microcomputer includes:

[0007] Obtain the data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted;

[0008] Perform segmentation processing at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted;

[0009] Randomly combine a plurality of first data blocks and a plurality of second data blocks to obtain a plurality of target encrypted data;

[0010] Send multiple pieces of target encrypted data to the target microcomputer in a random order one by one.

[0011] Further, the step of obtaining the data to be encrypted and performing a segmentation process based on the current data length of the data to be encrypted to obtain multiple ordered data blocks to be encrypted includes:

[0012] Obtain the data to be encrypted and extract the current data length of the data to be encrypted;

[0013] Obtain the preset lengths mapped by different data lengths and match the target preset length corresponding to the data length;

[0014] Segment the data to be encrypted based on the target preset length to obtain multiple data blocks to be encrypted.

[0015] Further, the step of randomly combining multiple first data blocks and multiple second data blocks to obtain multiple target encrypted data includes:

[0016] Randomly combine multiple first sub-data blocks and multiple second sub-data blocks to obtain multiple combined data blocks; wherein, each combined data block includes a single first sub-data block and a single second sub-data block;

[0017] Obtain the respective sequence information corresponding to the first sub-data block and the second sub-data block in each combined data block; the sequence information refers to the sequence of the data to be encrypted corresponding to the first sub-data block or the second sub-data block;

[0018] Perform a confusion process on the combined data blocks to obtain initial encrypted data;

[0019] Combine the initial encrypted data corresponding to each combined data block and the sequence information to obtain the target encrypted data.

[0020] Further, the step of performing a confusion process on the combined data blocks to obtain initial encrypted data includes:

[0021] Obtain a pre-stored encryption key, input the combined data block and the encryption key into a confusion function to obtain the initial encrypted data;

[0022] The confusion function is:

[0023] ,

[0024] wherein, represents the initial encrypted data, represents the combined data block, represents the encryption key, represents the first parameter, represents the second parameter, represents the exclusive OR operation, represents the modulo operation.

[0025] Further, the step of sequentially sending multiple target encrypted data to the target microcomputer in a random order includes:

[0026] Combining multiple target encrypted data and a random order to obtain data to be sent;

[0027] Setting a random order for multiple data to be sent;

[0028] Based on the random order, sending the data to be sent to the target microcomputer in descending order.

[0029] Further, after the step of sequentially sending multiple target encrypted data to the target microcomputer in a random order, it further includes:

[0030] The target microcomputer receives multiple target encrypted data and determines the integrity of the multiple target encrypted data according to the random order;

[0031] The target microcomputer splits the target encrypted data into initial encrypted data and sequence information;

[0032] The target microcomputer performs de-obfuscation processing on the initial encrypted data to obtain combined data blocks;

[0033] The target microcomputer splits the combined data blocks into first sub-data blocks and second sub-data blocks;

[0034] The target microcomputer combines the first data blocks and the second data blocks with the same sequence information according to the sequence information corresponding to the first data block and the second sub-data block respectively to obtain data blocks to be encrypted;

[0035] The target microcomputer sequentially combines multiple data blocks to be encrypted according to the sequence information of the first data block in each data block to be encrypted to obtain data to be encrypted.

[0036] Further, the step of the target microcomputer performing de-obfuscation processing on the initial encrypted data to obtain combined data blocks includes:

[0037] Obtaining a pre-stored encryption key and inputting the initial encrypted data and the encryption key into an inverse obfuscation function to obtain the combined data blocks;

[0038] The inverse obfuscation function is:

[0039] ,

[0040] where, Represents the initial encrypted data, Represents the combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, Represents the exclusive OR operation, Represents the modulo operation.

[0041] The second aspect of the embodiments of the present invention provides an encryption communication device based on a microcomputer, including:

[0042] An acquisition unit, configured to acquire the data to be encrypted, and perform a segmentation process based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted;

[0043] A segmentation unit, configured to perform a segmentation process at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted;

[0044] A combination unit, configured to randomly combine a plurality of first data blocks and a plurality of second data blocks to obtain a plurality of target encrypted data;

[0045] A communication unit, configured to sequentially send a plurality of target encrypted data to the target microcomputer in a random order.

[0046] The third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the encryption communication method based on the microcomputer described in the first aspect are implemented.

[0047] The fourth aspect of the embodiments of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the encryption communication method based on the microcomputer described in the first aspect are implemented.

[0048] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: Traditional encryption communication methods usually require strong computing power or complex hardware support. Especially in low-power devices such as microcomputers, the implementation of these methods is often restricted by performance and hardware resources. However, in this solution, through the segmentation and random combination of the data to be encrypted, the dependence on large-scale computational complexity and high-performance hardware is avoided, and efficient encrypted communication can be achieved on devices with relatively weak computing power. This technical solution first segments the data to be encrypted based on the current data length to obtain multiple ordered data blocks, and then further segments each data block to generate multiple sub-data blocks. By randomly combining multiple first data blocks and second data blocks and sending them in a random order, the unpredictability and security in data transmission are enhanced. This way of data scrambling and random combination effectively prevents conventional encryption algorithm cracking methods, such as pattern recognition attacks. Since the encrypted data is sent in the form of multiple target encrypted data blocks and transmitted in a random order, this approach has obvious advantages in resisting network interference and improving the reliability of data transmission. Even if some data packets are lost or attacked during transmission, due to the randomness of the data blocks and the segmentation method, it is very difficult for attackers to recover the original data, thus improving the overall communication security. This technical solution is particularly suitable for low-power devices such as microcomputers. In the case of limited resources of microcomputers, through the block cutting and random combination processing of data, the computing burden can be effectively dispersed, so that the consumption of computing resources in the encrypted communication process is kept within a reasonable range, without affecting the overall performance of the device. The segmentation and combination methods in this solution are modular, and the granularity of data segmentation and the way of encryption combination can be adjusted according to the requirements of actual application scenarios. This flexible design enables this solution to be widely applied to various microcomputer network environments that require encrypted communication, including Internet of Things devices, smart hardware, and other low-power computing platforms. Generally speaking, through the innovative encrypted data segmentation and random combination method, this technical solution not only effectively improves the security and transmission efficiency of encrypted communication, but also greatly reduces the dependence on hardware resources and computing power, enabling microcomputers to perform encrypted data transmission efficiently and securely in complex communication environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of related technologies. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0050] Figure 1 FIG. shows a schematic flowchart of an encrypted communication method based on a microcomputer provided by the present invention;

[0051] Figure 2 Shows a schematic diagram of an encryption communication device based on a microcomputer provided by an embodiment of the present invention;

[0052] Figure 3 Shows a schematic diagram of a terminal device provided by an embodiment of the present invention. Detailed implementation manners

[0053] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system architectures, technologies, etc. are presented in order to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.

[0054] The embodiments of the present invention provide an encryption communication method and device based on a microcomputer to solve the technical problem that although some existing encryption communication methods can effectively implement data encryption, they often require strong computing power or complex hardware support.

[0055] First of all, the present invention provides an encryption communication method based on a microcomputer. Please refer to Figure 1 , Figure 1 Shows a schematic flowchart of an encryption communication method based on a microcomputer provided by the present invention. As Figure 1 shown, the encryption communication method based on a microcomputer may include the following steps:

[0056] Step 101: Obtain the data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted;

[0057] The system obtains the data to be encrypted, and the data to be encrypted includes, but is not limited to, files, messages, or any other type of data. Next, the system divides the data into blocks of a fixed size according to the length of the data. These segmented data blocks are kept in order to maintain the order of the data in subsequent steps. The size of the data blocks can be adjusted according to specific design requirements. Among them, the specific segmentation logic of the data to be encrypted is as follows:

[0058] Specifically, step 101 specifically includes steps 1011 to 1013:

[0059] Step 1011: Obtain the data to be encrypted, and extract the current data length of the data to be encrypted;

[0060] In this step, the system first obtains the data to be encrypted, which can be any type of data (such as files, messages, transport streams, etc.). Then, the system extracts the length of the data, that is, the total number of bytes of the data. This length is the basis for the subsequent segmentation process because the system needs to know how to determine the segmentation method of the data according to the length.

[0061] Step 1012: Obtain the preset lengths mapped to different data lengths and match the target preset length corresponding to the data length;

[0062] The key in this stage is the introduction of the preset length mapping, which means that different data lengths to be encrypted will have different segmentation strategies. The system maintains a preset length mapping table (which may be hard-coded or information in a configuration file), and it will select a corresponding "target preset length" as the segmentation standard according to the length of the current data.

[0063] This target preset length is a preset constant used to determine the size of the data block. The selection of the preset length may be based on multiple factors, such as the requirements of the encryption algorithm, the limitations of the transmission bandwidth, the type of data content, etc.

[0064] For example: Suppose a mapping rule is set:

[0065] "When the data length is between 0 - 1000 bytes, select the target preset length of 100 bytes;

[0066] When the data length is between 1001 - 5000 bytes, select the target preset length of 500 bytes;

[0067] When the data length is greater than 5000 bytes, select the target preset length of 1000 bytes;

[0068] If the length of the data to be encrypted is 500 bytes, the system will select the target preset length of 100 bytes;

[0069] If it is 2000 bytes, then select the target preset length of 500 bytes"

[0070] Step 1013: Segment the data to be encrypted based on the target preset length to obtain multiple data blocks to be encrypted.

[0071] According to the target preset length matched in the previous step, the system segments the data to be encrypted into multiple data blocks according to this length. The length of each data block will correspond to the target preset length. If the length of the data to be encrypted cannot be evenly divisible by the target preset length, the last data block may contain the remaining part.

[0072] For example: If the target preset length is 100 bytes and the length of the data to be encrypted is 500 bytes, the system will split the data into 5 data blocks of 100 bytes each. If the length of the data is 550 bytes, the system will split it into 5 data blocks of 100 bytes, and the remaining 50 bytes will be used as the last data block.

[0073] In the embodiments corresponding to steps 1011 to 1013, during the data splitting process, by matching the target preset length, the structure of each data block to be encrypted is ensured to be unified, reducing redundancy or deviation in the data block length. This precise splitting method increases the complexity of the encryption algorithm, enhances the randomness of the data blocks, and thus effectively improves the overall encryption security. Even if an attacker attempts to analyze or recover the data, the randomness of the data splitting and the application of the preset length greatly increase the difficulty of cracking. By mapping different data lengths to the preset length, this technical solution can adapt to the encryption requirements in various different scenarios. Regardless of the length of the data to be encrypted, the system can perform reasonable splitting according to the preset mapping rules. This flexibility is particularly suitable for various types of devices or network environments and can be widely applied to communication requirements of various data volumes, ensuring that encrypted communication remains efficient and stable under various conditions. Different from the traditional fixed-length splitting method, this technical solution dynamically adjusts the splitting strategy according to the actual length of the data to be encrypted. By matching the target preset length, excessive calculation and memory consumption can be avoided, making the data splitting process more efficient. In addition, this dynamic splitting method can better adapt to data of different lengths, further improving the speed of the encryption and decryption processes. In the split data blocks, since the size of each data block is optimized according to the target preset length, the storage and transmission efficiency of the data blocks is improved. The relatively uniform block size helps to improve the data transmission efficiency in the network, reducing transmission delays or bandwidth waste caused by uneven or mismatched data transmission, and optimizing the performance of the entire encrypted communication. In summary, this technical solution solves the security and performance problems caused by inconsistent data lengths in traditional encrypted communication by precisely mapping and splitting the data to be encrypted, significantly improving the encryption efficiency, security, and scope of application. Especially in microcomputers and low-power devices in complex environments, it can provide a more stable and secure encrypted communication solution.

[0074] Step 102: Perform splitting processing at the Nth character position of each data block to be encrypted, obtaining a first sub-data block and a second sub-data block corresponding to each data block to be encrypted;

[0075] Each data block to be encrypted will be divided into two sub-data blocks, respectively called the "first sub-data block" and the "second sub-data block".

[0076] Step 103: Randomly combine multiple first data blocks and multiple second data blocks to obtain multiple target encrypted data;

[0077] The purpose of this stage is to enhance security by obfuscating the original data. The system will randomly combine all the "first sub-data blocks" with all the "second sub-data blocks". The core of this process is to disrupt the structure of the data so that each "target encrypted data" does not directly originate from a certain original data block. Among them, the random combination process of the first data block and the second data block is as follows:

[0078] Specifically, step 103 specifically includes steps 1031 to 1034:

[0079] Step 1031: Randomly combine multiple first sub-data blocks and multiple second sub-data blocks to obtain multiple combined data blocks; wherein, each of the combined data blocks includes a single first sub-data block and a single second sub-data block;

[0080] The system will store the previously segmented first sub-data blocks and second sub-data blocks separately. Then, the system will randomly combine these sub-data blocks to ensure that each combined data block consists of a first sub-data block and a second sub-data block. Through this random combination, the direct relationship between the original data can be disrupted, thereby increasing the unpredictability of the data.

[0081] For example: Suppose there are 3 first sub-data blocks (such as ab, cd, ef) and 3 second sub-data blocks (such as gh, ij, kl), and the following combined data blocks may be obtained through random combination: ab + gh; cd + ij; ef + kl. The combination process is random, so the content of each data block is disrupted and the order of the original data cannot be directly inferred.

[0082] Step 1032: Obtain the respective order information of the first sub-data block and the second sub-data block in each of the combined data blocks; the order information refers to the order of the data to be encrypted corresponding to the first sub-data block or the second sub-data block;

[0083] In this step, the system will attach order information to the sub-data blocks in each combined data block. The order information refers to the order of each sub-data block in the original data. For example, a certain first sub-data block may come from the 1st part of the original data, while a certain second sub-data block may come from the 5th part of the original data.

[0084] This order information is very important for the subsequent decryption process. The decryptor needs to know the position of each sub-data block in the original data in order to restore it to the original data. The order information itself can also be part of the encryption to prevent the order of the data from being inferred by the thief.

[0085] Step 1033: Perform confusion processing on the combined data block to obtain initial encrypted data;

[0086] The system performs confusion processing on each combined data block. The purpose of confusion processing is to further increase the complexity of the data, so that even if an attacker obtains multiple combined data blocks, it is impossible to easily restore the original data. Among them, the specific logic of confusion processing is as follows:

[0087] Specifically, step 1033 specifically includes: obtaining a pre-stored encryption key, inputting the combined data block and the encryption key into a confusion function, and obtaining the initial encrypted data;

[0088] The confusion function is:

[0089] ,

[0090] Among them, represents the initial encrypted data, represents the combined data block, represents the encryption key, represents the first parameter, represents the second parameter, represents the exclusive OR operation, represents the modulo operation.

[0091] The confusion function confuses the combined data block through preset exclusive OR operations and modulo operations, and further improves the confusion dimension through the first parameter and the second parameter, making the confused combined data block difficult to crack. The above confusion function is an internal calculation logic, so it is difficult for an attacker to crack.

[0092] Among them, the pre-stored encryption key is the encryption key pre-stored between two microcomputers (set by the user or set through communication interaction).

[0093] Step 1034: Combine the initial encrypted data corresponding to each combined data block with the sequence information to obtain the target encrypted data.

[0094] In this step, the system combines the initial encrypted data of each combined data block with its corresponding sequence information. This is done to ensure that when decrypting, the receiving party can correctly restore the position of the data block according to the sequence information and restore it to the correct original order.

[0095] The finally obtained target encrypted data is a composite data composed of the encrypted data and the sequence information. When decrypting, the receiving party will first extract the sequence information, then reconstruct the order of the data according to this information, and finally restore the original data.

[0096] In the embodiments corresponding to steps 1031 to 1034, by randomly combining multiple first sub-data blocks and multiple second sub-data blocks, the fixed structure and order of the original data are broken, significantly enhancing the randomness of the encrypted data. Each combined data block consists of a single first sub-data block and a single second sub-data block, and its order information is separately extracted and processed, further increasing the complexity and unpredictability of the data. Even if an attacker obtains part of the encrypted data, it is difficult to recover the original data through pattern recognition or other common attack methods, thus greatly improving the security of the data. During the process of generating the combined data blocks, each data block corresponds to the order information of the first sub-data block and the second sub-data block. These order information identify the position information of each sub-data block in the original data to be encrypted, ensuring that in the subsequent decryption process, the original order of the data blocks can be accurately restored, avoiding information loss or disorder. The management of this order information not only ensures the reversibility of the encryption and decryption processes, but also improves the precise control of the order during data transmission. The initial encrypted data corresponding to each combined data block is combined with its order information to generate the final target encrypted data. This encryption method that combines order information enables the integrity of the original data to be restored based on the order information during the decryption process even if the data is transmitted dispersedly. This design not only ensures the security of encrypted communication, but also improves the accuracy of decryption, avoiding decryption failures caused by data block loss or disorder. In summary, through the random combination, order information management and confusion processing of data blocks, the present technical solution effectively improves the encryption strength, security and anti-attack ability of data, while ensuring the accuracy and reliability of the decryption process.

[0097] Step 104: Send multiple target encrypted data to the target microcomputer in a random order successively.

[0098] After the encrypted data is generated, the system will send multiple target encrypted data blocks to the target microcomputer in a certain random order successively. This operation further improves the security during data transmission because the receiving party cannot infer the content of the original data based on the order of the data. The specific sending process is as follows:

[0099] Specifically, step 104 specifically includes steps 1041 to 1043:

[0100] Step 1041: Set a random order for multiple data to be sent;

[0101] The system first sets a random order for multiple encrypted data to be sent. This random order refers to determining the order in which data blocks are sent during transmission. By randomizing the transmission order of these data, it prevents attackers from inferring the content or structure of the data by analyzing the transmission order. The order of each transmission is different, increasing the unpredictability of the data. For example, if there are 5 target encrypted data (such as D1, D2, D3, D4, D5), the system will generate a random order, such as: [D3, D1, D5, D2, D4], and this order may be different each time it is sent.

[0102] Step 1042: Combine the multiple target encrypted data and the random order to obtain the data to be sent;

[0103] In this step, the system combines the already set random order with the target encrypted data to generate a complete set of data to be sent. Specifically, the system combines each target encrypted data with its corresponding order information to form a new data structure. This ensures that the receiving party can restore the correct order of the data based on the order information, and during the receiving process, the transmission order of the data is controlled by the system and not exposed to the outside. Then, the system can prepare to send these target encrypted data in the random order just generated.

[0104] Step 1043: Based on the random order, send the data to be sent to the target microcomputer in descending order.

[0105] The purpose of sending to the target microcomputer in descending order is that the target microcomputer can know how much data to be sent remains to be received according to the descending order to ensure the integrity of the data.

[0106] In the embodiments corresponding to steps 1041 to 1043, by setting a random order for multiple data to be sent, potential security risks that may be brought about by a fixed order in data transmission are effectively avoided. Even if an attacker can intercept the encrypted data, since the sending order of the data is completely random, the attacker cannot rely on the known order to conduct attacks or reorganize the data. The application of this random order greatly enhances the unpredictability and anti-attack ability of the data, preventing common cracking methods such as order attacks and pattern recognition attacks. The data is sent to the target microcomputer in a random order, ensuring that any tampering during the data transmission process can be detected in a timely manner. Because there is no fixed order for the data blocks during the transmission process, if an attacker attempts to tamper with the data or change the order, they cannot effectively restore the original information. This anti-tampering mechanism ensures that even if some data packets are lost or attacked during the transmission process, the integrity of the data can be effectively guaranteed. After combining multiple target encrypted data with a random order, the data to be sent is generated and sent sequentially in descending order. This design avoids the risks of transmission attacks or data leakage caused by a fixed order during the data transmission process. Through this optimized sending order, the independence of each data block in network transmission can be ensured, making it impossible for an attacker to guess the content of the data or subsequent transmission behavior by analyzing the sending rules of the data packets, further enhancing the security and stability of communication. This technical solution significantly improves the security, stability, and anti-interference ability of data transmission by setting a random order for the data to be sent and performing ordered sending based on the order. The random sending of data not only increases the ability to prevent potential attacks but also optimizes the resource consumption and efficiency during the transmission process, especially suitable for microcomputers and low-power device environments that require high security and high reliability.

[0107] In the embodiments corresponding to steps 101 to 104, by splitting and randomly combining the data to be encrypted, the dependence on large-scale computational complexity and high-performance hardware is avoided, and efficient encrypted communication can be achieved on devices with relatively weak computing capabilities. This technical solution first splits the data to be encrypted based on the current data length to obtain multiple ordered data blocks, and then further splits each data block to generate multiple sub-data blocks. By randomly combining multiple first data blocks and second data blocks and sending them in a random order, the unpredictability and security in data transmission are enhanced. This way of data scrambling and random combination effectively prevents conventional encryption algorithm cracking methods, such as pattern recognition attacks. Since the encrypted data is sent in the form of multiple target encrypted data blocks and transmitted in a random order, this approach has obvious advantages in resisting network interference and improving the reliability of data transmission. Even if some data packets are lost or attacked during transmission, due to the randomness of the data blocks and the splitting method, it is difficult for attackers to recover the original data, thus improving the overall communication security. This technical solution is particularly suitable for low-power devices such as microcomputers. In the case of limited resources of microcomputers, through the block cutting and random combination processing of data, the computational burden can be effectively dispersed, so that the consumption of computational resources in the encrypted communication process is kept within a reasonable range, without affecting the overall performance of the device. The splitting and combination methods in this solution are modular, and the granularity of data splitting and the way of encrypted combination can be adjusted according to the requirements of the actual application scenario. This flexible design enables this solution to be widely applied to various microcomputer network environments that require encrypted communication, including Internet of Things devices, smart hardware, and other low-power computing platforms. Generally speaking, through the innovative encrypted data splitting and random combination method, this technical solution not only effectively improves the security and transmission efficiency of encrypted communication, but also greatly reduces the dependence on hardware resources and computing capabilities, enabling microcomputers to perform encrypted data transmission efficiently and securely in complex communication environments.

[0108] As an alternative embodiment of the present invention, after step 104, steps 105 to 110 are further included:

[0109] Step 105: The target microcomputer receives multiple target encrypted data and determines the integrity of the multiple target encrypted data according to the random order;

[0110] When receiving data, the target microcomputer will first receive multiple target encrypted data. The order of these data is randomized during transmission. Therefore, the receiving party needs to confirm the integrity and order of these data. The target microcomputer will read the order information from large to small (i.e., the order of data transmission) contained in these encrypted data to ensure that the data blocks can be decrypted and processed in the correct order.

[0111] Step 106: The target microcomputer splits the target encrypted data into initial encrypted data and sequence information;

[0112] Step 107: The target microcomputer performs de-obfuscation processing on the initial encrypted data to obtain a combined data block;

[0113] Specifically, step 107 specifically includes: obtaining a pre-stored encryption key;

[0114] Inputting the initial encrypted data into a reverse obfuscation function to obtain the combined data block;

[0115] The reverse obfuscation function is:

[0116] ,

[0117] where, represents the initial encrypted data, represents the combined data block, represents the encryption key, represents the first parameter, represents the second parameter, represents the exclusive OR operation, represents the modulo operation.

[0118] The reverse obfuscation function is the reverse process of the above obfuscation function, which will not be elaborated here.

[0119] Step 108: The target microcomputer splits the combined data block into a first sub-data block and a second sub-data block;

[0120] Step 109: The target microcomputer combines the first data block and the second data block with the same sequence information according to the respective sequence information corresponding to the first data block and the second sub-data block to obtain an encrypted data block to be encrypted;

[0121] Step 110: The target microcomputer sequentially combines multiple encrypted data blocks to be encrypted according to the sequence information of the first data block in each encrypted data block to be encrypted to obtain encrypted data.

[0122] In the embodiments corresponding to steps 105 to 110, the target microcomputer first sorts the multiple pieces of target encrypted data received according to a random order to ensure data integrity. Since the data is sent in a random order during transmission, this step can effectively restore the original order of the data and detect whether there are lost or tampered data packets. In this way, the target microcomputer can accurately verify the integrity of the data, providing a reliable basis for the subsequent decryption process. After receiving the target encrypted data, the target microcomputer splits it into initial encrypted data and sequence information, and then performs de-obfuscation processing on the initial encrypted data. This processing step utilizes the obfuscation algorithm applied during the encryption process to successfully reverse the obfuscation effect of the data and restore the original combined data blocks. This process not only ensures that no information is lost during data transmission, but also greatly improves the accuracy and effectiveness of the decryption process through effective de-obfuscation operations. The target microcomputer splits the restored combined data blocks to extract the first sub-data block and the second sub-data block therefrom. In addition, the target microcomputer correctly combines the first data block and the second data block with the same sequence information according to the sequence information, further ensuring the sequentiality and structural integrity of the data. This step enables the encrypted data to be completely and accurately restored to the data blocks to be encrypted. Using the sequence information obtained after splitting, the target microcomputer can accurately combine the first sub-data block and the second sub-data block in each data block to be encrypted in the correct order. By sequentially combining multiple data blocks to be encrypted according to the sequence information, the target microcomputer can finally restore the original data to be encrypted. This process solves the problem of possible out-of-order in traditional decryption methods, ensuring the accuracy of data restoration and not relying on a fixed order or structure. Since the sequence information of each data block is stored independently, and the target microcomputer can restore the correct order of the data blocks according to this sequence information, the entire decryption process is not affected by random perturbations or data packet losses in network transmission. Even in an unstable communication environment, the integrity and accuracy of the data can still be guaranteed. This method not only improves the robustness of the decryption process, but also enhances the flexibility and fault tolerance of the decryption system. The target microcomputer first splits the target encrypted data into initial encrypted data and sequence information, and then performs de-obfuscation and restoration of the sequence information on the initial encrypted data, avoiding the need for large-scale calculations in traditional decryption methods. This step-by-step processing method effectively reduces the demand for computing resources, making the decryption process more efficient and suitable for resource-constrained scenarios such as microcomputers and low-power devices.

[0123] As Figure 2 The present invention provides an encryption communication device based on a microcomputer. Please refer to Figure 2 , Figure 2The figure shows a schematic diagram of an encryption communication device based on a microcomputer provided by the present invention, as Figure 2 An encryption communication device based on a microcomputer includes:

[0124] An acquisition unit 21, configured to acquire data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted, so as to obtain a plurality of ordered data blocks to be encrypted;

[0125] A segmentation unit 22, configured to perform segmentation processing at the Nth character position of each data block to be encrypted, so as to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted;

[0126] A combination unit 23, configured to randomly combine a plurality of first data blocks and a plurality of second data blocks to obtain a plurality of target encrypted data;

[0127] A communication unit 24, configured to sequentially send the plurality of target encrypted data to a target microcomputer in a random order.

[0128] An encryption communication device based on a microcomputer provided by the present invention avoids large-scale computational complexity and dependence on high-performance hardware through the segmentation and random combination of data to be encrypted, and can achieve efficient encryption communication on devices with weak computing capabilities. This technical solution first segments the data to be encrypted based on the current data length to obtain a plurality of ordered data blocks, and then further segments each data block to generate a plurality of sub-data blocks. By randomly combining a plurality of first data blocks and second data blocks and sending them in a random order, the unpredictability and security in data transmission are enhanced. This method of data scrambling and random combination effectively prevents conventional encryption algorithm cracking methods, such as pattern recognition attacks. Since the encrypted data is sent in the form of a plurality of target encrypted data blocks and transmitted in a random order, this method has obvious advantages in resisting network interference and improving the reliability of data transmission. Even if some data packets are lost or attacked during transmission, due to the randomness of the data blocks and the segmentation method, it is difficult for attackers to recover the original data, thereby improving the overall communication security. This technical solution is particularly suitable for low-power devices such as microcomputers. In the case of limited resources of a microcomputer, through the block cutting and random combination processing of data, the computational burden can be effectively dispersed, so that the consumption of computational resources in the encryption communication process remains within a reasonable range, thus not affecting the overall performance of the device. The segmentation and combination methods in this solution are modular, and the granularity of data segmentation and the way of encryption combination can be adjusted according to the requirements of the actual application scenario. This flexible design enables this solution to be widely applied to various microcomputer network environments that require encryption communication, including Internet of Things devices, smart hardware, and other low-power computing platforms. Generally speaking, through the innovative encryption data segmentation and random combination method, this technical solution not only effectively improves the security and transmission efficiency of encryption communication, but also greatly reduces the dependence on hardware resources and computing capabilities, enabling microcomputers to perform encrypted data transmission efficiently and securely in complex communication environments.

[0129] Figure 3 It is a schematic diagram of a terminal device provided by an embodiment of the present invention. As Figure 3 shown, a terminal device 3 in this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as an encryption communication program based on a microcomputer. When the processor 30 executes the computer program 32, the steps in the above-mentioned embodiments of various encryption communication methods based on a microcomputer are implemented, such as Figure 1 the steps 101 to 104 shown. Alternatively, when the processor 30 executes the computer program 32, the functions of each unit in the above-mentioned device embodiments are implemented, such as Figure 2 the functions of the units shown.

[0130] Exemplarily, the computer program 32 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 32 in the terminal device 3. For example, the specific functions of the computer program 32 divided into each unit are as follows:

[0131] An acquisition unit, configured to acquire data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted, so as to obtain a plurality of ordered data blocks to be encrypted;

[0132] A segmentation unit, configured to perform segmentation processing at the Nth character position of each data block to be encrypted, so as to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted;

[0133] A combination unit, configured to randomly combine a plurality of first data blocks and a plurality of second data blocks to obtain a plurality of target encrypted data;

[0134] A communication unit, configured to sequentially send the plurality of target encrypted data to the target microcomputer in a random order.

[0135] The terminal device includes, but is not limited to, the processor 30 and the memory 31. Those skilled in the art can understand that Figure 3 This is only an example of a terminal device 3, and does not constitute a limitation on a terminal device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the terminal device may further include an input / output device, a network access device, a bus, etc.

[0136] The processor 30 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0137] The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. The memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the terminal device 3. Further, the memory 31 may also include both the internal storage unit and the external storage device of the terminal device 3. The memory 31 is used to store the computer program and other programs and data required by the roaming control device. The memory 31 may also be used to temporarily store the data that has been output or will be output.

[0138] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or subsequent. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0139] It should be noted that for the content such as information interaction and execution process between the above-mentioned device / unit, since it is based on the same concept as the method embodiment of the present invention, its specific functions and the technical effects brought can be specifically referred to the method embodiment part, and will not be elaborated here.

[0140] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present invention. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be elaborated here.

[0141] The embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0142] An embodiment of the present invention provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal is enabled to execute the steps in the above-mentioned method embodiments when executed.

[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present invention, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate forms, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (Random Access Memory, RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc.

[0144] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0145] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0146] In the embodiments provided by the present invention, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0147] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, and it may be located in one place or distributed across multiple network units.

[0148] It should be understood that when used in the specification and appended claims of the present invention, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0149] It should also be understood that the term "and / or" used in the specification and appended claims of the present invention refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0150] As used in the specification and appended claims of the present invention, the term "if" may be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if detecting [the described condition or event]" may be interpreted as meaning "once determined", "in response to determining", "once detecting [the described condition or event]", or "in response to detecting [the described condition or event]" depending on the context.

[0151] In addition, in the description of the specification and appended claims of the present invention, the terms "first", "second", "third", etc. are only used for differentiating descriptions and cannot be understood as indicating or implying relative importance.

[0152] Reference to "an embodiment" or "some embodiments" etc. described in the specification of the present invention means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present invention. Thus, statements such as "in an embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.

[0153] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A microcomputer-based encryption communication method, characterized in that: The microcomputer-based encryption communication method comprises: Acquire the data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; wherein the segmentation processing divides the data into blocks of fixed size according to the length of the data; Perform segmentation processing at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; Randomly combining the plurality of first sub-data blocks and the plurality of second sub-data blocks to obtain a plurality of combined data blocks; wherein each of the combined data blocks includes a single first sub-data block and a single second sub-data block; Acquire sequence information corresponding to the first sub-data block and the second sub-data block in each of the combined data blocks; the sequence information refers to the sequence of the data to be encrypted corresponding to the first sub-data block or the second sub-data block; Obtaining a pre-stored encryption key, inputting the combined data block and the encryption key into an obfuscation function to obtain initial encrypted data; The confusion function is: ; in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the XOR operation, Represents modular operation; Combine the initial encrypted data and the sequence information corresponding to each combined data block to obtain the target encrypted data; The multiple target encrypted data are sent to the target microcomputer in a random order.

2. The microcomputer-based encryption communication method according to claim 1, characterized in that: The step of obtaining the data to be encrypted and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted includes: Acquire the data to be encrypted, and extract the current data length of the data to be encrypted; Obtaining preset lengths mapped to different data lengths, and matching the target preset lengths corresponding to the data lengths; The data to be encrypted is divided based on the target preset length to obtain a plurality of data blocks to be encrypted.

3. The microcomputer-based encryption communication method according to claim 1, characterized in that: The step of sending the plurality of target encrypted data to the target microcomputer in random order comprises: Set a random order for multiple data to be sent; Combine multiple target encrypted data and random order to obtain data to be sent; Based on the random order, the data to be sent are sent to the target microcomputer in descending order.

4. The microcomputer-based encryption communication method according to claim 3, characterized in that: After the step of sending the plurality of target encrypted data to the target microcomputer in random order, the method further comprises: The target microcomputer receives the plurality of target encrypted data and determines the integrity of the plurality of target encrypted data according to the random sequence; The target microcomputer divides the target encrypted data into initial encrypted data and sequence information; The target microcomputer performs a deobfuscation process on the initial encrypted data to obtain a combined data block; The target microcomputer divides the combined data block into a first sub-data block and a second sub-data block; The target microcomputer combines the first data block and the second data block with the same sequence information according to the sequence information corresponding to the first data block and the second sub-data block, so as to obtain a data block to be encrypted; The target microcomputer combines the plurality of data blocks to be encrypted in sequence according to the sequence information of the first data block in each of the data blocks to be encrypted to obtain the data to be encrypted.

5. The microcomputer-based encryption communication method according to claim 4, characterized in that: The step of performing a deobfuscation process on the target microcomputer to obtain a combined data block comprises: Obtaining a pre-stored encryption key, and inputting the initial encrypted data and the encryption key into a reverse obfuscation function to obtain the combined data block; The reverse obfuscation function is: ; in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the XOR operation, Represents the modulo operation.

6. A microcomputer-based encryption communication device, characterized in that: The microcomputer-based encryption communication device comprises: An acquisition unit, used for acquiring data to be encrypted, and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; wherein the segmentation processing divides the data into blocks of fixed size according to the length of the data; A segmentation unit, used for performing segmentation processing at the Nth character position of each data block to be encrypted, to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; A combining unit, used for randomly combining the plurality of first sub-data blocks and the plurality of second sub-data blocks to obtain a plurality of combined data blocks; wherein each of the combined data blocks includes a single first sub-data block and a single second sub-data block; Acquire sequence information corresponding to the first sub-data block and the second sub-data block in each of the combined data blocks; the sequence information refers to the sequence of the data to be encrypted corresponding to the first sub-data block or the second sub-data block; Obtaining a pre-stored encryption key, inputting the combined data block and the encryption key into an obfuscation function to obtain initial encrypted data; The confusion function is: ; in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the XOR operation, Represents modular operation; Combine the initial encrypted data and the sequence information corresponding to each combined data block to obtain the target encrypted data; The communication unit is used to send multiple target encrypted data to the target microcomputer in a random order.

7. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a microcomputer-based encryption communication program stored in the memory and executable on the processor, wherein the microcomputer-based encryption communication program is configured to implement the steps in the microcomputer-based encryption communication method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the microcomputer-based encryption communication method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Network security protection method for converged media platform

    CN116318889A