Data transmission encryption method
By using a dynamic timestamp-based key generation and distributed key storage scheme, the problem of insufficient dynamic adaptability and robustness in existing technologies is solved, achieving efficient and secure data transmission.
Patent Information
- Application Number
- CN202511677471.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies lack dynamic adaptability and robustness in distributed data transmission, are vulnerable to quantum computing threats, and key management and data segmentation strategies cannot adapt to network bandwidth fluctuations, resulting in low security and efficiency.
A basic key generation method with dynamic associated timestamps is adopted. The key is divided into multiple parts through an (t, n) threshold secret sharing scheme. Combined with a lightweight session binding protocol and a quantum-resistant hash algorithm, the key is distributed for storage and verification, and the transmission parameters are dynamically adjusted to adapt to network changes.
It improves the dynamic security and integrity of data transmission, reduces the risk of man-in-the-middle attacks, avoids session failures caused by timestamp tampering and network latency, and improves transmission efficiency.
Smart Images

Figure CN121333573A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission processing technology, and more specifically to a data transmission encryption method. Background Technology
[0002] In the field of distributed data transmission, secure encryption technology is the core means to ensure the confidentiality and integrity of communication. Currently, most mainstream solutions employ static key management mechanisms, whose key generation relies on fixed parameters and lacks dynamic adaptability. For example, in traditional methods, keys are typically distributed centrally by a server; a leak could expose all network data. While timestamp-based encryption schemes can mitigate the risk of replay attacks, timestamps are easily tampered with by man-in-the-middle attacks and are not deeply bound to the transmission session, allowing attackers to hijack communication links by forging timestamps.
[0003] At the integrity verification level, traditional solutions often rely on a single mechanism, but such algorithms are vulnerable to collision attacks, especially under the threat of quantum computing, rendering data integrity protection virtually ineffective. Furthermore, data partitioning strategies typically use fixed sizes, failing to adapt to network bandwidth fluctuations and leading to a sharp drop in transmission efficiency in high-latency scenarios. More critically, existing technologies lack a secondary protection mechanism for key shares.
[0004] The aforementioned shortcomings collectively result in significant bottlenecks in the security, efficiency, and resistance to quantum threats of existing solutions, necessitating a data transmission encryption method that balances dynamism, robustness, and future security. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a data transmission encryption method that improves the dynamic security and integrity of data transmission.
[0006] The data transmission encryption method provided by this invention includes the following steps: S1. Generate a transmission session identifier for the data to be transmitted, and generate a basic key dynamically associated with the current timestamp; S2. Divide the basic key into n key shares using the (t, n) threshold secret sharing scheme, where t is the reconstruction threshold and 2≤t≤n, and n is the total number of nodes participating in data transmission; S3. Distribute the key shares among the n participating nodes, wherein the first key share is exclusively stored by the session management node and has unique access rights, and the remaining n-1 second key shares are distributedly stored by the other participating nodes. S4. Based on the transmission session identifier, current timestamp, node identifier, and the basic key, generate a synchronization key using a key derivation function; S5. Encrypt the data to be transmitted using the synchronization key, and perform an integrity check on the encrypted data before transmission; S6. When reconstructing the basic key at the data receiving end, the next step is performed only if the following verification conditions are met simultaneously: The session management node and at least t-1 other participating nodes are accessed synchronously to provide key shares; All information of the transmission session, including the transmission session identifier, timestamp, and node identifier, is verified to be valid through digital signature. The transmission session identifier is bound to a high-precision timestamp provided by the central time source, and the binding relationship is verified through a lightweight session binding protocol. S7. Verify the validity of the synchronization key based on the reconstructed base key, and complete the data decryption.
[0007] As a preferred approach, the (t, n) threshold secret sharing scheme adopts an improved Shamir's scheme, wherein: Before being distributed into storage, the second key share is encrypted a second time using a node-preset encryption key. The node-specific encryption key is dynamically generated based on the node identifier and the hardware security module. The t value is dynamically adjusted according to the network environment. When the network latency is higher than the threshold, the t value is reduced to accelerate key reconstruction. The finite field parameter of the secret sharing scheme adopts the prime field GF(p), where p is a large prime number with more than 256 bits, to resist brute-force attacks.
[0008] As a preferred embodiment, the lightweight session binding protocol in S6 includes: During the initialization of the transmission session, a digital signature is generated for the timestamp by a central time source, and the signature is embedded in the hash digest of the transmission session identifier; The session management node stores the Merkle tree root node value of the hash digest, which is used to verify the binding relationship between the transmission session identifier and the timestamp when reconstructing the base key; If the binding verification fails, immediately terminate the key reconstruction and trigger a security alarm.
[0009] As a preferred embodiment, the integrity check in S5 includes: A cyclic redundancy check code based on a quantum-resistant hash algorithm is generated for the data to be transmitted, wherein the quantum-resistant hash algorithm adopts the SPHINCS+ scheme; Perform hash tree verification on the distributed storage path of the second key share, wherein the leaf nodes of the hash tree are the key shares after secondary encryption, and the root hash value is stored in the session management node; If integrity verification fails, the current transmission session is automatically discarded and the base key is regenerated.
[0010] As a preferred embodiment, the method further includes the following step before step S4: The data to be transmitted is divided into blocks, and the size of each data block is dynamically adjusted according to the real-time network bandwidth. A quantum-safe hash digest containing a transmission session identifier and a timestamp is embedded in the header of each data block. The quantum-safe hash digest is generated using the lattice-based CRYSTALS-Dilithium algorithm. The block size adjustment follows the formula: BlockSize = BaseSize × (1 + α × BandwidthFluctuation), Where α is the bandwidth fluctuation coefficient and BaseSize is the base block size.
[0011] As a preferred method, after data transmission is completed, the receiving end verifies the data's correctness through the following steps: Obtain all information about the transmission session, including the transmission session identifier, timestamp, and node identifier; The session management node and at least one other participating node are requested to provide key shares to reconstruct the base key; The validity of the synchronization key is verified using the reconstructed base key, and the integrity check code is used to confirm that the data has not been tampered with. If verification fails, a retransmission mechanism is initiated: the current transmission session identifier is retained but the timestamp is updated, the basic key generation and synchronization key derivation steps are re-executed, and the backup encryption channel is switched when the number of retransmissions exceeds the threshold.
[0012] As a preferred method, the generation of the node's preset encryption key includes the following steps: Based on the node identifier and the random entropy value output by the hardware security module, the key is generated through the HKDF key derivation function and refreshed at a preset period. The key is also automatically destroyed when a physical attack is detected. The secondary encryption uses AES-256-GCM mode to ensure the confidentiality and integrity of the key share.
[0013] The beneficial effects of this invention are as follows: This invention dynamically associates a base key with a timestamp and introduces a lightweight session binding protocol. This ensures a strong binding between the transmission session identifier and a central time source: the timestamp is digitally signed and embedded with a hash digest, and the binding relationship is verified by the Merkle tree root node value. This not only completely eliminates the possibility of man-in-the-middle tampering with the timestamp but also avoids session failures caused by time synchronization errors in traditional schemes.
[0014] Furthermore, the data transmission parameters themselves are used as a key splitting technique during the encryption process to prevent attackers from attacking a terminal participating in the transmission session to steal data, thereby reducing the risk of security leakage. Attached Figure Description
[0015] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the method provided in Embodiment 1 of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The data transmission encryption method provided in this disclosure embodiment, such as Figure 1 As shown, it includes the following steps: S1. Generate a transmission session identifier for the data to be transmitted, and generate a basic key dynamically associated with the current timestamp; S2. Divide the basic key into n key shares using the (t, n) threshold secret sharing scheme, where t is the reconstruction threshold and 2≤t≤n, and n is the total number of nodes participating in data transmission; S3. Distribute the key shares among the n participating nodes, wherein the first key share is exclusively stored by the session management node and has unique access rights, and the remaining n-1 second key shares are distributedly stored by the other participating nodes. S4. Based on the transmission session identifier, current timestamp, node identifier, and the basic key, generate a synchronization key using a key derivation function; S5. Encrypt the data to be transmitted using the synchronization key, and perform an integrity check on the encrypted data before transmission; S6. When reconstructing the basic key at the data receiving end, the next step is performed only if the following verification conditions are met simultaneously: The session management node and at least t-1 other participating nodes are accessed synchronously to provide key shares; All information of the transmission session, including the transmission session identifier, timestamp, and node identifier, is verified to be valid through digital signature. The transmission session identifier is bound to a high-precision timestamp provided by the central time source, and the binding relationship is verified through a lightweight session binding protocol. S7. Verify the validity of the synchronization key based on the reconstructed base key, and complete the data decryption.
[0019] As a preferred approach, the (t, n) threshold secret sharing scheme adopts an improved Shamir's scheme, wherein: Before being distributed into storage, the second key share is encrypted a second time using a node-preset encryption key. The node-specific encryption key is dynamically generated based on the node identifier and the hardware security module. The t value is dynamically adjusted according to the network environment. When the network latency is higher than the threshold, the t value is reduced to accelerate key reconstruction. The finite field parameter of the secret sharing scheme adopts the prime field GF(p), where p is a large prime number with more than 256 bits, to resist brute-force attacks.
[0020] As a preferred embodiment, the lightweight session binding protocol in S6 includes: During the initialization of the transmission session, a digital signature is generated for the timestamp by a central time source, and the signature is embedded in the hash digest of the transmission session identifier; The session management node stores the Merkle tree root node value of the hash digest, which is used to verify the binding relationship between the transmission session identifier and the timestamp when reconstructing the base key; If the binding verification fails, immediately terminate the key reconstruction and trigger a security alarm.
[0021] As a preferred embodiment, the integrity check in S5 includes: A cyclic redundancy check code based on a quantum-resistant hash algorithm is generated for the data to be transmitted, wherein the quantum-resistant hash algorithm adopts the SPHINCS+ scheme; Perform hash tree verification on the distributed storage path of the second key share, wherein the leaf nodes of the hash tree are the key shares after secondary encryption, and the root hash value is stored in the session management node; If integrity verification fails, the current transmission session is automatically discarded and the base key is regenerated.
[0022] As a preferred embodiment, the method further includes the following step before step S4: The data to be transmitted is divided into blocks, and the size of each data block is dynamically adjusted according to the real-time network bandwidth. A quantum-safe hash digest containing a transmission session identifier and a timestamp is embedded in the header of each data block. The quantum-safe hash digest is generated using the lattice-based CRYSTALS-Dilithium algorithm. The block size adjustment follows the formula: BlockSize = BaseSize × (1 + α × BandwidthFluctuation), Where α is the bandwidth fluctuation coefficient and BaseSize is the base block size.
[0023] As a preferred method, after data transmission is completed, the receiving end verifies the data's correctness through the following steps: Obtain all information about the transmission session, including the transmission session identifier, timestamp, and node identifier; The session management node and at least one other participating node are requested to provide key shares to reconstruct the base key; The validity of the synchronization key is verified using the reconstructed base key, and the integrity check code is used to confirm that the data has not been tampered with. If verification fails, a retransmission mechanism is initiated: the current transmission session identifier is retained but the timestamp is updated, the basic key generation and synchronization key derivation steps are re-executed, and the backup encryption channel is switched when the number of retransmissions exceeds the threshold.
[0024] As a preferred method, the generation of the node's preset encryption key includes the following steps: Based on the node identifier and the random entropy value output by the hardware security module, the key is generated through the HKDF key derivation function and refreshed at a preset period. The key is also automatically destroyed when a physical attack is detected. The secondary encryption uses AES-256-GCM mode to ensure the confidentiality and integrity of the key share.
[0025] The beneficial effects of the embodiments disclosed herein are as follows: This disclosure, through dynamically associating a base key with a timestamp and introducing a lightweight session binding protocol, ensures a strong binding between the transmission session identifier and the central time source: the timestamp is digitally signed and embedded with a hash digest, and the binding relationship is verified by the Merkle tree root node value. This not only completely eliminates the possibility of man-in-the-middle tampering with the timestamp but also avoids the session failure problem caused by time synchronization errors in traditional schemes.
[0026] Furthermore, the data transmission parameters themselves are used as a key splitting technique during the encryption process to prevent attackers from attacking a terminal participating in the transmission session to steal data, thereby reducing the risk of security leakage.
[0027] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, function, and operation of possible implementations of apparatus, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than those disclosed in the description; sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based device that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
Claims
1. A data transmission encryption method, characterized by, Comprising the following steps: S1, generating a transmission session identifier for the data to be transmitted, and generating a base key dynamically associated with the current timestamp based on the timestamp; S2, splitting the base key into n key shares through a (t, n) threshold secret sharing scheme, where t is the reconstruction threshold and 2≤t≤n, and n is the total number of nodes participating in data transmission; S3, distributing the key shares in the n participating nodes, where the first key share is stored exclusively by the session management node and has unique access, and the remaining n-1 second key shares are distributed by other participating nodes; S4, generating a synchronization key through a key derivation function based on the transmission session identifier, the current timestamp, the node identifier, and the base key; S5, encrypting the data to be transmitted using the synchronization key, and performing integrity verification on the encrypted data before transmission; S6, when reconstructing the base key at the data receiving end, only when the following verification conditions are met simultaneously, the next step is executed: The session management node and at least t-1 other participating nodes are synchronously accessed to provide key shares; The transmission session information including the transmission session identifier, the timestamp, and the node identifier is verified to be valid through digital signature; The transmission session identifier is bound to the high-precision timestamp provided by the central time source, and the binding relationship is verified through the lightweight session binding protocol; S7, verifying the validity of the synchronization key based on the reconstructed base key, and completing data decryption.
2. The data transmission encryption method of claim 1, wherein, The (t, n) threshold secret sharing scheme uses an improved Shamir's scheme, wherein: The second key share is twice encrypted by a node preset encryption key before distributed storage, and the node specific encryption key is dynamically generated based on the node identifier and the hardware security module; The t value is dynamically adjusted according to the network environment, and when the network delay is higher than the threshold, the t value is reduced to speed up key reconstruction; The finite field parameter of the secret sharing scheme uses prime field GF(p), where p is a large prime number of 256 bits or more to resist brute force cracking.
3. The data transmission encryption method of claim 1, wherein, The lightweight session binding protocol in S6 includes: When the transmission session is initialized, the timestamp is digitally signed by the central time source, and the signature is embedded in the hash digest of the transmission session identifier; The session management node stores the Merkle tree root node value of the hash digest, which is used to verify the binding relationship between the transmission session identifier and the timestamp when reconstructing the base key; If the binding verification fails, immediately terminate the key reconstruction and trigger a security alert.
4. The data transmission encryption method of claim 1, wherein, The integrity verification in S5 includes: Generating a cyclic redundancy check code based on an anti-quantum hash algorithm for the data to be transmitted, and the anti-quantum hash algorithm uses the SPHINCS+ scheme; Performing hash tree verification on the distributed storage path of the second key share, where the leaf nodes of the hash tree are the twice encrypted key shares, and the root hash value is stored in the session management node; When the integrity verification fails, automatically discard the current transmission session and generate a new base key.
5. The data transmission encryption method of claim 1, wherein, Before S4, it also includes: The data to be transmitted is divided into blocks, and the size of each data block is dynamically adjusted according to the real-time network bandwidth. A quantum-safe hash digest containing a transmission session identifier and a timestamp is embedded in the header of each data block. The quantum-safe hash digest is generated using the lattice-based CRYSTALS-Dilithium algorithm. The block size adjustment follows the formula: BlockSize = BaseSize × (1 + α × BandwidthFluctuation), Where α is the bandwidth fluctuation coefficient and BaseSize is the base block size.
6. The data transmission encryption method of claim 1, wherein, After the data transmission is complete, the receiving end verifies the data's correctness through the following steps: Obtain all information about the transmission session, including the transmission session identifier, timestamp, and node identifier; The session management node and at least one other participating node are requested to provide key shares to reconstruct the base key; The validity of the synchronization key is verified using the reconstructed base key, and the integrity check code is used to confirm that the data has not been tampered with. If verification fails, a retransmission mechanism is initiated: the current transmission session identifier is retained but the timestamp is updated, the basic key generation and synchronization key derivation steps are re-executed, and the backup encryption channel is switched when the number of retransmissions exceeds the threshold.
7. The data transmission encryption method of claim 6, wherein, The generation of the node's preset encryption key includes the following steps: Based on the node identifier and the random entropy value output by the hardware security module, the key is generated through the HKDF key derivation function and refreshed at a preset period. The key is also automatically destroyed when a physical attack is detected. The secondary encryption uses AES-256-GCM mode to ensure the confidentiality and integrity of the key share.