Industrial gateway data encryption transmission method based on national secret algorithm
By introducing mechanisms such as collaborative challenge seeds, time consistency monitoring, and hash fingerprints during the key negotiation process, the problem of inconsistent session keys during key negotiation is solved, the traceability and security of industrial gateway data transmission are achieved, the generation of pseudo-encrypted links is prevented, and the security of industrial control systems is improved.
Patent Information
- Application Number
- CN202511126236.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-10-28
AI Technical Summary
In industrial network environments, the key negotiation process based on the SM2 or SM9 algorithm is susceptible to attackers injecting disturbances through time delays, resulting in inconsistent session keys. Attackers can disguise themselves as legitimate communication parties to conduct covert hijacking and middleman control, forming a pseudo-encrypted link and threatening the security of industrial control systems.
Through mechanisms such as collaborative challenge seeds, time consistency monitoring, two-way comparison of intermediate parameters, symmetric cross-validation, full-process mapping identification and link hash fingerprint, the consistency and integrity of each link in the key negotiation process are ensured, delay disturbances or man-in-the-middle attacks are identified and blocked in real time, and the traceability and non-repudiation of the communication path are achieved.
Ensure session key consistency, prevent the generation of pseudo-encrypted links, achieve full traceability and non-repudiation of communication paths, and improve the link security and anti-attack capabilities of industrial control systems.
Smart Images

Figure CN120856433A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, specifically to a method for encrypted data transmission in industrial gateways based on Chinese cryptographic algorithms. Background Technology
[0002] Encrypted data transmission from industrial gateways based on national cryptographic algorithms refers to a transmission method in industrial IoT or smart manufacturing applications where industrial gateways use national cryptographic algorithms (such as SM2, SM3, and SM4) approved by the State Cryptography Administration to encrypt and protect the integrity of data collected, aggregated, and forwarded from various industrial devices or sensors. This method ensures confidentiality, tamper-proofness, and traceability of the data even when it passes through complex industrial network environments or public communication links, effectively defending against security threats such as data theft, tampering, and forgery, and guaranteeing data security and compliance during the digital, networked, and intelligent transformation of industrial production.
[0003] The existing technology has the following shortcomings:
[0004] In key negotiation processes based on SM2 or SM9 algorithms, the gateway and server need to collaboratively generate the same session key through multiple rounds of message exchange and mathematical operations to ensure the confidentiality and integrity of subsequent data transmission. However, in real-world industrial network environments, attackers can inject time delays to disrupt the transmission timing of critical data packets during key negotiation. This means injecting microsecond to millisecond delays into specific negotiation steps without corrupting the data content, causing deviations or anomalies in the response and computation logic of the protocol state machines of both parties. As a result, although the gateway and server appear to have completed the key negotiation process, the negotiated session key is actually inconsistent, and the two parties fail to establish a truly secure link based on the same key.
[0005] Building upon this, attackers can impersonate legitimate communicators to covertly hijack and control bidirectional communication links, creating "pseudo-encrypted links." These links maintain the illusion of encrypted communication, and the protocol flow fails to trigger anomaly detection, easily misleading both parties into believing that data exchange is secure. In reality, attackers can continuously steal, tamper with, or replay sensitive data within the link. Especially in industrial control system scenarios, this can be easily exploited to tamper with control commands, forge status data, or inject illegal instructions, thereby enabling remote and unauthorized control of production equipment, and even inducing critical equipment malfunctions, production anomalies, or safety accidents.
[0006] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] The purpose of this invention is to provide a data encryption transmission method for industrial gateways based on national cryptographic algorithms. Through multiple mechanisms, including collaborative challenge seeds, time consistency monitoring, bidirectional comparison of intermediate parameters, symmetric cross-validation, full-process mapping identification, and link hash fingerprinting, it ensures real-time identification and blocking of delay disturbances or man-in-the-middle attacks at each stage of key negotiation, preventing inconsistent session keys and fake encrypted links. By using packet-level mapping identification and bidirectional hash fingerprinting for evidence storage, it achieves traceability and non-repudiation of the communication path, ensuring the link security and attack resistance of industrial control and critical infrastructure, thereby solving the problems mentioned in the background art.
[0008] To achieve the above objectives, the present invention provides the following technical solution: a method for encrypted data transmission in an industrial gateway based on national cryptographic algorithms, comprising the following steps:
[0009] S001, the industrial gateway and the server generate collaborative challenge seeds based on physical random number sources, exchange and synchronize them to confirm consistency, ensuring that the initial entropy source of the session is synchronized and cannot be forged;
[0010] S002, based on the confirmation result of the consensus of the collaborative challenge seed, activate the time consistency monitoring of the key negotiation link, add sending and receiving timestamps to each round of key negotiation interaction messages, record the round-trip delay and construct a time series deviation curve to monitor the delay disturbance in the link;
[0011] S003, based on the time series deviation curve, the industrial gateway and the server synchronously send back the encrypted digest of the intermediate negotiation parameters in each round of key negotiation, and compare and verify the consistency of the key derivation path in both directions to ensure that the intermediate parameters are continuous and have not been tampered with.
[0012] S004. Based on the verification result of consistent key derivation path, the industrial gateway and server use the pre-session key to generate multiple sets of symmetric encrypted digests and perform cross-verification to check the integrity and symmetry of the pre-session key derivation.
[0013] S005 After completing the integrity and symmetry verification of the pre-session key derivation, the final negotiated session key is combined with the time series, parameter digest and verification trajectory to form a full-process mapping identifier, which is then bound to the session key and dynamically attached to subsequent data transmission to achieve traceability of the integrity of the key negotiation path.
[0014] S006 After completing the traceability of the integrity of the key negotiation path at the data packet level, a hash fingerprint of the link negotiation is generated based on the full-process mapping identifier. The industrial gateway and the server store the evidence bidirectionally, forming a behavioral fingerprint file of the entire key negotiation link, which is used for full-link auditing of integrity, security and anti-attack capabilities.
[0015] Preferably, step S001 includes:
[0016] The industrial gateway and server generate high-entropy random numbers through physical random number sources, and use the SM3 algorithm to calculate random number digests to obtain collaborative challenge seeds;
[0017] The industrial gateway and the server exchange collaborative challenge seeds after encryption using the SM2 algorithm. The receiver verifies the signature and records the timestamp and unique session identifier using the SM2 algorithm.
[0018] The industrial gateway and server concatenate the local and received collaborative challenge seeds, use the SM3 algorithm to calculate the combined hash value, and synchronously compare and confirm consistency.
[0019] The industrial gateway and server generate a session initialization identifier based on the collaborative challenge seed and the device's unique identifier, and use the SM3 algorithm to calculate the session initialization hash value.
[0020] Preferably, step S002 includes:
[0021] The industrial gateway and server record the sending and receiving timestamps for each round of key negotiation interaction messages, and synchronize them periodically with a trusted time source based on a high-precision clock source.
[0022] Calculate the one-way latency and round-trip latency of each round of interactive messages, and record them sequentially to the local time series database;
[0023] Sliding window statistical analysis is applied to the time series dataset to calculate the mean, variance, standard deviation, and rate of change, and to generate a time series deviation curve.
[0024] A link health score is established based on the time series deviation curve, and key negotiation is suspended when the score falls below the security threshold.
[0025] Preferably, step S003 includes:
[0026] The industrial gateway and server respectively use the SM3 algorithm to calculate the encrypted digest of the intermediate negotiation parameters in each round of key negotiation, and bind the negotiation sequence number and timestamp.
[0027] The industrial gateway and the server exchange encrypted digests through a secure communication channel. The digest data packets are signed with the SM2 algorithm and carry an identity identifier and a unique identifier for the negotiation session.
[0028] After receiving the digest, the industrial gateway and server verify the signature and compare it with the local digest. If they match, the pass status is recorded. If they do not match, the negotiation process is paused and the log is archived.
[0029] The industrial gateway and server jointly analyze the summary comparison results with the local time series deviation curve. When an anomaly is detected, it is automatically identified as a link attack and a negotiation termination is triggered.
[0030] Preferably, step S004 includes:
[0031] The industrial gateway and server use the SM4 algorithm to encrypt multiple sets of original verification data generated by the physical random number source based on the pre-session key, generate encryption digests and bind sequence numbers, timestamps and encryption round identifiers;
[0032] The industrial gateway and the server exchange encrypted digests and original verification data numbers through a secure communication channel, and sign and verify the transmitted content using the SM2 algorithm.
[0033] The industrial gateway and server re-encrypt the local data corresponding to the received original verification data number and compare it with the digest of the other party. If the comparison is inconsistent, the negotiation is terminated and the abnormality is recorded.
[0034] The industrial gateway and server generate an integrity verification report based on the cross-validation results. When the verification pass rate is lower than the security threshold, a security alarm is triggered and the negotiation is terminated.
[0035] Preferably, step S005 includes:
[0036] The industrial gateway and server concatenate the negotiation information chain based on the pre-session key, collaborative challenge seed, device unique identifier, time series record, parameter digest and verification result, and generate a full-process mapping identifier using the SM3 algorithm;
[0037] The industrial gateway and server use the SM4 algorithm to encrypt and bind the session key and the full-process mapping identifier to generate a binding key pair;
[0038] The industrial gateway and server dynamically attach end-to-end mapping identifiers to each data packet during encryption and transmission. The receiver verifies the consistency of the identifier information, and refuses to decrypt if the verification fails.
[0039] The industrial gateway and server periodically verify the consistency between the mapping identifier and the data packet identifier information, and archive the verification results and timestamps. In case of an anomaly, communication is automatically interrupted and the data is sealed.
[0040] Preferably, step S006 includes:
[0041] The industrial gateway and server respectively use the SM3 algorithm to generate hash fingerprints for the time series, parameter digest, verification trajectory and full-process mapping identifier of the entire negotiation process;
[0042] The industrial gateway and the server exchange hash fingerprints through an encrypted channel and use the SM2 algorithm to verify each other's signatures, thus completing the fingerprint comparison consistency verification.
[0043] The industrial gateway and server encrypt the consistent hash fingerprint and dataset using the SM4 algorithm, store them locally, and report them to the security audit server for filing and evidence preservation.
[0044] Industrial gateways and servers establish behavioral fingerprint profiles based on stored hash fingerprints, serving as end-to-end audit credentials for the integrity and security of key negotiation.
[0045] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0046] This invention employs a multi-layered security approach, including collaborative challenge seeds, time consistency monitoring, bidirectional comparison of intermediate parameters, symmetric cross-validation, end-to-end mapping identification, and link hash fingerprinting. This ensures that any disruption, man-in-the-middle tampering, or forgery at any stage of the key negotiation process can be identified and blocked in real time, preventing inconsistent session keys and the generation of fake encrypted links. In particular, by using packet-level end-to-end mapping identification and bidirectional hash fingerprinting, each key negotiation and data transmission link is given a unique behavioral fingerprint, achieving full traceability and non-repudiation of the communication path. This provides a reliable link security closed loop and strong anti-attack capabilities for scenarios with extremely high security requirements, such as industrial control systems and critical infrastructure. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0048] Figure 1 This is a flowchart of a method for encrypted data transmission in an industrial gateway based on Chinese cryptographic algorithms, according to the present invention. Detailed Implementation
[0049] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0050] This invention provides, for example Figure 1 The method for encrypted data transmission in an industrial gateway based on Chinese cryptographic algorithms, as shown, includes the following steps:
[0051] S001, the industrial gateway and the server generate collaborative challenge seeds using their respective physical random number sources. After exchanging collaborative challenge seeds, they are compared synchronously. The consistency of the collaborative challenge seeds is confirmed based on the comparison results, ensuring that the initial entropy source of the session is synchronized and cannot be forged.
[0052] The industrial gateway and server generate collaborative challenge seeds using their respective physical random number sources, exchange and compare them to ensure the synchronization and unforgeability of the initial entropy source of the session. The specific steps are as follows:
[0053] Before establishing key negotiation, the industrial gateway and server each generate a set of high-entropy random numbers using locally configured physical random number generators. These generators combine randomness sampling based on hardware noise sources with entropy increase algorithms to ensure the security and compliance of the generated random numbers in terms of statistical distribution, unpredictability, and entropy value. The random number generation process employs random number generation algorithms compliant with the standards of the State Cryptography Administration, such as a hybrid entropy extraction mechanism using true and pseudo-random numbers to ensure the unpredictability and reproducibility of the entropy source. After generating the random numbers, the industrial gateway and server each use their independent random numbers as input and calculate the corresponding random number digest using the SM3 algorithm to obtain a first digest value and a second digest value. These digest values are then used as seeds for collaborative challenges in subsequent interactions. This method ensures that even if an attacker obtains partial information about the random number generation, it is difficult to predict the seed content after the digest.
[0054] Entropy increase algorithms, in physical random number generators, are mathematical algorithms used to increase the entropy value and optimize the uniform distribution of low-entropy or non-uniformly distributed random signals collected from the original noise source. The aim is to improve the entropy strength and unpredictability of random numbers. Common entropy increase algorithms include hash function compression algorithms (such as SM3 and SHA-256), hybrid algorithms using linear feedback shift registers (LFSR), decimation and scrambling algorithms, and composite enhancement mechanisms combining true and pseudo-random numbers. Their implementation typically involves:
[0055] The original random bit stream, acquired from hardware noise sources (such as thermal noise, voltage noise, or quantum noise), undergoes preliminary anti-interference and error correction processing to obtain a set of bit streams with bias or periodicity.
[0056] Entropy-increasing algorithms are used to compress, map, or scramble these bitstreams, flattening the bias and making the output bits statistically closer to a uniform distribution, while resisting any known prediction and modeling methods. For example, by concatenating multiple consecutive noise samples and inputting them into the SM3 hash algorithm, the output hash value has the characteristics of high entropy, unpredictability, and uniform distribution, thus ensuring that the generated random numbers meet security and compliance requirements in entropy value evaluation and national cryptographic standard testing (such as NISTSP800-90B or GM / T0005). Through the synergy of hardware noise sources and entropy-increasing algorithms, the physical source of entropy is guaranteed to be unpredictable, and the purity and randomness of entropy are improved through algorithmic processing, achieving a secure level of random number output.
[0057] The industrial gateway transmits its locally generated collaborative challenge seed to the server via an encrypted communication channel, and the server similarly transmits its generated collaborative challenge seed to the industrial gateway. Both parties use an asymmetric encryption method based on the SM2 algorithm to encrypt the collaborative challenge seed, preventing seed leakage due to link eavesdropping during transmission. To ensure the integrity and authenticity of the transmission, both the industrial gateway and the server sign the collaborative challenge seed upon transmission. Upon receiving the seed, the receiver verifies the signature of the data packet using the SM2 signature verification algorithm to confirm that the seed has not been tampered with during transmission and that its source is authentic and trustworthy. A current timestamp and a unique session identifier are included during seed transmission to prevent replay attacks or seed forgery.
[0058] After exchanging seeds and verifying each other's identities, the industrial gateway and server enter the synchronization and comparison phase of the collaborative challenge seeds. Both parties perform a hash combination operation based on the received seeds from the other party and their locally generated seeds. The combination method is as follows: the local seed and the other party's seed are concatenated, and then a hash operation is performed using the SM3 algorithm to obtain the combined hash value. The hash values calculated by both parties must be consistent. If the calculation results are consistent, it indicates that there is no difference in the input and reception of the initial entropy source between the two parties, and the entropy source synchronization has reached consistency. If they are inconsistent, the key negotiation process is immediately terminated, and an error notification and log record are returned to the other party to facilitate tracing the cause of the anomaly. Simultaneously, both parties store their local and the other party's collaborative challenge seeds and the calculated hash results in a local secure storage area for subsequent integrity verification and auditing.
[0059] After confirming the consistency of the collaborative challenge seed, the industrial gateway and server generate a session initialization identifier based on the seed. This identifier is generated by concatenating the collaborative challenge seed with the unique device identifiers of both parties (such as the gateway hardware serial number and the server device fingerprint), using the SM3 algorithm to produce a session initialization hash value. This hash value serves as the initial identifier for this key negotiation process and as the link identifier benchmark for subsequent key negotiation stages, persisting throughout the entire negotiation and encrypted data transmission process. This method ensures that even with identical physical random number inputs, the generated session initialization identifier remains unique and cannot be forged due to the uniqueness of the devices and the bidirectional nature of the collaborative challenge seed.
[0060] The purpose of this step is to establish a highly secure and consistent initial entropy source for subsequent key negotiation and encrypted communication. This ensures that key negotiation is synchronous, random, and unforgeable from the outset, effectively resisting potential attacks such as seed forgery, session hijacking, and fake encrypted links. By having the industrial gateway and server generate collaborative challenge seeds based on their respective physical random number sources, it is guaranteed that the random numbers used by both parties have genuine physical randomness, avoiding security risks caused by the uncertainty or predictability of software pseudo-random numbers. The bidirectional exchange and synchronous comparison mechanism of the seeds ensures that both parties reach a completely consistent foundation at the entropy source level during the negotiation initiation phase, avoiding deviations caused by unidirectional random number generation or the possibility of being tampered with by attackers. If there are differences in the collaborative challenge seeds, it indicates potential interference or attacks during random number collection, transmission, or verification. The negotiation process can be interrupted immediately to prevent key derivation based on different entropy sources, which could lead to inconsistent session keys between the two parties. This mechanism not only ensures the basic security of the subsequent key negotiation process, but also establishes source trust in the negotiation process through the unforgeability of the seed, effectively preventing security threats such as man-in-the-middle spoofing and seed replay, laying an irreplaceable trust baseline for establishing a truly secure link.
[0061] S002, after confirming the consistency of the collaborative challenge seed, activate the dynamic monitoring of the time consistency of the key negotiation link, add a sending timestamp and a receiving timestamp to each round of key negotiation interaction message, record the time delay data of message round trip, construct a time series deviation curve based on all time delay data, and monitor the delay disturbance risk in the key negotiation link according to the deviation curve.
[0062] A dynamic monitoring method based on time consistency is proposed for the key negotiation process between industrial gateways and servers after the consensus confirmation of the collaborative challenge seed. This method aims to prevent latency disturbances and abnormal interference in the link, ensuring the security and stability of the key negotiation link. The steps include:
[0063] After the industrial gateway and server reach a consensus on the challenge seed, they simultaneously initiate a time recording mechanism. Each party records the generation time of each round of key negotiation interaction messages as a sending timestamp, and simultaneously records the receiving timestamp upon receiving a negotiation message from the other party. The recorded timestamps must be accurate to the microsecond level. A high-precision clock source ensures the consistency and accuracy of time recording, avoiding errors caused by clock drift or device latency. To further enhance the reliability of time recording, the industrial gateway and server periodically synchronize locally with a trusted time source (such as a GPS time source or a BeiDou satellite time source) to ensure a consistent time reference and prevent subsequent monitoring accuracy from being affected by local clock inaccuracies.
[0064] After each round of key negotiation messages, the industrial gateway and server calculate the one-way latency and round-trip latency of the message in real time based on the sending and receiving timestamps. One-way latency is calculated by estimating the directional differences in network transmission and calibrating against the time differences of bidirectional messages, while round-trip latency is calculated directly based on the difference between the sending and receiving timestamps. Latency data from all rounds is recorded sequentially and stored in a local time-series database to ensure data integrity and immutability. The latency data for each round includes not only the absolute time difference but also contextual information such as the message sequence number, key negotiation stage identifier, and the identities of both parties, for subsequent traceability and correlation analysis.
[0065] Based on the recorded latency data for all rounds, the industrial gateway and server calculate the time-series deviation curve locally. This deviation curve is modeled by fitting and analyzing the statistical mean, standard deviation, and rate of change of continuous latency data, generating a dynamic curve reflecting link stability and volatility. This curve is updated in real-time using a sliding window method, with the window length dynamically adjusted according to the negotiation round or time period to ensure it reflects the latest changes in the link status. By comparing the stability indicators of the deviation curve, the industrial gateway and server can identify whether there are abnormal latency, sudden latency spikes, or periodic interference in the link. If the change in the deviation curve exceeds a preset safety threshold, the negotiation round is automatically marked as a risky round, detailed logs are recorded, and a link anomaly alarm is generated to facilitate subsequent remedial measures or negotiation interruption.
[0066] Based on the latency data of all recorded rounds, the industrial gateway and server calculate the deviation curves of the time series locally. The specific steps are as follows:
[0067] The industrial gateway and the server each number the round-trip delay data of each round of key negotiation messages recorded, according to the negotiation order, to form an ordered time-series dataset;
[0068] Preprocess the time series dataset to remove obvious distorted values caused by errors or occasional anomalies, and smooth the data using methods such as median filtering or moving average to ensure the stability and authenticity of the curve fitting.
[0069] Sliding window statistical analysis is used to calculate the mean, variance, standard deviation and rate of change of the time delay data in each window. These statistical indicators are used to capture the fluctuation characteristics of the time delay data. At the same time, the difference between adjacent windows is calculated to quantify the trend of time delay change.
[0070] Based on the above statistical analysis results, a complete time series deviation curve is generated using algorithms such as interpolation or polynomial fitting. The vertical axis of the curve represents the delay deviation or rate of change, and the horizontal axis represents the negotiation rounds or time sequence. The curve can dynamically reflect the delay fluctuations and potential anomalies of the link during the negotiation process, providing a quantitative basis for subsequent link security determination and anomaly detection during the key negotiation process.
[0071] Based on the time-series deviation curve, the industrial gateway and server establish a dynamic link health scoring mechanism. This mechanism comprehensively assesses the overall stability and security of the current negotiation link based on the degree of latency deviation, frequency of anomalies, and trends in each round. If the health score continuously declines and falls below a set security threshold, a pause mechanism for key negotiation is automatically triggered, and both parties' operations and maintenance personnel are notified to intervene and investigate. Conversely, if the link health remains within a safe range, the negotiation process continues, and the time-series deviation curve serves as one of the inputs for subsequent key negotiation path integrity verification, enabling time-based security monitoring and traceability recording throughout the negotiation process.
[0072] This step aims to ensure the stability and security of the key negotiation process by precisely monitoring the time consistency of each round of interactive messages in the key negotiation link, capturing and identifying potential latency disturbances in the link in real time. In real-world industrial network environments, links are often complex and uncontrollable. Attackers can inject microsecond- to millisecond-level latency interference during the transmission of negotiation messages, causing differences or asynchrony in the response and calculation logic of the protocol state machine between the negotiating parties, thus leading to deviations in the key negotiation path or even negotiation failure. However, traditional key negotiation protocols do not continuously and dynamically monitor and analyze message transmission latency, making them highly vulnerable to covert interference by attackers using time side-channel techniques. By forcibly attaching sending and receiving timestamps to each round of interactive messages, industrial gateways and servers can accurately record the one-way and round-trip latency of each message and construct a time series deviation curve based on the continuously accumulated full latency data. This curve dynamically reflects the link latency fluctuation characteristics throughout the negotiation process. If the curve shows a sudden change, an abnormal rise, or fluctuations exceeding a set threshold, it indicates a potential for abnormal interference or degradation of the link, triggering an alarm or interrupting the negotiation in a timely manner. This prevents inconsistencies or hijacking and forgery of the negotiation results due to interference. This mechanism achieves security monitoring and intelligent perception of the entire key negotiation process at the link level, ensuring the negotiation link remains controllable and reliable. It prevents man-in-the-middle attacks based on time differences, state drift, and the generation of fake links, comprehensively enhancing the negotiation security defense capabilities of industrial gateways and servers in harsh network environments.
[0073] S003, based on the monitoring time series deviation curve, the industrial gateway and the server synchronously send back the encrypted digest of the currently calculated intermediate negotiation parameters in each round of key negotiation. Based on the sent encrypted digest, a bidirectional comparison is performed to verify the consistency of the key derivation path and ensure that all intermediate parameters are continuous and have not been tampered with during the key negotiation process.
[0074] Based on the monitoring results of the time series deviation curve during the key negotiation process between industrial gateways and servers, and to further ensure the continuity and authenticity of intermediate parameters during key negotiation, a bidirectional return transmission and consistency verification of the encrypted digest of intermediate negotiation parameters is proposed. Specifically, the steps include:
[0075] After each round of key negotiation mathematical calculations, both the industrial gateway and the server locally generate intermediate negotiation parameters for that round. These intermediate parameters include the counterparty's public key used in the current round's key calculation, the negotiation random number, the negotiation round identifier, the result of the previous round's calculation, and the output of the current round's calculation. For these intermediate parameters, both the industrial gateway and the server use the national commercial cryptography algorithm SM3 to perform cryptographic digest operations on all parameter content, generating a fixed-length cryptographic digest value. This digest value comprehensively reflects all characteristics of the intermediate parameters in this round, and possesses collision resistance and irreversibility, ensuring that attackers cannot deduce the original parameter content from the digest value. Each round's generated cryptographic digest value is bound to the sequence number and timestamp of that round's negotiation to prevent replay attacks and sequence obfuscation during digest return.
[0076] After the industrial gateway and server complete their negotiation calculations in this round, they immediately send back the locally generated encrypted digest to each other through the established secure communication channel. During the transmission, the digest data packet includes the sender's identity identifier, the unique identifier of the negotiation session, and the current round number, and is digitally signed using the SM2 algorithm. Upon receiving the digest data from the other party, the receiver first verifies the authenticity and integrity of the digest packet using SM2 signature verification to confirm that the data has not been tampered with or forged during transmission. After successful verification, the receiver compares the received digest value from the other party with its own locally calculated digest value for the same round.
[0077] During the comparison of digest values between the industrial gateway and the server, if the digest values are found to be completely identical, it indicates that the intermediate parameters of both parties in this round of key negotiation are completely consistent, and the calculation path has not been tampered with or interfered with. Both parties record the successful comparison status and continue to the next round of key negotiation. If the comparison results are inconsistent, an abnormal response mechanism is immediately triggered. The negotiation process of both parties is suspended, and all intermediate parameters, digest values, timestamps, and comparison failure logs of the current round are synchronously archived and the operations and security team is notified for investigation and analysis. This mechanism prevents attackers from micro-manipulating intermediate parameters during the key negotiation process, causing the negotiation path to drift or fork, thereby generating inconsistent session keys and creating conditions for subsequent hijacking of pseudo-encrypted links.
[0078] After each round of digest comparison, the industrial gateway and server jointly analyze the comparison results with the local time-series deviation curve to dynamically assess the security and stability of the link. If the time-series deviation curve fluctuates abnormally and digest comparison failures also occur, it will be automatically identified as a potential link attack or man-in-the-middle interference, triggering a negotiation termination and link switching mechanism to ensure that subsequent communication is not further affected by the damaged link. Simultaneously, the encrypted digests, comparison records, and timestamp information from all rounds form a negotiation integrity log for subsequent auditing and source tracing verification.
[0079] The purpose of this step is to ensure the consistency and integrity of the key derivation paths between the two parties during the key negotiation process by generating encrypted digests of the intermediate negotiation parameters generated in each round of negotiation and transmitting and comparing them bidirectionally. This prevents the intermediate parameters from being secretly tampered with or corrupted due to link interference, delay disturbances, or potential man-in-the-middle attacks, thereby ensuring that the final negotiated session key remains consistent and trustworthy. In real-world industrial network environments, key negotiation often relies on multiple rounds of complex mathematical calculations and interactions, such as elliptic curve multiplication and iteration of key derivation functions. The intermediate results of each round of calculation determine the calculation direction and the final key value of subsequent rounds. If an attacker modifies the transmitted parameters in a round of negotiation through time delay intervention, message replay, or forgery, even without changing the surface process of the key negotiation protocol, it may subtly cause a shift in the intermediate parameters between the two parties, ultimately leading to inconsistent session keys. This allows attackers to exploit vulnerabilities to build fake encrypted links, achieving link hijacking or information theft. By generating and sending back a digest of intermediate parameters in each round, and comparing it bidirectionally with the other party's digest, any minor deviations or anomalies in the negotiation path can be detected in a timely manner. This ensures that all intermediate parameters remain synchronized and continuous, constructing a fully verifiable link in the key negotiation process. This mechanism not only enhances the tamper-resistance of the negotiation path but also exposes potential security threats in real time during the negotiation phase. It establishes a security anchor point for verification and traceability for each round of negotiation, ultimately ensuring a high degree of integrity and consistency in the session key generation process at the link, computation, and data levels.
[0080] S004 After verifying that the key derivation path is consistent, the industrial gateway and the server generate multiple sets of symmetric encrypted digests based on the currently derived pre-session key, perform cross-verification, and verify the integrity and symmetry of the pre-session key derivation based on the cross-verification results to resist the risk of time disturbance and man-in-the-middle attack.
[0081] After verifying that the key derivation paths of the industrial gateway and the server are consistent, multiple sets of symmetric encrypted digests are further generated based on the currently derived pre-session key, and cross-validation is performed to comprehensively verify the integrity and symmetry of the pre-session key, ensuring that the key negotiation process is not interfered with by time disturbances or man-in-the-middle attacks. Specifically, this includes the following steps:
[0082] After verifying the consistency of the key derivation path, the industrial gateway and server independently generate multiple sets of original random verification data based on the currently derived pre-session key. The verification data is dynamically generated using a physical random number source, ensuring unpredictability and replay resistance. Each set of verification data is accompanied by a unique sequence number and timestamp during generation. Subsequently, the industrial gateway and server use the same symmetric encryption algorithm, preferably the SM4 algorithm from the national commercial cryptography standard, to encrypt each set of verification data one by one using the pre-session key, generating multiple encrypted digests. Each encrypted digest is bound to the original data sequence number, generation timestamp, and encryption round identifier corresponding to its generation, ensuring a strong binding relationship between the digest data and the key derivation state, preventing confusion or forgery during the digest process.
[0083] After generating all encrypted digests locally, the industrial gateway and server exchange all encrypted digests and their corresponding original verification data sequence numbers and encryption round identifiers through a pre-defined secure communication channel. During the exchange, all transmitted content is digitally signed using the SM2 algorithm and includes the sender's unique device identifier to ensure the verifiability and non-repudiation of the digest and original data source. Upon receiving the encrypted digests, the receiver first verifies their authenticity and integrity using a digital signature to prevent tampering or forgery during transmission. In this way, both parties ensure data immutability and link security during the exchange, laying the foundation for subsequent cross-verification.
[0084] After successfully receiving the encrypted digest and original verification data number from each other, the industrial gateway and server, based on the received original data number, re-perform symmetric encryption on the corresponding locally generated original verification data using the same locally derived pre-session key to obtain a locally calculated encrypted digest. This digest is then compared one by one with the digests of the same number sent by the other party. If the locally calculated digest is completely identical to the corresponding digest sent by the other party, it indicates that both parties performed the same encryption operation based on the same pre-session key, verifying the integrity and symmetry of key derivation. If any digest does not match, it is immediately determined that the currently derived pre-session key is abnormal or the derivation process has been tampered with, and the negotiation is immediately terminated. All abnormal digests and original data numbers are recorded and archived for subsequent security tracing and auditing.
[0085] After cross-validating all encrypted digests, the industrial gateway and server generate an integrity verification report for the current round's pre-session key based on the verification results. The report includes information such as the comparison status, timestamp, sequence number, and verification pass rate for each digest. If the verification pass rate reaches a preset security threshold, both parties confirm that the current pre-session key is completely derived, symmetric, and trustworthy. This key is then used as the basis for subsequent session keys, proceeding to the next stage of key confirmation and application. If verification fails or the verification pass rate falls below the threshold, a security risk is immediately identified in the negotiation link, triggering a security alarm and terminating the negotiation.
[0086] The purpose of this step is to generate multiple sets of symmetric encrypted digests based on the pre-session key and perform cross-validation, further verifying the integrity and symmetry of key derivation during the key negotiation process. This establishes a robust security defense against potential time disturbances and man-in-the-middle attacks after the negotiation link completes path consistency verification. During key negotiation, although the preceding steps have ensured parameter synchronization along the path through bidirectional comparison of intermediate parameters, it still cannot completely avoid hidden derivation errors or inconsistencies caused by link delay injection, message replay, or forgery. By using the currently derived pre-session key to perform symmetric encryption on multiple sets of original verification data dynamically generated from a physical random number source, generating encrypted digests, and performing cross-validation with the other party, it is possible to verify whether both parties truly possess the same pre-session key from the result of the encryption operation. Because of the characteristics of symmetric encryption algorithms, only when both parties' keys are consistent and the input data is identical will the final encrypted digests be completely consistent. This verification method has extremely high requirements for key consistency; even a slight difference in the key of either party will fail the verification. By verifying the success or failure of cross-validation, both parties not only confirm that key derivation has not been interfered with by man-in-the-middle attacks or delays, but also perceive the authenticity and integrity of key derivation in real time through the comparison process, significantly improving the security robustness of the negotiation process. This step plays a crucial role in defending against targeted attacks, avoiding potential key inconsistencies in the later stages of negotiation, and preventing the construction of fake encrypted links. It lays a reliable key foundation for the subsequent confirmation of session keys and encrypted data transmission, ensuring the security and trustworthiness of the entire key negotiation chain from algorithm and link to result.
[0087] S005 After completing the integrity and symmetry verification of the pre-session key derivation, the final negotiated session key is combined with the time sequence, parameter digest and verification trajectory recorded during the negotiation process to form a full-process mapping identifier. The full-process mapping identifier is bound to the final session key and the full-process mapping identifier is dynamically attached to all subsequent data transmissions to achieve traceability of the integrity of the key negotiation path at the data packet level.
[0088] After the industrial gateway and server complete the integrity and symmetry verification of the pre-session key derivation, a full-process mapping identifier is further generated by combining the final negotiated session key with multi-dimensional information from the entire negotiation process, and data packet-level key negotiation path integrity traceability is achieved. This includes the following steps:
[0089] After confirming that the pre-session key has passed integrity and symmetry checks, the industrial gateway and server simultaneously derive the final session key. The derivation algorithm is based on the consistent pre-session key, combined with the collaborative challenge seed from the preceding negotiation, the unique identifiers of both devices, the time sequence record of the key negotiation, the encrypted digests of intermediate parameters, and the verification results of each round of cross-validation. The industrial gateway and server concatenate all the core data elements of the above negotiation process into a negotiation information chain in a predetermined order. This negotiation information chain is then processed using the SM3 hash algorithm to generate a fixed-length full-process mapping identifier. This mapping identifier is globally unique, uniquely identifying the entire key negotiation process, and possesses tamper-proof and forgery-proof characteristics; even if an attacker replays the data at a certain stage, they cannot reconstruct the same mapping identifier.
[0090] The industrial gateway and server bind the generated end-to-end mapping identifier to the final derived session key. The binding method involves encrypting the session key and the end-to-end mapping identifier using the SM4 symmetric encryption algorithm to generate a binding key pair, with each party holding one copy. This binding process ensures the indivisibility between the end-to-end mapping identifier and the session key. Any tampering with the session key or mapping identifier will invalidate the binding relationship, preventing the decryption of subsequent encrypted communication data. This binding method ensures that even if the session key is illegally replaced during storage or transmission, the lack of the corresponding mapping identifier will prevent normal key decryption, thus preventing the risks of key link hijacking and fake link forgery.
[0091] After binding the session key and the end-to-end mapping identifier, the industrial gateway and server dynamically append this mapping identifier to the encryption and transmission of all subsequent data packets. Specifically, before encrypting each data packet, the end-to-end mapping identifier is concatenated with the data content to be encrypted, and then encrypted using the SM4 symmetric encryption algorithm to form a ciphertext data packet. During decryption, the receiver verifies the identifier information in the data packet based on the bound end-to-end mapping identifier, confirming that it matches the locally recorded negotiation process consistency identifier. If the match fails, decryption is rejected to prevent data packets from being forged or tampered with. By dynamically injecting the negotiation mapping identifier into the data packets, the system ensures that each data packet has end-to-end traceability for key negotiation, achieving data packet-level key path integrity protection.
[0092] During continuous communication between the industrial gateway and the server, the consistency between the association status of the full-process mapping identifier and the identifier information in the data packets is periodically verified. Simultaneously, all usage records of the mapping identifiers, timestamps of the data packets, and verification results are archived in real time, forming a complete security audit chain for the key negotiation and data transmission process. If an inconsistency between the mapping identifier and the local record is detected during communication, or if verification fails, communication will be automatically interrupted, and the abnormal identifier, timestamp, and associated data packets will be archived for subsequent tracing and evidence collection.
[0093] The purpose of this step is to generate a full-process mapping identifier by combining the final negotiated session key with multi-dimensional information such as the time sequence, parameter digests, and verification traces generated during the key negotiation process. This identifier is then bound to the session key, establishing a strong correlation between key negotiation and data transmission, forming a full-link traceability and integrity protection mechanism for the key negotiation path. The entire key negotiation process involves not only multiple mathematical operations and parameter interactions but also critical operations such as time consistency monitoring, path consistency verification, and symmetry verification. The security of each step directly determines the trustworthiness of the final session key. If the final session key is used solely for subsequent data encryption without binding and tracing the negotiation process, attackers could still bypass security detection and steal or tamper with communication data by creating a fake encrypted link through link hijacking, key replacement, or data packet forgery. Through this step, the industrial gateway and server integrate the entire information chain of the negotiation process—including timestamps of all negotiation rounds, encrypted digests of intermediate parameters in each round, cross-validation results, and time sequence fluctuations—to generate a full-process mapping identifier. This identifier is then bound to the session key and inseparably applied to every subsequent encrypted data packet. The identifier is dynamically appended to the data packet during encryption. The receiver can verify before decryption whether the mapping identifier in the data packet matches the locally negotiated path, ensuring that the data not only originates from the actually negotiated key but also corresponds one-to-one with the specific negotiation process. This achieves closed-loop verification throughout the entire process from key generation to data transmission, giving each data packet traceability security attributes. It effectively defends against packet-level man-in-the-middle attacks, replay attacks, and path forgery, significantly improving the data security and communication reliability of industrial gateways and servers in complex industrial network environments.
[0094] S006 After completing the traceability of the integrity of the key negotiation path at the data packet level, the hash fingerprint of the link negotiation is dynamically generated based on the full-process mapping identifier and time series, parameter digest and verification trajectory. The industrial gateway and the server perform bidirectional storage of the hash fingerprint to form a behavior fingerprint file of the entire key negotiation link, which serves as the full-link audit certificate for the integrity, security and anti-attack capabilities of the key negotiation.
[0095] To ensure the entire key negotiation and data transmission link possesses traceable, verifiable, and non-repudiable security attributes after the data packet-level key negotiation path integrity traceability is completed between industrial gateways and servers, a method is proposed to dynamically generate link negotiation hash fingerprints based on full-process mapping identifiers and time series, parameter digests, and verification trajectories, and to achieve bidirectional evidence storage and behavioral fingerprint profile establishment. Specifically, the method includes the following steps:
[0096] After the industrial gateway and server complete the binding of the session key and the full-process mapping identifier, and the integrity traceability of the data packets, they synchronously retrieve all procedural data generated during the entire key negotiation process. This data includes: time-series data of each round of interaction during key negotiation, summaries of intermediate parameters calculated in each round, comparison results of cross-validation in each round, the finally generated full-process mapping identifier, and mapping identifier records dynamically attached during subsequent data packet encryption. All of this data is concatenated according to a preset data structure and order to form a complete negotiation process dataset. Subsequently, the industrial gateway and server respectively use the SM3 hash algorithm to perform cryptographic hash operations on this dataset, generating a fixed-length link negotiation hash fingerprint. This hash fingerprint possesses uniqueness and collision resistance, and can uniquely identify the entire lifecycle information of this key negotiation and data transmission link.
[0097] After generating hash fingerprints locally, the industrial gateway and server immediately send these locally generated hash fingerprints to each other via an encrypted channel, along with a locally recorded timestamp, a unique identifier for the negotiation session, and unique identification information for both devices. Upon receiving the hash fingerprint, both parties first perform SM2 digital signature verification on the hash fingerprint itself and its accompanying information to ensure the fingerprint has not been tampered with during transmission and to verify the sender's identity. Subsequently, both parties compare the locally generated hash fingerprint with the hash fingerprint sent by the other party. If they are completely identical, it confirms that the hash fingerprint for this link negotiation has achieved bidirectional consistency and possesses complete negotiation fingerprint attributes. If a discrepancy is found in the fingerprint comparison, the negotiation process is automatically marked as abnormal, subsequent communication is terminated, and the abnormal fingerprint and related data are archived for future reference.
[0098] After completing bidirectional verification of hash fingerprints, the industrial gateway and server persistently store the final confirmed link negotiation hash fingerprint and the dataset on which it was generated locally. The storage is encrypted using SM4 symmetric encryption to ensure data security and confidentiality. Simultaneously, both parties report the hash fingerprint and the associated unique identifier of the negotiation session to their respective security audit servers or trusted time sources for record-keeping, forming a timestamp- and identity-bound evidence record. This dual local and remote evidence storage method ensures the non-repudiation and auditability of the entire negotiation process, enabling tracing and evidence reconstruction based on the link hash fingerprint and behavioral profiles in the event of future security incidents or disputes.
[0099] Based on the hash fingerprint obtained from the notarized agreement, the industrial gateway and server establish a behavioral fingerprint profile for this key negotiation. This profile details the entire negotiation timeline, parameter digest, verification trajectory, full-process mapping identifiers, and the entire process of hash fingerprint generation and comparison. The behavioral fingerprint profile serves as an audit credential for the integrity and security of this negotiation, supporting subsequent source verification and path reconstruction of all data packets during data transmission, ensuring a secure closed loop for the communication link.
[0100] This step serves to further enhance the security of key negotiation between the industrial gateway and server after key negotiation and data packet-level path integrity traceability. It involves dynamically generating a hash fingerprint of the negotiated link and bidirectionally storing this fingerprint between the two parties. This creates a unique, immutable, and traceable full-link behavioral fingerprint archive of the key negotiation process, enabling comprehensive auditing and security authentication of the entire negotiation process and data transmission path. Key negotiation, as the foundation for secure data communication, relies not only on the strength of the algorithm but also on the integrity and immutability of the entire negotiation process. If any part of the negotiation process, such as the time series, parameter digest, or verification trajectory, is maliciously tampered with or forged, the final negotiated session key will lose its credibility and may even be exploited by attackers to establish a false secure link. This step comprehensively integrates all key data from the key negotiation process, such as time series, parameter digests, verification trajectories, and full-process mapping identifiers, and uses the SM3 hash algorithm to generate a unique link negotiation hash fingerprint, ensuring the digital compression and unique marking of the entire negotiation process. By enabling two-way verification of the hash fingerprint and local and remote encrypted storage, not only is end-to-end evidence solidification of the negotiation process achieved, but also, in the event of a future security incident, the behavioral fingerprint profile can be used to quickly reconstruct the negotiation process and data packet path, determining whether the link has been tampered with, forged, or subjected to man-in-the-middle interference. This behavioral fingerprint profile serves as an objective, independent, and complete audit credential for secure communication between the industrial gateway and the server, significantly enhancing the security and attack resistance capabilities of key negotiation and data transmission processes. It ensures that communication links in high-security scenarios such as industrial networks possess end-to-end verifiability and non-repudiation.
[0101] The aforementioned industrial gateway data encryption transmission method based on national cryptographic algorithms achieves multi-dimensional dynamic verification and end-to-end traceability of the entire key negotiation process. This effectively addresses the shortcomings of traditional key negotiation methods in terms of timing security, path consistency, and link integrity verification, resulting in significant security enhancement. Through layered protection using collaborative challenge seeds, time consistency monitoring, bidirectional comparison of intermediate parameters, symmetric cross-validation, end-to-end mapping identification, and link hash fingerprinting, this method ensures that any delay disturbance, man-in-the-middle tampering, or forgery at any stage of the key negotiation process can be identified and blocked in real time, preventing inconsistent session keys and the generation of fake encrypted links. In particular, the packet-level end-to-end mapping identification and hash fingerprint bidirectional notarization endow each key negotiation and data transmission link with a unique behavioral fingerprint, achieving end-to-end traceability and non-repudiation of the communication path. This provides a reliable link security closed loop and strong anti-attack capabilities for scenarios with extremely high security requirements, such as industrial control systems and critical infrastructure.
[0102] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0103] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely for distinguishing one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0104] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0105] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0106] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0107] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0108] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0109] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0110] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for encrypted data transmission in an industrial gateway based on national cryptographic algorithms, characterized in that, Includes the following steps: S001, the industrial gateway and the server generate collaborative challenge seeds based on physical random number sources, exchange and synchronize them to confirm consistency, ensuring that the initial entropy source of the session is synchronized and cannot be forged; S002, based on the confirmation result of the consensus of the collaborative challenge seed, activate the time consistency monitoring of the key negotiation link, add sending and receiving timestamps to each round of key negotiation interaction messages, record the round-trip delay and construct a time series deviation curve to monitor the delay disturbance in the link; S003, based on the time series deviation curve, the industrial gateway and the server synchronously send back the encrypted digest of the intermediate negotiation parameters in each round of key negotiation, and compare and verify the consistency of the key derivation path in both directions to ensure that the intermediate parameters are continuous and have not been tampered with. S004. Based on the verification result of consistent key derivation path, the industrial gateway and server use the pre-session key to generate multiple sets of symmetric encrypted digests and perform cross-verification to check the integrity and symmetry of the pre-session key derivation. S005 After completing the integrity and symmetry verification of the pre-session key derivation, the final negotiated session key is combined with the time series, parameter digest and verification trajectory to form a full-process mapping identifier, which is then bound to the session key and dynamically attached to subsequent data transmission to achieve traceability of the integrity of the key negotiation path. S006 After completing the traceability of the integrity of the key negotiation path at the data packet level, a hash fingerprint of the link negotiation is generated based on the full-process mapping identifier. The industrial gateway and the server store the evidence bidirectionally, forming a behavior fingerprint file of the entire key negotiation link, which is used for full-link auditing of integrity, security and anti-attack capabilities.
2. The method for encrypted data transmission in an industrial gateway based on national cryptographic algorithms according to claim 1, characterized in that, Step S001 includes: The industrial gateway and server generate high-entropy random numbers through physical random number sources, and use the SM3 algorithm to calculate random number digests to obtain collaborative challenge seeds; The industrial gateway and the server exchange collaborative challenge seeds after encryption using the SM2 algorithm. The receiver verifies the signature and records the timestamp and unique session identifier using the SM2 algorithm. The industrial gateway and server concatenate the local and received collaborative challenge seeds, use the SM3 algorithm to calculate the combined hash value, and synchronously compare and confirm consistency. The industrial gateway and server generate a session initialization identifier based on the collaborative challenge seed and the device's unique identifier, and use the SM3 algorithm to calculate the session initialization hash value.
3. The method for encrypted data transmission in an industrial gateway based on national cryptographic algorithms according to claim 1, characterized in that, Step S002 includes: The industrial gateway and server record the sending and receiving timestamps for each round of key negotiation interaction messages, and synchronize them periodically with a trusted time source based on a high-precision clock source. Calculate the one-way latency and round-trip latency of each round of interactive messages, and record them sequentially to the local time series database; Sliding window statistical analysis is applied to the time series dataset to calculate the mean, variance, standard deviation, and rate of change, and to generate a time series deviation curve. A link health score is established based on the time series deviation curve, and key negotiation is suspended when the score falls below the security threshold.
4. The method for encrypted data transmission of an industrial gateway based on a national cryptographic algorithm according to claim 1, characterized in that, Step S003 includes: The industrial gateway and server respectively use the SM3 algorithm to calculate the encrypted digest of the intermediate negotiation parameters in each round of key negotiation, and bind the negotiation sequence number and timestamp. The industrial gateway and the server exchange encrypted digests through a secure communication channel. The digest data packets are signed with the SM2 algorithm and carry an identity identifier and a unique identifier for the negotiation session. After receiving the digest, the industrial gateway and server verify the signature and compare it with the local digest. If they match, the pass status is recorded. If they do not match, the negotiation process is paused and the log is archived. The industrial gateway and server jointly analyze the summary comparison results with the local time series deviation curve. When an anomaly is detected, it is automatically identified as a link attack and a negotiation termination is triggered.
5. The method for encrypted data transmission of an industrial gateway based on a national cryptographic algorithm according to claim 1, characterized in that, Step S004 includes: The industrial gateway and server use the SM4 algorithm to encrypt multiple sets of original verification data generated by the physical random number source based on the pre-session key, generate encryption digests and bind sequence numbers, timestamps and encryption round identifiers; The industrial gateway and the server exchange encrypted digests and original verification data numbers through a secure communication channel, and sign and verify the transmitted content using the SM2 algorithm. The industrial gateway and server re-encrypt the local data corresponding to the received original verification data number and compare it with the digest of the other party. If the comparison is inconsistent, the negotiation is terminated and the abnormality is recorded. The industrial gateway and server generate an integrity verification report based on the cross-validation results. When the verification pass rate is lower than the security threshold, a security alarm is triggered and the negotiation is terminated.
6. The method for encrypted data transmission of an industrial gateway based on a national cryptographic algorithm according to claim 1, characterized in that, Step S005 includes: The industrial gateway and server concatenate the negotiation information chain based on the pre-session key, collaborative challenge seed, device unique identifier, time series record, parameter digest and verification result, and generate a full-process mapping identifier using the SM3 algorithm; The industrial gateway and server use the SM4 algorithm to encrypt and bind the session key and the full-process mapping identifier to generate a binding key pair; The industrial gateway and server dynamically attach end-to-end mapping identifiers to each data packet during encryption and transmission. The receiver verifies the consistency of the identifier information, and refuses to decrypt if the verification fails. The industrial gateway and server periodically verify the consistency between the mapping identifier and the data packet identifier information, and archive the verification results and timestamps. In case of an anomaly, communication is automatically interrupted and the data is sealed.
7. The method for encrypted data transmission of an industrial gateway based on a national cryptographic algorithm according to claim 1, characterized in that, Step S006 includes: The industrial gateway and server respectively use the SM3 algorithm to generate hash fingerprints for the time series, parameter digest, verification trajectory and full-process mapping identifier of the entire negotiation process; The industrial gateway and the server exchange hash fingerprints through an encrypted channel and use the SM2 algorithm to verify each other's signatures, thus completing the fingerprint comparison consistency verification. The industrial gateway and server encrypt the consistent hash fingerprint and dataset using the SM4 algorithm, store them locally, and report them to the security audit server for filing and evidence preservation. Industrial gateways and servers establish behavioral fingerprint profiles based on stored hash fingerprints, serving as end-to-end audit credentials for the integrity and security of key negotiation.
Citation Information
Cited By
Internet of Things data secure storage method and device based on cloud computing and medium
CN121056143A