A data communication method based on checksum
Through the data communication method of splitting the encryption key into subkeys and performing checksum calculations, the problems of relay key exposure and overall data consistency are solved, and efficient and secure data transmission and decryption processes are realized.
Patent Information
- Application Number
- CN202510735447.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-06-04
AI Technical Summary
In the field of quantum information security, the relay party has a risk of key exposure during data transmission, and traditional checksum methods cannot ensure the overall consistency and security of the data, resulting in data leakage or corruption.
The data communication method based on the checksum is used to split the encryption key into two subkeys, and the checksum calculation is performed during the transmission process to ensure the confidentiality and integrity of the key. The relay party only performs key verification and does not participate in the decryption calculation.
It improves the security and transmission efficiency of keys, reduces the risk of relay key leakage, ensures the invisibility of data transmission and decrypted data integrity, and simplifies key management.
Smart Images

Figure CN120263549B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data communication method based on checksum. Background Art
[0002] In the field of quantum information security, when the sender and receiver are located in isolated network environments (such as enterprise intranets and public networks, military networks with different security levels), or are separated by long distances and unable to communicate directly, a relay (such as a gateway or proxy server) is required to relay data. In a data transmission architecture involving multiple parties, data security is a crucial concern. If a single key is used during encrypted communication, an attacker can decrypt all data once they obtain it, lacking a layered protection mechanism. Relays can expose the plaintext key during key transmission, increasing the risk of man-in-the-middle attacks or internal leaks. Attackers can tamper with the key, forcing the receiver to use the incorrect key for decryption. If key integrity cannot be guaranteed, data leakage or corruption can occur. Therefore, secure key management and efficient transmission are crucial to ensuring data confidentiality, integrity, and availability. Traditional checksums typically only apply to ciphertext or partial data and cannot ensure the overall consistency of the combined data after decryption. If decryption succeeds but the data has been tampered with, the system may not detect it in time, leading to business logic errors or security vulnerabilities. The relayer must be completely trustworthy; otherwise, the key could be stolen or tampered with, which violates the principle of zero-trust security. Key transmission is highly coupled with data decryption, forcing the relayer to participate in decryption calculations, increasing performance overhead and exposing risks. Therefore, a data communication method that ensures efficient and accurate data verification while also guaranteeing data security is urgently needed. Summary of the Invention
[0003] Purpose of the invention: This application provides a data communication method based on checksum to solve the problems existing in the prior art.
[0004] Technical solution: The present invention provides a checksum-based data communication method. Participants in the method include a sender, a first relay, and a receiver. The sender and the receiver are connected in communication via the first relay. The method includes the following steps:
[0005] Step 1: The sender transmits data based on Calculate the checksum and transmit data Chinese data content The first transmission data frame is generated after encryption , sent to the first relay party;
[0006] Step 2: The first relay receives the first transmission data frame And verify, after the verification is passed, generate the second transmission data frame , and sent to the recipient;
[0007] Step 3: The receiver receives the second transmission data frame And verify it, and obtain the data content after the verification is passed.
[0008] As an improvement of the present invention, in step 1, the sender transmits data based on Calculating the checksum specifically includes:
[0009] The sender generates transmission data , the transmission data Including frame header and the data content to be transmitted The sender is pre-configured with a data transmission format, the data transmission format including a frame header field, a key index field, a checksum field, and a ciphertext field;
[0010] The sender parses the data content , according to the data content The length of the encrypted data is determined by The length of the encryption key ; and obtain the length of the key index field and checksum field from the data transmission format ;
[0011] The sender based on the length and length The sum of the two determines the first encryption key Length , based on length Get the first encryption key of the corresponding length from the local key file , and record the first encryption key First key index ; The sender sends the frame header Fill in the frame header field of the data transmission format and set the first key index Fill in the key index field of the data transmission format;
[0012] The sender sends the first encryption key Split into two equal-length keys, recorded as the first encryption subkey and the second encryption subkey , and index the first key Corresponding split into the corresponding first encryption subkey The first subkey index of and the corresponding second encryption subkey The second subkey index of ;
[0013] The sender uses a checksum algorithm to calculate the frame header , first key index and the first encryption key The combined checksum of , the first checksum Fill in the key checksum field of the data transmission format; at the same time, the sender uses the checksum algorithm to calculate the data content The checksum of .
[0014] As an improvement of the present invention, in step 1, the transmission data Chinese data content The first transmission data frame is generated after encryption Specifically include:
[0015] The sender uses the first encryption subkey Encrypt the second encryption subkey , get the first sub-ciphertext ; The sender indexes the second subkey , Second checksum and data content concatenate together and encrypt using the second subkey Perform the encryption operation to obtain the second sub-ciphertext ; The first sub-ciphertext and the second sub-ciphertext Splice together to get the first ciphertext , the first ciphertext Fill it into the ciphertext field in the data transmission format to generate the first transmission data frame .
[0016] As an improvement of the present invention, in step 2, the first relay receives the first transmission data frame Verification includes:
[0017] The first relay receives the first transmission data frame Parse and obtain the frame header , key index , checksum 、ciphertext ; Among them, the ciphertext Sub-ciphertext Hezi Ciphertext splicing;
[0018] The first relay party uses the key index Obtain the first decryption key in the first relay party's local key file that is the same as the sender's , use the checksum algorithm to calculate the frame header , key index and the first decryption key The combined checksum of , compare and parse the checksum obtained With the third checksum If the values are consistent, the verification is successful and the verification process continues; otherwise, an error is reported to the sender and the data transmission process ends;
[0019] The first relay uses the same key index splitting method as the sender to split the key index Split into subkey indexes and subkey index , indexed by subkey Obtain the first decryption subkey in the same key file as the sender in the first relay party's local , indexed by subkey Obtain the second decryption subkey in the same key file as the sender on the first relay party ; Use the first decryption subkey Decrypting the sub-ciphertext , get the first relay subkey , compare the second decryption subkey With the first relay subkey Are they consistent? If so, the verification is successful and the next step is entered; otherwise, an error is reported to the sender and the data transmission process ends.
[0020] As an improvement of the present invention, in step 2, the second transmission data frame is generated Specifically include:
[0021] The first relay obtains the second decryption subkey with the same length as the key file of the first relay and the receiving party. The same third encryption subkey , and record the third encryption subkey The third subkey index of , index the third subkey Index with subkey Spliced into the second key index , index the third subkey Fill in the key index field of the data transmission format;
[0022] The first relay party uses the third encryption subkey With the second decryption subkey Concatenate into the second encryption key , use the checksum algorithm to calculate the frame header , Second Key Index and the second encryption key The combined checksum of , the fourth checksum Fill in the key checksum field of the data transmission format;
[0023] The first relay uses the third encryption subkey Encrypted second decryption subkey , get the third sub-ciphertext , using the third sub-ciphertext Replace sub-ciphertext , and the sub-ciphertext Splicing to get the second ciphertext , the second ciphertext Fill it into the ciphertext field in the data transmission format to generate the second transmission data frame .
[0024] As an improvement of the present invention, if the third subkey index The length of the key index field is not enough to meet the length requirement of the key index field, then the third subkey index The insufficient length in the key index field is automatically supplemented.
[0025] As an improvement of the present invention, step 3 specifically includes:
[0026] The receiver receives the second transmission data frame Parse and obtain the frame header , subkey index , checksum 、ciphertext ; Among them, the ciphertext Sub-ciphertext Hezi Ciphertext splicing;
[0027] The receiver indexes the subkey Obtain the third decryption subkey in the key file on the receiving side that is the same as the first relay side , using the third decryption subkey Pair Ciphertext Perform the decryption operation to obtain the second relay subkey , using the second relay subkey Decrypting the sub-ciphertext , get the subkey index , checksum and data content ;
[0028] The receiver will use the third decryption subkey With the second relay subkey Spliced into the second decryption key , index the subkey Index with subkey Spliced into key index , use the checksum algorithm to calculate the frame header , key index and the second decryption key The combined checksum of , compare and parse the checksum obtained With the fifth checksum If the values are consistent, the verification is successful and the verification process continues; otherwise, an error is reported to the sender via the first relay and the data transmission process ends;
[0029] The receiver uses a checksum algorithm to calculate the data content The checksum of ; Compare the checksum obtained by decryption With the sixth checksum If the values are consistent, the verification is successful and the receiver obtains the data content. Otherwise, an error is reported to the sender via the first relay, ending the data transmission process.
[0030] As an improvement of the present invention, the first relay party and the sender have the same key file preset locally, and the first relay party and the receiver have the same key file preset locally, and the key file preset locally by the first relay party and the sender and the key file preset locally by the first relay party and the receiver are the same or different.
[0031] Beneficial effects:
[0032] 1. Split the encryption key into two encryption subkeys. An attacker must obtain all subkeys to recover the complete key, which increases the difficulty of attacking the key data and effectively improves the confidentiality of the key. At the same time, the key to be relayed is encrypted and encapsulated into the ciphertext to be transmitted, reducing the risk of leakage of the relay key, ensuring the correctness of the relay key, simplifying key management operations, and effectively improving decryption efficiency while maintaining security. This improves security while also taking into account practicality.
[0033] 2. Substitute the frame header, key index, and encryption key together to calculate the checksum. This protects the frame header information while binding the key index and the key itself to effectively resist key replacement / replay attacks.
[0034] 3. After decryption, the receiver recalculates the checksum of the combination of multiple data and compares the checksum to ensure that the decrypted data combination has not been tampered with and prevent metadata forgery. At the same time, if decryption fails, it may be due to a key error. If decryption succeeds but the checksum fails, it indicates that the data has been tampered with or the transmission is damaged, which facilitates fault location and troubleshooting.
[0035] 4. The decryption and verification of the transmitted content are only performed at the receiving end. The relay only ensures the correctness of the relay key and does not need to participate in the decryption calculation. This reduces performance overhead while effectively ensuring the invisibility of the transmitted content during the transmission process, reducing the risk of message exposure. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 This is a flowchart of the application method;
[0038] Figure 2 This is a schematic diagram of the specific process of step 2 of this application;
[0039] Figure 3 This is a schematic diagram of the specific process of step 3 of this application. DETAILED DESCRIPTION
[0040] To make the objectives, technical solutions, and advantages of this application more clear, this application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0041] The present invention provides a data communication method based on checksum, and the participants of the method include a sender and a receiver. In an embodiment of the present invention, there are multiple relay parties between the sender and the receiver, and the sender and the receiver are connected to each other through one or more relay parties. At this time, it is difficult for the sender and the receiver to directly pre-set the same key file. Therefore, the participants of the data communication method of the present invention also include a first relay party, and the first relay party and the sender and the receiver are pre-set with the same key file respectively. In an embodiment of the present invention, the multiple relay parties can of course also include other relay parties in addition to the first relay party, but taking the first relay party as an example is sufficient to illustrate the scheme described in this application. The processing of other relay parties can be similar to that of the first relay party here.
[0042] like Figure 1 As shown, the data communication method of the present invention includes the following steps:
[0043] Step 1: The sender transmits data based on Calculate the checksum and transmit data Chinese data content The first transmission data frame is generated after encryption , sent to the first relay party.
[0044] Specifically, the sender generates the transmission data , the transmission data Including frame header and the data content to be transmitted , parse the data content , according to the data content The length and encryption ratio determine the encrypted data content The length of the encryption key ; and obtain the length of the key index field and checksum field from the data transmission format The data transmission format is pre-configured in the sender and includes a frame header field, a key index field, a checksum field, and a ciphertext field. The frame header field should be filled with the frame header. , the frame header It includes the source port number, destination port number, encryption ratio, etc., among which the sender address and receiver address can be determined based on the source port number and destination port number; the encryption ratio is used to indicate the length ratio of the encryption key to the plaintext to be encrypted, such as 1:1, 1:2, etc.
[0045] The sender based on the length and length The sum of the two determines the first encryption key Length , based on length Get the first encryption key of the corresponding length from the local key file , and record the first encryption key First key index ; It should be noted that the corresponding length should conform to the frame header The first key index Including the first encryption key The start position and key length in the key file. The sender sends the frame header Fill in the frame header field of the data transmission format and set the first key index Filled into the key index field of the data transmission format. The frame header field and key index field of the data transmission format are in plain text state so that subsequent data parsing can be carried out quickly and efficiently.
[0046] The sender sends the first encryption key Split into two equal-length keys, recorded as the first encryption subkey and the second encryption subkey , and index the first key according to the offset position of the split in the key file It is also split into the corresponding first encryption subkey The first subkey index of and the corresponding second encryption subkey The second subkey index of Among them, the first encryption subkey is used As the encapsulation key, used to encrypt the second encryption subkey ; Use the second encryption subkey As generated data content The encryption key of the ciphertext, the second encryption subkey Is the key that needs to be relayed. Split into the first encryption subkey and the second encryption subkey , the attacker must obtain all subkeys to recover the complete key, and each subkey can use a different algorithm. For example, the first encryption subkey can be encrypted using the RSA algorithm or the XOR algorithm, and the second encryption subkey is encrypted using the AES algorithm. The attacker needs to crack both encryption algorithms at the same time, which increases the difficulty of attacking the key data.
[0047] The sender sends the frame header , first key index and the first encryption key Substitute as a parameter into the checksum algorithm, calculate the checksum, and get the first checksum , the first checksum Fill in the key checksum field of the data transmission format. The key checksum field of the data transmission format is in plain text so that subsequent data parsing can be carried out quickly and efficiently. , first key index and the first encryption key Substitute them together to calculate the checksum, protect the frame header information, and bind the key index and the key itself. If the key index is tampered with, the checksum verification fails, which can effectively resist the key itself from being replaced / replayed. The key index may be associated with metadata such as the key file name, key version, validity period, and purpose. The checksum can verify that this information has not been tampered with, ensuring the consistency of the key and metadata. At the same time, the sender also needs to use the checksum algorithm to calculate the data content The checksum of It should be noted that the second checksum In the embodiment of the present invention, the frame header field, key index field, and checksum field should be of fixed length, for example, 4 bytes, 8 bytes, etc.
[0048] The sender uses the first encryption subkey Encrypt the second encryption subkey , get the first sub-ciphertext , to encrypt the key to be relayed and encapsulate it into the ciphertext to protect the confidentiality of the relay key; the sender indexes the second subkey , Second checksum and data content concatenate together and encrypt using the second subkey Perform the encryption operation to obtain the second sub-ciphertext ; The first sub-ciphertext and the second sub-ciphertext Spliced together to form the complete first ciphertext to be transmitted , the first ciphertext Fill it into the ciphertext field in the data transmission format. The key to be relayed is encrypted and encapsulated into the ciphertext data packet to form a nested protection, which reduces the risk of leakage of the relay key, ensures the correctness of the relay key, simplifies the key management operation, and effectively improves the decryption efficiency of the data content under the premise of security, improving security while also taking into account practicality. At this point, the complete content of the data transmission format is completed, recorded as the first transmission data frame The sender transmits the first data frame Sent to the first relay.
[0049] Step 2: The first relay receives the first transmission data frame And verify, after the verification is passed, generate the second transmission data frame , and sent to the recipient.
[0050] like Figure 2 Specifically, the verification process includes the following:
[0051] The first relay receives the first transmission data frame Parse and obtain the frame header , key index , checksum 、ciphertext Among them, the ciphertext Sub-ciphertext Hezi Ciphertext splicing.
[0052] The first relay party uses the key index Obtain the first decryption key in the first relay party's local key file that is the same as the sender's , first we need to verify the first decryption key Integrity: Use the checksum algorithm to calculate the frame header , key index and the first decryption key The combined checksum of , compare and parse the checksum obtained With the third checksum Is the value consistent? If so, it means the first decryption key With the first encryption key If they are the same, the verification passes and the verification process continues; otherwise, an error is reported to the sender and the data transmission process ends.
[0053] The first relay uses the same key index splitting method as the sender to split the key index Split into subkey indexes and subkey index , indexed by subkey Obtain the first decryption subkey in the same key file as the sender in the first relay party's local , indexed by subkey Obtain the second decryption subkey in the same key file as the sender on the first relay party . Using the first decryption subkey Decrypting the sub-ciphertext , get the first relay subkey , compare the second decryption subkey With the first relay subkey Are they consistent? If so, it means the first relay subkey If the key has not been tampered with, the verification is passed, and the key to be relayed is transmitted correctly, you can proceed to the next step; otherwise, the key to be relayed is transmitted incorrectly and the data content cannot be decrypted. An error needs to be reported to the sender, ending the data transmission process.
[0054] The first relay party reconstructs the key index field, checksum field, and ciphertext field to generate a second transmission data frame , where the frame header field remains unchanged and is in plain text:
[0055] Reconstruct the key index field: The first relay obtains the length and the second decryption subkey in the key file that is the same as the receiver's local key file. The same third encryption subkey , and record the third encryption subkey The third subkey index of , index the third subkey Index with subkey Spliced into the second key index , index the third subkey Fill in the key index field of the data transmission format; it should be noted that since the length of the key index field is fixed, if the third subkey index The length of the key index field is not enough to meet the length requirement of the key index field, then the third subkey index The insufficient portion of the key index field can be automatically supplemented, for example, by using multiple zeros to complete the key index field; when the key index field is subsequently parsed, the portion of the field that is continuously zero should be discarded.
[0056] Reconstruct the checksum field: the third encryption subkey With the second decryption subkey Concatenate into the second encryption key , the frame header , Second Key Index and the second encryption key Substitute as a parameter into the checksum algorithm, calculate the checksum, and get the fourth checksum , the fourth checksum Filled into the key checksum field of the data transmission format.
[0057] Reconstruct the ciphertext field: The first relay uses the third encryption subkey Encrypted second decryption subkey , get the third sub-ciphertext , using the third sub-ciphertext Replace sub-ciphertext , and the sub-ciphertext Splicing to get the second ciphertext , the second ciphertext Fill in the ciphertext field in the data transmission format.
[0058] It should be noted that the first relay party and the sender have the same key file preset locally, and the first relay party and the receiver have the same key file preset locally. The key file preset locally by the first relay party and the sender and the key file preset locally by the first relay party and the receiver may be the same or different.
[0059] At this point, the complete content of the data transmission format is completed, recorded as the second transmission data frame The first relay sends the second transmission data frame Send to the recipient.
[0060] Step 3: The receiver receives the second transmission data frame And verify it, and obtain the data content after the verification is passed.
[0061] Specifically, if Figure 3 As shown, the verification process includes the following:
[0062] The receiver receives the second transmission data frame Parse and obtain the frame header , subkey index , checksum 、ciphertext Among them, the ciphertext Sub-ciphertext Hezi Ciphertext splicing.
[0063] The receiver indexes the subkey Obtain the third decryption subkey in the key file on the receiving side that is the same as the first relay side , using the third decryption subkey Pair Ciphertext Perform the decryption operation to obtain the second relay subkey , using the second relay subkey Decrypting the sub-ciphertext , get the subkey index , checksum and data content .
[0064] The receiver will use the third decryption subkey With the second relay subkey Spliced into the second decryption key , index the subkey Index with subkey Spliced into key index , use the checksum algorithm to calculate the frame header , key index and the second decryption key The combined checksum of , compare and parse the checksum obtained With the fifth checksum Is the value consistent? If so, it means the second decryption key If the data has not been tampered with during transmission, verification passes and the verification process continues. Otherwise, an error is reported to the sender via the first relay, and the data transmission process ends. After decryption, the receiver recalculates the checksum of the multiple data combinations and compares the checksums to ensure that the decrypted data combination has not been tampered with and prevent metadata forgery. Furthermore, if decryption fails, it may be due to a key error. If decryption succeeds but the checksum fails, it indicates data tampering or transmission corruption, facilitating fault location and troubleshooting.
[0065] The receiver also needs to use a checksum algorithm to calculate the data content The checksum of . Compare the checksum obtained by decryption With the sixth checksum Is the value consistent? If so, it indicates the data content The data has not been tampered with during transmission, the verification is passed, and the receiver obtains the data content Otherwise, an error is reported to the sender via the first relay, ending the data transmission process.
[0066] In the data communication method provided by the present invention, decryption and verification of the transmitted content are only performed in the receiving party, and the relay party only ensures the correctness of the relay key, which effectively ensures the invisibility of the transmitted content during the transmission process and reduces the risk of message exposure.
Claims
1. A data communication method based on a checksum, wherein the participants of the method include a sender, a first relay, and a receiver, wherein the sender and the receiver are connected to each other through the first relay, characterized in that: The method comprises the following steps: Step 1: The sender transmits data based on Calculate the checksum and transmit data Chinese data content The first transmission data frame is generated after encryption , sent to the first relay party; Step 2: The first relay receives the first transmission data frame And verify, after the verification is passed, generate the second transmission data frame , and sent to the recipient; Step 3: The receiver receives the second transmission data frame And verify, and obtain the data content after passing the verification; In step 1, the sender transmits data based on Calculating the checksum specifically includes: The sender generates transmission data , the transmission data Including frame header and the data content to be transmitted The sender is pre-configured with a data transmission format, the data transmission format including a frame header field, a key index field, a checksum field, and a ciphertext field; The sender parses the data content , according to the data content The length of the encrypted data is determined by The length of the encryption key ; and obtain the length of the key index field and checksum field from the data transmission format ; The sender based on the length and length The sum of the two determines the first encryption key Length , based on length Get the first encryption key of the corresponding length from the local key file , and record the first encryption key First key index ; The sender sends the frame header Fill in the frame header field of the data transmission format and set the first key index Fill in the key index field of the data transmission format; The sender sends the first encryption key Split into two equal-length keys, recorded as the first encryption subkey and the second encryption subkey , and index the first key Corresponding split into the corresponding first encryption subkey The first subkey index of and the corresponding second encryption subkey The second subkey index of ; The sender uses a checksum algorithm to calculate the frame header , first key index and the first encryption key The combined checksum of , the first checksum Fill in the key checksum field of the data transmission format; at the same time, the sender uses the checksum algorithm to calculate the data content The checksum of .
2. The checksum-based data communication method according to claim 1, wherein: In step 1, the pair transmits data Chinese data content The first transmission data frame is generated after encryption Specifically include: The sender uses the first encryption subkey Encrypt the second encryption subkey , get the first sub-ciphertext ; The sender indexes the second subkey , Second checksum and data content concatenate together and encrypt using the second subkey Perform the encryption operation to obtain the second sub-ciphertext ; The first sub-ciphertext and the second sub-ciphertext Splice together to get the first ciphertext , the first ciphertext Fill it into the ciphertext field in the data transmission format to generate the first transmission data frame .
3. The checksum-based data communication method according to claim 2, wherein: In step 2, the first relay receives the first transmission data frame Verification includes: The first relay receives the first transmission data frame Parse and obtain the frame header , key index , checksum 、ciphertext ; Among them, the ciphertext Sub-ciphertext Hezi Ciphertext splicing; The first relay party uses the key index Obtain the first decryption key in the first relay party's local key file that is the same as the sender's , use the checksum algorithm to calculate the frame header , key index and the first decryption key The combined checksum of , compare and parse the checksum obtained With the third checksum If the values are consistent, the verification is successful and the verification process continues; otherwise, an error is reported to the sender and the data transmission process ends; The first relay uses the same key index splitting method as the sender to split the key index Split into subkey indexes and subkey index , indexed by subkey Obtain the first decryption subkey in the first relay party's local key file that is the same as the sender's , indexed by subkey Obtain the second decryption subkey in the same key file as the sender on the first relay party ; Use the first decryption subkey Decrypting the sub-ciphertext , get the first relay subkey , compare the second decryption subkey With the first relay subkey Are they consistent? If so, the verification is successful and the next step is entered; otherwise, an error is reported to the sender and the data transmission process ends.
4. The checksum-based data communication method according to claim 3, wherein: In step 2, the second transmission data frame is generated Specifically include: The first relay obtains the second decryption subkey with the same length as the key file of the first relay and the receiving party. The same third encryption subkey , and record the third encryption subkey The third subkey index of , index the third subkey with subkey index Spliced into the second key index , index the third subkey Fill in the key index field of the data transmission format; The first relay party sends the third encryption subkey With the second decryption subkey Spliced into the second encryption key , use the checksum algorithm to calculate the frame header , Second Key Index and the second encryption key The combined checksum of , the fourth checksum Fill in the key checksum field of the data transmission format; The first relay uses the third encryption subkey Encrypted second decryption subkey , get the third sub-ciphertext , using the third sub-ciphertext Replace sub-ciphertext , and the sub-ciphertext Splicing to get the second ciphertext , the second ciphertext Fill it into the ciphertext field in the data transmission format to generate the second transmission data frame .
5. The checksum-based data communication method according to claim 4, wherein: If the third subkey index The length of the key index field is not enough to meet the length requirement of the key index field, then the third subkey index The insufficient length in the key index field is automatically supplemented.
6. The checksum-based data communication method according to claim 4, wherein: The step 3 specifically includes: The receiver receives the second transmission data frame Parse and obtain the frame header , subkey index , checksum 、ciphertext ; Among them, the ciphertext Sub-ciphertext Hezi Ciphertext splicing; The receiver indexes the subkey Obtain the third decryption subkey in the key file on the receiving side that is the same as the first relay side , using the third decryption subkey Pair Ciphertext Perform the decryption operation to obtain the second relay subkey , using the second relay subkey Decrypting the sub-ciphertext , get the subkey index , checksum and data content ; The receiver will use the third decryption subkey With the second relay subkey Spliced into the second decryption key , index the subkey Index with subkey Spliced into key index , use the checksum algorithm to calculate the frame header , key index and the second decryption key The combined checksum of , compare and parse the checksum obtained With the fifth checksum If the values are consistent, the verification is successful and the verification process continues; otherwise, an error is reported to the sender via the first relay and the data transmission process ends; The receiver uses a checksum algorithm to calculate the data content The checksum of ; Compare the checksum obtained by decryption With the sixth checksum If the values are consistent, the verification is successful and the receiver obtains the data content. Otherwise, an error is reported to the sender via the first relay, ending the data transmission process.
7. The checksum-based data communication method according to claim 1, wherein: The first relay party and the sender have the same key file preset locally, and the first relay party and the receiver have the same key file preset locally. The key file preset locally by the first relay party and the sender and the key file preset locally by the first relay party and the receiver are the same or different.
Citation Information
Patent Citations
Quantum communication method and communication network based on secure relay
CN112787807A
Key relay method of quantum security network
CN115514475A