A model encryption method based on symmetric encryption algorithm

By adopting a model encryption method based on a symmetric encryption algorithm in the industrial Internet, dynamic keys are generated in real time and the encryption strategy is dynamically adjusted, which solves the problems of cumbersome key replacement and inability to adapt the encryption strategy in the existing technology, and achieves high efficiency and security. of data encryption.

CN118784355BActive Publication Date: 2025-01-24国信优易(北京)数据要素科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411079204.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2025-01-24
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

The fixed key encryption method used in the existing industrial Internet is insufficient in the face of dynamically changing operation commands, and the key replacement process is cumbersome, which increases management and operation costs.

Method used

The model encryption method based on the symmetrical encryption algorithm is used to generate a dynamic key in real time through the SHA256 hash function, and dynamically adjust the encryption strategy based on the process parameters to achieve automatic update and adaptive adjustment of the encryption strategy.

Benefits of technology

It improves the unpredictability and dynamics of keys, reduces the risk of key cracking, simplifies the key management process, reduces management costs and risk of errors, and can respond to the dynamic environment of industrial control systems in real time, ensuring the accuracy of data encryption. Efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784355B_ABST
    Figure CN118784355B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of industrial Internet encryption technology, and in particular to a model encryption method based on a symmetric encryption algorithm. The present invention collects industrial control command sequences in real time, generates keys through a secure hash function, and generates dynamic keys using real-time operation command sequences, thereby improving the unpredictability of the keys; the keys are automatically generated and updated with the command sequences, and the dynamic keys are based on the real-time command sequences, without the need for frequent key replacement and complex key management, thereby simplifying the key management process and reducing management costs and error risks; and the operation commands are monitored in real time, and the keys are automatically adjusted according to command changes, thereby improving the flexibility and adaptability of the encryption method and being able to better cope with the dynamic environment of the industrial control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial Internet encryption technology, and in particular to a model encryption method based on a symmetric encryption algorithm. Background Art

[0002] In the industrial Internet environment, industrial control systems are responsible for managing and executing operational commands for equipment. The security of these commands is critical because they directly affect the normal operation of the production process.

[0003] The encryption methods currently used in industrial scenarios usually use fixed keys for encryption. However, as the number of devices increases, key distribution and management become complex and error-prone, increasing security risks. At the same time, attackers can find the patterns of fixed keys through frequent data packet capture and analysis, thereby cracking the keys. When faced with frequently changing operating commands in industrial control systems, they are unable to adapt to this dynamic environment, resulting in insufficient security and flexibility.

[0004] To address this problem, security is usually improved by regularly replacing keys, but the key replacement process is cumbersome, increasing management and operating costs. At the same time, the system may be temporarily unavailable during the replacement process. Some methods also use longer keys to increase the difficulty of cracking, but longer keys increase the computational overhead of encryption and decryption, affecting system performance. Therefore, a model encryption method based on a symmetric encryption algorithm is urgently needed to solve this problem. Summary of the invention

[0005] To this end, the present invention provides a model encryption method based on a symmetric encryption algorithm to overcome the problem that the key replacement process in the prior art is cumbersome, increases management and operating costs, and may cause the system to be temporarily unavailable during the replacement process; some methods use longer keys to increase the difficulty of cracking, but longer keys increase the computational overhead of encryption and decryption, affecting system performance.

[0006] To achieve the above object, the present invention provides a model encryption method based on a symmetric encryption algorithm, comprising:

[0007] Step S1, using SHA256 as a hash function, setting a system monitoring mechanism for collecting industrial control command sequences;

[0008] Step S2, real-time operation command sequence collection, in the industrial production process, real-time collection of operation command sequences;

[0009] Step S3, dynamically generate an encryption key, using the collected operation command sequence to generate a dynamic key through a hash function; this increases the dynamism and unpredictability of the key and reduces the risk of the key being cracked;

[0010] Step S4, automatically updating the key. The key is automatically generated and updated as the operation command sequence changes, without manual intervention, which simplifies the key management process and reduces management costs and error risks;

[0011] Step S5, extracting process parameters, real-time monitoring and extracting process parameters in the production process;

[0012] Step S6, dynamically adjusting the encryption strategy according to the extracted process parameters;

[0013] Dynamically adjust encryption strength and algorithms according to changes in process parameters;

[0014] Step S7, real-time adaptive encryption, using dynamic keys and adaptive encryption strategies to encrypt data; improving the flexibility and adaptability of the encryption method, being able to cope with the dynamic environment of the industrial control system in real time, and ensuring the efficiency and security of data encryption;

[0015] Step S8, data encryption, encrypting the data and storing or transmitting it according to the adaptive encryption strategy and dynamic key of step S7;

[0016] Step S9, data decryption, uses the same dynamic key generation method and process parameter adjustment mechanism to generate keys and encryption strategies in real time at the receiving end to decrypt data.

[0017] Furthermore, in step S1, the monitoring mechanism for setting the system to collect the industrial control command sequence is as follows:

[0018] SHA256 is defined as a hash function: H(x) = SHA-256(x), where H(x) is the hash value of input x, and x is the input data, i.e., a byte sequence of any length;

[0019] Then deploy data collectors at the nodes of the industrial control system to collect command sequences; install data collectors on devices including controllers, sensors, and actuators;

[0020] Define the command sequence format as C(t), C(t) = {(c1, t1), (c2, t2), ..., (c n ,t n )}, let c i represents the i-th command, t i Represents the timestamp of command i, where n is the total number of commands.

[0021] Furthermore, in step S2, a message queue and data stream platform (Apache Kafka) is selected for real-time data transmission, and command sequences are collected and transmitted through a real-time monitoring mechanism. The real-time monitoring transmission rate R(t) is: Where R(t) is the data transmission rate at time t, N(t) is the number of commands transmitted at time t, and T is the transmission time interval;

[0022] The collected command sequences are stored in the database and preprocessed. The relational database MySQL and NoSQL database are selected to store the command sequences. The storage data volume D(t) is expressed as: Where D(t) represents the amount of data stored at time t, len(c i ) is the length of the ith command, len(t i ) is the timestamp length of the i-th command; an industrial control command sequence monitoring mechanism is set through steps S1 and S2 to provide system security and real-time performance, and provide a basis for dynamic key generation and encryption optimization.

[0023] Furthermore, the dynamic key generation method in step S3 is:

[0024] Based on the operation command sequence C(t) that has been collected and stored in real time in step S2, the command sequence C(t) is standardized and expressed as: Here is is the standardized command sequence, sd represents the formatting process of the standardized function to unify the command sequence;

[0025] Combine the normalized command sequence into a single string, Here M(t) is the combined key material, Indicates string concatenation operation, c i and t i are the i-th command and timestamp respectively; || represents the concatenation operator;

[0026] Generate a dynamic key through a hash function, K t =H(M(t)), where K t is the dynamic key generated at time t, H represents the SHA256 hash function, and M(t) is the combined key material.

[0027] Furthermore, the dynamic key generation method in step S3 also includes:

[0028] Perform multiple rounds of hashing: in is the dynamic key after the kth round of hash operation, H (k) Indicates k rounds of hash operations, where k is the number of rounds of hash operations;

[0029] Step S3 verifies and updates the dynamic key, including:

[0030] Perform key verification.

[0031] like but

[0032] otherwise,

[0033] Here, validate is a verification function used to detect the security of the key. Indicates successful verification. Indicates that verification failed. If Satisfy a predetermined safety standard N;

[0034] Update the key in real time according to the changes in the command sequence, K t+Δt =H(M(t+Δt)), where K t+Δt It is a new dynamic key generated at time t+Δt, where Δt is the time interval. The method of dynamically generating encryption keys not only ensures the unpredictability and security of the keys, but also enhances the key's anti-cracking capability through multiple rounds of hash operations and key verification mechanisms.

[0035] Furthermore, the specific contents of the validate function include:

[0036] Collision resistance verification, computing and comparing hash values ​​of multiple keys;

[0037] Uniform distribution verification: statistically check the distribution of 0 and 1 of each key bit to make it close to 50%;

[0038] Calculate the entropy of the key so that it exceeds the minimum entropy value,

[0039] Key length verification to ensure that the generated key length meets expectations;

[0040] The uniformity is verified by counting the distribution of 0 and 1 of each bit of the key, expressed as: Here For the uniform distribution verification process, Is the key The i-th bit of , n is the total number of bits of the key, and ε is the allowable error range;

[0041] Entropy is calculated as: in is the entropy of the key, p i is the probability of the i-th bit appearing, and verifies whether the entropy of the key is high enough.

[0042] Furthermore, the key update method in step S4 is:

[0043] Collect the newly added operation command sequence in real time between time t and t+Δt: C(t+Δt)={(c n+1 ,tn+1 ),(c n+2 ,t n+2 ),...,(c n+m ,t n+m )}, where C(t+Δt) is the new command sequence at time t+Δt, c n+1 ,c n+2 ...,c n+m Is a new operation instruction, t n+1 ,t n+2 ,...,t n+m is the timestamp of the newly added command, and m is the total number of newly added commands;

[0044] Combine the previously collected command sequences with the newly added command sequences, C combined (t+Δt)=C(t)∪C(t+Δt), where C combined (t+Δt) is the merged command sequence at time t+Δt, C(t) is the command sequence at time t, C(t+Δt) is the newly added command sequence at time t+Δt, and ∪ represents the set merge operation;

[0045] The merged command sequence is standardized and the standardized command sequence is combined into a single string;

[0046] Generate a new dynamic key through a hash function;

[0047] And before use, verify whether the generated key meets the security requirements, and update the key in real time according to the changes in the command sequence; by dynamically generating and updating the encryption key, it is ensured that the key can be updated in real time as the operation command sequence changes, thereby enhancing the security and unpredictability of the key.

[0048] Furthermore, in step S6, the encryption strategy is dynamically adjusted as follows:

[0049] Based on the process parameters monitored and extracted in real time from each link of the production process in step S5, the process parameters are standardized;

[0050] Mapping process parameters to encryption strategies, and dynamically selecting a set of available encryption strategies based on process parameters;

[0051] Dynamically adjust encryption strength according to process parameters;

[0052] The encryption strategy here is selected according to the actual scenario.

[0053] Furthermore, the adaptive encryption method of step S7 includes:

[0054] Obtain the latest key from the dynamic key generated and verified in step S4;

[0055] Obtaining the currently applicable encryption policy from the encryption policy set determined in step S6;

[0056] According to the result of the mapping in step S6, the corresponding encryption algorithm is selected, and then the encryption algorithm configuration and data encryption are performed.

[0057] Furthermore, the data encryption method in step S8 is:

[0058] Collect real-time data that needs to be encrypted from industrial control systems and perform data integrity checks before encryption;

[0059] Obtain the latest generated and verified dynamic key from step S7, select the corresponding encryption algorithm according to the encryption strategy and strength determined in step S7, and configure the specific parameters of the encryption algorithm;

[0060] Initialize the encryption algorithm using the dynamic key and selected parameters;

[0061] The data to be encrypted is divided into data blocks, and each data block is encrypted using an initialized encryption algorithm. The data encryption process can efficiently and securely encrypt, store and transmit data in industrial control systems. Dynamic keys and adaptive encryption strategies are used to provide confidentiality and integrity for data throughout its life cycle.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] The present invention generates a key through a secure hash function according to an industrial control command sequence collected in real time, and generates a dynamic key using a real-time operation command sequence, thereby improving the unpredictability of the key.

[0064] In the present invention, keys are automatically generated and updated along with command sequences, and dynamic keys are based on real-time command sequences. Frequent key replacement and complicated key management are unnecessary, thus simplifying the key management process and reducing management costs and error risks.

[0065] The present invention monitors operation commands in real time, automatically adjusts keys according to command changes, improves the flexibility and adaptability of encryption methods, and can better cope with the dynamic environment of industrial control systems.

[0066] The present invention extracts process parameters from the production process, dynamically adjusts the encryption strength and algorithm according to changes in the process parameters, can respond to changes in the process parameters in real time, and ensure the efficiency and security of data encryption.

[0067] The present invention solves the problem that the key replacement process in the prior art is cumbersome, increases management and operation costs, and may cause the system to be temporarily unavailable during the replacement process; some methods use longer keys to increase the difficulty of cracking, but longer keys increase the computational overhead of encryption and decryption, affecting system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 It is a schematic diagram of the flow of the model encryption method based on the symmetric encryption algorithm of the present invention. DETAILED DESCRIPTION

[0069] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0070] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0071] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0072] Example 1

[0073] See also Figure 1 The present invention provides a model encryption method based on a symmetric encryption algorithm, comprising:

[0074] Step S1, using SHA256 as the hash function, setting the system to collect the monitoring mechanism of the industrial control command sequence:

[0075] SHA256 is defined as a hash function: H(x) = SHA-256(x), where H(x) is the hash value of input x, and x is the input data, i.e., a byte sequence of any length;

[0076] Then deploy data collectors at the nodes of the industrial control system to collect command sequences; install data collectors on devices including controllers, sensors, and actuators;

[0077] Define the command sequence format as C(t), C(t) = {(c1, t1), (c2, t2), ..., (c n ,t n )}, let c i represents the i-th command, t i Represents the timestamp of the i-th command, where n is the total number of commands;

[0078] Step S2, real-time operation command sequence collection, in the industrial production process, the operation command sequence is collected in real time; in step S2, the message queue and data stream platform (Apache Kafka) are selected for real-time data transmission, and the command sequence is collected and transmitted through the real-time monitoring mechanism. The real-time monitoring transmission rate R (t) is: Where R(t) is the data transmission rate at time t, N(t) is the number of commands transmitted at time t, and T is the transmission time interval;

[0079] The collected command sequences are stored in the database and preprocessed. The relational database MySQL and NoSQL database are selected to store the command sequences. The storage data volume D(t) is expressed as: Where D(t) represents the amount of data stored at time t, len(c i ) is the length of the ith command, len(t i ) is the timestamp length of the i-th command;

[0080] Step S3, dynamically generate an encryption key, using the collected operation command sequence to generate a dynamic key through a hash function; the dynamic key generation method is:

[0081] Based on the operation command sequence C(t) that has been collected and stored in real time in step S2, the command sequence C(t) is standardized and expressed as: Here is is the standardized command sequence, sd represents the formatting process of the standardized function to unify the command sequence;

[0082] Combine the normalized command sequence into a single string, Here M(t) is the combined key material, Indicates string concatenation operation, c i and t i are the i-th command and timestamp respectively; || represents the concatenation operator;

[0083] Generate a dynamic key through a hash function, K t =H(M(t)), where K t is the dynamic key generated at time t, H represents the SHA256 hash function, and M(t) is the combined key material;

[0084] Perform multiple rounds of hashing: in is the dynamic key after the kth round of hash operation, H (k) Indicates k rounds of hash operations, where k is the number of rounds of hash operations;

[0085] Step S3 verifies and updates the dynamic key, including:

[0086] Perform key verification.

[0087] like but

[0088] otherwise,

[0089] Here, validate is a verification function used to detect the security of the key. Indicates successful verification. Indicates that verification failed. If Satisfy a predetermined safety standard N;

[0090] Update the key in real time according to the changes in the command sequence, K t+Δt =H(M(t+Δt)), where K t+Δt is a new dynamic key generated at time t+Δt, where Δt is the time interval;

[0091] The specific contents of the validate validation function include:

[0092] Collision resistance verification, computing and comparing hash values ​​of multiple keys;

[0093] Uniform distribution verification: statistically check the distribution of 0 and 1 of each key bit to make it close to 50%;

[0094] Calculate the entropy of the key so that it exceeds the minimum entropy value,

[0095] Key length verification to ensure that the generated key length meets expectations;

[0096] The uniformity is verified by counting the distribution of 0 and 1 of each bit of the key, expressed as: Here For the uniform distribution verification process, Is the key The i-th bit of , n is the total number of bits of the key, and ε is the allowable error range;

[0097] Entropy is calculated as: in is the entropy of the key, p i is the probability of the i-th position appearing;

[0098] And verify that the entropy of the key is high enough;

[0099] Specifically, the encryption method provided by the present invention ensures the high security and unpredictability of the key through a multi-level security verification mechanism, including collision resistance verification, uniform distribution verification and entropy calculation; when the system generates and updates the key, it can make real-time adjustments according to the changes in the operation command sequence, ensuring the efficiency and security of key management; dynamically adjust the encryption strategy and strength, so that the system can flexibly respond to different working conditions and maintain the efficiency and security of the encryption process;

[0100] Step S4, automatically updating the key, the key is automatically generated and updated as the operation command sequence changes; the key update method in step S4 is:

[0101] Collect the newly added operation command sequence in real time between time t and t+Δt: C(t+Δt)={(c n+1 ,t n+1 ),(c n+2 ,t n+2 ),...,(c n+m ,t n+m )}, where C(t+Δt) is the new command sequence at time t+Δt, c n+1 ,c n+2 ...,c n+m Is a new operation instruction, t n+1 ,t n+2 ,...,t n+m is the timestamp of the newly added command, and m is the total number of newly added commands;

[0102] Combine the previously collected command sequences with the newly added command sequences, C combined (t+Δt)=C(t)∪C(t+Δt), where C combined (t+Δt) is the merged command sequence at time t+Δt, C(t) is the command sequence at time t, C(t+Δt) is the newly added command sequence at time t+Δt, and ∪ represents the set merge operation;

[0103] The merged command sequence is standardized and the standardized command sequence is combined into a single string;

[0104] Generate a new dynamic key through a hash function;

[0105] And verify whether the generated key meets the security requirements before use, and update the key in real time according to the changes in the command sequence;

[0106] Specifically, the dynamic key generation and update mechanism collects and standardizes the industrial control command sequence, generates dynamic keys using the SHA256 hash function, and increases the unpredictability and dynamism of the keys. It not only reduces the risk of key cracking, but also simplifies the key management process and reduces the need for manual intervention, thereby reducing management costs and the risk of errors. In addition, multiple rounds of hash operations further enhance the key's anti-cracking ability and ensure the high security of the system.

[0107] In addition, the present invention also optimizes the dynamic changes of process parameters obtained in the industrial production process. Failure to consider the changes of process parameters in the industrial production process may lead to low encryption efficiency under high load or emergency conditions, and the fixed encryption strategy cannot be adjusted in real time and lacks adaptive capabilities;

[0108] The present invention extracts process parameters from the production process and dynamically adjusts the encryption strategy according to these parameters; dynamically adjusts the encryption strength and algorithm according to the changes in process parameters; and adaptively adjusts the encryption strategy according to the real-time changes in process parameters, which can respond to the changes in process parameters in real time and ensure the efficiency and security of data encryption.

[0109] Step S5, extracting process parameters, real-time monitoring and extracting process parameters in the production process;

[0110] Step S6, dynamically adjusting the encryption strategy according to the extracted process parameters;

[0111] The encryption policy can be adjusted dynamically as follows:

[0112] Based on the process parameters monitored and extracted in real time from each link of the production process in step S5, the process parameters are standardized;

[0113] Mapping process parameters to encryption strategies, and dynamically selecting a set of available encryption strategies based on process parameters;

[0114] Dynamically adjust encryption strength according to process parameters;

[0115] The encryption strategy here is selected according to the actual scenario settings;

[0116] Step S7, real-time adaptive encryption, using dynamic keys and adaptive encryption strategies to encrypt data;

[0117] The adaptive encryption method of step S7 includes:

[0118] Obtain the latest key from the dynamic key generated and verified in step S4;

[0119] Obtaining the currently applicable encryption policy from the encryption policy set determined in step S6;

[0120] According to the result of the mapping in step S6, the corresponding encryption algorithm is selected, and then the encryption algorithm configuration and data encryption are performed;

[0121] Specifically, the adaptive encryption strategy dynamically adjusts the encryption algorithm and strength by real-time monitoring and standardizing the process parameters in the production process, so that the encryption process can flexibly adapt to changes in the industrial environment; the mechanism of mapping process parameters to specific encryption strategies ensures the selection of the optimal encryption method under different working conditions, improves the encryption efficiency and security of the system; and enables the system to maintain efficient encryption performance under high load or emergency conditions;

[0122] Step S8, data encryption, according to the adaptive encryption strategy and dynamic key of step S7, the data is encrypted and stored or transmitted, and the data encryption method is:

[0123] Collect real-time data that needs to be encrypted from industrial control systems and perform data integrity checks before encryption;

[0124] Obtain the latest generated and verified dynamic key from step S7, select the corresponding encryption algorithm according to the encryption strategy and strength determined in step S7, and configure the specific parameters of the encryption algorithm;

[0125] Initialize the encryption algorithm using the dynamic key and selected parameters;

[0126] Divide the data to be encrypted into data blocks, and use the initialized encryption algorithm to encrypt each data block;

[0127] Step S9, data decryption, using the same dynamic key generation method and process parameter adjustment mechanism, generating keys and encryption strategies in real time at the receiving end to decrypt data;

[0128] The present invention provides a more efficient and secure model encryption scheme by combining dynamic key generation and encryption optimization based on process parameters; the dynamic key generation mechanism enhances the unpredictability of the key and simplifies the key management process, while the encryption optimization based on process parameters improves the adaptability and encryption efficiency of the system, and can better cope with the dynamically changing needs in the industrial production process.

[0129] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

Claims

1. A model encryption method based on a symmetric encryption algorithm, characterized in that: include: Step S1, using SHA256 as a hash function, setting a system monitoring mechanism for collecting industrial control command sequences; Step S2, real-time operation command sequence collection, in the industrial production process, real-time collection of operation command sequences; Step S3, dynamically generate an encryption key, using the collected operation command sequence to generate a dynamic key through a hash function; Dynamic key generation is as follows: Based on the operation command sequence C(t) that has been collected and stored in real time in step S2, the command sequence C(t) is standardized and expressed as: Here is is the standardized command sequence, sd represents the formatting process of the standardized function to unify the command sequence; Combine the normalized command sequence into a single string, Here M(t) is the combined key material, Indicates string concatenation operation, c i and t i are the i-th command and timestamp respectively; || represents the concatenation operator; Generate a dynamic key through a hash function, K t =H(M(t)), where K t is the dynamic key generated at time t, H represents the SHA256 hash function, and M(t) is the combined key material; Perform multiple rounds of hashing: in is the dynamic key after the kth round of hash operation, H (k) Indicates k rounds of hash operations, where k is the number of rounds of hash operations; Step S3 verifies and updates the dynamic key, including: Perform key verification. like but otherwise, Here, validate is a verification function used to detect the security of the key. Indicates successful verification. Indicates that verification failed. If Satisfy a predetermined safety standard N; Update the key in real time according to the changes in the command sequence, K t+Δt =H(M(t+Δt)), where K t+Δt is a new dynamic key generated at time t+Δt, where Δt is the time interval; The specific contents of the validate function include: Collision resistance verification, computing and comparing hash values ​​of multiple keys; Uniform distribution verification: count the distribution of 0 and 1 of each key bit to make it close to 50%; Calculate the entropy of the key so that it exceeds the minimum entropy value, Key length verification to ensure that the generated key length meets expectations; The uniformity is verified by counting the distribution of 0 and 1 of each bit of the key, expressed as: Here For the uniform distribution verification process, Is the key The i-th bit of , n is the total number of bits of the key, and ε is the allowable error range; Entropy is calculated as: in is the entropy of the key, p i is the probability of the i-th bit appearing, and verifies whether the entropy of the key is high enough; Step S4, automatically updating the key, the key is automatically generated and updated as the operation command sequence changes; Step S5, extracting process parameters, real-time monitoring and extracting process parameters in the production process; Step S6, dynamically adjusting the encryption strategy according to the extracted process parameters; The encryption policy can be adjusted dynamically as follows: Based on the process parameters monitored and extracted in real time from each link of the production process in step S5, the process parameters are standardized; Mapping process parameters to encryption strategies, and dynamically selecting a set of available encryption strategies based on process parameters; Dynamically adjust encryption strength according to process parameters; The encryption strategy here is selected according to the actual scenario settings; Step S7, real-time adaptive encryption, using dynamic keys and adaptive encryption strategies to encrypt data; Adaptive encryption methods include: Obtain the latest key from the dynamic key generated and verified in step S4; Obtaining the currently applicable encryption policy from the encryption policy set determined in step S6; According to the result of the mapping in step S6, the corresponding encryption algorithm is selected, and then the encryption algorithm configuration and data encryption are performed; Step S8, data encryption, encrypting the data and storing or transmitting it according to the adaptive encryption strategy and dynamic key of step S7; Step S9, data decryption, uses the same dynamic key generation method and process parameter adjustment mechanism to generate keys and encryption strategies in real time at the receiving end to decrypt data.

2. According to the model encryption method based on the symmetric encryption algorithm of claim 1, it is characterized in that: In step S1, the monitoring mechanism of the system for collecting the industrial control command sequence is set as follows: SHA256 is defined as a hash function: H(x) = SHA-256(x), where H(x) is the hash value of input x, and x is the input data, i.e., a byte sequence of any length; Deploy data collectors at nodes of industrial control systems to collect command sequences; Define the command sequence format as C(t), C(t) = {(c1, t1), (c2, t2), ..., (c n ,t n )}, let c i represents the i-th command, t i Represents the timestamp of command i, where n is the total number of commands.

3. A model encryption method based on a symmetric encryption algorithm according to claim 2, characterized in that: In step S2, a message queue and a data stream platform are selected for real-time data transmission. The command sequence is collected and transmitted through a real-time monitoring mechanism. The real-time monitoring transmission rate R(t) is: Where R(t) is the data transmission rate at time t, N(t) is the number of commands transmitted at time t, and T is the transmission time interval; The collected command sequences are stored in the database and preprocessed. The relational database MySQL and NoSQL database are selected to store the command sequences. The storage data volume D(t) is expressed as: Where D(t) represents the amount of data stored at time t, len(c i ) is the length of the ith command, len(t i ) is the timestamp length of the i-th command.

4. A model encryption method based on a symmetric encryption algorithm according to claim 3, characterized in that: The key update method in step S4 is: Collect the newly added operation command sequence in real time between time t and t+Δt: C(t+Δt)={(c n+1 ,t n+1 ),(c n+2 ,t n+2 ),...,(c n+m ,t n+m )}, where C(t+Δt) is the new command sequence at time t+Δt, c n+1 ,c n+2 ...,c n+m Is a new operation instruction, t n+1 ,t n+2 ,...,t n+m is the timestamp of the newly added command, and m is the total number of newly added commands; Combine the previously collected command sequences with the newly added command sequences, C combined (t+Δt)=C(t)∪C(t+Δt), where C combined (t+Δt) is the merged command sequence at time t+Δt, C(t) is the command sequence at time t, C(t+Δt) is the newly added command sequence at time t+Δt, and ∪ represents the set merge operation; The merged command sequence is standardized and the standardized command sequence is combined into a single string; Generate a new dynamic key through a hash function; And before use, verify whether the generated key meets the security requirements, and update the key in real time according to the changes in the command sequence.

5. A model encryption method based on a symmetric encryption algorithm according to claim 4, characterized in that: The data encryption method in step S8 is: Collect real-time data that needs to be encrypted from industrial control systems and perform data integrity checks before encryption; Obtain the latest generated and verified dynamic key from step S7, select the corresponding encryption algorithm according to the encryption strategy and strength determined in step S7, and configure the specific parameters of the encryption algorithm; Initialize the encryption algorithm using the dynamic key and selected parameters; The data to be encrypted is divided into data blocks, and each data block is encrypted using the initialized encryption algorithm.

Citation Information

Patent Citations

  • Identity verification method based on timestamp and dynamic token

    CN118018206A

  • High-security mobile phone communication system based on dynamic token link encryption

    CN118019000A