A method, device and storage medium for encrypting data using random numbers
By fragmenting UAV data frames and introducing random number encryption, combined with hash algorithm verification, the problem of insufficient key verification in UAV data transmission is solved, achieving high-security and high-efficiency data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MATRICTIME DIGITAL TECH CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-17
AI Technical Summary
The lack of effective verification of the legitimacy of the key source and the consistency of the key in drone data transmission makes it vulnerable to key spoofing attacks. At the same time, the introduction of additional information such as encryption operations and key indexes increases the length of data frames, resulting in decreased communication efficiency and waste of resources.
By fragmenting the original frame payload and introducing a random number encryption mechanism, the sender and receiver share a preset key pool and multiple hash algorithms. The random number is used to encrypt the sub-data and the receiver performs consistency verification to ensure the security and integrity of data transmission.
It effectively resists replay attacks and eavesdropping, enhances the anti-attack capability of data transmission, ensures the accuracy and consistency of data restoration, avoids transmission efficiency loss, and meets the needs of low-latency communication.
Smart Images

Figure CN122419785A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) communication technology, and more specifically to a method, device, and storage medium for encrypting data using random numbers. Background Technology
[0002] With the rapid development of drone technology, drones are increasingly being used in aerial surveying, logistics delivery, emergency communication, and reconnaissance. In many application scenarios, frequent data exchange is required between drone terminals, such as the transmission of flight commands, status information, acquired images, and sensor data. Currently, most drone terminals still transmit data in plaintext, meaning data is transmitted directly in its raw, unencrypted form over the communication link. While this method is simple to implement and has low transmission overhead, it poses serious security risks: attackers can easily obtain transmitted content through wireless eavesdropping, man-in-the-middle attacks, etc., leading to the leakage of sensitive information, tampering with or forgery of commands, and ultimately threatening flight safety and mission reliability.
[0003] To enhance data transmission security, introducing data encryption mechanisms is essential. Data encryption typically relies on a key system, requiring the drone transmitter and receiver to negotiate or pre-share keys and carry a key index during data transmission to indicate the key used for decryption. However, in existing solutions, the receiver, upon receiving the key index, usually assumes the corresponding key is correct and usable, lacking effective verification of the key's source legitimacy and consistency. This deficiency makes drone systems vulnerable to key spoofing attacks. Attackers can forge key indexes to induce the receiver to use incorrect or malicious keys, leading to decryption failures, data corruption, or security vulnerabilities.
[0004] Furthermore, the introduction of additional information such as encryption operations and key indexes significantly increases the length of the original data frame. Especially in environments where UAV communication link bandwidth is limited and channel quality fluctuates greatly, excessively long data frames will increase transmission latency, increase channel occupancy time, lead to decreased communication efficiency, waste of resources, and even affect the timely delivery of control commands with high real-time requirements.
[0005] Therefore, how to effectively verify the legality and correctness of keys while ensuring the security of end-to-end data transmission from drones, and at the same time avoid the loss of transmission efficiency caused by encryption and verification mechanisms, has become a key technical problem that urgently needs to be solved in the field of drone communication. Summary of the Invention
[0006] Purpose of the Invention: The purpose of this invention is to provide a method, device, and storage medium for encrypting data using random numbers. This addresses the problem that existing UAV receivers lack effective verification of the legitimacy of the key source and the consistency of the key after receiving the key index; and it also solves the problem that the introduction of additional information such as UAV data encryption operations and key indexes significantly increases the length of the original data frame, increases channel occupancy time, and leads to decreased communication efficiency and wasted resources. This invention fragments the original frame payload and introduces a random number encryption mechanism into each fragment, making the data traffic output by the sender (source) present an irregular and featureless random state. This effectively hides the structure and characteristics of the original frame and can resist source tracing and malicious analysis attacks based on traffic fingerprints.
[0007] Technical solution: This invention provides a method for encrypting data using random numbers, the method comprising the following steps:
[0008] (1) The sender and receiver share a preset key pool, and the sender and receiver share a first hash algorithm, a second hash algorithm and a checksum algorithm;
[0009] (2) The sending end reads the original frame of the data and uses the first hash algorithm to calculate the hash value of the original frame to obtain the first hash value; then the payload in the original frame is divided into the first to Nth payload fragments of equal length, and the first to Nth payload fragments are encrypted with random numbers to obtain N encrypted sub-data; then the N encrypted sub-data and the first hash value are sent to the receiving end.
[0010] (3) The receiving end restores and reassembles the N encrypted sub-data based on random numbers to obtain the data restoration frame; then it calibrates the data restoration frame based on the first hash algorithm. If the calibration is successful, the receiving end receives the data restoration frame, that is, it obtains the original data frame from the sending end.
[0011] Furthermore, the specific process of performing random number encryption on the first to Nth payload slices to obtain N encrypted sub-data is as follows:
[0012] 1) For the first payload fragment, the sender obtains a random number rand1 from the key file of the shared key pool and records the index idx-rand1 of the random number; it calculates the hash value of the random number rand1 using the second hash algorithm to obtain the second hash value, assigns the second hash value as the first quantum-secure identity of the first payload fragment, and then calculates the checksum of the first quantum-secure identity and the first payload fragment using the local checksum algorithm to obtain the first checksum;
[0013] The sending end then performs an XOR operation with the combination of the random number rand1, the first quantum security identity, the first payload fragment, and the first checksum to obtain the first intermediate frame; then it obtains the frame header and frame trailer from the original data frame, generates a guide header, and combines the frame header, guide header, first intermediate frame, and frame trailer of the original frame to obtain the first encrypted sub-data;
[0014] 2) For the second to Nth payload fragments, the same method as in step 1) above is used to obtain the second to Nth encrypted sub-data; at this point, the sending end has obtained N encrypted sub-data.
[0015] Furthermore, the header includes a random number index idx-rand1 and a fragment number of the first payload fragment; the random number index idx-rand1 includes the offset position and offset length of the random number.
[0016] Furthermore, the first hash algorithm and the second hash algorithm may be the same or different, and the hash algorithms of the first hash algorithm and the second hash algorithm are either traditional hash algorithms or quantum hash algorithms. The traditional hash algorithm is any one of MD4, MD5, SHA2, SHA3 and MASH-1 algorithms; the quantum hash algorithm is a hash function based on a linear feedback shift register obtained by selecting an irreducible polynomial and inputting random numbers.
[0017] Furthermore, the specific process of restoring and reassembling the N encrypted sub-data based on random numbers is as follows:
[0018] A1: For the first encrypted sub-data, the receiving end retrieves the current random number offset position of the key file in the local shared key pool and performs a consistency check with the random number offset position in the random number index idx-rand1 in the header of the first encrypted sub-data. If they match, the receiving end continues to the next step; if they do not match, the receiving end is notified to retransmit the encrypted sub-data.
[0019] Based on the consistency of the random number offset position verification, the receiving end continues to obtain the random number rand1' locally according to the random number index idx-rand1 in the header. It then performs an XOR operation on the random number rand1' and the first intermediate frame in the first encrypted sub-data to obtain the combination of the first quantum secure identity', the first payload fragment', and the first checksum'. Next, it uses the locally shared second hash algorithm to calculate the hash value of the random number rand1' to obtain the third hash value. It performs a consistency verification between the third hash value and the first quantum secure identity'. If they match, it continues to use the locally shared checksum algorithm to calculate the checksum between the third hash value and the first payload fragment' to obtain the second checksum. It performs a consistency verification between the second checksum and the first checksum'. If they match, it means that the first payload fragment' is complete, and the receiving end separates the first payload fragment' for storage.
[0020] A2: For the second encrypted sub-data to the Nth encrypted sub-data, the same method as in step A1 above is used to obtain the second payload fragment 'to the Nth payload fragment'; at this point, the receiving end obtains N payload fragments '. Then, the receiving end reassembles the fragments according to the fragment sequence numbers corresponding to the first payload fragments 'to the Nth payload fragment' to obtain the restored payload. Then, the frame header, frame tail and restored payload in the encrypted sub-data are combined to finally obtain the restored frame of the data.
[0021] Furthermore, the calibration of the data restoration frame based on the first hash algorithm refers to:
[0022] The receiving end uses the locally shared first hash algorithm to calculate the hash value of the restored frame to obtain the fourth hash value; the fourth hash value is calibrated with the received first hash value. If the calibration passes, the receiving end receives the restored frame of the data, that is, obtains the original data frame from the sending end; if the calibration fails, it returns to step (3) to restore and reassemble the N encrypted sub-data based on random numbers.
[0023] The present invention also includes a computer device comprising at least a processor and a memory, the processor being configured to implement any of the above-described methods for encrypting data using random numbers when executing a computer program stored in the memory.
[0024] The present invention also includes a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above for encrypting data using random numbers.
[0025] The beneficial effects of this invention are:
[0026] (1) This invention achieves multiple protections for data during transmission by sharing a preset key pool and multiple hash algorithms between the sending end and the receiving end, combined with random number encryption processing of payload fragments; the random number encryption mechanism ensures that the encrypted sub-data generated by the same original data is different each time it is transmitted, effectively resisting replay attacks, eavesdropping and brute-force cracking, and significantly improving the anti-attack capability of data transmission.
[0027] (2) Before the receiving end data processing, the present invention retrieves the local random number reference value, i.e., the random number offset position, and performs consistency verification with the local random number pointed to by the random number parameter carried by the received data. If an inconsistency is detected, it is determined that the local random number has been tampered with or offset, and the subsequent process is directly blocked. This mechanism effectively prevents the security risks caused by the tampering of the local random number and ensures the reliability of the encryption and decryption process.
[0028] (3) The receiving end of this invention adopts an equal-length data restoration algorithm, namely XOR operation, which is strictly matched with the sending end. By reverse calculation of random number parameters, the complete message fragment containing identity information, payload fragmentation and checksum is accurately restored. This method not only completes the identity verification of the sending end, but also realizes the dual verification of data integrity and consistency at the same time, which improves the efficiency and accuracy of data restoration while ensuring security.
[0029] (4) This invention reassembles the payload fragments and, after completing identity and data verification, restores the original payload content completely according to the fragmentation rules of the source end, i.e. the sending end. On this basis, the receiving end splices the corresponding frame header and frame tail for the reassembled original payload and performs reverse calibration (i.e., the sending end uses the first hash algorithm to calculate the hash value of the original frame, and the receiving end performs calibration again using the same hash algorithm after reassembling and restoring the frame to ensure that the data is not tampered with during transmission). This eliminates the data fluctuations that may be introduced during encrypted transmission and finally outputs a data stream that is completely consistent with the original traffic of the source end, ensuring end-to-end consistency and high fidelity of data restoration. Attached Figure Description
[0030] Figure 1 This is a flowchart of the method for encrypting data using random numbers according to the present invention;
[0031] Figure 2 This is a schematic diagram illustrating how the payload in the original frame is segmented according to the present invention;
[0032] Figure 3 This is a schematic diagram illustrating the random number encryption process performed on the payload slices according to the present invention;
[0033] Figure 4 This is a schematic diagram illustrating the random number-based restoration and fragmented recombination of the present invention;
[0034] Figure 5 This is a schematic diagram illustrating the calibration of the data restoration frame. Detailed Implementation
[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0036] As described in the background section, in existing end-to-end data transmission between UAVs, the receiving end typically assumes the key corresponding to the received key index is correct and usable upon receipt, lacking effective verification of the key's source legitimacy and consistency. This deficiency makes UAV systems vulnerable to key spoofing attacks. Attackers can forge key indexes to induce the receiving end to use incorrect or malicious keys, leading to decryption failures, data corruption, or security vulnerabilities. Furthermore, the introduction of encryption operations and additional information such as key indexes significantly increases the length of the original data frame. Excessively long data frames increase transmission latency, channel occupancy time, and consequently, communication efficiency decreases and resource waste. Therefore, how to effectively verify the legitimacy and correctness of keys while ensuring secure end-to-end data transmission between UAVs, and simultaneously avoid transmission efficiency losses due to encryption and verification mechanisms, has become a critical technical problem urgently needing to be solved in the current UAV communication field.
[0037] like Figure 1 As shown, in view of this, the present invention proposes a method for encrypting data using random numbers. The entire data transmission process of this method mainly includes two processes: at the source end (sender), the process of fragmenting the original payload and encrypting the original frame using random numbers; at the destination end (receiver), the process of decrypting and reconstructing the received data using random numbers. Specifically, the method includes the following steps:
[0038] (1) The sender and receiver share a preset key pool, and the sender and receiver share a first hash algorithm, a second hash algorithm and a checksum algorithm; wherein the first hash algorithm and the second hash algorithm are the same or different, and the hash algorithms of the first hash algorithm and the second hash algorithm can be traditional hash algorithms or quantum hash algorithms. The traditional hash algorithm can be any one of MD4, MD5, SHA2, SHA3 and MASH-1 algorithms; the quantum hash algorithm is a hash function based on a linear feedback shift register obtained by selecting an irreducible polynomial and inputting random numbers.
[0039] (2) The sending end (source end) reads the original frame of the data, which includes a frame header, payload, and frame trailer. The first hash value is then calculated using the first hash algorithm. The payload in the original frame is then divided into equal-length payload fragments, such as... Figure 2 As shown in the example, this embodiment divides the payload of the original frame into a first payload fragment and a second payload fragment. The size of the fragment can be divided according to the fixed number of bytes transmitted, such as 128 bytes, 256 bytes, etc.
[0040] Then, random number encryption is performed on the first to Nth payload slices to obtain N encrypted sub-data. The specific process is as follows:
[0041] 1) For the first payload fragment, the sender obtains a random number rand1 from the key file of the shared key pool, the length of which is recorded as L1, and records the index idx-rand1 of the random number; the second hash value is obtained by calculating the hash value of the random number rand1 using the second hash algorithm, and the second hash value is assigned as the first quantum-secure identity of the first payload fragment. Then, the first checksum is obtained by calculating the checksum of the first quantum-secure identity and the first payload fragment using the local checksum algorithm.
[0042] The sending end then performs an XOR operation with the combination of the random number rand1 and the first quantum security identity, the first payload fragment, and the first checksum to obtain the first intermediate frame. The combined length of the first quantum security identity, the first payload fragment, and the first checksum is also L1. Next, the frame header and frame trailer are obtained from the original data frame, and a guide header is generated. The guide header includes the index idx-rand1 of the random number and the fragment number of the first payload fragment. The index idx-rand1 of the random number includes the offset position and offset length of the random number. Then, the frame header, guide header, first intermediate frame, and frame trailer of the original frame are combined to obtain the first encrypted sub-data.
[0043] 2) For other payload fragments, such as the second to Nth payload fragments, the same processing method as in step 1) is used to obtain the second to Nth encrypted sub-data. At this point, the sending end receives N encrypted sub-data. Each encrypted sub-data then conforms to the original frame format. For example... Figure 3 As shown in the figure, this embodiment demonstrates that the first payload slice and the second payload slice are subjected to random number encryption to obtain the first encrypted sub-data and the second encrypted sub-data. The generation process of the encrypted sub-data can be seen in the figure.
[0044] Finally, the sending end sends N encrypted sub-data and the first hash value to the receiving end. In addition to fragmenting the original frame and randomizing the payload fragments, the entire process also embeds quantum-secure identity, a header for each frame, and a checksum field to ensure identity reliability, data integrity, and consistency.
[0045] Therefore, this invention, by fragmenting the original frame payload and introducing a random number encryption mechanism for each fragment, makes the data traffic output by the sending end appear as an irregular and featureless random state without introducing significant transmission delay. This effectively hides the structure and characteristics of the original data and can resist source tracing and malicious analysis attacks based on traffic fingerprints. Moreover, during the encryption and reassembly process, lightweight security mechanisms such as fragment randomization and checksum fields are used to avoid transmission delays caused by complex encryption and decryption operations, thus meeting the requirements for low-latency transmission while maintaining high security.
[0046] (3) The receiving end restores and reassembles the N encrypted sub-data based on random numbers. The specific process is as follows:
[0047] A1: As Figure 4 As shown, for the first encrypted sub-data, the receiving end retrieves the current random number offset position of the key file in the local shared key pool and performs a consistency check with the random number offset position in the random number index idx-rand1 in the header of the first encrypted sub-data. If they match, the next step continues; if they do not match, it indicates that the local random number has been tampered with or shifted, and the verification step will directly determine failure and notify the sending end to retransmit the encrypted sub-data. Before the receiving end processes the data, this invention retrieves the local random number baseline value, i.e., the random number offset position, and performs a consistency check with the local random number pointed to by the random number parameter carried by the received data. If an inconsistency is detected, it is determined that the local random number has been tampered with or shifted, and the subsequent process is directly blocked. This mechanism effectively prevents security risks caused by the tampering of the local random number and ensures the reliability of the encryption and decryption process.
[0048] Based on the consistency of the random number offset position verification, the receiving end continues to obtain the random number rand1' locally according to the random number index idx-rand1 in the header. It then performs an XOR operation on the random number rand1' and the first intermediate frame in the first encrypted sub-data to obtain the combination of the first quantum secure identity', the first payload fragment', and the first checksum'. Next, it uses the locally shared second hash algorithm to calculate the hash value of the random number rand1' to obtain the third hash value. It performs a consistency verification between the third hash value and the first quantum secure identity'. If they match, it continues to use the locally shared checksum algorithm to calculate the checksum between the third hash value and the first payload fragment' to obtain the second checksum. It performs a consistency verification between the second checksum and the first checksum'. If they match, it means that the first payload fragment' is complete, and the receiving end separates the first payload fragment' for storage.
[0049] A2: For the second encrypted sub-data to the Nth encrypted sub-data, the same method as in step A1 above is used to obtain the second payload fragment 'to the Nth payload fragment'; at this point, the receiving end obtains N payload fragments '; the receiving end of this invention uses an equal-length data restoration algorithm, i.e., XOR operation, that is strictly matched with the sending end, and accurately restores the complete message segment containing identity information, payload fragments, and checksum by reverse calculation using random number parameters; this method not only completes the identity verification of the sending end, but also simultaneously realizes the dual verification of data integrity and consistency, improving the efficiency and accuracy of data restoration while ensuring security.
[0050] Then, the receiving end reassembles the fragments according to the fragment numbers corresponding to the first payload fragment ' to the Nth payload fragment' to obtain the restored payload. Then, it combines the frame header, frame tail and restored payload in the encrypted sub-data to finally obtain the restored data frame.
[0051] Then, the data restoration frame is calibrated based on the first hash algorithm, specifically referring to: such as Figure 5 As shown, the receiving end uses the locally shared first hash algorithm to calculate the hash value of the restored frame to obtain the fourth hash value; the fourth hash value is calibrated with the received first hash value. If the calibration passes, the receiving end receives the restored frame of the data, that is, obtains the original data frame from the sending end; if the calibration fails, it returns to step (3) to restore and reassemble the N encrypted sub-data based on random numbers. It can be seen that calibrating the restored frame of the data accurately restores the original payload content, eliminates the fluctuations introduced during the shaping process, and ensures that the data stream output by the receiving end is completely consistent with the original traffic of the source end. This improves security while taking into account the reliability and accuracy of data transmission.
[0052] In summary, this invention achieves multiple layers of protection for data during transmission by sharing a preset key pool and multiple hash algorithms between the sending and receiving ends, combined with random number encryption processing of payload fragments. The random number encryption mechanism ensures that the encrypted sub-data generated for each transmission of the same original data is different, effectively resisting replay attacks, eavesdropping, and brute-force attacks, significantly improving the anti-attack capability of data transmission. Simultaneously, this invention reassembles the payload fragments and, after completing identity and data verification, fully restores the original payload content according to the fragmentation rules of the source end (i.e., the sending end). Based on this, the receiving end splices the corresponding frame header and frame trailer for the reassembled original payload and performs reverse calibration, eliminating data fluctuations that may be introduced during encrypted transmission. The final output is a data stream completely consistent with the original traffic at the source end, ensuring end-to-end consistency and high fidelity of data restoration.
[0053] This invention also provides a computer device, which includes at least a processor and a memory. The memory stores a computer program, and the processor executes the computer program stored in the memory to implement the steps of the method for encrypting data using random numbers according to this invention.
[0054] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for encrypting data using random numbers according to this invention.
Claims
1. A method for encrypting data using random numbers, characterized in that, The method includes the following steps: (1) The sender and receiver share a preset key pool, and the sender and receiver share a first hash algorithm, a second hash algorithm and a checksum algorithm; (2) The sending end reads the original frame of the data and uses the first hash algorithm to calculate the hash value of the original frame to obtain the first hash value; then the payload in the original frame is divided into the first to Nth payload fragments of equal length, and the first to Nth payload fragments are encrypted with random numbers to obtain N encrypted sub-data; then the N encrypted sub-data and the first hash value are sent to the receiving end. (3) The receiving end restores and reassembles the N encrypted sub-data based on random numbers to finally obtain the restored data frame; The data restoration frame is then calibrated based on the first hash algorithm. If the calibration is successful, the receiving end receives the data restoration frame, thus obtaining the original data frame from the sending end.
2. The method for encrypting data using random numbers according to claim 1, characterized in that: The specific process of performing random number encryption on the first to Nth payload slices to obtain N encrypted sub-data is as follows: 1) For the first payload fragment, the sender obtains a random number rand1 from the key file of the shared key pool and records the index idx-rand1 of the random number; it calculates the hash value of the random number rand1 using the second hash algorithm to obtain the second hash value, assigns the second hash value as the first quantum-secure identity of the first payload fragment, and then calculates the checksum of the first quantum-secure identity and the first payload fragment using the local checksum algorithm to obtain the first checksum; The sending end then performs an XOR operation with the combination of the random number rand1, the first quantum security identity, the first payload fragment, and the first checksum to obtain the first intermediate frame; then it obtains the frame header and frame trailer from the original data frame, generates a guide header, and combines the frame header, guide header, first intermediate frame, and frame trailer of the original frame to obtain the first encrypted sub-data; 2) For the second to Nth payload segments, the second to Nth encrypted sub-data are obtained using the same method as in step 1) above; At this point, the sending end has received N encrypted sub-data.
3. The method for encrypting data using random numbers according to claim 2, characterized in that: The header includes a random number index idx-rand1 and a fragment number of the first payload fragment; the random number index idx-rand1 includes the offset position and offset length of the random number.
4. The method for encrypting data using random numbers according to claim 1, characterized in that: The first hash algorithm and the second hash algorithm may be the same or different, and the hash algorithm of the first hash algorithm and the second hash algorithm is a traditional hash algorithm or a quantum hash algorithm. The traditional hash algorithm is any one of MD4, MD5, SHA2, SHA3 and MASH-1 algorithms; the quantum hash algorithm is a hash function based on a linear feedback shift register obtained by selecting an irreducible polynomial and inputting random numbers.
5. A method for encrypting data using random numbers according to claim 2, characterized in that: The specific process of restoring and reassembling N encrypted sub-data based on random numbers is as follows: A1: For the first encrypted sub-data, the receiving end retrieves the current random number offset position of the key file in the local shared key pool and performs a consistency check with the random number offset position in the random number index idx-rand1 in the header of the first encrypted sub-data. If they match, proceed to the next step. If there is a discrepancy, the sender is notified to retransmit the encrypted sub-data. Based on the consistency of the random number offset position verification, the receiving end continues to obtain the random number rand1' locally according to the random number index idx-rand1 in the header. It then performs an XOR operation on the random number rand1' and the first intermediate frame in the first encrypted sub-data to obtain the combination of the first quantum secure identity', the first payload fragment', and the first checksum'. Next, it uses the locally shared second hash algorithm to calculate the hash value of the random number rand1' to obtain the third hash value. It performs a consistency verification between the third hash value and the first quantum secure identity'. If they match, it continues to use the locally shared checksum algorithm to calculate the checksum between the third hash value and the first payload fragment' to obtain the second checksum. It performs a consistency verification between the second checksum and the first checksum'. If they match, it means that the first payload fragment' is complete, and the receiving end separates the first payload fragment' for storage. A2: For the second encrypted sub-data to the Nth encrypted sub-data, the same method as in step A1 above is used to obtain the second payload fragment 'to the Nth payload fragment'; at this point, the receiving end obtains N payload fragments '. Then, the receiving end reassembles the fragments according to the fragment sequence numbers corresponding to the first payload fragments 'to the Nth payload fragment' to obtain the restored payload. Then, the frame header, frame tail and restored payload in the encrypted sub-data are combined to finally obtain the restored frame of the data.
6. The method for encrypting data using random numbers according to claim 1, characterized in that: The calibration of the data restoration frame based on the first hash algorithm refers to: The receiving end uses the locally shared first hash algorithm to calculate the hash value of the restored frame to obtain the fourth hash value; the fourth hash value is calibrated with the received first hash value. If the calibration is successful, the receiving end receives the restored frame of the data, that is, obtains the original data frame from the sending end. If calibration fails, return to step (3) to restore and reassemble the N encrypted sub-data based on random numbers.
7. A computer device, characterized in that: The computer device includes at least a processor and a memory, wherein the processor is configured to implement the method of encrypting data using random numbers as described in any one of claims 1-6 when executing a computer program stored in the memory.
8. A computer-readable storage medium, characterized in that: It stores a computer program that, when executed by a processor, implements the method of encrypting data using random numbers as described in any one of claims 1-6.